Documentation
¶
Overview ¶
Package units contains amboy.Job definiteness for Evergreen tasks.
Loading the units package registers all jobs in the amboy Job Registry.
By convention the implementations of these jobs are: private with public constructors that return the amboy.Job type, they use amboy/job.Base for core implementation, implementing only Run and whatever additional methods or functions are required. The units package prefers a one-to-one mapping of files to job implementations. Additionally all jobs must be capable of marshiling to either JSON/BSON/YAML (depending on the amoby.JobType format.)
Index ¶
- Constants
- func AddBackupJobs(ctx context.Context, env evergreen.Environment, ts time.Time) error
- func DisableAndNotifyPoisonedHost(ctx context.Context, env evergreen.Environment, h host.Host, reason string) error
- func GetPatchSummariesByCommit(reader io.Reader) ([]patch.Summary, error)
- func HandlePoisonedHost(ctx context.Context, env evergreen.Environment, h *host.Host, reason string) error
- func NewAgentDeployJob(env evergreen.Environment, h host.Host, id string) amboy.Job
- func NewAgentMonitorDeployJob(env evergreen.Environment, h host.Host, id string) amboy.Job
- func NewBackupMDBCollectionJob(opts backup.Options, ts time.Time) amboy.Job
- func NewBuildingContainerImageJob(env evergreen.Environment, h *host.Host, dockerOptions host.DockerOptions, ...) amboy.Job
- func NewCacheHistoricalTestDataJob(projectId string, id string) amboy.Job
- func NewCloudHostReadyJob(env evergreen.Environment, id string) amboy.Job
- func NewCloudUpdateSSHKeysJob(provider, region, id string) amboy.Job
- func NewCollectHostIdleDataJob(h *host.Host, t *task.Task, startTime, finishTime time.Time) amboy.Job
- func NewCollectTaskEndDataJob(t *task.Task, h *host.Host) amboy.Job
- func NewCommitQueueJob(env evergreen.Environment, queueID string, id string) amboy.Job
- func NewConvertHostToLegacyProvisioningJob(env evergreen.Environment, h host.Host, id string, attempt int) amboy.Job
- func NewConvertHostToNewProvisioningJob(env evergreen.Environment, h host.Host, id string, attempt int) amboy.Job
- func NewCronRemoteFifteenMinuteJob() amboy.Job
- func NewCronRemoteFifteenSecondJob() amboy.Job
- func NewCronRemoteFiveMinuteJob() amboy.Job
- func NewCronRemoteHourJob() amboy.Job
- func NewCronRemoteMinuteJob() amboy.Job
- func NewDecoHostNotifyJob(env evergreen.Environment, h *host.Host, err error, message string) amboy.Job
- func NewDistroAliasSchedulerJob(distroID string, ts time.Time) amboy.Job
- func NewDistroSchedulerJob(env evergreen.Environment, distroID string, ts time.Time) amboy.Job
- func NewDuplicateTaskCheckJob(id string) amboy.Job
- func NewEventNotifierJob(env evergreen.Environment, q amboy.Queue, id string, events []string) amboy.Job
- func NewEventSendJob(id, ts string) amboy.Job
- func NewGenerateTasksJob(id string, ts string) amboy.Job
- func NewGithubStatusUpdateJobForDeleteFromCommitQueue(owner, repo, ref string, prNumber int) amboy.Job
- func NewGithubStatusUpdateJobForExternalPatch(patchID string) amboy.Job
- func NewGithubStatusUpdateJobForNewPatch(version string) amboy.Job
- func NewGithubStatusUpdateJobForProcessingError(githubContext, owner, repo, ref, description string) amboy.Job
- func NewGithubStatusUpdateJobForPushToCommitQueue(owner, repo, ref string, prNumber int) amboy.Job
- func NewHostAllocatorJob(env evergreen.Environment, distroID string, timestamp time.Time) amboy.Job
- func NewHostCreateJob(env evergreen.Environment, h host.Host, id string, currentAttempt int, ...) amboy.Job
- func NewHostExecuteJob(env evergreen.Environment, h host.Host, script string, sudo bool, ...) amboy.Job
- func NewHostMonitorContainerStateJob(env evergreen.Environment, h *host.Host, providerName, id string) amboy.Job
- func NewHostMonitorExternalStateJob(env evergreen.Environment, h *host.Host, id string) amboy.Job
- func NewHostSetupJob(env evergreen.Environment, h *host.Host) amboy.Job
- func NewHostStatsCollector(id string) amboy.Job
- func NewHostStatsJob(ts string) amboy.Job
- func NewHostTerminationJob(env evergreen.Environment, h *host.Host, terminateIfBusy bool, reason string) amboy.Job
- func NewIdleHostTerminationJob(env evergreen.Environment, id string) amboy.Job
- func NewJasperManagerCleanup(id string, env evergreen.Environment) amboy.Job
- func NewJasperRestartJob(env evergreen.Environment, h host.Host, expiration time.Time, ...) amboy.Job
- func NewLastContainerFinishTimeJob(id string) amboy.Job
- func NewLatencyStatsCollector(id string, duration time.Duration) amboy.Job
- func NewLocalAmboyStatsCollector(env evergreen.Environment, id string) amboy.Job
- func NewLocalUpdateSSHKeysJob(id string) amboy.Job
- func NewNotificationStatsCollector(id string) amboy.Job
- func NewOldestImageRemovalJob(h *host.Host, providerName, id string) amboy.Job
- func NewParentDecommissionJob(id, d string, maxContainers int) amboy.Job
- func NewPatchIntentProcessor(patchID mgobson.ObjectId, intent patch.Intent) amboy.Job
- func NewPeriodicBuildJob(projectID, definitionID string, ts time.Time) amboy.Job
- func NewQueueStatsCollector(id string) amboy.Job
- func NewReauthorizationJob(env evergreen.Environment, u *user.DBUser, id string) amboy.Job
- func NewRemoteAmboyStatsCollector(env evergreen.Environment, id string) amboy.Job
- func NewRepotrackerJob(msgID, projectID string) amboy.Job
- func NewSpawnhostExpirationCheckJob(ts string, h *host.Host) amboy.Job
- func NewSpawnhostExpirationWarningsJob(id string) amboy.Job
- func NewSpawnhostModifyJob(h *host.Host, changes host.HostModifyOptions, ts string) amboy.Job
- func NewSpawnhostStartJob(h *host.Host, user, ts string) amboy.Job
- func NewSpawnhostStopJob(h *host.Host, user, ts string) amboy.Job
- func NewStaticUpdateSSHKeysJob(h host.Host, id string) amboy.Job
- func NewStrandedTaskCleanupJob(id string) amboy.Job
- func NewSysInfoStatsCollector(id string) amboy.Job
- func NewTaskExecutionMonitorJob(taskID string, execution int, attempt int, ts string) amboy.Job
- func NewTaskExecutionMonitorPopulateJob(id string) amboy.Job
- func NewTaskStatsCollector(id string) amboy.Job
- func NewTasksRestartJob(opts model.RestartOptions) amboy.Job
- func NewTestLogsCleanupJob(ts time.Time) amboy.Job
- func NewTestResultsCleanupJob(ts time.Time) amboy.Job
- func NewUserDataDoneJob(env evergreen.Environment, hostID string, ts time.Time) amboy.Job
- func NewVersionActivationJob(id string) amboy.Job
- func NewVolumeDeletionJob(ts string, v *host.Volume) amboy.Job
- func NewVolumeExpirationCheckJob(ts string, v *host.Volume, provider string) amboy.Job
- func NewVolumeExpirationWarningsJob(id string) amboy.Job
- func PopulateActivationJobs(part int) amboy.QueueOperation
- func PopulateAgentDeployJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateAgentMonitorDeployJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateAliasSchedulerJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateBackgroundStatsJobs(env evergreen.Environment, part int) amboy.QueueOperation
- func PopulateCacheHistoricalTestDataJob(part int) amboy.QueueOperation
- func PopulateCatchupJobs() amboy.QueueOperation
- func PopulateCommitQueueJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateContainerStateJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateDataCleanupJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateDuplicateTaskCheckJobs() amboy.QueueOperation
- func PopulateEventAlertProcessing(env evergreen.Environment) amboy.QueueOperation
- func PopulateGenerateTasksJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostAllocatorJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostCreationJobs(env evergreen.Environment, part int) amboy.QueueOperation
- func PopulateHostJasperRestartJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostMonitoring(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostProvisioningConversionJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostSetupJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostStatJobs(parts int) amboy.QueueOperation
- func PopulateHostTerminationJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateIdleHostJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateLastContainerFinishTimeJobs() amboy.QueueOperation
- func PopulateLocalQueueJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateOldestImageRemovalJobs() amboy.QueueOperation
- func PopulateParentDecommissionJobs() amboy.QueueOperation
- func PopulatePeriodicBuilds(part int) amboy.QueueOperation
- func PopulatePeriodicNotificationJobs(parts int) amboy.QueueOperation
- func PopulateReauthorizationJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateSSHKeyUpdates(env evergreen.Environment) amboy.QueueOperation
- func PopulateSchedulerJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateSpawnhostExpirationCheckJob() amboy.QueueOperation
- func PopulateTaskMonitoring(mins int) amboy.QueueOperation
- func PopulateUserDataDoneJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateVolumeExpirationCheckJob() amboy.QueueOperation
- func PopulateVolumeExpirationJob() amboy.QueueOperation
Constants ¶
const ( // GitHub intent processing errors ProjectDisabled = "project was disabled" PatchingDisabled = "patching was disabled" PatchTaskSyncDisabled = "task sync was disabled for patches" NoTasksOrVariants = "no tasks/variants were configured" NoSyncTasksOrVariants = "no tasks/variants were configured for sync" GitHubInternalError = "GitHub returned an error" InvalidConfig = "config file was invalid" OtherErrors = "Evergreen error" )
const TSFormat = "2006-01-02.15-04-05"
Variables ¶
This section is empty.
Functions ¶
func AddBackupJobs ¶
func GetPatchSummariesByCommit ¶
if commit queue then mbox format, organize summaries by commit
func HandlePoisonedHost ¶
func NewAgentDeployJob ¶
func NewAgentMonitorDeployJob ¶
NewAgentMonitorDeployJob creates a job that deploys the agent monitor to the host.
func NewBuildingContainerImageJob ¶
func NewBuildingContainerImageJob(env evergreen.Environment, h *host.Host, dockerOptions host.DockerOptions, providerName string) amboy.Job
func NewCloudHostReadyJob ¶
func NewCloudHostReadyJob(env evergreen.Environment, id string) amboy.Job
NewCloudHostReadyJob gets statuses for all jobs created by Cloud providers which the Cloud providers' APIs have not yet returned all running. It marks the hosts running in the database.
func NewCloudUpdateSSHKeysJob ¶
NewCloudUpdateSSHKeysJob updates the SSH keys available for a single region in the given cloud provider.
func NewCollectTaskEndDataJob ¶
NewCollectTaskEndDataJob determines a task's cost based on the host it ran on. Hosts that are unable to calculate their own costs will not set a task's Cost field. Errors are logged but not returned, since any number of API failures could happen and we shouldn't sacrifice a task's status for them.
It also logs historic task timing information.
func NewCommitQueueJob ¶
func NewConvertHostToLegacyProvisioningJob ¶
func NewConvertHostToLegacyProvisioningJob(env evergreen.Environment, h host.Host, id string, attempt int) amboy.Job
NewConvertHostToLegacyProvisioningJob converts a host from a legacy provisioned host to a non-legacy provisioned host.
func NewConvertHostToNewProvisioningJob ¶
func NewConvertHostToNewProvisioningJob(env evergreen.Environment, h host.Host, id string, attempt int) amboy.Job
NewConvertHostToNewProvisioningJob converts a host from a legacy provisioned host to a non-legacy provisioned host.
func NewCronRemoteHourJob ¶
func NewCronRemoteMinuteJob ¶
func NewDecoHostNotifyJob ¶
func NewDistroSchedulerJob ¶
func NewDuplicateTaskCheckJob ¶
NewDuplicateTaskCheckJob checks for any tasks that appear in multiple primary task queues.
func NewEventNotifierJob ¶
func NewEventSendJob ¶
func NewGithubStatusUpdateJobForExternalPatch ¶
NewGithubStatusUpdateJobForExternalPatch prompts on Github for a user to manually authorize this patch
func NewGithubStatusUpdateJobForNewPatch ¶
NewGithubStatusUpdateJobForNewPatch creates a job to update github's API for a newly created patch, reporting it as pending, with description "preparing to run tasks"
func NewGithubStatusUpdateJobForProcessingError ¶
func NewGithubStatusUpdateJobForProcessingError(githubContext, owner, repo, ref, description string) amboy.Job
NewGithubStatusUpdateJobForProcessingError marks a ref as failed because the evergreen encountered an error creating a patch
func NewHostAllocatorJob ¶
func NewHostCreateJob ¶
func NewHostExecuteJob ¶
func NewHostExecuteJob(env evergreen.Environment, h host.Host, script string, sudo bool, sudoUser string, id string) amboy.Job
NewHostExecuteJob creates a job that executes a script on the host.
func NewHostSetupJob ¶
NewHostSetupJob creates a job that performs any additional provisioning for a host to prepare it to run.
func NewHostStatsCollector ¶
NewHostStatsCollector logs statistics about host utilization per distro to the default grip logger.
func NewHostStatsJob ¶
func NewHostTerminationJob ¶
func NewIdleHostTerminationJob ¶
func NewIdleHostTerminationJob(env evergreen.Environment, id string) amboy.Job
func NewJasperManagerCleanup ¶
func NewJasperManagerCleanup(id string, env evergreen.Environment) amboy.Job
NewJasperManagerCleanup reports basic system information and a report of the go runtime information, as provided by grip.
func NewJasperRestartJob ¶
func NewJasperRestartJob(env evergreen.Environment, h host.Host, expiration time.Time, restartThroughJasper bool, ts string, attempt int) amboy.Job
NewJasperRestartJob creates a job that restarts an existing Jasper service with new credentials.
func NewLatencyStatsCollector ¶
NewLatencyStatsCollector captures a single report of the latency of tasks that have started in the last minute.
func NewLocalAmboyStatsCollector ¶
func NewLocalAmboyStatsCollector(env evergreen.Environment, id string) amboy.Job
NewLocalAmboyStatsCollector reports the status of only the local queue registered in the evergreen service Environment.
func NewLocalUpdateSSHKeysJob ¶
NewLocalUpdateSSHKeysJob updates the SSH key files locally.
func NewPatchIntentProcessor ¶
NewPatchIntentProcessor creates an amboy job to create a patch from the given patch intent with the given object ID for the patch
func NewPeriodicBuildJob ¶
func NewQueueStatsCollector ¶
func NewReauthorizationJob ¶
NewReauthorizationJob returns a job that attempts to reauthorize the given user.
func NewRemoteAmboyStatsCollector ¶
func NewRemoteAmboyStatsCollector(env evergreen.Environment, id string) amboy.Job
NewRemoteAmboyStatsCollector reports the status of only the remote queue registered in the evergreen service Environment.
func NewRepotrackerJob ¶
NewRepotrackerJob creates a job to run repotracker against a repository. The code creating this job is responsible for verifying that the project should track push events
func NewSpawnhostModifyJob ¶
func NewStaticUpdateSSHKeysJob ¶
NewStaticUpdateSSHKeysJob updates the SSH keys for a static host.
func NewSysInfoStatsCollector ¶
NewSysInfoStatsCollector reports basic system information and a report of the go runtime information, as provided by grip.
func NewTaskStatsCollector ¶
NewTaskStatsCollector captures a single report of the status of tasks that have completed in the last minute.
func NewTasksRestartJob ¶
func NewTasksRestartJob(opts model.RestartOptions) amboy.Job
NewTasksRestartJob creates a job to restart failed tasks in a time range
func NewUserDataDoneJob ¶
NewUserDataDoneJob creates a job that checks if the host is done running its user data if bootstrapped with user data.
func NewVersionActivationJob ¶
func PopulateActivationJobs ¶
func PopulateActivationJobs(part int) amboy.QueueOperation
func PopulateAgentDeployJobs ¶
func PopulateAgentDeployJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateAgentMonitorDeployJobs ¶
func PopulateAgentMonitorDeployJobs(env evergreen.Environment) amboy.QueueOperation
PopulateAgentMonitorDeployJobs enqueues the jobs to deploy the agent monitor to any host in which: (1) the agent monitor has not been deployed yet, (2) the agent's last communication time has exceeded the threshold or (3) has already been marked as needing to redeploy a new agent monitor.
func PopulateAliasSchedulerJobs ¶
func PopulateAliasSchedulerJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateBackgroundStatsJobs ¶
func PopulateBackgroundStatsJobs(env evergreen.Environment, part int) amboy.QueueOperation
func PopulateCacheHistoricalTestDataJob ¶
func PopulateCacheHistoricalTestDataJob(part int) amboy.QueueOperation
func PopulateCatchupJobs ¶
func PopulateCatchupJobs() amboy.QueueOperation
func PopulateCommitQueueJobs ¶
func PopulateCommitQueueJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateContainerStateJobs ¶
func PopulateContainerStateJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateDataCleanupJobs ¶
func PopulateDataCleanupJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateDuplicateTaskCheckJobs ¶
func PopulateDuplicateTaskCheckJobs() amboy.QueueOperation
func PopulateEventAlertProcessing ¶
func PopulateEventAlertProcessing(env evergreen.Environment) amboy.QueueOperation
func PopulateGenerateTasksJobs ¶
func PopulateGenerateTasksJobs(env evergreen.Environment) amboy.QueueOperation
PopulateGenerateTasksJobs populates generate.tasks jobs for tasks that have started running their generate.tasks command.
func PopulateHostAllocatorJobs ¶
func PopulateHostAllocatorJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateHostCreationJobs ¶
func PopulateHostCreationJobs(env evergreen.Environment, part int) amboy.QueueOperation
func PopulateHostJasperRestartJobs ¶
func PopulateHostJasperRestartJobs(env evergreen.Environment) amboy.QueueOperation
PopulateHostJasperRestartJobs enqueues the jobs to restart the Jasper service on the host.
func PopulateHostMonitoring ¶
func PopulateHostMonitoring(env evergreen.Environment) amboy.QueueOperation
func PopulateHostProvisioningConversionJobs ¶
func PopulateHostProvisioningConversionJobs(env evergreen.Environment) amboy.QueueOperation
PopulateHostProvisioningConversionJobs enqueues the jobs to convert the host provisioning type.
func PopulateHostSetupJobs ¶
func PopulateHostSetupJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateHostStatJobs ¶
func PopulateHostStatJobs(parts int) amboy.QueueOperation
PopulateHostStatJobs adds host stats jobs.
func PopulateHostTerminationJobs ¶
func PopulateHostTerminationJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateIdleHostJobs ¶
func PopulateIdleHostJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateLastContainerFinishTimeJobs ¶
func PopulateLastContainerFinishTimeJobs() amboy.QueueOperation
func PopulateLocalQueueJobs ¶
func PopulateLocalQueueJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateOldestImageRemovalJobs ¶
func PopulateOldestImageRemovalJobs() amboy.QueueOperation
func PopulateParentDecommissionJobs ¶
func PopulateParentDecommissionJobs() amboy.QueueOperation
func PopulatePeriodicBuilds ¶
func PopulatePeriodicBuilds(part int) amboy.QueueOperation
func PopulatePeriodicNotificationJobs ¶
func PopulatePeriodicNotificationJobs(parts int) amboy.QueueOperation
func PopulateReauthorizationJobs ¶
func PopulateReauthorizationJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateSSHKeyUpdates ¶
func PopulateSSHKeyUpdates(env evergreen.Environment) amboy.QueueOperation
PopulateSSHKeyUpdates updates the remote SSH keys in the cloud providers and static hosts.
func PopulateSchedulerJobs ¶
func PopulateSchedulerJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateSpawnhostExpirationCheckJob ¶
func PopulateSpawnhostExpirationCheckJob() amboy.QueueOperation
func PopulateTaskMonitoring ¶
func PopulateTaskMonitoring(mins int) amboy.QueueOperation
func PopulateUserDataDoneJobs ¶
func PopulateUserDataDoneJobs(env evergreen.Environment) amboy.QueueOperation
PopulateUserDataDoneJobs enqueues the jobs to check whether a spawn host provisioning with user data is done running its user data script yet.
func PopulateVolumeExpirationCheckJob ¶
func PopulateVolumeExpirationCheckJob() amboy.QueueOperation
func PopulateVolumeExpirationJob ¶
func PopulateVolumeExpirationJob() amboy.QueueOperation
Types ¶
This section is empty.
Source Files
¶
- backup.go
- backup_spec.go
- building_container_image.go
- cache_historical_test_data.go
- commit_queue.go
- crons.go
- crons_remote_fifteen_minute.go
- crons_remote_fifteen_second.go
- crons_remote_five_minute.go
- crons_remote_hour.go
- crons_remote_minute.go
- data_cleanup_test_logs.go
- data_cleanup_testresults.go
- deco_host_notify.go
- doc.go
- duplicate_task_check.go
- event_notifier.go
- event_send.go
- generate_tasks.go
- github_status_api.go
- host_allocator.go
- host_execute.go
- host_monitoring_container_state.go
- host_monitoring_external_termination.go
- host_monitoring_idle_termination.go
- host_monitoring_last_container_finish_time.go
- host_monitoring_parent_decommission.go
- host_stats.go
- host_status.go
- host_termination.go
- jasper_cleanup.go
- oldest_image_removal.go
- patch_intent.go
- periodic_builds.go
- provisioning_agent_deploy.go
- provisioning_agent_monitor_deploy.go
- provisioning_convert_host_to_legacy.go
- provisioning_convert_host_to_new.go
- provisioning_create_host.go
- provisioning_jasper_restart.go
- provisioning_setup_host.go
- provisioning_user_data_done.go
- reauthorization_job.go
- repotracker.go
- scheduler.go
- scheduler_alias.go
- spawnhost_expiration_check.go
- spawnhost_expiration_warning.go
- spawnhost_modify.go
- spawnhost_start.go
- spawnhost_stop.go
- ssh_keys_update_cloud.go
- ssh_keys_update_local.go
- ssh_keys_update_static.go
- stats_amboy.go
- stats_host.go
- stats_host_idle.go
- stats_latency.go
- stats_notifications.go
- stats_queue.go
- stats_sysinfo.go
- stats_task.go
- stats_task_end.go
- task_monitor_execution_timeout.go
- task_stranded_cleanup.go
- tasks_restart.go
- util.go
- version_activation_catchup.go
- volume_deletion_job.go
- volume_expiration_check.go
- volume_expiration_warning.go