Documentation
¶
Overview ¶
Package units contains amboy.Job definitions.
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 marshalling to JSON/BSON (depending on the amoby.JobType format.)
Index ¶
- Constants
- func CreateAndEnqueueGenerateTasks(ctx context.Context, env evergreen.Environment, tasks []task.Task, ts string) error
- func DisableAndNotifyPoisonedHost(ctx context.Context, env evergreen.Environment, h *host.Host, ...) error
- func EnqueueHostCreateJobs(ctx context.Context, env evergreen.Environment, hostIntents []host.Host) error
- func EnqueueHostReprovisioningJob(ctx context.Context, env evergreen.Environment, h *host.Host) error
- func EnqueueSpawnHostModificationJob(ctx context.Context, env evergreen.Environment, j amboy.Job) error
- func EnqueueTerminateHostJob(ctx context.Context, env evergreen.Environment, j amboy.Job) error
- func GetGithubTokensForTask(ctx context.Context, taskId string) (string, []string, 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 NewAlertableInstanceTypeNotifyJob(id string) amboy.Job
- func NewBuildingContainerImageJob(env evergreen.Environment, h *host.Host, dockerOptions host.DockerOptions, ...) amboy.Job
- func NewCacheHistoricalTaskDataJob(id, projectID string) amboy.Job
- func NewCheckBlockedTasksJob(distroId string, ts time.Time) amboy.Job
- func NewCloudCleanupJob(env evergreen.Environment, ts, provider, region string) amboy.Job
- func NewCloudHostReadyJob(env evergreen.Environment, id string) amboy.Job
- func NewConvertHostToLegacyProvisioningJob(env evergreen.Environment, h host.Host, id string) amboy.Job
- func NewConvertHostToNewProvisioningJob(env evergreen.Environment, h host.Host, id string) amboy.Job
- func NewCronRemoteFifteenMinuteJob() amboy.Job
- func NewCronRemoteFifteenSecondJob() amboy.Job
- func NewCronRemoteFiveMinuteJob() amboy.Job
- func NewCronRemoteHourJob() amboy.Job
- func NewCronRemoteMinuteJob() amboy.Job
- func NewCronRemoteMonthJob() amboy.Job
- func NewCronRemoteWeekJob() amboy.Job
- func NewDecoHostNotifyJob(env evergreen.Environment, hostID, message, usr string) amboy.Job
- func NewDistroAliasSchedulerJob(distroID string, id string) amboy.Job
- func NewDistroAutoTuneJob(distroID, ts string) amboy.Job
- func NewDistroSchedulerJob(distroID string, id string) amboy.Job
- func NewDuplicateTaskCheckJob(id string) amboy.Job
- func NewEventNotifierJob(env evergreen.Environment, eventID, ts string) amboy.Job
- func NewEventSendJob(id, ts string) amboy.Job
- func NewGenerateTasksJob(env evergreen.Environment, versionID, taskID string, ts string) amboy.Job
- func NewGitHubAPILimitJob(ts string) amboy.Job
- func NewGitHubPatchIntentProcessor(env evergreen.Environment, patchID mgobson.ObjectId, intent patch.Intent, ...) amboy.Job
- func NewGithubStatusRefreshJob(p *patch.Patch) amboy.Job
- func NewGithubStatusUpdateJobForExternalPatch(patchID string) amboy.Job
- func NewGithubStatusUpdateJobForNewPatch(patchID string) amboy.Job
- func NewGithubStatusUpdateJobForProcessingError(githubContext, owner, repo, ref, description, targetPath string) amboy.Job
- func NewGithubStatusUpdateJobWithSuccessMessage(githubContext, owner, repo, ref, description string) amboy.Job
- func NewHostAllocatorJob(env evergreen.Environment, distroID string, timestamp time.Time) amboy.Job
- func NewHostCreateJob(env evergreen.Environment, h host.Host, id string, buildImageStarted bool) amboy.Job
- func NewHostDrawdownJob(env evergreen.Environment, drawdownInfo DrawdownInfo, ts string) amboy.Job
- func NewHostExecuteJob(env evergreen.Environment, h host.Host, script string, sudo bool, ...) amboy.Job
- func NewHostIPAssociationJob(env evergreen.Environment, h *host.Host, ts string) amboy.Job
- func NewHostMonitorContainerStateJob(h *host.Host, providerName, id string) amboy.Job
- func NewHostMonitoringCheckJob(env evergreen.Environment, h *host.Host, id string) amboy.Job
- func NewHostSetupScriptJob(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, opts HostTerminationOptions) amboy.Job
- func NewIdleHostTerminationJob(env evergreen.Environment, id string) amboy.Job
- func NewJasperManagerCleanup(id string, env evergreen.Environment) amboy.Job
- func NewLargeParserProjectTaskStatsJob(ts string) amboy.Job
- func NewLastContainerFinishTimeJob(id string) amboy.Job
- func NewLocalAmboyStatsCollector(env evergreen.Environment, id string) amboy.Job
- func NewMergeQueueCompletionMetricsFallbackJob() amboy.Job
- func NewMergeQueueMetricsJob() amboy.Job
- func NewMergeQueuePatchRecoveryJob() amboy.Job
- func NewMoveLogsToFailedBucketJob(env evergreen.Environment, taskID, ts 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(env evergreen.Environment, patchID mgobson.ObjectId, intent patch.Intent) amboy.Job
- func NewPeriodicBuildJob(projectID, definitionID string) amboy.Job
- func NewPodDiagnosticsJob(ts string) amboy.Job
- func NewQueueStatsCollector(id string) amboy.Job
- func NewReauthorizeUserJob(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 NewRestartJasperJob(env evergreen.Environment, h host.Host, ts string) amboy.Job
- func NewRetryEventSendJob(id, ts string) amboy.Job
- func NewS3LifecycleSyncAdminBucketsJob(id string) amboy.Job
- func NewS3LifecycleSyncProjectBucketsJob(id string) amboy.Job
- func NewSetupHostJob(env evergreen.Environment, h *host.Host, id string) amboy.Job
- func NewSleepSchedulerJob(env evergreen.Environment, ts string) amboy.Job
- func NewSpawnHostTerminationJob(h *host.Host, user, ts string, source evergreen.ModifySpawnHostSource) 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 NewSpawnhostRebootJob(opts SpawnHostModifyJobOptions) amboy.Job
- func NewSpawnhostStartJob(opts SpawnHostModifyJobOptions) amboy.Job
- func NewSpawnhostStopJob(opts SpawnHostModifyJobOptions, shouldKeepOff bool) amboy.Job
- func NewStrandedTaskCleanupJob(env evergreen.Environment, id string) amboy.Job
- func NewSysInfoStatsCollector(id string) amboy.Job
- func NewTaskExecutionMonitorJob(taskID string, ts string) amboy.Job
- func NewTaskExecutionMonitorPopulateJob(id string) amboy.Job
- func NewTaskHostExpirationExtendJob(ts string, h *host.Host) amboy.Job
- func NewTaskStatsCollector(id string) amboy.Job
- func NewTasksRestartJob(opts model.RestartOptions) amboy.Job
- func NewUnexpirableSpawnHostStatsJob(ts string) amboy.Job
- func NewUserDataDoneJob(env evergreen.Environment, hostID string, ts time.Time) amboy.Job
- func NewVersionActivationJob(ts 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 NewVolumeMigrationJob(env evergreen.Environment, volumeID string, modifyOptions cloud.SpawnOptions, ...) amboy.Job
- func NewVolumeUnstickJob(ts string, v *host.Volume) amboy.Job
- func PopulateActivationJobs(part int) amboy.QueueOperation
- func PopulateCacheHistoricalTaskDataJob(part int) amboy.QueueOperation
- func PopulateCheckUnmarkedBlockedTasks() amboy.QueueOperation
- func PopulateCloudCleanupJob(env evergreen.Environment) amboy.QueueOperation
- func PopulateDistroAutoTuneJobs() amboy.QueueOperation
- func PopulateDuplicateTaskCheckJobs() amboy.QueueOperation
- func PopulateGithubAPILimitJob() amboy.QueueOperation
- func PopulateHostProvisioningConversionJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostRestartJasperJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateHostStatJobs(parts int) amboy.QueueOperation
- func PopulateLargeParserProjectTaskStatsJob() amboy.QueueOperation
- func PopulateLocalQueueJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateMergeQueueCompletionMetricsFallbackJobs() amboy.QueueOperation
- func PopulateMergeQueueMetricsJobs() amboy.QueueOperation
- func PopulateMergeQueuePatchRecoveryJobs() amboy.QueueOperation
- func PopulatePeriodicBuilds() amboy.QueueOperation
- func PopulateReauthorizeUserJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateRetryFailedLogMoveJobs(env evergreen.Environment) amboy.QueueOperation
- func PopulateRetryFailedLogMoveJobsForOldTasks(env evergreen.Environment) amboy.QueueOperation
- func PopulateS3LifecycleSyncAdminBucketsJob() amboy.QueueOperation
- func PopulateS3LifecycleSyncProjectBucketsJob() amboy.QueueOperation
- func PopulateSpawnhostExpirationCheckJob() amboy.QueueOperation
- func PopulateTaskHostExpirationExtendJob() amboy.QueueOperation
- func PopulateTaskMonitoring(mins int) amboy.QueueOperation
- func PopulateUnexpirableSpawnHostStatsJob() amboy.QueueOperation
- func PopulateUnstickVolumesJob() amboy.QueueOperation
- func PopulateVolumeExpirationCheckJob() amboy.QueueOperation
- func PopulateVolumeExpirationJob() amboy.QueueOperation
- func SchedulePatch(ctx context.Context, env evergreen.Environment, patchId string, ...) (int, error)
- type CloudHostModification
- type DrawdownInfo
- type HostTerminationOptions
- type SpawnHostModifyJobOptions
Constants ¶
const ( // GitHub intent processing errors ProjectDisabled = "project was disabled" PatchingDisabled = "patching was disabled" NoTasksOrVariants = "no tasks/variants were configured" GitHubInternalError = "GitHub returned an error" InvalidConfig = "config file was invalid: sync with base branch & run `evergreen validate -p <project>`" EmptyConfig = "config file was empty" ProjectFailsValidation = "project fails validation: sync with base branch & run `evergreen validate -p <project>`" ContextCancelledError = "Transient Evergreen error; please comment `evergreen retry`" OtherErrors = "Evergreen error" MergeBaseTooOld = "merge base is too old" SupersededByNewerPush = "superseded by a newer push; Evergreen will test the newer commit" )
const (
BuildTasksAndVariantsError = "building tasks and variants"
)
const (
FifteenSecondCronInterval = 15 * time.Second
)
const (
HostTerminationJobName = "host-termination-job"
)
const MoveLogsTriggerHourlyRetry = "hourly_retry_failed_log_move"
MoveLogsTriggerHourlyRetry is used by PopulateRetryFailedLogMoveJobs and PopulateRetryFailedLogMoveJobsForOldTasks (hourly remote cron).
const MoveLogsTriggerTaskEnd = "task_end"
MoveLogsTriggerTaskEnd is used when the app server enqueues after a failed task ends (agent path).
const (
TSFormat = "2006-01-02.15-04-05"
)
Variables ¶
This section is empty.
Functions ¶
func CreateAndEnqueueGenerateTasks ¶
func CreateAndEnqueueGenerateTasks(ctx context.Context, env evergreen.Environment, tasks []task.Task, ts string) error
CreateAndEnqueueGenerateTasks enqueues a generate.tasks job for each task. Jobs are segregated by task version into separate queues.
func DisableAndNotifyPoisonedHost ¶
func DisableAndNotifyPoisonedHost(ctx context.Context, env evergreen.Environment, h *host.Host, canDecommission bool, reason string, usr string) error
DisableAndNotifyPoisonedHost disables an unhealthy host so that it cannot run any more tasks, clears any tasks that have been stranded on it, and enqueues a job to notify that a host was disabled. If canDecommission is true and the host is an ephemeral host, it will decommission the host instead of quarantine it.
func EnqueueHostCreateJobs ¶
func EnqueueHostReprovisioningJob ¶
func EnqueueHostReprovisioningJob(ctx context.Context, env evergreen.Environment, h *host.Host) error
EnqueueHostReprovisioningJob enqueues a job to reprovision a host. For hosts that do not need to reprovision, this is a no-op.
func EnqueueSpawnHostModificationJob ¶
func EnqueueSpawnHostModificationJob(ctx context.Context, env evergreen.Environment, j amboy.Job) error
EnqueueSpawnHostModificationJob enqueues a job to modify a spawn host.
func EnqueueTerminateHostJob ¶
EnqueueTerminateHostJob enqueues a job to terminate a host.
func GetGithubTokensForTask ¶
GetGithubTokensForTask returns a read-only token for owner/repo associated with the task and a read-only token for each module associated with the task.
func HandlePoisonedHost ¶
func NewAgentDeployJob ¶
func NewAgentMonitorDeployJob ¶
NewAgentMonitorDeployJob creates a job that deploys the agent monitor to the host.
func NewAlertableInstanceTypeNotifyJob ¶
NewAlertableInstanceTypeNotifyJob creates a job to check for spawn hosts using alertable instance types
func NewBuildingContainerImageJob ¶
func NewBuildingContainerImageJob(env evergreen.Environment, h *host.Host, dockerOptions host.DockerOptions, providerName string) amboy.Job
func NewCheckBlockedTasksJob ¶
NewCheckBlockedTasksJob creates a job to audit the dependency state for tasks in the task queues. If it finds any mismatches in dependency state, it fixes them.
func NewCloudCleanupJob ¶
func NewCloudCleanupJob(env evergreen.Environment, ts, provider, region string) amboy.Job
NewCloudCleanupJob returns a job to call the cloud manager's Cleanup method for the given Provider and Region.
func NewCloudHostReadyJob ¶
func NewCloudHostReadyJob(env evergreen.Environment, id string) amboy.Job
NewCloudHostReadyJob checks the cloud instance status for all hosts created by cloud providers when the instance is not yet ready to be used (e.g. the instance is still booting up). Once the cloud instance status is resolved, the job can either transition the host into the next step in the host lifecycle or be appropriately handled if it is in an unrecoverable state.
func NewConvertHostToLegacyProvisioningJob ¶
func NewConvertHostToLegacyProvisioningJob(env evergreen.Environment, h host.Host, id string) 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) amboy.Job
NewConvertHostToNewProvisioningJob converts a host from a legacy provisioned host to a non-legacy provisioned host.
func NewCronRemoteHourJob ¶
func NewCronRemoteMinuteJob ¶
func NewCronRemoteMonthJob ¶
func NewCronRemoteWeekJob ¶
func NewDecoHostNotifyJob ¶
func NewDecoHostNotifyJob(env evergreen.Environment, hostID, message, usr string) amboy.Job
NewDecoHostNotifyJob notifies the relevant team that a host has been decommissioned/quarantined and needs investigation.
func NewDistroAutoTuneJob ¶
NewDistroAutoTuneJob returns a job to automatically adjust a distro's maximum hosts.
func NewDuplicateTaskCheckJob ¶
NewDuplicateTaskCheckJob checks for any tasks that appear in multiple primary task queues.
func NewEventNotifierJob ¶
func NewEventNotifierJob(env evergreen.Environment, eventID, ts string) amboy.Job
func NewEventSendJob ¶
func NewGenerateTasksJob ¶
NewGenerateTasksJob returns a job that dynamically updates the project configuration based on the given task's generate.tasks configuration.
func NewGitHubAPILimitJob ¶
NewGitHubAPILimitJob creates a job to log GitHub API rate limit information.
func NewGitHubPatchIntentProcessor ¶
func NewGitHubPatchIntentProcessor(env evergreen.Environment, patchID mgobson.ObjectId, intent patch.Intent, projectID string) amboy.Job
NewGitHubPatchIntentProcessor creates a project-scoped processor for a GitHub intent.
func NewGithubStatusRefreshJob ¶
NewGithubStatusRefreshJob is a job that re-sends github statuses to the PR associated with the given patch.
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, targetPath string) amboy.Job
NewGithubStatusUpdateJobForProcessingError marks a ref as failed because Evergreen encountered an error creating a patch.
func NewGithubStatusUpdateJobWithSuccessMessage ¶
func NewGithubStatusUpdateJobWithSuccessMessage(githubContext, owner, repo, ref, description string) amboy.Job
NewGithubStatusUpdateJobWithSuccessMessage creates a job to send a passing status to Github with a message.
func NewHostAllocatorJob ¶
func NewHostCreateJob ¶
func NewHostDrawdownJob ¶
func NewHostDrawdownJob(env evergreen.Environment, drawdownInfo DrawdownInfo, ts string) amboy.Job
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 NewHostIPAssociationJob ¶
NewHostIPAssociationJob creates a job to associate an allocated IP address with the host's network interface.
func NewHostMonitoringCheckJob ¶
NewHostMonitoringCheckJob checks if an unresponsive host is healthy or not.
func NewHostSetupScriptJob ¶
NewHostSetupScriptJob creates a job that executes the spawn host's setup script after task data is loaded onto the host.
func NewHostStatsCollector ¶
NewHostStatsCollector logs statistics about host utilization per distro to the default grip logger.
func NewHostStatsJob ¶
func NewHostTerminationJob ¶
func NewHostTerminationJob(env evergreen.Environment, h *host.Host, opts HostTerminationOptions) amboy.Job
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 NewLargeParserProjectTaskStatsJob ¶
NewLargeParserProjectTaskStatsJob returns a job to log the current count of running tasks with S3-stored parser projects alongside the configured limit.
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 NewMergeQueueCompletionMetricsFallbackJob ¶
NewMergeQueueCompletionMetricsFallbackJob creates a job to emit completion metrics for merge queue patches that missed the GitHub destroyed webhook.
func NewMergeQueueMetricsJob ¶
NewMergeQueueMetricsJob creates a job to emit merge queue depth metrics.
func NewMergeQueuePatchRecoveryJob ¶
NewMergeQueuePatchRecoveryJob returns a job that checks every project with the GitHub merge queue enabled for merge groups GitHub has staged but that have no Evergreen patch.
func NewMoveLogsToFailedBucketJob ¶
func NewMoveLogsToFailedBucketJob(env evergreen.Environment, taskID, ts string, sourceBucketCfg evergreen.BucketConfig, trigger string, runInOldTaskCollection bool, timeout ...time.Duration) amboy.Job
NewMoveLogsToFailedBucketJob creates a job that moves a task's logs to the failed bucket. Pass an optional timeout as the last argument to override the default (e.g. NewMoveLogsToFailedBucketJob(env, taskID, ts, sourceCfg, trigger, false, 60*time.Minute)).
func NewPatchIntentProcessor ¶
func NewPatchIntentProcessor(env evergreen.Environment, patchID mgobson.ObjectId, intent patch.Intent) amboy.Job
NewPatchIntentProcessor creates an amboy job to create a patch from the given patch intent. The patch ID is the new ID for the patch to be created, not the patch intent.
func NewPeriodicBuildJob ¶
func NewPodDiagnosticsJob ¶
NewPodDiagnosticsJob returns a job that checks the current pod's memory usage against the configured thresholds and captures/stores profiling data in S3 when it's using excessive memory.
func NewQueueStatsCollector ¶
func NewReauthorizeUserJob ¶
NewReauthorizeUserJob 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 NewRestartJasperJob ¶
NewRestartJasperJob creates a job that restarts an existing Jasper service with new credentials.
func NewRetryEventSendJob ¶
NewRetryEventSendJob re-sends an already-processed notification to retry failed deliveries.
func NewS3LifecycleSyncAdminBucketsJob ¶
NewS3LifecycleSyncAdminBucketsJob creates a job to sync lifecycle rules for admin-managed buckets.
func NewS3LifecycleSyncProjectBucketsJob ¶
NewS3LifecycleSyncProjectBucketsJob creates a job to sync lifecycle rules for project buckets.
func NewSetupHostJob ¶
NewSetupHostJob creates a job that performs any additional provisioning for a host to prepare it to run.
func NewSleepSchedulerJob ¶
func NewSleepSchedulerJob(env evergreen.Environment, ts string) amboy.Job
NewSleepSchedulerJob creates a job to manage unexpirable host sleep schedules.
func NewSpawnHostTerminationJob ¶
func NewSpawnHostTerminationJob(h *host.Host, user, ts string, source evergreen.ModifySpawnHostSource) amboy.Job
NewSpawnHostTerminationJob returns a job to terminate a spawn host with the given source indicating why it is being terminated.
func NewSpawnhostModifyJob ¶
func NewSpawnhostRebootJob ¶
func NewSpawnhostRebootJob(opts SpawnHostModifyJobOptions) amboy.Job
NewSpawnhostRebootJob returns a job to reboot a spawn host.
func NewSpawnhostStartJob ¶
func NewSpawnhostStartJob(opts SpawnHostModifyJobOptions) amboy.Job
NewSpawnhostStartJob returns a job to start a stopped spawn host.
func NewSpawnhostStopJob ¶
func NewSpawnhostStopJob(opts SpawnHostModifyJobOptions, shouldKeepOff bool) amboy.Job
NewSpawnhostStopJob returns a job to stop a running spawn host.
func NewStrandedTaskCleanupJob ¶
func NewStrandedTaskCleanupJob(env evergreen.Environment, id string) amboy.Job
NewStrandedTaskCleanupJob returns a job to detect and clean up tasks that: - Have been stranded on hosts that are already terminated. - Have stuck dispatching for too long. - Are virtual tasks stranded by a runner that finished without push-completing them.
func NewSysInfoStatsCollector ¶
NewSysInfoStatsCollector reports basic system information and a report of the go runtime information, as provided by grip.
func NewTaskExecutionMonitorJob ¶
NewTaskExecutionMonitorJob returns a job to check if a running task has failed to send a heartbeat recently. If it has timed out, it is cleaned up.
func NewTaskExecutionMonitorPopulateJob ¶
NewTaskExecutionMonitorPopulateJob returns a job to populate the queue with jobs to check for stale tasks.
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 NewUnexpirableSpawnHostStatsJob ¶
NewUnexpirableSpawnHostStatsJob returns a job to collect estimated statistics on unexpirable spawn host usage.
func NewUserDataDoneJob ¶
NewUserDataDoneJob creates a job that checks if the host is done provisioning with user data (if bootstrapped with user data). This check only applies to spawn hosts, since hosts running agents check into the server to verify their liveliness.
func NewVersionActivationJob ¶
func NewVolumeMigrationJob ¶
func NewVolumeMigrationJob(env evergreen.Environment, volumeID string, modifyOptions cloud.SpawnOptions, ts string) amboy.Job
func PopulateActivationJobs ¶
func PopulateActivationJobs(part int) amboy.QueueOperation
func PopulateCacheHistoricalTaskDataJob ¶
func PopulateCacheHistoricalTaskDataJob(part int) amboy.QueueOperation
func PopulateCheckUnmarkedBlockedTasks ¶
func PopulateCheckUnmarkedBlockedTasks() amboy.QueueOperation
func PopulateCloudCleanupJob ¶
func PopulateCloudCleanupJob(env evergreen.Environment) amboy.QueueOperation
PopulateCloudCleanupJob returns a QueueOperation to enqueue a CloudCleanup job for Fleet in the default EC2 region.
func PopulateDistroAutoTuneJobs ¶
func PopulateDistroAutoTuneJobs() amboy.QueueOperation
func PopulateDuplicateTaskCheckJobs ¶
func PopulateDuplicateTaskCheckJobs() amboy.QueueOperation
func PopulateGithubAPILimitJob ¶
func PopulateGithubAPILimitJob() amboy.QueueOperation
PopulateGithubAPILimitJob enqueues a job to log GitHub API rate limit information.
func PopulateHostProvisioningConversionJobs ¶
func PopulateHostProvisioningConversionJobs(env evergreen.Environment) amboy.QueueOperation
PopulateHostProvisioningConversionJobs enqueues the jobs to convert the host provisioning type.
func PopulateHostRestartJasperJobs ¶
func PopulateHostRestartJasperJobs(env evergreen.Environment) amboy.QueueOperation
PopulateHostRestartJasperJobs enqueues the jobs to restart the Jasper service on the host.
func PopulateHostStatJobs ¶
func PopulateHostStatJobs(parts int) amboy.QueueOperation
PopulateHostStatJobs adds host stats jobs.
func PopulateLargeParserProjectTaskStatsJob ¶
func PopulateLargeParserProjectTaskStatsJob() amboy.QueueOperation
PopulateLargeParserProjectTaskStatsJob populates a job to log stats about running tasks with S3-stored parser projects.
func PopulateLocalQueueJobs ¶
func PopulateLocalQueueJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateMergeQueueCompletionMetricsFallbackJobs ¶
func PopulateMergeQueueCompletionMetricsFallbackJobs() amboy.QueueOperation
PopulateMergeQueueCompletionMetricsFallbackJobs enqueues a job to emit completion metrics for merge queue patches that missed the GitHub webhook.
func PopulateMergeQueueMetricsJobs ¶
func PopulateMergeQueueMetricsJobs() amboy.QueueOperation
PopulateMergeQueueMetricsJobs enqueues a job to emit merge queue depth metrics.
func PopulateMergeQueuePatchRecoveryJobs ¶
func PopulateMergeQueuePatchRecoveryJobs() amboy.QueueOperation
PopulateMergeQueuePatchRecoveryJobs enqueues the merge queue patch recovery job. It is gated behind a service flag so it can be turned off without a deploy.
func PopulatePeriodicBuilds ¶
func PopulatePeriodicBuilds() amboy.QueueOperation
func PopulateReauthorizeUserJobs ¶
func PopulateReauthorizeUserJobs(env evergreen.Environment) amboy.QueueOperation
func PopulateRetryFailedLogMoveJobs ¶
func PopulateRetryFailedLogMoveJobs(env evergreen.Environment) amboy.QueueOperation
PopulateRetryFailedLogMoveJobs finds failed tasks whose logs are still in the regular bucket (move job failed or never ran) and enqueues one move-logs-to-failed-bucket job per task. Caps enqueued jobs per run to avoid S3 rate limiting; newest failures are prioritized.
func PopulateRetryFailedLogMoveJobsForOldTasks ¶
func PopulateRetryFailedLogMoveJobsForOldTasks(env evergreen.Environment) amboy.QueueOperation
PopulateRetryFailedLogMoveJobsForOldTasks is like PopulateRetryFailedLogMoveJobs but queries the old tasks collection.
func PopulateS3LifecycleSyncAdminBucketsJob ¶
func PopulateS3LifecycleSyncAdminBucketsJob() amboy.QueueOperation
PopulateS3LifecycleSyncAdminBucketsJob is a queue operation to populate the admin buckets sync job.
func PopulateS3LifecycleSyncProjectBucketsJob ¶
func PopulateS3LifecycleSyncProjectBucketsJob() amboy.QueueOperation
PopulateS3LifecycleSyncProjectBucketsJob is a queue operation to populate the project buckets sync job.
func PopulateSpawnhostExpirationCheckJob ¶
func PopulateSpawnhostExpirationCheckJob() amboy.QueueOperation
func PopulateTaskHostExpirationExtendJob ¶
func PopulateTaskHostExpirationExtendJob() amboy.QueueOperation
func PopulateTaskMonitoring ¶
func PopulateTaskMonitoring(mins int) amboy.QueueOperation
func PopulateUnexpirableSpawnHostStatsJob ¶
func PopulateUnexpirableSpawnHostStatsJob() amboy.QueueOperation
PopulateUnexpirableSpawnHostStatsJob populates jobs to collect statistics on unexpirable spawn host usage.
func PopulateUnstickVolumesJob ¶
func PopulateUnstickVolumesJob() amboy.QueueOperation
PopulateUnstickVolumesJob looks for volumes that are marked as attached to terminated hosts in our DB, and enqueues jobs to mark them unattached.
func PopulateVolumeExpirationCheckJob ¶
func PopulateVolumeExpirationCheckJob() amboy.QueueOperation
func PopulateVolumeExpirationJob ¶
func PopulateVolumeExpirationJob() amboy.QueueOperation
func SchedulePatch ¶
func SchedulePatch(ctx context.Context, env evergreen.Environment, patchId string, version *model.Version, patchUpdateReq model.PatchUpdate, translatedProject *model.Project) (int, error)
SchedulePatch schedules a patch. It returns an error and an HTTP status code.
Types ¶
type CloudHostModification ¶
type CloudHostModification struct {
HostID string `bson:"host_id" json:"host_id" yaml:"host_id"`
UserID string `bson:"user_id" json:"user_id" yaml:"user_id"`
Source evergreen.ModifySpawnHostSource `bson:"source" json:"source" yaml:"source"`
// contains filtered or unexported fields
}
CloudHostModification is a helper to perform cloud manager operations on a single host.
type DrawdownInfo ¶
type HostTerminationOptions ¶
type HostTerminationOptions struct {
// TerminateIfBusy, if set, will terminate a host even if it's currently
// running a task. Otherwise, if it's running a task, termination will
// either refuse to terminate the host or will reset the task.
TerminateIfBusy bool `bson:"terminate_if_busy,omitempty" json:"terminate_if_busy,omitempty"`
// SkipCloudHostTermination, if set, will skip terminating and cleaning up
// the host in the cloud. The host will still be marked terminated in the
// DB.
SkipCloudHostTermination bool `bson:"skip_cloud_host_termination,omitempty" json:"skip_cloud_host_termination,omitempty"`
// TerminationReason is the reason that the host was terminated.
TerminationReason string `bson:"termination_reason,omitempty" json:"termination_reason,omitempty"`
}
HostTerminationOptions represent options to control how a host is terminated.
type SpawnHostModifyJobOptions ¶
type SpawnHostModifyJobOptions struct {
Host *host.Host `bson:"-" json:"-" yaml:"-"`
Source evergreen.ModifySpawnHostSource `bson:"-" json:"-" yaml:"-"`
User string `bson:"-" json:"-" yaml:"-"`
Timestamp string `bson:"-" json:"-" yaml:"-"`
WaitUntil time.Time `bson:"-" json:"-" yaml:"-"`
}
SpawnHostModifyJobOptions represents common options for creating spawn host modification jobs.
Source Files
¶
- alertable_instance_type_notify.go
- building_container_image.go
- cache_historical_task_data.go
- check_blocked_tasks.go
- cloud_cleanup.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
- crons_remote_month.go
- crons_remote_week.go
- deco_host_notify.go
- distro_auto_tune.go
- doc.go
- duplicate_task_check.go
- event_notifier.go
- event_send.go
- generate_tasks.go
- github_api_limit.go
- github_status_api.go
- github_status_refresh.go
- host_allocator.go
- host_drawdown.go
- host_execute.go
- host_ip_association.go
- host_monitoring_check.go
- host_monitoring_container_state.go
- host_monitoring_idle_termination.go
- host_monitoring_last_container_finish_time.go
- host_monitoring_parent_decommission.go
- host_setup_script.go
- host_stats.go
- host_status.go
- host_termination.go
- jasper_cleanup.go
- large_parser_project_task_stats.go
- merge_queue_completion_metrics.go
- merge_queue_metrics.go
- merge_queue_patch_recovery.go
- migrate_volume.go
- move_logs_to_failed_bucket.go
- oldest_image_removal.go
- otel.go
- patch_intent.go
- periodic_builds.go
- pod_diagnostics.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_restart_jasper.go
- provisioning_setup_host.go
- provisioning_user_data_done.go
- reauthorize_user.go
- repotracker.go
- s3_lifecycle_sync_admin_buckets.go
- s3_lifecycle_sync_project_buckets.go
- schedule_patch.go
- scheduler.go
- scheduler_alias.go
- sleep_scheduler.go
- spawnhost_expiration_check.go
- spawnhost_expiration_warning.go
- spawnhost_modify.go
- spawnhost_reboot.go
- spawnhost_start.go
- spawnhost_stop.go
- spawnhost_terminate.go
- stats_amboy.go
- stats_host.go
- stats_notifications.go
- stats_queue.go
- stats_sysinfo.go
- stats_task.go
- task_host_expiration_extend.go
- task_monitor_execution_timeout.go
- task_stranded_cleanup.go
- tasks_restart.go
- unexpirable_spawnhost_stats.go
- util.go
- version_activation_catchup.go
- volume_deletion_job.go
- volume_expiration_check.go
- volume_expiration_warning.go
- volume_unstick_job.go