units

package
v0.0.0-...-418c65a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 59 Imported by: 0

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

View Source
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"
	OtherErrors         = "Evergreen error"
)

Variables

This section is empty.

Functions

func NewAgentDeployJob

func NewAgentDeployJob(env evergreen.Environment, h host.Host, id string) amboy.Job

func NewAgentMonitorDeployJob

func NewAgentMonitorDeployJob(env evergreen.Environment, h host.Host, id string) amboy.Job

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 NewCacheHistoricalTestDataJob

func NewCacheHistoricalTestDataJob(projectId string, id 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 NewCollectHostIdleDataJob

func NewCollectHostIdleDataJob(h *host.Host, t *task.Task, startTime, finishTime time.Time) amboy.Job

func NewCollectTaskEndDataJob

func NewCollectTaskEndDataJob(t *task.Task, h *host.Host) amboy.Job

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 NewCommitQueueJob(env evergreen.Environment, queueID string, id string) amboy.Job

func NewCronRemoteFifteenMinuteJob

func NewCronRemoteFifteenMinuteJob() amboy.Job

func NewCronRemoteFifteenSecondJob

func NewCronRemoteFifteenSecondJob() amboy.Job

func NewCronRemoteFiveMinuteJob

func NewCronRemoteFiveMinuteJob() amboy.Job

func NewCronRemoteHourJob

func NewCronRemoteHourJob() amboy.Job

func NewCronRemoteMinuteJob

func NewCronRemoteMinuteJob() amboy.Job

func NewDecoHostNotifyJob

func NewDecoHostNotifyJob(env evergreen.Environment, h *host.Host, err error, message string) amboy.Job

func NewDistroAliasSchedulerJob

func NewDistroAliasSchedulerJob(distroID string, ts time.Time) amboy.Job

func NewDistroSchedulerJob

func NewDistroSchedulerJob(env evergreen.Environment, distroID string, ts time.Time) amboy.Job

func NewEventMetaJob

func NewEventMetaJob(q amboy.Queue, ts string) amboy.Job

func NewEventNotificationJob

func NewEventNotificationJob(id string) amboy.Job

func NewGenerateTasksJob

func NewGenerateTasksJob(id string, ts string) amboy.Job

func NewGithubStatusUpdateJobForDeleteFromCommitQueue

func NewGithubStatusUpdateJobForDeleteFromCommitQueue(owner, repo, ref string, prNumber int) amboy.Job

func NewGithubStatusUpdateJobForExternalPatch

func NewGithubStatusUpdateJobForExternalPatch(patchID string) amboy.Job

NewGithubStatusUpdateJobForExternalPatch prompts on Github for a user to manually authorize this patch

func NewGithubStatusUpdateJobForNewPatch

func NewGithubStatusUpdateJobForNewPatch(version string) amboy.Job

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 NewGithubStatusUpdateJobForPushToCommitQueue

func NewGithubStatusUpdateJobForPushToCommitQueue(owner, repo, ref string, prNumber int) amboy.Job

func NewHostAlertingJob

func NewHostAlertingJob(h host.Host, ts string) amboy.Job

func NewHostAllocatorJob

func NewHostAllocatorJob(env evergreen.Environment, distroID string, timestamp time.Time) amboy.Job

func NewHostCreateJob

func NewHostCreateJob(env evergreen.Environment, h host.Host, id string, CurrentAttempt int, MaxAttempts int, buildImageStarted bool) amboy.Job

func NewHostExecuteJob

func NewHostExecuteJob(env evergreen.Environment, h host.Host, script string, id string) amboy.Job

NewHostExecuteJob creates a job that executes a script on the host.

func NewHostMonitorContainerStateJob

func NewHostMonitorContainerStateJob(env evergreen.Environment, h *host.Host, providerName, id string) amboy.Job

func NewHostMonitorExternalStateJob

func NewHostMonitorExternalStateJob(env evergreen.Environment, h *host.Host, id string) amboy.Job

func NewHostSetupJob

func NewHostSetupJob(env evergreen.Environment, h host.Host, id string) amboy.Job

func NewHostStatsCollector

func NewHostStatsCollector(id string) amboy.Job

NewHostStatsCollector logs statistics about host utilization per distro to the default grip logger.

func NewHostStatsJob

func NewHostStatsJob(ts string) amboy.Job

func NewHostTerminationJob

func NewHostTerminationJob(env evergreen.Environment, h host.Host, terminateIfBusy bool) amboy.Job

func NewIdleHostTerminationJob

func NewIdleHostTerminationJob(env evergreen.Environment, h host.Host, id string) amboy.Job

func NewJasperDeployJob

func NewJasperDeployJob(env evergreen.Environment, h *host.Host, expiration time.Time, deployThroughJasper bool, id string) amboy.Job

NewJasperDeployJob creates a job that deploys a new Jasper service with new credentials to a host currently running a Jasper service.

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 NewLastContainerFinishTimeJob

func NewLastContainerFinishTimeJob(id string) amboy.Job

func NewLatencyStatsCollector

func NewLatencyStatsCollector(id string, duration time.Duration) amboy.Job

NewLatencyStatsCollector captures a single report of the latency of tasks that have started in the last minute.

func NewLegacyMonitorRunnerJob

func NewLegacyMonitorRunnerJob(env evergreen.Environment, id string) amboy.Job

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 NewNotificationStatsCollector

func NewNotificationStatsCollector(id string) amboy.Job

func NewOldestImageRemovalJob

func NewOldestImageRemovalJob(h *host.Host, providerName, id string) amboy.Job

func NewParentDecommissionJob

func NewParentDecommissionJob(id, d string, maxContainers int) amboy.Job

func NewPatchIntentProcessor

func NewPatchIntentProcessor(patchID mgobson.ObjectId, intent patch.Intent) amboy.Job

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 NewPeriodicBuildJob(projectID string, ts string) amboy.Job

func NewQueueStatsCollector

func NewQueueStatsCollector(id string) amboy.Job

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

func NewRepotrackerJob(msgID, projectID string) amboy.Job

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 NewSpawnhostExpirationWarningsJob

func NewSpawnhostExpirationWarningsJob(id string) amboy.Job

func NewSpawnhostModifyJob

func NewSpawnhostModifyJob(h *host.Host, changes host.HostModifyOptions, ts string) amboy.Job

func NewStrandedTaskCleanupJob

func NewStrandedTaskCleanupJob(id string) amboy.Job

func NewSysInfoStatsCollector

func NewSysInfoStatsCollector(id string) amboy.Job

NewSysInfoStatsCollector reports basic system information and a report of the go runtime information, as provided by grip.

func NewTaskExecutionMonitorJob

func NewTaskExecutionMonitorJob(taskID string, execution int, attempt int, ts string) amboy.Job

func NewTaskExecutionMonitorPopulateJob

func NewTaskExecutionMonitorPopulateJob(id string) amboy.Job

func NewTaskStatsCollector

func NewTaskStatsCollector(id string) amboy.Job

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

func NewUserDataDoneJob(env evergreen.Environment, h host.Host, id string) amboy.Job

NewUserDataDoneJob creates a job that checks if the host is done running its user data if bootstrapped with user data.

func NewVersionActivationJob

func NewVersionActivationJob(project string, id string) amboy.Job

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(part int) amboy.QueueOperation

func PopulateCommitQueueJobs

func PopulateCommitQueueJobs(env evergreen.Environment) amboy.QueueOperation

func PopulateContainerStateJobs

func PopulateContainerStateJobs(env evergreen.Environment) amboy.QueueOperation

func PopulateEventAlertProcessing

func PopulateEventAlertProcessing(parts int) amboy.QueueOperation

func PopulateGenerateTasksJobs

func PopulateGenerateTasksJobs(env evergreen.Environment) amboy.QueueOperation

PopulateGenerateTasksJobs poulates generate.tasks jobs for tasks that have started running their generate.tasks command.

func PopulateHostAlertJobs

func PopulateHostAlertJobs(parts int) amboy.QueueOperation

PopulateHostAlertJobs adds alerting tasks infrequently for host utilization monitoring.

func PopulateHostAllocatorJobs

func PopulateHostAllocatorJobs(env evergreen.Environment) amboy.QueueOperation

func PopulateHostCreationJobs

func PopulateHostCreationJobs(env evergreen.Environment, part int) amboy.QueueOperation

func PopulateHostMonitoring

func PopulateHostMonitoring(env evergreen.Environment) amboy.QueueOperation

func PopulateHostSetupJobs

func PopulateHostSetupJobs(env evergreen.Environment) amboy.QueueOperation

func PopulateHostTerminationJobs

func PopulateHostTerminationJobs(env evergreen.Environment) amboy.QueueOperation

func PopulateIdleHostJobs

func PopulateIdleHostJobs(env evergreen.Environment) amboy.QueueOperation

func PopulateJasperDeployJobs

func PopulateJasperDeployJobs(env evergreen.Environment) amboy.QueueOperation

PopulateJasperDeployJobs enqueues the jobs to deploy new Jasper service credentials to any host whose credentials are set to expire soon.

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 PopulateRepotrackerPollingJobs

func PopulateRepotrackerPollingJobs(part int) amboy.QueueOperation

func PopulateSchedulerJobs

func PopulateSchedulerJobs(env evergreen.Environment) 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL