diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 00000000000..5d8753a3938
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,10 @@
+EVG-NNNNN
+
+### Description
+add description, context, thought process, etc
+
+### Testing
+add a description of how you tested it
+
+### Documentation
+remember to add or edit docs in the docs/ directory if relevant
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 00000000000..d885a2dcbec
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,76 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "main" ]
+ schedule:
+ - cron: '15 8 * * 2'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'go', 'javascript', 'python' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ # Use only 'java' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # queries: security-extended,security-and-quality
+
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ # âšī¸ Command-line programs to run using the OS shell.
+ # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
+
+ # - run: |
+ # echo "Run, Build Application using script"
+ # ./location_of_script_within_repo/buildscript.sh
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.gitignore b/.gitignore
index 916f58df0f7..5b29fbfa75b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,7 +56,6 @@ source-patch-1*
evergreen
!cmd/evergreen
-package-lock.json
# ag and ripgrep ignore file
.ignore
diff --git a/.golangci.yml b/.golangci.yml
index d3bbf1ee0c9..80b871083c6 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -3,17 +3,11 @@ linters:
disable-all: true
enable:
- asciicheck
- - deadcode
- errcheck
- ineffassign
- goimports
- gosimple
- govet
- misspell
- - structcheck
- unconvert
- unused
-
-linters-settings:
- govet:
- check-shadowing: false
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000000..ba5ca89ab32
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,11 @@
+# Contributing
+Pull requests to improve Evergreen are always welcome! To get started contributing, please follow these steps:
+
+1. Sign the [contributor's agreement](http://www.mongodb.com/contributor). This will allow us to review and accept
+ contributions.
+2. Evergreen uses [Jira](https://jira.mongodb.org/projects/EVG) to track work. If you're contributing a new change
+ that's not already tracked in an existing Jira ticket, file a ticket under the EVG project with a description of the
+ intended changes.
+3. Make the code changes and open a pull request. The pull request title should be prefixed with the Jira ticket number
+ and include a brief summary of the changes. An Evergreen developer will review the code changes and run automated
+ tests. If the change looks good, it will be merged.
diff --git a/README.md b/README.md
index 76b00a7b55b..948f5e4fccf 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,4 @@
-# Evergreen
-Evergreen is a distributed continuous integration system built by MongoDB.
-It dynamically allocates hosts to run tasks in parallel across many machines.
-
-See [the wiki](https://github.com/evergreen-ci/evergreen/wiki) for
+See [the docs](https://github.com/evergreen-ci/evergreen/tree/main/docs/) for
user-facing documentation.
See [the API docs](https://pkg.go.dev/github.com/evergreen-ci/evergreen) for
diff --git a/agent/agent.go b/agent/agent.go
index 198e8e3462a..1f62cf050ce 100644
--- a/agent/agent.go
+++ b/agent/agent.go
@@ -28,9 +28,14 @@ import (
"github.com/mongodb/grip/send"
"github.com/mongodb/jasper"
"github.com/pkg/errors"
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/trace"
+ "google.golang.org/grpc"
)
-// Agent manages the data necessary to run tasks on a host.
+// Agent manages the data necessary to run tasks in a runtime environment.
type Agent struct {
comm client.Communicator
jasper jasper.Manager
@@ -40,6 +45,9 @@ type Agent struct {
// applies to EC2 hosts.
ec2InstanceID string
endTaskResp *TriggerEndTaskResp
+ tracer trace.Tracer
+ otelGrpcConn *grpc.ClientConn
+ closers []closerOp
}
// Options contains startup options for an Agent.
@@ -50,19 +58,20 @@ type Options struct {
HostID string
HostSecret string
// PodID and PodSecret only apply in pod mode.
- PodID string
- PodSecret string
- StatusPort int
- LogPrefix string
- LogkeeperURL string
- WorkingDirectory string
- HeartbeatInterval time.Duration
- AgentSleepInterval time.Duration
- MaxAgentSleepInterval time.Duration
- Cleanup bool
- S3Opts pail.S3Options
- SetupData apimodels.AgentSetupData
- CloudProvider string
+ PodID string
+ PodSecret string
+ StatusPort int
+ LogPrefix string
+ LogkeeperURL string
+ WorkingDirectory string
+ HeartbeatInterval time.Duration
+ AgentSleepInterval time.Duration
+ MaxAgentSleepInterval time.Duration
+ Cleanup bool
+ S3Opts pail.S3Options
+ SetupData apimodels.AgentSetupData
+ CloudProvider string
+ TraceCollectorEndpoint string
}
// Mode represents a mode that the agent will run in.
@@ -74,27 +83,32 @@ const (
// PodMode indicates that the agent will run in a pod's container.
PodMode Mode = "pod"
MessageLimit = 500
+
+ taskTimeoutBlock = "task-timeout"
+ preBlock = "pre"
+ postBlock = "post"
+ endTaskBlock = "end-task"
+ earlyTermBlock = "early-termination"
)
type taskContext struct {
- currentCommand command.Command
- expansions util.Expansions
- expVars *apimodels.ExpansionVars
- logger client.LoggerProducer
- jasper jasper.Manager
- logs *apimodels.TaskLogs
- statsCollector *StatsCollector
- systemMetricsCollector *systemMetricsCollector
- task client.TaskData
- taskGroup string
- ranSetupGroup bool
- taskConfig *internal.TaskConfig
- taskDirectory string
- logDirectories map[string]interface{}
- timeout timeoutInfo
- project *model.Project
- taskModel *task.Task
- oomTracker jasper.OOMTracker
+ currentCommand command.Command
+ expansions util.Expansions
+ privateVars map[string]bool
+ logger client.LoggerProducer
+ jasper jasper.Manager
+ logs *apimodels.TaskLogs
+ statsCollector *StatsCollector
+ task client.TaskData
+ taskGroup string
+ ranSetupGroup bool
+ taskConfig *internal.TaskConfig
+ taskDirectory string
+ logDirectories map[string]interface{}
+ timeout timeoutInfo
+ project *model.Project
+ taskModel *task.Task
+ oomTracker jasper.OOMTracker
sync.RWMutex
}
@@ -138,7 +152,9 @@ func newWithCommunicator(ctx context.Context, opts Options, comm client.Communic
return nil, errors.WithStack(err)
}
- if setupData, err := comm.GetAgentSetupData(ctx); err == nil {
+ setupData, err := comm.GetAgentSetupData(ctx)
+ grip.Alert(errors.Wrap(err, "getting agent setup data"))
+ if setupData != nil {
opts.SetupData = *setupData
opts.LogkeeperURL = setupData.LogkeeperURL
opts.S3Opts = pail.S3Options{
@@ -148,19 +164,57 @@ func newWithCommunicator(ctx context.Context, opts Options, comm client.Communic
Permissions: pail.S3PermissionsPublicRead,
ContentType: "text/plain",
}
+ opts.TraceCollectorEndpoint = setupData.TraceCollectorEndpoint
}
- return &Agent{
+ a := &Agent{
opts: opts,
comm: comm,
jasper: jpm,
- }, nil
+ }
+
+ a.closers = append(a.closers, closerOp{
+ name: "communicator close",
+ closerFn: func(ctx context.Context) error {
+ if a.comm != nil {
+ a.comm.Close()
+ }
+ return nil
+ }})
+
+ if err := a.initOtel(ctx); err != nil {
+ grip.Error(errors.Wrap(err, "initializing otel"))
+ a.tracer = otel.GetTracerProvider().Tracer("noop_tracer")
+ }
+
+ return a, nil
}
-func (a *Agent) Close() {
- if a.comm != nil {
- a.comm.Close()
+type closerOp struct {
+ name string
+ closerFn func(context.Context) error
+}
+
+func (a *Agent) Close(ctx context.Context) {
+ catcher := grip.NewBasicCatcher()
+ for idx, closer := range a.closers {
+ if closer.closerFn == nil {
+ continue
+ }
+
+ grip.Info(message.Fields{
+ "message": "calling closer",
+ "index": idx,
+ "closer": closer.name,
+ })
+
+ catcher.Add(closer.closerFn(ctx))
}
+
+ grip.Error(message.WrapError(catcher.Resolve(), message.Fields{
+ "message": "calling agent closers",
+ "host_id": a.opts.HostID,
+ }))
}
// Start starts the agent loop. The agent polls the API server for new tasks
@@ -170,13 +224,13 @@ func (a *Agent) Start(ctx context.Context) error {
err := a.startStatusServer(ctx, a.opts.StatusPort)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "starting status server")
}
if a.opts.Cleanup {
- tryCleanupDirectory(a.opts.WorkingDirectory)
+ a.tryCleanupDirectory(a.opts.WorkingDirectory)
}
- return errors.Wrap(a.loop(ctx), "error in agent loop, exiting")
+ return errors.Wrap(a.loop(ctx), "executing main agent loop")
}
// populateEC2InstanceID sets the agent's instance ID based on the EC2 instance
@@ -222,7 +276,7 @@ func (a *Agent) loop(ctx context.Context) error {
needPostGroup := false
defer func() {
if tc.logger != nil {
- grip.Error(tc.logger.Close())
+ grip.Error(errors.Wrap(tc.logger.Close(), "closing logger"))
}
}()
@@ -230,7 +284,7 @@ LOOP:
for {
select {
case <-ctx.Done():
- grip.Info("agent loop canceled")
+ grip.Info("Agent loop canceled.")
return nil
case <-timer.C:
a.endTaskResp = nil // reset this in case a previous task used this to trigger a response
@@ -246,7 +300,7 @@ LOOP:
// the agent loop is canceled.
return nil
}
- return errors.Wrap(err, "cannot connect to cedar")
+ return errors.Wrap(err, "connecting to Cedar")
}
a.populateEC2InstanceID(ctx)
@@ -262,10 +316,10 @@ LOOP:
agentSleepInterval = minAgentSleepInterval
continue LOOP
}
- return errors.Wrap(err, "error getting next task")
+ return errors.Wrap(err, "getting next task")
}
if nextTask.ShouldExit {
- grip.Notice("Next task response indicates agent should exit")
+ grip.Notice("Next task response indicates agent should exit.")
return nil
}
// if the host's current task group is finished we teardown
@@ -292,7 +346,7 @@ LOOP:
prevLogger := tc.logger
tc = a.prepareNextTask(ctx, nextTask, tc)
if prevLogger != nil {
- grip.Error(errors.Wrap(prevLogger.Close(), "problem closing the logger producer"))
+ grip.Error(errors.Wrap(prevLogger.Close(), "closing the previous logger producer"))
}
grip.Error(message.WrapError(a.fetchProjectConfig(ctx, tc), message.Fields{
@@ -328,7 +382,7 @@ LOOP:
}
jitteredSleep = utility.JitterInterval(agentSleepInterval)
- grip.Debugf("Agent sleeping %s", jitteredSleep)
+ grip.Debugf("Agent sleeping %s.", jitteredSleep)
timer.Reset(jitteredSleep)
agentSleepInterval = agentSleepInterval * 2
if agentSleepInterval > maxAgentSleepInterval {
@@ -391,26 +445,44 @@ func shouldRunSetupGroup(nextTask *apimodels.NextTaskResponse, tc *taskContext)
func (a *Agent) fetchProjectConfig(ctx context.Context, tc *taskContext) error {
project, err := a.comm.GetProject(ctx, tc.task)
if err != nil {
- return errors.Wrap(err, "error getting project")
+ return errors.Wrap(err, "getting project")
}
taskModel, err := a.comm.GetTask(ctx, tc.task)
if err != nil {
- return errors.Wrap(err, "error getting task")
+ return errors.Wrap(err, "getting task")
}
- exp, err := a.comm.GetExpansions(ctx, tc.task)
+
+ expAndVars, err := a.comm.GetExpansionsAndVars(ctx, tc.task)
if err != nil {
- return errors.Wrap(err, "error getting expansions")
+ return errors.Wrap(err, "getting expansions and variables")
}
- expVars, err := a.comm.FetchExpansionVars(ctx, tc.task)
- if err != nil {
- return errors.Wrap(err, "error getting task-specific expansions")
+
+ // GetExpansionsAndVars does not include build variant expansions or project
+ // parameters, so load them from the project.
+ for _, bv := range project.BuildVariants {
+ if bv.Name == taskModel.BuildVariant {
+ expAndVars.Expansions.Update(bv.Expansions)
+ break
+ }
+ }
+ expAndVars.Expansions.Update(expAndVars.Vars)
+ for _, param := range project.Parameters {
+ // If the key doesn't exist, the value will default to "" anyway; this
+ // prevents an un-specified project parameter from overwriting
+ // lower-priority expansions.
+ if param.Value != "" {
+ expAndVars.Expansions.Put(param.Key, param.Value)
+ }
}
- exp.Update(expVars.Vars)
+ // Overwrite any empty values here since these parameters were explicitly
+ // user-specified.
+ expAndVars.Expansions.Update(expAndVars.Parameters)
+
tc.taskModel = taskModel
tc.project = project
- tc.expansions = exp
- tc.expVars = expVars
+ tc.expansions = expAndVars.Expansions
+ tc.privateVars = expAndVars.PrivateVars
return nil
}
@@ -418,21 +490,22 @@ func (a *Agent) startLogging(ctx context.Context, tc *taskContext) error {
var err error
if tc.logger != nil {
- grip.Error(errors.Wrap(tc.logger.Close(), "problem closing the logger producer"))
+ grip.Error(errors.Wrap(tc.logger.Close(), "closing the logger producer"))
}
- grip.Error(os.RemoveAll(filepath.Join(a.opts.WorkingDirectory, taskLogDirectory)))
+ taskLogDir := filepath.Join(a.opts.WorkingDirectory, taskLogDirectory)
+ grip.Error(errors.Wrapf(os.RemoveAll(taskLogDir), "removing task log directory '%s'", taskLogDir))
if tc.project != nil && tc.project.Loggers != nil {
tc.logger, err = a.makeLoggerProducer(ctx, tc, tc.project.Loggers, "")
} else {
tc.logger, err = a.makeLoggerProducer(ctx, tc, &model.LoggerConfig{}, "")
}
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "making the logger producer")
}
sender, err := a.GetSender(ctx, a.opts.LogPrefix)
- grip.Error(errors.Wrap(err, "problem getting sender"))
- grip.Error(errors.Wrap(grip.SetSender(sender), "problem setting sender"))
+ grip.Error(errors.Wrap(err, "getting sender"))
+ grip.Error(errors.Wrap(grip.SetSender(sender), "setting sender"))
return nil
}
@@ -453,26 +526,27 @@ func (a *Agent) runTask(ctx context.Context, tc *taskContext) (bool, error) {
// the task failed during initial task setup.
factory, ok := command.GetCommandFactory("setup.initial")
if !ok {
- return false, errors.New("problem during configuring initial state")
+ return false, errors.New("setup.initial command is not registered")
}
tc.setCurrentCommand(factory())
var taskConfig *internal.TaskConfig
taskConfig, err = a.makeTaskConfig(ctx, tc)
if err != nil {
- grip.Errorf("error fetching task configuration: %s", err)
- grip.Infof("task complete: %s", tc.task.ID)
+ err = errors.Wrap(err, "making task config")
+ grip.Error(err)
+ grip.Infof("Task complete: '%s'.", tc.task.ID)
tc.logger = client.NewSingleChannelLogHarness("agent.error", a.defaultLogger)
- return a.handleTaskResponse(tskCtx, tc, evergreen.TaskFailed, "")
+ return a.handleTaskResponse(tskCtx, tc, evergreen.TaskFailed, err.Error())
}
tc.setTaskConfig(taskConfig)
if err = a.startLogging(ctx, tc); err != nil {
- msg := errors.Wrap(err, "error setting up logger producer").Error()
- grip.Error(msg)
- grip.Infof("task complete: %s", tc.task.ID)
+ err = errors.Wrap(err, "setting up logger producer")
+ grip.Error(err)
+ grip.Infof("Task complete: '%s'.", tc.task.ID)
tc.logger = client.NewSingleChannelLogHarness("agent.error", a.defaultLogger)
- return a.handleTaskResponse(tskCtx, tc, evergreen.TaskFailed, msg)
+ return a.handleTaskResponse(tskCtx, tc, evergreen.TaskFailed, err.Error())
}
grip.Info(message.Fields{
@@ -484,14 +558,30 @@ func (a *Agent) runTask(ctx context.Context, tc *taskContext) (bool, error) {
defer a.killProcs(ctx, tc, false)
defer tskCancel()
- heartbeat := make(chan string, 1)
- go a.startHeartbeat(tskCtx, tskCancel, tc, heartbeat)
+ tskCtx = contextWithTaskAttributes(tskCtx, taskConfig.TaskAttributes())
+
+ tskCtx, span := a.tracer.Start(tskCtx, fmt.Sprintf("task: '%s'", taskConfig.Task.DisplayName))
+ defer span.End()
+
+ shutdown, err := a.startMetrics(tskCtx, taskConfig)
+ grip.Error(errors.Wrap(err, "starting metrics collection"))
+ if shutdown != nil {
+ defer shutdown(ctx)
+ }
innerCtx, innerCancel := context.WithCancel(tskCtx)
+ // Pass in idle timeout context to heartbeat to enforce the idle timeout.
+ // Pass in the task context canceller to heartbeat because it's responsible for aborting the task.
+ heartbeat := make(chan string, 1)
+ go a.startHeartbeat(innerCtx, tskCancel, tc, heartbeat)
go a.startIdleTimeoutWatch(tskCtx, tc, innerCancel)
if utility.StringSliceContains(evergreen.ProviderSpotEc2Type, a.opts.CloudProvider) {
- go a.startEarlyTerminationWatcher(tskCtx, tc, agentutil.SpotHostWillTerminateSoon, agentutil.ExitAgent, nil)
+ exitAgent := func() {
+ grip.Info("Spot instance is terminating, so agent is exiting.")
+ os.Exit(1)
+ }
+ go a.startEarlyTerminationWatcher(tskCtx, tc, agentutil.SpotHostWillTerminateSoon, exitAgent, nil)
}
complete := make(chan string)
@@ -503,10 +593,10 @@ func (a *Agent) runTask(ctx context.Context, tc *taskContext) (bool, error) {
func (a *Agent) handleTaskResponse(ctx context.Context, tc *taskContext, status string, message string) (bool, error) {
resp, err := a.finishTask(ctx, tc, status, message)
if err != nil {
- return false, errors.Wrap(err, "error marking task complete")
+ return false, errors.Wrap(err, "marking task complete")
}
if resp == nil {
- grip.Error("response was nil, indicating a 409 or an empty response from the API server")
+ grip.Error("Response was nil, indicating a 409 or an empty response from the API server.")
return false, nil
}
if resp.ShouldExit {
@@ -519,11 +609,11 @@ func (a *Agent) wait(ctx, taskCtx context.Context, tc *taskContext, heartbeat ch
status := evergreen.TaskFailed
select {
case <-taskCtx.Done():
- grip.Infof("task canceled: %s", tc.task.ID)
+ grip.Infof("Task canceled: '%s'.", tc.task.ID)
case status = <-complete:
- grip.Infof("task complete: %s", tc.task.ID)
+ grip.Infof("Task complete: '%s'.", tc.task.ID)
case status = <-heartbeat:
- grip.Infof("received signal from heartbeat channel: %s", tc.task.ID)
+ grip.Infof("Received signal from heartbeat channel for task: '%s'.", tc.task.ID)
}
if tc.hadTimedOut() && ctx.Err() == nil {
@@ -533,16 +623,14 @@ func (a *Agent) wait(ctx, taskCtx context.Context, tc *taskContext, heartbeat ch
if tc.oomTrackerEnabled(a.opts.CloudProvider) && status == evergreen.TaskFailed {
startTime := time.Now()
- oomCtx, oomCancel := context.WithTimeout(ctx, time.Second*10)
+ oomCtx, oomCancel := context.WithTimeout(ctx, 10*time.Second)
defer oomCancel()
- if err := tc.oomTracker.Check(oomCtx); err != nil {
- tc.logger.Execution().Errorf("error checking for OOM killed processes: %s", err)
- }
+ tc.logger.Execution().Error(errors.Wrap(tc.oomTracker.Check(oomCtx), "checking for OOM killed processes"))
if lines, _ := tc.oomTracker.Report(); len(lines) > 0 {
- tc.logger.Execution().Debugf("found an OOM kill (in %.3f seconds)", time.Since(startTime).Seconds())
+ tc.logger.Execution().Debugf("Found an OOM kill (in %.3f seconds).", time.Since(startTime).Seconds())
tc.logger.Execution().Debug(strings.Join(lines, "\n"))
} else {
- tc.logger.Execution().Debugf("found no OOM kill (in %.3f seconds)", time.Since(startTime).Seconds())
+ tc.logger.Execution().Debugf("Found no OOM kill (in %.3f seconds).", time.Since(startTime).Seconds())
}
}
@@ -558,18 +646,13 @@ func (a *Agent) runTaskTimeoutCommands(ctx context.Context, tc *taskContext) {
taskGroup, err := tc.taskConfig.GetTaskGroup(tc.taskGroup)
if err != nil {
- tc.logger.Execution().Error(errors.Wrap(err, "error fetching task group for task timeout commands"))
+ tc.logger.Execution().Error(errors.Wrap(err, "fetching task group for task timeout commands"))
return
}
if taskGroup.Timeout != nil {
- err := a.runCommands(ctx, tc, taskGroup.Timeout.List(), runCommandsOptions{})
- tc.logger.Execution().Error(message.WrapError(err, message.Fields{
- "message": "Error running timeout command",
- }))
- tc.logger.Task().InfoWhen(err == nil, message.Fields{
- "message": "Finished running timeout commands",
- "total_time": time.Since(start).String(),
- })
+ err := a.runCommands(ctx, tc, taskGroup.Timeout.List(), runCommandsOptions{}, taskTimeoutBlock)
+ tc.logger.Execution().Error(errors.Wrap(err, "running timeout commands"))
+ tc.logger.Task().Infof("Finished running timeout commands in %s.", time.Since(start))
}
}
@@ -587,7 +670,7 @@ func (a *Agent) finishTask(ctx context.Context, tc *taskContext, status string,
case evergreen.TaskFailed:
tc.logger.Task().Info("Task completed - FAILURE.")
if err := a.runPostTaskCommands(ctx, tc); err != nil {
- tc.logger.Task().Error(errors.Wrap(err, "error running post task commands"))
+ tc.logger.Task().Error(errors.Wrap(err, "running post task commands"))
}
a.runEndTaskSync(ctx, tc, detail)
case evergreen.TaskUndispatched:
@@ -597,34 +680,33 @@ func (a *Agent) finishTask(ctx context.Context, tc *taskContext, status string,
// If we receive a 409, return control to the loop (ask for a new task)
return nil, nil
case evergreen.TaskSystemFailed:
- grip.Error("Task system failure")
+ grip.Error("Task system failure.")
default:
- tc.logger.Task().Errorf("Programmer error: Invalid task status %s", detail.Status)
+ tc.logger.Task().Errorf("Programmer error: invalid task status '%s'.", detail.Status)
}
- tc.Lock()
- if tc.systemMetricsCollector != nil {
- err := tc.systemMetricsCollector.Close()
- tc.logger.System().Error(errors.Wrap(err, "error closing system metrics collector"))
- }
- tc.Unlock()
-
a.killProcs(ctx, tc, false)
if tc.logger != nil {
err := a.uploadToS3(ctx, tc)
- tc.logger.Execution().Error(errors.Wrap(err, "error uploading log files"))
- tc.logger.Execution().Infof("Sending final status as: %v", detail.Status)
- flush_ctx, cancel := context.WithTimeout(ctx, time.Minute)
+ tc.logger.Execution().Error(errors.Wrap(err, "uploading log files to S3"))
+ tc.logger.Execution().Infof("Sending final task status: '%s'.", detail.Status)
+ flushCtx, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel()
- grip.Error(tc.logger.Flush(flush_ctx))
+ grip.Error(errors.Wrap(tc.logger.Flush(flushCtx), "flushing logs"))
}
- grip.Infof("Sending final status as: %v", detail.Status)
+ grip.Infof("Sending final task status: '%s'.", detail.Status)
resp, err := a.comm.EndTask(ctx, detail, tc.task)
if err != nil {
- return nil, errors.Wrap(err, "problem marking task complete")
+ return nil, errors.Wrap(err, "marking task complete")
+ }
+ grip.Infof("Successfully sent final task status: '%s'.", detail.Status)
+
+ span := trace.SpanFromContext(ctx)
+ span.SetAttributes(attribute.String(evergreen.TaskStatusOtelAttribute, detail.Status))
+ if detail.Status != evergreen.TaskSucceeded {
+ span.SetStatus(codes.Error, fmt.Sprintf("failing status '%s'", detail.Status))
}
- grip.Infof("Sent final status as: %v", detail.Status)
return resp, nil
}
@@ -633,21 +715,21 @@ func (a *Agent) endTaskResponse(tc *taskContext, status string, message string)
var description string
var failureType string
if a.endTaskResp != nil { // if the user indicated a task response, use this instead
- tc.logger.Task().Infof("Task status set with HTTP endpoint")
+ tc.logger.Task().Infof("Task status set with HTTP endpoint.")
if !evergreen.IsValidTaskEndStatus(a.endTaskResp.Status) {
- tc.logger.Task().Errorf("'%s' is not a valid task status", a.endTaskResp.Status)
+ tc.logger.Task().Errorf("'%s' is not a valid task status.", a.endTaskResp.Status)
status = evergreen.TaskFailed
failureType = evergreen.CommandTypeSystem
} else {
status = a.endTaskResp.Status
if len(a.endTaskResp.Description) > MessageLimit {
- tc.logger.Task().Warningf("description from endpoint is too long to set (%d character limit), defaulting to command display name", MessageLimit)
+ tc.logger.Task().Warningf("Description from endpoint is too long to set (%d character limit), defaulting to command display name.", MessageLimit)
} else {
description = a.endTaskResp.Description
}
if a.endTaskResp.Type != "" && !utility.StringSliceContains(evergreen.ValidCommandTypes, a.endTaskResp.Type) {
- tc.logger.Task().Warningf("'%s' is not a valid failure type, defaulting to command failure type", a.endTaskResp.Type)
+ tc.logger.Task().Warningf("'%s' is not a valid failure type, defaulting to command failure type.", a.endTaskResp.Type)
} else {
failureType = a.endTaskResp.Type
}
@@ -680,6 +762,9 @@ func (a *Agent) endTaskResponse(tc *taskContext, status string, message string)
}
func (a *Agent) runPostTaskCommands(ctx context.Context, tc *taskContext) error {
+ ctx, span := a.tracer.Start(ctx, "post-task-commands")
+ defer span.End()
+
start := time.Now()
a.killProcs(ctx, tc, false)
defer a.killProcs(ctx, tc, false)
@@ -690,24 +775,19 @@ func (a *Agent) runPostTaskCommands(ctx context.Context, tc *taskContext) error
taskConfig := tc.getTaskConfig()
taskGroup, err := taskConfig.GetTaskGroup(tc.taskGroup)
if err != nil {
- tc.logger.Execution().Error(errors.Wrap(err, "error fetching task group for post-task commands"))
+ tc.logger.Execution().Error(errors.Wrap(err, "fetching task group for post-task commands"))
return nil
}
if taskGroup.TeardownTask != nil {
opts.failPreAndPost = taskGroup.TeardownTaskCanFailTask
- err = a.runCommands(postCtx, tc, taskGroup.TeardownTask.List(), opts)
+ err = a.runCommands(postCtx, tc, taskGroup.TeardownTask.List(), opts, postBlock)
if err != nil {
- tc.logger.Task().Error(message.WrapError(err, message.Fields{
- "message": "Error running post-task command.",
- }))
+ tc.logger.Task().Error(errors.Wrap(err, "running post-task commands"))
if taskGroup.TeardownTaskCanFailTask {
return err
}
}
- tc.logger.Task().InfoWhen(err == nil, message.Fields{
- "message": "Finished running post-task commands.",
- "total_time": time.Since(start).String(),
- })
+ tc.logger.Task().Infof("Finished running post-task commands in %s.", time.Since(start))
}
return nil
}
@@ -729,21 +809,19 @@ func (a *Agent) runPostGroupCommands(ctx context.Context, tc *taskContext) {
taskGroup, err := tc.taskConfig.GetTaskGroup(tc.taskGroup)
if err != nil {
if tc.logger != nil {
- tc.logger.Execution().Error(errors.Wrap(err, "error fetching task group for post-group commands"))
+ tc.logger.Execution().Error(errors.Wrap(err, "fetching task group for post-group commands"))
}
return
}
if taskGroup.TeardownGroup != nil {
- grip.Info("Running post-group commands")
+ grip.Info("Running post-group commands.")
a.killProcs(ctx, tc, true)
var cancel context.CancelFunc
ctx, cancel = a.withCallbackTimeout(ctx, tc)
defer cancel()
- err := a.runCommands(ctx, tc, taskGroup.TeardownGroup.List(), runCommandsOptions{})
- grip.Error(message.WrapError(err, message.Fields{
- "message": "Error running post-task command.",
- }))
- grip.InfoWhen(err == nil, "Finished running post-group commands")
+ err := a.runCommands(ctx, tc, taskGroup.TeardownGroup.List(), runCommandsOptions{}, postBlock)
+ grip.Error(errors.Wrap(err, "running post-group commands"))
+ grip.Info("Finished running post-group commands.")
}
}
@@ -770,17 +848,14 @@ func (a *Agent) runEndTaskSync(ctx context.Context, tc *taskContext, detail *api
}
defer cancel()
- if err := a.runCommands(syncCtx, tc, taskSyncCmds.List(), runCommandsOptions{}); err != nil {
+ if err := a.runCommands(syncCtx, tc, taskSyncCmds.List(), runCommandsOptions{}, endTaskBlock); err != nil {
tc.logger.Task().Error(message.WrapError(err, message.Fields{
- "message": "Error running task sync.",
+ "message": "error running task sync",
"total_time": time.Since(start).String(),
}))
return
}
- tc.logger.Task().Info(message.Fields{
- "message": "Finished running task sync.",
- "total_time": time.Since(start).String(),
- })
+ tc.logger.Task().Infof("Finished running task sync in %s.", time.Since(start))
}
func (a *Agent) killProcs(ctx context.Context, tc *taskContext, ignoreTaskGroupCheck bool) {
@@ -791,26 +866,26 @@ func (a *Agent) killProcs(ctx context.Context, tc *taskContext, ignoreTaskGroupC
if a.shouldKill(tc, ignoreTaskGroupCheck) {
if tc.task.ID != "" && tc.taskConfig != nil {
- logger.Infof("cleaning up processes for task: %s", tc.task.ID)
+ logger.Infof("Cleaning up processes for task: '%s'.", tc.task.ID)
if err := agentutil.KillSpawnedProcs(ctx, tc.task.ID, tc.taskConfig.WorkDir, logger); err != nil {
// If the host is in a state where ps is timing out we need human intervention.
if psErr := errors.Cause(err); psErr == agentutil.ErrPSTimeout {
disableErr := a.comm.DisableHost(ctx, a.opts.HostID, apimodels.DisableInfo{Reason: psErr.Error()})
- logger.CriticalWhen(disableErr != nil, fmt.Sprintf("error disabling host: %s", disableErr))
+ logger.CriticalWhen(disableErr != nil, errors.Wrap(err, "disabling host due to ps timeout"))
}
- logger.Critical(fmt.Sprintf("error cleaning up spawned processes: %v", err))
+ logger.Critical(errors.Wrap(err, "cleaning up spawned processes"))
}
- logger.Infof("cleaned up processes for task: '%s'", tc.task.ID)
+ logger.Infof("Cleaned up processes for task: '%s'.", tc.task.ID)
}
- logger.Info("cleaning up Docker artifacts")
+ logger.Info("Cleaning up Docker artifacts.")
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, dockerTimeout)
defer cancel()
if err := docker.Cleanup(ctx, logger); err != nil {
- logger.Critical(fmt.Sprintf("error cleaning up Docker artifacts: %s", err))
+ logger.Critical(errors.Wrap(err, "cleaning up Docker artifacts"))
}
- logger.Info("cleaned up Docker artifacts")
+ logger.Info("Cleaned up Docker artifacts.")
}
}
diff --git a/agent/agent_command_test.go b/agent/agent_command_test.go
index e079ec09bed..ed986866867 100644
--- a/agent/agent_command_test.go
+++ b/agent/agent_command_test.go
@@ -2,7 +2,6 @@ package agent
import (
"context"
- "io/ioutil"
"os"
"strings"
"testing"
@@ -17,6 +16,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
+ "go.opentelemetry.io/otel"
)
type CommandSuite struct {
@@ -39,13 +39,13 @@ func (s *CommandSuite) SetupTest() {
StatusPort: 2286,
LogPrefix: evergreen.LocalLoggingOverride,
},
- comm: client.NewMock("url"),
+ comm: client.NewMock("url"),
+ tracer: otel.GetTracerProvider().Tracer("noop_tracer"),
}
s.mockCommunicator = s.a.comm.(*client.Mock)
var err error
- s.tmpDirName, err = ioutil.TempDir("", "agent-command-suite-")
- s.Require().NoError(err)
+ s.tmpDirName = s.T().TempDir()
s.a.jasper, err = jasper.NewSynchronizedManager(false)
s.Require().NoError(err)
@@ -58,12 +58,30 @@ func (s *CommandSuite) SetupTest() {
}
}
-func (s *CommandSuite) TearDownTest() {
- s.Require().NoError(os.RemoveAll(s.tmpDirName))
+func (s *CommandSuite) TestPreErrorFailsWithSetup() {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ taskID := "pre_error"
+ s.tc.task.ID = taskID
+ s.tc.ranSetupGroup = false
+
+ defer s.a.removeTaskDirectory(s.tc)
+ _, err := s.a.runTask(ctx, s.tc)
+ s.NoError(err)
+ detail := s.mockCommunicator.GetEndTaskDetail()
+ s.Equal(evergreen.TaskFailed, detail.Status)
+ s.Equal(evergreen.CommandTypeSetup, detail.Type)
+ s.Contains(detail.Description, "shell.exec")
+ s.False(detail.TimedOut)
+
+ taskData := s.mockCommunicator.EndTaskResult.TaskData
+ s.Equal(taskID, taskData.ID)
+ s.Equal(s.tc.task.Secret, taskData.Secret)
}
func (s *CommandSuite) TestShellExec() {
- f, err := ioutil.TempFile(s.tmpDirName, "shell-exec-")
+ f, err := os.CreateTemp(s.tmpDirName, "shell-exec-")
s.Require().NoError(err)
defer os.Remove(f.Name())
@@ -92,7 +110,7 @@ func (s *CommandSuite) TestShellExec() {
if msg.Message == "Task completed - SUCCESS." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec'") {
+ if strings.HasPrefix(msg.Message, "Finished command 'shell.exec'") {
foundShellLogMessage = true
}
}
@@ -105,7 +123,7 @@ func (s *CommandSuite) TestShellExec() {
s.Contains(detail.Description, "shell.exec")
s.False(detail.TimedOut)
- data, err := ioutil.ReadFile(tmpFile)
+ data, err := os.ReadFile(tmpFile)
s.Require().NoError(err)
s.Equal("shell.exec test message", strings.Trim(string(data), "\r\n"))
diff --git a/agent/agent_test.go b/agent/agent_test.go
index 6769ec608ca..d56d6f1650d 100644
--- a/agent/agent_test.go
+++ b/agent/agent_test.go
@@ -3,8 +3,8 @@ package agent
import (
"context"
"fmt"
- "io/ioutil"
"os"
+ "path/filepath"
"strings"
"testing"
"time"
@@ -19,6 +19,7 @@ import (
"github.com/mongodb/jasper"
"github.com/mongodb/jasper/mock"
"github.com/stretchr/testify/suite"
+ "go.opentelemetry.io/otel"
)
const (
@@ -47,7 +48,8 @@ func (s *AgentSuite) SetupTest() {
StatusPort: 2286,
LogPrefix: evergreen.LocalLoggingOverride,
},
- comm: client.NewMock("url"),
+ comm: client.NewMock("url"),
+ tracer: otel.GetTracerProvider().Tracer("noop_tracer"),
}
s.mockCommunicator = s.a.comm.(*client.Mock)
s.a.jasper, err = jasper.NewSynchronizedManager(true)
@@ -74,7 +76,7 @@ func (s *AgentSuite) SetupTest() {
factory, ok := command.GetCommandFactory("setup.initial")
s.True(ok)
s.tc.setCurrentCommand(factory())
- s.tmpDirName, err = ioutil.TempDir("", "agent-command-suite-")
+ s.tmpDirName, err = os.MkdirTemp("", filepath.Base(s.T().Name()))
s.Require().NoError(err)
s.tc.taskDirectory = s.tmpDirName
sender, err := s.a.GetSender(ctx, evergreen.LocalLoggingOverride)
@@ -248,9 +250,9 @@ func (s *AgentSuite) TestCancelRunCommands() {
},
}
cmds := []model.PluginCommandConf{cmd}
- err := s.a.runCommands(ctx, s.tc, cmds, runCommandsOptions{})
- s.Error(err)
- s.Equal("runCommands canceled", err.Error())
+ err := s.a.runCommands(ctx, s.tc, cmds, runCommandsOptions{}, "post")
+ s.Require().Error(err)
+ s.Contains(err.Error(), context.Canceled.Error())
}
func (s *AgentSuite) TestPre() {
@@ -281,8 +283,8 @@ pre:
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
s.Equal("Running pre-task commands.", msgs[1].Message)
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[3].Message)
- s.Contains(msgs[len(msgs)-1].Message, "Finished running pre-task commands")
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[3].Message)
+ s.Contains(msgs[len(msgs)-1].Message, "Finished running pre-task commands.")
}
func (s *AgentSuite) TestPreFailsTask() {
@@ -371,7 +373,7 @@ post:
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
s.Equal("Running post-task commands.", msgs[1].Message)
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[2].Message)
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[2].Message)
s.Contains(msgs[len(msgs)-1].Message, "Finished running post-task commands")
}
@@ -406,12 +408,12 @@ post:
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
s.Equal("Running post-task commands.", msgs[1].Message)
- s.Equal("Running command 'shell.exec' (step 1 of 2)", msgs[2].Message)
+ s.Equal("Running command 'shell.exec' (step 1 of 2).", msgs[2].Message)
s.Contains(msgs[len(msgs)-1].Message, "Finished running post-task commands")
found := map[string]bool{
- "Running post-task commands.": false,
- "Running command 'shell.exec' (step 1 of 2)": false,
- "Running command 'shell.exec' (step 2 of 2)": false,
+ "Running post-task commands.": false,
+ "Running command 'shell.exec' (step 1 of 2).": false,
+ "Running command 'shell.exec' (step 2 of 2).": false,
}
for _, msg := range msgs {
for f := range found {
@@ -464,9 +466,9 @@ func (s *AgentSuite) TestAbort() {
s.NoError(err)
s.Equal(evergreen.TaskFailed, s.mockCommunicator.EndTaskResult.Detail.Status)
shouldFind := map[string]bool{
- "initial task setup": false,
- "Running post-task commands": false,
- "Sending final status as: failed": false,
+ "initial task setup": false,
+ "Running post-task commands.": false,
+ "Sending final task status: 'failed'": false,
}
s.Require().NoError(s.tc.logger.Close())
for _, m := range s.mockCommunicator.GetMockMessages()["task_id"] {
@@ -706,7 +708,7 @@ task_groups:
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
s.Equal("Running pre-task commands.", msgs[1].Message)
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[3].Message)
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[3].Message)
s.Equal("Finished running pre-task commands.", msgs[len(msgs)-1].Message)
}
@@ -737,6 +739,11 @@ task_groups:
},
Project: p,
WorkDir: s.tc.taskDirectory,
+ ProjectRef: &model.ProjectRef{
+ Id: "abcdef",
+ Identifier: "project_identifier",
+ },
+ Timeout: &internal.Timeout{},
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -778,7 +785,7 @@ task_groups:
s.Error(s.a.runPreTaskCommands(ctx, s.tc))
s.NoError(s.tc.logger.Close())
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
- s.Contains(msgs[len(msgs)-1].Message, "error running task setup group")
+ s.Contains(msgs[len(msgs)-1].Message, "running task setup group")
}
func (s *AgentSuite) TestGroupPostGroupCommandsFail() {
@@ -813,7 +820,7 @@ task_groups:
s.Error(s.a.runPostTaskCommands(ctx, s.tc))
s.NoError(s.tc.logger.Close())
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
- s.Contains(msgs[len(msgs)-1].Message, "Error running post-task command.")
+ s.Contains(msgs[len(msgs)-1].Message, "running post-task commands")
}
func (s *AgentSuite) TestGroupPreTaskCommands() {
@@ -848,7 +855,7 @@ task_groups:
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
s.Equal("Running pre-task commands.", msgs[1].Message)
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[3].Message)
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[3].Message)
s.Equal("Finished running pre-task commands.", msgs[len(msgs)-1].Message)
}
@@ -883,8 +890,8 @@ task_groups:
s.NoError(s.a.runPostTaskCommands(ctx, s.tc))
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[2].Message)
- s.Contains(msgs[len(msgs)-2].Message, "Finished 'shell.exec'")
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[2].Message)
+ s.Contains(msgs[len(msgs)-2].Message, "Finished command 'shell.exec'")
s.Contains(msgs[len(msgs)-1].Message, "Finished running post-task commands")
}
@@ -920,8 +927,8 @@ task_groups:
s.a.runPostGroupCommands(ctx, s.tc)
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
s.Require().True(len(msgs) >= 2)
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[1].Message)
- s.Contains(msgs[len(msgs)-1].Message, "Finished 'shell.exec'")
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[1].Message)
+ s.Contains(msgs[len(msgs)-1].Message, "Finished command 'shell.exec'")
}
func (s *AgentSuite) TestGroupTimeoutCommands() {
@@ -959,8 +966,8 @@ task_groups:
s.a.runTaskTimeoutCommands(ctx, s.tc)
_ = s.tc.logger.Close()
msgs := s.mockCommunicator.GetMockMessages()["task_id"]
- s.Equal("Running command 'shell.exec' (step 1 of 1)", msgs[2].Message)
- s.Contains(msgs[len(msgs)-2].Message, "Finished 'shell.exec'")
+ s.Equal("Running command 'shell.exec' (step 1 of 1).", msgs[2].Message)
+ s.Contains(msgs[len(msgs)-2].Message, "Finished command 'shell.exec'")
}
func (s *AgentSuite) TestTimeoutDoesNotWaitForChildProcs() {
@@ -1003,3 +1010,22 @@ timeout:
s.True(then.Sub(now) < 4*time.Second)
_ = s.tc.logger.Close()
}
+
+func (s *AgentSuite) TestFetchProjectConfig() {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ s.mockCommunicator.Project = &model.Project{
+ Identifier: "some_cool_project",
+ }
+
+ s.NoError(s.a.fetchProjectConfig(ctx, s.tc))
+
+ s.Require().NotZero(s.tc.project)
+ s.Equal(s.mockCommunicator.Project.Identifier, s.tc.project.Identifier)
+ s.Require().NotZero(s.tc.expansions)
+ s.Equal("bar", s.tc.expansions["foo"], "should include mock communicator expansions")
+ s.Equal("new-parameter-value", s.tc.expansions["overwrite-this-parameter"], "user-specified parameter should overwrite any other conflicting expansion")
+ s.Require().NotZero(s.tc.privateVars)
+ s.True(s.tc.privateVars["some_private_var"], "should include mock communicator private variables")
+}
diff --git a/agent/agent_timeout_test.go b/agent/agent_timeout_test.go
index edb043a21fb..1810eb92378 100644
--- a/agent/agent_timeout_test.go
+++ b/agent/agent_timeout_test.go
@@ -2,7 +2,6 @@ package agent
import (
"context"
- "io/ioutil"
"os"
"strings"
"testing"
@@ -14,6 +13,7 @@ import (
"github.com/mongodb/jasper"
"github.com/mongodb/jasper/mock"
"github.com/stretchr/testify/suite"
+ "go.opentelemetry.io/otel"
)
type TimeoutSuite struct {
@@ -37,14 +37,14 @@ func (s *TimeoutSuite) SetupTest() {
StatusPort: 2286,
LogPrefix: evergreen.LocalLoggingOverride,
},
- comm: client.NewMock("url"),
+ comm: client.NewMock("url"),
+ tracer: otel.GetTracerProvider().Tracer("noop_tracer"),
}
s.mockCommunicator = s.a.comm.(*client.Mock)
var err error
- s.tmpDirName, err = ioutil.TempDir("", "agent-timeout-suite-")
- s.Require().NoError(err)
- s.tmpFile, err = ioutil.TempFile(s.tmpDirName, "timeout")
+ s.tmpDirName = s.T().TempDir()
+ s.tmpFile, err = os.CreateTemp(s.tmpDirName, "timeout")
s.Require().NoError(err)
s.tmpFileName = s.tmpFile.Name()
@@ -56,7 +56,6 @@ func (s *TimeoutSuite) SetupTest() {
func (s *TimeoutSuite) TearDownTest() {
s.Require().NoError(os.Remove(s.tmpFileName))
- s.Require().NoError(os.RemoveAll(s.tmpDirName))
}
// TestExecTimeoutProject tests exec_timeout_secs set on a project.
@@ -95,13 +94,13 @@ func (s *TimeoutSuite) TestExecTimeoutProject() {
if msg.Message == "Task completed - FAILURE." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Hit exec timeout (1s)") {
+ if strings.HasPrefix(msg.Message, "Hit exec timeout (1s).") {
foundTimeoutMessage = true
}
- if strings.HasPrefix(msg.Message, "Running task-timeout commands") {
+ if strings.HasPrefix(msg.Message, "Running task-timeout commands.") {
foundShellLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\"") {
+ if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\".") {
foundShellLogMessage = true
}
}
@@ -117,7 +116,7 @@ func (s *TimeoutSuite) TestExecTimeoutProject() {
s.Equal(1*time.Second, detail.TimeoutDuration)
s.EqualValues(execTimeout, detail.TimeoutType)
- data, err := ioutil.ReadFile(s.tmpFileName)
+ data, err := os.ReadFile(s.tmpFileName)
s.Require().NoError(err)
s.Equal("timeout test message", strings.Trim(string(data), "\r\n"))
@@ -163,13 +162,13 @@ func (s *TimeoutSuite) TestExecTimeoutTask() {
if msg.Message == "Task completed - FAILURE." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Hit exec timeout (1s)") {
+ if strings.HasPrefix(msg.Message, "Hit exec timeout (1s).") {
foundTimeoutMessage = true
}
- if strings.HasPrefix(msg.Message, "Running task-timeout commands") {
+ if strings.HasPrefix(msg.Message, "Running task-timeout commands.") {
foundShellLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\"") {
+ if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\".") {
foundShellLogMessage = true
}
}
@@ -185,7 +184,7 @@ func (s *TimeoutSuite) TestExecTimeoutTask() {
s.Equal(1*time.Second, detail.TimeoutDuration)
s.EqualValues(execTimeout, detail.TimeoutType)
- data, err := ioutil.ReadFile(s.tmpFileName)
+ data, err := os.ReadFile(s.tmpFileName)
s.Require().NoError(err)
s.Equal("timeout test message", strings.Trim(string(data), "\r\n"))
@@ -230,13 +229,13 @@ func (s *TimeoutSuite) TestIdleTimeoutFunc() {
if msg.Message == "Task completed - FAILURE." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Hit idle timeout (no message on stdout for more than 1s)") {
+ if strings.HasPrefix(msg.Message, "Hit idle timeout (no message on stdout for more than 1s).") {
foundTimeoutMessage = true
}
- if strings.HasPrefix(msg.Message, "Running task-timeout commands") {
+ if strings.HasPrefix(msg.Message, "Running task-timeout commands.") {
foundShellLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\"") {
+ if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\".") {
foundShellLogMessage = true
}
}
@@ -252,7 +251,7 @@ func (s *TimeoutSuite) TestIdleTimeoutFunc() {
s.Equal(1*time.Second, detail.TimeoutDuration)
s.EqualValues(idleTimeout, detail.TimeoutType)
- data, err := ioutil.ReadFile(s.tmpFileName)
+ data, err := os.ReadFile(s.tmpFileName)
s.Require().NoError(err)
s.Equal("timeout test message", strings.Trim(string(data), "\r\n"))
@@ -297,13 +296,13 @@ func (s *TimeoutSuite) TestIdleTimeoutCommand() {
if msg.Message == "Task completed - FAILURE." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Hit idle timeout (no message on stdout for more than 1s)") {
+ if strings.HasPrefix(msg.Message, "Hit idle timeout (no message on stdout for more than 1s).") {
foundTimeoutMessage = true
}
- if strings.HasPrefix(msg.Message, "Running task-timeout commands") {
+ if strings.HasPrefix(msg.Message, "Running task-timeout commands.") {
foundShellLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\"") {
+ if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\".") {
foundShellLogMessage = true
}
}
@@ -319,7 +318,7 @@ func (s *TimeoutSuite) TestIdleTimeoutCommand() {
s.Equal(1*time.Second, detail.TimeoutDuration)
s.EqualValues(idleTimeout, detail.TimeoutType)
- data, err := ioutil.ReadFile(s.tmpFileName)
+ data, err := os.ReadFile(s.tmpFileName)
s.Require().NoError(err)
s.Equal("timeout test message", strings.Trim(string(data), "\r\n"))
@@ -364,13 +363,13 @@ func (s *TimeoutSuite) TestDynamicIdleTimeout() {
if msg.Message == "Task completed - FAILURE." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Hit idle timeout (no message on stdout for more than 2s)") {
+ if strings.HasPrefix(msg.Message, "Hit idle timeout (no message on stdout for more than 2s).") {
foundTimeoutMessage = true
}
- if strings.HasPrefix(msg.Message, "Running task-timeout commands") {
+ if strings.HasPrefix(msg.Message, "Running task-timeout commands.") {
foundShellLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\"") {
+ if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\".") {
foundShellLogMessage = true
}
}
@@ -386,7 +385,7 @@ func (s *TimeoutSuite) TestDynamicIdleTimeout() {
s.Equal(2*time.Second, detail.TimeoutDuration)
s.EqualValues(idleTimeout, detail.TimeoutType)
- data, err := ioutil.ReadFile(s.tmpFileName)
+ data, err := os.ReadFile(s.tmpFileName)
s.Require().NoError(err)
s.Equal("timeout test message", strings.Trim(string(data), "\r\n"))
@@ -431,13 +430,13 @@ func (s *TimeoutSuite) TestDynamicExecTimeoutTask() {
if msg.Message == "Task completed - FAILURE." {
foundSuccessLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Hit exec timeout (2s)") {
+ if strings.HasPrefix(msg.Message, "Hit exec timeout (2s).") {
foundTimeoutMessage = true
}
- if strings.HasPrefix(msg.Message, "Running task-timeout commands") {
+ if strings.HasPrefix(msg.Message, "Running task-timeout commands.") {
foundShellLogMessage = true
}
- if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\"") {
+ if strings.HasPrefix(msg.Message, "Finished 'shell.exec' in \"timeout\".") {
foundShellLogMessage = true
}
}
@@ -453,7 +452,7 @@ func (s *TimeoutSuite) TestDynamicExecTimeoutTask() {
s.Equal(2*time.Second, detail.TimeoutDuration)
s.EqualValues(execTimeout, detail.TimeoutType)
- data, err := ioutil.ReadFile(s.tmpFileName)
+ data, err := os.ReadFile(s.tmpFileName)
s.Require().NoError(err)
s.Equal("timeout test message", strings.Trim(string(data), "\r\n"))
diff --git a/agent/background.go b/agent/background.go
index b7c18cc7738..a7fc4bc74b4 100644
--- a/agent/background.go
+++ b/agent/background.go
@@ -27,14 +27,14 @@ func (a *Agent) startHeartbeat(ctx context.Context, cancel context.CancelFunc, t
case <-ticker.C:
signalBeat, err = a.doHeartbeat(ctx, tc)
if signalBeat == evergreen.TaskConflict {
- tc.logger.Task().Error("Encountered task conflict while checking heartbeat, aborting task")
+ tc.logger.Task().Error("Encountered task conflict while checking heartbeat, aborting task.")
if err != nil {
tc.logger.Task().Error(err.Error())
}
cancel()
}
if signalBeat == evergreen.TaskFailed {
- tc.logger.Task().Error("Heartbeat received signal to abort task")
+ tc.logger.Task().Error("Heartbeat received signal to abort task.")
heartbeat <- signalBeat
return
}
@@ -45,7 +45,7 @@ func (a *Agent) startHeartbeat(ctx context.Context, cancel context.CancelFunc, t
}
if failures == maxHeartbeats {
// Presumably this won't work, but we should try to notify the user anyway
- tc.logger.Task().Error("Hit max heartbeats, aborting task")
+ tc.logger.Task().Error("Hit max heartbeat attempts, aborting task.")
heartbeat <- evergreen.TaskFailed
return
}
@@ -72,14 +72,14 @@ func (a *Agent) startIdleTimeoutWatch(ctx context.Context, tc *taskContext, canc
for {
select {
case <-ctx.Done():
- grip.Info("Idle timeout watch canceled")
+ grip.Info("Idle timeout watcher canceled.")
return
case <-ticker.C:
timeout := tc.getCurrentTimeout()
timeSinceLastMessage := time.Since(a.comm.LastMessageAt())
if timeSinceLastMessage > timeout {
- tc.logger.Execution().Errorf("Hit idle timeout (no message on stdout for more than %s)", timeout)
+ tc.logger.Execution().Errorf("Hit idle timeout (no message on stdout for more than %s).", timeout)
tc.reachTimeOut(idleTimeout, timeout)
return
}
@@ -96,14 +96,14 @@ func (a *Agent) startMaxExecTimeoutWatch(ctx context.Context, tc *taskContext, c
for {
select {
case <-ctx.Done():
- grip.Info("Exec timeout watch canceled")
+ grip.Info("Exec timeout watcher canceled.")
return
case <-ticker.C:
timeout := tc.getExecTimeout()
timeSinceTickerStarted := time.Since(timeTickerStarted)
if timeSinceTickerStarted > timeout {
- tc.logger.Execution().Errorf("Hit exec timeout (%s)", timeout)
+ tc.logger.Execution().Errorf("Hit exec timeout (%s).", timeout)
tc.reachTimeOut(execTimeout, timeout)
return
}
@@ -129,12 +129,12 @@ func (a *Agent) startEarlyTerminationWatcher(ctx context.Context, tc *taskContex
for {
select {
case <-ctx.Done():
- grip.Info("Early termination watcher canceled")
+ grip.Info("Early termination watcher canceled.")
return
case <-ticker.C:
if check() {
if tc != nil && tc.project != nil && tc.project.EarlyTermination != nil {
- tc.logger.Execution().Error(a.runCommands(ctx, tc, tc.project.EarlyTermination.List(), runCommandsOptions{}))
+ tc.logger.Execution().Error(a.runCommands(ctx, tc, tc.project.EarlyTermination.List(), runCommandsOptions{}, earlyTermBlock))
}
action()
if doneChan != nil {
diff --git a/agent/background_test.go b/agent/background_test.go
index 57373b30418..bfc6870caef 100644
--- a/agent/background_test.go
+++ b/agent/background_test.go
@@ -15,6 +15,7 @@ import (
"github.com/mongodb/grip/send"
"github.com/mongodb/jasper"
"github.com/stretchr/testify/suite"
+ "go.opentelemetry.io/otel"
)
type BackgroundSuite struct {
@@ -38,7 +39,8 @@ func (s *BackgroundSuite) SetupTest() {
StatusPort: 2286,
LogPrefix: evergreen.LocalLoggingOverride,
},
- comm: client.NewMock("url"),
+ comm: client.NewMock("url"),
+ tracer: otel.GetTracerProvider().Tracer("noop_tracer"),
}
s.a.jasper, err = jasper.NewSynchronizedManager(true)
s.Require().NoError(err)
diff --git a/agent/command.go b/agent/command.go
index d1a26aab2e4..918670b5df4 100644
--- a/agent/command.go
+++ b/agent/command.go
@@ -12,9 +12,20 @@ import (
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/utility"
"github.com/mongodb/grip"
- "github.com/mongodb/grip/message"
"github.com/mongodb/grip/recovery"
"github.com/pkg/errors"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/trace"
+)
+
+const (
+ commandsAttribute = "evergreen.command"
+)
+
+var (
+ commandNameAttribute = fmt.Sprintf("%s.command_name", commandsAttribute)
+ functionNameAttribute = fmt.Sprintf("%s.function_name", commandsAttribute)
)
type runCommandsOptions struct {
@@ -23,19 +34,18 @@ type runCommandsOptions struct {
}
func (a *Agent) runCommands(ctx context.Context, tc *taskContext, commands []model.PluginCommandConf,
- options runCommandsOptions) (err error) {
+ options runCommandsOptions, block string) (err error) {
var cmds []command.Command
defer func() { err = recovery.HandlePanicWithError(recover(), err, "run commands") }()
+ //here
for i, commandInfo := range commands {
- if ctx.Err() != nil {
- grip.Error("runCommands canceled")
- return errors.New("runCommands canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "canceled while running commands")
}
- cmds, err = command.Render(commandInfo, tc.taskConfig.Project)
+ cmds, err = command.Render(commandInfo, tc.taskConfig.Project, block)
if err != nil {
- tc.logger.Task().Errorf("Couldn't parse plugin command '%v': %v", commandInfo.Command, err)
- return err
+ return errors.Wrapf(err, "rendering command '%s'", commandInfo.Command)
}
if err = a.runCommandSet(ctx, tc, commandInfo, cmds, options, i+1, len(commands)); err != nil {
return errors.WithStack(err)
@@ -56,139 +66,150 @@ func (a *Agent) runCommandSet(ctx context.Context, tc *taskContext, commandInfo
} else {
logger, err = a.makeLoggerProducer(ctx, tc, commandInfo.Loggers, getFunctionName(commandInfo))
if err != nil {
- return errors.Wrap(err, "error making logger")
+ return errors.Wrap(err, "making command logger")
}
defer func() {
- grip.Error(logger.Close())
+ grip.Error(errors.Wrap(logger.Close(), "closing command logger"))
}()
}
+
+ if commandInfo.Function != "" {
+ var commandSetSpan trace.Span
+ ctx, commandSetSpan = a.tracer.Start(ctx, fmt.Sprintf("function: '%s'", commandInfo.Function), trace.WithAttributes(
+ attribute.String(functionNameAttribute, commandInfo.Function),
+ ))
+ defer commandSetSpan.End()
+ }
+
for idx, cmd := range cmds {
- if ctx.Err() != nil {
- grip.Error("runCommands canceled")
- return errors.New("runCommands canceled")
- }
- if cmd.DisplayName() == "" {
- grip.Critical(message.Fields{
- "message": "attempting to run an undefined command",
- "name": cmd.Name(),
- "type": cmd.Type(),
- "raw": fmt.Sprintf("%#v", cmd),
- "info": commandInfo,
- })
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "canceled while running command list")
}
-
cmd.SetJasperManager(a.jasper)
fullCommandName := getCommandName(commandInfo, cmd)
-
if !commandInfo.RunOnVariant(tc.taskConfig.BuildVariant.Name) {
- tc.logger.Task().Infof("Skipping command %s on variant %s (step %d of %d)",
+ tc.logger.Task().Infof("Skipping command %s on variant %s (step %d of %d).",
fullCommandName, tc.taskConfig.BuildVariant.Name, index, total)
continue
}
-
if len(cmds) == 1 {
- tc.logger.Task().Infof("Running command %s (step %d of %d)", fullCommandName, index, total)
+ tc.logger.Task().Infof("Running command %s (step %d of %d).", fullCommandName, index, total)
} else {
// for functions with more than one command
- tc.logger.Task().Infof("Running command %v (step %d.%d of %d)", fullCommandName, index, idx+1, total)
+ tc.logger.Task().Infof("Running command %s (step %d.%d of %d).", fullCommandName, index, idx+1, total)
}
- for key, val := range commandInfo.Vars {
- var newVal string
- newVal, err = tc.taskConfig.Expansions.ExpandString(val)
- if err != nil {
- return errors.Wrapf(err, "Can't expand '%v'", val)
- }
- tc.taskConfig.Expansions.Put(key, newVal)
+
+ ctx, commandSpan := a.tracer.Start(ctx, cmd.Name(), trace.WithAttributes(
+ attribute.String(commandNameAttribute, cmd.Name()),
+ ))
+ if err := a.runCommand(ctx, tc, logger, commandInfo, cmd, fullCommandName, options); err != nil {
+ commandSpan.SetStatus(codes.Error, "running command")
+ commandSpan.RecordError(err, trace.WithAttributes(tc.taskConfig.TaskAttributes()...))
+ commandSpan.End()
+ return errors.Wrap(err, "running command")
}
+ commandSpan.End()
+ }
+ return nil
+}
- if options.isTaskCommands {
- tc.setCurrentCommand(cmd)
- tc.setCurrentIdleTimeout(cmd)
- a.comm.UpdateLastMessageTime()
- } else {
- tc.setCurrentIdleTimeout(nil)
+func (a *Agent) runCommand(ctx context.Context, tc *taskContext, logger client.LoggerProducer, commandInfo model.PluginCommandConf,
+ cmd command.Command, fullCommandName string, options runCommandsOptions) error {
+
+ for key, val := range commandInfo.Vars {
+ var newVal string
+ newVal, err := tc.taskConfig.Expansions.ExpandString(val)
+ if err != nil {
+ return errors.Wrapf(err, "expanding '%s'", val)
}
+ tc.taskConfig.Expansions.Put(key, newVal)
+ }
- start := time.Now()
- // We have seen cases where calling exec.*Cmd.Wait() waits for too long if
- // the process has called subprocesses. It will wait until a subprocess
- // finishes, instead of returning immediately when the context is canceled.
- // We therefore check both if the context is cancelled and if Wait() has finished.
- cmdChan := make(chan error, 1)
- go func() {
- defer func() {
- // this channel will get read from twice even though we only send once, hence why it's buffered
- cmdChan <- recovery.HandlePanicWithError(recover(), nil,
- fmt.Sprintf("problem running command '%s'", cmd.Name()))
- }()
- cmdChan <- cmd.Execute(ctx, a.comm, logger, tc.taskConfig)
+ if options.isTaskCommands || options.failPreAndPost {
+ tc.setCurrentCommand(cmd)
+ tc.setCurrentIdleTimeout(cmd)
+ a.comm.UpdateLastMessageTime()
+ } else {
+ tc.setCurrentIdleTimeout(nil)
+ }
+
+ start := time.Now()
+ // We have seen cases where calling exec.*Cmd.Wait() waits for too long if
+ // the process has called subprocesses. It will wait until a subprocess
+ // finishes, instead of returning immediately when the context is canceled.
+ // We therefore check both if the context is cancelled and if Wait() has finished.
+ cmdChan := make(chan error, 1)
+ go func() {
+ defer func() {
+ // this channel will get read from twice even though we only send once, hence why it's buffered
+ cmdChan <- recovery.HandlePanicWithError(recover(), nil,
+ fmt.Sprintf("running command %s", fullCommandName))
}()
- select {
- case err = <-cmdChan:
- if err != nil {
- tc.logger.Task().Errorf("Command failed: %v", err)
- if options.isTaskCommands || options.failPreAndPost ||
- (cmd.Name() == "git.get_project" && tc.taskModel.Requester == evergreen.MergeTestRequester) {
- // any git.get_project in the commit queue should fail
- return errors.Wrap(err, "command failed")
- }
- }
- case <-ctx.Done():
- if ctx.Err() == context.DeadlineExceeded {
- tc.logger.Task().Errorf("Command stopped early, idle timeout duration of %d seconds has been reached: %s", int(tc.timeout.idleTimeoutDuration.Seconds()), ctx.Err())
- } else {
- tc.logger.Task().Errorf("Command stopped early: %s", ctx.Err())
+ cmdChan <- cmd.Execute(ctx, a.comm, logger, tc.taskConfig)
+ }()
+ select {
+ case err := <-cmdChan:
+ if err != nil {
+ tc.logger.Task().Errorf("Command %s failed: %s.", fullCommandName, err)
+ if options.isTaskCommands || options.failPreAndPost ||
+ (cmd.Name() == "git.get_project" && tc.taskModel.Requester == evergreen.MergeTestRequester) {
+ // any git.get_project in the commit queue should fail
+ return errors.Wrap(err, "command failed")
}
- return errors.Wrap(ctx.Err(), "Agent stopped early")
}
- tc.logger.Task().Infof("Finished %s in %s", fullCommandName, time.Since(start).String())
- if (options.isTaskCommands || options.failPreAndPost) && a.endTaskResp != nil && !a.endTaskResp.ShouldContinue {
- // only error if we're running a command that should fail, and we don't want to continue to run other tasks
- msg := fmt.Sprintf("task status has been set to '%s'; triggering end task", a.endTaskResp.Status)
- tc.logger.Task().Debug(msg)
- return errors.New(msg)
+ case <-ctx.Done():
+ if ctx.Err() == context.DeadlineExceeded {
+ tc.logger.Task().Errorf("Command %s stopped early because idle timeout duration of %d seconds has been reached.", fullCommandName, int(tc.timeout.idleTimeoutDuration.Seconds()))
+ } else {
+ tc.logger.Task().Errorf("Command %s stopped early: %s.", fullCommandName, ctx.Err())
}
+ return errors.Wrap(ctx.Err(), "agent stopped early")
+ }
+ tc.logger.Task().Infof("Finished command %s in %s.", fullCommandName, time.Since(start).String())
+ if (options.isTaskCommands || options.failPreAndPost) && a.endTaskResp != nil && !a.endTaskResp.ShouldContinue {
+ // only error if we're running a command that should fail, and we don't want to continue to run other tasks
+ return errors.Errorf("task status has been set to '%s'; triggering end task", a.endTaskResp.Status)
}
+
return nil
}
-// runTaskCommands runs all commands for the task currently assigned to the agent and
-// returns the task status
+// runTaskCommands runs all commands for the task currently assigned to the agent.
func (a *Agent) runTaskCommands(ctx context.Context, tc *taskContext) error {
+ ctx, span := a.tracer.Start(ctx, "task-commands")
+ defer span.End()
+
conf := tc.taskConfig
task := conf.Project.FindProjectTask(conf.Task.DisplayName)
if task == nil {
- tc.logger.Execution().Errorf("Can't find task: %v", conf.Task.DisplayName)
- return errors.New("unable to find task")
+ return errors.Errorf("unable to find task '%s' in project '%s'", conf.Task.DisplayName, conf.Task.Project)
}
- if ctx.Err() != nil {
- grip.Error("task canceled")
- return errors.New("task canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "canceled while running task commands")
}
tc.logger.Execution().Info("Running task commands.")
start := time.Now()
opts := runCommandsOptions{isTaskCommands: true}
- err := a.runCommands(ctx, tc, task.Commands, opts)
- tc.logger.Execution().Infof("Finished running task commands in %v.", time.Since(start).String())
+ err := a.runCommands(ctx, tc, task.Commands, opts, "")
+ tc.logger.Execution().Infof("Finished running task commands in %s.", time.Since(start).String())
if err != nil {
- tc.logger.Execution().Errorf("Task failed: %v", err)
- return errors.New("task failed")
+ return err
}
return nil
}
func getCommandName(commandInfo model.PluginCommandConf, cmd command.Command) string {
- commandName := cmd.Name()
+ commandName := fmt.Sprintf(`'%s'`, cmd.Name())
+ if commandInfo.DisplayName != "" {
+ commandName = fmt.Sprintf(`'%s' (%s)`, commandInfo.DisplayName, commandName)
+ }
if commandInfo.Function != "" {
- commandName = fmt.Sprintf(`'%s' in "%s"`, commandName, commandInfo.Function)
- } else if commandInfo.DisplayName != "" {
- commandName = fmt.Sprintf(`("%s") %s`, commandInfo.DisplayName, commandName)
- } else {
- commandName = fmt.Sprintf("'%s'", commandName)
+ commandName = fmt.Sprintf(`%s in function '%s'`, commandName, commandInfo.Function)
}
+
return commandName
}
diff --git a/agent/command/archive_auto_extract.go b/agent/command/archive_auto_extract.go
index 559ab4601ef..ddf2a79a963 100644
--- a/agent/command/archive_auto_extract.go
+++ b/agent/command/archive_auto_extract.go
@@ -28,7 +28,7 @@ func autoExtractFactory() Command { return &autoExtract{} }
func (e *autoExtract) Name() string { return "archive.auto_extract" }
func (e *autoExtract) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, e); err != nil {
- return errors.Wrapf(err, "error parsing '%s' params", e.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if len(e.ExcludeFiles) != 0 {
@@ -46,7 +46,7 @@ func (e *autoExtract) Execute(ctx context.Context,
client client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(e, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding params")
+ return errors.Wrap(err, "applying expansions")
}
// if the target is a relative path, join it to the working dir
@@ -64,11 +64,11 @@ func (e *autoExtract) Execute(ctx context.Context,
unzipper := archiver.MatchingFormat(e.ArchivePath)
if unzipper == nil {
- return errors.Errorf("could not detect archive format for '%s'", e.ArchivePath)
+ return errors.Errorf("could not detect archive format for archive '%s'", e.ArchivePath)
}
if err := unzipper.Open(e.ArchivePath, e.TargetDirectory); err != nil {
- return errors.Wrapf(err, "problem extracting archive '%s'", e.ArchivePath)
+ return errors.Wrapf(err, "extracting archive '%s'", e.ArchivePath)
}
return nil
diff --git a/agent/command/archive_auto_extract_test.go b/agent/command/archive_auto_extract_test.go
index f6e61b0ee54..87f5f6759c1 100644
--- a/agent/command/archive_auto_extract_test.go
+++ b/agent/command/archive_auto_extract_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -36,8 +35,7 @@ func TestAutoExtractSuite(t *testing.T) {
func (s *AutoExtractSuite) SetupTest() {
var err error
- s.targetLocation, err = ioutil.TempDir("", "auto-extract-suite")
- s.Require().NoError(err)
+ s.targetLocation = s.T().TempDir()
s.ctx, s.cancel = context.WithCancel(context.Background())
s.comm = client.NewMock("http://localhost.com")
@@ -51,7 +49,6 @@ func (s *AutoExtractSuite) SetupTest() {
func (s *AutoExtractSuite) TearDownTest() {
s.cancel()
- s.Require().NoError(os.RemoveAll(s.targetLocation))
}
func (s *AutoExtractSuite) TestNilArguments() {
diff --git a/agent/command/archive_tarball_create.go b/agent/command/archive_tarball_create.go
index 7faad654bbb..13ad9d04af0 100644
--- a/agent/command/archive_tarball_create.go
+++ b/agent/command/archive_tarball_create.go
@@ -2,6 +2,7 @@ package command
import (
"context"
+ "fmt"
"os"
"path/filepath"
"strings"
@@ -50,7 +51,7 @@ func (c *tarballCreate) Name() string { return "archive.targz_pack" }
// ParseParams reads in the given parameters for the command.
func (c *tarballCreate) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error parsing '%v' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Target == "" {
@@ -58,7 +59,7 @@ func (c *tarballCreate) ParseParams(params map[string]interface{}) error {
}
if c.SourceDir == "" {
- return errors.New("source_dir cannot be blank")
+ return errors.New("source directory cannot be blank")
}
if len(c.Include) == 0 {
@@ -73,7 +74,7 @@ func (c *tarballCreate) Execute(ctx context.Context,
client client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding params")
+ return errors.Wrap(err, "applying expansions")
}
// if the source dir is a relative path, join it to the working dir
@@ -90,12 +91,22 @@ func (c *tarballCreate) Execute(ctx context.Context,
filesArchived := -1
go func() {
defer func() {
- errChan <- recovery.HandlePanicWithError(recover(), nil,
- "making archive")
+ select {
+ case errChan <- recovery.HandlePanicWithError(recover(), nil, "making archive"):
+ return
+ case <-ctx.Done():
+ return
+ }
}()
var err error
filesArchived, err = c.makeArchive(ctx, logger.Execution())
- errChan <- errors.WithStack(err)
+ select {
+ case errChan <- errors.WithStack(err):
+ return
+ case <-ctx.Done():
+ logger.Task().Infof("Context canceled waiting for archive creation: %s.", ctx.Err())
+ return
+ }
}()
select {
@@ -105,7 +116,7 @@ func (c *tarballCreate) Execute(ctx context.Context,
if c.Attempt < maxRetries {
if strings.Contains(err.Error(), retryError) {
c.Attempt += 1
- logger.Execution().Infof("retrying targz pack command due to error: %s", err.Error())
+ logger.Execution().Infof("Retrying command '%s' due to error: %s.", c.Name(), err.Error())
return c.Execute(ctx, client, logger, conf)
}
@@ -115,13 +126,13 @@ func (c *tarballCreate) Execute(ctx context.Context,
if filesArchived == 0 {
deleteErr := os.Remove(c.Target)
if deleteErr != nil {
- logger.Execution().Infof("problem deleting empty archive: %s", deleteErr.Error())
+ logger.Execution().Infof("Problem deleting empty archive: %s.", deleteErr.Error())
}
}
return nil
case <-ctx.Done():
logger.Execution().Info(message.Fields{
- "message": "received signal to terminate execution of targz pack command",
+ "message": fmt.Sprintf("received signal to terminate execution of command '%s'", c.Name()),
"task_id": conf.Task.Id,
})
return nil
@@ -134,7 +145,7 @@ func (c *tarballCreate) Execute(ctx context.Context,
func (c *tarballCreate) makeArchive(ctx context.Context, logger grip.Journaler) (int, error) {
f, gz, tarWriter, err := agentutil.TarGzWriter(c.Target)
if err != nil {
- return -1, errors.Wrapf(err, "error opening target archive file %s", c.Target)
+ return -1, errors.Wrapf(err, "opening target archive file '%s'", c.Target)
}
defer func() {
logger.Error(tarWriter.Close())
diff --git a/agent/command/archive_tarball_create_test.go b/agent/command/archive_tarball_create_test.go
index 573d7ed9720..b54efcae91c 100644
--- a/agent/command/archive_tarball_create_test.go
+++ b/agent/command/archive_tarball_create_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -101,17 +100,13 @@ func TestTarGzCommandMakeArchive(t *testing.T) {
Convey("the correct files should be included and excluded", func() {
- target, err := ioutil.TempFile("", "target.tgz")
+ target, err := os.CreateTemp("", "target.tgz")
require.NoError(t, err)
defer func() {
assert.NoError(t, os.RemoveAll(target.Name()))
}()
require.NoError(t, target.Close())
- outputDir, err := ioutil.TempDir("", "archive_targz_output")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(outputDir))
- }()
+ outputDir := t.TempDir()
params := map[string]interface{}{
"target": target.Name(),
diff --git a/agent/command/archive_tarball_extract.go b/agent/command/archive_tarball_extract.go
index 2cf2fd4de1a..8b77dfc06cf 100644
--- a/agent/command/archive_tarball_extract.go
+++ b/agent/command/archive_tarball_extract.go
@@ -10,7 +10,6 @@ import (
agentutil "github.com/evergreen-ci/evergreen/agent/util"
"github.com/evergreen-ci/evergreen/util"
"github.com/mitchellh/mapstructure"
- "github.com/mongodb/grip/message"
"github.com/pkg/errors"
)
@@ -29,7 +28,7 @@ func tarballExtractFactory() Command { return &tarballExtract{} }
func (e *tarballExtract) Name() string { return "archive.targz_extract" }
func (e *tarballExtract) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, e); err != nil {
- return errors.Wrapf(err, "error parsing '%s' params", e.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if e.ArchivePath == "" {
@@ -43,7 +42,7 @@ func (e *tarballExtract) Execute(ctx context.Context,
client client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(e, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding params")
+ return errors.Wrap(err, "applying expansions")
}
if e.TargetDirectory == "" {
@@ -65,16 +64,15 @@ func (e *tarballExtract) Execute(ctx context.Context,
archive, err := os.Open(e.ArchivePath)
if err != nil {
- return errors.Wrapf(err, "problem reading file '%s'", e.ArchivePath)
+ return errors.Wrapf(err, "reading file '%s'", e.ArchivePath)
}
defer func() {
- logger.Task().Notice(message.WrapError(archive.Close(),
- message.NewFormatted("problem closing '%s'", e.ArchivePath)))
+ logger.Task().Notice(errors.Wrapf(archive.Close(), "closing file '%s'", e.ArchivePath))
}()
if err := agentutil.ExtractTarball(ctx, archive, e.TargetDirectory, e.ExcludeFiles); err != nil {
- return errors.Wrapf(err, "problem extracting '%s'", e.ArchivePath)
+ return errors.Wrapf(err, "extracting file '%s'", e.ArchivePath)
}
return nil
diff --git a/agent/command/archive_tarball_extract_test.go b/agent/command/archive_tarball_extract_test.go
index 7dd0ac86eb3..7aff3976587 100644
--- a/agent/command/archive_tarball_extract_test.go
+++ b/agent/command/archive_tarball_extract_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -36,8 +35,7 @@ func TestTarballExtractSuite(t *testing.T) {
func (s *TarballExtractSuite) SetupTest() {
var err error
- s.targetLocation, err = ioutil.TempDir("", "tarball-extract-suite")
- s.Require().NoError(err)
+ s.targetLocation = s.T().TempDir()
s.ctx, s.cancel = context.WithCancel(context.Background())
s.comm = client.NewMock("http://localhost.com")
@@ -51,7 +49,6 @@ func (s *TarballExtractSuite) SetupTest() {
func (s *TarballExtractSuite) TearDownTest() {
s.cancel()
- s.Require().NoError(os.RemoveAll(s.targetLocation))
}
func (s *TarballExtractSuite) TestNilArguments() {
diff --git a/agent/command/archive_zip_create.go b/agent/command/archive_zip_create.go
index 3882cfced33..f64dab67965 100644
--- a/agent/command/archive_zip_create.go
+++ b/agent/command/archive_zip_create.go
@@ -37,7 +37,7 @@ func (c *zipArchiveCreate) Name() string { return "archive.zip_pack" }
func (c *zipArchiveCreate) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error parsing '%v' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Target == "" {
@@ -45,7 +45,7 @@ func (c *zipArchiveCreate) ParseParams(params map[string]interface{}) error {
}
if c.SourceDir == "" {
- return errors.New("source_dir cannot be blank")
+ return errors.New("source directory cannot be blank")
}
if len(c.Include) == 0 {
@@ -59,7 +59,7 @@ func (c *zipArchiveCreate) Execute(ctx context.Context,
client client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding params")
+ return errors.Wrap(err, "applying expansions")
}
// if the source dir is a relative path, join it to the working dir
@@ -74,7 +74,7 @@ func (c *zipArchiveCreate) Execute(ctx context.Context,
files, err := agentutil.FindContentsToArchive(ctx, c.SourceDir, c.Include, c.ExcludeFiles)
if err != nil {
- return errors.Wrap(err, "problem finding files to archive")
+ return errors.Wrap(err, "finding files to archive")
}
filenames := make([]string, len(files))
@@ -83,7 +83,7 @@ func (c *zipArchiveCreate) Execute(ctx context.Context,
}
if err := archiver.Zip.Make(c.Target, filenames); err != nil {
- return errors.Wrapf(err, "problem constructing zip archive '%s'", c.Target)
+ return errors.Wrapf(err, "constructing zip archive '%s'", c.Target)
}
logger.Task().Info(message.Fields{
diff --git a/agent/command/archive_zip_create_test.go b/agent/command/archive_zip_create_test.go
index b35e0d7a8c5..74f6dc98cbb 100644
--- a/agent/command/archive_zip_create_test.go
+++ b/agent/command/archive_zip_create_test.go
@@ -2,8 +2,6 @@ package command
import (
"context"
- "io/ioutil"
- "os"
"path/filepath"
"testing"
@@ -36,8 +34,7 @@ func TestZipCreateSuite(t *testing.T) {
func (s *ZipCreateSuite) SetupTest() {
var err error
- s.targetLocation, err = ioutil.TempDir("", "zip-create-suite")
- s.Require().NoError(err)
+ s.targetLocation = s.T().TempDir()
s.ctx, s.cancel = context.WithCancel(context.Background())
s.comm = client.NewMock("http://localhost.com")
@@ -51,7 +48,6 @@ func (s *ZipCreateSuite) SetupTest() {
func (s *ZipCreateSuite) TearDownTest() {
s.cancel()
- s.Require().NoError(os.RemoveAll(s.targetLocation))
}
func (s *ZipCreateSuite) TestNilArguments() {
diff --git a/agent/command/archive_zip_extract.go b/agent/command/archive_zip_extract.go
index 92637564f3f..1b4fe2981c3 100644
--- a/agent/command/archive_zip_extract.go
+++ b/agent/command/archive_zip_extract.go
@@ -28,7 +28,7 @@ func zipExtractFactory() Command { return &zipExtract{} }
func (e *zipExtract) Name() string { return "archive.zip_extract" }
func (e *zipExtract) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, e); err != nil {
- return errors.Wrapf(err, "error parsing '%s' params", e.Name())
+ return errors.Wrapf(err, "decoding mapstructure params")
}
if len(e.ExcludeFiles) != 0 {
@@ -46,7 +46,7 @@ func (e *zipExtract) Execute(ctx context.Context,
client client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(e, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding params")
+ return errors.Wrap(err, "applying expansions")
}
// if the target is a relative path, join it to the working dir
@@ -63,7 +63,7 @@ func (e *zipExtract) Execute(ctx context.Context,
}
if err := archiver.Zip.Open(e.ArchivePath, e.TargetDirectory); err != nil {
- return errors.Wrapf(err, "problem extracting archive '%s'", e.ArchivePath)
+ return errors.Wrapf(err, "extracting archive '%s' to directory '%s'", e.ArchivePath, e.TargetDirectory)
}
return nil
diff --git a/agent/command/archive_zip_extract_test.go b/agent/command/archive_zip_extract_test.go
index 52527c8cebe..3c49cf98460 100644
--- a/agent/command/archive_zip_extract_test.go
+++ b/agent/command/archive_zip_extract_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -36,8 +35,7 @@ func TestZipExtractSuite(t *testing.T) {
func (s *ZipExtractSuite) SetupTest() {
var err error
- s.targetLocation, err = ioutil.TempDir("", "zip-extract-suite")
- s.Require().NoError(err)
+ s.targetLocation = s.T().TempDir()
s.ctx, s.cancel = context.WithCancel(context.Background())
s.comm = client.NewMock("http://localhost.com")
@@ -51,7 +49,6 @@ func (s *ZipExtractSuite) SetupTest() {
func (s *ZipExtractSuite) TearDownTest() {
s.cancel()
- s.Require().NoError(os.RemoveAll(s.targetLocation))
}
func (s *ZipExtractSuite) TestNilArguments() {
diff --git a/agent/command/assume_ec2_role.go b/agent/command/assume_ec2_role.go
index 9acbe88f72e..0dfde5e4496 100644
--- a/agent/command/assume_ec2_role.go
+++ b/agent/command/assume_ec2_role.go
@@ -2,6 +2,8 @@ package command
import (
"context"
+ "fmt"
+ "strconv"
"time"
"github.com/aws/aws-sdk-go/aws"
@@ -29,9 +31,6 @@ type ec2AssumeRole struct {
// Required.
RoleARN string `mapstructure:"role_arn" plugin:"expand"`
- // A unique identifier that might be required when you assume a role in another account.
- ExternalId string `mapstructure:"external_id" plugin:"expand"`
-
// An IAM policy in JSON format that you want to use as an inline session policy.
Policy string `mapstructure:"policy" plugin:"expand"`
@@ -47,7 +46,7 @@ func (r *ec2AssumeRole) Name() string { return "ec2.assume_role" }
func (r *ec2AssumeRole) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, r); err != nil {
- return errors.Wrapf(err, "error parsing '%s' params", r.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
return r.validate()
@@ -71,7 +70,7 @@ func (r *ec2AssumeRole) validate() error {
func (r *ec2AssumeRole) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(r, conf.Expansions); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "applying expansions")
}
// Re-validate the command here, in case an expansion is not defined.
if err := r.validate(); err != nil {
@@ -87,7 +86,7 @@ func (r *ec2AssumeRole) Execute(ctx context.Context,
// Error if key or secret are blank
if key == "" || secret == "" {
- return errors.New("AWS ID and Secret could not be retrieved")
+ return errors.New("AWS key and secret must not be empty")
}
defaultCreds := credentials.NewStaticCredentialsFromCreds(credentials.Value{
@@ -100,10 +99,9 @@ func (r *ec2AssumeRole) Execute(ctx context.Context,
}))
creds := stscreds.NewCredentials(session1, r.RoleARN, func(arp *stscreds.AssumeRoleProvider) {
- arp.RoleSessionName = time.Now().String()
- if r.ExternalId != "" {
- arp.ExternalID = utility.ToStringPtr(r.ExternalId)
- }
+ arp.RoleSessionName = strconv.Itoa(int(time.Now().Unix()))
+ // External ID formatted as requested by build.
+ arp.ExternalID = utility.ToStringPtr(fmt.Sprintf("%s-%s", conf.ProjectRef.Id, conf.Task.Requester))
if r.Policy != "" {
arp.Policy = utility.ToStringPtr(r.Policy)
}
diff --git a/agent/command/attach_artifacts.go b/agent/command/attach_artifacts.go
index 78498a64967..33199dc5ec0 100644
--- a/agent/command/attach_artifacts.go
+++ b/agent/command/attach_artifacts.go
@@ -36,12 +36,11 @@ func (c *attachArtifacts) Name() string { return evergreen.AttachArtifactsComman
func (c *attachArtifacts) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%s' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if len(c.Files) == 0 {
- return errors.Errorf("error validating params: must specify at least one "+
- "file pattern to parse: '%+v'", params)
+ return errors.Errorf("must specify at least one file pattern to parse")
}
return nil
}
@@ -52,9 +51,7 @@ func (c *attachArtifacts) Execute(ctx context.Context,
var err error
if err = util.ExpandValues(c, conf.Expansions); err != nil {
- err = errors.Wrap(err, "error expanding params")
- logger.Task().Error(err)
- return err
+ return errors.Wrap(err, "applying expansions")
}
workDir := getJoinedWithWorkDir(conf, c.Prefix)
@@ -64,15 +61,13 @@ func (c *attachArtifacts) Execute(ctx context.Context,
Include: include,
}
if c.Files, err = b.Build(); err != nil {
- err = errors.Wrap(err, "problem building wildcard paths")
- logger.Task().Error(err)
- return err
+ return errors.Wrap(err, "building wildcard paths")
}
if len(c.Files) == 0 {
err = errors.New("expanded file specification had no items")
- logger.Task().Error(err)
if c.Optional {
+ logger.Task().Error(err)
return nil
}
return err
@@ -101,17 +96,15 @@ func (c *attachArtifacts) Execute(ctx context.Context,
files = append(files, segment...)
}
if catcher.HasErrors() {
- err = errors.Wrap(catcher.Resolve(), "encountered errors reading artifact json files")
- logger.Task().Error(err)
- return err
+ return errors.Wrap(catcher.Resolve(), "reading artifact JSON files")
}
if missedSegments > 0 {
- logger.Task().Noticef("encountered %d empty file definitions", missedSegments)
+ logger.Task().Noticef("Encountered %d empty file definitions.", missedSegments)
}
if len(files) == 0 {
- logger.Task().Warning("no artifacts defined")
+ logger.Task().Warning("No artifacts defined.")
return nil
}
@@ -120,7 +113,7 @@ func (c *attachArtifacts) Execute(ctx context.Context,
return errors.Wrap(err, "attach artifacts failed")
}
- logger.Task().Infof("'%s' attached %d resources to task", c.Name(), len(files))
+ logger.Task().Infof("'%s' attached %d resources to task.", c.Name(), len(files))
return nil
}
@@ -135,14 +128,14 @@ func readArtifactsFile(wd, fn string) ([]*artifact.File, error) {
file, err := os.Open(fn)
if err != nil {
- return nil, errors.Wrapf(err, "problem opening file '%s'", fn)
+ return nil, errors.Wrapf(err, "opening file '%s'", fn)
}
defer file.Close()
out := []*artifact.File{}
if err = utility.ReadJSON(file, &out); err != nil {
- return nil, errors.Wrapf(err, "problem reading JSON from file '%s'", fn)
+ return nil, errors.Wrapf(err, "reading JSON from file '%s'", fn)
}
return out, nil
diff --git a/agent/command/attach_artifacts_test.go b/agent/command/attach_artifacts_test.go
index db6736d9b83..bca7f85f250 100644
--- a/agent/command/attach_artifacts_test.go
+++ b/agent/command/attach_artifacts_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -34,9 +33,7 @@ func TestArtifactsSuite(t *testing.T) {
}
func (s *ArtifactsSuite) SetupSuite() {
- var err error
- s.tmpdir, err = ioutil.TempDir("", "evergreen.command.attach_artifacts.test")
- s.Require().NoError(err)
+ s.tmpdir = s.T().TempDir()
path := filepath.Join(s.tmpdir, "example.json")
s.NoError(utility.WriteJSONFile(path,
@@ -47,14 +44,10 @@ func (s *ArtifactsSuite) SetupSuite() {
},
}))
- _, err = os.Stat(path)
+ _, err := os.Stat(path)
s.Require().False(os.IsNotExist(err))
}
-func (s *ArtifactsSuite) TearDownSuite() {
- s.Require().NoError(os.RemoveAll(s.tmpdir))
-}
-
func (s *ArtifactsSuite) SetupTest() {
var err error
s.ctx, s.cancel = context.WithCancel(context.Background())
@@ -143,13 +136,11 @@ func (s *ArtifactsSuite) TestCommandParsesFile() {
}
func (s *ArtifactsSuite) TestPrefixectoryEmptySubDir() {
- dir, err := ioutil.TempDir("", "artifact_test")
- defer os.RemoveAll(dir)
- s.Require().NoError(err)
- err = ioutil.WriteFile(filepath.Join(dir, "foo"), []byte("[{}]"), 0644)
+ dir := s.T().TempDir()
+ err := os.WriteFile(filepath.Join(dir, "foo"), []byte("[{}]"), 0644)
s.Require().NoError(err)
s.Require().NoError(os.Mkdir(filepath.Join(dir, "subDir"), 0755))
- err = ioutil.WriteFile(filepath.Join(dir, "subDir", "bar"), []byte("[{}]"), 0644)
+ err = os.WriteFile(filepath.Join(dir, "subDir", "bar"), []byte("[{}]"), 0644)
s.Require().NoError(err)
s.conf.WorkDir = dir
s.cmd.Files = []string{"*"}
@@ -158,13 +149,11 @@ func (s *ArtifactsSuite) TestPrefixectoryEmptySubDir() {
}
func (s *ArtifactsSuite) TestPrefixectoryWithSubDir() {
- dir, err := ioutil.TempDir("", "artifact_test")
- defer os.RemoveAll(dir)
- s.Require().NoError(err)
- err = ioutil.WriteFile(filepath.Join(dir, "foo"), []byte("[{}]"), 0644)
+ dir := s.T().TempDir()
+ err := os.WriteFile(filepath.Join(dir, "foo"), []byte("[{}]"), 0644)
s.Require().NoError(err)
s.Require().NoError(os.Mkdir(filepath.Join(dir, "subDir"), 0755))
- err = ioutil.WriteFile(filepath.Join(dir, "subDir", "bar"), []byte("[{}]"), 0644)
+ err = os.WriteFile(filepath.Join(dir, "subDir", "bar"), []byte("[{}]"), 0644)
s.Require().NoError(err)
s.conf.WorkDir = dir
s.cmd.Files = []string{"*"}
diff --git a/agent/command/command_test.go b/agent/command/command_test.go
index a0029e4721f..a2e6549ee47 100644
--- a/agent/command/command_test.go
+++ b/agent/command/command_test.go
@@ -1,7 +1,7 @@
package command
import (
- "io/ioutil"
+ "os"
"testing"
"github.com/evergreen-ci/evergreen"
@@ -12,8 +12,8 @@ import (
func setupTestPatchData(apiData *modelutil.TestModelData, patchPath string, t *testing.T) error {
if patchPath != "" {
- modulePatchContent, err := ioutil.ReadFile(patchPath)
- require.NoError(t, err, "failed to read test module patch file")
+ modulePatchContent, err := os.ReadFile(patchPath)
+ require.NoError(t, err)
patch := &patch.Patch{
Status: evergreen.PatchCreated,
@@ -27,7 +27,7 @@ func setupTestPatchData(apiData *modelutil.TestModelData, patchPath string, t *t
},
}
- require.NoError(t, patch.Insert(), "failed to insert patch")
+ require.NoError(t, patch.Insert())
}
diff --git a/agent/command/deprecated.go b/agent/command/deprecated.go
index 6aacef40495..8d3f40d8594 100644
--- a/agent/command/deprecated.go
+++ b/agent/command/deprecated.go
@@ -3,6 +3,7 @@ package command
import (
"context"
+ "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
)
@@ -56,3 +57,15 @@ func (cc *shellTrack) Execute(ctx context.Context,
logger.Execution().Warning("shell.track is deprecated. Process tracking is now enabled by default.")
return nil
}
+
+type manifestLoad struct{ base }
+
+func manifestLoadFactory() Command { return &manifestLoad{} }
+func (c *manifestLoad) Name() string { return evergreen.ManifestLoadCommandName }
+func (c *manifestLoad) ParseParams(params map[string]interface{}) error { return nil }
+func (c *manifestLoad) Execute(ctx context.Context,
+ comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
+
+ logger.Execution().Warningf("%s is deprecated. Manifest load is now called automatically in git.get_project.", evergreen.ManifestLoadCommandName)
+ return nil
+}
diff --git a/agent/command/downstream_expansions_set.go b/agent/command/downstream_expansions_set.go
index ac438978171..454af82af6c 100644
--- a/agent/command/downstream_expansions_set.go
+++ b/agent/command/downstream_expansions_set.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"github.com/evergreen-ci/evergreen"
@@ -11,7 +10,7 @@ import (
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
- yaml "gopkg.in/yaml.v3"
+ "gopkg.in/yaml.v3"
)
// setExpansions takes a file of key value pairs and
@@ -34,7 +33,7 @@ func (c *setDownstream) Name() string { return "downstream_expansions.set" }
func (c *setDownstream) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return errors.Wrapf(err, "error parsing '%v' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.YamlFile == "" {
@@ -68,7 +67,7 @@ func (c *setDownstream) Execute(ctx context.Context,
if err != nil {
return err
}
- logger.Task().Infof("Saving downstream parameters to patch with keys from file: %s", c.YamlFile)
+ logger.Task().Infof("Saving downstream parameters to patch with keys from file '%s'.", c.YamlFile)
if len(c.downstreamParams) == 0 {
return nil
@@ -87,7 +86,7 @@ func (c *setDownstream) Execute(ctx context.Context,
}
func (c *setDownstream) ParseFromFile(filename string) error {
- filedata, err := ioutil.ReadFile(filename)
+ filedata, err := os.ReadFile(filename)
if err != nil {
return err
}
diff --git a/agent/command/exec.go b/agent/command/exec.go
index 953a205fb32..f62722ef1b4 100644
--- a/agent/command/exec.go
+++ b/agent/command/exec.go
@@ -84,20 +84,20 @@ func (c *subprocessExec) Name() string { return "subprocess.exec" }
func (c *subprocessExec) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return errors.Wrapf(err, "error decoding %s params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Command != "" {
if c.Binary != "" || len(c.Args) > 0 {
- return errors.New("must specify command as either arguments or a command string but not both")
+ return errors.New("must specify command as either binary and arguments, or a command string, but not both")
}
args, err := shlex.Split(c.Command)
if err != nil {
- return errors.Wrapf(err, "problem parsing %s command", c.Name())
+ return errors.Wrapf(err, "parsing command using shell lexing rules")
}
if len(args) == 0 {
- return errors.Errorf("no arguments for command %s", c.Name())
+ return errors.Errorf("command could not be split using shell lexing rules")
}
c.Binary = args[0]
@@ -112,7 +112,7 @@ func (c *subprocessExec) ParseParams(params map[string]interface{}) error {
}
if c.IgnoreStandardOutput && c.RedirectStandardErrorToOutput {
- return errors.New("cannot ignore standard out, and redirect standard error to it")
+ return errors.New("cannot both ignore standard output and redirect standard error to it")
}
if c.Env == nil {
@@ -127,19 +127,19 @@ func (c *subprocessExec) doExpansions(exp *util.Expansions) error {
catcher := grip.NewBasicCatcher()
c.WorkingDir, err = exp.ExpandString(c.WorkingDir)
- catcher.Add(err)
+ catcher.Wrap(err, "expanding working directory")
c.Binary, err = exp.ExpandString(c.Binary)
- catcher.Add(err)
+ catcher.Wrap(err, "expanding binary")
for idx := range c.Args {
c.Args[idx], err = exp.ExpandString(c.Args[idx])
- catcher.Add(err)
+ catcher.Wrap(err, "expanding args")
}
for k, v := range c.Env {
c.Env[k], err = exp.ExpandString(v)
- catcher.Add(err)
+ catcher.Wrap(err, "expanding environment variables")
}
if len(c.Path) > 0 {
@@ -153,7 +153,7 @@ func (c *subprocessExec) doExpansions(exp *util.Expansions) error {
c.Env["PATH"] = strings.Join(path, string(filepath.ListSeparator))
}
- return errors.Wrap(catcher.Resolve(), "problem expanding strings")
+ return errors.Wrap(catcher.Resolve(), "expanding strings")
}
type modifyEnvOptions struct {
@@ -228,7 +228,7 @@ func (c *subprocessExec) getProc(ctx context.Context, taskID string, logger clie
if cancel != nil {
grip.Warning(message.WrapError(proc.RegisterTrigger(lctx, func(info jasper.ProcessInfo) {
cancel()
- }), "problem registering cancellation for process"))
+ }), "registering canceller for process"))
}
pid := proc.Info(ctx).PID
@@ -236,9 +236,9 @@ func (c *subprocessExec) getProc(ctx context.Context, taskID string, logger clie
agentutil.TrackProcess(taskID, pid, logger.System())
if c.Background {
- logger.Execution().Debugf("running command in the background [pid=%d]", pid)
+ logger.Execution().Debugf("Running process in the background with pid %d.", pid)
} else {
- logger.Execution().Infof("started process with pid '%d'", pid)
+ logger.Execution().Infof("Started process with pid %d.", pid)
}
return proc, nil
@@ -276,8 +276,7 @@ func (c *subprocessExec) Execute(ctx context.Context, comm client.Communicator,
var err error
if err = c.doExpansions(conf.Expansions); err != nil {
- logger.Execution().Error("problem expanding command values")
- return errors.WithStack(err)
+ return errors.Wrap(err, "expanding command parameters")
}
logger.Execution().WarningWhen(
@@ -289,13 +288,12 @@ func (c *subprocessExec) Execute(ctx context.Context, comm client.Communicator,
})
c.WorkingDir, err = conf.GetWorkingDirectory(c.WorkingDir)
if err != nil {
- logger.Execution().Warning(err.Error())
- return errors.WithStack(err)
+ return errors.Wrap(err, "getting working directory")
}
taskTmpDir, err := conf.GetWorkingDirectory("tmp")
if err != nil {
- logger.Execution().Notice(err.Error())
+ logger.Execution().Notice(errors.Wrap(err, "getting temporary directory"))
}
var exp util.Expansions
@@ -327,12 +325,12 @@ func (c *subprocessExec) Execute(ctx context.Context, comm client.Communicator,
err = errors.WithStack(c.runCommand(ctx, conf.Task.Id, c.getProc(ctx, conf.Task.Id, logger), logger))
- if ctx.Err() != nil {
- logger.System().Debug("dumping running processes")
+ if ctxErr := ctx.Err(); ctxErr != nil {
+ logger.System().Debugf("Canceled command '%s', dumping running processes.", c.Name())
logger.System().Debug(message.CollectAllProcesses())
logger.Execution().Notice(err)
- return errors.Errorf("%s aborted", c.Name())
+ return errors.Wrapf(ctxErr, "canceled while running command '%s'", c.Name())
}
return err
@@ -340,7 +338,7 @@ func (c *subprocessExec) Execute(ctx context.Context, comm client.Communicator,
func (c *subprocessExec) runCommand(ctx context.Context, taskID string, cmd *jasper.Command, logger client.LoggerProducer) error {
if c.Silent {
- logger.Execution().Info("executing command in silent mode")
+ logger.Execution().Info("Executing command in silent mode.")
}
err := cmd.Run(ctx)
@@ -350,14 +348,8 @@ func (c *subprocessExec) runCommand(ctx context.Context, taskID string, cmd *jas
}
}
- if c.ContinueOnError {
- logger.Execution().Notice(message.WrapError(err, message.Fields{
- "task": taskID,
- "binary": c.Binary,
- "background": c.Background,
- "silent": c.Silent,
- "continue": c.ContinueOnError,
- }))
+ if c.ContinueOnError && err != nil {
+ logger.Execution().Noticef("Script errored, but continue on error is set - continuing task execution. Error: %s.", err)
return nil
}
diff --git a/agent/command/exec_test.go b/agent/command/exec_test.go
index aaa12ab82cf..a8e4a541ae7 100644
--- a/agent/command/exec_test.go
+++ b/agent/command/exec_test.go
@@ -17,6 +17,7 @@ import (
"github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
"github.com/mongodb/jasper"
+ "github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
@@ -249,7 +250,7 @@ func (s *execCmdSuite) TestCommandIntegrationFailureExpansion() {
s.NoError(cmd.ParseParams(map[string]interface{}{}))
err := cmd.Execute(s.ctx, s.comm, s.logger, s.conf)
if s.Error(err) {
- s.Contains(err.Error(), "problem expanding")
+ s.Contains(err.Error(), "expanding")
}
}
@@ -276,7 +277,7 @@ func (s *execCmdSuite) TestExecuteErrorsIfCommandAborts() {
s.NoError(cmd.ParseParams(map[string]interface{}{}))
err := cmd.Execute(s.ctx, s.comm, s.logger, s.conf)
if s.Error(err) {
- s.Contains(err.Error(), "aborted")
+ s.True(utility.IsContextError(errors.Cause(err)))
}
}
diff --git a/agent/command/expansion_test.go b/agent/command/expansion_test.go
index b1138278a89..90fd0ac97ab 100644
--- a/agent/command/expansion_test.go
+++ b/agent/command/expansion_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"testing"
@@ -93,21 +92,21 @@ func TestExpansionWriter(t *testing.T) {
"password": true,
},
}
- f, err := ioutil.TempFile("", "TestExpansionWriter")
+ f, err := os.CreateTemp("", t.Name())
require.NoError(err)
defer os.Remove(f.Name())
writer := &expansionsWriter{File: f.Name()}
err = writer.Execute(ctx, comm, logger, tc)
assert.NoError(err)
- out, err := ioutil.ReadFile(f.Name())
+ out, err := os.ReadFile(f.Name())
assert.NoError(err)
assert.Equal("baz: qux\nfoo: bar\n", string(out))
writer = &expansionsWriter{File: f.Name(), Redacted: true}
err = writer.Execute(ctx, comm, logger, tc)
assert.NoError(err)
- out, err = ioutil.ReadFile(f.Name())
+ out, err = os.ReadFile(f.Name())
assert.NoError(err)
assert.Equal("baz: qux\nfoo: bar\npassword: hunter2\n", string(out))
}
diff --git a/agent/command/expansion_update.go b/agent/command/expansion_update.go
index 42c9ed47bc1..9fe6561fcb4 100644
--- a/agent/command/expansion_update.go
+++ b/agent/command/expansion_update.go
@@ -48,13 +48,12 @@ func (c *update) Name() string { return "expansions.update" }
func (c *update) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return err
+ return errors.Wrap(err, "decoding mapstructure params")
}
- for _, item := range c.Updates {
+ for i, item := range c.Updates {
if item.Key == "" {
- return errors.Errorf("error parsing '%v' params: key must not be "+
- "a blank string", c.Name())
+ return errors.Errorf("expansion key at index %d must not be a blank string", i)
}
}
@@ -63,8 +62,8 @@ func (c *update) ParseParams(params map[string]interface{}) error {
func (c *update) ExecuteUpdates(ctx context.Context, conf *internal.TaskConfig) error {
for _, update := range c.Updates {
- if ctx.Err() != nil {
- return errors.New("operation aborted")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "operation aborted")
}
if update.Concat == "" {
@@ -114,7 +113,7 @@ func (c *update) Execute(ctx context.Context,
return errors.Errorf("file '%s' does not exist", filename)
}
- logger.Task().Infof("Updating expansions with keys from file: %s", filename)
+ logger.Task().Infof("Updating expansions with keys from file '%s'.", filename)
err := conf.Expansions.UpdateFromYaml(filename)
if err != nil {
return errors.WithStack(err)
diff --git a/agent/command/expansion_write.go b/agent/command/expansion_write.go
index b992a1949c2..a8d0ae1a6b8 100644
--- a/agent/command/expansion_write.go
+++ b/agent/command/expansion_write.go
@@ -2,7 +2,7 @@ package command
import (
"context"
- "io/ioutil"
+ "os"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
@@ -10,7 +10,7 @@ import (
"github.com/evergreen-ci/utility"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
- yaml "gopkg.in/yaml.v3"
+ "gopkg.in/yaml.v3"
)
var (
@@ -35,7 +35,7 @@ func (c *expansionsWriter) Name() string { return "expansions.write" }
func (c *expansionsWriter) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return errors.Wrap(err, "couldn't decode params")
+ return errors.Wrap(err, "decoding mapstructure params")
}
return nil
@@ -57,12 +57,12 @@ func (c *expansionsWriter) Execute(ctx context.Context,
}
out, err := yaml.Marshal(expansions)
if err != nil {
- return errors.Wrap(err, "error marshaling expansions")
+ return errors.Wrap(err, "marshalling expansions")
}
fn := getJoinedWithWorkDir(conf, c.File)
- if err := ioutil.WriteFile(fn, out, 0600); err != nil {
- return errors.Wrapf(err, "error writing expansions to file (%s)", fn)
+ if err := os.WriteFile(fn, out, 0600); err != nil {
+ return errors.Wrapf(err, "writing expansions to file '%s'", fn)
}
- logger.Task().Infof("expansions written to file (%s)", fn)
+ logger.Task().Infof("Expansions written to file '%s'.", fn)
return nil
}
diff --git a/agent/command/generate.go b/agent/command/generate.go
index e8fee6f1610..4f1ce589908 100644
--- a/agent/command/generate.go
+++ b/agent/command/generate.go
@@ -3,7 +3,7 @@ package command
import (
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"os"
"strings"
"time"
@@ -33,10 +33,10 @@ func (c *generateTask) Name() string { return "generate.tasks" }
func (c *generateTask) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "Error decoding %s params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if len(c.Files) == 0 {
- return errors.Errorf("Must provide at least 1 file to '%s'", c.Name())
+ return errors.Errorf("must provide at least 1 file containing task generation definitions")
}
return nil
}
@@ -44,7 +44,7 @@ func (c *generateTask) ParseParams(params map[string]interface{}) error {
func (c *generateTask) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
var err error
if err = util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding params")
+ return errors.Wrap(err, "applying expansions")
}
include := utility.NewGitIgnoreFileMatcher(conf.WorkDir, c.Files...)
@@ -53,23 +53,23 @@ func (c *generateTask) Execute(ctx context.Context, comm client.Communicator, lo
Include: include,
}
if c.Files, err = b.Build(); err != nil {
- return errors.Wrap(err, "problem building wildcard paths")
+ return errors.Wrap(err, "building wildcard paths")
}
if len(c.Files) == 0 {
if c.Optional {
- logger.Task().Info("No files found and optional is true, skipping generate.tasks")
+ logger.Task().Infof("No files found and optional is true, skipping command '%s'.", c.Name())
return nil
}
- return errors.New("No files found for generate.tasks")
+ return errors.Errorf("no files found for command '%s'", c.Name())
}
catcher := grip.NewBasicCatcher()
td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
var jsonBytes [][]byte
for _, fn := range c.Files {
- if ctx.Err() != nil {
- catcher.Add(ctx.Err())
+ if err := ctx.Err(); err != nil {
+ catcher.Wrapf(ctx.Err(), "cancelled while processing file '%s'", fn)
break
}
var data []byte
@@ -87,14 +87,14 @@ func (c *generateTask) Execute(ctx context.Context, comm client.Communicator, lo
var post []json.RawMessage
post, err = makeJsonOfAllFiles(jsonBytes)
if err != nil {
- return errors.Wrap(err, "problem parsing JSON")
+ return errors.Wrap(err, "parsing JSON")
}
if err = comm.GenerateTasks(ctx, td, post); err != nil {
if strings.Contains(err.Error(), evergreen.TasksAlreadyGeneratedError) {
logger.Task().Info("Tasks have already been generated, nooping.")
return nil
}
- return errors.Wrap(err, "Problem posting task data")
+ return errors.Wrap(err, "posting task data")
}
const (
@@ -108,25 +108,16 @@ func (c *generateTask) Execute(ctx context.Context, comm client.Communicator, lo
func() (bool, error) {
generateStatus, err := comm.GenerateTasksPoll(ctx, td)
if err != nil {
- return true, err
+ return false, err
}
var generateErr error
if generateStatus.Error != "" {
generateErr = errors.New(generateStatus.Error)
- } else if len(generateStatus.Errors) > 0 {
- generateErr = errors.New(strings.Join(generateStatus.Errors, ", "))
}
- if generateStatus.ShouldExit {
- return false, generateErr
- }
if generateErr != nil {
- // if the error isn't related to saving the generated task, log it but still retry in case of race condition
- if !strings.Contains(generateErr.Error(), evergreen.SaveGenerateTasksError) {
- logger.Task().Infof("Problem polling for generate tasks job, retrying (%s)", generateErr.Error())
- }
- return true, generateErr
+ return false, generateErr
}
if generateStatus.Finished {
return false, nil
@@ -138,7 +129,7 @@ func (c *generateTask) Execute(ctx context.Context, comm client.Communicator, lo
MaxDelay: pollRetryMaxDelay,
})
if err != nil {
- return errors.WithMessage(err, "problem polling for generate tasks job")
+ return errors.WithMessage(err, "polling for generate tasks job")
}
return nil
}
@@ -146,18 +137,18 @@ func (c *generateTask) Execute(ctx context.Context, comm client.Communicator, lo
func generateTaskForFile(fn string, conf *internal.TaskConfig) ([]byte, error) {
fileLoc := getJoinedWithWorkDir(conf, fn)
if _, err := os.Stat(fileLoc); os.IsNotExist(err) {
- return nil, errors.Wrapf(err, "File '%s' does not exist", fn)
+ return nil, errors.Wrapf(err, "getting information for file '%s'", fn)
}
jsonFile, err := os.Open(fileLoc)
if err != nil {
- return nil, errors.Wrapf(err, "Couldn't open file '%s'", fn)
+ return nil, errors.Wrapf(err, "opening file '%s'", fn)
}
defer jsonFile.Close()
var data []byte
- data, err = ioutil.ReadAll(jsonFile)
+ data, err = io.ReadAll(jsonFile)
if err != nil {
- return nil, errors.Wrapf(err, "Problem reading from file '%s'", fn)
+ return nil, errors.Wrapf(err, "reading from file '%s'", fn)
}
return data, nil
@@ -171,8 +162,7 @@ func makeJsonOfAllFiles(jsonBytes [][]byte) ([]json.RawMessage, error) {
for _, j := range jsonBytes {
jsonRaw := json.RawMessage{}
if err := json.Unmarshal(j, &jsonRaw); err != nil {
-
- catcher.Add(errors.Wrap(err, "error unmarshaling JSON for generate.tasks"))
+ catcher.Wrap(err, "unmarshalling JSON from file")
continue
}
post = append(post, jsonRaw)
diff --git a/agent/command/generate_test.go b/agent/command/generate_test.go
index ac8db4ac30c..ab9fd32aa93 100644
--- a/agent/command/generate_test.go
+++ b/agent/command/generate_test.go
@@ -3,7 +3,6 @@ package command
import (
"context"
"encoding/json"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -19,7 +18,7 @@ import (
type generateSuite struct {
cancel func()
conf *internal.TaskConfig
- comm client.Communicator
+ comm *client.Mock
logger client.LoggerProducer
ctx context.Context
g *generateTask
@@ -45,7 +44,7 @@ func (s *generateSuite) SetupTest() {
s.logger, err = s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: s.conf.Task.Id, Secret: s.conf.Task.Secret}, nil)
s.NoError(err)
s.g = &generateTask{}
- s.tmpDirName, err = ioutil.TempDir("", "generate-suite-")
+ s.tmpDirName = s.T().TempDir()
s.conf.WorkDir = s.tmpDirName
s.Require().NoError(err)
s.json = `
@@ -73,7 +72,6 @@ func (s *generateSuite) SetupTest() {
func (s *generateSuite) TearDownTest() {
s.cancel()
- s.Require().NoError(os.RemoveAll(s.tmpDirName))
}
func (s *generateSuite) TestParseParamsWithNoFiles() {
@@ -92,8 +90,25 @@ func (s *generateSuite) TestExecuteFileDoesNotExist() {
s.Error(c.Execute(s.ctx, s.comm, s.logger, s.conf))
}
+func (s *generateSuite) TestExecuteFailsWithGeneratePollError() {
+ f, err := os.CreateTemp(s.tmpDirName, "")
+ s.Require().NoError(err)
+ tmpFile := f.Name()
+ tmpFileBase := filepath.Base(tmpFile)
+ defer os.Remove(tmpFile)
+
+ n, err := f.WriteString(s.json)
+ s.NoError(err)
+ s.Equal(len(s.json), n)
+ s.NoError(f.Close())
+
+ c := &generateTask{Files: []string{tmpFileBase}}
+ s.comm.GenerateTasksShouldFail = true
+ s.Contains(c.Execute(s.ctx, s.comm, s.logger, s.conf).Error(), "polling generate tasks")
+}
+
func (s *generateSuite) TestExecuteSuccess() {
- f, err := ioutil.TempFile(s.tmpDirName, "")
+ f, err := os.CreateTemp(s.tmpDirName, "")
s.Require().NoError(err)
tmpFile := f.Name()
tmpFileBase := filepath.Base(tmpFile)
@@ -117,7 +132,7 @@ func (s *generateSuite) TestOptional() {
}
func (s *generateSuite) TestExecuteSuccessWithValidGlobbing() {
- f, err := ioutil.TempFile(s.tmpDirName, "")
+ f, err := os.CreateTemp(s.tmpDirName, "")
s.Require().NoError(err)
tmpFile := f.Name()
defer os.Remove(tmpFile)
@@ -145,7 +160,7 @@ func (s *generateSuite) TestErrorWithInvalidExpansions() {
}
func (s *generateSuite) TestNoErrorWithValidExpansions() {
- f, err := ioutil.TempFile(s.tmpDirName, "")
+ f, err := os.CreateTemp(s.tmpDirName, "")
s.Require().NoError(err)
tmpFile := f.Name()
tmpFileBase := filepath.Base(tmpFile)
diff --git a/agent/command/git.go b/agent/command/git.go
index ce6ed2ab46c..b06124d5340 100644
--- a/agent/command/git.go
+++ b/agent/command/git.go
@@ -5,7 +5,6 @@ import (
"context"
"fmt"
"io"
- "io/ioutil"
"net/url"
"os"
"path/filepath"
@@ -17,7 +16,6 @@ import (
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/evergreen/util"
@@ -28,12 +26,25 @@ import (
"github.com/mongodb/grip/message"
"github.com/mongodb/jasper"
"github.com/pkg/errors"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/trace"
)
const (
GitFetchProjectRetries = 5
defaultCommitterName = "Evergreen Agent"
defaultCommitterEmail = "no-reply@evergreen.mongodb.com"
+ shallowCloneDepth = 100
+
+ gitGetProjectAttribute = "evergreen.command.git_get_project"
+)
+
+var (
+ cloneOwnerAttribute = fmt.Sprintf("%s.clone_owner", gitGetProjectAttribute)
+ cloneRepoAttribute = fmt.Sprintf("%s.clone_repo", gitGetProjectAttribute)
+ cloneBranchAttribute = fmt.Sprintf("%s.clone_branch", gitGetProjectAttribute)
+ cloneModuleAttribute = fmt.Sprintf("%s.clone_module", gitGetProjectAttribute)
+ cloneRetriesAttribute = fmt.Sprintf("%s.clone_retries", gitGetProjectAttribute)
)
// gitFetchProject is a command that fetches source code from git for the project
@@ -49,13 +60,18 @@ type gitFetchProject struct {
Token string `plugin:"expand" mapstructure:"token"`
+ // ShallowClone sets CloneDepth to 100, and is kept for backwards compatibility.
ShallowClone bool `mapstructure:"shallow_clone"`
+ CloneDepth int `mapstructure:"clone_depth"`
RecurseSubmodules bool `mapstructure:"recurse_submodules"`
- CommitterName string `mapstructure:"committer_name"`
+ CommitterName string `mapstructure:"committer_name"`
+
CommitterEmail string `mapstructure:"committer_email"`
+ CloneParams string `mapstructure:"clone_params"`
+
base
}
@@ -67,9 +83,11 @@ type cloneOpts struct {
branch string
dir string
token string
- shallowClone bool
+ cloneParams string
recurseSubmodules bool
mergeTestRequester bool
+ useVerbose bool
+ cloneDepth int
}
func (opts cloneOpts) validate() error {
@@ -84,11 +102,14 @@ func (opts cloneOpts) validate() error {
catcher.New("missing required location")
}
if opts.method != "" {
- catcher.Wrap(distro.ValidateCloneMethod(opts.method), "invalid clone method")
+ catcher.Wrapf(evergreen.ValidateCloneMethod(opts.method), "invalid clone method '%s'", opts.method)
}
- if opts.method == distro.CloneMethodOAuth && opts.token == "" {
+ if opts.method == evergreen.CloneMethodOAuth && opts.token == "" {
catcher.New("cannot clone using OAuth if token is not set")
}
+ if opts.cloneDepth < 0 {
+ catcher.New("clone depth cannot be negative")
+ }
return catcher.Resolve()
}
@@ -103,9 +124,9 @@ func (opts cloneOpts) httpLocation() string {
// setLocation sets the location to clone from.
func (opts *cloneOpts) setLocation() error {
switch opts.method {
- case "", distro.CloneMethodLegacySSH:
+ case "", evergreen.CloneMethodLegacySSH:
opts.location = opts.sshLocation()
- case distro.CloneMethodOAuth:
+ case evergreen.CloneMethodOAuth:
opts.location = opts.httpLocation()
default:
return errors.Errorf("unrecognized clone method '%s'", opts.method)
@@ -118,23 +139,23 @@ func (opts *cloneOpts) setLocation() error {
func getProjectMethodAndToken(projectToken, globalToken, globalCloneMethod string) (string, string, error) {
if projectToken != "" {
token, err := parseToken(projectToken)
- return distro.CloneMethodOAuth, token, err
+ return evergreen.CloneMethodOAuth, token, err
}
token, err := parseToken(globalToken)
if err != nil {
- return distro.CloneMethodLegacySSH, "", err
+ return evergreen.CloneMethodLegacySSH, "", err
}
switch globalCloneMethod {
// No clone method specified is equivalent to using legacy SSH.
- case "", distro.CloneMethodLegacySSH:
- return distro.CloneMethodLegacySSH, token, nil
- case distro.CloneMethodOAuth:
+ case "", evergreen.CloneMethodLegacySSH:
+ return evergreen.CloneMethodLegacySSH, token, nil
+ case evergreen.CloneMethodOAuth:
if token == "" {
- return distro.CloneMethodLegacySSH, "", errors.New("cannot clone using OAuth if global token is empty")
+ return evergreen.CloneMethodLegacySSH, "", errors.New("cannot clone using OAuth if explicit token from parameter and global token are both empty")
}
token, err := parseToken(globalToken)
- return distro.CloneMethodOAuth, token, err
+ return evergreen.CloneMethodOAuth, token, err
}
return "", "", errors.Errorf("unrecognized clone method '%s'", globalCloneMethod)
@@ -155,12 +176,12 @@ func parseToken(token string) (string, error) {
func (opts cloneOpts) getCloneCommand() ([]string, error) {
if err := opts.validate(); err != nil {
- return nil, errors.Wrap(err, "cannot create clone command")
+ return nil, errors.Wrap(err, "invalid clone command options")
}
switch opts.method {
- case "", distro.CloneMethodLegacySSH:
+ case "", evergreen.CloneMethodLegacySSH:
return opts.buildSSHCloneCommand()
- case distro.CloneMethodOAuth:
+ case evergreen.CloneMethodOAuth:
return opts.buildHTTPCloneCommand()
}
return nil, errors.New("unrecognized clone method in options")
@@ -169,19 +190,24 @@ func (opts cloneOpts) getCloneCommand() ([]string, error) {
func (opts cloneOpts) buildHTTPCloneCommand() ([]string, error) {
urlLocation, err := url.Parse(opts.location)
if err != nil {
- return nil, errors.Wrap(err, "failed to parse URL from location")
+ return nil, errors.Wrap(err, "parsing URL from location")
}
clone := fmt.Sprintf("git clone %s '%s'", thirdparty.FormGitUrl(urlLocation.Host, opts.owner, opts.repo, opts.token), opts.dir)
if opts.recurseSubmodules {
clone = fmt.Sprintf("%s --recurse-submodules", clone)
}
- if opts.shallowClone {
- // Experiments with shallow clone on AWS hosts suggest that depth 100 is as fast as 1, but 1000 is slower.
- clone = fmt.Sprintf("%s --depth 100", clone)
+ if opts.useVerbose {
+ clone = fmt.Sprintf("GIT_TRACE=1 GIT_CURL_VERBOSE=1 %s", clone)
+ }
+ if opts.cloneDepth > 0 {
+ clone = fmt.Sprintf("%s --depth %d", clone, opts.cloneDepth)
}
if opts.branch != "" {
clone = fmt.Sprintf("%s --branch '%s'", clone, opts.branch)
}
+ if opts.cloneParams != "" {
+ clone = fmt.Sprintf("%s %s", clone, opts.cloneParams)
+ }
redactedClone := strings.Replace(clone, opts.token, "[redacted oauth token]", -1)
return []string{
@@ -198,13 +224,18 @@ func (opts cloneOpts) buildSSHCloneCommand() ([]string, error) {
if opts.recurseSubmodules {
cloneCmd = fmt.Sprintf("%s --recurse-submodules", cloneCmd)
}
- if opts.shallowClone {
- // Experiments with shallow clone on AWS hosts suggest that depth 100 is as fast as 1, but 1000 is slower.
- cloneCmd = fmt.Sprintf("%s --depth 100", cloneCmd)
+ if opts.useVerbose {
+ cloneCmd = fmt.Sprintf("GIT_TRACE=1 GIT_CURL_VERBOSE=1 %s", cloneCmd)
+ }
+ if opts.cloneDepth > 0 {
+ cloneCmd = fmt.Sprintf("%s --depth %d", cloneCmd, opts.cloneDepth)
}
if opts.branch != "" {
cloneCmd = fmt.Sprintf("%s --branch '%s'", cloneCmd, opts.branch)
}
+ if opts.cloneParams != "" {
+ cloneCmd = fmt.Sprintf("%s %s", cloneCmd, opts.cloneParams)
+ }
return []string{
cloneCmd,
@@ -212,6 +243,31 @@ func (opts cloneOpts) buildSSHCloneCommand() ([]string, error) {
}, nil
}
+func moduleRevExpansionName(name string) string { return fmt.Sprintf("%s_rev", name) }
+
+// Load performs a GET on /manifest/load
+func (c *gitFetchProject) manifestLoad(ctx context.Context,
+ comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
+
+ td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
+
+ manifest, err := comm.GetManifest(ctx, td)
+ if err != nil {
+ return errors.Wrapf(err, "loading manifest for task '%s'", td.ID)
+ }
+
+ for moduleName := range manifest.Modules {
+ // put the url for the module in the expansions
+ conf.Expansions.Put(moduleRevExpansionName(moduleName), manifest.Modules[moduleName].Revision)
+ conf.Expansions.Put(fmt.Sprintf("%s_branch", moduleName), manifest.Modules[moduleName].Branch)
+ conf.Expansions.Put(fmt.Sprintf("%s_repo", moduleName), manifest.Modules[moduleName].Repo)
+ conf.Expansions.Put(fmt.Sprintf("%s_owner", moduleName), manifest.Modules[moduleName].Owner)
+ }
+
+ logger.Execution().Info("Manifest loaded successfully.")
+ return nil
+}
+
func gitFetchProjectFactory() Command { return &gitFetchProject{} }
func (c *gitFetchProject) Name() string { return "git.get_project" }
@@ -220,18 +276,17 @@ func (c *gitFetchProject) Name() string { return "git.get_project" }
func (c *gitFetchProject) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return err
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Directory == "" {
- return errors.Errorf("error parsing '%s' params: value for directory "+
- "must not be blank", c.Name())
+ return errors.New("directory must not be blank")
}
return nil
}
-func (c *gitFetchProject) buildCloneCommand(ctx context.Context, conf *internal.TaskConfig, logger client.LoggerProducer, opts cloneOpts) ([]string, error) {
+func (c *gitFetchProject) buildCloneCommand(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, opts cloneOpts) ([]string, error) {
gitCommands := []string{
"set -o xtrace",
"set -o errexit",
@@ -240,22 +295,21 @@ func (c *gitFetchProject) buildCloneCommand(ctx context.Context, conf *internal.
cloneCmd, err := opts.getCloneCommand()
if err != nil {
- return nil, errors.Wrap(err, "error getting command to clone repo")
+ return nil, errors.Wrap(err, "getting command to clone repo")
}
gitCommands = append(gitCommands, cloneCmd...)
// if there's a PR checkout the ref containing the changes
if isGitHub(conf) {
- var ref, commitToTest, branchName string
+ var ref, branchName, commitToTest string
if conf.Task.Requester == evergreen.MergeTestRequester {
- // proceed if github has confirmed this pr is mergeable. If it hasn't checked, this request
+ // Proceed if github has confirmed this pr is mergeable. If it hasn't checked, this request
// will make it check.
- // https://docs.github.com/en/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests
- commitToTest, err = c.waitForMergeableCheck(ctx, logger, opts, conf.GithubPatchData.PRNumber)
+ commitToTest, err = c.waitForMergeableCheck(ctx, comm, logger, conf, opts)
if err != nil {
- logger.Task().Error(errors.Wrap(err, "error checking if pull request is mergeable"))
commitToTest = conf.GithubPatchData.HeadHash
- logger.Task().Warning(fmt.Sprintf("because errors were encountered trying to retrieve the pull request, we will use the last recorded hash to test (%s)", commitToTest))
+ logger.Task().Errorf("Error checking if pull request is mergeable: %s", err)
+ logger.Task().Warningf("Because errors were encountered trying to retrieve the pull request, we will use the last recorded hash to test (%s).", commitToTest)
}
ref = "merge"
branchName = fmt.Sprintf("evg-merge-test-%s", utility.RandomString())
@@ -275,7 +329,8 @@ func (c *gitFetchProject) buildCloneCommand(ctx context.Context, conf *internal.
}
} else {
- if opts.shallowClone {
+ if opts.cloneDepth > 0 {
+ // If this git log fails, then we know the clone is too shallow so we unshallow before reset.
gitCommands = append(gitCommands, fmt.Sprintf("git log HEAD..%s || git fetch --unshallow", conf.Task.Revision))
}
if !opts.mergeTestRequester {
@@ -287,7 +342,7 @@ func (c *gitFetchProject) buildCloneCommand(ctx context.Context, conf *internal.
return gitCommands, nil
}
-func (c *gitFetchProject) waitForMergeableCheck(ctx context.Context, logger client.LoggerProducer, opts cloneOpts, prNum int) (string, error) {
+func (c *gitFetchProject) waitForMergeableCheck(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, opts cloneOpts) (string, error) {
var mergeSHA string
const (
@@ -295,25 +350,26 @@ func (c *gitFetchProject) waitForMergeableCheck(ctx context.Context, logger clie
getPRRetryMinDelay = time.Second
getPRRetryMaxDelay = 15 * time.Second
)
+ td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
+ attempt := 0
err := utility.Retry(ctx, func() (bool, error) {
- pr, err := thirdparty.GetGithubPullRequest(ctx, opts.token, opts.owner, opts.repo, prNum)
+ attempt++
+ lastAttempt := attempt == getPRAttempts
+ info, err := comm.GetPullRequestInfo(ctx, td, conf.GithubPatchData.PRNumber, opts.owner, opts.repo, lastAttempt)
if err != nil {
- return false, errors.Wrap(err, "error getting pull request data from Github")
+ return false, errors.Wrap(err, "getting pull request data from GitHub")
}
- if pr.Mergeable == nil {
- logger.Execution().Info("Mergeable check not ready")
- return true, nil
+ if info.Mergeable == nil {
+ return true, errors.New("mergeable check is not ready")
}
- if *pr.Mergeable {
- if pr.MergeCommitSHA != nil {
- mergeSHA = *pr.MergeCommitSHA
- } else {
- return false, errors.New("Pull request is mergeable but Github has not created a merge branch")
+ if *info.Mergeable {
+ if info.MergeCommitSHA != "" {
+ mergeSHA = info.MergeCommitSHA
+ return false, nil
}
- } else {
- return false, errors.New("Pull request is not mergeable. This likely means a merge conflict was just introduced")
+ return false, errors.New("pull request is mergeable but GitHub has not created a merge branch")
}
- return false, nil
+ return false, errors.New("pull request is not mergeable, which likely means a merge conflict was just introduced")
}, utility.RetryOptions{
MaxAttempts: getPRAttempts,
MinDelay: getPRRetryMinDelay,
@@ -340,7 +396,7 @@ func (c *gitFetchProject) buildModuleCloneCommand(conf *internal.TaskConfig, opt
cloneCmd, err := opts.getCloneCommand()
if err != nil {
- return nil, errors.Wrap(err, "error getting command to clone repo")
+ return nil, errors.Wrap(err, "getting command to clone repo")
}
gitCommands = append(gitCommands, cloneCmd...)
@@ -358,7 +414,8 @@ func (c *gitFetchProject) buildModuleCloneCommand(conf *internal.TaskConfig, opt
return gitCommands, nil
}
-func (c *gitFetchProject) opts(projectMethod, projectToken string, conf *internal.TaskConfig) (cloneOpts, error) {
+func (c *gitFetchProject) opts(projectMethod, projectToken string, logger client.LoggerProducer, conf *internal.TaskConfig) (cloneOpts, error) {
+ shallowCloneEnabled := conf.Distro == nil || !conf.Distro.DisableShallowClone
opts := cloneOpts{
method: projectMethod,
owner: conf.ProjectRef.Owner,
@@ -366,15 +423,29 @@ func (c *gitFetchProject) opts(projectMethod, projectToken string, conf *interna
branch: conf.ProjectRef.Branch,
dir: c.Directory,
token: projectToken,
- shallowClone: c.ShallowClone && !conf.Distro.DisableShallowClone,
+ cloneParams: c.CloneParams,
recurseSubmodules: c.RecurseSubmodules,
mergeTestRequester: conf.Task.Requester == evergreen.MergeTestRequester,
}
+ cloneDepth := c.CloneDepth
+ if cloneDepth == 0 && c.ShallowClone {
+ // Experiments with shallow clone on AWS hosts suggest that depth 100 is as fast as 1, but 1000 is slower.
+ cloneDepth = shallowCloneDepth
+ }
+ if !shallowCloneEnabled && cloneDepth != 0 {
+ logger.Task().Infof("Clone depth is disabled for this distro; ignoring-user specified clone depth.")
+ } else {
+ opts.cloneDepth = cloneDepth
+ if c.CloneDepth != 0 && c.ShallowClone {
+ logger.Task().Infof("Specified clone depth of %d will be used instead of shallow_clone (which uses depth %d).", opts.cloneDepth, shallowCloneDepth)
+ }
+ }
+
if err := opts.setLocation(); err != nil {
- return opts, errors.Wrap(err, "failed to set location to clone from")
+ return opts, errors.Wrap(err, "setting location to clone from")
}
if err := opts.validate(); err != nil {
- return opts, errors.Wrap(err, "could not validate options for cloning")
+ return opts, errors.Wrap(err, "validating clone options")
}
return opts, nil
}
@@ -387,28 +458,42 @@ func (c *gitFetchProject) Execute(ctx context.Context, comm client.Communicator,
fetchRetryMaxDelay = 10 * time.Second
)
- var err error
+ err := c.manifestLoad(ctx, comm, logger, conf)
+ if err != nil {
+ return errors.Wrap(err, "loading manifest")
+ }
+
if err = util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding github parameters")
+ return errors.Wrap(err, "applying expansions")
}
- projectMethod, projectToken, err := getProjectMethodAndToken(c.Token, conf.Expansions.Get(evergreen.GlobalGitHubTokenExpansion), conf.Distro.CloneMethod)
+ projectMethod, projectToken, err := getProjectMethodAndToken(c.Token, conf.Expansions.Get(evergreen.GlobalGitHubTokenExpansion), conf.GetCloneMethod())
if err != nil {
- return errors.Wrap(err, "failed to get method of cloning and token")
+ return errors.Wrap(err, "getting method of cloning and token")
}
var opts cloneOpts
- opts, err = c.opts(projectMethod, projectToken, conf)
+ opts, err = c.opts(projectMethod, projectToken, logger, conf)
if err != nil {
return err
}
+ var attemptNum int
err = utility.Retry(
ctx,
func() (bool, error) {
- err := c.fetch(ctx, comm, logger, conf, opts)
- if err != nil {
- return true, err
+ if attemptNum > 2 {
+ opts.useVerbose = true // use verbose for the last 2 attempts
+ logger.Task().Error(message.Fields{
+ "message": "running git clone with verbose output",
+ "num_attempts": GitFetchProjectRetries,
+ "attempt": attemptNum,
+ })
+ }
+
+ if err := c.fetch(ctx, comm, logger, conf, opts); err != nil {
+ attemptNum++
+ return true, errors.Wrapf(err, "attempt %d", attemptNum)
}
return false, nil
}, utility.RetryOptions{
@@ -418,30 +503,43 @@ func (c *gitFetchProject) Execute(ctx context.Context, comm client.Communicator,
})
if err != nil {
logger.Task().Error(message.WrapError(err, message.Fields{
- "operation": "git.get_project",
- "message": "cloning failed",
- "num_attempts": GitFetchProjectRetries,
- "owner": conf.ProjectRef.Owner,
- "repo": conf.ProjectRef.Repo,
- "branch": conf.ProjectRef.Branch,
+ "operation": "git.get_project",
+ "message": "cloning failed",
+ "num_attempts": attemptNum,
+ "num_attempts_allowed": GitFetchProjectRetries,
+ "owner": conf.ProjectRef.Owner,
+ "repo": conf.ProjectRef.Repo,
+ "branch": conf.ProjectRef.Branch,
}))
}
+
+ span := trace.SpanFromContext(ctx)
+ span.SetAttributes(attribute.Int(cloneRetriesAttribute, attemptNum))
+
return err
}
func (c *gitFetchProject) fetchSource(ctx context.Context,
+ comm client.Communicator,
logger client.LoggerProducer,
conf *internal.TaskConfig,
jpm jasper.Manager,
opts cloneOpts) error {
- gitCommands, err := c.buildCloneCommand(ctx, conf, logger, opts)
+ gitCommands, err := c.buildCloneCommand(ctx, comm, logger, conf, opts)
if err != nil {
return err
}
fetchScript := strings.Join(gitCommands, "\n")
- stdErr := noopWriteCloser{&bytes.Buffer{}}
+ // This needs to use a thread-safe buffer just in case the context errors
+ // (e.g. due to a timeout) while the command is running. A non-thread-safe
+ // buffer is only safe to read once the command exits, guaranteeing that all
+ // output is finished writing. However, if the context errors, Run will
+ // return early and will stop waiting for the command to exit. In the
+ // context error case, this thread and the still-running command may race to
+ // read/write the buffer, so the buffer has to be thread-safe.
+ stdErr := utility.MakeSafeBuffer(bytes.Buffer{})
fetchSourceCmd := jpm.CreateCommand(ctx).Add([]string{"bash", "-c", fetchScript}).Directory(conf.WorkDir).
SetOutputSender(level.Info, logger.Task().GetSender()).SetErrorWriter(stdErr)
@@ -450,7 +548,14 @@ func (c *gitFetchProject) fetchSource(ctx context.Context,
if opts.token != "" {
redactedCmds = strings.Replace(redactedCmds, opts.token, "[redacted oauth token]", -1)
}
- logger.Execution().Debug(fmt.Sprintf("Commands are: %s", redactedCmds))
+ logger.Execution().Debugf("Commands are: %s", redactedCmds)
+
+ ctx, span := getTracer().Start(ctx, "clone_source", trace.WithAttributes(
+ attribute.String(cloneOwnerAttribute, opts.owner),
+ attribute.String(cloneRepoAttribute, opts.repo),
+ attribute.String(cloneBranchAttribute, opts.branch),
+ ))
+ defer span.End()
err = fetchSourceCmd.Run(ctx)
out := stdErr.String()
@@ -464,15 +569,15 @@ func (c *gitFetchProject) fetchSource(ctx context.Context,
}
func (c *gitFetchProject) fetchAdditionalPatches(ctx context.Context,
- conf *internal.TaskConfig,
comm client.Communicator,
logger client.LoggerProducer,
+ conf *internal.TaskConfig,
td client.TaskData) ([]string, error) {
logger.Execution().Info("Fetching additional patches.")
additionalPatches, err := comm.GetAdditionalPatches(ctx, conf.Task.Version, td)
if err != nil {
- return nil, errors.Wrap(err, "Failed to get additional patches")
+ return nil, errors.Wrap(err, "getting additional patches")
}
return additionalPatches, nil
}
@@ -487,15 +592,15 @@ func (c *gitFetchProject) fetchModuleSource(ctx context.Context,
moduleName string) error {
var err error
- logger.Execution().Infof("Fetching module: %s", moduleName)
+ logger.Execution().Infof("Fetching module '%s'.", moduleName)
var module *model.Module
module, err = conf.Project.GetModuleByName(moduleName)
if err != nil {
- return errors.Wrapf(err, "Couldn't get module %s", moduleName)
+ return errors.Wrapf(err, "getting module '%s'", moduleName)
}
if module == nil {
- return errors.Errorf("No module found for %s", moduleName)
+ return errors.Errorf("module '%s' not found", moduleName)
}
moduleBase := filepath.ToSlash(filepath.Join(expandModulePrefix(conf, module.Name, module.Prefix, logger), module.Name))
@@ -557,13 +662,13 @@ func (c *gitFetchProject) fetchModuleSource(ctx context.Context,
// Module's location takes precedence over the project-level clone
// method.
if strings.Contains(opts.location, "git@github.com:") {
- opts.method = distro.CloneMethodLegacySSH
+ opts.method = evergreen.CloneMethodLegacySSH
} else {
opts.method = projectMethod
opts.token = projectToken
}
if err = opts.validate(); err != nil {
- return errors.Wrap(err, "could not validate options for cloning")
+ return errors.Wrap(err, "validating clone options")
}
var moduleCmds []string
@@ -572,7 +677,19 @@ func (c *gitFetchProject) fetchModuleSource(ctx context.Context,
return err
}
- stdErr := noopWriteCloser{&bytes.Buffer{}}
+ ctx, span := getTracer().Start(ctx, "clone_module", trace.WithAttributes(
+ attribute.String(cloneModuleAttribute, module.Name),
+ ))
+ defer span.End()
+
+ // This needs to use a thread-safe buffer just in case the context errors
+ // (e.g. due to a timeout) while the command is running. A non-thread-safe
+ // buffer is only safe to read once the command exits, guaranteeing that all
+ // output is finished writing. However, if the context errors, Run will
+ // return early and will stop waiting for the command to exit. In the
+ // context error case, this thread and the still-running command may race to
+ // read/write the buffer, so the buffer has to be thread-safe.
+ stdErr := utility.MakeSafeBuffer(bytes.Buffer{})
err = jpm.CreateCommand(ctx).Add([]string{"bash", "-c", strings.Join(moduleCmds, "\n")}).
Directory(filepath.ToSlash(getJoinedWithWorkDir(conf, c.Directory))).
SetOutputSender(level.Info, logger.Task().GetSender()).SetErrorWriter(stdErr).Run(ctx)
@@ -588,12 +705,17 @@ func (c *gitFetchProject) fetchModuleSource(ctx context.Context,
}
func (c *gitFetchProject) applyAdditionalPatch(ctx context.Context,
- conf *internal.TaskConfig,
comm client.Communicator,
logger client.LoggerProducer,
+ conf *internal.TaskConfig,
td client.TaskData,
- patchId string) error {
- logger.Task().Infof("Applying changes from previous commit queue patch '%s'", patchId)
+ patchId string,
+ useVerbose bool) error {
+ logger.Task().Infof("Applying changes from previous commit queue patch '%s'.", patchId)
+
+ ctx, span := getTracer().Start(ctx, "apply_commit_queue_patches")
+ defer span.End()
+
newPatch, err := comm.GetTaskPatch(ctx, td, patchId)
if err != nil {
return errors.Wrap(err, "getting additional patch")
@@ -604,8 +726,8 @@ func (c *gitFetchProject) applyAdditionalPatch(ctx context.Context,
if err = c.getPatchContents(ctx, comm, logger, conf, newPatch); err != nil {
return errors.Wrap(err, "getting patch contents")
}
- if err = c.applyPatch(ctx, logger, conf, reorderPatches(newPatch.Patches)); err != nil {
- logger.Task().Warning("Failed to apply previous commit queue patch; try rebasing onto HEAD")
+ if err = c.applyPatch(ctx, logger, conf, reorderPatches(newPatch.Patches), useVerbose); err != nil {
+ logger.Task().Warning("Failed to apply previous commit queue patch; try rebasing onto HEAD.")
return errors.Wrapf(err, "applying patch '%s'", newPatch.Id.Hex())
}
logger.Task().Infof("Applied changes from previous commit queue patch '%s'", patchId)
@@ -622,49 +744,51 @@ func (c *gitFetchProject) fetch(ctx context.Context,
defer cancel()
jpm := c.JasperManager()
+ td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
+
+ // Additional patches are for commit queue batch execution. Patches
+ // will be applied in the order returned, with the main patch being
+ // applied last. We check this first to avoid cloning if
+ // the task isn't on the commit queue anymore.
+ var err error
+ var additionalPatches []string
+ if conf.Task.Requester == evergreen.MergeTestRequester {
+ additionalPatches, err = c.fetchAdditionalPatches(ctx, comm, logger, conf, td)
+ if err != nil {
+ return errors.WithStack(err)
+ }
+ }
+
// Clone the project.
- err := c.fetchSource(ctx, logger, conf, jpm, opts)
- if err != nil {
+ if err = c.fetchSource(ctx, comm, logger, conf, jpm, opts); err != nil {
return errors.Wrap(err, "problem running fetch command")
}
// Retrieve the patch for the version if one exists.
var p *patch.Patch
- td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
if evergreen.IsPatchRequester(conf.Task.Requester) {
logger.Execution().Info("Fetching patch.")
p, err = comm.GetTaskPatch(ctx, td, "")
if err != nil {
- return errors.Wrap(err, "Failed to get patch")
- }
- }
-
- // Additional patches are for commit queue batch execution. Patches
- // will be applied in the order returned, with the main patch being
- // applied last.
- var additionalPatches []string
- if conf.Task.Requester == evergreen.MergeTestRequester {
- additionalPatches, err = c.fetchAdditionalPatches(ctx, conf, comm, logger, td)
- if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "getting patch for task")
}
}
// Clone the project's modules.
for _, moduleName := range conf.BuildVariant.Modules {
- if ctx.Err() != nil {
- return errors.New("git.get_project command aborted while applying modules")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrapf(err, "canceled while applying module '%s'", moduleName)
}
err = c.fetchModuleSource(ctx, conf, logger, jpm, opts.method, opts.token, p, moduleName)
if err != nil {
- logger.Execution().Error(err)
+ logger.Execution().Error(errors.Wrap(err, "fetching module source"))
}
}
// Apply additional patches for commit queue batch execution.
if conf.Task.Requester == evergreen.MergeTestRequester && !conf.Task.CommitQueueMerge {
for _, patchId := range additionalPatches {
- err := c.applyAdditionalPatch(ctx, conf, comm, logger, td, patchId)
+ err := c.applyAdditionalPatch(ctx, comm, logger, conf, td, patchId, opts.useVerbose)
if err != nil {
return err
}
@@ -674,7 +798,7 @@ func (c *gitFetchProject) fetch(ctx context.Context,
// Apply patches if this is a patch and we haven't already gotten the changes from a PR
if evergreen.IsPatchRequester(conf.Task.Requester) && !isGitHub(conf) {
if err = c.getPatchContents(ctx, comm, logger, conf, p); err != nil {
- err = errors.Wrap(err, "Failed to get patch contents")
+ err = errors.Wrap(err, "getting patch contents")
logger.Execution().Error(err.Error())
return err
}
@@ -682,8 +806,8 @@ func (c *gitFetchProject) fetch(ctx context.Context,
// in order for the main commit's manifest to include module changes commit queue
// commits need to be in the correct order, first modules and then the main patch
// reorder patches so the main patch gets applied last
- if err = c.applyPatch(ctx, logger, conf, reorderPatches(p.Patches)); err != nil {
- err = errors.Wrap(err, "Failed to apply patch")
+ if err = c.applyPatch(ctx, logger, conf, reorderPatches(p.Patches), opts.useVerbose); err != nil {
+ err = errors.Wrap(err, "applying patch")
logger.Execution().Error(err.Error())
return err
}
@@ -709,7 +833,7 @@ func reorderPatches(originalPatches []patch.ModulePatch) []patch.ModulePatch {
}
func (c *gitFetchProject) logModuleRevision(logger client.LoggerProducer, revision, module, reason string) {
- logger.Execution().Infof("Using revision/ref '%s' for module '%s' (reason: %s)", revision, module, reason)
+ logger.Execution().Infof("Using revision/ref '%s' for module '%s' (reason: %s).", revision, module, reason)
}
// getPatchContents() dereferences any patch files that are stored externally, fetching them from
@@ -721,6 +845,9 @@ func (c *gitFetchProject) getPatchContents(ctx context.Context, comm client.Comm
return errors.New("cannot get patch contents for nil patch")
}
+ ctx, span := getTracer().Start(ctx, "get_patches")
+ defer span.End()
+
td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
for i, patchPart := range patch.Patches {
// If the patch isn't stored externally, no need to do anything.
@@ -728,16 +855,16 @@ func (c *gitFetchProject) getPatchContents(ctx context.Context, comm client.Comm
continue
}
- if ctx.Err() != nil {
- return errors.New("operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrapf(err, "canceled while getting patch file '%s'", patchPart.ModuleName)
}
// otherwise, fetch the contents and load it into the patch object
- logger.Execution().Infof("Fetching patch contents for %s", patchPart.PatchSet.PatchFileId)
+ logger.Execution().Infof("Fetching patch contents for patch file '%s'.", patchPart.PatchSet.PatchFileId)
result, err := comm.GetPatchFile(ctx, td, patchPart.PatchSet.PatchFileId)
if err != nil {
- return errors.Wrapf(err, "problem getting patch file")
+ return errors.Wrapf(err, "getting patch file")
}
patch.Patches[i].PatchSet.Patch = result
@@ -748,7 +875,7 @@ func (c *gitFetchProject) getPatchContents(ctx context.Context, comm client.Comm
// getApplyCommand determines the patch type. If the patch is a mailbox-style
// patch, it uses git-am (see https://git-scm.com/docs/git-am), otherwise
// it uses git apply
-func (c *gitFetchProject) getApplyCommand(patchFile string, conf *internal.TaskConfig) (string, error) {
+func (c *gitFetchProject) getApplyCommand(patchFile string, conf *internal.TaskConfig, useVerbose bool) (string, error) {
useGitAm, err := isMailboxPatch(patchFile, conf)
if err != nil {
return "", err
@@ -765,8 +892,11 @@ func (c *gitFetchProject) getApplyCommand(patchFile string, conf *internal.TaskC
}
return fmt.Sprintf(`GIT_COMMITTER_NAME="%s" GIT_COMMITTER_EMAIL="%s" git am --keep-cr --keep < "%s"`, committerName, committerEmail, patchFile), nil
}
-
- return fmt.Sprintf("git apply --binary --index < '%s'", patchFile), nil
+ apply := fmt.Sprintf("git apply --binary --index < '%s'", patchFile)
+ if useVerbose {
+ apply = fmt.Sprintf("GIT_TRACE=1 GIT_CURL_VERBOSE=1 %s", apply)
+ }
+ return apply, nil
}
func isMailboxPatch(patchFile string, conf *internal.TaskConfig) (bool, error) {
@@ -800,14 +930,17 @@ func getPatchCommands(modulePatch patch.ModulePatch, conf *internal.TaskConfig,
// applyPatch is used by the agent to copy patch data onto disk
// and then call the necessary git commands to apply the patch file
func (c *gitFetchProject) applyPatch(ctx context.Context, logger client.LoggerProducer,
- conf *internal.TaskConfig, patches []patch.ModulePatch) error {
+ conf *internal.TaskConfig, patches []patch.ModulePatch, useVerbose bool) error {
+
+ ctx, span := getTracer().Start(ctx, "apply_patches")
+ defer span.End()
jpm := c.JasperManager()
// patch sets and contain multiple patches, some of them for modules
for _, patchPart := range patches {
- if ctx.Err() != nil {
- return errors.New("apply patch operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrapf(err, "canceled while applying module patch '%s'", patchPart.ModuleName)
}
var moduleDir string
@@ -815,16 +948,16 @@ func (c *gitFetchProject) applyPatch(ctx context.Context, logger client.LoggerPr
// if patch is part of a module, apply patch in module root
module, err := conf.Project.GetModuleByName(patchPart.ModuleName)
if err != nil {
- return errors.Wrap(err, "Error getting module")
+ return errors.Wrap(err, "getting module")
}
if module == nil {
- return errors.Errorf("Module '%s' not found", patchPart.ModuleName)
+ return errors.Errorf("module '%s' not found", patchPart.ModuleName)
}
// skip the module if this build variant does not use it
if !utility.StringSliceContains(conf.BuildVariant.Modules, module.Name) {
logger.Execution().Infof(
- "Skipping patch for module %v: the current build variant does not use it",
+ "Skipping patch for module '%s': the current build variant does not use it.",
module.Name)
continue
}
@@ -845,11 +978,11 @@ func (c *gitFetchProject) applyPatch(ctx context.Context, logger client.LoggerPr
// create a temporary folder and store patch files on disk,
// for later use in shell script
- tempFile, err := ioutil.TempFile("", "mcipatch_")
+ tempFile, err := os.CreateTemp("", "mcipatch_")
if err != nil {
return errors.WithStack(err)
}
- defer func() { //nolint: evg-lint
+ defer func() { //nolint:evg-lint
grip.Error(tempFile.Close())
grip.Error(os.Remove(tempFile.Name()))
}()
@@ -861,10 +994,9 @@ func (c *gitFetchProject) applyPatch(ctx context.Context, logger client.LoggerPr
// this applies the patch using the patch files in the temp directory
patchCommandStrings := getPatchCommands(patchPart, conf, moduleDir, tempAbsPath)
- applyCommand, err := c.getApplyCommand(tempAbsPath, conf)
+ applyCommand, err := c.getApplyCommand(tempAbsPath, conf, useVerbose)
if err != nil {
- logger.Execution().Error("Could not to determine patch type")
- return errors.WithStack(err)
+ return errors.Wrap(err, "getting git apply command")
}
patchCommandStrings = append(patchCommandStrings, applyCommand)
cmdsJoined := strings.Join(patchCommandStrings, "\n")
diff --git a/agent/command/git_merge_pr.go b/agent/command/git_merge_pr.go
index 6fed3f7b08c..8341c6a40f2 100644
--- a/agent/command/git_merge_pr.go
+++ b/agent/command/git_merge_pr.go
@@ -2,46 +2,53 @@ package command
import (
"context"
+ "fmt"
"time"
"github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/utility"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/util"
- "github.com/google/go-github/v34/github"
+ "github.com/google/go-github/v52/github"
"github.com/mitchellh/mapstructure"
"github.com/mongodb/grip/recovery"
"github.com/mongodb/grip/send"
"github.com/pkg/errors"
)
-type gitMergePr struct {
- URL string `mapstructure:"url"`
+type gitMergePR struct {
Token string `mapstructure:"token"`
statusSender send.Sender
base
}
-func gitMergePrFactory() Command { return &gitMergePr{} }
-func (c *gitMergePr) Name() string { return "git.merge_pr" }
+const (
+ mergePRAttempts = 3
+ mergePRRetryMinDelay = 10 * time.Second
+ mergePRRetryMaxDelay = 30 * time.Second
+)
+
+func gitMergePRFactory() Command { return &gitMergePR{} }
+func (c *gitMergePR) Name() string { return "git.merge_pr" }
-func (c *gitMergePr) ParseParams(params map[string]interface{}) error {
+func (c *gitMergePR) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return err
+ return errors.Wrap(err, "decoding mapstructure params")
}
return nil
}
-func (c *gitMergePr) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
+func (c *gitMergePR) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
var err error
defer func() {
- pErr := recovery.HandlePanicWithError(recover(), nil, "unexpected error in git.merge_pr")
+ pErr := recovery.HandlePanicWithError(recover(), nil, fmt.Sprintf("unexpected error in '%s'", c.Name()))
status := evergreen.MergeTestSucceeded
if err != nil || pErr != nil {
status = evergreen.MergeTestFailed
@@ -52,13 +59,13 @@ func (c *gitMergePr) Execute(ctx context.Context, comm client.Communicator, logg
logger.Task().Error(comm.ConcludeMerge(ctx, conf.Task.Version, status, td))
}()
if err = util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "can't apply expansions")
+ return errors.Wrap(err, "applying expansions")
}
var patchDoc *patch.Patch
patchDoc, err = comm.GetTaskPatch(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, "")
if err != nil {
- return errors.Wrap(err, "unable to get patch")
+ return errors.Wrap(err, "getting patch")
}
token := c.Token
@@ -70,7 +77,7 @@ func (c *gitMergePr) Execute(ctx context.Context, comm client.Communicator, logg
Token: token,
}, "")
if err != nil {
- return errors.Wrap(err, "failed to setup github status logger")
+ return errors.Wrap(err, "setting up GitHub status logger")
}
status := evergreen.PatchFailed
@@ -78,14 +85,11 @@ func (c *gitMergePr) Execute(ctx context.Context, comm client.Communicator, logg
status = evergreen.PatchSucceeded
}
if status != evergreen.PatchSucceeded {
- logger.Task().Warning("at least 1 task failed, will not merge pull request")
+ logger.Task().Warning("At least 1 task failed, will not merge pull request.")
return nil
}
// only successful patches should get past here. Failed patches will just send the failed
- // status to github
-
- githubCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
- defer cancel()
+ // status to GitHub.
mergeOpts := &github.PullRequestOptions{
MergeMethod: conf.ProjectRef.CommitQueue.MergeMethod,
@@ -93,7 +97,22 @@ func (c *gitMergePr) Execute(ctx context.Context, comm client.Communicator, logg
DontDefaultIfBlank: true, // note this means that we will never merge with the default message (concatenated commit messages)
}
- // do the merge
- return thirdparty.MergePullRequest(githubCtx, token, conf.ProjectRef.Owner, conf.ProjectRef.Repo,
- patchDoc.GithubPatchData.CommitMessage, patchDoc.GithubPatchData.PRNumber, mergeOpts)
+ // Do the merge and assign to error so the defer statement handles this correctly.
+ // Add retry logic in case multiple PRs are merged in quick succession, since
+ // it takes GitHub some time to put the PR back in a mergeable state.
+ err = utility.Retry(ctx, func() (bool, error) {
+ err = thirdparty.MergePullRequest(ctx, token, conf.ProjectRef.Owner, conf.ProjectRef.Repo,
+ patchDoc.GithubPatchData.CommitMessage, patchDoc.GithubPatchData.PRNumber, mergeOpts)
+ if err != nil {
+ return true, errors.Wrap(err, "getting pull request data from GitHub")
+ }
+
+ return false, nil
+ }, utility.RetryOptions{
+ MaxAttempts: mergePRAttempts,
+ MinDelay: mergePRRetryMinDelay,
+ MaxDelay: mergePRRetryMaxDelay,
+ })
+
+ return err
}
diff --git a/agent/command/git_patch_test.go b/agent/command/git_patch_test.go
index 744d0f47062..4a92809e14d 100644
--- a/agent/command/git_patch_test.go
+++ b/agent/command/git_patch_test.go
@@ -12,7 +12,6 @@ import (
"github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
modelutil "github.com/evergreen-ci/evergreen/model/testutil"
@@ -25,7 +24,7 @@ import (
func TestPatchPluginAPI(t *testing.T) {
settings := testutil.TestConfig()
- testutil.ConfigureIntegrationTest(t, settings, "TestPatchPluginAPI")
+ testutil.ConfigureIntegrationTest(t, settings, t.Name())
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
comm := client.NewMock("http://localhost.com")
@@ -44,14 +43,14 @@ func TestPatchPluginAPI(t *testing.T) {
testCommand := &gitFetchProject{Directory: "dir"}
modelData, err := modelutil.SetupAPITestData(settings, "testTask", "testvar", configPath, modelutil.NoPatch)
- require.NoError(t, err, "Couldn't set up test documents")
- taskConfig, err := agentutil.MakeTaskConfigFromModelData(settings, modelData)
+ require.NoError(t, err)
+ taskConfig, err := agentutil.MakeTaskConfigFromModelData(ctx, settings, modelData)
require.NoError(t, err)
taskConfig.Expansions = util.NewExpansions(settings.Credentials)
- taskConfig.Distro = &apimodels.DistroView{CloneMethod: distro.CloneMethodOAuth}
+ taskConfig.Distro = &apimodels.DistroView{CloneMethod: evergreen.CloneMethodOAuth}
err = setupTestPatchData(modelData, patchFile, t)
- require.NoError(t, err, "Couldn't set up test documents")
+ require.NoError(t, err)
comm.PatchFiles[""] = patchFile
@@ -61,12 +60,11 @@ func TestPatchPluginAPI(t *testing.T) {
err = testCommand.getPatchContents(ctx, comm, logger, conf, patch)
So(err, ShouldBeNil)
So(patch, ShouldNotBeNil)
- require.NoError(t, db.Clear(model.VersionCollection),
- "unable to clear versions collection")
+ require.NoError(t, db.Clear(model.VersionCollection))
})
Convey("calls to non-existing tasks should fail", func() {
v := model.Version{Id: ""}
- require.NoError(t, v.Insert(), "Couldn't insert dummy version")
+ require.NoError(t, v.Insert())
modelData.Task = &task.Task{
Id: "BAD_TASK_ID",
}
@@ -74,24 +72,22 @@ func TestPatchPluginAPI(t *testing.T) {
So(err, ShouldNotBeNil)
So(err.Error(), ShouldContainSubstring, "not found")
So(patch, ShouldBeNil)
- require.NoError(t, db.Clear(model.VersionCollection),
- "unable to clear versions collection")
+ require.NoError(t, db.Clear(model.VersionCollection))
})
Convey("calls to existing tasks without patches should fail", func() {
noPatchTask := task.Task{Id: "noPatchTask", BuildId: "a"}
- require.NoError(t, noPatchTask.Insert(), "Couldn't insert patch task")
+ require.NoError(t, noPatchTask.Insert())
noPatchVersion := model.Version{Id: "noPatchVersion", BuildIds: []string{"a"}}
- require.NoError(t, noPatchVersion.Insert(), "Couldn't insert patch version")
+ require.NoError(t, noPatchVersion.Insert())
v := model.Version{Id: ""}
- require.NoError(t, v.Insert(), "Couldn't insert dummy version")
+ require.NoError(t, v.Insert())
modelData.Task = &noPatchTask
err := testCommand.getPatchContents(ctx, comm, logger, conf, patch)
So(err, ShouldNotBeNil)
So(err.Error(), ShouldContainSubstring, "no patch found for task")
So(patch, ShouldBeNil)
- require.NoError(t, db.Clear(model.VersionCollection),
- "unable to clear versions collection")
+ require.NoError(t, db.Clear(model.VersionCollection))
})
})
@@ -103,7 +99,7 @@ func TestPatchPlugin(t *testing.T) {
env := testutil.NewEnvironment(ctx, t)
settings := env.Settings()
- testutil.ConfigureIntegrationTest(t, settings, "TestPatchPlugin")
+ testutil.ConfigureIntegrationTest(t, settings, t.Name())
cwd := testutil.GetDirectoryOfFile()
jpm := env.JasperManager()
@@ -118,14 +114,14 @@ func TestPatchPlugin(t *testing.T) {
patchFile := filepath.Join(cwd, "testdata", "git", "testmodule.patch")
configPath := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "git", "plugin_patch.yml")
modelData, err := modelutil.SetupAPITestData(settings, "testtask1", "testvar", configPath, modelutil.InlinePatch)
- require.NoError(t, err, "Couldn't set up test documents")
- taskConfig, err := agentutil.MakeTaskConfigFromModelData(settings, modelData)
+ require.NoError(t, err)
+ taskConfig, err := agentutil.MakeTaskConfigFromModelData(ctx, settings, modelData)
require.NoError(t, err)
taskConfig.Expansions = util.NewExpansions(settings.Credentials)
- taskConfig.Distro = &apimodels.DistroView{CloneMethod: distro.CloneMethodOAuth}
+ taskConfig.Distro = &apimodels.DistroView{CloneMethod: evergreen.CloneMethodOAuth}
err = setupTestPatchData(modelData, patchFile, t)
- require.NoError(t, err, "Couldn't set up patch documents")
+ require.NoError(t, err)
comm := client.NewMock("http://localhost.com")
logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: taskConfig.Task.Id, Secret: taskConfig.Task.Secret}, nil)
@@ -137,8 +133,8 @@ func TestPatchPlugin(t *testing.T) {
for _, task := range taskConfig.Project.Tasks {
So(len(task.Commands), ShouldNotEqual, 0)
for _, command := range task.Commands {
- pluginCmds, err := Render(command, taskConfig.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, taskConfig.Project, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
diff --git a/agent/command/git_push.go b/agent/command/git_push.go
index 912e2cdb6b4..5cd280ecaf1 100644
--- a/agent/command/git_push.go
+++ b/agent/command/git_push.go
@@ -19,7 +19,7 @@ import (
"github.com/pkg/errors"
)
-// gitMerge is a command that commits tracked changes and pushes the resulting commit to a remote repository
+// gitPush is a command that commits tracked changes and pushes the resulting commit to a remote repository
type gitPush struct {
// The root directory (locally) that the code is checked out into.
// Must be a valid non-blank directory name.
@@ -36,12 +36,11 @@ func (c *gitPush) Name() string { return "git.push" }
func (c *gitPush) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return err
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Directory == "" {
- return errors.Errorf("error parsing '%s' params: value for directory "+
- "must not be blank", c.Name())
+ return errors.Errorf("directory must not be blank")
}
return nil
@@ -51,7 +50,7 @@ func (c *gitPush) ParseParams(params map[string]interface{}) error {
func (c *gitPush) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
var err error
defer func() {
- pErr := recovery.HandlePanicWithError(recover(), nil, "unexpected error in git.push")
+ pErr := recovery.HandlePanicWithError(recover(), nil, fmt.Sprintf("unexpected error in '%s'", c.Name()))
status := evergreen.MergeTestSucceeded
if err != nil || pErr != nil {
status = evergreen.MergeTestFailed
@@ -62,13 +61,13 @@ func (c *gitPush) Execute(ctx context.Context, comm client.Communicator, logger
logger.Task().Error(comm.ConcludeMerge(ctx, conf.Task.Version, status, td))
}()
if err = util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "can't apply expansions")
+ return errors.Wrap(err, "applying expansions")
}
var p *patch.Patch
p, err = comm.GetTaskPatch(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, "")
if err != nil {
- return errors.Wrap(err, "Failed to get patch")
+ return errors.Wrap(err, "getting task patch")
}
checkoutCommand := fmt.Sprintf("git checkout %s", conf.ProjectRef.Branch)
@@ -77,14 +76,14 @@ func (c *gitPush) Execute(ctx context.Context, comm client.Communicator, logger
cmd := jpm.CreateCommand(ctx).Directory(filepath.ToSlash(getJoinedWithWorkDir(conf, c.Directory))).Append(checkoutCommand).
SetOutputSender(level.Info, logger.Task().GetSender()).SetErrorSender(level.Error, logger.Task().GetSender())
if err = cmd.Run(ctx); err != nil {
- return errors.Wrapf(err, "can't checkout '%s' branch", conf.ProjectRef.Branch)
+ return errors.Wrapf(err, "checking out branch '%s'", conf.ProjectRef.Branch)
}
// get commit information
var projectToken string
- _, projectToken, err = getProjectMethodAndToken(c.Token, conf.Expansions.Get(evergreen.GlobalGitHubTokenExpansion), conf.Distro.CloneMethod)
+ _, projectToken, err = getProjectMethodAndToken(c.Token, conf.Expansions.Get(evergreen.GlobalGitHubTokenExpansion), conf.GetCloneMethod())
if err != nil {
- return errors.Wrap(err, "failed to get token")
+ return errors.Wrap(err, "getting token")
}
params := pushParams{token: projectToken}
@@ -95,14 +94,14 @@ func (c *gitPush) Execute(ctx context.Context, comm client.Communicator, logger
}
if len(modulePatch.PatchSet.Summary) == 0 {
- logger.Execution().Infof("Skipping empty patch for module '%s' on patch ID '%s'", modulePatch.ModuleName, p.Id.Hex())
+ logger.Execution().Infof("Skipping empty patch for module '%s' on patch '%s'.", modulePatch.ModuleName, p.Id.Hex())
continue
}
var module *model.Module
module, err = conf.Project.GetModuleByName(modulePatch.ModuleName)
if err != nil {
- logger.Execution().Errorf("No module found for %s", modulePatch.ModuleName)
+ logger.Execution().Errorf("Module '%s' not found.", modulePatch.ModuleName)
continue
}
moduleBase := filepath.Join(expandModulePrefix(conf, module.Name, module.Prefix, logger), module.Name)
@@ -112,14 +111,14 @@ func (c *gitPush) Execute(ctx context.Context, comm client.Communicator, logger
cmd := jpm.CreateCommand(ctx).Directory(filepath.ToSlash(filepath.Join(conf.WorkDir, c.Directory, moduleBase))).Append(checkoutCommand).
SetOutputSender(level.Info, logger.Task().GetSender()).SetErrorSender(level.Error, logger.Task().GetSender())
if err = cmd.Run(ctx); err != nil {
- return errors.Wrapf(err, "can't checkout '%s' branch", module.Branch)
+ return errors.Wrapf(err, "checking out branch '%s'", module.Branch)
}
- logger.Execution().Infof("Pushing patch for module %s", module.Name)
+ logger.Execution().Infof("Pushing patch for module '%s'.", module.Name)
params.directory = filepath.ToSlash(filepath.Join(conf.WorkDir, c.Directory, moduleBase))
params.branch = module.Branch
if err = c.pushPatch(ctx, logger, params); err != nil {
- return errors.Wrap(err, "can't push module patch")
+ return errors.Wrap(err, "pushing module patch")
}
}
@@ -130,15 +129,15 @@ func (c *gitPush) Execute(ctx context.Context, comm client.Communicator, logger
}
if len(mainPatch.PatchSet.Summary) == 0 {
- logger.Execution().Infof("Skipping empty main patch on patch id '%s'", p.Id.Hex())
+ logger.Execution().Infof("Skipping empty main patch on patch '%s'.", p.Id.Hex())
continue
}
- logger.Execution().Info("Pushing patch")
+ logger.Execution().Info("Pushing patch.")
params.directory = filepath.ToSlash(getJoinedWithWorkDir(conf, c.Directory))
params.branch = conf.ProjectRef.Branch
if err = c.pushPatch(ctx, logger, params); err != nil {
- return errors.Wrap(err, "can't push patch")
+ return errors.Wrap(err, "pushing patch")
}
}
@@ -158,7 +157,7 @@ func (c *gitPush) pushPatch(ctx context.Context, logger client.LoggerProducer, p
jpm := c.JasperManager()
stdErr := noopWriteCloser{&bytes.Buffer{}}
- pushCommand := fmt.Sprintf("git push origin %s", p.branch)
+ pushCommand := fmt.Sprintf("git push origin refs/heads/%s", p.branch)
logger.Execution().Debugf("git push command: %s", pushCommand)
cmd := jpm.CreateCommand(ctx).Directory(p.directory).Append(pushCommand).
SetOutputSender(level.Info, logger.Task().GetSender()).SetErrorWriter(stdErr)
@@ -171,7 +170,7 @@ func (c *gitPush) pushPatch(ctx context.Context, logger client.LoggerProducer, p
logger.Execution().Error(errorOutput)
}
if err != nil {
- return errors.Wrap(err, "can't push to remote")
+ return errors.Wrap(err, "pushing to remote")
}
return nil
diff --git a/agent/command/git_push_test.go b/agent/command/git_push_test.go
index 03e8844d271..a5f22595bf4 100644
--- a/agent/command/git_push_test.go
+++ b/agent/command/git_push_test.go
@@ -4,17 +4,15 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
"os"
"path"
"strings"
"testing"
+ "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/thirdparty"
@@ -37,12 +35,13 @@ func TestGitPush(t *testing.T) {
conf := &internal.TaskConfig{
Task: &task.Task{},
ProjectRef: &model.ProjectRef{Branch: "main"},
- Distro: &apimodels.DistroView{CloneMethod: distro.CloneMethodOAuth},
Expansions: &util.Expansions{},
}
logger, err := comm.GetLoggerProducer(context.Background(), client.TaskData{}, nil)
require.NoError(t, err)
+ assert.Equal(t, conf.GetCloneMethod(), evergreen.CloneMethodOAuth)
+
var splitCommand []string
for name, test := range map[string]func(*testing.T){
"Execute": func(*testing.T) {
@@ -78,7 +77,7 @@ func TestGitPush(t *testing.T) {
commands := []string{
"git checkout main",
- "git push origin main",
+ "git push origin refs/heads/main",
}
assert.Len(t, manager.Procs, len(commands))
@@ -97,11 +96,9 @@ func TestGitPush(t *testing.T) {
c.base.jasper = jpm
c.DryRun = true
- var repoDir string
- repoDir, err = ioutil.TempDir("", "test_repo")
- require.NoError(t, err)
- require.NoError(t, ioutil.WriteFile(path.Join(repoDir, "test1.txt"), []byte("test1"), 0644))
- require.NoError(t, ioutil.WriteFile(path.Join(repoDir, "test2.txt"), []byte("test2"), 0644))
+ repoDir := t.TempDir()
+ require.NoError(t, os.WriteFile(path.Join(repoDir, "test1.txt"), []byte("test1"), 0644))
+ require.NoError(t, os.WriteFile(path.Join(repoDir, "test2.txt"), []byte("test2"), 0644))
// create repo
createRepoCommands := []string{
@@ -112,7 +109,7 @@ func TestGitPush(t *testing.T) {
cmd := jpm.CreateCommand(ctx).Directory(repoDir).Append(createRepoCommands...)
require.NoError(t, cmd.Run(ctx))
- require.NoError(t, ioutil.WriteFile(path.Join(repoDir, "test3.txt"), []byte("test3"), 0644))
+ require.NoError(t, os.WriteFile(path.Join(repoDir, "test3.txt"), []byte("test3"), 0644))
toApplyCommands := []string{
`git rm test1.txt`,
`git add test3.txt`,
@@ -136,8 +133,6 @@ func TestGitPush(t *testing.T) {
require.Len(t, filesChangedSlice, 2)
assert.Equal(t, "test1.txt", filesChangedSlice[0])
assert.Equal(t, "test3.txt", filesChangedSlice[1])
-
- assert.NoError(t, os.RemoveAll(repoDir))
},
"PushPatchMock": func(*testing.T) {
manager := &mock.Manager{}
@@ -157,7 +152,7 @@ func TestGitPush(t *testing.T) {
assert.NoError(t, c.pushPatch(context.Background(), logger, params))
commands := []string{
- "git push origin main",
+ "git push origin refs/heads/main",
}
require.Len(t, manager.Procs, len(commands))
for i, proc := range manager.Procs {
diff --git a/agent/command/git_test.go b/agent/command/git_test.go
index be50a5100f6..b057d5b135e 100644
--- a/agent/command/git_test.go
+++ b/agent/command/git_test.go
@@ -4,7 +4,6 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -19,19 +18,22 @@ import (
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/build"
- "github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/host"
+ "github.com/evergreen-ci/evergreen/model/manifest"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
modelutil "github.com/evergreen-ci/evergreen/model/testutil"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/evergreen/util"
- "github.com/mongodb/grip"
+ "github.com/evergreen-ci/utility"
"github.com/mongodb/grip/level"
"github.com/mongodb/grip/send"
"github.com/mongodb/jasper"
+ "github.com/pkg/errors"
+ . "github.com/smartystreets/goconvey/convey"
"github.com/smartystreets/goconvey/convey/reporting"
+ "github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
@@ -42,7 +44,6 @@ const (
type GitGetProjectSuite struct {
settings *evergreen.Settings
- jasper jasper.Manager
modelData1 *modelutil.TestModelData // test model for TestGitPlugin
taskConfig1 *internal.TaskConfig
modelData2 *modelutil.TestModelData // test model for TestValidateGitCommands
@@ -56,6 +57,10 @@ type GitGetProjectSuite struct {
modelData6 *modelutil.TestModelData
taskConfig6 *internal.TaskConfig // used for TestMergeMultiplePatches
+ comm *client.Mock
+ jasper jasper.Manager
+ ctx context.Context
+ cancel context.CancelFunc
suite.Suite
}
@@ -65,13 +70,6 @@ func init() {
func TestGitGetProjectSuite(t *testing.T) {
s := new(GitGetProjectSuite)
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- env := testutil.NewEnvironment(ctx, t)
- settings := env.Settings()
-
- testutil.ConfigureIntegrationTest(t, settings, "TestGitGetProjectSuite")
- s.settings = settings
suite.Run(t, s)
}
@@ -79,12 +77,22 @@ func (s *GitGetProjectSuite) SetupSuite() {
var err error
s.jasper, err = jasper.NewSynchronizedManager(false)
s.Require().NoError(err)
+
+ s.comm = client.NewMock("http://localhost.com")
+
+ s.ctx, s.cancel = context.WithCancel(context.Background())
+ env := testutil.NewEnvironment(s.ctx, s.T())
+ settings := env.Settings()
+
+ testutil.ConfigureIntegrationTest(s.T(), settings, s.T().Name())
+ s.settings = settings
}
func (s *GitGetProjectSuite) SetupTest() {
s.NoError(db.ClearCollections(patch.Collection, build.Collection, task.Collection,
model.VersionCollection, host.Collection, model.TaskLogCollection))
var err error
+
configPath1 := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "git", "plugin_clone.yml")
configPath2 := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "git", "test_config.yml")
configPath3 := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "git", "no_token.yml")
@@ -93,18 +101,18 @@ func (s *GitGetProjectSuite) SetupTest() {
s.modelData1, err = modelutil.SetupAPITestData(s.settings, "testtask1", "rhel55", configPath1, modelutil.NoPatch)
s.Require().NoError(err)
- s.taskConfig1, err = agentutil.MakeTaskConfigFromModelData(s.settings, s.modelData1)
+ s.taskConfig1, err = agentutil.MakeTaskConfigFromModelData(s.ctx, s.settings, s.modelData1)
s.Require().NoError(err)
s.taskConfig1.Expansions = util.NewExpansions(map[string]string{evergreen.GlobalGitHubTokenExpansion: fmt.Sprintf("token " + globalGitHubToken)})
s.Require().NoError(err)
s.modelData2, err = modelutil.SetupAPITestData(s.settings, "testtask1", "rhel55", configPath2, modelutil.NoPatch)
s.Require().NoError(err)
- s.taskConfig2, err = agentutil.MakeTaskConfigFromModelData(s.settings, s.modelData2)
+ s.taskConfig2, err = agentutil.MakeTaskConfigFromModelData(s.ctx, s.settings, s.modelData2)
s.Require().NoError(err)
s.taskConfig2.Expansions = util.NewExpansions(s.settings.Credentials)
s.taskConfig2.Expansions.Put("prefixpath", "hello")
- //SetupAPITestData always creates BuildVariant with no modules so this line works around that
+ // SetupAPITestData always creates BuildVariant with no modules so this line works around that
s.taskConfig2.BuildVariant.Modules = []string{"sample"}
s.modelData2.Task.Requester = evergreen.PatchVersionRequester
err = setupTestPatchData(s.modelData1, patchPath, s.T())
@@ -112,7 +120,7 @@ func (s *GitGetProjectSuite) SetupTest() {
s.modelData3, err = modelutil.SetupAPITestData(s.settings, "testtask1", "rhel55", configPath2, modelutil.NoPatch)
s.Require().NoError(err)
- s.taskConfig3, err = agentutil.MakeTaskConfigFromModelData(s.settings, s.modelData3)
+ s.taskConfig3, err = agentutil.MakeTaskConfigFromModelData(s.ctx, s.settings, s.modelData3)
s.Require().NoError(err)
s.taskConfig3.Expansions = util.NewExpansions(s.settings.Credentials)
s.taskConfig3.GithubPatchData = thirdparty.GithubPatch{
@@ -128,7 +136,7 @@ func (s *GitGetProjectSuite) SetupTest() {
s.modelData4, err = modelutil.SetupAPITestData(s.settings, "testtask1", "rhel55", configPath2, modelutil.MergePatch)
s.Require().NoError(err)
- s.taskConfig4, err = agentutil.MakeTaskConfigFromModelData(s.settings, s.modelData4)
+ s.taskConfig4, err = agentutil.MakeTaskConfigFromModelData(s.ctx, s.settings, s.modelData4)
s.Require().NoError(err)
s.taskConfig4.Expansions = util.NewExpansions(s.settings.Credentials)
s.taskConfig4.GithubPatchData = thirdparty.GithubPatch{
@@ -137,14 +145,14 @@ func (s *GitGetProjectSuite) SetupTest() {
}
s.modelData5, err = modelutil.SetupAPITestData(s.settings, "testtask1", "rhel55", configPath3, modelutil.MergePatch)
s.Require().NoError(err)
- s.taskConfig5, err = agentutil.MakeTaskConfigFromModelData(s.settings, s.modelData5)
+ s.taskConfig5, err = agentutil.MakeTaskConfigFromModelData(s.ctx, s.settings, s.modelData5)
s.Require().NoError(err)
s.modelData6, err = modelutil.SetupAPITestData(s.settings, "testtask1", "linux-64", configPath4, modelutil.InlinePatch)
s.Require().NoError(err)
s.modelData6.Task.Requester = evergreen.MergeTestRequester
s.Require().NoError(err)
- s.taskConfig6, err = agentutil.MakeTaskConfigFromModelData(s.settings, s.modelData6)
+ s.taskConfig6, err = agentutil.MakeTaskConfigFromModelData(s.ctx, s.settings, s.modelData6)
s.Require().NoError(err)
s.taskConfig6.Expansions = util.NewExpansions(map[string]string{evergreen.GlobalGitHubTokenExpansion: fmt.Sprintf("token " + globalGitHubToken)})
s.taskConfig6.BuildVariant.Modules = []string{"evergreen"}
@@ -156,9 +164,10 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandUsesHTTPS() {
Token: projectGitHubToken,
}
conf := s.taskConfig1
-
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
opts := cloneOpts{
- method: distro.CloneMethodOAuth,
+ method: evergreen.CloneMethodOAuth,
owner: conf.ProjectRef.Owner,
repo: conf.ProjectRef.Repo,
branch: conf.ProjectRef.Branch,
@@ -166,7 +175,7 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandUsesHTTPS() {
token: c.Token,
}
s.Require().NoError(opts.setLocation())
- cmds, _ := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, _ := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'master'", cmds[5])
}
@@ -175,9 +184,11 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandWithHTTPSNeedsToken() {
Directory: "dir",
}
conf := s.taskConfig1
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
opts := cloneOpts{
- method: distro.CloneMethodOAuth,
+ method: evergreen.CloneMethodOAuth,
owner: conf.ProjectRef.Owner,
repo: conf.ProjectRef.Repo,
branch: conf.ProjectRef.Branch,
@@ -185,7 +196,7 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandWithHTTPSNeedsToken() {
token: "",
}
s.Require().NoError(opts.setLocation())
- _, err := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ _, err = c.buildCloneCommand(context.Background(), s.comm, logger, conf, opts)
s.Error(err)
}
@@ -195,16 +206,18 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandUsesSSH() {
Token: "",
}
conf := s.taskConfig2
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
opts := cloneOpts{
- method: distro.CloneMethodLegacySSH,
+ method: evergreen.CloneMethodLegacySSH,
owner: "deafgoat",
repo: "mci_test",
branch: "main",
dir: c.Directory,
}
s.Require().NoError(opts.setLocation())
- cmds, err := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, err := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.Require().NoError(err)
s.Equal("git clone 'git@github.com:deafgoat/mci_test.git' 'dir' --branch 'main'", cmds[3])
}
@@ -214,6 +227,8 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandDefaultCloneMethodUsesSSH() {
Directory: "dir",
}
conf := s.taskConfig2
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
opts := cloneOpts{
owner: conf.ProjectRef.Owner,
@@ -222,30 +237,52 @@ func (s *GitGetProjectSuite) TestBuildCloneCommandDefaultCloneMethodUsesSSH() {
dir: c.Directory,
}
s.Require().NoError(opts.setLocation())
- cmds, err := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, err := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.Require().NoError(err)
s.Equal("git clone 'git@github.com:evergreen-ci/sample.git' 'dir' --branch 'main'", cmds[3])
}
+func (s *GitGetProjectSuite) TestBuildCloneCommandCloneDepth() {
+ c := &gitFetchProject{
+ Directory: "dir",
+ }
+ conf := s.taskConfig2
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
+
+ opts := cloneOpts{
+ owner: conf.ProjectRef.Owner,
+ repo: conf.ProjectRef.Repo,
+ branch: conf.ProjectRef.Branch,
+ dir: c.Directory,
+ cloneDepth: 50,
+ }
+ s.Require().NoError(opts.setLocation())
+ cmds, err := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
+ s.Require().NoError(err)
+ combined := strings.Join(cmds, " ")
+ s.Contains(combined, "--depth 50")
+ s.Contains(combined, "git log HEAD..")
+}
+
func (s *GitGetProjectSuite) TestGitPlugin() {
conf := s.taskConfig1
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
token, err := s.settings.GetGithubOauthToken()
s.Require().NoError(err)
conf.Expansions.Put("github", token)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
- s.NoError(err)
for _, task := range conf.Project.Tasks {
s.NotEqual(len(task.Commands), 0)
for _, command := range task.Commands {
- pluginCmds, err := Render(command, conf.Project)
+ pluginCmds, err := Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
+ err = pluginCmds[0].Execute(ctx, s.comm, logger, conf)
s.NoError(err)
}
}
@@ -259,35 +296,34 @@ func (s *GitGetProjectSuite) TestGitFetchRetries() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ logger, err := s.comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
s.NoError(err)
- err = c.Execute(ctx, comm, logger, conf)
+ err = c.Execute(ctx, s.comm, logger, conf)
s.Error(err)
}
func (s *GitGetProjectSuite) TestTokenScrubbedFromLogger() {
conf := s.taskConfig1
conf.ProjectRef.Repo = "doesntexist"
- conf.Distro.CloneMethod = distro.CloneMethodOAuth
+ conf.Distro = nil
token, err := s.settings.GetGithubOauthToken()
s.Require().NoError(err)
conf.Expansions.Put(evergreen.GlobalGitHubTokenExpansion, token)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+
+ logger, err := s.comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
s.NoError(err)
for _, task := range conf.Project.Tasks {
s.NotEqual(len(task.Commands), 0)
for _, command := range task.Commands {
- pluginCmds, err := Render(command, conf.Project)
+ pluginCmds, err := Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
+ err = pluginCmds[0].Execute(ctx, s.comm, logger, conf)
s.Error(err)
}
}
@@ -295,7 +331,7 @@ func (s *GitGetProjectSuite) TestTokenScrubbedFromLogger() {
s.NoError(logger.Close())
foundCloneCommand := false
foundCloneErr := false
- for _, msgs := range comm.GetMockMessages() {
+ for _, msgs := range s.comm.GetMockMessages() {
for _, msg := range msgs {
if strings.Contains(msg.Message, "https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/doesntexist.git") {
foundCloneCommand = true
@@ -317,21 +353,20 @@ func (s *GitGetProjectSuite) TestStdErrLogged() {
s.T().Skip("TestStdErrLogged will not run on docker since it requires a SSH key")
}
conf := s.taskConfig5
- conf.Distro.CloneMethod = distro.CloneMethodLegacySSH
+ conf.Distro.CloneMethod = evergreen.CloneMethodLegacySSH
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ logger, err := s.comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
s.NoError(err)
for _, task := range conf.Project.Tasks {
s.NotEqual(len(task.Commands), 0)
for _, command := range task.Commands {
- pluginCmds, err := Render(command, conf.Project)
+ pluginCmds, err := Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
+ err = pluginCmds[0].Execute(ctx, s.comm, logger, conf)
s.Error(err)
}
}
@@ -340,7 +375,7 @@ func (s *GitGetProjectSuite) TestStdErrLogged() {
foundCloneCommand := false
foundCloneErr := false
foundSSHErr := false
- for _, msgs := range comm.GetMockMessages() {
+ for _, msgs := range s.comm.GetMockMessages() {
for _, msg := range msgs {
if strings.Contains(msg.Message, "git clone 'git@github.com:evergreen-ci/doesntexist.git' 'src' --branch 'main'") {
foundCloneCommand = true
@@ -358,27 +393,26 @@ func (s *GitGetProjectSuite) TestStdErrLogged() {
}
func (s *GitGetProjectSuite) TestValidateGitCommands() {
- const refToCompare = "cf46076567e4949f9fc68e0634139d4ac495c89b" //note: also defined in test_config.yml
+ const refToCompare = "cf46076567e4949f9fc68e0634139d4ac495c89b" // Note: also defined in test_config.yml
conf := s.taskConfig2
- conf.Distro.CloneMethod = distro.CloneMethodOAuth
+ conf.Distro.CloneMethod = evergreen.CloneMethodOAuth
token, err := s.settings.GetGithubOauthToken()
s.Require().NoError(err)
conf.Expansions.Put(evergreen.GlobalGitHubTokenExpansion, token)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ logger, err := s.comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
s.NoError(err)
var pluginCmds []Command
for _, task := range conf.Project.Tasks {
for _, command := range task.Commands {
- pluginCmds, err = Render(command, conf.Project)
+ pluginCmds, err = Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
+ err = pluginCmds[0].Execute(ctx, s.comm, logger, conf)
s.NoError(err)
}
}
@@ -388,7 +422,7 @@ func (s *GitGetProjectSuite) TestValidateGitCommands() {
cmd.Stdout = &out
err = cmd.Run()
s.NoError(err)
- ref := strings.Trim(out.String(), "\n") // revision that we actually checked out
+ ref := strings.Trim(out.String(), "\n") // Revision that we actually checked out
s.Equal(refToCompare, ref)
s.Equal("hello/module", conf.ModulePaths["sample"])
}
@@ -402,20 +436,21 @@ func (s *GitGetProjectSuite) TestBuildHTTPCloneCommand() {
// build clone command to clone by http, main branch with token into 'dir'
opts := cloneOpts{
- method: distro.CloneMethodOAuth,
- owner: projectRef.Owner,
- repo: projectRef.Repo,
- branch: projectRef.Branch,
- dir: "dir",
- token: projectGitHubToken,
+ method: evergreen.CloneMethodOAuth,
+ owner: projectRef.Owner,
+ repo: projectRef.Repo,
+ branch: projectRef.Branch,
+ dir: "dir",
+ token: projectGitHubToken,
+ cloneParams: "--filter=tree:0 --single-branch",
}
s.Require().NoError(opts.setLocation())
cmds, err := opts.buildHTTPCloneCommand()
s.NoError(err)
s.Require().Len(cmds, 5)
s.Equal("set +o xtrace", cmds[0])
- s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main'\"", cmds[1])
- s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main'", cmds[2])
+ s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main' --filter=tree:0 --single-branch\"", cmds[1])
+ s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main' --filter=tree:0 --single-branch", cmds[2])
s.Equal("set -o xtrace", cmds[3])
s.Equal("cd dir", cmds[4])
@@ -425,8 +460,8 @@ func (s *GitGetProjectSuite) TestBuildHTTPCloneCommand() {
s.NoError(err)
s.Require().Len(cmds, 5)
s.Equal("set +o xtrace", cmds[0])
- s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir'\"", cmds[1])
- s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir'", cmds[2])
+ s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --filter=tree:0 --single-branch\"", cmds[1])
+ s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --filter=tree:0 --single-branch", cmds[2])
s.Equal("set -o xtrace", cmds[3])
s.Equal("cd dir", cmds[4])
@@ -437,8 +472,8 @@ func (s *GitGetProjectSuite) TestBuildHTTPCloneCommand() {
cmds, err = opts.buildHTTPCloneCommand()
s.NoError(err)
s.Require().Len(cmds, 5)
- s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main'\"", cmds[1])
- s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main'", cmds[2])
+ s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main' --filter=tree:0 --single-branch\"", cmds[1])
+ s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@github.com/deafgoat/mci_test.git 'dir' --branch 'main' --filter=tree:0 --single-branch", cmds[2])
// ensure that we aren't sending the github oauth token to other
// servers
@@ -446,24 +481,25 @@ func (s *GitGetProjectSuite) TestBuildHTTPCloneCommand() {
cmds, err = opts.buildHTTPCloneCommand()
s.NoError(err)
s.Require().Len(cmds, 5)
- s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@someothergithost.com/deafgoat/mci_test.git 'dir' --branch 'main'\"", cmds[1])
- s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@someothergithost.com/deafgoat/mci_test.git 'dir' --branch 'main'", cmds[2])
+ s.Equal("echo \"git clone https://[redacted oauth token]:x-oauth-basic@someothergithost.com/deafgoat/mci_test.git 'dir' --branch 'main' --filter=tree:0 --single-branch\"", cmds[1])
+ s.Equal("git clone https://PROJECTTOKEN:x-oauth-basic@someothergithost.com/deafgoat/mci_test.git 'dir' --branch 'main' --filter=tree:0 --single-branch", cmds[2])
}
func (s *GitGetProjectSuite) TestBuildSSHCloneCommand() {
// ssh clone command with branch
opts := cloneOpts{
- method: distro.CloneMethodLegacySSH,
- owner: "deafgoat",
- repo: "mci_test",
- branch: "main",
- dir: "dir",
+ method: evergreen.CloneMethodLegacySSH,
+ owner: "deafgoat",
+ repo: "mci_test",
+ branch: "main",
+ dir: "dir",
+ cloneParams: "--filter=tree:0 --single-branch",
}
s.Require().NoError(opts.setLocation())
cmds, err := opts.buildSSHCloneCommand()
s.NoError(err)
s.Len(cmds, 2)
- s.Equal("git clone 'git@github.com:deafgoat/mci_test.git' 'dir' --branch 'main'", cmds[0])
+ s.Equal("git clone 'git@github.com:deafgoat/mci_test.git' 'dir' --branch 'main' --filter=tree:0 --single-branch", cmds[0])
s.Equal("cd dir", cmds[1])
// ssh clone command without branch
@@ -471,12 +507,14 @@ func (s *GitGetProjectSuite) TestBuildSSHCloneCommand() {
cmds, err = opts.buildSSHCloneCommand()
s.NoError(err)
s.Len(cmds, 2)
- s.Equal("git clone 'git@github.com:deafgoat/mci_test.git' 'dir'", cmds[0])
+ s.Equal("git clone 'git@github.com:deafgoat/mci_test.git' 'dir' --filter=tree:0 --single-branch", cmds[0])
s.Equal("cd dir", cmds[1])
}
func (s *GitGetProjectSuite) TestBuildCommand() {
conf := s.taskConfig1
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
c := gitFetchProject{
Directory: "dir",
@@ -485,14 +523,14 @@ func (s *GitGetProjectSuite) TestBuildCommand() {
// ensure clone command with legacy SSH contains "git@github.com"
opts := cloneOpts{
- method: distro.CloneMethodLegacySSH,
+ method: evergreen.CloneMethodLegacySSH,
branch: conf.ProjectRef.Branch,
owner: conf.ProjectRef.Owner,
repo: conf.ProjectRef.Repo,
dir: c.Directory,
}
s.Require().NoError(opts.setLocation())
- cmds, err := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, err := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.NoError(err)
s.Require().Len(cmds, 7)
s.Equal("set -o xtrace", cmds[0])
@@ -505,11 +543,11 @@ func (s *GitGetProjectSuite) TestBuildCommand() {
// ensure clone command with location containing "https://github.com" uses
// HTTPS.
- opts.method = distro.CloneMethodOAuth
+ opts.method = evergreen.CloneMethodOAuth
opts.token = c.Token
s.Require().NoError(opts.setLocation())
s.Require().NoError(err)
- cmds, err = c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, err = c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.NoError(err)
s.Require().Len(cmds, 10)
s.Equal("set -o xtrace", cmds[0])
@@ -526,12 +564,15 @@ func (s *GitGetProjectSuite) TestBuildCommand() {
func (s *GitGetProjectSuite) TestBuildCommandForPullRequests() {
conf := s.taskConfig3
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
+
c := gitFetchProject{
Directory: "dir",
}
opts := cloneOpts{
- method: distro.CloneMethodLegacySSH,
+ method: evergreen.CloneMethodLegacySSH,
branch: conf.ProjectRef.Branch,
owner: conf.ProjectRef.Owner,
repo: conf.ProjectRef.Repo,
@@ -539,7 +580,7 @@ func (s *GitGetProjectSuite) TestBuildCommandForPullRequests() {
}
s.Require().NoError(opts.setLocation())
- cmds, err := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, err := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.NoError(err)
s.Require().Len(cmds, 9)
s.True(strings.HasPrefix(cmds[5], "git fetch origin \"pull/9001/head:evg-pr-test-"))
@@ -550,13 +591,16 @@ func (s *GitGetProjectSuite) TestBuildCommandForPullRequests() {
func (s *GitGetProjectSuite) TestBuildCommandForCLIMergeTests() {
conf := s.taskConfig2
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ s.NoError(err)
+
c := gitFetchProject{
Directory: "dir",
Token: projectGitHubToken,
}
opts := cloneOpts{
- method: distro.CloneMethodOAuth,
+ method: evergreen.CloneMethodOAuth,
branch: conf.ProjectRef.Branch,
owner: conf.ProjectRef.Owner,
repo: conf.ProjectRef.Repo,
@@ -567,7 +611,7 @@ func (s *GitGetProjectSuite) TestBuildCommandForCLIMergeTests() {
s.Require().NoError(opts.setLocation())
s.taskConfig2.Task.Requester = evergreen.MergeTestRequester
- cmds, err := c.buildCloneCommand(context.Background(), conf, nil, opts)
+ cmds, err := c.buildCloneCommand(s.ctx, s.comm, logger, conf, opts)
s.NoError(err)
s.Len(cmds, 9)
s.True(strings.HasSuffix(cmds[5], fmt.Sprintf("--branch '%s'", s.taskConfig2.ProjectRef.Branch)))
@@ -581,7 +625,7 @@ func (s *GitGetProjectSuite) TestBuildModuleCommand() {
}
opts := cloneOpts{
- method: distro.CloneMethodLegacySSH,
+ method: evergreen.CloneMethodLegacySSH,
owner: "deafgoat",
repo: "mci_test",
dir: "module",
@@ -599,7 +643,7 @@ func (s *GitGetProjectSuite) TestBuildModuleCommand() {
s.Equal("git checkout 'main'", cmds[4])
// ensure module clone command with http URL injects token
- opts.method = distro.CloneMethodOAuth
+ opts.method = evergreen.CloneMethodOAuth
opts.token = c.Token
s.Require().NoError(opts.setLocation())
cmds, err = c.buildModuleCloneCommand(conf, opts, "main", nil)
@@ -631,7 +675,7 @@ func (s *GitGetProjectSuite) TestBuildModuleCommand() {
Patch: "1234",
},
}
- opts.method = distro.CloneMethodLegacySSH
+ opts.method = evergreen.CloneMethodLegacySSH
s.Require().NoError(opts.setLocation())
cmds, err = c.buildModuleCloneCommand(conf, opts, "main", module)
s.NoError(err)
@@ -658,7 +702,7 @@ func (s *GitGetProjectSuite) TestGetApplyCommand() {
Task: &task.Task{},
}
patchPath := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "git", "test.patch")
- applyCommand, err := c.getApplyCommand(patchPath, tc)
+ applyCommand, err := c.getApplyCommand(patchPath, tc, false)
s.NoError(err)
s.Equal(fmt.Sprintf("git apply --binary --index < '%s'", patchPath), applyCommand)
@@ -669,7 +713,7 @@ func (s *GitGetProjectSuite) TestGetApplyCommand() {
},
}
patchPath = filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "git", "test_mbox.patch")
- applyCommand, err = c.getApplyCommand(patchPath, tc)
+ applyCommand, err = c.getApplyCommand(patchPath, tc, false)
s.NoError(err)
s.Equal(fmt.Sprintf(`GIT_COMMITTER_NAME="%s" GIT_COMMITTER_EMAIL="%s" git am --keep-cr --keep < "%s"`, c.CommitterName, c.CommitterEmail, patchPath), applyCommand)
}
@@ -685,19 +729,18 @@ func (s *GitGetProjectSuite) TestCorrectModuleRevisionSetModule() {
},
},
})
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ logger, err := s.comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
s.NoError(err)
for _, task := range conf.Project.Tasks {
s.NotEqual(len(task.Commands), 0)
for _, command := range task.Commands {
var pluginCmds []Command
- pluginCmds, err = Render(command, conf.Project)
+ pluginCmds, err = Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
+ err = pluginCmds[0].Execute(ctx, s.comm, logger, conf)
s.NoError(err)
}
}
@@ -711,9 +754,9 @@ func (s *GitGetProjectSuite) TestCorrectModuleRevisionSetModule() {
ref := strings.Trim(out.String(), "\n")
s.Equal(correctHash, ref) // this revision is defined in the patch, returned by GetTaskPatch
s.NoError(logger.Close())
- toCheck := `Using revision/ref 'b27779f856b211ffaf97cbc124b7082a20ea8bc0' for module 'sample' (reason: specified in set-module)`
+ toCheck := `Using revision/ref 'b27779f856b211ffaf97cbc124b7082a20ea8bc0' for module 'sample' (reason: specified in set-module).`
foundMsg := false
- for _, task := range comm.GetMockMessages() {
+ for _, task := range s.comm.GetMockMessages() {
for _, msg := range task {
if msg.Message == toCheck {
foundMsg = true
@@ -728,20 +771,18 @@ func (s *GitGetProjectSuite) TestCorrectModuleRevisionManifest() {
const correctHash = "3585388b1591dfca47ac26a5b9a564ec8f138a5e"
conf := s.taskConfig2
conf.Expansions.Put(moduleRevExpansionName("sample"), correctHash)
- ctx := context.Background()
- comm := client.NewMock("http://localhost.com")
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ logger, err := s.comm.GetLoggerProducer(s.ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
s.NoError(err)
for _, task := range conf.Project.Tasks {
s.NotEqual(len(task.Commands), 0)
for _, command := range task.Commands {
var pluginCmds []Command
- pluginCmds, err = Render(command, conf.Project)
+ pluginCmds, err = Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
+ err = pluginCmds[0].Execute(s.ctx, s.comm, logger, conf)
s.NoError(err)
}
}
@@ -755,9 +796,9 @@ func (s *GitGetProjectSuite) TestCorrectModuleRevisionManifest() {
ref := strings.Trim(out.String(), "\n")
s.Equal(correctHash, ref)
s.NoError(logger.Close())
- toCheck := `Using revision/ref '3585388b1591dfca47ac26a5b9a564ec8f138a5e' for module 'sample' (reason: from manifest)`
+ toCheck := `Using revision/ref '3585388b1591dfca47ac26a5b9a564ec8f138a5e' for module 'sample' (reason: from manifest).`
foundMsg := false
- for _, task := range comm.GetMockMessages() {
+ for _, task := range s.comm.GetMockMessages() {
for _, msg := range task {
if msg.Message == toCheck {
foundMsg = true
@@ -775,14 +816,11 @@ func (s *GitGetProjectSuite) TearDownSuite() {
if s.taskConfig2 != nil {
s.NoError(os.RemoveAll(s.taskConfig2.WorkDir))
}
+ s.cancel()
}
func (s *GitGetProjectSuite) TestAllowsEmptyPatches() {
- dir, err := ioutil.TempDir("", "evg-test")
- s.Require().NoError(err)
- defer func() {
- s.NoError(os.RemoveAll(dir))
- }()
+ dir := s.T().TempDir()
c := gitFetchProject{
Directory: dir,
@@ -803,7 +841,7 @@ func (s *GitGetProjectSuite) TestAllowsEmptyPatches() {
WorkDir: dir,
}
- s.NoError(c.applyPatch(ctx, logger, &conf, []patch.ModulePatch{{}}))
+ s.NoError(c.applyPatch(ctx, logger, &conf, []patch.ModulePatch{{}}, false))
s.Equal(1, sender.Len())
msg := sender.GetMessage()
@@ -822,15 +860,15 @@ func (s *GitGetProjectSuite) TestCloneOptsSetLocationGitHub() {
s.Require().NoError(opts.setLocation())
s.Equal("git@github.com:foo/bar.git", opts.location)
- opts.method = distro.CloneMethodLegacySSH
+ opts.method = evergreen.CloneMethodLegacySSH
s.Require().NoError(opts.setLocation())
s.Equal("git@github.com:foo/bar.git", opts.location)
- opts.method = distro.CloneMethodOAuth
+ opts.method = evergreen.CloneMethodOAuth
s.Require().NoError(opts.setLocation())
s.Equal("https://github.com/foo/bar.git", opts.location)
- opts.method = distro.CloneMethodLegacySSH
+ opts.method = evergreen.CloneMethodLegacySSH
opts.token = globalGitHubToken
s.Require().NoError(opts.setLocation())
s.Equal("git@github.com:foo/bar.git", opts.location)
@@ -845,60 +883,60 @@ func (s *GitGetProjectSuite) TestGetProjectMethodAndToken() {
var method string
var err error
- method, token, err = getProjectMethodAndToken(projectGitHubToken, globalGitHubToken, distro.CloneMethodOAuth)
+ method, token, err = getProjectMethodAndToken(projectGitHubToken, globalGitHubToken, evergreen.CloneMethodOAuth)
s.NoError(err)
s.Equal(projectGitHubToken, token)
- s.Equal(distro.CloneMethodOAuth, method)
+ s.Equal(evergreen.CloneMethodOAuth, method)
- method, token, err = getProjectMethodAndToken(projectGitHubToken, globalGitHubToken, distro.CloneMethodLegacySSH)
+ method, token, err = getProjectMethodAndToken(projectGitHubToken, globalGitHubToken, evergreen.CloneMethodLegacySSH)
s.NoError(err)
s.Equal(projectGitHubToken, token)
- s.Equal(distro.CloneMethodOAuth, method)
+ s.Equal(evergreen.CloneMethodOAuth, method)
- method, token, err = getProjectMethodAndToken(projectGitHubToken, "", distro.CloneMethodOAuth)
+ method, token, err = getProjectMethodAndToken(projectGitHubToken, "", evergreen.CloneMethodOAuth)
s.NoError(err)
s.Equal(projectGitHubToken, token)
- s.Equal(distro.CloneMethodOAuth, method)
+ s.Equal(evergreen.CloneMethodOAuth, method)
- method, token, err = getProjectMethodAndToken(projectGitHubToken, "", distro.CloneMethodLegacySSH)
+ method, token, err = getProjectMethodAndToken(projectGitHubToken, "", evergreen.CloneMethodLegacySSH)
s.NoError(err)
s.Equal(projectGitHubToken, token)
- s.Equal(distro.CloneMethodOAuth, method)
+ s.Equal(evergreen.CloneMethodOAuth, method)
- method, token, err = getProjectMethodAndToken("", globalGitHubToken, distro.CloneMethodOAuth)
+ method, token, err = getProjectMethodAndToken("", globalGitHubToken, evergreen.CloneMethodOAuth)
s.NoError(err)
s.Equal(globalGitHubToken, token)
- s.Equal(distro.CloneMethodOAuth, method)
+ s.Equal(evergreen.CloneMethodOAuth, method)
- method, token, err = getProjectMethodAndToken("", "", distro.CloneMethodLegacySSH)
+ method, token, err = getProjectMethodAndToken("", "", evergreen.CloneMethodLegacySSH)
s.NoError(err)
s.Equal("", token)
- s.Equal(distro.CloneMethodLegacySSH, method)
+ s.Equal(evergreen.CloneMethodLegacySSH, method)
- method, token, err = getProjectMethodAndToken("", "", distro.CloneMethodOAuth)
+ method, token, err = getProjectMethodAndToken("", "", evergreen.CloneMethodOAuth)
s.Error(err)
s.Equal("", token)
- s.Equal(distro.CloneMethodLegacySSH, method)
+ s.Equal(evergreen.CloneMethodLegacySSH, method)
- method, token, err = getProjectMethodAndToken("", "", distro.CloneMethodLegacySSH)
+ method, token, err = getProjectMethodAndToken("", "", evergreen.CloneMethodLegacySSH)
s.NoError(err)
s.Equal("", token)
- s.Equal(distro.CloneMethodLegacySSH, method)
+ s.Equal(evergreen.CloneMethodLegacySSH, method)
method, token, err = getProjectMethodAndToken("", "", "")
s.NoError(err)
s.Equal("", token)
- s.Equal(distro.CloneMethodLegacySSH, method)
+ s.Equal(evergreen.CloneMethodLegacySSH, method)
method, token, err = getProjectMethodAndToken("", "", "foobar")
s.Error(err)
s.Equal("", token)
s.Equal("", method)
- _, _, err = getProjectMethodAndToken("", "token this is an invalid token", distro.CloneMethodOAuth)
+ _, _, err = getProjectMethodAndToken("", "token this is an invalid token", evergreen.CloneMethodOAuth)
s.Error(err)
- _, _, err = getProjectMethodAndToken("token this is an invalid token", "", distro.CloneMethodOAuth)
+ _, _, err = getProjectMethodAndToken("token this is an invalid token", "", evergreen.CloneMethodOAuth)
s.Error(err)
}
@@ -929,10 +967,9 @@ func (s *GitGetProjectSuite) TestMergeMultiplePatches() {
{Githash: "d0d878e81b303fd2abbf09331e54af41d6cd0c7d", PatchSet: patch.PatchSet{PatchFileId: "patchfile1"}, ModuleName: "evergreen"},
},
})
- ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
+ ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
- comm := client.NewMock("http://localhost.com")
- comm.PatchFiles["patchfile1"] = `
+ s.comm.PatchFiles["patchfile1"] = `
diff --git a/README.md b/README.md
index edc0c34..8e82862 100644
--- a/README.md
@@ -949,14 +986,18 @@ index edc0c34..8e82862 100644
for _, task := range conf.Project.Tasks {
s.NotEqual(len(task.Commands), 0)
for _, command := range task.Commands {
- pluginCmds, err := Render(command, conf.Project)
+ pluginCmds, err := Render(command, conf.Project, "")
s.NoError(err)
s.NotNil(pluginCmds)
pluginCmds[0].SetJasperManager(s.jasper)
- err = pluginCmds[0].Execute(ctx, comm, logger, conf)
- // this command will error because it'll apply the same patch twice. We are just testing that
- // there was an attempt to apply the patch the second time
- grip.Debug(err)
+ err = pluginCmds[0].Execute(ctx, s.comm, logger, conf)
+ // Running the git commands takes time, so it could hit the test's
+ // context timeout if it's slow. Make sure that the error isn't due
+ // to a timeout.
+ s.False(utility.IsContextError(errors.Cause(err)))
+ // This command will error because it'll apply the same patch twice.
+ // We are just testing that there was an attempt to apply the patch
+ // the second time.
s.Error(err)
}
}
@@ -970,3 +1011,90 @@ index edc0c34..8e82862 100644
}
s.True(foundSuccessMessage, "did not see the following in task output: %s", successMessage)
}
+
+func TestManifestLoad(t *testing.T) {
+ require.NoError(t, db.ClearCollections(manifest.Collection),
+ "error clearing test collections")
+
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ comm := client.NewMock("http://localhost.com")
+ env := testutil.NewEnvironment(ctx, t)
+ testConfig := env.Settings()
+
+ testutil.ConfigureIntegrationTest(t, testConfig, t.Name())
+
+ // Skipping: this test runs the manifest command and then
+ // checks that the database records were properly changed, and
+ // therefore it's impossible to separate these tests from the
+ // service/database.
+
+ SkipConvey("With a SimpleRegistry and test project file", t, func() {
+
+ configPath := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "manifest", "mongodb-mongo-master.yml")
+ modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configPath, modelutil.NoPatch)
+ require.NoError(t, err, "failed to setup test data")
+
+ taskConfig, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
+ require.NoError(t, err)
+ logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: taskConfig.Task.Id, Secret: taskConfig.Task.Secret}, nil)
+ So(err, ShouldBeNil)
+
+ Convey("the manifest load command should execute successfully", func() {
+ for _, task := range taskConfig.Project.Tasks {
+ So(len(task.Commands), ShouldNotEqual, 0)
+ for _, command := range task.Commands {
+ pluginCmds, err := Render(command, taskConfig.Project, "")
+ require.NoError(t, err)
+ So(pluginCmds, ShouldNotBeNil)
+ So(err, ShouldBeNil)
+
+ err = pluginCmds[0].Execute(ctx, comm, logger, taskConfig)
+ So(err, ShouldBeNil)
+ }
+
+ }
+ Convey("the manifest should be inserted properly into the database", func() {
+ currentManifest, err := manifest.FindOne(manifest.ById(taskConfig.Task.Version))
+ So(err, ShouldBeNil)
+ So(currentManifest, ShouldNotBeNil)
+ So(currentManifest.ProjectName, ShouldEqual, taskConfig.ProjectRef.Id)
+ So(currentManifest.Modules, ShouldNotBeNil)
+ So(len(currentManifest.Modules), ShouldEqual, 1)
+ for key := range currentManifest.Modules {
+ So(key, ShouldEqual, "sample")
+ }
+ So(taskConfig.Expansions.Get("sample_rev"), ShouldEqual, "3c7bfeb82d492dc453e7431be664539c35b5db4b")
+ })
+ })
+
+ Convey("with a manifest already in the database the manifest should not create a new manifest", func() {
+ for _, task := range taskConfig.Project.Tasks {
+ So(len(task.Commands), ShouldNotEqual, 0)
+ for _, command := range task.Commands {
+ pluginCmds, err := Render(command, taskConfig.Project, "")
+ require.NoError(t, err)
+ So(pluginCmds, ShouldNotBeNil)
+ So(err, ShouldBeNil)
+ err = pluginCmds[0].Execute(ctx, comm, logger, taskConfig)
+ So(err, ShouldBeNil)
+ }
+
+ }
+ Convey("the manifest should be inserted properly into the database", func() {
+ currentManifest, err := manifest.FindOne(manifest.ById(taskConfig.Task.Version))
+ So(err, ShouldBeNil)
+ So(currentManifest, ShouldNotBeNil)
+ So(currentManifest.ProjectName, ShouldEqual, taskConfig.ProjectRef.Id)
+ So(currentManifest.Modules, ShouldNotBeNil)
+ So(len(currentManifest.Modules), ShouldEqual, 1)
+ for key := range currentManifest.Modules {
+ So(key, ShouldEqual, "sample")
+ }
+ So(currentManifest.Modules["sample"].Repo, ShouldEqual, "sample")
+ So(taskConfig.Expansions.Get("sample_rev"), ShouldEqual, "3c7bfeb82d492dc453e7431be664539c35b5db4b")
+ So(currentManifest.Id, ShouldEqual, taskConfig.Task.Version)
+ })
+ })
+ })
+}
diff --git a/agent/command/host_create.go b/agent/command/host_create.go
index 9a63dc716c8..8182e1e9ce6 100644
--- a/agent/command/host_create.go
+++ b/agent/command/host_create.go
@@ -3,7 +3,7 @@ package command
import (
"context"
"fmt"
- "io/ioutil"
+ "io"
"os"
"path/filepath"
"time"
@@ -38,7 +38,7 @@ func (c *createHost) ParseParams(params map[string]interface{}) error {
fileName := fmt.Sprintf("%v", params["file"])
c.File = fileName
if len(params) > 1 {
- return errors.New("no params should be defined when using a file to parse params")
+ return errors.New("when using a file to parse params, no additional params other than file name should be defined")
}
return nil
}
@@ -48,17 +48,16 @@ func (c *createHost) ParseParams(params map[string]interface{}) error {
Result: c.CreateHost,
})
if err != nil {
- return errors.Wrap(err, "problem constructing mapstructure decoder")
+ return errors.Wrap(err, "constructing mapstructure decoder")
}
- return errors.Wrapf(decoder.Decode(params), "error parsing '%s' params", c.Name())
+ return errors.Wrap(decoder.Decode(params), "decoding mapstructure params")
}
func (c *createHost) parseParamsFromFile(fn string, conf *internal.TaskConfig) error {
if !filepath.IsAbs(fn) {
fn = getJoinedWithWorkDir(conf, fn)
}
- return errors.Wrapf(utility.ReadYAMLFile(fn, &c.CreateHost),
- "error reading from file '%s'", fn)
+ return errors.Wrapf(utility.ReadYAMLFile(fn, &c.CreateHost), "reading YAML from file '%s'", fn)
}
func (c *createHost) expandAndValidate(conf *internal.TaskConfig) error {
@@ -75,7 +74,7 @@ func (c *createHost) expandAndValidate(conf *internal.TaskConfig) error {
}
if err := c.CreateHost.Validate(); err != nil {
- return errors.Wrap(err, "command is invalid")
+ return errors.Wrap(err, "invalid command options")
}
return nil
}
@@ -101,10 +100,10 @@ func (c *createHost) Execute(ctx context.Context, comm client.Communicator,
c.logAMI(ctx, comm, logger, taskData)
ids, err := comm.CreateHost(ctx, taskData, *c.CreateHost)
if err != nil {
- return errors.Wrap(err, "error creating host")
+ return errors.Wrap(err, "creating host")
} else if c.CreateHost.CloudProvider == apimodels.ProviderDocker {
if err = c.getLogsFromNewDockerHost(ctx, logger, comm, ids, startTime, conf); err != nil {
- return errors.Wrap(err, "problem getting logs from created host")
+ return errors.Wrap(err, "getting logs from created host")
}
}
@@ -117,18 +116,18 @@ func (c *createHost) logAMI(ctx context.Context, comm client.Communicator, logge
return
}
if c.CreateHost.AMI != "" {
- logger.Task().Infof("host.create: using given AMI '%s'", c.CreateHost.AMI)
+ logger.Task().Infof("host.create: using given AMI '%s'.", c.CreateHost.AMI)
return
}
ami, err := comm.GetDistroAMI(ctx, c.CreateHost.Distro, c.CreateHost.Region, taskData)
if err != nil {
- logger.Task().Warning(errors.Wrapf(err, "host.create: unable to retrieve AMI from distro '%s'",
+ logger.Task().Warning(errors.Wrapf(err, "host.create: unable to retrieve AMI from distro '%s'.",
c.CreateHost.Distro))
return
}
- logger.Task().Infof("host.create: using AMI '%s' (for distro '%s')", ami, c.CreateHost.Distro)
+ logger.Task().Infof("host.create: using AMI '%s' (for distro '%s').", ami, c.CreateHost.Distro)
}
type logBatchInfo struct {
@@ -143,7 +142,7 @@ func (c *createHost) getLogsFromNewDockerHost(ctx context.Context, logger client
ids []string, startTime time.Time, conf *internal.TaskConfig) error {
var err error
if len(ids) == 0 {
- return errors.New("Programmer error: no intent host ID received")
+ return errors.New("programmer error: no intent host ID received")
}
info, err := c.initializeLogBatchInfo(ids[0], conf, startTime)
@@ -154,14 +153,14 @@ func (c *createHost) getLogsFromNewDockerHost(ctx context.Context, logger client
if !c.CreateHost.Background {
defer info.outFile.Close()
defer info.errFile.Close()
- return errors.Wrapf(c.waitForLogs(ctx, comm, logger, info), "error waiting for logs")
+ return errors.Wrapf(c.waitForLogs(ctx, comm, logger, info), "waiting for logs")
}
go func() {
defer info.outFile.Close()
defer info.errFile.Close()
if err = c.waitForLogs(ctx, comm, logger, info); err != nil {
- logger.Task().Errorf("error waiting for logs in background: %v", err)
+ logger.Task().Error(errors.Wrap(err, "waiting for logs in the background"))
}
}()
@@ -190,15 +189,15 @@ func (c *createHost) initializeLogBatchInfo(id string, conf *internal.TaskConfig
var err error
info.outFile, err = os.OpenFile(c.CreateHost.StdoutFile, permissions, 0644)
if err != nil {
- return nil, errors.Wrapf(err, "error creating file %s", c.CreateHost.StdoutFile)
+ return nil, errors.Wrapf(err, "creating file '%s'", c.CreateHost.StdoutFile)
}
info.errFile, err = os.OpenFile(c.CreateHost.StderrFile, permissions, 0644)
if err != nil {
// the outfile already exists, so close it
if fileErr := info.outFile.Close(); fileErr != nil {
- return nil, errors.Wrapf(fileErr, "error removing stdout file after failed stderr file creation")
+ return nil, errors.Wrapf(fileErr, "removing stdout file after failed stderr file creation")
}
- return nil, errors.Wrapf(err, "error creating file %s", c.CreateHost.StderrFile)
+ return nil, errors.Wrapf(err, "creating file '%s'", c.CreateHost.StderrFile)
}
return info, nil
}
@@ -216,13 +215,13 @@ func (c *createHost) waitForLogs(ctx context.Context, comm client.Communicator,
for {
select {
case <-ctx.Done():
- logger.Task().Infof("context cancelled waiting for host %s to exit", info.hostID)
+ logger.Task().Infof("Context canceled waiting for host '%s' to exit: %s.", info.hostID, ctx.Err())
return nil
case <-pollTicker.C:
info.batchEnd = time.Now()
status, err := comm.GetDockerStatus(ctx, info.hostID)
if err != nil {
- logger.Task().Infof("problem receiving docker logs in host.create: '%s'", err.Error())
+ logger.Task().Infof("Problem receiving Docker logs in host.create: '%s'.", err.Error())
if startedCollectingLogs {
return nil // container has likely exited
}
@@ -234,7 +233,7 @@ func (c *createHost) waitForLogs(ctx context.Context, comm client.Communicator,
info.batchStart = info.batchEnd.Add(time.Nanosecond) // to prevent repeat logs
if !status.IsRunning { // container exited
- logger.Task().Infof("Logs retrieved for container _id %s in %d seconds",
+ logger.Task().Infof("Logs retrieved for container '%s' in %d seconds.",
info.hostID, int(time.Since(info.batchStart).Seconds()))
return nil
}
@@ -248,29 +247,29 @@ func (c *createHost) waitForLogs(ctx context.Context, comm client.Communicator,
func (info *logBatchInfo) getAndWriteLogBatch(ctx context.Context, comm client.Communicator, logger client.LoggerProducer) {
outLogs, err := comm.GetDockerLogs(ctx, info.hostID, info.batchStart, info.batchEnd, false)
if err != nil {
- logger.Task().Errorf("error retrieving docker out logs: %s", err.Error())
+ logger.Task().Errorf("Error retrieving Docker output logs: %s.", err)
}
errLogs, err := comm.GetDockerLogs(ctx, info.hostID, info.batchStart, info.batchEnd, true)
if err != nil {
- logger.Task().Errorf("error retrieving docker error logs: %s", err.Error())
+ logger.Task().Errorf("Error retrieving Docker error logs: %s.", err)
}
if _, err = info.outFile.Write(outLogs); err != nil {
- logger.Task().Errorf("error writing stdout to file: %s", outLogs)
+ logger.Task().Errorf("Error writing stdout to file: %s.", outLogs)
}
if _, err = info.errFile.Write(errLogs); err != nil {
- logger.Task().Errorf("error writing stderr to file: %s", errLogs)
+ logger.Task().Errorf("Error writing stderr to file: %s.", errLogs)
}
}
func (c *createHost) populateUserdata() error {
file, err := os.Open(c.CreateHost.UserdataFile)
if err != nil {
- return errors.Wrap(err, "error opening UserData file")
+ return errors.Wrap(err, "opening user data file")
}
defer file.Close()
- fileData, err := ioutil.ReadAll(file)
+ fileData, err := io.ReadAll(file)
if err != nil {
- return errors.Wrap(err, "error reading UserData file")
+ return errors.Wrap(err, "reading user data file")
}
c.CreateHost.UserdataCommand = string(fileData)
diff --git a/agent/command/host_create_test.go b/agent/command/host_create_test.go
index a63f0d47e49..87331da8272 100644
--- a/agent/command/host_create_test.go
+++ b/agent/command/host_create_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -74,8 +73,7 @@ func (s *createHostSuite) TestParamDefaults() {
func (s *createHostSuite) TestParseFromFile() {
//file for testing parsing from a json file
- tmpdir, err := ioutil.TempDir("", "evergreen.command.host_create.test")
- s.Require().NoError(err)
+ tmpdir := s.T().TempDir()
ebsDevice := []map[string]interface{}{
map[string]interface{}{
"device_name": "myDevice",
@@ -91,7 +89,7 @@ func (s *createHostSuite) TestParseFromFile() {
}
//parse from JSON file
s.NoError(utility.WriteJSONFile(path, fileContent))
- _, err = os.Stat(path)
+ _, err := os.Stat(path)
s.Require().False(os.IsNotExist(err))
s.params = map[string]interface{}{
"file": path,
@@ -122,8 +120,6 @@ func (s *createHostSuite) TestParseFromFile() {
s.Equal("subnet-123456", s.cmd.CreateHost.Subnet)
s.Equal("myDevice", s.cmd.CreateHost.EBSDevices[0].DeviceName)
- s.Require().NoError(os.RemoveAll(tmpdir))
-
//test with both file and other params
s.params = map[string]interface{}{
"file": path,
@@ -131,7 +127,7 @@ func (s *createHostSuite) TestParseFromFile() {
}
err = s.cmd.ParseParams(s.params)
- s.Contains(err.Error(), "no params should be defined when using a file to parse params")
+ s.Contains(err.Error(), "when using a file to parse params, no additional params other than file name should be defined")
}
@@ -139,15 +135,18 @@ func (s *createHostSuite) TestParamValidation() {
// having no ami or distro is an error
s.params["distro"] = ""
s.NoError(s.cmd.ParseParams(s.params))
- s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "must set exactly one of ami or distro")
+ s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "must set exactly one of AMI or distro")
// verify errors if missing required info for ami
s.params["ami"] = "ami"
+ delete(s.params, "security_group_ids")
+ delete(s.params, "subnet_id")
+ delete(s.params, "instance_type")
s.NoError(s.cmd.ParseParams(s.params))
err := s.cmd.expandAndValidate(s.conf)
- s.Contains(err.Error(), "instance_type must be set if ami is set")
- s.Contains(err.Error(), "must specify security_group_ids if ami is set")
- s.Contains(err.Error(), "instance_type must be set if ami is set")
+ s.Contains(err.Error(), "must specify security group IDs if AMI is set")
+ s.Contains(err.Error(), "subnet ID must be set if AMI is set")
+ s.Contains(err.Error(), "instance type must be set if AMI is set")
// valid AMI info
s.params["instance_type"] = "instance"
@@ -159,7 +158,7 @@ func (s *createHostSuite) TestParamValidation() {
// having a key id but nothing else is an error
s.params["aws_access_key_id"] = "keyid"
s.NoError(s.cmd.ParseParams(s.params))
- s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "aws_access_key_id, aws_secret_access_key, key_name must all be set or unset")
+ s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "AWS access key ID, AWS secret access key, and key name must all be set or unset")
s.params["aws_secret_access_key"] = "secret"
s.params["key_name"] = "key"
s.NoError(s.cmd.ParseParams(s.params))
@@ -168,13 +167,13 @@ func (s *createHostSuite) TestParamValidation() {
// verify errors for things controlled by the agent
s.params["num_hosts"] = "11"
s.NoError(s.cmd.ParseParams(s.params))
- s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "num_hosts must be between 1 and 10")
+ s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "num hosts must be between 1 and 10")
s.params["scope"] = "idk"
s.NoError(s.cmd.ParseParams(s.params))
s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "scope must be build or task")
s.params["timeout_teardown_secs"] = 55
s.NoError(s.cmd.ParseParams(s.params))
- s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "timeout_teardown_secs must be between 60 and 604800")
+ s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "timeout teardown (seconds) must be between 60 and 604800")
// Validate num_hosts can be an int
s.params["timeout_teardown_secs"] = 60
@@ -192,8 +191,8 @@ func (s *createHostSuite) TestParamValidation() {
settings.Providers.Docker.DefaultDistro = "my-default-distro"
s.NoError(evergreen.UpdateConfig(settings))
- s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "docker image must be set")
- s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "num_hosts cannot be greater than 1")
+ s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "Docker image must be set")
+ s.Contains(s.cmd.expandAndValidate(s.conf).Error(), "num hosts cannot be greater than 1")
s.params["image"] = "my-image"
s.params["command"] = "echo hi"
s.params["num_hosts"] = 1
@@ -205,7 +204,7 @@ func (s *createHostSuite) TestParamValidation() {
func (s *createHostSuite) TestPopulateUserdata() {
defer os.RemoveAll(userdataFileName)
userdataFile := []byte("#!/bin/bash\nsome commands")
- s.NoError(ioutil.WriteFile(userdataFileName, userdataFile, 0644))
+ s.NoError(os.WriteFile(userdataFileName, userdataFile, 0644))
s.cmd.CreateHost = &apimodels.CreateHost{UserdataFile: userdataFileName}
s.NoError(s.cmd.populateUserdata())
s.Equal("#!/bin/bash\nsome commands", s.cmd.CreateHost.UserdataCommand)
diff --git a/agent/command/host_list.go b/agent/command/host_list.go
index 19a0db8730f..85b0f6af577 100644
--- a/agent/command/host_list.go
+++ b/agent/command/host_list.go
@@ -33,22 +33,22 @@ func (c *listHosts) ParseParams(params map[string]interface{}) error {
Result: c,
})
if err != nil {
- return errors.Wrap(err, "problem constructing mapstructure decoder")
+ return errors.Wrap(err, "constructing mapstructure decoder")
}
if err := decoder.Decode(params); err != nil {
- return errors.Wrapf(err, "error parsing '%s' params", c.Name())
+ return errors.Wrap(err, "decoding mapstrcuture parameters")
}
if c.Wait && (c.NumHosts == "" || c.NumHosts == "0") {
- return errors.New("cannot reasonably wait for 0 hosts")
+ return errors.New("cannot wait for 0 hosts")
}
if c.Path == "" && c.Silent && !c.Wait {
- return errors.New("unreasonable combination of output, silent, and wait options")
+ return errors.New("if not waiting for hosts to come up, must specify an output destination (either a file path or non-silent log output)")
}
if c.TimeoutSecs < 0 {
- return errors.New("unreasonable timeout value")
+ return errors.New("cannot have negative timeout")
}
return nil
@@ -56,13 +56,13 @@ func (c *listHosts) ParseParams(params map[string]interface{}) error {
func (c *listHosts) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "applying expansions")
}
// check for this during execution too encase the expansion of
// path was empty
if c.Path == "" && c.Silent && !c.Wait {
- return errors.New("unreasonable combination of output, silent, and wait options")
+ return errors.New("if not waiting for hosts to come up, must specify an output destination (either a file path or non-silent log output)")
}
if c.Path != "" {
@@ -91,7 +91,7 @@ func (c *listHosts) Execute(ctx context.Context, comm client.Communicator, logge
if c.NumHosts != "" {
numHosts, err = strconv.Atoi(c.NumHosts)
if err != nil {
- return errors.Wrapf(err, "cannot convert '%s' to int", c.NumHosts)
+ return errors.Wrapf(err, "converting num hosts '%s' to int", c.NumHosts)
}
}
@@ -120,18 +120,18 @@ waitForHosts:
}
if err != nil {
- return errors.Wrap(err, "problem getting hosts list")
+ return errors.Wrap(err, "getting host statuses")
}
if c.Path != "" {
if len(results.Hosts) > 0 {
if err = utility.WriteJSONFile(c.Path, results.Hosts); err != nil {
- return errors.Wrapf(err, "problem writing host data to file: %s", c.Path)
+ return errors.Wrapf(err, "writing host data to file '%s'", c.Path)
}
}
if len(results.Details) > 0 {
if err = utility.WriteJSONFile(c.Path, results.Details); err != nil {
- return errors.Wrapf(err, "problem writing host data to file: %s", c.Path)
+ return errors.Wrapf(err, "writing host failure details to file '%s'", c.Path)
}
}
}
@@ -139,17 +139,17 @@ waitForHosts:
if !c.Silent {
if len(results.Hosts) > 0 {
jsonBytes, err := json.MarshalIndent(results.Hosts, " ", " ")
- logger.Task().Warning(errors.Wrap(err, "problem json formatting host"))
+ logger.Task().Warning(errors.Wrap(err, "formatting host data as JSON"))
logger.Task().Info(string(jsonBytes))
}
if len(results.Details) > 0 {
jsonBytes, err := json.MarshalIndent(results.Details, " ", " ")
- logger.Task().Warning(errors.Wrap(err, "problem json formatting details"))
+ logger.Task().Warning(errors.Wrap(err, "formatting host failure details as JSON"))
logger.Task().Info(string(jsonBytes))
}
}
if timeout {
- return errors.New("reached timeout waiting for hosts")
+ return errors.Errorf("reached timeout (%d seconds) waiting for hosts", c.TimeoutSecs)
}
if len(results.Details) > 0 {
return errors.Errorf("%d hosts of %d failed", len(results.Details), numHosts)
diff --git a/agent/command/initial_setup.go b/agent/command/initial_setup.go
index 6157ccd7df1..05e0f0b3f26 100644
--- a/agent/command/initial_setup.go
+++ b/agent/command/initial_setup.go
@@ -10,6 +10,9 @@ import (
"github.com/mongodb/jasper"
)
+// initialSetup is an internal command used as a placeholder when the agent is
+// setting up in preparation to run a task's commands. This is not meant to be
+// invoked by end users.
type initialSetup struct{}
func initialSetupFactory() Command { return &initialSetup{} }
@@ -26,6 +29,6 @@ func (*initialSetup) SetJasperManager(_ jasper.Manager) {}
func (*initialSetup) Execute(ctx context.Context,
client client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
- logger.Task().Info("performing initial task setup")
+ logger.Task().Info("Performing initial task setup.")
return nil
}
diff --git a/agent/command/keyval.go b/agent/command/keyval.go
index 3d02c70cd6b..8da1eb8dccf 100644
--- a/agent/command/keyval.go
+++ b/agent/command/keyval.go
@@ -26,30 +26,30 @@ func (c *keyValInc) Name() string { return "keyval.inc" }
func (c *keyValInc) ParseParams(params map[string]interface{}) error {
err := mapstructure.Decode(params, c)
if err != nil {
- return err
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Key == "" || c.Destination == "" {
- return errors.Errorf("error parsing '%v' params: key and destination may not be blank",
- c.Name())
+ return errors.New("both key and destination must be set")
}
return nil
}
-// Execute fetches the expansions from the API server
+// Execute sends the request to increment the value for the key and sets the
+// destination expansion's value.
func (c *keyValInc) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return err
+ return errors.Wrap(err, "applying expansions")
}
td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
keyVal := model.KeyVal{Key: c.Key}
- err := comm.KeyValInc(ctx, td, &keyVal) //.TaskPostJSON(IncRoute, c.Key)
+ err := comm.KeyValInc(ctx, td, &keyVal)
if err != nil {
- return errors.Wrapf(err, "problem incrementing key %s", c.Key)
+ return errors.Wrapf(err, "incrementing key '%s'", c.Key)
}
conf.Expansions.Put(c.Destination, strconv.FormatInt(keyVal.Value, 10))
diff --git a/agent/command/keyval_test.go b/agent/command/keyval_test.go
index 81e69e8444a..b8f1046b9f6 100644
--- a/agent/command/keyval_test.go
+++ b/agent/command/keyval_test.go
@@ -21,8 +21,8 @@ func TestIncKey(t *testing.T) {
Convey("With keyval plugin installed", t, func() {
err := db.Clear(model.KeyValCollection)
- require.NoError(t, err, "Couldn't clear test collection: %s", model.KeyValCollection)
- require.NoError(t, err, "Couldn't register keyval plugin")
+ require.NoError(t, err)
+ require.NoError(t, err)
testConfig := testutil.TestConfig()
configPath := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "plugin_keyval.yml")
@@ -30,8 +30,8 @@ func TestIncKey(t *testing.T) {
comm := client.NewMock("http://localhost.com")
modelData, err := modelutil.SetupAPITestData(testConfig, "testinc", "rhel55", configPath, modelutil.NoPatch)
- require.NoError(t, err, "couldn't create test task")
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
+ require.NoError(t, err)
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
require.NoError(t, err)
Convey("Inc command should increment a key successfully", func() {
@@ -40,8 +40,8 @@ func TestIncKey(t *testing.T) {
for _, task := range conf.Project.Tasks {
So(len(task.Commands), ShouldNotEqual, 0)
for _, command := range task.Commands {
- pluginCmds, err := Render(command, &model.Project{})
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, &model.Project{}, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
for _, cmd := range pluginCmds {
diff --git a/agent/command/macsign.go b/agent/command/macsign.go
index bac7c65d5af..5c5c970452a 100644
--- a/agent/command/macsign.go
+++ b/agent/command/macsign.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "fmt"
"os/exec"
"path/filepath"
"runtime"
@@ -16,7 +15,7 @@ import (
"github.com/pkg/errors"
)
-// A plugin command to sign and notarize macOS artifacts.
+// macSign is a command to sign and notarize macOS artifacts.
type macSign struct {
// KeyId and Secret are the credentials for
// authenticating into the macOS signing and notarization service.
@@ -27,37 +26,37 @@ type macSign struct {
ServiceUrl string `mapstructure:"service_url" plugin:"expand"`
// ClientBinary is the path to the macOS signing and notarization service client.
- // If empty default location(/usr/local/bin/macnotary) will be used.
+ // If empty, the default location (/usr/local/bin/macnotary) will be used.
ClientBinary string `mapstructure:"client_binary" plugin:"expand"`
- // LocalZipFile is the local filepath to the zip file the user
- // wishes to sign. It should contains the list of artifacts that need to be signed.
+ // LocalZipFile is the local filepath to the zip file the user wishes to
+ // sign. It should contain the artifacts that need to be signed.
LocalZipFile string `mapstructure:"local_zip_file" plugin:"expand"`
// OutputZipFile is the local filepath to the zip file the service outputs
// It will contain the list of artifacts that are signed by the server.
OutputZipFile string `mapstructure:"output_zip_file" plugin:"expand"`
- // ArtifactType is a type of artifact(s) that need to be signed.
+ // ArtifactType is the type of artifact(s) that need to be signed.
// Currently supported list: app, binary.
ArtifactType string `mapstructure:"artifact_type" plugin:"expand"`
- // EntitlementsFilePath is the local filepath to the entitlements file that the users
+ // EntitlementsFilePath is the local filepath to the entitlements file that the user
// wishes to execute the signing process with. This is optional.
EntitlementsFilePath string `mapstructure:"entitlements_file" plugin:"expand"`
- // Verify determines if the signature(or notarization) should be verified.
- // Verification is only supported on MacOS. It is optional, default value if false.
+ // Verify determines if the signature (or notarization) should be verified.
+ // Verification is only supported on macOS. It is optional, default value if false.
Verify bool `mapstructure:"verify"`
// Notarize determines if the file should also be notarized after signing.
Notarize bool `mapstructure:"notarize"`
- // BundleId is the bundle id of the artifact used during notarization.
+ // BundleId is the bundle ID of the artifact used during notarization.
// This is mandatory if notarization is requested.
BundleId string `mapstructure:"bundle_id" plugin:"expand"`
- // BuildVariants stores a list of MCI build variants to run the command for.
+ // BuildVariants stores a list of build variants to run the command for.
// If the list is empty, it runs for all build variants.
BuildVariants []string `mapstructure:"build_variants"`
@@ -76,11 +75,11 @@ func (macSign *macSign) ParseParams(params map[string]interface{}) error {
Result: macSign,
})
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "constructing mapstructure decoder")
}
if err := decoder.Decode(params); err != nil {
- return errors.Wrapf(err, "error decoding %s params", macSign.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
return macSign.validate()
@@ -91,29 +90,29 @@ func (macSign *macSign) validate() error {
// make sure the command params are valid
if macSign.KeyId == "" {
- catcher.New("key_id cannot be blank")
+ catcher.New("key ID cannot be blank")
}
if macSign.Secret == "" {
catcher.New("secret cannot be blank")
}
if macSign.LocalZipFile == "" {
- catcher.New("local_zip_file cannot be blank")
+ catcher.New("local zip file cannot be blank")
}
if macSign.OutputZipFile == "" {
- catcher.New("output_zip_file cannot be blank")
+ catcher.New("output zip file cannot be blank")
}
if macSign.ServiceUrl == "" {
- catcher.New("service_url cannot be blank")
+ catcher.New("service URL cannot be blank")
}
if runtime.GOOS != "darwin" {
// do not fail, just set verifying to false.
macSign.Verify = false
}
if !(macSign.ArtifactType == "" || macSign.ArtifactType == "binary" || macSign.ArtifactType == "app") {
- catcher.New("artifact_type needs to be either blank,'binary' or 'app'")
+ catcher.New("artifact needs to be either empty, 'binary' or 'app'")
}
if macSign.Notarize && macSign.BundleId == "" {
- catcher.New("if notarization is requested, bundle_id cannot be blank")
+ catcher.New("if notarization is requested, bundle ID cannot be blank")
}
return catcher.Resolve()
@@ -128,7 +127,7 @@ func (macSign *macSign) expandParams(conf *internal.TaskConfig) error {
}
if err = util.ExpandValues(macSign, conf.Expansions); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "applying expansions")
}
if !filepath.IsAbs(macSign.LocalZipFile) {
@@ -172,11 +171,11 @@ func (macSign *macSign) Execute(ctx context.Context,
}
if err := createEnclosingDirectoryIfNeeded(macSign.WorkingDir); err != nil {
- return errors.Wrap(err, "problem making working directory")
+ return errors.Wrap(err, "making working directory")
}
if !macSign.shouldRunForVariant(conf.BuildVariant.Name) {
- logger.Task().Infof("Skipping macsign of local file %s for variant %s",
+ logger.Task().Infof("Skipping macsign of local file '%s' for variant '%s'",
macSign.LocalZipFile, conf.BuildVariant.Name)
return nil
}
@@ -207,27 +206,26 @@ func (macSign *macSign) Execute(ctx context.Context,
cmd := exec.Command(macSign.ClientBinary, args...)
- var exitCode int
-
stdout, err := cmd.CombinedOutput()
output := string(stdout)
+ if len(output) != 0 {
+ logger.Task().Info(output)
+ }
+
if err != nil {
+
exitErr, ok := err.(*exec.ExitError)
if !ok {
- return errors.Wrapf(err, "unexpected error %s\n%s,%s", output, runtime.GOOS, runtime.GOARCH)
+ return errors.Wrapf(err, "unexpected error on OS '%s' arch '%s'", runtime.GOOS, runtime.GOARCH)
}
- exitCode = exitErr.ExitCode()
- }
-
- if exitCode != 0 {
- return fmt.Errorf("none zero exit code: %d: \n%s", exitCode, output)
+ if exitErr.ExitCode() != 0 {
+ return errors.Errorf("non-zero exit code %d", exitErr.ExitCode())
+ }
}
- logger.Task().Info(output)
-
- logger.Task().Infof("Artifact - %s signed (and/or notarized) and new file created: %s", macSign.LocalZipFile, macSign.OutputZipFile)
+ logger.Task().Infof("Artifact - file '%s' signed (and/or notarized) and new file created: '%s'.", macSign.LocalZipFile, macSign.OutputZipFile)
return nil
}
diff --git a/agent/command/macsign_test.go b/agent/command/macsign_test.go
index 17e2d32830c..d3f5ddf5e06 100644
--- a/agent/command/macsign_test.go
+++ b/agent/command/macsign_test.go
@@ -3,7 +3,7 @@ package command
import (
"context"
"fmt"
- "io/ioutil"
+ "os"
"path/filepath"
"runtime"
"testing"
@@ -178,7 +178,7 @@ func TestMacSignExecute(t *testing.T) {
ctx := context.TODO()
mockClientBinary := filepath.Join(t.TempDir(), "client")
assert.NoError(t,
- ioutil.WriteFile(mockClientBinary, []byte(tc.executableContent), 0777),
+ os.WriteFile(mockClientBinary, []byte(tc.executableContent), 0777),
)
cmd := &macSign{}
tc.params["client_binary"] = mockClientBinary
diff --git a/agent/command/manifest.go b/agent/command/manifest.go
deleted file mode 100644
index 2475807c6cc..00000000000
--- a/agent/command/manifest.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package command
-
-import (
- "context"
- "fmt"
-
- "github.com/evergreen-ci/evergreen/agent/internal"
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/pkg/errors"
-)
-
-func moduleRevExpansionName(name string) string { return fmt.Sprintf("%s_rev", name) }
-
-// manifestLoad
-type manifestLoad struct{ base }
-
-func manifestLoadFactory() Command { return &manifestLoad{} }
-func (c *manifestLoad) Name() string { return "manifest.load" }
-
-// manifestLoad-specific implementation of ParseParams.
-func (c *manifestLoad) ParseParams(params map[string]interface{}) error {
- return nil
-}
-
-// Load performs a GET on /manifest/load
-func (c *manifestLoad) Load(ctx context.Context,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
-
- td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
-
- manifest, err := comm.GetManifest(ctx, td)
- if err != nil {
- return errors.Wrapf(err, "problem loading manifest for %s", td.ID)
- }
-
- for moduleName := range manifest.Modules {
- // put the url for the module in the expansions
- conf.Expansions.Put(moduleRevExpansionName(moduleName), manifest.Modules[moduleName].Revision)
- conf.Expansions.Put(fmt.Sprintf("%s_branch", moduleName), manifest.Modules[moduleName].Branch)
- conf.Expansions.Put(fmt.Sprintf("%s_repo", moduleName), manifest.Modules[moduleName].Repo)
- conf.Expansions.Put(fmt.Sprintf("%s_owner", moduleName), manifest.Modules[moduleName].Owner)
- }
-
- logger.Execution().Info("manifest loaded successfully")
- return nil
-}
-
-// Implementation of Execute.
-func (c *manifestLoad) Execute(ctx context.Context,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
-
- errChan := make(chan error)
- go func() {
- errChan <- c.Load(ctx, comm, logger, conf)
- }()
-
- select {
- case err := <-errChan:
- return err
- case <-ctx.Done():
- logger.Execution().Info("Received signal to terminate execution of manifest load command")
- return nil
- }
-
-}
diff --git a/agent/command/manifest_test.go b/agent/command/manifest_test.go
deleted file mode 100644
index 08b0d292249..00000000000
--- a/agent/command/manifest_test.go
+++ /dev/null
@@ -1,105 +0,0 @@
-package command
-
-import (
- "context"
- "path/filepath"
- "testing"
-
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- agentutil "github.com/evergreen-ci/evergreen/agent/internal/testutil"
- "github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/manifest"
- modelutil "github.com/evergreen-ci/evergreen/model/testutil"
- "github.com/evergreen-ci/evergreen/testutil"
- . "github.com/smartystreets/goconvey/convey"
- "github.com/stretchr/testify/require"
-)
-
-// ManifestFetchCmd integration tests
-
-func TestManifestLoad(t *testing.T) {
- require.NoError(t, db.ClearCollections(manifest.Collection),
- "error clearing test collections")
-
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- comm := client.NewMock("http://localhost.com")
- env := testutil.NewEnvironment(ctx, t)
- testConfig := env.Settings()
-
- testutil.ConfigureIntegrationTest(t, testConfig, "TestManifestFetch")
-
- // Skiping: this test runs the manifest command and then
- // checks that the database records were properly changed, and
- // therefore it's impossible to separate these tests from the
- // service/database.
-
- SkipConvey("With a SimpleRegistry and test project file", t, func() {
-
- configPath := filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "manifest", "mongodb-mongo-master.yml")
- modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configPath, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
-
- taskConfig, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
- require.NoError(t, err)
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: taskConfig.Task.Id, Secret: taskConfig.Task.Secret}, nil)
- So(err, ShouldBeNil)
-
- Convey("the manifest load command should execute successfully", func() {
- for _, task := range taskConfig.Project.Tasks {
- So(len(task.Commands), ShouldNotEqual, 0)
- for _, command := range task.Commands {
- pluginCmds, err := Render(command, taskConfig.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
- So(pluginCmds, ShouldNotBeNil)
- So(err, ShouldBeNil)
-
- err = pluginCmds[0].Execute(ctx, comm, logger, taskConfig)
- So(err, ShouldBeNil)
- }
-
- }
- Convey("the manifest should be inserted properly into the database", func() {
- currentManifest, err := manifest.FindOne(manifest.ById(taskConfig.Task.Version))
- So(err, ShouldBeNil)
- So(currentManifest, ShouldNotBeNil)
- So(currentManifest.ProjectName, ShouldEqual, taskConfig.ProjectRef.Id)
- So(currentManifest.Modules, ShouldNotBeNil)
- So(len(currentManifest.Modules), ShouldEqual, 1)
- for key := range currentManifest.Modules {
- So(key, ShouldEqual, "sample")
- }
- So(taskConfig.Expansions.Get("sample_rev"), ShouldEqual, "3c7bfeb82d492dc453e7431be664539c35b5db4b")
- })
- })
-
- Convey("with a manifest already in the database the manifest should not create a new manifest", func() {
- for _, task := range taskConfig.Project.Tasks {
- So(len(task.Commands), ShouldNotEqual, 0)
- for _, command := range task.Commands {
- pluginCmds, err := Render(command, taskConfig.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
- So(pluginCmds, ShouldNotBeNil)
- So(err, ShouldBeNil)
- err = pluginCmds[0].Execute(ctx, comm, logger, taskConfig)
- So(err, ShouldBeNil)
- }
-
- }
- Convey("the manifest should be inserted properly into the database", func() {
- currentManifest, err := manifest.FindOne(manifest.ById(taskConfig.Task.Version))
- So(err, ShouldBeNil)
- So(currentManifest, ShouldNotBeNil)
- So(currentManifest.ProjectName, ShouldEqual, taskConfig.ProjectRef.Id)
- So(currentManifest.Modules, ShouldNotBeNil)
- So(len(currentManifest.Modules), ShouldEqual, 1)
- for key := range currentManifest.Modules {
- So(key, ShouldEqual, "sample")
- }
- So(currentManifest.Modules["sample"].Repo, ShouldEqual, "sample")
- So(taskConfig.Expansions.Get("sample_rev"), ShouldEqual, "3c7bfeb82d492dc453e7431be664539c35b5db4b")
- So(currentManifest.Id, ShouldEqual, taskConfig.Task.Version)
- })
- })
- })
-}
diff --git a/agent/command/perf_send.go b/agent/command/perf_send.go
index 2e36e90ef9f..378ecf06469 100644
--- a/agent/command/perf_send.go
+++ b/agent/command/perf_send.go
@@ -3,23 +3,25 @@ package command
import (
"context"
+ "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/poplar"
"github.com/evergreen-ci/poplar/rpc"
+ "github.com/evergreen-ci/utility"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
)
type perfSend struct {
// AWSKey and AWSSecret are the user's credentials for authenticating
- // interactions with s3. These are required if any of the tests have
+ // interactions with S3. These are required if any of the tests have
// artifacts.
AWSKey string `mapstructure:"aws_key" plugin:"expand"`
AWSSecret string `mapstructure:"aws_secret" plugin:"expand"`
- // Region is the s3 region where the global bucket is located. It
+ // Region is the S3 region where the global bucket is located. It
// defaults to "us-east-1".
Region string `mapstructure:"region" plugin:"expand"`
@@ -27,11 +29,11 @@ type perfSend struct {
// without a bucket specified.
Bucket string `mapstructure:"bucket" plugin:"expand"`
- // Prefix specifies the global prefix to use within the s3 bucket for
+ // Prefix specifies the global prefix to use within the S3 bucket for
// any artifacts without a prefix specified.
Prefix string `mapstructure:"prefix" plugin:"expand"`
- // File is the file containing either the json or yaml representation
+ // File is the file containing either the JSON or YAML representation
// of the performance report tests.
File string `mapstructure:"file" plugin:"expand"`
@@ -43,40 +45,51 @@ func (*perfSend) Name() string { return "perf.send" }
func (c *perfSend) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%v' params", c.Name())
+ return errors.Wrap(err, "decoding params")
}
if c.File == "" {
- return errors.New("'file' param must not be blank")
+ return errors.New("file must not be blank")
}
return nil
}
-func (c *perfSend) Execute(ctx context.Context,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
+func (c *perfSend) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return err
+ return errors.Wrap(err, "applying expansions")
}
- // Read the file and add the evergreen info.
+ // Read the file and add the Evergreen info.
filename := getJoinedWithWorkDir(conf, c.File)
report, err := poplar.LoadTests(filename)
if err != nil {
- return errors.Wrapf(err, "problem reading tests from '%s'", filename)
+ return errors.Wrapf(err, "reading tests from file '%s'", filename)
}
c.addEvgData(report, conf)
- // Send data to Cedar.
+ // Send data to the Cedar and Data-Pipes services.
conn, err := comm.GetCedarGRPCConn(ctx)
if err != nil {
- return errors.Wrap(err, "problem connecting to cedar")
+ return errors.Wrap(err, "connecting to Cedar")
}
+ dataPipes, err := comm.GetDataPipesConfig(ctx)
+ if err != nil {
+ return errors.Wrap(err, "getting the Data-Pipes config")
+ }
+ httpClient := utility.GetDefaultHTTPRetryableClient()
+ defer utility.PutHTTPClient(httpClient)
opts := rpc.UploadReportOptions{
- Report: report,
- ClientConn: conn,
+ Report: report,
+ ClientConn: conn,
+ DataPipesHost: dataPipes.Host,
+ DataPipesRegion: dataPipes.Region,
+ AWSAccessKey: dataPipes.AWSAccessKey,
+ AWSSecretKey: dataPipes.AWSSecretKey,
+ AWSToken: dataPipes.AWSToken,
+ DataPipesHTTPClient: httpClient,
}
- return errors.Wrap(rpc.UploadReport(ctx, opts), "failed to upload report to cedar")
+ return errors.Wrap(rpc.UploadReport(ctx, opts), "uploading report to Cedar")
}
func (c *perfSend) addEvgData(report *poplar.Report, conf *internal.TaskConfig) {
@@ -87,7 +100,8 @@ func (c *perfSend) addEvgData(report *poplar.Report, conf *internal.TaskConfig)
report.TaskName = conf.Task.DisplayName
report.TaskID = conf.Task.Id
report.Execution = conf.Task.Execution
- report.Mainline = !conf.Task.IsPatchRequest()
+ report.Mainline = conf.Task.Requester == evergreen.RepotrackerVersionRequester
+ report.Requester = conf.Task.Requester
report.BucketConf.APIKey = c.AWSKey
report.BucketConf.APISecret = c.AWSSecret
diff --git a/agent/command/perf_send_test.go b/agent/command/perf_send_test.go
index a16b7c46426..17f601db028 100644
--- a/agent/command/perf_send_test.go
+++ b/agent/command/perf_send_test.go
@@ -69,6 +69,7 @@ func TestPerfSendAddEvgData(t *testing.T) {
TaskID: conf.Task.Id,
Execution: conf.Task.Execution,
Mainline: true,
+ Requester: evergreen.RepotrackerVersionRequester,
BucketConf: poplar.BucketConfiguration{
APIKey: cmd.AWSKey,
APISecret: cmd.AWSSecret,
diff --git a/agent/command/registry.go b/agent/command/registry.go
index d1862a4d039..f9c8529e9a9 100644
--- a/agent/command/registry.go
+++ b/agent/command/registry.go
@@ -2,7 +2,6 @@ package command
import (
"fmt"
- "strings"
"sync"
"time"
@@ -35,16 +34,13 @@ func init() {
"generate.tasks": generateTaskFactory,
"git.apply_patch": gitApplyPatchFactory,
"git.get_project": gitFetchProjectFactory,
- "git.merge_pr": gitMergePrFactory,
+ "git.merge_pr": gitMergePRFactory,
"git.push": gitPushFactory,
"gotest.parse_files": goTestFactory,
"gotest.parse_json": goTest2JSONFactory,
- "json.get": taskDataGetFactory,
- "json.get_history": taskDataHistoryFactory,
- "json.send": taskDataSendFactory,
"keyval.inc": keyValIncFactory,
"mac.sign": macSignFactory,
- "manifest.load": manifestLoadFactory,
+ evergreen.ManifestLoadCommandName: manifestLoadFactory,
"perf.send": perfSendFactory,
"downstream_expansions.set": setExpansionsFactory,
"s3.get": s3GetFactory,
@@ -56,7 +52,6 @@ func init() {
evergreen.ShellExecCommandName: shellExecFactory,
"shell.track": shellTrackFactory,
"subprocess.exec": subprocessExecFactory,
- "subprocess.scripting": subprocessScriptingFactory,
"setup.initial": initialSetupFactory,
"timeout.update": timeoutUpdateFactory,
}
@@ -67,16 +62,15 @@ func init() {
}
func RegisterCommand(name string, factory CommandFactory) error {
- return errors.Wrap(evgRegistry.registerCommand(name, factory),
- "problem registering command")
+ return errors.Wrapf(evgRegistry.registerCommand(name, factory), "registering command '%s'", name)
}
func GetCommandFactory(name string) (CommandFactory, bool) {
return evgRegistry.getCommandFactory(name)
}
-func Render(c model.PluginCommandConf, project *model.Project) ([]Command, error) {
- return evgRegistry.renderCommands(c, project)
+func Render(c model.PluginCommandConf, project *model.Project, block string) ([]Command, error) {
+ return evgRegistry.renderCommands(c, project, block)
}
func RegisteredCommandNames() []string { return evgRegistry.registeredCommandNames() }
@@ -113,7 +107,7 @@ func (r *commandRegistry) registerCommand(name string, factory CommandFactory) e
defer r.mu.Unlock()
if name == "" {
- return errors.New("cannot register a command for the empty string ''")
+ return errors.New("cannot register a command without a name")
}
if _, ok := r.cmds[name]; ok {
@@ -137,23 +131,26 @@ func (r *commandRegistry) getCommandFactory(name string) (CommandFactory, bool)
}
func (r *commandRegistry) renderCommands(commandInfo model.PluginCommandConf,
- project *model.Project) ([]Command, error) {
+ project *model.Project, block string) ([]Command, error) {
var (
parsed []model.PluginCommandConf
out []Command
- errs []string
)
+ catcher := grip.NewBasicCatcher()
+
+ if block != "" {
+ block = fmt.Sprintf(`in "%v"`, block)
+ }
if name := commandInfo.Function; name != "" {
cmds, ok := project.Functions[name]
if !ok {
- errs = append(errs, fmt.Sprintf("function '%s' not found in project functions", name))
+ catcher.Errorf("function '%s' not found in project functions", name)
} else if cmds != nil {
for i, c := range cmds.List() {
if c.Function != "" {
- errs = append(errs, fmt.Sprintf("can not reference a function within a "+
- "function: '%s' referenced within '%s'", c.Function, name))
+ catcher.Errorf("cannot reference a function ('%s') within another function ('%s')", c.Function, name)
continue
}
@@ -163,7 +160,7 @@ func (r *commandRegistry) renderCommands(commandInfo model.PluginCommandConf,
}
if c.DisplayName == "" {
- c.DisplayName = fmt.Sprintf(`'%v' in "%v" (#%d)`, c.Command, name, i+1)
+ c.DisplayName = fmt.Sprintf(`'%v' in "%v" %s (#%d)`, c.Command, name, block, i+1)
}
if c.TimeoutSecs == 0 {
@@ -174,19 +171,24 @@ func (r *commandRegistry) renderCommands(commandInfo model.PluginCommandConf,
}
}
} else {
+ if commandInfo.DisplayName == "" {
+ commandInfo.DisplayName = fmt.Sprintf(`'%v' %s `, commandInfo.Command, block)
+ }
parsed = append(parsed, commandInfo)
}
for _, c := range parsed {
factory, ok := r.getCommandFactory(c.Command)
if !ok {
- errs = append(errs, fmt.Sprintf("command '%s' is not registered", c.Command))
+ catcher.Errorf("command '%s' is not registered", c.Command)
continue
}
cmd := factory()
+ // Note: this parses the parameters before expansions are applied.
+ // Expansions are only available when the command is executed.
if err := cmd.ParseParams(c.Params); err != nil {
- errs = append(errs, errors.Wrapf(err, "problem parsing input of %s (%s)", c.Command, c.DisplayName).Error())
+ catcher.Wrapf(err, "parsing parameters for command '%s' ('%s')", c.Command, c.DisplayName)
continue
}
cmd.SetType(c.GetType(project))
@@ -196,8 +198,8 @@ func (r *commandRegistry) renderCommands(commandInfo model.PluginCommandConf,
out = append(out, cmd)
}
- if len(errs) > 0 {
- return nil, errors.New(strings.Join(errs, "; "))
+ if catcher.HasErrors() {
+ return nil, catcher.Resolve()
}
return out, nil
diff --git a/agent/command/registry_test.go b/agent/command/registry_test.go
index f367fecbebb..387e7cc5d15 100644
--- a/agent/command/registry_test.go
+++ b/agent/command/registry_test.go
@@ -57,7 +57,7 @@ func TestRenderCommands(t *testing.T) {
info := model.PluginCommandConf{Command: "command.mock"}
project := model.Project{}
- cmds, err := registry.renderCommands(info, &project)
+ cmds, err := registry.renderCommands(info, &project, "")
assert.NoError(t, err)
require.Len(t, cmds, 1)
assert.Equal(t, model.DefaultCommandType, cmds[0].Type())
@@ -67,7 +67,7 @@ func TestRenderCommands(t *testing.T) {
info := model.PluginCommandConf{Command: "command.mock"}
project := model.Project{CommandType: evergreen.CommandTypeSetup}
- cmds, err := registry.renderCommands(info, &project)
+ cmds, err := registry.renderCommands(info, &project, "")
assert.NoError(t, err)
require.Len(t, cmds, 1)
assert.Equal(t, evergreen.CommandTypeSetup, cmds[0].Type())
@@ -80,7 +80,7 @@ func TestRenderCommands(t *testing.T) {
}
project := model.Project{}
- cmds, err := registry.renderCommands(info, &project)
+ cmds, err := registry.renderCommands(info, &project, "")
assert.NoError(t, err)
require.Len(t, cmds, 1)
assert.Equal(t, evergreen.CommandTypeSystem, cmds[0].Type())
@@ -93,7 +93,7 @@ func TestRenderCommands(t *testing.T) {
}
project := model.Project{CommandType: evergreen.CommandTypeSetup}
- cmds, err := registry.renderCommands(info, &project)
+ cmds, err := registry.renderCommands(info, &project, "")
assert.NoError(t, err)
require.Len(t, cmds, 1)
assert.Equal(t, evergreen.CommandTypeSystem, cmds[0].Type())
diff --git a/agent/command/results_go_test2json.go b/agent/command/results_go_test2json.go
index 38ce4b284a3..19e36e89568 100644
--- a/agent/command/results_go_test2json.go
+++ b/agent/command/results_go_test2json.go
@@ -2,20 +2,9 @@ package command
import (
"context"
- "io/ioutil"
- "path"
- "path/filepath"
- "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/evergreen-ci/go-test2json"
- "github.com/mitchellh/mapstructure"
- "github.com/mongodb/grip"
- "github.com/pkg/errors"
)
type goTest2JSONCommand struct {
@@ -24,145 +13,12 @@ type goTest2JSONCommand struct {
base
}
-func goTest2JSONFactory() Command { return &goTest2JSONCommand{} }
-func (c *goTest2JSONCommand) Name() string { return "gotest.parse_json" }
-
-func (c *goTest2JSONCommand) ParseParams(params map[string]interface{}) error {
- if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%s' params", c.Name())
- }
-
- if len(c.Files) == 0 {
- return errors.Errorf("error validating params: must specify at least one "+
- "file pattern to parse: '%+v'", params)
- }
- return nil
-}
-
+// gotest.parse_json is deprecated
+func goTest2JSONFactory() Command { return &goTest2JSONCommand{} }
+func (c *goTest2JSONCommand) Name() string { return "gotest.parse_json" }
+func (c *goTest2JSONCommand) ParseParams(params map[string]interface{}) error { return nil }
func (c *goTest2JSONCommand) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
-
- if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.Wrap(err, "failed to expand files")
- }
-
- // All file patterns should be relative to the task's working directory.
- for i, file := range c.Files {
- c.Files[i] = filepath.Join(conf.WorkDir, file)
- }
-
- files, err := globFiles(c.Files...)
- if err != nil {
- return errors.Wrapf(err, "obtaining names of output files")
- }
- catcher := grip.NewBasicCatcher()
- for _, file := range files {
- catcher.Add(c.executeOneFile(ctx, file, comm, logger, conf))
- }
-
- return catcher.Resolve()
-}
-
-func (c *goTest2JSONCommand) executeOneFile(ctx context.Context, file string,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
- logger.Task().Infof("Parsing test file '%s'...", file)
- results, err := c.loadJSONFile(file, logger, conf)
- if err != nil {
- logger.Task().Errorf("Error parsing test file: %s", err)
- return errors.Wrapf(err, "Error parsing test file: %s", err)
- }
-
- if len(results.Tests) == 0 {
- logger.Task().Warning("Parsed no events from test file")
- if len(results.Log) == 0 {
- logger.Task().Warning("Test log is empty")
- return nil
- }
- }
-
- logger.Task().Info("Sending test logs to server...")
- _, suiteName := filepath.Split(file)
- log := model.TestLog{
- Name: suiteName,
- Task: conf.Task.Id,
- TaskExecution: conf.Task.Execution,
- Lines: results.Log,
- }
- logId, err := sendTestLog(ctx, comm, conf, &log)
- if err != nil {
- logger.Task().Errorf("failed to post log: %v", err)
- return errors.Wrap(err, "failed to post log")
- }
- logger.Task().Info("Finished posting logs to server")
-
- if len(results.Tests) == 0 {
- return nil
- }
-
- // exclude package level results if we have more than 1 test
- if len(results.Tests) > 1 {
- key := test2json.TestKey{
- Name: "",
- Iteration: 0,
- }
- delete(results.Tests, key)
- }
-
- evgResults := make([]task.TestResult, 0, len(results.Tests))
- for _, v := range results.Tests {
- testResult := goTest2JSONToTestResult(suiteName, v.Name, conf.Task, v)
- testResult.LogId = logId
- evgResults = append(evgResults, testResult)
- }
-
- logger.Task().Info("Sending parsed results to server...")
- if err := sendTestResults(ctx, comm, logger, conf, &task.LocalTestResults{
- Results: evgResults,
- }); err != nil {
- logger.Task().Errorf("problem posting parsed results to the server: %+v", err)
- return errors.Wrap(err, "problem sending test results")
- }
- logger.Task().Info("Successfully sent parsed results to server")
-
+ logger.Task().Warning("gotest.parse_json deprecated")
return nil
}
-
-func (c *goTest2JSONCommand) loadJSONFile(file string, logger client.LoggerProducer, conf *internal.TaskConfig) (*test2json.TestResults, error) {
- filePath := file
- if !path.IsAbs(filePath) {
- filePath = path.Join(conf.WorkDir, filePath)
- }
-
- data, err := ioutil.ReadFile(filePath)
- if err != nil {
- logger.Task().Errorf("Failed to open '%s'", filePath)
- return nil, errors.Wrapf(err, "failed to open: %s", filePath)
- }
-
- results, err := test2json.ProcessBytes(data)
- if err != nil {
- logger.Task().Errorf("Failed to process '%s': %+v", filePath, err)
- return nil, errors.Wrapf(err, "failed to process '%s'", filePath)
- }
-
- return results, nil
-}
-
-func goTest2JSONToTestResult(suiteName, key string, t *task.Task, test *test2json.Test) task.TestResult {
- result := task.TestResult{
- TestFile: key,
- LogTestName: suiteName,
- LineNum: test.FirstLogLine,
- Status: evergreen.TestFailedStatus,
- StartTime: float64(test.StartTime.Unix()),
- EndTime: float64(test.EndTime.Unix()),
- }
- switch test.Status {
- case test2json.Passed:
- result.Status = evergreen.TestSucceededStatus
- case test2json.Skipped:
- result.Status = evergreen.TestSkippedStatus
- }
-
- return result
-}
diff --git a/agent/command/results_go_test2json_test.go b/agent/command/results_go_test2json_test.go
deleted file mode 100644
index c7d6e908af6..00000000000
--- a/agent/command/results_go_test2json_test.go
+++ /dev/null
@@ -1,122 +0,0 @@
-package command
-
-import (
- "context"
- "path/filepath"
- "testing"
-
- "github.com/evergreen-ci/evergreen/agent/internal"
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/testutil"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/mongodb/grip/level"
- "github.com/mongodb/grip/send"
- "github.com/stretchr/testify/suite"
-)
-
-func test2JSONFile() string {
- return filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "test2json.json")
-}
-
-type test2JSONSuite struct {
- args map[string]interface{}
- c *goTest2JSONCommand
-
- sender *send.InternalSender
- comm *client.Mock
- conf *internal.TaskConfig
-
- suite.Suite
-}
-
-func TestGoTest2JSON(t *testing.T) {
- suite.Run(t, &test2JSONSuite{})
-}
-
-func (s *test2JSONSuite) SetupTest() {
- s.c = goTest2JSONFactory().(*goTest2JSONCommand)
- s.c.Files = []string{test2JSONFile()}
-
- s.args = map[string]interface{}{
- "files": []string{test2JSONFile()},
- }
- s.Equal("gotest.parse_json", s.c.Name())
-
- s.comm = &client.Mock{
- LogID: "log0",
- }
- s.conf = &internal.TaskConfig{
- Task: &task.Task{
- Id: "task0",
- },
- ProjectRef: &model.ProjectRef{},
- Expansions: util.NewExpansions(map[string]string{}),
- }
- s.conf.Expansions.Put("expandme", test2JSONFile())
- s.sender = send.MakeInternalLogger()
-}
-
-func (s *test2JSONSuite) TestNoFiles() {
- s.c.Files = []string{}
- s.args = map[string]interface{}{}
- s.EqualError(s.c.ParseParams(s.args), "error validating params: must specify at least one file pattern to parse: 'map[]'")
-
- s.c.Files = []string{}
- s.args = map[string]interface{}{
- "files": []string{},
- }
- s.EqualError(s.c.ParseParams(s.args), "error validating params: must specify at least one file pattern to parse: 'map[files:[]]'")
-
- s.EqualError(s.c.ParseParams(nil), "error validating params: must specify at least one file pattern to parse: 'map[]'")
-}
-
-func (s *test2JSONSuite) TestParseArgs() {
- s.c.Files = []string{}
- s.args = map[string]interface{}{
- "files": []string{test2JSONFile(), "some/other/file.json"},
- }
- s.NoError(s.c.ParseParams(s.args))
- s.Equal(s.args["files"], s.c.Files)
-}
-
-func (s *test2JSONSuite) TestPathExpansions() {
- s.c.Files = []string{"${expandme}"}
- logger := client.NewSingleChannelLogHarness("test", s.sender)
- s.Require().NoError(s.c.Execute(context.Background(), s.comm, logger, s.conf))
- s.Require().Equal(test2JSONFile(), s.c.Files[0])
- msgs := drainMessages(s.sender)
- s.Len(msgs, 7)
- s.noErrorMessages(msgs)
-}
-
-func (s *test2JSONSuite) TestExecute() {
- logger := client.NewSingleChannelLogHarness("test", s.sender)
- s.Require().NoError(s.c.Execute(context.Background(), s.comm, logger, s.conf))
-
- msgs := drainMessages(s.sender)
- s.Len(msgs, 7)
- s.noErrorMessages(msgs)
-
- s.Len(s.comm.LocalTestResults.Results, 13)
- s.Equal(1, s.comm.TestLogCount)
- s.Len(s.comm.TestLogs, 1)
-}
-
-func (s *test2JSONSuite) noErrorMessages(msgs []*send.InternalMessage) {
- for i := range msgs {
- if msgs[i].Priority >= level.Warning {
- s.T().Errorf("message: '%s' had level: %s", msgs[i].Message.String(), msgs[i].Level)
- }
- }
-}
-
-func drainMessages(sender *send.InternalSender) []*send.InternalMessage {
- out := []*send.InternalMessage{}
- for msg, ok := sender.GetMessageSafe(); ok; msg, ok = sender.GetMessageSafe() {
- out = append(out, msg)
- }
-
- return out
-}
diff --git a/agent/command/results_gotest.go b/agent/command/results_gotest.go
index a61e079626c..816f706f6c0 100644
--- a/agent/command/results_gotest.go
+++ b/agent/command/results_gotest.go
@@ -11,7 +11,7 @@ import (
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/evergreen/util"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
@@ -40,19 +40,18 @@ func (c *goTestResults) Name() string { return "gotest.parse_files" }
func (c *goTestResults) ParseParams(params map[string]interface{}) error {
var err error
if err = mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%s' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.OptionalOutput != "" {
c.outputIsOptional, err = strconv.ParseBool(c.OptionalOutput)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "parsing optional output parameter as a boolean")
}
}
if len(c.Files) == 0 {
- return errors.Errorf("error validating params: must specify at least one "+
- "file pattern to parse: '%+v'", params)
+ return errors.Errorf("must specify at least one file pattern to parse")
}
return nil
}
@@ -63,9 +62,7 @@ func (c *goTestResults) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- err = errors.Wrap(err, "error expanding params")
- logger.Task().Errorf("Error parsing goTest files: %+v", err)
- return err
+ return errors.Wrap(err, "applying expansions")
}
// All file patterns should be relative to the task's working directory.
@@ -91,7 +88,7 @@ func (c *goTestResults) Execute(ctx context.Context,
// parse all of the files
logs, results, err := parseTestOutputFiles(ctx, logger, conf, outputFiles)
if err != nil {
- return errors.Wrap(err, "error parsing output results")
+ return errors.Wrap(err, "parsing output results")
}
if err := sendTestLogsAndResults(ctx, comm, logger, conf, logs, results); err != nil {
@@ -127,7 +124,7 @@ func globFiles(patterns ...string) ([]string, error) {
}
// parseTestOutput parses the test results and logs from a single output source.
-func parseTestOutput(ctx context.Context, conf *internal.TaskConfig, report io.Reader, suiteName string) (model.TestLog, []task.TestResult, error) {
+func parseTestOutput(ctx context.Context, conf *internal.TaskConfig, report io.Reader, suiteName string) (model.TestLog, []testresult.TestResult, error) {
// parse the output logs
parser := &goTestParser{}
if err := parser.Parse(report); err != nil {
@@ -147,21 +144,21 @@ func parseTestOutput(ctx context.Context, conf *internal.TaskConfig, report io.R
Lines: logLines,
}
- return testLog, ToModelTestResults(parser.Results(), suiteName).Results, nil
+ return testLog, ToModelTestResults(parser.Results(), suiteName), nil
}
// parseTestOutputFiles parses all of the files that are passed in, and returns
// the test logs and test results found within.
func parseTestOutputFiles(ctx context.Context, logger client.LoggerProducer,
- conf *internal.TaskConfig, outputFiles []string) ([]model.TestLog, [][]task.TestResult, error) {
+ conf *internal.TaskConfig, outputFiles []string) ([]model.TestLog, [][]testresult.TestResult, error) {
- var results [][]task.TestResult
+ var results [][]testresult.TestResult
var logs []model.TestLog
// now, open all the files, and parse the test results
for _, outputFile := range outputFiles {
- if ctx.Err() != nil {
- return nil, nil, errors.New("command was stopped")
+ if err := ctx.Err(); err != nil {
+ return nil, nil, errors.Wrap(err, "canceled while processing test output files")
}
_, suiteName := filepath.Split(outputFile)
@@ -171,8 +168,7 @@ func parseTestOutputFiles(ctx context.Context, logger client.LoggerProducer,
fileReader, err := os.Open(outputFile)
if err != nil {
// don't bomb out on a single bad file
- logger.Task().Errorf("Unable to open file '%s' for parsing: %v",
- outputFile, err)
+ logger.Task().Error(errors.Wrapf(err, "opening file '%s' for parsing", outputFile))
continue
}
defer fileReader.Close() //nolint: evg-lint
@@ -180,7 +176,7 @@ func parseTestOutputFiles(ctx context.Context, logger client.LoggerProducer,
log, result, err := parseTestOutput(ctx, conf, fileReader, suiteName)
if err != nil {
// continue on error
- logger.Task().Errorf("Error parsing file '%s': %v", outputFile, err)
+ logger.Task().Error(errors.Wrapf(err, "parsing file '%s'", outputFile))
continue
}
diff --git a/agent/command/results_gotest_parser.go b/agent/command/results_gotest_parser.go
index cc9c595f8a2..52cec6b2078 100644
--- a/agent/command/results_gotest_parser.go
+++ b/agent/command/results_gotest_parser.go
@@ -8,7 +8,7 @@ import (
"time"
"github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/pkg/errors"
)
@@ -50,25 +50,22 @@ type goTestResult struct {
StartLine int
// Number representing the last line of the test in log output
EndLine int
-
- // Can be set to mark the id of the server-side log that this
- // results corresponds to
- LogId string
}
// ToModelTestResults converts the implementation of LocalTestResults native
-// to the goTest plugin to the implementation used by MCI tasks
-func ToModelTestResults(results []*goTestResult, suiteName string) task.LocalTestResults {
- var modelResults []task.TestResult
+// to the goTest plugin to the implementation used by MCI tasks.
+func ToModelTestResults(results []*goTestResult, suiteName string) []testresult.TestResult {
+ var modelResults []testresult.TestResult
for _, res := range results {
- // start and end are times that we don't know,
- // represented as a 64bit floating point (epoch time fraction)
- var start float64 = float64(time.Now().Unix())
- var end float64 = start + res.RunTime.Seconds()
+ // Start and end are times that we don't know, we must
+ // calculate them here based on the result runtime.
+ start := time.Now()
+ end := start.Add(res.RunTime)
+
var status string
switch res.Status {
- // as long as we use a regex, it should be impossible to
- // get an incorrect status code
+ // As long as we use a regex, it should be impossible to get an
+ // incorrect status code.
case PASS:
status = evergreen.TestSucceededStatus
case SKIP:
@@ -76,18 +73,18 @@ func ToModelTestResults(results []*goTestResult, suiteName string) task.LocalTes
case FAIL:
status = evergreen.TestFailedStatus
}
- convertedResult := task.TestResult{
- TestFile: res.Name,
- Status: status,
- StartTime: start,
- EndTime: end,
- LogTestName: suiteName,
- LineNum: res.StartLine - 1,
- LogId: res.LogId,
+ convertedResult := testresult.TestResult{
+ TestName: res.Name,
+ Status: status,
+ TestStartTime: start,
+ TestEndTime: end,
+ LogTestName: suiteName,
+ LineNum: res.StartLine - 1,
}
modelResults = append(modelResults, convertedResult)
}
- return task.LocalTestResults{Results: modelResults}
+
+ return modelResults
}
// goTestParser parses tests following go test output format.
@@ -116,9 +113,6 @@ func (vp *goTestParser) Parse(testOutput io.Reader) error {
testScanner := bufio.NewScanner(testOutput)
vp.tests = map[string][]*goTestResult{}
for testScanner.Scan() {
- if err := testScanner.Err(); err != nil {
- return errors.Wrap(err, "error reading test output")
- }
// logs are appended at the start of the loop, allowing
// len(vp.logs) to represent the current line number [1...]
logLine := testScanner.Text()
@@ -127,7 +121,7 @@ func (vp *goTestParser) Parse(testOutput io.Reader) error {
return errors.WithStack(err)
}
}
- return nil
+ return errors.Wrap(testScanner.Err(), "reading test output")
}
// handleLine attempts to parse and store any test updates from the given line.
@@ -153,7 +147,7 @@ func (vp *goTestParser) handleLine(line string) error {
func (vp *goTestParser) handleEnd(line string, rgx *regexp.Regexp) error {
name, status, duration, err := endInfoFromLogLine(line, rgx)
if err != nil {
- return errors.Wrapf(err, "error parsing end line '%s'", line)
+ return errors.Wrapf(err, "parsing end line '%s'", line)
}
tAry, ok := vp.tests[name]
if !ok || tAry == nil {
@@ -174,7 +168,7 @@ func (vp *goTestParser) handleEnd(line string, rgx *regexp.Regexp) error {
func (vp *goTestParser) handleStart(line string, rgx *regexp.Regexp, defaultFail bool) error {
name, err := startInfoFromLogLine(line, rgx)
if err != nil {
- return errors.Wrapf(err, "error parsing start line '%s'", line)
+ return errors.Wrapf(err, "parsing start line '%s'", line)
}
t := vp.newTestResult(name)
@@ -201,7 +195,7 @@ func (vp *goTestParser) handleStart(line string, rgx *regexp.Regexp, defaultFail
func (vp *goTestParser) handleFailedBuild(line string) error {
path, err := pathNameFromLogLine(line)
if err != nil {
- return errors.Wrapf(err, "error parsing start line '%s'", line)
+ return errors.Wrapf(err, "parsing start line '%s'", line)
}
return errors.Errorf("go test failed for path '%s'", path)
}
@@ -223,8 +217,7 @@ func startInfoFromLogLine(line string, rgx *regexp.Regexp) (string, error) {
if len(matches) < 2 {
// futureproofing -- this can't happen as long as we
// check Match() before calling startInfoFromLogLine
- return "", errors.Errorf(
- "unable to match start line regular expression on line: %s", line)
+ return "", errors.Errorf("unable to match start line regular expression on line '%s'", line)
}
return matches[1], nil
}
@@ -237,8 +230,7 @@ func endInfoFromLogLine(line string, rgx *regexp.Regexp) (string, string, time.D
if len(matches) < 4 {
// this block should never be reached if we call endRegex.Match()
// before entering this function
- return "", "", 0, errors.Errorf(
- "unable to match end line regular expression on line: %s", line)
+ return "", "", 0, errors.Errorf("unable to match end line regular expression on line '%s'", line)
}
status := matches[1]
name := matches[2]
@@ -247,7 +239,7 @@ func endInfoFromLogLine(line string, rgx *regexp.Regexp) (string, string, time.D
var err error
duration, err = time.ParseDuration(strings.Replace(matches[3], " ", "", -1))
if err != nil {
- return "", "", 0, errors.Wrap(err, "error parsing test runtime")
+ return "", "", 0, errors.Wrap(err, "parsing test runtime duration")
}
}
return name, status, duration, nil
@@ -257,7 +249,7 @@ func endInfoFromLogLine(line string, rgx *regexp.Regexp) (string, string, time.D
func pathNameFromLogLine(line string) (string, error) {
matches := goTestFailedStatusRegex.FindStringSubmatch(line)
if len(matches) < 2 {
- return "", errors.Errorf("unable to match build line to regular expression on line: %s", line)
+ return "", errors.Errorf("unable to match build line to regular expression on line '%s'", line)
}
return matches[1], nil
}
diff --git a/agent/command/results_gotest_parser_test.go b/agent/command/results_gotest_parser_test.go
index fd76f7cf6ed..01887e6dc3b 100644
--- a/agent/command/results_gotest_parser_test.go
+++ b/agent/command/results_gotest_parser_test.go
@@ -3,7 +3,7 @@ package command
import (
"bytes"
"fmt"
- "io/ioutil"
+ "os"
"path/filepath"
"strings"
"testing"
@@ -11,6 +11,7 @@ import (
"github.com/evergreen-ci/evergreen/testutil"
. "github.com/smartystreets/goconvey/convey"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -90,7 +91,7 @@ func TestParserFunctionality(t *testing.T) {
cwd := testutil.GetDirectoryOfFile()
Convey("With a simple log file and parser", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "1_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "1_simple.log"))
require.NoError(t, err, "couldn't open log file")
parser := &goTestParser{}
@@ -125,7 +126,7 @@ func TestParserFunctionality(t *testing.T) {
})
})
Convey("With a gocheck log file and parser", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "2_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "2_simple.log"))
require.NoError(t, err, "couldn't open log file")
parser := &goTestParser{}
@@ -154,7 +155,7 @@ func TestParserFunctionality(t *testing.T) {
})
})
Convey("un-terminated tests are failures", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "3_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "3_simple.log"))
require.NoError(t, err, "couldn't open log file")
parser := &goTestParser{}
err = parser.Parse(bytes.NewBuffer(logdata))
@@ -166,7 +167,7 @@ func TestParserFunctionality(t *testing.T) {
So(results[0].Status, ShouldEqual, FAIL)
})
Convey("testify suites with leading spaces", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "4_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "4_simple.log"))
So(err, ShouldBeNil)
parser := &goTestParser{}
@@ -179,7 +180,7 @@ func TestParserFunctionality(t *testing.T) {
So(results[18].Status, ShouldEqual, PASS)
})
Convey("gotest log with multiple executions of the same test", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "5_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "5_simple.log"))
So(err, ShouldBeNil)
parser := &goTestParser{}
@@ -196,7 +197,7 @@ func TestParserFunctionality(t *testing.T) {
})
Convey("gotest log with negative duration", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "6_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "6_simple.log"))
So(err, ShouldBeNil)
parser := &goTestParser{}
@@ -209,7 +210,7 @@ func TestParserFunctionality(t *testing.T) {
})
Convey("deeply nested Subtests", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "7_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "7_simple.log"))
So(err, ShouldBeNil)
parser := &goTestParser{}
@@ -234,7 +235,7 @@ func TestParserFunctionality(t *testing.T) {
})
Convey("gotest log with failed build", t, func() {
- logdata, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "gotest", "8_simple.log"))
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "8_simple.log"))
So(err, ShouldBeNil)
parser := &goTestParser{}
@@ -242,4 +243,12 @@ func TestParserFunctionality(t *testing.T) {
So(err, ShouldNotBeNil)
So(err.Error(), ShouldContainSubstring, "github.com/evergreen-ci/evergreen/model/host")
})
+
+ t.Run("LargeLogLine", func(t *testing.T) {
+ logdata, err := os.ReadFile(filepath.Join(cwd, "testdata", "gotest", "large_line.log"))
+ require.NoError(t, err)
+
+ parser := &goTestParser{}
+ assert.Error(t, parser.Parse(bytes.NewBuffer(logdata)))
+ })
}
diff --git a/agent/command/results_gotest_test.go b/agent/command/results_gotest_test.go
index 2119ba9d742..7a182d9f0a6 100644
--- a/agent/command/results_gotest_test.go
+++ b/agent/command/results_gotest_test.go
@@ -18,7 +18,7 @@ import (
)
func reset(t *testing.T) {
- require.NoError(t, db.ClearCollections(task.Collection, model.TestLogCollection), "error clearing test collections")
+ require.NoError(t, db.ClearCollections(task.Collection, model.TestLogCollection))
}
func TestGotestPluginOnFailingTests(t *testing.T) {
@@ -35,22 +35,22 @@ func TestGotestPluginOnFailingTests(t *testing.T) {
configPath := filepath.Join(currentDirectory, "testdata", "gotest", "bad.yml")
modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configPath, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
+ require.NoError(t, err)
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
require.NoError(t, err)
logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
So(err, ShouldBeNil)
Convey("all commands in test project should execute successfully", func() {
curWD, err := os.Getwd()
- require.NoError(t, err, "Couldn't get working directory: %s", curWD)
+ require.NoError(t, err)
conf.WorkDir = curWD
for _, testTask := range conf.Project.Tasks {
So(len(testTask.Commands), ShouldNotEqual, 0)
for _, command := range testTask.Commands {
- pluginCmds, err := Render(command, conf.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, conf.Project, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
err = pluginCmds[0].Execute(ctx, comm, logger, conf)
@@ -94,9 +94,9 @@ func TestGotestPluginOnPassingTests(t *testing.T) {
configPath := filepath.Join(currentDirectory, "testdata", "bad.yml")
modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configPath, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
+ require.NoError(t, err)
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
require.NoError(t, err)
comm := client.NewMock("http://localhost.com")
@@ -105,14 +105,14 @@ func TestGotestPluginOnPassingTests(t *testing.T) {
Convey("all commands in test project should execute successfully", func() {
curWD, err := os.Getwd()
- require.NoError(t, err, "Couldn't get working directory: %s", curWD)
+ require.NoError(t, err)
conf.WorkDir = curWD
for _, testTask := range conf.Project.Tasks {
So(len(testTask.Commands), ShouldNotEqual, 0)
for _, command := range testTask.Commands {
- pluginCmds, err := Render(command, conf.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, conf.Project, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
@@ -129,12 +129,12 @@ func TestGotestPluginOnPassingTests(t *testing.T) {
So(len(updatedTask.LocalTestResults), ShouldEqual, 2)
So(updatedTask.LocalTestResults[0].Status, ShouldEqual, "pass")
So(updatedTask.LocalTestResults[1].Status, ShouldEqual, "pass")
- So(updatedTask.LocalTestResults[0].TestFile, ShouldEqual, "TestPass01")
- So(updatedTask.LocalTestResults[1].TestFile, ShouldEqual, "TestPass02")
- So(updatedTask.LocalTestResults[0].StartTime, ShouldBeLessThan,
- updatedTask.LocalTestResults[0].EndTime)
- So(updatedTask.LocalTestResults[1].StartTime, ShouldBeLessThan,
- updatedTask.LocalTestResults[1].EndTime)
+ So(updatedTask.LocalTestResults[0].TestName, ShouldEqual, "TestPass01")
+ So(updatedTask.LocalTestResults[1].TestName, ShouldEqual, "TestPass02")
+ So(updatedTask.LocalTestResults[0].TestStartTime, ShouldBeLessThan,
+ updatedTask.LocalTestResults[0].TestEndTime)
+ So(updatedTask.LocalTestResults[1].TestStartTime, ShouldBeLessThan,
+ updatedTask.LocalTestResults[1].TestEndTime)
Convey("with relevant logs present in the DB as well", func() {
log, err := model.FindOneTestLog("0_goodpkg", "testTaskId", 0)
diff --git a/agent/command/results_native.go b/agent/command/results_native.go
index 0ca384e02a2..ed3f8283754 100644
--- a/agent/command/results_native.go
+++ b/agent/command/results_native.go
@@ -4,17 +4,65 @@ import (
"context"
"os"
"path/filepath"
+ "strings"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/utility"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
)
+type nativeTestResults struct {
+ Results []nativeTestResult `json:"results"`
+}
+
+func (t nativeTestResults) convertToService() []testresult.TestResult {
+ serviceResults := make([]testresult.TestResult, len(t.Results))
+ for i, result := range t.Results {
+ serviceResults[i] = result.convertToService()
+ }
+
+ return serviceResults
+}
+
+type nativeTestResult struct {
+ TaskID string `json:"task_id"`
+ Execution int `json:"execution"`
+ TestFile string `json:"test_file"`
+ Status string `json:"status"`
+ GroupID string `json:"group_id"`
+ LogRaw string `json:"log_raw"`
+ URL string `json:"url"`
+ URLRaw string `json:"url_raw"`
+ LineNum int `json:"line_num"`
+ Start float64 `json:"start"`
+ End float64 `json:"end"`
+
+ // logTestName is not part of the command API and used for internal
+ // purposes only.
+ logTestName string `json:"-"`
+}
+
+func (t nativeTestResult) convertToService() testresult.TestResult {
+ return testresult.TestResult{
+ TaskID: t.TaskID,
+ Execution: t.Execution,
+ TestName: t.TestFile,
+ GroupID: t.GroupID,
+ Status: t.Status,
+ LogTestName: t.logTestName,
+ LogURL: t.URL,
+ RawLogURL: t.URLRaw,
+ LineNum: t.LineNum,
+ TestStartTime: utility.FromPythonTime(t.Start),
+ TestEndTime: utility.FromPythonTime(t.End),
+ }
+}
+
// attachResults is used to attach MCI test results in json
// format to the task page.
type attachResults struct {
@@ -32,11 +80,11 @@ func (c *attachResults) Name() string { return evergreen.AttachResultsCommandNam
// to satisfy the 'Command' interface
func (c *attachResults) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%v' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.FileLoc == "" {
- return errors.New("file_location cannot be blank")
+ return errors.New("file location cannot be blank")
}
return nil
@@ -47,7 +95,7 @@ func (c *attachResults) expandAttachResultsParams(taskConfig *internal.TaskConfi
c.FileLoc, err = taskConfig.Expansions.ExpandString(c.FileLoc)
if err != nil {
- return errors.Wrap(err, "error expanding file_location")
+ return errors.Wrap(err, "expanding file location")
}
return nil
@@ -59,7 +107,7 @@ func (c *attachResults) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := c.expandAttachResultsParams(conf); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "applying expansions")
}
reportFileLoc := c.FileLoc
@@ -70,59 +118,51 @@ func (c *attachResults) Execute(ctx context.Context,
// attempt to open the file
reportFile, err := os.Open(reportFileLoc)
if err != nil {
- return errors.Wrapf(err, "couldn't open report file '%s'", reportFileLoc)
+ return errors.Wrapf(err, "opening report file '%s'", reportFileLoc)
}
defer reportFile.Close()
- results := &task.LocalTestResults{}
- if err = utility.ReadJSON(reportFile, results); err != nil {
- return errors.Wrapf(err, "couldn't read report file '%s'", reportFileLoc)
+ var nativeResults nativeTestResults
+ if err = utility.ReadJSON(reportFile, &nativeResults); err != nil {
+ return errors.Wrapf(err, "reading report file '%s'", reportFileLoc)
}
- if err := c.sendTestLogs(ctx, conf, logger, comm, results); err != nil {
- return errors.Wrap(err, "problem sending test logs")
+ if err := c.sendTestLogs(ctx, conf, logger, comm, &nativeResults); err != nil {
+ return errors.Wrap(err, "sending test logs")
}
- return sendTestResults(ctx, comm, logger, conf, results)
+ return sendTestResults(ctx, comm, logger, conf, nativeResults.convertToService())
}
-func (c *attachResults) sendTestLogs(ctx context.Context, conf *internal.TaskConfig, logger client.LoggerProducer, comm client.Communicator, results *task.LocalTestResults) error {
+func (c *attachResults) sendTestLogs(ctx context.Context, conf *internal.TaskConfig, logger client.LoggerProducer, comm client.Communicator, results *nativeTestResults) error {
+ logger.Execution().Info("Posting test logs...")
for i, res := range results.Results {
- if ctx.Err() != nil {
- return errors.Errorf("operation canceled during uploading")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "operation canceled")
}
if res.LogRaw != "" {
- logger.Execution().Info("Attaching raw test logs")
testLogs := &model.TestLog{
- Task: conf.Task.Id,
- TaskExecution: conf.Task.Execution,
- Lines: []string{res.LogRaw},
- }
- if conf.ProjectRef.IsCedarTestResultsEnabled() {
- // When sending test logs to cedar we need to
+ // When sending test logs to Cedar we need to
// use a unique string since there may be
// duplicate file names if there are duplicate
// test names.
- testLogs.Name = utility.RandomString()
- } else {
- testLogs.Name = res.TestFile
+ Name: utility.RandomString(),
+ Task: conf.Task.Id,
+ TaskExecution: conf.Task.Execution,
+ Lines: strings.Split(res.LogRaw, "\n"),
}
- logId, err := sendTestLog(ctx, comm, conf, testLogs)
- if err != nil {
- logger.Execution().Errorf("problem posting raw logs from results %s", err.Error())
+ if err := sendTestLog(ctx, comm, conf, testLogs); err != nil {
+ // Continue on error to let other logs be
+ // posted.
+ logger.Execution().Error(errors.Wrap(err, "sending test logs"))
} else {
- results.Results[i].LogId = logId
- results.Results[i].LogTestName = testLogs.Name
+ results.Results[i].logTestName = testLogs.Name
}
-
- // clear the logs from the TestResult struct after it has been saved in the test logs. Since they are
- // being saved in the test_logs collection, we can clear them to prevent them from being saved in the task
- // collection.
- results.Results[i].LogRaw = ""
}
}
+ logger.Execution().Info("finished posted test logs")
return nil
}
diff --git a/agent/command/results_native_test.go b/agent/command/results_native_test.go
index bf143dc9715..7582cc4ff23 100644
--- a/agent/command/results_native_test.go
+++ b/agent/command/results_native_test.go
@@ -12,6 +12,7 @@ import (
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
modelutil "github.com/evergreen-ci/evergreen/model/testutil"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/utility"
@@ -20,8 +21,7 @@ import (
)
func resetTasks(t *testing.T) {
- require.NoError(t, db.ClearCollections(task.Collection, model.TestLogCollection),
- "error clearing test collections")
+ require.NoError(t, db.ClearCollections(task.Collection, model.TestLogCollection))
}
func TestAttachResults(t *testing.T) {
@@ -40,10 +40,10 @@ func TestAttachResults(t *testing.T) {
resultsLoc := filepath.Join(cwd, "testdata", "attach", "plugin_attach_results.json")
modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configFile, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
+ require.NoError(t, err)
So(err, ShouldBeNil)
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
require.NoError(t, err)
conf.WorkDir = "."
@@ -54,25 +54,28 @@ func TestAttachResults(t *testing.T) {
for _, projTask := range conf.Project.Tasks {
So(len(projTask.Commands), ShouldNotEqual, 0)
for _, command := range projTask.Commands {
- pluginCmds, err := Render(command, conf.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, conf.Project, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
err = pluginCmds[0].Execute(ctx, comm, logger, conf)
So(err, ShouldBeNil)
testTask, err := task.FindOne(db.Query(task.ById(conf.Task.Id)))
- require.NoError(t, err, "Couldn't find task")
+ require.NoError(t, err)
So(testTask, ShouldNotBeNil)
+
// ensure test results are exactly as expected
// attempt to open the file
reportFile, err := os.Open(resultsLoc)
- require.NoError(t, err, "Couldn't open report file: '%v'", err)
- results := &task.LocalTestResults{}
- err = utility.ReadJSON(reportFile, results)
- require.NoError(t, err, "Couldn't read report file: '%v'", err)
- testResults := *results
- So(testTask.LocalTestResults, ShouldResemble, testResults.Results)
- require.NoError(t, err, "Couldn't clean up test temp dir")
+ require.NoError(t, err)
+ var nativeResults nativeTestResults
+ require.NoError(t, utility.ReadJSON(reportFile, &nativeResults))
+ results := make([]testresult.TestResult, len(nativeResults.Results))
+ for i, nativeResult := range nativeResults.Results {
+ results[i] = nativeResult.convertToService()
+ }
+ So(testTask.LocalTestResults, ShouldResemble, results)
+ require.NoError(t, err)
}
}
})
@@ -92,9 +95,9 @@ func TestAttachRawResults(t *testing.T) {
resultsLoc := filepath.Join(cwd, "testdata", "attach", "plugin_attach_results_raw.json")
modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configFile, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
+ require.NoError(t, err)
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
require.NoError(t, err)
conf.WorkDir = "."
logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
@@ -105,8 +108,8 @@ func TestAttachRawResults(t *testing.T) {
So(len(projTask.Commands), ShouldNotEqual, 0)
for _, command := range projTask.Commands {
- pluginCmds, err := Render(command, conf.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, conf.Project, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
// create a plugin communicator
@@ -116,37 +119,29 @@ func TestAttachRawResults(t *testing.T) {
Convey("when retrieving task", func() {
// fetch the task
testTask, err := task.FindOne(db.Query(task.ById(conf.Task.Id)))
- require.NoError(t, err, "Couldn't find task")
+ require.NoError(t, err)
So(testTask, ShouldNotBeNil)
Convey("test results should match and raw log should be in appropriate collection", func() {
reportFile, err := os.Open(resultsLoc)
- require.NoError(t, err, "Couldn't open report file: '%v'", err)
- results := &task.LocalTestResults{}
- err = utility.ReadJSON(reportFile, results)
- require.NoError(t, err, "Couldn't read report file: '%v'", err)
-
- testResults := *results
- So(len(testResults.Results), ShouldEqual, 3)
+ require.NoError(t, err)
+ var nativeResults nativeTestResults
+ require.NoError(t, utility.ReadJSON(reportFile, &nativeResults))
+ results := make([]testresult.TestResult, len(nativeResults.Results))
+ for i, nativeResult := range nativeResults.Results {
+ results[i] = nativeResult.convertToService()
+ }
+
+ So(len(results), ShouldEqual, 3)
So(len(testTask.LocalTestResults), ShouldEqual, 3)
firstResult := testTask.LocalTestResults[0]
- So(firstResult.LogRaw, ShouldEqual, "")
- So(firstResult.LogId, ShouldNotEqual, "")
-
- testLog, err := model.FindOneTestLogById(firstResult.LogId)
- So(err, ShouldBeNil)
- So(testLog.Lines[0], ShouldEqual, testResults.Results[0].LogRaw)
+ So(firstResult.RawLogURL, ShouldEqual, "")
Convey("both URL and raw log should be stored appropriately if both exist", func() {
urlResult := testTask.LocalTestResults[2]
- So(urlResult.LogRaw, ShouldEqual, "")
- So(urlResult.URL, ShouldNotEqual, "")
- So(urlResult.LogId, ShouldNotEqual, "")
-
- testLog, err := model.FindOneTestLogById(urlResult.LogId)
- So(err, ShouldBeNil)
- So(testLog.Lines[0], ShouldEqual, testResults.Results[2].LogRaw)
+ So(urlResult.RawLogURL, ShouldEqual, "")
+ So(urlResult.LogURL, ShouldNotEqual, "")
})
})
})
diff --git a/agent/command/results_utils.go b/agent/command/results_utils.go
index 3afbe19d1e1..1846f7db4ba 100644
--- a/agent/command/results_utils.go
+++ b/agent/command/results_utils.go
@@ -3,7 +3,6 @@ package command
import (
"context"
"strings"
- "time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
@@ -11,6 +10,7 @@ import (
"github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/timber/buildlogger"
"github.com/evergreen-ci/timber/testresults"
"github.com/evergreen-ci/utility"
@@ -20,75 +20,57 @@ import (
"github.com/pkg/errors"
)
-// sendTestResults sends the test results to the API server and Cedar.
-func sendTestResults(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, results *task.LocalTestResults) error {
- if results == nil || len(results.Results) == 0 {
+// sendTestResults sends the test results to the backend results service.
+func sendTestResults(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, results []testresult.TestResult) error {
+ if len(results) == 0 {
return errors.New("cannot send nil results")
}
- logger.Task().Info("Attaching results to server...")
+ logger.Task().Info("Attaching test results...")
td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
- if conf.ProjectRef.IsCedarTestResultsEnabled() {
- if err := sendTestResultsToCedar(ctx, conf, td, comm, results); err != nil {
- logger.Task().Errorf("problem posting parsed results to the cedar: %+v", err)
- return errors.Wrap(err, "problem sending test results to cedar")
- }
- } else {
- if err := comm.SendTestResults(ctx, td, results); err != nil {
- logger.Task().Errorf("problem posting parsed results to evergreen: %+v", err)
- return errors.Wrap(err, "problem sending test results to evergreen")
- }
+
+ if err := sendTestResultsToCedar(ctx, conf, td, comm, results); err != nil {
+ return errors.Wrap(err, "sending test results to Cedar")
}
- logger.Task().Info("Successfully attached results to server")
+
+ logger.Task().Info("Successfully attached results.")
return nil
}
-// sendTestLog sends test logs to the API server and Cedar.
-func sendTestLog(ctx context.Context, comm client.Communicator, conf *internal.TaskConfig, log *model.TestLog) (string, error) {
- if conf.ProjectRef.IsCedarTestResultsEnabled() {
- return "", errors.Wrap(sendTestLogToCedar(ctx, conf.Task, comm, log), "problem sending test logs to cedar")
- }
-
- td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
- logId, err := comm.SendTestLog(ctx, td, log)
- return logId, errors.Wrap(err, "problem sending test logs to evergreen")
+// sendTestLog sends test logs to the backend logging service.
+func sendTestLog(ctx context.Context, comm client.Communicator, conf *internal.TaskConfig, log *model.TestLog) error {
+ return errors.Wrap(sendTestLogToCedar(ctx, conf.Task, comm, log), "sending test logs to Cedar")
}
-// sendTestLogsAndResults sends the test logs and test results to the API
-// server and Cedar.
-func sendTestLogsAndResults(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, logs []model.TestLog, results [][]task.TestResult) error {
- // ship all of the test logs off to the server
- logger.Task().Info("Sending test logs to server...")
- allResults := task.LocalTestResults{}
+// sendTestLogsAndResults sends the test logs and test results to backend
+// logging results services.
+func sendTestLogsAndResults(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, logs []model.TestLog, results [][]testresult.TestResult) error {
+ logger.Task().Info("Posting test logs...")
+ var allResults []testresult.TestResult
for idx, log := range logs {
- if ctx.Err() != nil {
- return errors.New("operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "canceled while sending test logs")
}
- logId, err := sendTestLog(ctx, comm, conf, &log)
- if err != nil {
- // continue on error to let the other logs be posted
- logger.Task().Errorf("problem posting log: %v", err)
+ if err := sendTestLog(ctx, comm, conf, &log); err != nil {
+ // Continue on error to let the other logs be posted.
+ logger.Task().Error(errors.Wrap(err, "sending test log"))
}
- // add all of the test results that correspond to that log to the
- // full list of results
- for _, result := range results[idx] {
- result.LogId = logId
-
- allResults.Results = append(allResults.Results, result)
- }
+ // Add all of the test results that correspond to that log to
+ // the full list of results.
+ allResults = append(allResults, results[idx]...)
}
- logger.Task().Info("Finished posting logs to server")
+ logger.Task().Info("Finished posting test logs.")
- return sendTestResults(ctx, comm, logger, conf, &allResults)
+ return sendTestResults(ctx, comm, logger, conf, allResults)
}
-func sendTestResultsToCedar(ctx context.Context, conf *internal.TaskConfig, td client.TaskData, comm client.Communicator, results *task.LocalTestResults) error {
+func sendTestResultsToCedar(ctx context.Context, conf *internal.TaskConfig, td client.TaskData, comm client.Communicator, results []testresult.TestResult) error {
conn, err := comm.GetCedarGRPCConn(ctx)
if err != nil {
- return errors.Wrap(err, "getting cedar connection")
+ return errors.Wrap(err, "getting Cedar connection")
}
client, err := testresults.NewClientWithExistingConnection(ctx, conn)
if err != nil {
@@ -115,8 +97,8 @@ func sendTestResultsToCedar(ctx context.Context, conf *internal.TaskConfig, td c
return errors.Wrap(err, "closing test results record")
}
- if err = comm.SetHasCedarResults(ctx, td, failed); err != nil {
- return errors.Wrap(err, "problem setting HasCedarResults flag in task")
+ if err := comm.SetResultsInfo(ctx, td, testresult.TestResultsServiceCedar, failed); err != nil {
+ return errors.Wrap(err, "setting results info in the task")
}
return nil
@@ -125,7 +107,7 @@ func sendTestResultsToCedar(ctx context.Context, conf *internal.TaskConfig, td c
func sendTestLogToCedar(ctx context.Context, t *task.Task, comm client.Communicator, log *model.TestLog) error {
conn, err := comm.GetCedarGRPCConn(ctx)
if err != nil {
- return errors.Wrapf(err, "problem setting up cedar grpc connection for test %s", log.Name)
+ return errors.Wrapf(err, "getting the Cedar gRPC connection for test '%s'", log.Name)
}
timberOpts := &buildlogger.LoggerOptions{
@@ -143,12 +125,12 @@ func sendTestLogToCedar(ctx context.Context, t *task.Task, comm client.Communica
levelInfo := send.LevelInfo{Default: level.Info, Threshold: level.Debug}
sender, err := buildlogger.NewLoggerWithContext(ctx, log.Name, levelInfo, timberOpts)
if err != nil {
- return errors.Wrapf(err, "error creating buildlogger logger for test result %s", log.Name)
+ return errors.Wrapf(err, "creating buildlogger logger for test result '%s'", log.Name)
}
sender.Send(message.ConvertToComposer(level.Info, strings.Join(log.Lines, "\n")))
if err = sender.Close(); err != nil {
- return errors.Wrapf(err, "error closing buildlogger logger for test result %s", log.Name)
+ return errors.Wrapf(err, "closing buildlogger logger for test result '%s'", log.Name)
}
return nil
@@ -156,30 +138,28 @@ func sendTestLogToCedar(ctx context.Context, t *task.Task, comm client.Communica
func makeCedarTestResultsRecord(conf *internal.TaskConfig, displayTaskInfo *apimodels.DisplayTaskInfo) testresults.CreateOptions {
return testresults.CreateOptions{
- Project: conf.Task.Project,
- Version: conf.Task.Version,
- Variant: conf.Task.BuildVariant,
- TaskID: conf.Task.Id,
- TaskName: conf.Task.DisplayName,
- DisplayTaskID: displayTaskInfo.ID,
- DisplayTaskName: displayTaskInfo.Name,
- Execution: int32(conf.Task.Execution),
- RequestType: conf.Task.Requester,
- Mainline: !conf.Task.IsPatchRequest(),
- HistoricalDataIgnore: conf.ProjectRef.FilesIgnoredFromCache,
- HistoricalDataDisabled: conf.ProjectRef.IsStatsCacheDisabled(),
+ Project: conf.Task.Project,
+ Version: conf.Task.Version,
+ Variant: conf.Task.BuildVariant,
+ TaskID: conf.Task.Id,
+ TaskName: conf.Task.DisplayName,
+ DisplayTaskID: displayTaskInfo.ID,
+ DisplayTaskName: displayTaskInfo.Name,
+ Execution: int32(conf.Task.Execution),
+ RequestType: conf.Task.Requester,
+ Mainline: !conf.Task.IsPatchRequest(),
}
}
-func makeCedarTestResults(id string, t *task.Task, results *task.LocalTestResults) (testresults.Results, bool) {
+func makeCedarTestResults(id string, t *task.Task, results []testresult.TestResult) (testresults.Results, bool) {
rs := testresults.Results{ID: id}
failed := false
- for _, r := range results.Results {
+ for _, r := range results {
if r.DisplayTestName == "" {
- r.DisplayTestName = r.TestFile
+ r.DisplayTestName = r.TestName
}
if r.LogTestName == "" {
- r.LogTestName = r.TestFile
+ r.LogTestName = r.TestName
}
rs.Results = append(rs.Results, testresults.Result{
TestName: utility.RandomString(),
@@ -187,12 +167,12 @@ func makeCedarTestResults(id string, t *task.Task, results *task.LocalTestResult
GroupID: r.GroupID,
Status: r.Status,
LogTestName: r.LogTestName,
- LogURL: r.URL,
- RawLogURL: r.URLRaw,
+ LogURL: r.LogURL,
+ RawLogURL: r.RawLogURL,
LineNum: int32(r.LineNum),
TaskCreated: t.CreateTime,
- TestStarted: time.Unix(int64(r.StartTime), 0),
- TestEnded: time.Unix(int64(r.EndTime), 0),
+ TestStarted: r.TestStartTime,
+ TestEnded: r.TestEndTime,
})
if r.Status == evergreen.TestFailedStatus {
diff --git a/agent/command/results_utils_test.go b/agent/command/results_utils_test.go
index bba82fbc9b8..9218fdd8070 100644
--- a/agent/command/results_utils_test.go
+++ b/agent/command/results_utils_test.go
@@ -11,32 +11,31 @@ import (
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
serviceutil "github.com/evergreen-ci/evergreen/service/testutil"
"github.com/evergreen-ci/timber/buildlogger"
timberutil "github.com/evergreen-ci/timber/testutil"
- "github.com/evergreen-ci/utility"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
)
func TestSendTestResults(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- results := &task.LocalTestResults{
- Results: []task.TestResult{
- {
- TestFile: "test",
- DisplayTestName: "display",
- GroupID: "group",
- Status: "pass",
- URL: "https://url.com",
- URLRaw: "https://rawurl.com",
- LogTestName: "log_test_name",
- LineNum: 123,
- StartTime: float64(time.Now().Add(-time.Hour).Unix()),
- EndTime: float64(time.Now().Unix()),
- },
+ results := []testresult.TestResult{
+ {
+ TestName: "test",
+ DisplayTestName: "display",
+ GroupID: "group",
+ Status: "pass",
+ LogURL: "https://url.com",
+ RawLogURL: "https://rawurl.com",
+ LogTestName: "log_test_name",
+ LineNum: 123,
+ TestStartTime: time.Now().Add(-time.Hour).UTC(),
+ TestEndTime: time.Now().UTC(),
},
}
conf := &internal.TaskConfig{
@@ -51,10 +50,6 @@ func TestSendTestResults(t *testing.T) {
Execution: 5,
Requester: evergreen.GithubPRRequester,
},
- ProjectRef: &model.ProjectRef{
- FilesIgnoredFromCache: []string{"ignoreMe"},
- DisabledStatsCache: utility.ToBoolPtr(true),
- },
}
td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
comm := client.NewMock("url")
@@ -67,7 +62,6 @@ func TestSendTestResults(t *testing.T) {
}()
t.Run("ToCedar", func(t *testing.T) {
- conf.ProjectRef.CedarTestResultsEnabled = utility.TruePtr()
checkRecord := func(t *testing.T, srv *timberutil.MockTestResultsServer) {
require.NotZero(t, srv.Create)
assert.Equal(t, conf.Task.Id, srv.Create.TaskId)
@@ -80,8 +74,6 @@ func TestSendTestResults(t *testing.T) {
assert.Equal(t, displayTaskInfo.ID, srv.Create.DisplayTaskId)
assert.Equal(t, displayTaskInfo.Name, srv.Create.DisplayTaskName)
assert.False(t, srv.Create.Mainline)
- assert.Equal(t, conf.ProjectRef.FilesIgnoredFromCache, srv.Create.HistoricalDataIgnore)
- assert.Equal(t, conf.ProjectRef.IsStatsCacheDisabled(), srv.Create.HistoricalDataDisabled)
}
checkResults := func(t *testing.T, srv *timberutil.MockTestResultsServer) {
require.Len(t, srv.Results, 1)
@@ -90,24 +82,24 @@ func TestSendTestResults(t *testing.T) {
require.Len(t, res, 1)
require.Len(t, res[0].Results, 1)
assert.NotEmpty(t, res[0].Results[0].TestName)
- assert.NotEqual(t, results.Results[0].TestFile, res[0].Results[0].TestName)
- if results.Results[0].DisplayTestName != "" {
- assert.Equal(t, results.Results[0].DisplayTestName, res[0].Results[0].DisplayTestName)
+ assert.NotEqual(t, results[0].TestName, res[0].Results[0].TestName)
+ if results[0].DisplayTestName != "" {
+ assert.Equal(t, results[0].DisplayTestName, res[0].Results[0].DisplayTestName)
} else {
- assert.Equal(t, results.Results[0].TestFile, res[0].Results[0].DisplayTestName)
+ assert.Equal(t, results[0].TestName, res[0].Results[0].DisplayTestName)
}
- assert.Equal(t, results.Results[0].Status, res[0].Results[0].Status)
- assert.Equal(t, results.Results[0].GroupID, res[0].Results[0].GroupId)
- if results.Results[0].LogTestName != "" {
- assert.Equal(t, results.Results[0].LogTestName, res[0].Results[0].LogTestName)
+ assert.Equal(t, results[0].Status, res[0].Results[0].Status)
+ assert.Equal(t, results[0].GroupID, res[0].Results[0].GroupId)
+ if results[0].LogTestName != "" {
+ assert.Equal(t, results[0].LogTestName, res[0].Results[0].LogTestName)
} else {
- assert.Equal(t, results.Results[0].TestFile, res[0].Results[0].LogTestName)
+ assert.Equal(t, results[0].TestName, res[0].Results[0].LogTestName)
}
- assert.Equal(t, results.Results[0].URL, res[0].Results[0].LogUrl)
- assert.Equal(t, results.Results[0].URLRaw, res[0].Results[0].RawLogUrl)
- assert.EqualValues(t, results.Results[0].LineNum, res[0].Results[0].LineNum)
- assert.Equal(t, int64(results.Results[0].StartTime), res[0].Results[0].TestStartTime.Seconds)
- assert.Equal(t, int64(results.Results[0].EndTime), res[0].Results[0].TestEndTime.Seconds)
+ assert.Equal(t, results[0].LogURL, res[0].Results[0].LogUrl)
+ assert.Equal(t, results[0].RawLogURL, res[0].Results[0].RawLogUrl)
+ assert.EqualValues(t, results[0].LineNum, res[0].Results[0].LineNum)
+ assert.Equal(t, results[0].TestStartTime, res[0].Results[0].TestStartTime.AsTime())
+ assert.Equal(t, results[0].TestEndTime, res[0].Results[0].TestEndTime.AsTime())
}
}
@@ -120,43 +112,43 @@ func TestSendTestResults(t *testing.T) {
checkRecord(t, srv)
checkResults(t, srv)
assert.NotZero(t, srv.Close.TestResultsRecordId)
- assert.True(t, comm.HasCedarResults)
- assert.False(t, comm.CedarResultsFailed)
+ assert.Equal(t, testresult.TestResultsServiceCedar, comm.ResultsService)
+ assert.False(t, comm.ResultsFailed)
})
t.Run("FailingResults", func(t *testing.T) {
- results.Results[0].Status = evergreen.TestFailedStatus
+ results[0].Status = evergreen.TestFailedStatus
require.NoError(t, sendTestResults(ctx, comm, logger, conf, results))
- assert.True(t, comm.HasCedarResults)
- assert.True(t, comm.CedarResultsFailed)
- results.Results[0].Status = "pass"
+ assert.Equal(t, testresult.TestResultsServiceCedar, comm.ResultsService)
+ assert.True(t, comm.ResultsFailed)
+ results[0].Status = "pass"
})
},
"SucceedsNoDisplayTestName": func(ctx context.Context, t *testing.T, srv *timberutil.MockTestResultsServer, comm *client.Mock) {
- displayTestName := results.Results[0].DisplayTestName
- results.Results[0].DisplayTestName = ""
+ displayTestName := results[0].DisplayTestName
+ results[0].DisplayTestName = ""
require.NoError(t, sendTestResults(ctx, comm, logger, conf, results))
assert.Equal(t, srv.Close.TestResultsRecordId, conf.CedarTestResultsID)
checkRecord(t, srv)
checkResults(t, srv)
assert.NotZero(t, srv.Close.TestResultsRecordId)
- assert.True(t, comm.HasCedarResults)
- assert.False(t, comm.CedarResultsFailed)
- results.Results[0].DisplayTestName = displayTestName
+ assert.Equal(t, testresult.TestResultsServiceCedar, comm.ResultsService)
+ assert.False(t, comm.ResultsFailed)
+ results[0].DisplayTestName = displayTestName
},
"SucceedsNoLogTestName": func(ctx context.Context, t *testing.T, srv *timberutil.MockTestResultsServer, comm *client.Mock) {
- logTestName := results.Results[0].LogTestName
- results.Results[0].LogTestName = ""
+ logTestName := results[0].LogTestName
+ results[0].LogTestName = ""
require.NoError(t, sendTestResults(ctx, comm, logger, conf, results))
assert.Equal(t, srv.Close.TestResultsRecordId, conf.CedarTestResultsID)
checkRecord(t, srv)
checkResults(t, srv)
assert.NotZero(t, srv.Close.TestResultsRecordId)
- assert.True(t, comm.HasCedarResults)
- assert.False(t, comm.CedarResultsFailed)
- results.Results[0].LogTestName = logTestName
+ assert.Equal(t, testresult.TestResultsServiceCedar, comm.ResultsService)
+ assert.False(t, comm.ResultsFailed)
+ results[0].LogTestName = logTestName
},
"FailsIfCreatingRecordFails": func(ctx context.Context, t *testing.T, srv *timberutil.MockTestResultsServer, comm *client.Mock) {
srv.CreateErr = true
@@ -185,18 +177,12 @@ func TestSendTestResults(t *testing.T) {
t.Run(testName, func(t *testing.T) {
conf.CedarTestResultsID = ""
srv := setupCedarServer(ctx, t, comm)
- comm.HasCedarResults = false
- comm.CedarResultsFailed = false
+ comm.ResultsService = ""
+ comm.ResultsFailed = false
testCase(ctx, t, srv.TestResults, comm)
})
}
})
- t.Run("ToEvergreen", func(t *testing.T) {
- conf.ProjectRef.CedarTestResultsEnabled = utility.FalsePtr()
-
- require.NoError(t, sendTestResults(ctx, comm, logger, conf, results))
- assert.Equal(t, results, comm.LocalTestResults)
- })
}
func TestSendTestLog(t *testing.T) {
@@ -222,7 +208,6 @@ func TestSendTestLog(t *testing.T) {
comm := client.NewMock("url")
t.Run("ToCedar", func(t *testing.T) {
- conf.ProjectRef.CedarTestResultsEnabled = utility.TruePtr()
for _, test := range []struct {
name string
testCase func(*testing.T, *timberutil.MockBuildloggerServer)
@@ -231,34 +216,27 @@ func TestSendTestLog(t *testing.T) {
name: "CreateSenderFails",
testCase: func(t *testing.T, srv *timberutil.MockBuildloggerServer) {
srv.CreateErr = true
-
- _, err := sendTestLog(ctx, comm, conf, log)
- assert.Error(t, err)
+ assert.Error(t, sendTestLog(ctx, comm, conf, log))
},
},
{
name: "SendFails",
testCase: func(t *testing.T, srv *timberutil.MockBuildloggerServer) {
srv.AppendErr = true
-
- _, err := sendTestLog(ctx, comm, conf, log)
- assert.Error(t, err)
+ assert.Error(t, sendTestLog(ctx, comm, conf, log))
},
},
{
name: "CloseSenderFails",
testCase: func(t *testing.T, srv *timberutil.MockBuildloggerServer) {
srv.CloseErr = true
-
- _, err := sendTestLog(ctx, comm, conf, log)
- assert.Error(t, err)
+ assert.Error(t, sendTestLog(ctx, comm, conf, log))
},
},
{
name: "SendSucceeds",
testCase: func(t *testing.T, srv *timberutil.MockBuildloggerServer) {
- _, err := sendTestLog(ctx, comm, conf, log)
- assert.NoError(t, err)
+ require.NoError(t, sendTestLog(ctx, comm, conf, log))
require.NotEmpty(t, srv.Create)
assert.Equal(t, conf.Task.Project, srv.Create.Info.Project)
@@ -288,23 +266,13 @@ func TestSendTestLog(t *testing.T) {
})
}
})
- t.Run("ToEvergreen", func(t *testing.T) {
- conf.ProjectRef.CedarTestResultsEnabled = utility.FalsePtr()
-
- logId, err := sendTestLog(ctx, comm, conf, log)
- require.NoError(t, err)
- assert.NotEmpty(t, logId)
-
- require.Len(t, comm.TestLogs, 1)
- assert.Equal(t, log, comm.TestLogs[0])
- })
}
func setupCedarServer(ctx context.Context, t *testing.T, comm *client.Mock) *timberutil.MockCedarServer {
srv, err := timberutil.NewMockCedarServer(ctx, serviceutil.NextPort())
require.NoError(t, err)
- conn, err := grpc.DialContext(ctx, srv.Address(), grpc.WithInsecure())
+ conn, err := grpc.DialContext(ctx, srv.Address(), grpc.WithTransportCredentials(insecure.NewCredentials()))
require.NoError(t, err)
comm.CedarGRPCConn = conn
return srv
diff --git a/agent/command/results_xunit.go b/agent/command/results_xunit.go
index f969a877fc1..fca66cb61bd 100644
--- a/agent/command/results_xunit.go
+++ b/agent/command/results_xunit.go
@@ -5,12 +5,13 @@ import (
"fmt"
"os"
"path/filepath"
+ "strings"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/mitchellh/mapstructure"
"github.com/mongodb/grip"
"github.com/pkg/errors"
@@ -26,6 +27,11 @@ type xunitResults struct {
base
}
+const (
+ systemOut = "system-out:"
+ systemErr = "system-err:"
+)
+
func xunitResultsFactory() Command { return &xunitResults{} }
func (c *xunitResults) Name() string { return evergreen.AttachXUnitResultsCommandName }
@@ -33,7 +39,7 @@ func (c *xunitResults) Name() string { return evergreen.AttachXUnitResultsComman
// to satisfy the 'Command' interface
func (c *xunitResults) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%s' params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.File == "" && len(c.Files) == 0 {
@@ -54,10 +60,10 @@ func (c *xunitResults) expandParams(conf *internal.TaskConfig) error {
var err error
for idx, f := range c.Files {
c.Files[idx], err = conf.Expansions.ExpandString(f)
- catcher.Add(err)
+ catcher.Wrapf(err, "expanding file '%s'", f)
}
- return errors.Wrapf(catcher.Resolve(), "problem expanding paths")
+ return catcher.Resolve()
}
// Execute carries out the AttachResultsCommand command - this is required
@@ -66,19 +72,26 @@ func (c *xunitResults) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := c.expandParams(conf); err != nil {
- return err
+ return errors.Wrap(err, "applying expansions")
}
errChan := make(chan error)
go func() {
- errChan <- c.parseAndUploadResults(ctx, conf, logger, comm)
+ err := c.parseAndUploadResults(ctx, conf, logger, comm)
+ select {
+ case errChan <- err:
+ return
+ case <-ctx.Done():
+ logger.Task().Infof("Context canceled waiting to parse and upload results: %s.", ctx.Err())
+ return
+ }
}()
select {
case err := <-errChan:
return errors.WithStack(err)
case <-ctx.Done():
- logger.Execution().Info("Received signal to terminate execution of attach xunit results command")
+ logger.Execution().Infof("Canceled while parsing and uploading results for command '%s': %s.", c.Name(), ctx.Err())
return nil
}
}
@@ -90,7 +103,9 @@ func getFilePaths(workDir string, files []string) ([]string, error) {
out := []string{}
for _, fileSpec := range files {
- paths, err := filepath.Glob(filepath.Join(workDir, fileSpec))
+ relativeToWorkDir := strings.TrimPrefix(filepath.ToSlash(fileSpec), filepath.ToSlash(workDir))
+ path := filepath.Join(workDir, relativeToWorkDir)
+ paths, err := filepath.Glob(path)
catcher.Add(err)
out = append(out, paths...)
}
@@ -98,6 +113,10 @@ func getFilePaths(workDir string, files []string) ([]string, error) {
if catcher.HasErrors() {
return nil, errors.Wrapf(catcher.Resolve(), "%d incorrect file specifications", catcher.Len())
}
+ // Only error for no files if the user provided files.
+ if len(out) == 0 && len(files) > 0 {
+ return nil, errors.New("Files parameter was provided but no XML files matched")
+ }
return out, nil
}
@@ -106,7 +125,7 @@ func (c *xunitResults) parseAndUploadResults(ctx context.Context, conf *internal
logger client.LoggerProducer, comm client.Communicator) error {
cumulative := testcaseAccumulator{
- tests: []task.TestResult{},
+ tests: []testresult.TestResult{},
logs: []*model.TestLog{},
logIdxToTestIdx: []int{},
}
@@ -120,77 +139,79 @@ func (c *xunitResults) parseAndUploadResults(ctx context.Context, conf *internal
file *os.File
testSuites []testSuite
)
+ numInvalid := 0
for _, reportFileLoc := range reportFilePaths {
- if ctx.Err() != nil {
- return errors.New("operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrapf(err, "canceled while parsing xunit file '%s'", reportFileLoc)
}
stat, err := os.Stat(reportFileLoc)
if os.IsNotExist(err) {
- logger.Task().Infof("result file '%s' does not exist", reportFileLoc)
+ numInvalid += 1
+ logger.Task().Infof("Result file '%s' does not exist.", reportFileLoc)
continue
}
if stat.IsDir() {
- logger.Task().Infof("result file '%s' is a directory", reportFileLoc)
+ numInvalid += 1
+ logger.Task().Infof("Result file '%s' is a directory, not a file.", reportFileLoc)
continue
}
file, err = os.Open(reportFileLoc)
if err != nil {
- return errors.Wrap(err, "couldn't open xunit file")
+ return errors.Wrapf(err, "opening xunit file '%s'", reportFileLoc)
}
testSuites, err = parseXMLResults(file)
if err != nil {
catcher := grip.NewBasicCatcher()
- catcher.Wrap(err, "error parsing xunit file")
- catcher.Wrap(file.Close(), "closing xunit file")
+ catcher.Wrapf(err, "parsing xunit file '%s'", reportFileLoc)
+ catcher.Wrapf(file.Close(), "closing xunit file '%s'", reportFileLoc)
return catcher.Resolve()
}
if err = file.Close(); err != nil {
- return errors.Wrap(err, "error closing xunit file")
+ return errors.Wrapf(err, "closing xunit file '%s'", reportFileLoc)
}
// go through all the tests
for idx, suite := range testSuites {
- cumulative = addTestCasesForSuite(suite, idx, conf, cumulative)
+ cumulative = addTestCasesForSuite(suite, idx, conf, cumulative, logger)
}
}
-
- if len(cumulative.tests) == 0 {
- return errors.New("no test results found")
+ if len(reportFilePaths) == numInvalid {
+ return errors.New("all given file paths do not exist or are directories")
}
succeeded := 0
for i, log := range cumulative.logs {
- if ctx.Err() != nil {
- return errors.New("operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "canceled while sending test logs")
}
- logId, err := sendTestLog(ctx, comm, conf, log)
- if err != nil {
- logger.Task().Warningf("problem uploading logs for %s", log.Name)
+ if err := sendTestLog(ctx, comm, conf, log); err != nil {
+ logger.Task().Error(errors.Wrap(err, "sending test log"))
continue
} else {
succeeded++
}
- cumulative.tests[cumulative.logIdxToTestIdx[i]].LogId = logId
cumulative.tests[cumulative.logIdxToTestIdx[i]].LineNum = 1
}
- logger.Task().Infof("Attach test logs succeeded for %d of %d files", succeeded, len(cumulative.logs))
-
- return sendTestResults(ctx, comm, logger, conf, &task.LocalTestResults{Results: cumulative.tests})
+ logger.Task().Infof("Posting test logs succeeded for %d of %d files.", succeeded, len(cumulative.logs))
+ if len(cumulative.tests) > 0 {
+ return sendTestResults(ctx, comm, logger, conf, cumulative.tests)
+ }
+ return nil
}
type testcaseAccumulator struct {
- tests []task.TestResult
+ tests []testresult.TestResult
logs []*model.TestLog
logIdxToTestIdx []int
}
-func addTestCasesForSuite(suite testSuite, idx int, conf *internal.TaskConfig, cumulative testcaseAccumulator) testcaseAccumulator {
+func addTestCasesForSuite(suite testSuite, idx int, conf *internal.TaskConfig, cumulative testcaseAccumulator, logger client.LoggerProducer) testcaseAccumulator {
if len(suite.TestCases) == 0 && suite.Error != nil {
// if no test cases but an error, generate a default test case
tc := testCase{
@@ -205,13 +226,10 @@ func addTestCasesForSuite(suite testSuite, idx int, conf *internal.TaskConfig, c
}
for _, tc := range suite.TestCases {
// logs are only created when a test case does not succeed
- test, log := tc.toModelTestResultAndLog(conf)
+ test, log := tc.toModelTestResultAndLog(conf, logger)
if log != nil {
- if suite.SysOut != "" {
- log.Lines = append(log.Lines, "system-out:", suite.SysOut)
- }
- if suite.SysErr != "" {
- log.Lines = append(log.Lines, "system-err:", suite.SysErr)
+ if systemLogs := constructSystemLogs(suite.SysOut, suite.SysErr); len(systemLogs) > 0 {
+ log.Lines = append(log.Lines, systemLogs...)
}
cumulative.logs = append(cumulative.logs, log)
cumulative.logIdxToTestIdx = append(cumulative.logIdxToTestIdx, len(cumulative.tests))
@@ -219,7 +237,18 @@ func addTestCasesForSuite(suite testSuite, idx int, conf *internal.TaskConfig, c
cumulative.tests = append(cumulative.tests, test)
}
if suite.NestedSuites != nil {
- cumulative = addTestCasesForSuite(*suite.NestedSuites, idx, conf, cumulative)
+ cumulative = addTestCasesForSuite(*suite.NestedSuites, idx, conf, cumulative, logger)
}
return cumulative
}
+
+func constructSystemLogs(sysOut, sysErr string) []string {
+ var lines []string
+ if sysOut != "" {
+ lines = append(lines, systemOut, sysOut)
+ }
+ if sysErr != "" {
+ lines = append(lines, systemErr, sysErr)
+ }
+ return lines
+}
diff --git a/agent/command/results_xunit_parser.go b/agent/command/results_xunit_parser.go
index a01780623ee..7fb67e59aec 100644
--- a/agent/command/results_xunit_parser.go
+++ b/agent/command/results_xunit_parser.go
@@ -4,15 +4,16 @@ import (
"encoding/xml"
"fmt"
"io"
- "io/ioutil"
+ "math"
"strconv"
"strings"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
+ "github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
"github.com/pkg/errors"
@@ -60,6 +61,8 @@ type testCase struct {
ClassName string `xml:"classname,attr"`
Failure *failureDetails `xml:"failure"`
Error *failureDetails `xml:"error"`
+ SysOut string `xml:"system-out"`
+ SysErr string `xml:"system-err"`
Skipped *failureDetails `xml:"skipped"`
}
@@ -71,48 +74,57 @@ type failureDetails struct {
func parseXMLResults(reader io.Reader) ([]testSuite, error) {
results := testSuites{}
- fileData, err := ioutil.ReadAll(reader)
+ fileData, err := io.ReadAll(reader)
if err != nil {
- return nil, errors.Wrap(err, "Unable to read results file")
+ return nil, errors.Wrap(err, "reading results file")
}
// need to try to unmarshal into 2 different structs since the JUnit XML schema
// allows for or to be the root
// https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd
if err = xml.Unmarshal(fileData, &results); err != nil {
- return nil, err
+ return nil, errors.Wrap(err, "unmarshalling XML test suite")
}
if len(results.Suites) == 0 {
if err = xml.Unmarshal(fileData, &results.Suites); err != nil {
- return nil, err
+ return nil, errors.Wrap(err, "unmarshalling XML test suites")
}
}
return results.Suites, nil
}
-// ToModelTestResultAndLog converts an xunit test case into an
-// mci task.TestResult and model.TestLog. Logs are only
-// generated if the test case did not succeed (this is part of
-// the xunit xml file design)
-func (tc testCase) toModelTestResultAndLog(conf *internal.TaskConfig) (task.TestResult, *model.TestLog) {
+// toModelTestResultAndLog converts an XUnit test case into a test result and
+// test log. Logs are only generated if the test case did not succeed (this is
+// part of the XUnit XML file design).
+func (tc testCase) toModelTestResultAndLog(conf *internal.TaskConfig, logger client.LoggerProducer) (testresult.TestResult, *model.TestLog) {
- res := task.TestResult{}
+ res := testresult.TestResult{}
var log *model.TestLog
if tc.ClassName != "" {
- res.TestFile = fmt.Sprintf("%v.%v", tc.ClassName, tc.Name)
+ res.TestName = fmt.Sprintf("%v.%v", tc.ClassName, tc.Name)
} else {
- res.TestFile = tc.Name
+ res.TestName = tc.Name
}
- // replace spaces, dashes, etc. with underscores
- res.TestFile = util.CleanForPath(res.TestFile)
+ // Replace spaces, dashes, etc. with underscores.
+ res.TestName = util.CleanForPath(res.TestName)
- res.StartTime = float64(time.Now().Unix())
- res.EndTime = res.StartTime + float64(tc.Time)
+ if math.IsNaN(float64(tc.Time)) {
+ logger.Task().Errorf("Test '%s' time was NaN, its calculated duration will be incorrect", res.TestName)
+ tc.Time = 0
+ }
+ // Passing 0 as the sign will check for Inf as well as -Inf.
+ if math.IsInf(float64(tc.Time), 0) {
+ logger.Task().Errorf("Test '%s' time was Inf, its calculated duration will be incorrect", res.TestName)
+ tc.Time = 0
+ }
- // the presence of the Failure, Error, or Skipped fields
- // is used to indicate an unsuccessful test case. Logs
- // can only be generated in failure cases, because xunit
- // results only include messages if they did *not* succeed.
+ res.TestStartTime = time.Now()
+ res.TestEndTime = res.TestStartTime.Add(time.Duration(float64(tc.Time) * float64(time.Second)))
+
+ // The presence of the Failure, Error, or Skipped fields is used to
+ // indicate an unsuccessful test case. Logs can only be generated in
+ // in failure cases, because XUnit results only include messages if
+ // they did *not* succeed.
switch {
case tc.Failure != nil:
res.Status = evergreen.TestFailedStatus
@@ -126,18 +138,20 @@ func (tc testCase) toModelTestResultAndLog(conf *internal.TaskConfig) (task.Test
res.Status = evergreen.TestSucceededStatus
}
- if log != nil {
- if conf.ProjectRef.IsCedarTestResultsEnabled() {
- // When sending test logs to cedar we need to use a
- // unique string since there may be duplicate file
- // names if there are duplicate test names.
- log.Name = utility.RandomString()
- } else {
- log.Name = res.TestFile
+ if systemLogs := constructSystemLogs(tc.SysOut, tc.SysErr); len(systemLogs) > 0 {
+ if log == nil {
+ log = &model.TestLog{}
}
+ log.Lines = append(log.Lines, systemLogs...)
+ }
+
+ if log != nil {
+ // When sending test logs to Cedar we need to use a
+ // unique string since there may be duplicate file
+ // names if there are duplicate test names.
+ log.Name = utility.RandomString()
log.Task = conf.Task.Id
log.TaskExecution = conf.Task.Execution
-
res.LogTestName = log.Name
}
diff --git a/agent/command/results_xunit_parser_test.go b/agent/command/results_xunit_parser_test.go
index 9df14aa3fef..80e00eeef42 100644
--- a/agent/command/results_xunit_parser_test.go
+++ b/agent/command/results_xunit_parser_test.go
@@ -1,15 +1,20 @@
package command
import (
+ "math"
"os"
"path/filepath"
"testing"
+ "time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
+ "github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/evergreen/testutil"
+ "github.com/mongodb/grip/send"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/require"
)
@@ -20,7 +25,7 @@ func TestXMLParsing(t *testing.T) {
Convey("With some test xml files", t, func() {
Convey("with a basic test junit file", func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "junit_1.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -32,10 +37,14 @@ func TestXMLParsing(t *testing.T) {
So(res[0].Errors, ShouldEqual, 1)
So(res[0].Failures, ShouldEqual, 5)
So(res[0].Name, ShouldEqual, "nose2-junit")
+ So(res[0].SysOut, ShouldEqual, "sysout-suite")
+ So(res[0].SysErr, ShouldEqual, "syserr-suite")
So(res[0].TestCases[11].Name, ShouldEqual, "test_params_func:2")
So(res[0].TestCases[11].Time, ShouldEqual, 0.000098)
So(res[0].TestCases[11].Failure, ShouldNotBeNil)
So(res[0].TestCases[11].Failure.Message, ShouldEqual, "test failure")
+ So(res[0].TestCases[11].SysOut, ShouldEqual, "sysout-testcase")
+ So(res[0].TestCases[11].SysErr, ShouldEqual, "syserr-testcase")
})
})
})
@@ -68,7 +77,7 @@ func TestXMLParsing(t *testing.T) {
Convey(`with a "real" pymongo xunit file`, func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "junit_3.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -95,7 +104,7 @@ func TestXMLParsing(t *testing.T) {
})
Convey(`with a "real" java driver xunit file`, func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "junit_4.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -117,7 +126,7 @@ func TestXMLParsing(t *testing.T) {
Convey("with a result file produced by a mocha junit reporter", func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "mocha.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -140,7 +149,7 @@ func TestXMLParsing(t *testing.T) {
Convey("with a result file with errors", func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "results.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -162,7 +171,7 @@ func TestXMLParsing(t *testing.T) {
Convey("with a result file with test suite errors", func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "junit_5.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -181,7 +190,7 @@ func TestXMLParsing(t *testing.T) {
Convey("with nested suites", func() {
file, err := os.Open(filepath.Join(cwd, "testdata", "xunit", "junit_6.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
Convey("the file should parse without error", func() {
@@ -208,7 +217,7 @@ func TestXMLParsing(t *testing.T) {
func TestXMLToModelConversion(t *testing.T) {
Convey("With a parsed XML file and a task", t, func() {
file, err := os.Open(filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "xunit", "junit_3.xml"))
- require.NoError(t, err, "Error reading file")
+ require.NoError(t, err)
defer file.Close()
res, err := parseXMLResults(file)
So(err, ShouldBeNil)
@@ -217,17 +226,31 @@ func TestXMLToModelConversion(t *testing.T) {
ProjectRef: &model.ProjectRef{},
Task: &task.Task{Id: "TEST", Execution: 5},
}
-
+ sender := send.MakeInternalLogger()
+ logger := client.NewSingleChannelLogHarness("", sender)
Convey("when converting the results to model struct", func() {
- tests := []task.TestResult{}
+ tests := []testresult.TestResult{}
logs := []*model.TestLog{}
+ numNan := 0
+ numInf := 0
for _, testCase := range res[0].TestCases {
- test, log := testCase.toModelTestResultAndLog(conf)
+ test, log := testCase.toModelTestResultAndLog(conf, logger)
if log != nil {
logs = append(logs, log)
}
tests = append(tests, test)
+ if math.IsNaN(float64(testCase.Time)) {
+ So(test.Duration(), ShouldEqual, time.Duration(0))
+ numNan++
+ }
+ if math.IsInf(float64(testCase.Time), 0) {
+ So(test.Duration(), ShouldEqual, time.Duration(0))
+ numInf++
+ }
}
+ So(numNan, ShouldEqual, 1)
+ So(numInf, ShouldEqual, 2)
+ So(logger.Close(), ShouldBeNil)
Convey("the proper amount of each failure should be correct", func() {
skipCount := 0
@@ -252,6 +275,18 @@ func TestXMLToModelConversion(t *testing.T) {
Convey("and logs should be of the proper form", func() {
So(logs[0].Name, ShouldNotEqual, "")
So(len(logs[0].Lines), ShouldNotEqual, 0)
+ hasSystemErrTc := false
+ hasSystemOutTc := false
+ for _, line := range logs[0].Lines {
+ if line == "sysout-testcase" {
+ hasSystemOutTc = true
+ }
+ if line == "syserr-testcase" {
+ hasSystemErrTc = true
+ }
+ }
+ So(hasSystemErrTc, ShouldBeTrue)
+ So(hasSystemOutTc, ShouldBeTrue)
})
})
})
diff --git a/agent/command/results_xunit_test.go b/agent/command/results_xunit_test.go
index 2df0593595d..a97edad6966 100644
--- a/agent/command/results_xunit_test.go
+++ b/agent/command/results_xunit_test.go
@@ -4,8 +4,10 @@ import (
"context"
"path/filepath"
"testing"
+ "time"
"github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
agentutil "github.com/evergreen-ci/evergreen/agent/internal/testutil"
"github.com/evergreen-ci/evergreen/db"
@@ -13,7 +15,7 @@ import (
"github.com/evergreen-ci/evergreen/model/task"
modelutil "github.com/evergreen-ci/evergreen/model/testutil"
"github.com/evergreen-ci/evergreen/testutil"
- "github.com/evergreen-ci/utility"
+ timberutil "github.com/evergreen-ci/timber/testutil"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -38,9 +40,9 @@ func runTest(t *testing.T, configPath string, customTests func(string)) {
SkipConvey("With attachResults plugin installed into plugin registry", t, func() {
modelData, err := modelutil.SetupAPITestData(testConfig, "test", "rhel55", configPath, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
+ require.NoError(t, err)
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
require.NoError(t, err)
conf.WorkDir = "."
logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
@@ -50,15 +52,15 @@ func runTest(t *testing.T, configPath string, customTests func(string)) {
for _, projTask := range conf.Project.Tasks {
So(len(projTask.Commands), ShouldNotEqual, 0)
for _, command := range projTask.Commands {
- pluginCmds, err := Render(command, conf.Project)
- require.NoError(t, err, "Couldn't get plugin command: %s", command.Command)
+ pluginCmds, err := Render(command, conf.Project, "")
+ require.NoError(t, err)
So(pluginCmds, ShouldNotBeNil)
So(err, ShouldBeNil)
err = pluginCmds[0].Execute(ctx, comm, logger, conf)
So(err, ShouldBeNil)
testTask, err := task.FindOne(db.Query(task.ById(conf.Task.Id)))
- require.NoError(t, err, "Couldn't find task")
+ require.NoError(t, err)
So(testTask, ShouldNotBeNil)
}
}
@@ -141,62 +143,96 @@ func TestAttachXUnitWildcardResults(t *testing.T) {
}
func TestXUnitParseAndUpload(t *testing.T) {
- assert := assert.New(t)
- xr := xunitResults{
- Files: []string{"*"},
- }
testConfig := testutil.TestConfig()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
comm := client.NewMock("/dev/null")
modelData, err := modelutil.SetupAPITestData(testConfig, "aggregation", "rhel55", WildcardConfig, modelutil.NoPatch)
- require.NoError(t, err, "failed to setup test data")
- conf, err := agentutil.MakeTaskConfigFromModelData(testConfig, modelData)
require.NoError(t, err)
- conf.WorkDir = filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "xunit")
- t.Run("SendToEvergreen", func(t *testing.T) {
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
- assert.NoError(err)
- err = xr.parseAndUploadResults(ctx, conf, logger, comm)
- assert.NoError(err)
- assert.NoError(logger.Close())
-
- messages := comm.GetMockMessages()[conf.Task.Id]
- successMessage := "Attach test logs succeeded for 12 of 12 files"
- found := false
- for _, message := range messages {
- if successMessage == message.Message {
- found = true
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer){
+ "GlobMatchesAsteriskAndSendsToCedar": func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer) {
+ xr := xunitResults{
+ Files: []string{"*"},
}
- }
- assert.True(found)
- })
- t.Run("SendToCedar", func(t *testing.T) {
- conf.ProjectRef.CedarTestResultsEnabled = utility.TruePtr()
- logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
- assert.NoError(err)
- cedarSrv := setupCedarServer(ctx, t, comm)
- err = xr.parseAndUploadResults(ctx, conf, logger, comm)
- assert.NoError(err)
- assert.NoError(logger.Close())
-
- require.NotEmpty(t, cedarSrv.TestResults.Results)
- for id, results := range cedarSrv.TestResults.Results {
- assert.NotEmpty(id)
- assert.NotEmpty(results)
- for _, res := range results {
- assert.NotEmpty(res.Results)
- for _, r := range res.Results {
- assert.NotEmpty(r.TestName)
- assert.NotEmpty(r.DisplayTestName)
- assert.NotEmpty(r.LogTestName)
- if r.Status == evergreen.TestFailedStatus {
- assert.NotEqual(r.DisplayTestName, r.LogTestName)
+ assert.NoError(t, xr.parseAndUploadResults(ctx, conf, logger, comm))
+ assert.NoError(t, logger.Close())
+
+ assert.Len(t, cedarSrv.TestResults.Results, 1)
+ for id, results := range cedarSrv.TestResults.Results {
+ assert.NotEmpty(t, id)
+ assert.NotEmpty(t, results)
+ for _, res := range results {
+ assert.NotEmpty(t, res.Results)
+ for _, r := range res.Results {
+ assert.NotEmpty(t, r.TestName)
+ assert.NotEmpty(t, r.DisplayTestName)
+ assert.NotEmpty(t, r.LogTestName)
+ if r.Status == evergreen.TestFailedStatus {
+ assert.NotEqual(t, r.DisplayTestName, r.LogTestName)
+ }
+ assert.NotEmpty(t, r.Status)
}
- assert.NotEmpty(r.Status)
}
}
- }
- })
+ },
+ "GlobMatchesAbsolutePathContainingWorkDirPrefixAndSendsToCedar": func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer) {
+ conf.WorkDir = filepath.Join(testutil.GetDirectoryOfFile(), "testdata")
+ xr := xunitResults{
+ Files: []string{filepath.Join("xunit", "junit*.xml")},
+ }
+ assert.NoError(t, xr.parseAndUploadResults(ctx, conf, logger, comm))
+ assert.NoError(t, logger.Close())
+
+ assert.Len(t, cedarSrv.TestResults.Results, 1)
+ },
+ "GlobMatchesRelativePathAndSendsToCedar": func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer) {
+ xr := xunitResults{
+ Files: []string{filepath.Join(conf.WorkDir, "*")},
+ }
+ assert.NoError(t, xr.parseAndUploadResults(ctx, conf, logger, comm))
+ assert.NoError(t, logger.Close())
+
+ assert.Len(t, cedarSrv.TestResults.Results, 1)
+ },
+ "EmptyTestsForValidPathCauseNoError": func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer) {
+ xr := xunitResults{
+ Files: []string{filepath.Join(conf.WorkDir, "empty.xml")},
+ }
+ assert.NoError(t, xr.parseAndUploadResults(ctx, conf, logger, comm))
+ assert.NoError(t, logger.Close())
+
+ assert.Len(t, cedarSrv.TestResults.Results, 0)
+ },
+ "EmptyTestsForInvalidPathErrors": func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer) {
+ xr := xunitResults{
+ Files: []string{filepath.Join(conf.WorkDir, "nonexistent.xml")},
+ }
+ assert.Error(t, xr.parseAndUploadResults(ctx, conf, logger, comm))
+ assert.NoError(t, logger.Close())
+ },
+ "DirectoryErrors": func(ctx context.Context, t *testing.T, cedarSrv *timberutil.MockCedarServer, conf *internal.TaskConfig, logger client.LoggerProducer) {
+ xr := xunitResults{
+ Files: []string{conf.WorkDir},
+ }
+ assert.Error(t, xr.parseAndUploadResults(ctx, conf, logger, comm))
+ assert.NoError(t, logger.Close())
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ tctx, tcancel := context.WithTimeout(ctx, 10*time.Second)
+ defer tcancel()
+
+ cedarSrv := setupCedarServer(tctx, t, comm)
+
+ conf, err := agentutil.MakeTaskConfigFromModelData(ctx, testConfig, modelData)
+ require.NoError(t, err)
+ conf.WorkDir = filepath.Join(testutil.GetDirectoryOfFile(), "testdata", "xunit")
+
+ logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ require.NoError(t, err)
+
+ tCase(tctx, t, cedarSrv, conf, logger)
+ })
+ }
}
diff --git a/agent/command/s3_copy.go b/agent/command/s3_copy.go
index 49bf910e266..1e3e1e5884c 100644
--- a/agent/command/s3_copy.go
+++ b/agent/command/s3_copy.go
@@ -109,7 +109,7 @@ func (c *s3copy) ParseParams(params map[string]interface{}) error {
}
if err := decoder.Decode(params); err != nil {
- return errors.Wrapf(err, "error decoding %s params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
return c.validate()
@@ -122,18 +122,18 @@ func (c *s3copy) validate() error {
// make sure the command params are valid
if c.AwsKey == "" {
- catcher.New("aws_key cannot be blank")
+ catcher.New("AWS key cannot be blank")
}
if c.AwsSecret == "" {
- catcher.New("aws_secret cannot be blank")
+ catcher.New("AWS secret cannot be blank")
}
for _, s3CopyFile := range c.S3CopyFiles {
if s3CopyFile.Source.Path == "" {
- catcher.New("s3 source path cannot be blank")
+ catcher.New("S3 source path cannot be blank")
}
if s3CopyFile.Destination.Path == "" {
- catcher.New("s3 destination path cannot be blank")
+ catcher.New("S3 destination path cannot be blank")
}
if s3CopyFile.Permissions == "" {
s3CopyFile.Permissions = s3.BucketCannedACLPublicRead
@@ -146,10 +146,10 @@ func (c *s3copy) validate() error {
}
// make sure both buckets are valid
if err := validateS3BucketName(s3CopyFile.Source.Bucket); err != nil {
- catcher.Wrapf(err, "source bucket '%v' is invalid", s3CopyFile.Source.Bucket)
+ catcher.Wrapf(err, "source bucket name '%s' is invalid", s3CopyFile.Source.Bucket)
}
if err := validateS3BucketName(s3CopyFile.Destination.Bucket); err != nil {
- catcher.Wrapf(err, "destination bucket '%v' is invalid", s3CopyFile.Destination.Bucket)
+ catcher.Wrapf(err, "destination bucket name '%s' is invalid", s3CopyFile.Destination.Bucket)
}
}
@@ -163,26 +163,30 @@ func (c *s3copy) Execute(ctx context.Context,
comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := util.ExpandValues(c, conf.Expansions); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "applying expansions")
}
// Re-validate the command here, in case an expansion is not defined.
if err := c.validate(); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "validating params")
}
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
errChan := make(chan error)
go func() {
- errChan <- errors.WithStack(c.copyWithRetry(ctx, comm, logger, conf))
+ err := errors.WithStack(c.copyWithRetry(ctx, comm, logger, conf))
+ select {
+ case errChan <- err:
+ return
+ case <-ctx.Done():
+ logger.Task().Infof("Context canceled waiting for s3 copy: %s.", ctx.Err())
+ return
+ }
}()
select {
case err := <-errChan:
return err
case <-ctx.Done():
- logger.Execution().Info("Received signal to terminate execution of S3 copy command")
+ logger.Execution().Infof("Canceled while running command '%s'", c.Name())
return nil
}
@@ -196,12 +200,12 @@ func (c *s3copy) copyWithRetry(ctx context.Context,
td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
- var foundDottedBucketName bool
-
client := utility.GetHTTPClient()
client.Timeout = 10 * time.Minute
defer utility.PutHTTPClient(client)
for _, s3CopyFile := range c.S3CopyFiles {
+ logger.Task().WarningWhen(strings.Contains(s3CopyFile.Destination.Bucket, "."), "Destination bucket names containing dots that are created after Sept. 30, 2020 are not guaranteed to have valid attached URLs.")
+
timer.Reset(0)
if len(s3CopyFile.BuildVariants) > 0 && !utility.StringSliceContains(
@@ -209,8 +213,8 @@ func (c *s3copy) copyWithRetry(ctx context.Context,
continue
}
- if ctx.Err() != nil {
- return errors.New("s3copy operation was canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "command was cancelled")
}
logger.Execution().Infof("Making API push copy call to "+
@@ -230,7 +234,7 @@ func (c *s3copy) copyWithRetry(ctx context.Context,
}
newPushLog, err := comm.NewPush(ctx, td, &s3CopyReq)
if err != nil {
- return errors.Wrap(err, "error adding pushlog")
+ return errors.Wrap(err, "adding push log")
}
if newPushLog.TaskId == "" {
logger.Task().Infof("noop, this version is currently in the process of trying to push, or has already succeeded in pushing the file: '%s/%s'", s3CopyFile.Destination.Bucket, s3CopyFile.Destination.Path)
@@ -249,25 +253,23 @@ func (c *s3copy) copyWithRetry(ctx context.Context,
srcBucket, err := pail.NewS3MultiPartBucketWithHTTPClient(client, srcOpts)
if err != nil {
- bucketErr := errors.Wrap(err, "S3 copy failed, could not establish connection to source bucket")
- logger.Task().Error(bucketErr)
+ catcher := grip.NewBasicCatcher()
+ catcher.Wrap(err, "initializing S3 source bucket")
newPushLog.Status = pushLogFailed
- if pushError := comm.UpdatePushStatus(ctx, td, newPushLog); pushError != nil {
- return errors.Wrap(pushError, "error updating pushlog to failed after the following s3 bucket error: %s"+bucketErr.Error())
- }
+ catcher.Wrap(comm.UpdatePushStatus(ctx, td, newPushLog), "updating push log to failed")
- return bucketErr
+ return catcher.Resolve()
}
if err := srcBucket.Check(ctx); err != nil {
+ catcher := grip.NewBasicCatcher()
+ catcher.Wrap(err, "checking bucket")
newPushLog.Status = pushLogFailed
- if pushError := comm.UpdatePushStatus(ctx, td, newPushLog); pushError != nil {
- return errors.Wrap(pushError, "error updating pushlog to failed after the following s3 bucket error: %s"+err.Error())
- }
+ catcher.Wrap(comm.UpdatePushStatus(ctx, td, newPushLog), "updating push log to failed")
- return errors.Wrap(err, "invalid bucket")
+ return catcher.Resolve()
}
destOpts := pail.S3Options{
Credentials: pail.CreateAWSCredentials(s3CopyReq.AwsKey, s3CopyReq.AwsSecret, ""),
@@ -277,22 +279,20 @@ func (c *s3copy) copyWithRetry(ctx context.Context,
}
destBucket, err := pail.NewS3MultiPartBucket(destOpts)
if err != nil {
- bucketErr := errors.Wrap(err, "S3 copy failed, could not establish connection to destination bucket")
- logger.Task().Error(bucketErr)
+ catcher := grip.NewBasicCatcher()
+ catcher.Wrap(err, "initializing S3 destination bucket")
newPushLog.Status = pushLogFailed
- if pushError := comm.UpdatePushStatus(ctx, td, newPushLog); pushError != nil {
- return errors.Wrap(pushError, "error updating pushlog to failed after the following s3 bucket error: %s"+bucketErr.Error())
- }
+ catcher.Wrap(comm.UpdatePushStatus(ctx, td, newPushLog), "updating push log to failed")
- return bucketErr
+ return catcher.Resolve()
}
retryLoop:
for i := 0; i < maxS3OpAttempts; i++ {
select {
case <-ctx.Done():
- return errors.New("s3 copy operation canceled")
+ return errors.Errorf("command '%s' canceled", c.Name())
case <-timer.C:
copyOpts := pail.CopyOptions{
SourceKey: s3CopyReq.S3SourcePath,
@@ -303,42 +303,38 @@ func (c *s3copy) copyWithRetry(ctx context.Context,
if err != nil {
newPushLog.Status = pushLogFailed
if err := comm.UpdatePushStatus(ctx, td, newPushLog); err != nil {
- return errors.Wrap(err, "updating pushlog status failed for task")
+ return errors.Wrap(err, "updating push log status failed for task")
}
if s3CopyFile.Optional {
- logger.Execution().Errorf("S3 push copy failed to copy '%s' to '%s'. File is optional, continuing \n error: %s",
- s3CopyFile.Source.Path, s3CopyFile.Destination.Bucket, err.Error())
+ logger.Execution().Error(err)
+ logger.Execution().Errorf("S3 push copy failed to copy '%s' to '%s' and file is optional, continuing.",
+ s3CopyFile.Source.Path, s3CopyFile.Destination.Bucket)
timer.Reset(backoffCounter.Duration())
continue retryLoop
} else {
- return errors.Wrapf(err, "S3 push copy failed to copy '%s' to '%s'. File is not optional, exiting \n error:",
- s3CopyFile.Source.Path, s3CopyFile.Destination.Bucket)
+ logger.Execution().Errorf("S3 push copy failed to copy '%s' to '%s' and file is not optional, exiting.", s3CopyFile.Source.Path, s3CopyFile.Destination.Bucket)
+ return errors.Wrapf(err, "S3 push copy failed to copy '%s' to '%s'", s3CopyFile.Source.Path, s3CopyFile.Destination.Bucket)
}
} else {
newPushLog.Status = pushLogSuccess
if err := comm.UpdatePushStatus(ctx, td, newPushLog); err != nil {
- return errors.Wrap(err, "updating pushlog status success for task")
+ return errors.Wrap(err, "updating push log status to success for task")
}
if err = c.attachFiles(ctx, comm, logger, td, s3CopyReq); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "attaching files")
}
break retryLoop
}
}
}
- if !foundDottedBucketName && strings.Contains(s3CopyReq.S3DestinationBucket, ".") {
- logger.Task().Warning("destination bucket names containing dots that are created after Sept. 30, 2020 are not guaranteed to have valid attached URLs")
- foundDottedBucketName = true
- }
- logger.Task().Infof("successfully copied '%s' to '%s'", s3CopyFile.Source.Path, s3CopyFile.Destination.Path)
+ logger.Task().Infof("Successfully copied source file '%s' to destination path '%s'.", s3CopyFile.Source.Path, s3CopyFile.Destination.Path)
}
return nil
}
-// attachFiles is responsible for sending the
-// specified file to the API Server
+// attachFiles is responsible for sending the specified file to the API Server.
func (c *s3copy) attachFiles(ctx context.Context, comm client.Communicator,
logger client.LoggerProducer, td client.TaskData, request apimodels.S3CopyRequest) error {
@@ -348,15 +344,15 @@ func (c *s3copy) attachFiles(ctx context.Context, comm client.Communicator,
if displayName == "" {
displayName = filepath.Base(request.S3SourcePath)
}
- logger.Execution().Infof("attaching file with name %v", displayName)
+ logger.Execution().Infof("Attaching file '%s'.", displayName)
file := artifact.File{
Name: displayName,
Link: fileLink,
}
files := []*artifact.File{&file}
if err := comm.AttachFiles(ctx, td, files); err != nil {
- return errors.Wrap(err, "Attach files failed")
+ return errors.Wrapf(err, "attaching file '%s'", displayName)
}
- logger.Execution().Info("API attach files call succeeded")
+ logger.Execution().Infof("Successfully attached file '%s'.", displayName)
return nil
}
diff --git a/agent/command/s3_get.go b/agent/command/s3_get.go
index 8d44879fcdd..d5682ca1eda 100644
--- a/agent/command/s3_get.go
+++ b/agent/command/s3_get.go
@@ -18,7 +18,7 @@ import (
"github.com/pkg/errors"
)
-// A plugin command to fetch a resource from an s3 bucket and download it to
+// s3get is a command to fetch a resource from an S3 bucket and download it to
// the local machine.
type s3get struct {
// AwsKey and AwsSecret are the user's credentials for
@@ -26,17 +26,17 @@ type s3get struct {
AwsKey string `mapstructure:"aws_key" plugin:"expand"`
AwsSecret string `mapstructure:"aws_secret" plugin:"expand"`
- // RemoteFile is the filepath of the file to get, within its bucket
+ // RemoteFile is the file path of the file to get, within its bucket.
RemoteFile string `mapstructure:"remote_file" plugin:"expand"`
- // Region is the s3 region where the bucket is located. It defaults to
+ // Region is the S3 region where the bucket is located. It defaults to
// "us-east-1".
Region string `mapstructure:"region" plugin:"region"`
- // Bucket is the s3 bucket holding the desired file
+ // Bucket is the S3 bucket holding the desired file.
Bucket string `mapstructure:"bucket" plugin:"expand"`
- // BuildVariants stores a list of MCI build variants to run the command for.
+ // BuildVariants stores a list of build variants to run the command for.
// If the list is empty, it runs for all build variants.
BuildVariants []string `mapstructure:"build_variants" plugin:"expand"`
@@ -58,12 +58,12 @@ func (c *s3get) Name() string { return "s3.get" }
// s3get-specific implementation of ParseParams.
func (c *s3get) ParseParams(params map[string]interface{}) error {
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding %v params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
// make sure the command params are valid
if err := c.validateParams(); err != nil {
- return errors.Wrapf(err, "error validating %v params", c.Name())
+ return errors.Wrap(err, "validating params")
}
return nil
@@ -73,13 +73,13 @@ func (c *s3get) ParseParams(params map[string]interface{}) error {
// local_file and extract_to is specified.
func (c *s3get) validateParams() error {
if c.AwsKey == "" {
- return errors.New("aws_key cannot be blank")
+ return errors.New("AWS key cannot be blank")
}
if c.AwsSecret == "" {
- return errors.New("aws_secret cannot be blank")
+ return errors.New("AWS secret cannot be blank")
}
if c.RemoteFile == "" {
- return errors.New("remote_file cannot be blank")
+ return errors.New("remote file cannot be blank")
}
if c.Region == "" {
@@ -88,17 +88,17 @@ func (c *s3get) validateParams() error {
// make sure the bucket is valid
if err := validateS3BucketName(c.Bucket); err != nil {
- return errors.Wrapf(err, "%v is an invalid bucket name", c.Bucket)
+ return errors.Wrapf(err, "validating bucket name '%s'", c.Bucket)
}
// make sure local file and extract-to dir aren't both specified
if c.LocalFile != "" && c.ExtractTo != "" {
- return errors.New("cannot specify both local_file and extract_to directory")
+ return errors.New("cannot specify both local file path and directory to extract to")
}
// make sure one is specified
if c.LocalFile == "" && c.ExtractTo == "" {
- return errors.New("must specify either local_file or extract_to")
+ return errors.New("must specify either local file path or directory to extract to")
}
return nil
@@ -127,12 +127,12 @@ func (c *s3get) Execute(ctx context.Context,
// expand necessary params
if err := c.expandParams(conf); err != nil {
- return err
+ return errors.Wrap(err, "applying expansions")
}
// validate the params
if err := c.validateParams(); err != nil {
- return errors.Wrap(err, "expanded params are not valid")
+ return errors.Wrap(err, "validating expanded params")
}
// create pail bucket
@@ -141,16 +141,15 @@ func (c *s3get) Execute(ctx context.Context,
defer utility.PutHTTPClient(httpClient)
err := c.createPailBucket(httpClient)
if err != nil {
- return errors.Wrap(err, "problem connecting to s3")
+ return errors.Wrap(err, "creating S3 bucket")
}
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
+
if err := c.bucket.Check(ctx); err != nil {
- return errors.Wrap(err, "invalid pail bucket")
+ return errors.Wrap(err, "checking bucket")
}
if !c.shouldRunForVariant(conf.BuildVariant.Name) {
- logger.Task().Infof("Skipping S3 get of remote file %v for variant %v",
+ logger.Task().Infof("Skipping S3 get of remote file '%s' for variant '%s'.",
c.RemoteFile, conf.BuildVariant.Name)
return nil
}
@@ -163,7 +162,7 @@ func (c *s3get) Execute(ctx context.Context,
}
if err := createEnclosingDirectoryIfNeeded(c.LocalFile); err != nil {
- return errors.Wrap(err, "unable to create local_file directory")
+ return errors.Wrapf(err, "creating parent directories for local file '%s'", c.LocalFile)
}
}
@@ -173,20 +172,27 @@ func (c *s3get) Execute(ctx context.Context,
}
if err := createEnclosingDirectoryIfNeeded(c.ExtractTo); err != nil {
- return errors.Wrap(err, "unable to create extract_to directory")
+ return errors.Wrapf(err, "creating parent directories for extraction directory '%s'", c.ExtractTo)
}
}
errChan := make(chan error)
go func() {
- errChan <- errors.WithStack(c.getWithRetry(ctx, logger))
+ err := errors.WithStack(c.getWithRetry(ctx, logger))
+ select {
+ case errChan <- err:
+ return
+ case <-ctx.Done():
+ logger.Task().Infof("Context canceled waiting for s3 get: %s.", ctx.Err())
+ return
+ }
}()
select {
case err := <-errChan:
return errors.WithStack(err)
case <-ctx.Done():
- logger.Execution().Info("Received signal to terminate execution of S3 Get Command")
+ logger.Execution().Infof("Canceled while running command '%s': %s", c.Name(), ctx.Err())
return nil
}
@@ -199,25 +205,25 @@ func (c *s3get) getWithRetry(ctx context.Context, logger client.LoggerProducer)
defer timer.Stop()
for i := 1; i <= maxS3OpAttempts; i++ {
- logger.Task().Infof("fetching %s from s3 bucket %s (attempt %d of %d)",
+ logger.Task().Infof("Fetching remote file '%s' from S3 bucket '%s' (attempt %d of %d).",
c.RemoteFile, c.Bucket, i, maxS3OpAttempts)
select {
case <-ctx.Done():
- return errors.New("s3 get operation aborted")
+ return errors.Errorf("canceled while running command '%s'", c.Name())
case <-timer.C:
err := errors.WithStack(c.get(ctx))
if err == nil {
return nil
}
- logger.Execution().Errorf("problem getting %s from s3 bucket, retrying. [%v]",
+ logger.Execution().Errorf("Problem getting remote file '%s' from S3 bucket, retrying: %s",
c.RemoteFile, err)
timer.Reset(backoffCounter.Duration())
}
}
- return errors.Errorf("S3 get failed after %d attempts", maxS3OpAttempts)
+ return errors.Errorf("command '%s' failed after %d attempts", c.Name(), maxS3OpAttempts)
}
// Fetch the specified resource from s3.
@@ -227,22 +233,22 @@ func (c *s3get) get(ctx context.Context) error {
// remove the file, if it exists
if utility.FileExists(c.LocalFile) {
if err := os.RemoveAll(c.LocalFile); err != nil {
- return errors.Wrapf(err, "error clearing local file %v", c.LocalFile)
+ return errors.Wrapf(err, "removing already-existing local file '%s'", c.LocalFile)
}
}
// download to local file
return errors.Wrapf(c.bucket.Download(ctx, c.RemoteFile, c.LocalFile),
- "error downloading %s to %s", c.RemoteFile, c.LocalFile)
+ "downloading remote file '%s' to local file '%s'", c.RemoteFile, c.LocalFile)
}
reader, err := c.bucket.Reader(ctx, c.RemoteFile)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrapf(err, "getting reader for remote file '%s'", c.RemoteFile)
}
if err := agentutil.ExtractTarball(ctx, reader, c.ExtractTo, []string{}); err != nil {
- return errors.Wrapf(err, "problem extracting %s from archive", c.RemoteFile)
+ return errors.Wrapf(err, "extracting file '%s' from archive to destination '%s'", c.RemoteFile, c.ExtractTo)
}
return nil
diff --git a/agent/command/s3_pull.go b/agent/command/s3_pull.go
index 0912da4e357..3e48c97d6d8 100644
--- a/agent/command/s3_pull.go
+++ b/agent/command/s3_pull.go
@@ -28,11 +28,11 @@ type s3Base struct {
}
func (c *s3Base) ParseParams(params map[string]interface{}) error {
- return errors.Wrapf(mapstructure.Decode(params, c), "error decoding S3 parameters")
+ return errors.Wrapf(mapstructure.Decode(params, c), "decoding mapstructure params")
}
func (c *s3Base) expandParams(conf *internal.TaskConfig) error {
- return errors.WithStack(util.ExpandValues(c, conf.Expansions))
+ return errors.Wrap(util.ExpandValues(c, conf.Expansions), "applying expansions")
}
func (c *s3Base) createBucket(client *http.Client, conf *internal.TaskConfig) error {
@@ -48,12 +48,13 @@ func (c *s3Base) createBucket(client *http.Client, conf *internal.TaskConfig) er
Credentials: pail.CreateAWSCredentials(conf.TaskSync.Key, conf.TaskSync.Secret, ""),
Region: endpoints.UsEast1RegionID,
Name: conf.TaskSync.Bucket,
- MaxRetries: int(c.MaxRetries),
+ MaxRetries: utility.ToIntPtr(int(c.MaxRetries)),
Permissions: pail.S3PermissionsPrivate,
}
+
bucket, err := pail.NewS3ArchiveBucketWithHTTPClient(client, opts)
if err != nil {
- return errors.Wrap(err, "could not create bucket")
+ return errors.Wrap(err, "initializing bucket")
}
c.bucket = bucket
@@ -79,10 +80,10 @@ func (*s3Pull) Name() string {
func (c *s3Pull) ParseParams(params map[string]interface{}) error {
if err := c.s3Base.ParseParams(params); err != nil {
- return errors.Wrapf(err, "error decoding %s params", c.Name())
+ return errors.Wrap(err, "parsing common S3 params")
}
if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding %s params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Task == "" {
return errors.New("task must not be empty")
@@ -99,7 +100,7 @@ func (c *s3Pull) expandParams(conf *internal.TaskConfig) error {
func (c *s3Pull) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := c.expandParams(conf); err != nil {
- return errors.Wrap(err, "error applying expansions to parameters")
+ return errors.Wrap(err, "applying expansions")
}
if c.FromBuildVariant == "" {
c.FromBuildVariant = conf.Task.BuildVariant
@@ -115,7 +116,7 @@ func (c *s3Pull) Execute(ctx context.Context, comm client.Communicator, logger c
defer utility.PutHTTPClient(httpClient)
if err := c.createBucket(httpClient, conf); err != nil {
- return errors.Wrap(err, "could not set up S3 task bucket")
+ return errors.Wrap(err, "creating S3 task bucket")
}
remotePath := conf.Task.S3Path(c.FromBuildVariant, c.Task)
@@ -123,29 +124,32 @@ func (c *s3Pull) Execute(ctx context.Context, comm client.Communicator, logger c
// Verify that the contents exist before pulling, otherwise pull may no-op.
logger.Execution().WarningWhen(filepath.IsAbs(c.WorkingDir) && !strings.HasPrefix(c.WorkingDir, conf.WorkDir),
- fmt.Sprintf("the working directory ('%s') is an absolute path, which isn't supported except when prefixed by '%s'",
+ fmt.Sprintf("The working directory ('%s') is an absolute path, which isn't supported except when prefixed by '%s'.",
c.WorkingDir, conf.WorkDir))
if err := createEnclosingDirectoryIfNeeded(c.WorkingDir); err != nil {
- return errors.Wrap(err, "problem making working directory")
+ return errors.Wrapf(err, "creating parent directories for working directory '%s'", c.WorkingDir)
}
wd, err := conf.GetWorkingDirectory(c.WorkingDir)
if err != nil {
- return errors.Wrap(err, "could not get working directory")
+ return errors.Wrapf(err, "getting working directory")
}
pullMsg := fmt.Sprintf("Pulling task directory files from S3 from task '%s' on build variant '%s'", c.Task, c.FromBuildVariant)
if c.ExcludeFilter != "" {
- pullMsg += ", excluding files matching filter " + c.ExcludeFilter
+ pullMsg = fmt.Sprintf("%s, excluding files matching filter '%s'", pullMsg, c.ExcludeFilter)
}
+ pullMsg += "."
logger.Task().Infof(pullMsg)
if err = c.bucket.Pull(ctx, pail.SyncOptions{
Local: wd,
Remote: remotePath,
Exclude: c.ExcludeFilter,
}); err != nil {
- return errors.Wrap(err, "error pulling task data from S3")
+ return errors.Wrap(err, "pulling task data from S3")
}
+ logger.Task().Info("Successfully pulled task directory files.")
+
return nil
}
diff --git a/agent/command/s3_pull_test.go b/agent/command/s3_pull_test.go
index 4cd9c9ac067..79c0c4e169a 100644
--- a/agent/command/s3_pull_test.go
+++ b/agent/command/s3_pull_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -52,7 +51,7 @@ func TestS3PullExecute(t *testing.T) {
"PullsTaskDirectoryFromS3": func(ctx context.Context, t *testing.T, c *s3Pull, comm *client.Mock, logger client.LoggerProducer, conf *internal.TaskConfig, bucketDir string) {
taskDir := filepath.Join(bucketDir, conf.Task.S3Path(c.FromBuildVariant, c.Task))
require.NoError(t, os.MkdirAll(taskDir, 0777))
- tmpFile, err := ioutil.TempFile(taskDir, "file")
+ tmpFile, err := os.CreateTemp(taskDir, "file")
require.NoError(t, err)
defer func() {
assert.NoError(t, os.RemoveAll(tmpFile.Name()))
@@ -62,21 +61,17 @@ func TestS3PullExecute(t *testing.T) {
assert.NoError(t, tmpFile.Close())
require.NoError(t, err)
- c.WorkingDir, err = ioutil.TempDir("", "pull_dir")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(c.WorkingDir))
- }()
+ c.WorkingDir = t.TempDir()
require.NoError(t, c.Execute(ctx, comm, logger, conf))
- pulledContent, err := ioutil.ReadFile(filepath.Join(c.WorkingDir, filepath.Base(tmpFile.Name())))
+ pulledContent, err := os.ReadFile(filepath.Join(c.WorkingDir, filepath.Base(tmpFile.Name())))
require.NoError(t, err)
assert.Equal(t, pulledContent, fileContent)
},
"IgnoresFilesExcludedByFilter": func(ctx context.Context, t *testing.T, c *s3Pull, comm *client.Mock, logger client.LoggerProducer, conf *internal.TaskConfig, bucketDir string) {
taskDir := filepath.Join(bucketDir, conf.Task.S3Path(c.FromBuildVariant, c.Task))
require.NoError(t, os.MkdirAll(taskDir, 0777))
- tmpFile, err := ioutil.TempFile(taskDir, "file")
+ tmpFile, err := os.CreateTemp(taskDir, "file")
require.NoError(t, err)
defer func() {
assert.NoError(t, os.RemoveAll(tmpFile.Name()))
@@ -85,16 +80,12 @@ func TestS3PullExecute(t *testing.T) {
assert.NoError(t, tmpFile.Close())
require.NoError(t, err)
- c.WorkingDir, err = ioutil.TempDir("", "pull_dir")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(c.WorkingDir))
- }()
+ c.WorkingDir = t.TempDir()
c.ExcludeFilter = ".*"
require.NoError(t, c.Execute(ctx, comm, logger, conf))
- files, err := ioutil.ReadDir(c.WorkingDir)
+ files, err := os.ReadDir(c.WorkingDir)
require.NoError(t, err)
assert.Empty(t, files)
},
@@ -102,14 +93,9 @@ func TestS3PullExecute(t *testing.T) {
taskDir := filepath.Join(bucketDir, conf.Task.S3Path(c.FromBuildVariant, c.Task))
require.NoError(t, os.MkdirAll(taskDir, 0777))
- require.NoError(t, ioutil.WriteFile(filepath.Join(taskDir, "foo"), []byte("bar"), 0777))
+ require.NoError(t, os.WriteFile(filepath.Join(taskDir, "foo"), []byte("bar"), 0777))
- wd, err := ioutil.TempDir("", "s3-pull-output")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(wd))
- }()
- c.WorkingDir = wd
+ c.WorkingDir = t.TempDir()
c.ExcludeFilter = "${exclude_filter}"
excludeFilterExpansion := "expanded_exclude_filter"
@@ -170,11 +156,7 @@ func TestS3PullExecute(t *testing.T) {
Secret: conf.Task.Secret,
}, nil)
require.NoError(t, err)
- tmpDir, err := ioutil.TempDir("", "s3-pull-bucket")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(tmpDir))
- }()
+ tmpDir := t.TempDir()
c := &s3Pull{Task: "task", FromBuildVariant: "from_build_variant"}
c.bucket, err = pail.NewLocalBucket(pail.LocalOptions{
Path: tmpDir,
diff --git a/agent/command/s3_push.go b/agent/command/s3_push.go
index 70649a3f006..6680ebe3027 100644
--- a/agent/command/s3_push.go
+++ b/agent/command/s3_push.go
@@ -25,30 +25,31 @@ func (*s3Push) Name() string {
}
func (c *s3Push) ParseParams(params map[string]interface{}) error {
- return errors.Wrapf(c.s3Base.ParseParams(params), "error decoding %s params", c.Name())
+ return errors.Wrapf(c.s3Base.ParseParams(params), "parsing common S3 parameters")
}
func (c *s3Push) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
if err := c.expandParams(conf); err != nil {
- return errors.Wrap(err, "error applying expansions to parameters")
+ return errors.Wrap(err, "applying expansions")
}
httpClient := utility.GetDefaultHTTPRetryableClient()
defer utility.PutHTTPClient(httpClient)
if err := c.createBucket(httpClient, conf); err != nil {
- return errors.Wrap(err, "could not set up S3 task bucket")
+ return errors.Wrap(err, "creating S3 task bucket")
}
wd, err := conf.GetWorkingDirectory("")
if err != nil {
- return errors.Wrap(err, "could not get working directory")
+ return errors.Wrap(err, "getting working directory")
}
- pushMsg := fmt.Sprintf("Pushing task directory files from %s into S3", wd)
+ pushMsg := fmt.Sprintf("Pushing task directory files from directory '%s' into S3", wd)
if c.ExcludeFilter != "" {
- pushMsg += ", excluding files matching filter " + c.ExcludeFilter
+ pushMsg = fmt.Sprintf("%s, excluding files matching filter '%s'", pushMsg, c.ExcludeFilter)
}
+ pushMsg += "."
logger.Task().Infof(pushMsg)
s3Path := conf.Task.S3Path(conf.Task.BuildVariant, conf.Task.DisplayName)
@@ -57,10 +58,10 @@ func (c *s3Push) Execute(ctx context.Context, comm client.Communicator, logger c
Remote: s3Path,
Exclude: c.ExcludeFilter,
}); err != nil {
- return errors.Wrap(err, "error pushing task data to S3")
+ return errors.Wrap(err, "pushing task data to S3")
}
- logger.Task().Infof("Successfully pushed task directory files")
+ logger.Task().Info("Successfully pushed task directory files.")
return nil
}
diff --git a/agent/command/s3_push_test.go b/agent/command/s3_push_test.go
index f8708dff142..ab9132e7530 100644
--- a/agent/command/s3_push_test.go
+++ b/agent/command/s3_push_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -44,14 +43,10 @@ func TestS3PushParseParams(t *testing.T) {
func TestS3PushExecute(t *testing.T) {
for testName, testCase := range map[string]func(context.Context, *testing.T, *s3Push, *client.Mock, client.LoggerProducer, *internal.TaskConfig){
"PushesTaskDirectoryToS3": func(ctx context.Context, t *testing.T, c *s3Push, comm *client.Mock, logger client.LoggerProducer, conf *internal.TaskConfig) {
- tmpDir, err := ioutil.TempDir("", "s3_push")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(tmpDir))
- }()
+ tmpDir := t.TempDir()
workDir := filepath.Join(tmpDir, "work_dir")
require.NoError(t, os.MkdirAll(workDir, 0777))
- tmpFile, err := ioutil.TempFile(workDir, "file")
+ tmpFile, err := os.CreateTemp(workDir, "file")
require.NoError(t, err)
fileContent := []byte("foobar")
_, err = tmpFile.Write(fileContent)
@@ -70,19 +65,15 @@ func TestS3PushExecute(t *testing.T) {
Remote: filepath.Join(s3Path),
}))
- pulledContent, err := ioutil.ReadFile(filepath.Join(pullDir, filepath.Base(tmpFile.Name())))
+ pulledContent, err := os.ReadFile(filepath.Join(pullDir, filepath.Base(tmpFile.Name())))
require.NoError(t, err)
assert.Equal(t, fileContent, pulledContent)
},
"IgnoresFilesExcludedByFilter": func(ctx context.Context, t *testing.T, c *s3Push, comm *client.Mock, logger client.LoggerProducer, conf *internal.TaskConfig) {
- tmpDir, err := ioutil.TempDir("", "s3_push")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(tmpDir))
- }()
+ tmpDir := t.TempDir()
workDir := filepath.Join(tmpDir, "work_dir")
require.NoError(t, os.MkdirAll(workDir, 0777))
- tmpFile, err := ioutil.TempFile(workDir, "file")
+ tmpFile, err := os.CreateTemp(workDir, "file")
require.NoError(t, err)
_, err = tmpFile.Write([]byte("foobar"))
assert.NoError(t, tmpFile.Close())
@@ -101,17 +92,12 @@ func TestS3PushExecute(t *testing.T) {
Remote: s3Path,
}))
- files, err := ioutil.ReadDir(pullDir)
+ files, err := os.ReadDir(pullDir)
require.NoError(t, err)
assert.Empty(t, files)
},
"ExpandsParameters": func(ctx context.Context, t *testing.T, c *s3Push, comm *client.Mock, logger client.LoggerProducer, conf *internal.TaskConfig) {
- tmpDir, err := ioutil.TempDir("", "s3_push")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(tmpDir))
- }()
- conf.WorkDir = tmpDir
+ conf.WorkDir = t.TempDir()
c.ExcludeFilter = "${exclude_filter}"
excludeFilterExpansion := "expanded_exclude_filter"
@@ -169,14 +155,9 @@ func TestS3PushExecute(t *testing.T) {
Secret: conf.Task.Secret,
}, nil)
require.NoError(t, err)
- tmpDir, err := ioutil.TempDir("", "s3-push-bucket")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(tmpDir))
- }()
c := &s3Push{}
c.bucket, err = pail.NewLocalBucket(pail.LocalOptions{
- Path: tmpDir,
+ Path: t.TempDir(),
})
require.NoError(t, err)
testCase(ctx, t, c, comm, logger, conf)
diff --git a/agent/command/s3_put.go b/agent/command/s3_put.go
index bc8bb4d2388..24b864a32e9 100644
--- a/agent/command/s3_put.go
+++ b/agent/command/s3_put.go
@@ -17,7 +17,6 @@ import (
"github.com/evergreen-ci/evergreen/agent/internal/client"
agentutil "github.com/evergreen-ci/evergreen/agent/util"
"github.com/evergreen-ci/evergreen/model/artifact"
- "github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/pail"
"github.com/evergreen-ci/utility"
@@ -26,16 +25,16 @@ import (
"github.com/pkg/errors"
)
-// A plugin command to put a resource to an s3 bucket and download it to
+// s3pc is a command to put a resource to an S3 bucket and download it to
// the local machine.
type s3put struct {
// AwsKey and AwsSecret are the user's credentials for
- // authenticating interactions with s3.
+ // authenticating interactions with S3.
AwsKey string `mapstructure:"aws_key" plugin:"expand"`
AwsSecret string `mapstructure:"aws_secret" plugin:"expand"`
// LocalFile is the local filepath to the file the user
- // wishes to store in s3
+ // wishes to store in S3.
LocalFile string `mapstructure:"local_file" plugin:"expand"`
// LocalFilesIncludeFilter is an array of expressions that specify what files should be
@@ -46,26 +45,30 @@ type s3put struct {
LocalFilesIncludeFilterPrefix string `mapstructure:"local_files_include_filter_prefix" plugin:"expand"`
// RemoteFile is the filepath to store the file to,
- // within an s3 bucket. Is a prefix when multiple files are uploaded via LocalFilesIncludeFilter.
+ // within an S3 bucket. Is a prefix when multiple files are uploaded via LocalFilesIncludeFilter.
RemoteFile string `mapstructure:"remote_file" plugin:"expand"`
- // Region is the s3 region where the bucket is located. It defaults to
+ // PreservePath, when set to true, causes multi part uploads uploaded with LocalFilesIncludeFilter to
+ // preserve the original folder structure instead of putting all the files into the same folder
+ PreservePath string ` mapstructure:"preserve_path" plugin:"expand"`
+
+ // Region is the S3 region where the bucket is located. It defaults to
// "us-east-1".
Region string `mapstructure:"region" plugin:"region"`
- // Bucket is the s3 bucket to use when storing the desired file
+ // Bucket is the s3 bucket to use when storing the desired file.
Bucket string `mapstructure:"bucket" plugin:"expand"`
// Permissions is the ACL to apply to the uploaded file. See:
- // http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
+ // http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
// for some examples.
Permissions string `mapstructure:"permissions"`
// ContentType is the MIME type of the uploaded file.
- // E.g. text/html, application/pdf, image/jpeg, ...
+ // E.g. text/html, application/pdf, image/jpeg, ...
ContentType string `mapstructure:"content_type" plugin:"expand"`
- // BuildVariants stores a list of MCI build variants to run the command for.
+ // BuildVariants stores a list of build variants to run the command for.
// If the list is empty, it runs for all build variants.
BuildVariants []string `mapstructure:"build_variants"`
@@ -74,7 +77,7 @@ type s3put struct {
ResourceDisplayName string `mapstructure:"display_name" plugin:"expand"`
// Visibility determines who can see file links in the UI.
- // Visibility can be set to either
+ // Visibility can be set to either:
// "private", which allows logged-in users to see the file;
// "public", which allows anyone to see the file; or
// "none", which hides the file from the UI for everybody.
@@ -100,6 +103,7 @@ type s3put struct {
// workDir will be empty if an absolute path is provided to the file.
workDir string
skipMissing bool
+ preservePath bool
skipExistingBool bool
isPatchable bool
isPatchOnly bool
@@ -123,11 +127,11 @@ func (s3pc *s3put) ParseParams(params map[string]interface{}) error {
Result: s3pc,
})
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "initializing mapstructure decoder")
}
if err := decoder.Decode(params); err != nil {
- return errors.Wrapf(err, "error decoding %s params", s3pc.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
return s3pc.validate()
@@ -138,35 +142,38 @@ func (s3pc *s3put) validate() error {
// make sure the command params are valid
if s3pc.AwsKey == "" {
- catcher.Add(errors.New("aws_key cannot be blank"))
+ catcher.New("AWS key cannot be blank")
}
if s3pc.AwsSecret == "" {
- catcher.Add(errors.New("aws_secret cannot be blank"))
+ catcher.New("AWS secret cannot be blank")
}
if s3pc.LocalFile == "" && !s3pc.isMulti() {
- catcher.Add(errors.New("local_file and local_files_include_filter cannot both be blank"))
+ catcher.New("local file and local files include filter cannot both be blank")
}
if s3pc.LocalFile != "" && s3pc.isMulti() {
- catcher.Add(errors.New("local_file and local_files_include_filter cannot both be specified"))
+ catcher.New("local file and local files include filter cannot both be specified")
+ }
+ if s3pc.PreservePath != "" && !s3pc.isMulti() {
+ catcher.New("preserve path can only be used with local files include filter")
}
if s3pc.skipMissing && s3pc.isMulti() {
- catcher.Add(errors.New("cannot use optional upload with local_files_include_filter"))
+ catcher.New("cannot use optional upload with local files include filter")
}
if s3pc.RemoteFile == "" {
- catcher.Add(errors.New("remote_file cannot be blank"))
+ catcher.New("remote file cannot be blank")
}
if s3pc.ContentType == "" {
- catcher.Add(errors.New("content_type cannot be blank"))
+ catcher.New("content type cannot be blank")
}
if s3pc.isMulti() && filepath.IsAbs(s3pc.LocalFile) {
- catcher.Add(errors.New("cannot use absolute path with local_files_include_filter"))
+ catcher.New("cannot use absolute path with local files include filter")
}
if s3pc.Visibility == artifact.Signed && (s3pc.Permissions == s3.BucketCannedACLPublicRead || s3pc.Permissions == s3.BucketCannedACLPublicReadWrite) {
catcher.New("visibility: signed should not be combined with permissions: public-read or permissions: public-read-write")
}
if !utility.StringSliceContains(artifact.ValidVisibilities, s3pc.Visibility) {
- catcher.Add(errors.Errorf("invalid visibility setting: %v", s3pc.Visibility))
+ catcher.Errorf("invalid visibility setting '%s', allowed visibilities are: %s", s3pc.Visibility, artifact.ValidVisibilities)
}
if s3pc.Region == "" {
@@ -175,12 +182,12 @@ func (s3pc *s3put) validate() error {
// make sure the bucket is valid
if err := validateS3BucketName(s3pc.Bucket); err != nil {
- catcher.Add(errors.Wrapf(err, "%v is an invalid bucket name", s3pc.Bucket))
+ catcher.Wrapf(err, "invalid bucket name '%s'", s3pc.Bucket)
}
// make sure the s3 permissions are valid
if !validS3Permissions(s3pc.Permissions) {
- catcher.Add(errors.Errorf("permissions '%v' are not valid", s3pc.Permissions))
+ catcher.Errorf("invalid permissions '%s'", s3pc.Permissions)
}
return catcher.Resolve()
@@ -191,7 +198,7 @@ func (s3pc *s3put) validate() error {
func (s3pc *s3put) expandParams(conf *internal.TaskConfig) error {
var err error
if err = util.ExpandValues(s3pc, conf.Expansions); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "applying expansions")
}
s3pc.workDir = conf.WorkDir
@@ -199,27 +206,31 @@ func (s3pc *s3put) expandParams(conf *internal.TaskConfig) error {
s3pc.workDir = ""
}
- s3pc.skipMissing = false
if s3pc.Optional != "" {
s3pc.skipMissing, err = strconv.ParseBool(s3pc.Optional)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "parsing optional parameter as a boolean")
+ }
+ }
+
+ if s3pc.PreservePath != "" {
+ s3pc.preservePath, err = strconv.ParseBool(s3pc.PreservePath)
+ if err != nil {
+ return errors.Wrap(err, "parsing preserve path parameter as a boolean")
}
}
- s3pc.skipExistingBool = false
if s3pc.SkipExisting != "" {
s3pc.skipExistingBool, err = strconv.ParseBool(s3pc.SkipExisting)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "parsing skip existing parameter as a boolean")
}
}
- s3pc.isPatchOnly = false
if s3pc.PatchOnly != "" {
s3pc.isPatchOnly, err = strconv.ParseBool(s3pc.PatchOnly)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "parsing patch only parameter as a boolean")
}
}
@@ -227,7 +238,7 @@ func (s3pc *s3put) expandParams(conf *internal.TaskConfig) error {
if s3pc.Patchable != "" {
s3pc.isPatchable, err = strconv.ParseBool(s3pc.Patchable)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "parsing patchable parameter as a boolean")
}
}
@@ -261,14 +272,14 @@ func (s3pc *s3put) Execute(ctx context.Context,
}
// re-validate command here, in case an expansion is not defined
if err := s3pc.validate(); err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "validating expanded parameters")
}
if conf.Task.IsPatchRequest() && !s3pc.isPatchable {
- logger.Task().Info("Skipping s3 put because the command is not patchable")
+ logger.Task().Infof("Skipping command '%s' because it is not patchable and this task is part of a patch.", s3pc.Name())
return nil
}
if !conf.Task.IsPatchRequest() && s3pc.isPatchOnly {
- logger.Task().Info("Skipping s3 put because the command is patch only")
+ logger.Task().Infof("Skipping command '%s' because the command is patch only and this task is not part of a patch.", s3pc.Name())
return nil
}
@@ -277,47 +288,52 @@ func (s3pc *s3put) Execute(ctx context.Context,
httpClient.Timeout = s3HTTPClientTimeout
defer utility.PutHTTPClient(httpClient)
if err := s3pc.createPailBucket(httpClient); err != nil {
- return errors.Wrap(err, "problem connecting to s3")
+ return errors.Wrap(err, "connecting to S3")
}
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
if err := s3pc.bucket.Check(ctx); err != nil {
- return errors.Wrap(err, "invalid bucket")
+ return errors.Wrap(err, "checking bucket")
}
s3pc.taskdata = client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
if !s3pc.shouldRunForVariant(conf.BuildVariant.Name) {
- logger.Task().Infof("Skipping S3 put of local file %v for variant %v",
+ logger.Task().Infof("Skipping S3 put of local file '%s' for variant '%s'.",
s3pc.LocalFile, conf.BuildVariant.Name)
return nil
}
if s3pc.isPrivate(s3pc.Visibility) {
- logger.Task().Infof("Putting private files into s3")
+ logger.Task().Infof("Putting private files into S3.")
} else {
if s3pc.isMulti() {
- logger.Task().Infof("Putting files matching filter %v into path %v in s3 bucket %v",
+ logger.Task().Infof("Putting files matching filter '%s' into path '%s' in S3 bucket '%s'.",
s3pc.LocalFilesIncludeFilter, s3pc.RemoteFile, s3pc.Bucket)
} else if s3pc.isPublic() {
- logger.Task().Infof("Putting %s into %s/%s (%s)", s3pc.LocalFile, s3pc.Bucket, s3pc.RemoteFile, agentutil.S3DefaultURL(s3pc.Bucket, s3pc.RemoteFile))
+ logger.Task().Infof("Putting local file '%s' into path '%s/%s' (%s).", s3pc.LocalFile, s3pc.Bucket, s3pc.RemoteFile, agentutil.S3DefaultURL(s3pc.Bucket, s3pc.RemoteFile))
} else {
- logger.Task().Infof("Putting %s into %s/%s", s3pc.LocalFile, s3pc.Bucket, s3pc.RemoteFile)
+ logger.Task().Infof("Putting local file '%s' into '%s/%s'.", s3pc.LocalFile, s3pc.Bucket, s3pc.RemoteFile)
}
}
errChan := make(chan error)
go func() {
- errChan <- errors.WithStack(s3pc.putWithRetry(ctx, comm, logger))
+ err := errors.WithStack(s3pc.putWithRetry(ctx, comm, logger))
+ select {
+ case errChan <- err:
+ return
+ case <-ctx.Done():
+ logger.Task().Infof("Context canceled waiting for s3 put: %s.", ctx.Err())
+ return
+ }
}()
select {
case err := <-errChan:
return err
case <-ctx.Done():
- logger.Execution().Info("Received signal to terminate execution of S3 Put Command")
+ logger.Execution().Infof("Canceled while running command '%s': %s.", s3pc.Name(), ctx.Err())
return nil
}
@@ -339,16 +355,16 @@ func (s3pc *s3put) putWithRetry(ctx context.Context, comm client.Communicator, l
retryLoop:
for i := 1; i <= maxS3OpAttempts; i++ {
if s3pc.isPrivate(s3pc.Visibility) {
- logger.Task().Infof("performing s3 put of a hidden file")
+ logger.Task().Infof("Performing S3 put of a private file.")
} else {
- logger.Task().Infof("performing s3 put to %s of %s [%d of %d]",
- s3pc.Bucket, s3pc.RemoteFile,
+ logger.Task().Infof("Performing S3 put to file '%s' in bucket '%s' (attempt %d of %d).",
+ s3pc.RemoteFile, s3pc.Bucket,
i, maxS3OpAttempts)
}
select {
case <-ctx.Done():
- return errors.New("s3 put operation canceled")
+ return errors.Errorf("canceled while running command '%s'", s3pc.Name())
case <-timer.C:
filesList = []string{s3pc.LocalFile}
@@ -361,11 +377,11 @@ retryLoop:
}
filesList, err = b.Build()
if err != nil {
- return errors.Wrapf(err, "error processing filter %s",
+ return errors.Wrapf(err, "processing local files include filter '%s'",
strings.Join(s3pc.LocalFilesIncludeFilter, " "))
}
if len(filesList) == 0 {
- logger.Task().Infof("s3.put: file filter '%s' matched no files", strings.Join(s3pc.LocalFilesIncludeFilter, " "))
+ logger.Task().Infof("File filter '%s' matched no files.", strings.Join(s3pc.LocalFilesIncludeFilter, " "))
return nil
}
}
@@ -375,14 +391,19 @@ retryLoop:
uploadLoop:
for _, fpath := range filesList {
- if ctx.Err() != nil {
- return errors.New("s3 put operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrapf(err, "canceled while processing file '%s'", fpath)
}
remoteName := s3pc.RemoteFile
if s3pc.isMulti() {
- fname := filepath.Base(fpath)
- remoteName = fmt.Sprintf("%s%s", s3pc.RemoteFile, fname)
+ if s3pc.preservePath {
+ remoteName = filepath.Join(s3pc.RemoteFile, fpath)
+ } else {
+ // put all files in the same directory
+ fname := filepath.Base(fpath)
+ remoteName = fmt.Sprintf("%s%s", s3pc.RemoteFile, fname)
+ }
}
fpath = filepath.Join(filepath.Join(s3pc.workDir, s3pc.LocalFilesIncludeFilterPrefix), fpath)
@@ -390,10 +411,10 @@ retryLoop:
if s3pc.skipExistingBool {
exists, err := s3pc.remoteFileExists(remoteName)
if err != nil {
- return errors.Wrapf(err, "error checking if file '%s' exists", remoteName)
+ return errors.Wrapf(err, "checking if file '%s' exists", remoteName)
}
if exists {
- logger.Task().Infof("noop: not uploading file '%s' because remote file '%s' already exists. Continuing to upload other files.", fpath, remoteName)
+ logger.Task().Infof("Not uploading file '%s' because remote file '%s' already exists. Continuing to upload other files.", fpath, remoteName)
continue uploadLoop
}
}
@@ -405,11 +426,11 @@ retryLoop:
if s3pc.isMulti() {
// try the remaining multi uploads in the group, effectively ignoring this
// error.
- logger.Task().Infof("file '%s' not found but continuing to upload other files", fpath)
+ logger.Task().Infof("File '%s' not found, but continuing to upload other files.", fpath)
continue uploadLoop
} else if s3pc.skipMissing {
// single optional file uploads should return early.
- logger.Task().Infof("file '%s' not found but skip missing true", fpath)
+ logger.Task().Infof("File '%s' not found and skip missing is true, exiting without error.", fpath)
return nil
} else {
// single required uploads should return an error asap.
@@ -418,12 +439,16 @@ retryLoop:
}
// in all other cases, log an error and retry after an interval.
- logger.Task().Error(errors.WithMessage(err, "problem putting s3 file"))
+ logger.Task().Error(errors.WithMessage(err, "putting S3 file"))
timer.Reset(backoffCounter.Duration())
continue retryLoop
}
- uploadedFiles = append(uploadedFiles, fpath)
+ if s3pc.preservePath {
+ uploadedFiles = append(uploadedFiles, remoteName)
+ } else {
+ uploadedFiles = append(uploadedFiles, fpath)
+ }
}
break retryLoop
@@ -431,7 +456,7 @@ retryLoop:
}
if len(uploadedFiles) == 0 && s3pc.skipMissing {
- logger.Task().Info("s3 put uploaded no files")
+ logger.Task().Info("S3 put uploaded no files")
return nil
}
@@ -440,10 +465,10 @@ retryLoop:
return err
}
- logger.Task().WarningWhen(strings.Contains(s3pc.Bucket, "."), "bucket names containing dots that are created after Sept. 30, 2020 are not guaranteed to have valid attached URLs")
+ logger.Task().WarningWhen(strings.Contains(s3pc.Bucket, "."), "Bucket names containing dots that are created after Sept. 30, 2020 are not guaranteed to have valid attached URLs.")
if len(uploadedFiles) != len(filesList) && !s3pc.skipMissing {
- logger.Task().Infof("attempted to upload %d files, %d successfully uploaded", len(filesList), len(uploadedFiles))
+ logger.Task().Infof("Attempted to upload %d files, %d successfully uploaded.", len(filesList), len(uploadedFiles))
return errors.Errorf("uploaded %d files of %d requested", len(uploadedFiles), len(filesList))
}
@@ -457,8 +482,14 @@ func (s3pc *s3put) attachFiles(ctx context.Context, comm client.Communicator, lo
for _, fn := range localFiles {
remoteFileName := filepath.ToSlash(remoteFile)
+
if s3pc.isMulti() {
- remoteFileName = fmt.Sprintf("%s%s", remoteFile, filepath.Base(fn))
+ if s3pc.preservePath {
+ remoteFileName = fn
+ } else {
+ remoteFileName = fmt.Sprintf("%s%s", remoteFile, filepath.Base(fn))
+ }
+
}
fileLink := agentutil.S3DefaultURL(s3pc.Bucket, remoteFileName)
@@ -490,7 +521,7 @@ func (s3pc *s3put) attachFiles(ctx context.Context, comm client.Communicator, lo
err := comm.AttachFiles(ctx, s3pc.taskdata, files)
if err != nil {
- return errors.Wrap(err, "Attach files failed")
+ return errors.Wrap(err, "attaching files")
}
return nil
@@ -525,24 +556,19 @@ func (s3pc *s3put) isPublic() bool {
}
func (s3pc *s3put) remoteFileExists(remoteName string) (bool, error) {
- requestParams := thirdparty.RequestParams{
+ requestParams := pail.PreSignRequestParams{
Bucket: s3pc.Bucket,
FileKey: remoteName,
AwsKey: s3pc.AwsKey,
AwsSecret: s3pc.AwsSecret,
Region: s3pc.Region,
}
- _, err := thirdparty.GetHeadObject(requestParams)
+ _, err := pail.GetHeadObject(requestParams)
if err != nil {
- if aerr, ok := err.(awserr.Error); ok {
- switch aerr.Code() {
- case notFoundError:
- return false, nil
- default:
- return false, errors.Wrapf(err, "error getting head object for: %s", remoteName)
- }
+ if aerr, ok := err.(awserr.Error); ok && aerr.Code() == notFoundError {
+ return false, nil
} else {
- return false, errors.Wrapf(err, "error reading error while getting head object '%s'", remoteName)
+ return false, errors.Wrapf(err, "getting head object for remote file '%s'", remoteName)
}
}
return true, nil
diff --git a/agent/command/s3_put_test.go b/agent/command/s3_put_test.go
index 7e1aa062e09..150c23277bb 100644
--- a/agent/command/s3_put_test.go
+++ b/agent/command/s3_put_test.go
@@ -2,7 +2,6 @@ package command
import (
"context"
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -286,7 +285,7 @@ func TestExpandS3PutParams(t *testing.T) {
cmd = &s3put{}
for _, v := range []string{"", "false", "False", "0", "F", "f", "${foo|false}", "${foo|}", "${foo}"} {
- cmd.skipMissing = true
+ cmd.SkipExisting = "true"
cmd.Optional = v
So(cmd.expandParams(conf), ShouldBeNil)
So(cmd.skipMissing, ShouldBeFalse)
@@ -364,13 +363,14 @@ func TestS3LocalFilesIncludeFilterPrefix(t *testing.T) {
defer cancel()
var err error
- dir, err := ioutil.TempDir("", "s3put")
- require.NoError(t, err)
- _, err = os.Create(filepath.Join(dir, "foo"))
+ dir := t.TempDir()
+ f, err := os.Create(filepath.Join(dir, "foo"))
require.NoError(t, err)
+ require.NoError(t, f.Close())
require.NoError(t, os.Mkdir(filepath.Join(dir, "subDir"), 0755))
- _, err = os.Create(filepath.Join(dir, "subDir", "bar"))
+ f, err = os.Create(filepath.Join(dir, "subDir", "bar"))
require.NoError(t, err)
+ require.NoError(t, f.Close())
var localFilesIncludeFilterPrefix string
if prefix == "emptyPrefix" {
@@ -389,8 +389,11 @@ func TestS3LocalFilesIncludeFilterPrefix(t *testing.T) {
Permissions: s3.BucketCannedACLPublicRead,
RemoteFile: "remote",
}
- opts := pail.LocalOptions{}
- s.bucket, err = pail.NewLocalTemporaryBucket(opts)
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "destination"), 0755))
+ opts := pail.LocalOptions{
+ Path: filepath.Join(dir, "destination"),
+ }
+ s.bucket, err = pail.NewLocalBucket(opts)
require.NoError(t, err)
comm := client.NewMock("http://localhost.com")
conf := &internal.TaskConfig{
@@ -425,3 +428,144 @@ func TestS3LocalFilesIncludeFilterPrefix(t *testing.T) {
})
}
}
+
+func TestFileUploadNaming(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ dir := t.TempDir()
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "subDir"), 0755))
+ f, err := os.Create(filepath.Join(dir, "subDir", "bar"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+
+ s := s3put{
+ AwsKey: "key",
+ AwsSecret: "secret",
+ Bucket: "bucket",
+ BuildVariants: []string{},
+ ContentType: "content-type",
+ LocalFilesIncludeFilter: []string{"*"},
+ Permissions: s3.BucketCannedACLPublicRead,
+ LocalFilesIncludeFilterPrefix: "",
+ RemoteFile: "remote",
+ }
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "destination"), 0755))
+ opts := pail.LocalOptions{
+ Path: filepath.Join(dir, "destination"),
+ }
+ s.bucket, err = pail.NewLocalBucket(opts)
+ require.NoError(t, err)
+ comm := client.NewMock("http://localhost.com")
+ conf := &internal.TaskConfig{
+ Expansions: &util.Expansions{},
+ Task: &task.Task{Id: "mock_id", Secret: "mock_secret"},
+ Project: &model.Project{},
+ WorkDir: dir,
+ BuildVariant: &model.BuildVariant{},
+ }
+ logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ require.NoError(t, err)
+
+ require.NoError(t, s.Execute(ctx, comm, logger, conf))
+ attachedFiles := comm.AttachedFiles
+ expected := map[string]bool{
+ "remotebar": false,
+ "remoteremotebar": false,
+ }
+
+ for _, files := range attachedFiles {
+ for _, f := range files {
+ link := f.Link
+
+ expected[filepath.Base(link)] = true
+ }
+ }
+
+ require.True(t, expected["remotebar"])
+ require.False(t, expected["remoteremotebar"])
+}
+
+func TestPreservePath(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ dir := t.TempDir()
+
+ // Create the directories
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "myWebsite"), 0755))
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "myWebsite", "assets"), 0755))
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "myWebsite", "assets", "images"), 0755))
+
+ // Create the files in in the assets directory
+ f, err := os.Create(filepath.Join(dir, "foo"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+ f, err = os.Create(filepath.Join(dir, "myWebsite", "assets", "asset1"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+ f, err = os.Create(filepath.Join(dir, "myWebsite", "assets", "asset2"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+ f, err = os.Create(filepath.Join(dir, "myWebsite", "assets", "asset3"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+
+ // Create the files in the assets/images directory
+ f, err = os.Create(filepath.Join(dir, "myWebsite", "assets", "images", "image1"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+ f, err = os.Create(filepath.Join(dir, "myWebsite", "assets", "images", "image2"))
+ require.NoError(t, err)
+ require.NoError(t, f.Close())
+
+ s := s3put{
+ AwsKey: "key",
+ AwsSecret: "secret",
+ Bucket: "bucket",
+ BuildVariants: []string{},
+ ContentType: "content-type",
+ LocalFilesIncludeFilter: []string{"*"},
+ Permissions: s3.BucketCannedACLPublicRead,
+ RemoteFile: "remote",
+ PreservePath: "true",
+ }
+ require.NoError(t, os.Mkdir(filepath.Join(dir, "destination"), 0755))
+ opts := pail.LocalOptions{
+ Path: filepath.Join(dir, "destination"),
+ }
+ s.bucket, err = pail.NewLocalBucket(opts)
+ require.NoError(t, err)
+ comm := client.NewMock("http://localhost.com")
+ conf := &internal.TaskConfig{
+ Expansions: &util.Expansions{},
+ Task: &task.Task{Id: "mock_id", Secret: "mock_secret"},
+ Project: &model.Project{},
+ WorkDir: dir,
+ BuildVariant: &model.BuildVariant{},
+ }
+ logger, err := comm.GetLoggerProducer(ctx, client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}, nil)
+ require.NoError(t, err)
+
+ require.NoError(t, s.Execute(ctx, comm, logger, conf))
+ it, err := s.bucket.List(ctx, "")
+ require.NoError(t, err)
+
+ expected := map[string]bool{
+ filepath.Join("remote", "foo"): false,
+ filepath.Join("remote", "myWebsite", "assets", "asset1"): false,
+ filepath.Join("remote", "myWebsite", "assets", "asset2"): false,
+ filepath.Join("remote", "myWebsite", "assets", "asset3"): false,
+ filepath.Join("remote", "myWebsite", "assets", "images", "image1"): false,
+ filepath.Join("remote", "myWebsite", "assets", "images", "image2"): false,
+ }
+
+ for it.Next(ctx) {
+ expected[it.Item().Name()] = true
+ }
+
+ for item, exists := range expected {
+ require.True(t, exists, item)
+ }
+
+}
diff --git a/agent/command/scripting.go b/agent/command/scripting.go
deleted file mode 100644
index f1acec81bf1..00000000000
--- a/agent/command/scripting.go
+++ /dev/null
@@ -1,557 +0,0 @@
-package command
-
-import (
- "bytes"
- "context"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "time"
-
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/agent/internal"
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/evergreen-ci/utility"
- "github.com/google/shlex"
- "github.com/mitchellh/mapstructure"
- "github.com/mongodb/grip"
- "github.com/mongodb/grip/level"
- "github.com/mongodb/grip/message"
- "github.com/mongodb/grip/send"
- "github.com/mongodb/jasper/options"
- "github.com/mongodb/jasper/scripting"
- "github.com/pkg/errors"
-)
-
-type scriptingExec struct {
- // Harness declares the implementation of the scripting
- // harness to use to execute this code.
- Harness string `mapstructure:"harness"`
-
- ////////////////////////////////
- //
- // Execution Options
-
- // Specify the command to run as a string that Evergreen will
- // split into an argument array. This, as with subprocess.exec,
- // is split using shell parsing rules.
- Command string `mapstructure:"command"`
- // Specify the command to run as a list of arguments.
- Args []string `mapstructure:"args"`
-
- // Specify the content of a script to execute in the
- // environment. This probably only makes sense for roswell,
- // but is here for completeness, and won't be documented.
- Script string `mapstructure:"script"`
-
- // TestDir specifies the directory containing the tests that should be run.
- // This should be a subdirectory of the working directory.
- TestDir string `mapstructure:"test_dir"`
- // TestOptions specifies additional options that determine how tests should
- // be executed.
- TestOptions *scriptingTestOptions `mapstructure:"test_options"`
-
- // Specify a list of directories to add to the PATH of the
- // environment.
- Path []string `mapstructure:"add_to_path"`
- // Specific environment variables to be added to the
- // environment of the scripting commands executed
- Env map[string]string `mapstructure:"env"`
-
- ////////////////////////////////
- //
- // Harness Options
-
- // CacheDurationSeconds describes the total number of seconds
- // that an environment should be stored for.
- CacheDurationSeconds int `mapstructure:"cache_duration_secs"`
- // CleanupHarness forces the command to cleanup the harness
- // after the command returns. When this is false, the harness
- // will persist between commands. These harnesses are within
- // the working directory and so cleaned up between tasks or
- // task groups regardless.
- CleanupHarness bool `mapstructure:"cleanup_harness"`
- // LockFile describes the path to the dependency file
- // (e.g. requirements.txt if it exists) that lists your
- // dependencies. Not all environments support Lockfiles.
- LockFile string `mapstructure:"lock_file"`
- // Packages are a list of dependencies that will be installed
- // in your environment.
- Packages []string `mapstructure:"packages"`
- // HarnessPath should be the path to your local environment
- // (e.g. GOPATH or VirtualEnv.) Specify a subpath of the
- // working directory.
- HarnessPath string `mapstructure:"harness_path"`
- // HostPath is the path to the hosting interpreter or binary, where
- // appropriate. This should be the path to the interpreter for python or
- // GOROOT for golang.
- HostPath string `mapstructure:"host_path"`
-
- ////////////////////////////////
- //
- // Execution Options
-
- // Add defined expansions to the environment of the process
- // that's launched.
- AddExpansionsToEnv bool `mapstructure:"add_expansions_to_env"`
-
- // IncludeExpansionsInEnv allows users to specify a number of
- // expansions that will be included in the environment, if
- // they are defined. It is not an error to specify expansions
- // that are not defined in include_expansions_in_env.
- IncludeExpansionsInEnv []string `mapstructure:"include_expansions_in_env"`
-
- // Silent, if set to true, prevents shell code/output from being
- // logged to the agent's task logs. This can be used to avoid
- // exposing sensitive expansion parameters and keys.
- Silent bool `mapstructure:"silent"`
-
- // SystemLog if set will write the shell command's output to the system logs, instead of the
- // task logs. This can be used to collect diagnostic data in the background of a running task.
- SystemLog bool `mapstructure:"system_log"`
-
- // Report indicates whether or not the test results should be reported (if
- // supported).
- Report bool `mapstructure:"report"`
-
- // WorkingDir is the working directory to start the shell in.
- WorkingDir string `mapstructure:"working_dir"`
-
- // IgnoreStandardOutput and IgnoreStandardError allow users to
- // elect to ignore either standard error and/or standard output.
- IgnoreStandardOutput bool `mapstructure:"ignore_standard_out"`
- IgnoreStandardError bool `mapstructure:"ignore_standard_error"`
-
- // RedirectStandardErrorToOutput allows you to capture
- // standard error in the same stream as standard output. This
- // improves the synchronization of these streams.
- RedirectStandardErrorToOutput bool `mapstructure:"redirect_standard_error_to_output"`
-
- // ContinueOnError determines whether or not a failed return code
- // should cause the task to be marked as failed. Setting this to true
- // allows following commands to execute even if this shell command fails.
- ContinueOnError bool `mapstructure:"continue_on_err"`
-
- base
-}
-
-type scriptingTestOptions struct {
- Name string `bson:"name" json:"name" yaml:"name"`
- Args []string `bson:"args" json:"args" yaml:"args"`
- Pattern string `bson:"pattern" json:"pattern" yaml:"pattern"`
- TimeoutSecs int `bson:"timeout_secs" json:"timeout_secs" yaml:"timeout_secs"`
- Count int `bson:"count" json:"count" yaml:"count"`
-}
-
-func (opts *scriptingTestOptions) validate() error {
- if opts.TimeoutSecs < 0 {
- return errors.New("cannot specify negative timeout seconds")
- }
- if opts.Count < 0 {
- return errors.New("cannot specify negative run count")
- }
- return nil
-}
-
-func subprocessScriptingFactory() Command {
- return &scriptingExec{}
-}
-
-func validTestingHarnesses() []string {
- return []string{
- "go", "golang",
- "lisp", "roswell",
- "python", "python3", "python2",
- }
-}
-
-func (c *scriptingExec) Name() string { return "subprocess.scripting" }
-func (c *scriptingExec) ParseParams(params map[string]interface{}) error {
- err := mapstructure.Decode(params, c)
- if err != nil {
- return errors.Wrapf(err, "error decoding %s params", c.Name())
- }
-
- if !utility.StringSliceContains(validTestingHarnesses(), c.Harness) {
- return errors.Errorf("invalid testing harness '%s': valid options are %s", c.Harness, strings.Join(validTestingHarnesses(), ", "))
- }
-
- if c.Command != "" {
- if c.Script != "" || len(c.Args) > 0 {
- return errors.New("must specify command as either arguments or a command string but not both")
- }
-
- c.Args, err = shlex.Split(c.Command)
- if err != nil {
- return errors.Wrapf(err, "problem parsing %s command", c.Name())
- }
- }
-
- if c.TestDir != "" && (c.Script != "" || len(c.Args) != 0) {
- return errors.New("cannot specify both test directory and a script or command to run")
- }
- if c.Script == "" && len(c.Args) == 0 && c.TestDir == "" {
- return errors.New("must specify either a script, a command, or a test directory")
- }
- if c.Script != "" && len(c.Args) > 0 {
- return errors.New("cannot specify both a script and a command")
- }
- if c.Script != "" && c.TestDir != "" {
- return errors.New("cannot specify both a script and a test directory")
- }
- if len(c.Args) > 0 && c.TestDir != "" {
- return errors.New("cannot specify both a command and a test directory")
- }
- if c.TestOptions != nil {
- if err := c.TestOptions.validate(); err != nil {
- return errors.Wrap(err, "invalid test options")
- }
- }
-
- if c.CacheDurationSeconds < 1 {
- c.CacheDurationSeconds = 900
- }
-
- if c.Silent {
- c.IgnoreStandardError = true
- c.IgnoreStandardOutput = true
- }
-
- if c.IgnoreStandardOutput && c.Report {
- return errors.New("cannot ignore standard output and also parse test results")
- }
-
- if c.Report && c.Harness != "go" && c.Harness != "golang" {
- return errors.Errorf("reporting test results is not supported for harness '%s'", c.Harness)
- }
-
- if (c.Harness == "go" || c.Harness == "golang") && c.HostPath == "" && c.Env["GOROOT"] == "" {
- return errors.Errorf("path to GOROOT is required for golang")
- }
-
- if c.IgnoreStandardOutput && c.RedirectStandardErrorToOutput {
- return errors.New("cannot ignore standard out, and redirect standard error to it")
- }
-
- if c.Env == nil {
- c.Env = make(map[string]string)
- }
- return nil
-}
-
-func (c *scriptingExec) doExpansions(exp *util.Expansions) error {
- var err error
- catcher := grip.NewBasicCatcher()
-
- c.Harness, err = exp.ExpandString(c.Harness)
- catcher.Add(err)
-
- c.Script, err = exp.ExpandString(c.Script)
- catcher.Add(err)
-
- c.WorkingDir, err = exp.ExpandString(c.WorkingDir)
- catcher.Add(err)
-
- c.LockFile, err = exp.ExpandString(c.LockFile)
- catcher.Add(err)
-
- c.HarnessPath, err = exp.ExpandString(c.HarnessPath)
- catcher.Add(err)
-
- c.HostPath, err = exp.ExpandString(c.HostPath)
- catcher.Add(err)
-
- for idx := range c.Packages {
- c.Packages[idx], err = exp.ExpandString(c.Packages[idx])
- catcher.Add(err)
- }
-
- for idx := range c.Args {
- c.Args[idx], err = exp.ExpandString(c.Args[idx])
- catcher.Add(err)
- }
-
- for k, v := range c.Env {
- c.Env[k], err = exp.ExpandString(v)
- catcher.Add(err)
- }
-
- if len(c.Path) > 0 {
- path := make([]string, len(c.Path), len(c.Path)+1)
- for idx := range c.Path {
- path[idx], err = exp.ExpandString(c.Path[idx])
- catcher.Add(err)
- }
- path = append(path, os.Getenv("PATH"))
-
- c.Env["PATH"] = strings.Join(path, string(filepath.ListSeparator))
- }
-
- expansions := exp.Map()
- if c.AddExpansionsToEnv {
- for k, v := range expansions {
- if k == evergreen.GlobalGitHubTokenExpansion {
- //users should not be able to use the global github token expansion
- //as it can result in the breaching of Evergreen's GitHub API limit
- continue
- }
- c.Env[k] = v
- }
- }
-
- for _, ei := range c.IncludeExpansionsInEnv {
- if val, ok := expansions[ei]; ok && ei != evergreen.GlobalGitHubTokenExpansion {
- c.Env[ei] = val
- }
- }
-
- return errors.Wrap(catcher.Resolve(), "problem expanding strings")
-}
-
-func (c *scriptingExec) getOutputWithWriter(w io.Writer, logger client.LoggerProducer) (options.Output, []grip.CheckFunction) {
- output := options.Output{
- SuppressError: c.IgnoreStandardError,
- SuppressOutput: c.IgnoreStandardOutput,
- SendErrorToOutput: c.RedirectStandardErrorToOutput,
- }
-
- ww := send.WrapWriter(w)
-
- var logSender send.Sender
- var closers []grip.CheckFunction
- if c.SystemLog {
- logSender = logger.System().GetSender()
- } else {
- logSender = logger.Task().GetSender()
- }
-
- multi := send.NewConfiguredMultiSender(logSender, ww)
-
- if !c.IgnoreStandardOutput {
- ws := send.MakeWriterSender(multi, level.Info)
- closers = append(closers, ws.Close)
- output.Output = ws
- }
-
- if !c.IgnoreStandardError {
- ws := send.MakeWriterSender(multi, level.Error)
- closers = append(closers, ws.Close)
- output.Error = ws
- }
-
- return output, closers
-}
-
-func (c *scriptingExec) getOutput(logger client.LoggerProducer) (options.Output, []grip.CheckFunction) {
- closers := []grip.CheckFunction{}
-
- output := options.Output{
- SuppressError: c.IgnoreStandardError,
- SuppressOutput: c.IgnoreStandardOutput,
- SendErrorToOutput: c.RedirectStandardErrorToOutput,
- }
-
- if !c.IgnoreStandardOutput {
- var owc io.WriteCloser
- if c.SystemLog {
- owc = send.MakeWriterSender(logger.System().GetSender(), level.Info)
- } else {
- owc = send.MakeWriterSender(logger.Task().GetSender(), level.Info)
- }
- closers = append(closers, owc.Close)
- output.Output = owc
- }
-
- if !c.IgnoreStandardError {
- var owc io.WriteCloser
- if c.SystemLog {
- owc = send.MakeWriterSender(logger.System().GetSender(), level.Error)
- } else {
- owc = send.MakeWriterSender(logger.Task().GetSender(), level.Error)
- }
- closers = append(closers, owc.Close)
- output.Error = owc
- }
-
- return output, closers
-}
-
-func (c *scriptingExec) getHarnessConfig(output options.Output) (options.ScriptingHarness, error) {
- switch c.Harness {
- case "python3", "python":
- return &options.ScriptingPython{
- Output: output,
- Environment: c.Env,
- CachedDuration: time.Duration(c.CacheDurationSeconds) * time.Second,
- Packages: c.Packages,
- VirtualEnvPath: filepath.Join(c.WorkingDir, c.HarnessPath),
- InterpreterBinary: c.HostPath,
- }, nil
- case "python2":
- return &options.ScriptingPython{
- Output: output,
- LegacyPython: true,
- Environment: c.Env,
- CachedDuration: time.Duration(c.CacheDurationSeconds) * time.Second,
- Packages: c.Packages,
- VirtualEnvPath: filepath.Join(c.WorkingDir, c.HarnessPath),
- InterpreterBinary: c.HostPath,
- }, nil
- case "roswell", "lisp":
- return &options.ScriptingRoswell{
- Output: output,
- Environment: c.Env,
- CachedDuration: time.Duration(c.CacheDurationSeconds) * time.Second,
- Systems: c.Packages,
- Path: filepath.Join(c.WorkingDir, c.HarnessPath),
- Lisp: c.HostPath,
- }, nil
- case "golang", "go":
- goroot := c.Env["GOROOT"]
- if goroot == "" {
- goroot = c.HostPath
- }
- gopath := c.Env["GOPATH"]
- if gopath == "" {
- gopath = filepath.Join(c.WorkingDir, c.HarnessPath)
- }
- return &options.ScriptingGolang{
- Output: output,
- Environment: c.Env,
- Packages: c.Packages,
- CachedDuration: time.Duration(c.CacheDurationSeconds) * time.Second,
- Gopath: gopath,
- Directory: c.WorkingDir,
- Goroot: goroot,
- }, nil
- default:
- return nil, errors.Errorf("there is no support for harness: '%s'", c.Harness)
- }
-
-}
-
-func (c *scriptingExec) Execute(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
- var err error
-
- if err = c.doExpansions(conf.Expansions); err != nil {
- logger.Execution().Error("problem expanding command values")
- return errors.WithStack(err)
- }
-
- logger.Execution().WarningWhen(filepath.IsAbs(c.WorkingDir) && !strings.HasPrefix(c.WorkingDir, conf.WorkDir),
- fmt.Sprintf("the working directory is an absolute path [%s], which isn't supported except when prefixed by '%s'",
- c.WorkingDir, conf.WorkDir))
-
- if c.WorkingDir == "" {
- c.WorkingDir, err = conf.GetWorkingDirectory(c.WorkingDir)
- if err != nil {
- logger.Execution().Warning(err.Error())
- return errors.WithStack(err)
- }
- }
-
- taskTmpDir, err := conf.GetWorkingDirectory("tmp")
- if err != nil {
- logger.Execution().Notice(err.Error())
- }
-
- addTempDirs(c.Env, taskTmpDir)
-
- var output options.Output
- var closers []grip.CheckFunction
- report := &bytes.Buffer{}
- if c.Report {
- output, closers = c.getOutputWithWriter(report, logger)
- } else {
- output, closers = c.getOutput(logger)
- }
- opts, err := c.getHarnessConfig(output)
- if err != nil {
- return errors.WithStack(err)
- }
-
- harness, err := scripting.NewHarness(c.JasperManager(), opts)
- if err != nil {
- return errors.WithStack(err)
- }
-
- catcher := grip.NewBasicCatcher()
- if len(c.Args) > 0 {
- catcher.Add(harness.Run(ctx, c.Args))
- }
- if c.Script != "" {
- catcher.Add(harness.RunScript(ctx, c.Script))
- }
- if c.TestDir != "" {
- var opts scripting.TestOptions
- if c.TestOptions != nil {
- opts = scripting.TestOptions{
- Name: c.TestOptions.Name,
- Args: c.TestOptions.Args,
- Pattern: c.TestOptions.Pattern,
- Timeout: time.Duration(c.TestOptions.TimeoutSecs) * time.Second,
- Count: c.TestOptions.Count,
- }
- }
- results, err := harness.Test(ctx, filepath.Join(c.WorkingDir, c.TestDir), opts)
- catcher.Add(err)
- for _, res := range results {
- logger.Task().Info(message.Fields{
- "name": res.Name,
- "outcome": res.Outcome,
- "duration": res.Duration,
- })
- }
- }
-
- if c.Report {
- if err := c.reportTestResults(ctx, comm, logger, conf, report); err != nil {
- return errors.Wrap(err, "reporting test results")
- }
- }
-
- catcher.CheckExtend(closers)
- if c.CleanupHarness {
- catcher.Add(harness.Cleanup(ctx))
- }
-
- if c.ContinueOnError {
- logger.Execution().Notice(message.WrapError(catcher.Resolve(), message.Fields{
- "task": conf.Task.Id,
- "harness": c.Harness,
- "silent": c.Silent,
- "continue": c.ContinueOnError,
- }))
- return nil
- }
-
- return catcher.Resolve()
-}
-
-func (c *scriptingExec) reportTestResults(ctx context.Context, comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig, report io.Reader) error {
- switch c.Harness {
- case "go", "golang":
- // A suite name is required in the REST request or else it hangs, but it
- // seems like the particular suite name is unimportant.
- log, result, err := parseTestOutput(ctx, conf, report, "output.test")
- if err != nil {
- return errors.Wrap(err, "parsing test output")
- }
-
- logs := []model.TestLog{log}
- results := [][]task.TestResult{result}
-
- if err := sendTestLogsAndResults(ctx, comm, logger, conf, logs, results); err != nil {
- return errors.Wrap(err, "sending test logs and test results")
- }
-
- return nil
- default:
- return errors.Errorf("cannot report results for harness '%s'", c.Harness)
- }
-}
diff --git a/agent/command/scripting_test.go b/agent/command/scripting_test.go
deleted file mode 100644
index 86ecf7d8f46..00000000000
--- a/agent/command/scripting_test.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package command
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
-)
-
-func TestScripting(t *testing.T) {
- t.Run("Constructor", func(t *testing.T) {
- cmd, ok := subprocessScriptingFactory().(*scriptingExec)
- assert.True(t, ok)
- assert.Equal(t, "subprocess.scripting", cmd.Name())
- })
- t.Run("Parse", func(t *testing.T) {
- t.Run("ErrorsWithEmpty", func(t *testing.T) {
- cmd := &scriptingExec{}
- err := cmd.ParseParams(map[string]interface{}{})
- assert.Error(t, err)
- })
- t.Run("ErrorMismatchedTypes", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{"args": true})
- require.Error(t, err)
- assert.Contains(t, err.Error(), "error decoding")
- })
- t.Run("NoArgsErrors", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(nil)
- require.Error(t, err)
- assert.Contains(t, err.Error(), "must specify")
- })
- t.Run("BothArgsAndScript", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{"args": []string{"ls"}, "script": "ls"})
- assert.Error(t, err)
- })
- t.Run("ErrorsForArgsAndTestDir", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{
- "args": []string{"arg"},
- "test_dir": "dir",
- })
- assert.Error(t, err)
- })
- t.Run("ErrorsForCommandAndTestDir", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{
- "command": "script",
- "test_dir": "dir",
- })
- assert.Error(t, err)
-
- })
- t.Run("ErrorsForScriptAndTestDir", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{
- "script": "script",
- "test_dir": "dir",
- })
- assert.Error(t, err)
- })
- t.Run("ErrorsForTestOptionsWithoutTestDir", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{
- "test_options": map[string]interface{}{
- "name": "name",
- },
- })
- assert.Error(t, err)
- })
- t.Run("SplitCommandWithArgs", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{"args": []string{"ls"}, "command": "ls"})
- require.Error(t, err)
- assert.Contains(t, err.Error(), "as either arguments or a command")
- })
- t.Run("SplitCommand", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{"command": "ls"})
- require.NoError(t, err)
- assert.Equal(t, "ls", cmd.Args[0])
- assert.NotNil(t, cmd.Env)
- })
- t.Run("IgnoreAndRedirect", func(t *testing.T) {
- cmd := &scriptingExec{Harness: "lisp"}
- err := cmd.ParseParams(map[string]interface{}{"command": "ls", "ignore_standard_out": true, "redirect_standard_error_to_output": true})
- require.Error(t, err)
- assert.Contains(t, err.Error(), "cannot ignore standard out, and redirect")
- })
- })
-
-}
diff --git a/agent/command/shell.go b/agent/command/shell.go
index dfedf738205..d7bae7f5c15 100644
--- a/agent/command/shell.go
+++ b/agent/command/shell.go
@@ -85,24 +85,25 @@ func (c *shellExec) ParseParams(params map[string]interface{}) error {
if params == nil {
return errors.New("params cannot be nil")
}
- // Existing projects rely on having a missing script breaking the validation, so we will not error on that case
err := mapstructure.Decode(params, c)
if err != nil {
- return errors.Wrapf(err, "error decoding %v params", c.Name())
+ return errors.Wrap(err, "decoding mapstructure params")
}
if c.Silent {
c.IgnoreStandardError = true
c.IgnoreStandardOutput = true
}
-
+ if c.Script == "" {
+ return errors.New("must specify a script")
+ }
if c.Shell == "" {
c.Shell = "sh"
}
if c.IgnoreStandardOutput && c.RedirectStandardErrorToOutput {
- return errors.New("cannot ignore standard out, and redirect standard error to it")
+ return errors.New("cannot ignore standard output and also redirect standard error to it")
}
if c.Env == nil {
@@ -118,23 +119,21 @@ func (c *shellExec) Execute(ctx context.Context, _ client.Communicator, logger c
var err error
if err = c.doExpansions(conf.Expansions); err != nil {
- logger.Execution().Warning(err.Error())
return errors.WithStack(err)
}
logger.Execution().WarningWhen(filepath.IsAbs(c.WorkingDir) && !strings.HasPrefix(c.WorkingDir, conf.WorkDir),
- fmt.Sprintf("the working directory is an absolute path [%s], which isn't supported except when prefixed by '%s'",
+ fmt.Sprintf("The working directory is an absolute path [%s], which isn't supported except when prefixed by '%s'.",
c.WorkingDir, conf.WorkDir))
c.WorkingDir, err = conf.GetWorkingDirectory(c.WorkingDir)
if err != nil {
- logger.Execution().Warning(err.Error())
- return errors.WithStack(err)
+ return errors.Wrap(err, "getting working directory")
}
taskTmpDir, err := conf.GetWorkingDirectory("tmp")
if err != nil {
- logger.Execution().Notice(err.Error())
+ logger.Execution().Notice(errors.Wrap(err, "getting task temporary directory"))
}
var exp util.Expansions
@@ -186,7 +185,7 @@ func (c *shellExec) Execute(ctx context.Context, _ client.Communicator, logger c
if cancel != nil {
grip.Warning(message.WrapError(proc.RegisterTrigger(lctx, func(info jasper.ProcessInfo) {
cancel()
- }), "problem registering cancellation for process"))
+ }), "registering cancellation for process"))
}
pid := proc.Info(ctx).PID
@@ -194,9 +193,9 @@ func (c *shellExec) Execute(ctx context.Context, _ client.Communicator, logger c
agentutil.TrackProcess(conf.Task.Id, pid, logger.System())
if c.Background {
- logger.Execution().Debugf("running command in the background [pid=%d]", pid)
+ logger.Execution().Debugf("Running process with PID %d in the background.", pid)
} else {
- logger.Execution().Infof("started process with pid '%d'", pid)
+ logger.Execution().Infof("Running process with PID %d.", pid)
}
return proc, nil
@@ -219,10 +218,10 @@ func (c *shellExec) Execute(ctx context.Context, _ client.Communicator, logger c
}
if c.Silent {
- logger.Execution().Infof("Executing script with %s (source hidden)...",
+ logger.Execution().Infof("Executing script with shell '%s' (source hidden)...",
c.Shell)
} else {
- logger.Execution().Infof("Executing script with %s: %v",
+ logger.Execution().Infof("Executing script with shell '%s':\n%s",
c.Shell, c.Script)
}
@@ -233,15 +232,15 @@ func (c *shellExec) Execute(ctx context.Context, _ client.Communicator, logger c
}
}
err = errors.Wrapf(err, "shell script encountered problem")
- if ctx.Err() != nil {
- logger.System().Debug("dumping running processes before canceling work")
+ if ctxErr := ctx.Err(); ctxErr != nil {
+ logger.System().Debugf("Canceled command '%s', dumping running processes.", c.Name())
logger.System().Debug(message.CollectAllProcesses())
logger.Execution().Notice(err)
- return errors.New("shell command interrupted")
+ return errors.Wrapf(ctxErr, "canceled while running command '%s'", c.Name())
}
- if c.ContinueOnError {
- logger.Execution().Notice(err)
+ if c.ContinueOnError && err != nil {
+ logger.Execution().Noticef("Script errored, but continue on error is set - continuing task execution. Error: %s.", err)
return nil
}
@@ -253,17 +252,17 @@ func (c *shellExec) doExpansions(exp *util.Expansions) error {
var err error
c.WorkingDir, err = exp.ExpandString(c.WorkingDir)
- catcher.Add(err)
+ catcher.Wrap(err, "expanding working directory")
c.Script, err = exp.ExpandString(c.Script)
- catcher.Add(err)
+ catcher.Wrap(err, "expanding script")
c.Shell, err = exp.ExpandString(c.Shell)
- catcher.Add(err)
+ catcher.Wrap(err, "expanding shell")
for k, v := range c.Env {
c.Env[k], err = exp.ExpandString(v)
- catcher.Add(err)
+ catcher.Wrapf(err, "expanding environment variable '%s'", k)
}
return catcher.Resolve()
diff --git a/agent/command/shell_test.go b/agent/command/shell_test.go
index b0fc99a4885..03d2d7fc386 100644
--- a/agent/command/shell_test.go
+++ b/agent/command/shell_test.go
@@ -15,7 +15,9 @@ import (
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/evergreen/util"
+ "github.com/evergreen-ci/utility"
"github.com/mongodb/jasper"
+ "github.com/pkg/errors"
"github.com/stretchr/testify/suite"
)
@@ -72,6 +74,7 @@ func (s *shellExecuteCommandSuite) TearDownTest() {
func (s *shellExecuteCommandSuite) TestWorksWithEmptyShell() {
cmd := &shellExec{
WorkingDir: testutil.GetDirectoryOfFile(),
+ Script: "exit 0",
}
cmd.SetJasperManager(s.jasper)
s.Empty(cmd.Shell)
@@ -81,7 +84,9 @@ func (s *shellExecuteCommandSuite) TestWorksWithEmptyShell() {
}
func (s *shellExecuteCommandSuite) TestSilentAndRedirectToStdOutError() {
- cmd := &shellExec{}
+ cmd := &shellExec{
+ Script: "exit 0",
+ }
s.NoError(cmd.ParseParams(map[string]interface{}{}))
s.False(cmd.IgnoreStandardError)
@@ -101,29 +106,29 @@ func (s *shellExecuteCommandSuite) TestTerribleQuotingIsHandledProperly() {
`echo "'"; exit 0`,
`echo \'; exit 0`,
`process_kill_list="(^cl\.exe$|bsondump|java|lein|lldb|mongo|python|_test$|_test\.exe$)"
- process_exclude_list="(main|tuned|evergreen|go|godoc|gocode|make)"
-
- if [ "Windows_NT" = "$OS" ]; then
- processes=$(tasklist /fo:csv | awk -F'","' '{x=$1; gsub("\"","",x); print $2, x}' | grep -iE "$process_kill_list" | grep -ivE "$process_exclude_list")
- kill_process () { pid=$(echo $1 | cut -f1 -d ' '); echo "Killing process $1"; taskkill /pid "$pid" /f; }
- else
- pgrep -f --list-full ".*" 2>&1 | grep -qE "(illegal|invalid|unrecognized) option"
- if [ $? -ne 0 ]; then
- pgrep_list=$(pgrep -f --list-full "$process_kill_list")
- else
- pgrep_list=$(pgrep -f -l "$process_kill_list")
- fi
-
- processes=$(echo "$pgrep_list" | grep -ivE "$process_exclude_list" | sed -e '/^ *[0-9]/!d; s/^ *//; s/[[:cntrl:]]//g;')
- kill_process () { pid=$(echo $1 | cut -f1 -d ' '); echo "Killing process $1"; kill -9 $pid; }
- fi
- IFS=$(printf "\n\r")
- for process in $processes
- do
- kill_process "$process"
- done
-
- exit 0
+ process_exclude_list="(main|tuned|evergreen|go|godoc|gocode|make)"
+
+ if [ "Windows_NT" = "$OS" ]; then
+ processes=$(tasklist /fo:csv | awk -F'","' '{x=$1; gsub("\"","",x); print $2, x}' | grep -iE "$process_kill_list" | grep -ivE "$process_exclude_list")
+ kill_process () { pid=$(echo $1 | cut -f1 -d ' '); echo "Killing process $1"; taskkill /pid "$pid" /f; }
+ else
+ pgrep -f --list-full ".*" 2>&1 | grep -qE "(illegal|invalid|unrecognized) option"
+ if [ $? -ne 0 ]; then
+ pgrep_list=$(pgrep -f --list-full "$process_kill_list")
+ else
+ pgrep_list=$(pgrep -f -l "$process_kill_list")
+ fi
+
+ processes=$(echo "$pgrep_list" | grep -ivE "$process_exclude_list" | sed -e '/^ *[0-9]/!d; s/^ *//; s/[[:cntrl:]]//g;')
+ kill_process () { pid=$(echo $1 | cut -f1 -d ' '); echo "Killing process $1"; kill -9 $pid; }
+ fi
+ IFS=$(printf "\n\r")
+ for process in $processes
+ do
+ kill_process "$process"
+ done
+
+ exit 0
`,
} {
cmd := &shellExec{
@@ -136,7 +141,7 @@ func (s *shellExecuteCommandSuite) TestTerribleQuotingIsHandledProperly() {
}
}
-func (s *shellExecuteCommandSuite) TestShellIsntChangedDuringExecution() {
+func (s *shellExecuteCommandSuite) TestShellIsNotChangedDuringExecution() {
for _, sh := range s.shells {
cmd := &shellExec{Shell: sh, WorkingDir: testutil.GetDirectoryOfFile()}
cmd.SetJasperManager(s.jasper)
@@ -176,8 +181,7 @@ func (s *shellExecuteCommandSuite) TestCancellingContextShouldCancelCommand() {
err := cmd.Execute(ctx, s.comm, s.logger, s.conf)
s.Require().NotNil(err)
- s.Contains(err.Error(), "shell command interrupted")
- s.NotContains(err.Error(), "error while stopping process")
+ s.True(utility.IsContextError(errors.Cause(err)))
}
func (s *shellExecuteCommandSuite) TestEnvIsSetAndDefaulted() {
@@ -240,5 +244,4 @@ func (s *shellExecuteCommandSuite) TestFailingShellCommandErrors() {
err := cmd.Execute(s.ctx, s.comm, s.logger, s.conf)
s.Require().NotNil(err)
s.Contains(err.Error(), "shell script encountered problem: exit code 1")
- s.NotContains(err.Error(), "error waiting on process")
}
diff --git a/agent/command/taskdata_get.go b/agent/command/taskdata_get.go
deleted file mode 100644
index ef0260e9f84..00000000000
--- a/agent/command/taskdata_get.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package command
-
-import (
- "context"
- "io/ioutil"
- "path/filepath"
-
- "github.com/evergreen-ci/evergreen/agent/internal"
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/mitchellh/mapstructure"
- "github.com/pkg/errors"
-)
-
-type taskDataGet struct {
- File string `mapstructure:"file" plugin:"expand"`
- DataName string `mapstructure:"name" plugin:"expand"`
- TaskName string `mapstructure:"task" plugin:"expand"`
- Variant string `mapstructure:"variant" plugin:"expand"`
- base
-}
-
-func taskDataGetFactory() Command { return &taskDataGet{} }
-func (c *taskDataGet) Name() string { return "json.get" }
-
-func (c *taskDataGet) ParseParams(params map[string]interface{}) error {
- if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%v' params", c.Name())
- }
- if c.File == "" {
- return errors.New("JSON 'get' command must not have blank 'file' parameter")
- }
- if c.DataName == "" {
- return errors.New("JSON 'get' command must not have a blank 'name' param")
- }
- if c.TaskName == "" {
- return errors.New("JSON 'get' command must not have a blank 'task' param")
- }
-
- return nil
-}
-
-func (c *taskDataGet) Execute(ctx context.Context,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
-
- err := errors.WithStack(util.ExpandValues(c, conf.Expansions))
- if err != nil {
- return err
- }
-
- if !filepath.IsAbs(c.File) {
- c.File = getJoinedWithWorkDir(conf, c.File)
- }
-
- if err = createEnclosingDirectoryIfNeeded(c.File); err != nil {
- return errors.Wrap(err, "unable to create directory for 'file' parameter")
- }
-
- td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
-
- data, err := comm.GetJSONData(ctx, td, c.TaskName, c.DataName, c.Variant)
- if err != nil {
- return errors.Wrapf(err, "problem retrieving data from %s/%s/%s",
- c.TaskName, c.DataName, c.Variant)
- }
-
- return errors.Wrapf(ioutil.WriteFile(c.File, data, 0755),
- "problem writing data from task %s/%s/%s to file %s",
- c.TaskName, c.DataName, c.Variant, c.File)
-
-}
diff --git a/agent/command/taskdata_history.go b/agent/command/taskdata_history.go
deleted file mode 100644
index a0cea317a19..00000000000
--- a/agent/command/taskdata_history.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package command
-
-import (
- "context"
- "io/ioutil"
- "path/filepath"
-
- "github.com/evergreen-ci/evergreen/agent/internal"
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/mitchellh/mapstructure"
- "github.com/pkg/errors"
-)
-
-type taskDataHistory struct {
- Tags bool `mapstructure:"tags"`
- File string `mapstructure:"file" plugin:"expand"`
- DataName string `mapstructure:"name" plugin:"expand"`
- TaskName string `mapstructure:"task" plugin:"expand"`
- base
-}
-
-func taskDataHistoryFactory() Command { return &taskDataHistory{} }
-func (c *taskDataHistory) Name() string { return "json.get_history" }
-
-func (c *taskDataHistory) ParseParams(params map[string]interface{}) error {
- if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%v' params", c.Name())
- }
- if c.File == "" {
- return errors.New("JSON 'history' command must not have blank 'file' param")
- }
- if c.DataName == "" {
- return errors.New("JSON 'history command must not have blank 'name' param")
- }
- if c.TaskName == "" {
- return errors.New("JSON 'history command must not have blank 'task' param")
- }
-
- return nil
-}
-
-func (c *taskDataHistory) Execute(ctx context.Context,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
-
- err := errors.WithStack(util.ExpandValues(c, conf.Expansions))
- if err != nil {
- return err
- }
-
- if c.File != "" && !filepath.IsAbs(c.File) {
- c.File = getJoinedWithWorkDir(conf, c.File)
- }
-
- td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
- data, err := comm.GetJSONHistory(ctx, td, c.Tags, c.TaskName, c.DataName)
- if err != nil {
- return errors.Wrapf(err, "problem getting data [%s/%s] from API server for %s",
- c.TaskName, c.DataName, td.ID)
- }
-
- return errors.Wrapf(ioutil.WriteFile(c.File, data, 0755),
- "problem writing json data for %s from %s/%s to %s",
- td.ID, c.TaskName, c.DataName, c.File)
-}
diff --git a/agent/command/taskdata_send.go b/agent/command/taskdata_send.go
deleted file mode 100644
index 9e9e2093a85..00000000000
--- a/agent/command/taskdata_send.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package command
-
-import (
- "context"
- "os"
-
- "github.com/evergreen-ci/evergreen/agent/internal"
- "github.com/evergreen-ci/evergreen/agent/internal/client"
- "github.com/evergreen-ci/utility"
- "github.com/mitchellh/mapstructure"
- "github.com/pkg/errors"
-)
-
-type taskDataSend struct {
- File string `mapstructure:"file" plugin:"expand"`
- DataName string `mapstructure:"name" plugin:"expand"`
- base
-}
-
-func taskDataSendFactory() Command { return &taskDataSend{} }
-func (c *taskDataSend) Name() string { return "json.send" }
-
-func (c *taskDataSend) ParseParams(params map[string]interface{}) error {
- if err := mapstructure.Decode(params, c); err != nil {
- return errors.Wrapf(err, "error decoding '%v' params", c.Name())
- }
-
- if c.File == "" {
- return errors.New("'file' param must not be blank")
- }
-
- if c.DataName == "" {
- return errors.New("'name' param must not be blank")
- }
-
- return nil
-}
-
-func (c *taskDataSend) Execute(ctx context.Context,
- comm client.Communicator, logger client.LoggerProducer, conf *internal.TaskConfig) error {
-
- td := client.TaskData{ID: conf.Task.Id, Secret: conf.Task.Secret}
-
- errChan := make(chan error)
- go func() {
- // attempt to open the file
- fileLoc := getJoinedWithWorkDir(conf, c.File)
- jsonFile, err := os.Open(fileLoc)
- if err != nil {
- errChan <- errors.Wrap(err, "Couldn't open json file")
- return
- }
-
- jsonData := map[string]interface{}{}
- err = utility.ReadJSON(jsonFile, &jsonData)
- if err != nil {
- errChan <- errors.Wrap(err, "File contained invalid json")
- return
- }
-
- errChan <- errors.Wrapf(comm.PostJSONData(ctx, td, c.DataName, jsonData),
- "problem posting task data for %s (%s)", c.DataName, td.ID)
- }()
-
- select {
- case err := <-errChan:
- if err != nil {
- logger.Task().Errorf("Sending json data failed: %v", err)
- }
- return errors.WithStack(err)
- case <-ctx.Done():
- logger.Execution().Info("Received abort signal, stopping.")
- return nil
- }
-}
diff --git a/agent/command/testdata/generated.json b/agent/command/testdata/generated.json
new file mode 100644
index 00000000000..7420a19cce8
--- /dev/null
+++ b/agent/command/testdata/generated.json
@@ -0,0 +1,25 @@
+{
+ "buildvariants": [
+ {
+ "name": "localhost",
+ "tasks": [
+ {
+ "name": "task_to_add_via_generator"
+ }
+ ]
+ }
+ ],
+ "tasks": [
+ {
+ "name": "task_to_add_via_generator",
+ "commands": [
+ {
+ "command": "shell.exec",
+ "params": {
+ "script": "echo generated_task"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/agent/command/testdata/gotest/large_line.log b/agent/command/testdata/gotest/large_line.log
new file mode 100644
index 00000000000..ddad04b67e8
--- /dev/null
+++ b/agent/command/testdata/gotest/large_line.log
@@ -0,0 +1,114 @@
+=== RUN TestE2E_OnlineArchive_AWS
+--- SKIP: TestE2E_OnlineArchive_AWS (0.00s)
+=== RUN TestE2E_OnlineArchive_AWS_Errors
+--- SKIP: TestE2E_OnlineArchive_AWS_Errors (0.00s)
+=== RUN TestE2E_OnlineArchive_LocalAndAWS
+--- SKIP: TestE2E_OnlineArchive_LocalAndAWS (0.00s)
+=== RUN TestE2E_DLS_AWS
+--- SKIP: TestE2E_DLS_AWS (0.00s)
+=== RUN TestE2EDLS_DLS_Azure
+--- SKIP: TestE2EDLS_DLS_Azure (0.00s)
+=== RUN TestE2EDLS_Catalog_Benchmark
+ e2e_dls_catalog_benchmark_test.go:351: dataset cleanup: unknown dataSet "oa-data-set-b": not found
+ e2e_dls_catalog_benchmark_test.go:215: Iterating through fs and adding partitions...
+........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ e2e_dls_catalog_benchmark_test.go:251: added 100000 partitions in 1000 transactions
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$match":_{"name":_"Zoey"}}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 11.81563256s
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 11.82662058s, 2637 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 6m5.037033378s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m5.04823799s, 2637 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 30.87 11.82662058s vs. 6m5.04823799s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$count":_"n"}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 62.490822ms
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 62.528548ms, 1 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 9m35.311261203s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 9m35.311295905s, 1 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 9200.78 62.528548ms vs. 9m35.311295905s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$match":_{"age":_{"$gt":_{"$numberInt":"500"}}}}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 0s
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 810.320881ms, 0 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 0s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m26.709223679s, 0 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 477.23 810.320881ms vs. 6m26.709223679s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 5m58.795936572s
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 5m59.360979254s, 100000 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 6m6.837804593s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m7.409355501s, 100000 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 1.02 5m59.360979254s vs. 6m7.409355501s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$project":_{"name":_{"$numberInt":"1"}}}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 6m40.622828834s
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 6m41.011851339s, 100000 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 6m26.077693173s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m26.482208591s, 100000 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 0.96 6m41.011851339s vs. 6m26.482208591s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$match":_{"name":_{"$in":_["Alejandro","Holden"]}}}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 21.260195341s
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 21.284049402s, 5435 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 6m20.82137565s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m20.851578975s, 5435 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 17.89 21.284049402s vs. 6m20.851578975s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$match":_{"_id":_{"$gte":_[{"$oid":"605c094aec7d3da862579a23"}],"$lte":_[{"$oid":"605c094aec7d3da862579a23"}]}}}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 0s
+ e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 309.360621ms, 0 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 0s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m22.909549463s, 0 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 1237.74 309.360621ms vs. 6m22.909549463s
+
+=== RUN TestE2EDLS_Catalog_Benchmark/[{"$match":_{"age":_{"$in":_[{"$numberInt":"0"},{"$numberInt":"1"},{"$numberInt":"2"},{"$numberInt":"3"},{"$numberInt":"4"},{"$numberInt":"5"},{"$numberInt":"6"},{"$numberInt":"7"},{"$numberInt":"8"},{"$numberInt":"9"},{"$numberInt":"10"},{"$numberInt":"11"},{"$numberInt":"12"},{"$numberInt":"13"},{"$numberInt":"14"},{"$numberInt":"15"},{"$numberInt":"16"},{"$numberInt":"17"},{"$numberInt":"18"},{"$numberInt":"19"},{"$numberInt":"20"},{"$numberInt":"21"},{"$numberInt":"22"},{"$numberInt":"23"},{"$numberInt":"24"},{"$numberInt":"25"},{"$numberInt":"26"},{"$numberInt":"27"},{"$numberInt":"28"},{"$numberInt":"29"},{"$numberInt":"30"},{"$numberInt":"31"},{"$numberInt":"32"},{"$numberInt":"33"},{"$numberInt":"34"},{"$numberInt":"35"},{"$numberInt":"36"},{"$numberInt":"37"},{"$numberInt":"38"},{"$numberInt":"39"},{"$numberInt":"40"},{"$numberInt":"41"},{"$numberInt":"42"},{"$numberInt":"43"},{"$numberInt":"44"},{"$numberInt":"45"},{"$numberInt":"46"},{"$numberInt":"47"},{"$numberInt":"48"},{"$numberInt":"49"},{"$numberInt":"50"},{"$numberInt":"51"},{"$numberInt":"52"},{"$numberInt":"53"},{"$numberInt":"54"},{"$numberInt":"55"},{"$numberInt":"56"},{"$numberInt":"57"},{"$numberInt":"58"},{"$numberInt":"59"},{"$numberInt":"60"},{"$numberInt":"61"},{"$numberInt":"62"},{"$numberInt":"63"},{"$numberInt":"64"},{"$numberInt":"65"},{"$numberInt":"66"},{"$numberInt":"67"},{"$numberInt":"68"},{"$numberInt":"69"},{"$numberInt":"70"},{"$numberInt":"71"},{"$numberInt":"72"},{"$numberInt":"73"},{"$numberInt":"74"},{"$numberInt":"75"},{"$numberInt":"76"},{"$numberInt":"77"},{"$numberInt":"78"},{"$numberInt":"79"},{"$numberInt":"80"},{"$numberInt":"81"},{"$numberInt":"82"},{"$numberInt":"83"},{"$numberInt":"84"},{"$numberInt":"85"},{"$numberInt":"86"},{"$numberInt":"87"},{"$numberInt":"88"},{"$numberInt":"89"},{"$numberInt":"90"},{"$numberInt":"91"},{"$numberInt":"92"},{"$numberInt":"93"},{"$numberInt":"94"},{"$numberInt":"95"},{"$numberInt":"96"},{"$numberInt":"97"},{"$numberInt":"98"},{"$numberInt":"99"},{"$numberInt":"100"},{"$numberInt":"101"},{"$numberInt":"102"},{"$numberInt":"103"},{"$numberInt":"104"},{"$numberInt":"105"},{"$numberInt":"106"},{"$numberInt":"107"},{"$numberInt":"108"},{"$numberInt":"109"},{"$numberInt":"110"},{"$numberInt":"111"},{"$numberInt":"112"},{"$numberInt":"113"},{"$numberInt":"114"},{"$numberInt":"115"},{"$numberInt":"116"},{"$numberInt":"117"},{"$numberInt":"118"},{"$numberInt":"119"},{"$numberInt":"120"},{"$numberInt":"121"},{"$numberInt":"122"},{"$numberInt":"123"},{"$numberInt":"124"},{"$numberInt":"125"},{"$numberInt":"126"},{"$numberInt":"127"},{"$numberInt":"128"},{"$numberInt":"129"},{"$numberInt":"130"},{"$numberInt":"131"},{"$numberInt":"132"},{"$numberInt":"133"},{"$numberInt":"134"},{"$numberInt":"135"},{"$numberInt":"136"},{"$numberInt":"137"},{"$numberInt":"138"},{"$numberInt":"139"},{"$numberInt":"140"},{"$numberInt":"141"},{"$numberInt":"142"},{"$numberInt":"143"},{"$numberInt":"144"},{"$numberInt":"145"},{"$numberInt":"146"},{"$numberInt":"147"},{"$numberInt":"148"},{"$numberInt":"149"},{"$numberInt":"150"},{"$numberInt":"151"},{"$numberInt":"152"},{"$numberInt":"153"},{"$numberInt":"154"},{"$numberInt":"155"},{"$numberInt":"156"},{"$numberInt":"157"},{"$numberInt":"158"},{"$numberInt":"159"},{"$numberInt":"160"},{"$numberInt":"161"},{"$numberInt":"162"},{"$numberInt":"163"},{"$numberInt":"164"},{"$numberInt":"165"},{"$numberInt":"166"},{"$numberInt":"167"},{"$numberInt":"168"},{"$numberInt":"169"},{"$numberInt":"170"},{"$numberInt":"171"},{"$numberInt":"172"},{"$numberInt":"173"},{"$numberInt":"174"},{"$numberInt":"175"},{"$numberInt":"176"},{"$numberInt":"177"},{"$numberInt":"178"},{"$numberInt":"179"},{"$numberInt":"180"},{"$numberInt":"181"},{"$numberInt":"182"},{"$numberInt":"183"},{"$numberInt":"184"},{"$numberInt":"185"},{"$numberInt":"186"},{"$numberInt":"187"},{"$numberInt":"188"},{"$numberInt":"189"},{"$numberInt":"190"},{"$numberInt":"191"},{"$numberInt":"192"},{"$numberInt":"193"},{"$numberInt":"194"},{"$numberInt":"195"},{"$numberInt":"196"},{"$numberInt":"197"},{"$numberInt":"198"},{"$numberInt":"199"},{"$numberInt":"200"},{"$numberInt":"201"},{"$numberInt":"202"},{"$numberInt":"203"},{"$numberInt":"204"},{"$numberInt":"205"},{"$numberInt":"206"},{"$numberInt":"207"},{"$numberInt":"208"},{"$numberInt":"209"},{"$numberInt":"210"},{"$numberInt":"211"},{"$numberInt":"212"},{"$numberInt":"213"},{"$numberInt":"214"},{"$numberInt":"215"},{"$numberInt":"216"},{"$numberInt":"217"},{"$numberInt":"218"},{"$numberInt":"219"},{"$numberInt":"220"},{"$numberInt":"221"},{"$numberInt":"222"},{"$numberInt":"223"},{"$numberInt":"224"},{"$numberInt":"225"},{"$numberInt":"226"},{"$numberInt":"227"},{"$numberInt":"228"},{"$numberInt":"229"},{"$numberInt":"230"},{"$numberInt":"231"},{"$numberInt":"232"},{"$numberInt":"233"},{"$numberInt":"234"},{"$numberInt":"235"},{"$numberInt":"236"},{"$numberInt":"237"},{"$numberInt":"238"},{"$numberInt":"239"},{"$numberInt":"240"},{"$numberInt":"241"},{"$numberInt":"242"},{"$numberInt":"243"},{"$numberInt":"244"},{"$numberInt":"245"},{"$numberInt":"246"},{"$numberInt":"247"},{"$numberInt":"248"},{"$numberInt":"249"},{"$numberInt":"250"},{"$numberInt":"251"},{"$numberInt":"252"},{"$numberInt":"253"},{"$numberInt":"254"},{"$numberInt":"255"},{"$numberInt":"256"},{"$numberInt":"257"},{"$numberInt":"258"},{"$numberInt":"259"},{"$numberInt":"260"},{"$numberInt":"261"},{"$numberInt":"262"},{"$numberInt":"263"},{"$numberInt":"264"},{"$numberInt":"265"},{"$numberInt":"266"},{"$numberInt":"267"},{"$numberInt":"268"},{"$numberInt":"269"},{"$numberInt":"270"},{"$numberInt":"271"},{"$numberInt":"272"},{"$numberInt":"273"},{"$numberInt":"274"},{"$numberInt":"275"},{"$numberInt":"276"},{"$numberInt":"277"},{"$numberInt":"278"},{"$numberInt":"279"},{"$numberInt":"280"},{"$numberInt":"281"},{"$numberInt":"282"},{"$numberInt":"283"},{"$numberInt":"284"},{"$numberInt":"285"},{"$numberInt":"286"},{"$numberInt":"287"},{"$numberInt":"288"},{"$numberInt":"289"},{"$numberInt":"290"},{"$numberInt":"291"},{"$numberInt":"292"},{"$numberInt":"293"},{"$numberInt":"294"},{"$numberInt":"295"},{"$numberInt":"296"},{"$numberInt":"297"},{"$numberInt":"298"},{"$numberInt":"299"},{"$numberInt":"300"},{"$numberInt":"301"},{"$numberInt":"302"},{"$numberInt":"303"},{"$numberInt":"304"},{"$numberInt":"305"},{"$numberInt":"306"},{"$numberInt":"307"},{"$numberInt":"308"},{"$numberInt":"309"},{"$numberInt":"310"},{"$numberInt":"311"},{"$numberInt":"312"},{"$numberInt":"313"},{"$numberInt":"314"},{"$numberInt":"315"},{"$numberInt":"316"},{"$numberInt":"317"},{"$numberInt":"318"},{"$numberInt":"319"},{"$numberInt":"320"},{"$numberInt":"321"},{"$numberInt":"322"},{"$numberInt":"323"},{"$numberInt":"324"},{"$numberInt":"325"},{"$numberInt":"326"},{"$numberInt":"327"},{"$numberInt":"328"},{"$numberInt":"329"},{"$numberInt":"330"},{"$numberInt":"331"},{"$numberInt":"332"},{"$numberInt":"333"},{"$numberInt":"334"},{"$numberInt":"335"},{"$numberInt":"336"},{"$numberInt":"337"},{"$numberInt":"338"},{"$numberInt":"339"},{"$numberInt":"340"},{"$numberInt":"341"},{"$numberInt":"342"},{"$numberInt":"343"},{"$numberInt":"344"},{"$numberInt":"345"},{"$numberInt":"346"},{"$numberInt":"347"},{"$numberInt":"348"},{"$numberInt":"349"},{"$numberInt":"350"},{"$numberInt":"351"},{"$numberInt":"352"},{"$numberInt":"353"},{"$numberInt":"354"},{"$numberInt":"355"},{"$numberInt":"356"},{"$numberInt":"357"},{"$numberInt":"358"},{"$numberInt":"359"},{"$numberInt":"360"},{"$numberInt":"361"},{"$numberInt":"362"},{"$numberInt":"363"},{"$numberInt":"364"},{"$numberInt":"365"},{"$numberInt":"366"},{"$numberInt":"367"},{"$numberInt":"368"},{"$numberInt":"369"},{"$numberInt":"370"},{"$numberInt":"371"},{"$numberInt":"372"},{"$numberInt":"373"},{"$numberInt":"374"},{"$numberInt":"375"},{"$numberInt":"376"},{"$numberInt":"377"},{"$numberInt":"378"},{"$numberInt":"379"},{"$numberInt":"380"},{"$numberInt":"381"},{"$numberInt":"382"},{"$numberInt":"383"},{"$numberInt":"384"},{"$numberInt":"385"},{"$numberInt":"386"},{"$numberInt":"387"},{"$numberInt":"388"},{"$numberInt":"389"},{"$numberInt":"390"},{"$numberInt":"391"},{"$numberInt":"392"},{"$numberInt":"393"},{"$numberInt":"394"},{"$numberInt":"395"},{"$numberInt":"396"},{"$numberInt":"397"},{"$numberInt":"398"},{"$numberInt":"399"},{"$numberInt":"400"},{"$numberInt":"401"},{"$numberInt":"402"},{"$numberInt":"403"},{"$numberInt":"404"},{"$numberInt":"405"},{"$numberInt":"406"},{"$numberInt":"407"},{"$numberInt":"408"},{"$numberInt":"409"},{"$numberInt":"410"},{"$numberInt":"411"},{"$numberInt":"412"},{"$numberInt":"413"},{"$numberInt":"414"},{"$numberInt":"415"},{"$numberInt":"416"},{"$numberInt":"417"},{"$numberInt":"418"},{"$numberInt":"419"},{"$numberInt":"420"},{"$numberInt":"421"},{"$numberInt":"422"},{"$numberInt":"423"},{"$numberInt":"424"},{"$numberInt":"425"},{"$numberInt":"426"},{"$numberInt":"427"},{"$numberInt":"428"},{"$numberInt":"429"},{"$numberInt":"430"},{"$numberInt":"431"},{"$numberInt":"432"},{"$numberInt":"433"},{"$numberInt":"434"},{"$numberInt":"435"},{"$numberInt":"436"},{"$numberInt":"437"},{"$numberInt":"438"},{"$numberInt":"439"},{"$numberInt":"440"},{"$numberInt":"441"},{"$numberInt":"442"},{"$numberInt":"443"},{"$numberInt":"444"},{"$numberInt":"445"},{"$numberInt":"446"},{"$numberInt":"447"},{"$numberInt":"448"},{"$numberInt":"449"},{"$numberInt":"450"},{"$numberInt":"451"},{"$numberInt":"452"},{"$numberInt":"453"},{"$numberInt":"454"},{"$numberInt":"455"},{"$numberInt":"456"},{"$numberInt":"457"},{"$numberInt":"458"},{"$numberInt":"459"},{"$numberInt":"460"},{"$numberInt":"461"},{"$numberInt":"462"},{"$numberInt":"463"},{"$numberInt":"464"},{"$numberInt":"465"},{"$numberInt":"466"},{"$numberInt":"467"},{"$numberInt":"468"},{"$numberInt":"469"},{"$numberInt":"470"},{"$numberInt":"471"},{"$numberInt":"472"},{"$numberInt":"473"},{"$numberInt":"474"},{"$numberInt":"475"},{"$numberInt":"476"},{"$numberInt":"477"},{"$numberInt":"478"},{"$numberInt":"479"},{"$numberInt":"480"},{"$numberInt":"481"},{"$numberInt":"482"},{"$numberInt":"483"},{"$numberInt":"484"},{"$numberInt":"485"},{"$numberInt":"486"},{"$numberInt":"487"},{"$numberInt":"488"},{"$numberInt":"489"},{"$numberInt":"490"},{"$numberInt":"491"},{"$numberInt":"492"},{"$numberInt":"493"},{"$numberInt":"494"},{"$numberInt":"495"},{"$numberInt":"496"},{"$numberInt":"497"},{"$numberInt":"498"},{"$numberInt":"499"},{"$numberInt":"500"},{"$numberInt":"501"},{"$numberInt":"502"},{"$numberInt":"503"},{"$numberInt":"504"},{"$numberInt":"505"},{"$numberInt":"506"},{"$numberInt":"507"},{"$numberInt":"508"},{"$numberInt":"509"},{"$numberInt":"510"},{"$numberInt":"511"},{"$numberInt":"512"},{"$numberInt":"513"},{"$numberInt":"514"},{"$numberInt":"515"},{"$numberInt":"516"},{"$numberInt":"517"},{"$numberInt":"518"},{"$numberInt":"519"},{"$numberInt":"520"},{"$numberInt":"521"},{"$numberInt":"522"},{"$numberInt":"523"},{"$numberInt":"524"},{"$numberInt":"525"},{"$numberInt":"526"},{"$numberInt":"527"},{"$numberInt":"528"},{"$numberInt":"529"},{"$numberInt":"530"},{"$numberInt":"531"},{"$numberInt":"532"},{"$numberInt":"533"},{"$numberInt":"534"},{"$numberInt":"535"},{"$numberInt":"536"},{"$numberInt":"537"},{"$numberInt":"538"},{"$numberInt":"539"},{"$numberInt":"540"},{"$numberInt":"541"},{"$numberInt":"542"},{"$numberInt":"543"},{"$numberInt":"544"},{"$numberInt":"545"},{"$numberInt":"546"},{"$numberInt":"547"},{"$numberInt":"548"},{"$numberInt":"549"},{"$numberInt":"550"},{"$numberInt":"551"},{"$numberInt":"552"},{"$numberInt":"553"},{"$numberInt":"554"},{"$numberInt":"555"},{"$numberInt":"556"},{"$numberInt":"557"},{"$numberInt":"558"},{"$numberInt":"559"},{"$numberInt":"560"},{"$numberInt":"561"},{"$numberInt":"562"},{"$numberInt":"563"},{"$numberInt":"564"},{"$numberInt":"565"},{"$numberInt":"566"},{"$numberInt":"567"},{"$numberInt":"568"},{"$numberInt":"569"},{"$numberInt":"570"},{"$numberInt":"571"},{"$numberInt":"572"},{"$numberInt":"573"},{"$numberInt":"574"},{"$numberInt":"575"},{"$numberInt":"576"},{"$numberInt":"577"},{"$numberInt":"578"},{"$numberInt":"579"},{"$numberInt":"580"},{"$numberInt":"581"},{"$numberInt":"582"},{"$numberInt":"583"},{"$numberInt":"584"},{"$numberInt":"585"},{"$numberInt":"586"},{"$numberInt":"587"},{"$numberInt":"588"},{"$numberInt":"589"},{"$numberInt":"590"},{"$numberInt":"591"},{"$numberInt":"592"},{"$numberInt":"593"},{"$numberInt":"594"},{"$numberInt":"595"},{"$numberInt":"596"},{"$numberInt":"597"},{"$numberInt":"598"},{"$numberInt":"599"},{"$numberInt":"600"},{"$numberInt":"601"},{"$numberInt":"602"},{"$numberInt":"603"},{"$numberInt":"604"},{"$numberInt":"605"},{"$numberInt":"606"},{"$numberInt":"607"},{"$numberInt":"608"},{"$numberInt":"609"},{"$numberInt":"610"},{"$numberInt":"611"},{"$numberInt":"612"},{"$numberInt":"613"},{"$numberInt":"614"},{"$numberInt":"615"},{"$numberInt":"616"},{"$numberInt":"617"},{"$numberInt":"618"},{"$numberInt":"619"},{"$numberInt":"620"},{"$numberInt":"621"},{"$numberInt":"622"},{"$numberInt":"623"},{"$numberInt":"624"},{"$numberInt":"625"},{"$numberInt":"626"},{"$numberInt":"627"},{"$numberInt":"628"},{"$numberInt":"629"},{"$numberInt":"630"},{"$numberInt":"631"},{"$numberInt":"632"},{"$numberInt":"633"},{"$numberInt":"634"},{"$numberInt":"635"},{"$numberInt":"636"},{"$numberInt":"637"},{"$numberInt":"638"},{"$numberInt":"639"},{"$numberInt":"640"},{"$numberInt":"641"},{"$numberInt":"642"},{"$numberInt":"643"},{"$numberInt":"644"},{"$numberInt":"645"},{"$numberInt":"646"},{"$numberInt":"647"},{"$numberInt":"648"},{"$numberInt":"649"},{"$numberInt":"650"},{"$numberInt":"651"},{"$numberInt":"652"},{"$numberInt":"653"},{"$numberInt":"654"},{"$numberInt":"655"},{"$numberInt":"656"},{"$numberInt":"657"},{"$numberInt":"658"},{"$numberInt":"659"},{"$numberInt":"660"},{"$numberInt":"661"},{"$numberInt":"662"},{"$numberInt":"663"},{"$numberInt":"664"},{"$numberInt":"665"},{"$numberInt":"666"},{"$numberInt":"667"},{"$numberInt":"668"},{"$numberInt":"669"},{"$numberInt":"670"},{"$numberInt":"671"},{"$numberInt":"672"},{"$numberInt":"673"},{"$numberInt":"674"},{"$numberInt":"675"},{"$numberInt":"676"},{"$numberInt":"677"},{"$numberInt":"678"},{"$numberInt":"679"},{"$numberInt":"680"},{"$numberInt":"681"},{"$numberInt":"682"},{"$numberInt":"683"},{"$numberInt":"684"},{"$numberInt":"685"},{"$numberInt":"686"},{"$numberInt":"687"},{"$numberInt":"688"},{"$numberInt":"689"},{"$numberInt":"690"},{"$numberInt":"691"},{"$numberInt":"692"},{"$numberInt":"693"},{"$numberInt":"694"},{"$numberInt":"695"},{"$numberInt":"696"},{"$numberInt":"697"},{"$numberInt":"698"},{"$numberInt":"699"},{"$numberInt":"700"},{"$numberInt":"701"},{"$numberInt":"702"},{"$numberInt":"703"},{"$numberInt":"704"},{"$numberInt":"705"},{"$numberInt":"706"},{"$numberInt":"707"},{"$numberInt":"708"},{"$numberInt":"709"},{"$numberInt":"710"},{"$numberInt":"711"},{"$numberInt":"712"},{"$numberInt":"713"},{"$numberInt":"714"},{"$numberInt":"715"},{"$numberInt":"716"},{"$numberInt":"717"},{"$numberInt":"718"},{"$numberInt":"719"},{"$numberInt":"720"},{"$numberInt":"721"},{"$numberInt":"722"},{"$numberInt":"723"},{"$numberInt":"724"},{"$numberInt":"725"},{"$numberInt":"726"},{"$numberInt":"727"},{"$numberInt":"728"},{"$numberInt":"729"},{"$numberInt":"730"},{"$numberInt":"731"},{"$numberInt":"732"},{"$numberInt":"733"},{"$numberInt":"734"},{"$numberInt":"735"},{"$numberInt":"736"},{"$numberInt":"737"},{"$numberInt":"738"},{"$numberInt":"739"},{"$numberInt":"740"},{"$numberInt":"741"},{"$numberInt":"742"},{"$numberInt":"743"},{"$numberInt":"744"},{"$numberInt":"745"},{"$numberInt":"746"},{"$numberInt":"747"},{"$numberInt":"748"},{"$numberInt":"749"},{"$numberInt":"750"},{"$numberInt":"751"},{"$numberInt":"752"},{"$numberInt":"753"},{"$numberInt":"754"},{"$numberInt":"755"},{"$numberInt":"756"},{"$numberInt":"757"},{"$numberInt":"758"},{"$numberInt":"759"},{"$numberInt":"760"},{"$numberInt":"761"},{"$numberInt":"762"},{"$numberInt":"763"},{"$numberInt":"764"},{"$numberInt":"765"},{"$numberInt":"766"},{"$numberInt":"767"},{"$numberInt":"768"},{"$numberInt":"769"},{"$numberInt":"770"},{"$numberInt":"771"},{"$numberInt":"772"},{"$numberInt":"773"},{"$numberInt":"774"},{"$numberInt":"775"},{"$numberInt":"776"},{"$numberInt":"777"},{"$numberInt":"778"},{"$numberInt":"779"},{"$numberInt":"780"},{"$numberInt":"781"},{"$numberInt":"782"},{"$numberInt":"783"},{"$numberInt":"784"},{"$numberInt":"785"},{"$numberInt":"786"},{"$numberInt":"787"},{"$numberInt":"788"},{"$numberInt":"789"},{"$numberInt":"790"},{"$numberInt":"791"},{"$numberInt":"792"},{"$numberInt":"793"},{"$numberInt":"794"},{"$numberInt":"795"},{"$numberInt":"796"},{"$numberInt":"797"},{"$numberInt":"798"},{"$numberInt":"799"},{"$numberInt":"800"},{"$numberInt":"801"},{"$numberInt":"802"},{"$numberInt":"803"},{"$numberInt":"804"},{"$numberInt":"805"},{"$numberInt":"806"},{"$numberInt":"807"},{"$numberInt":"808"},{"$numberInt":"809"},{"$numberInt":"810"},{"$numberInt":"811"},{"$numberInt":"812"},{"$numberInt":"813"},{"$numberInt":"814"},{"$numberInt":"815"},{"$numberInt":"816"},{"$numberInt":"817"},{"$numberInt":"818"},{"$numberInt":"819"},{"$numberInt":"820"},{"$numberInt":"821"},{"$numberInt":"822"},{"$numberInt":"823"},{"$numberInt":"824"},{"$numberInt":"825"},{"$numberInt":"826"},{"$numberInt":"827"},{"$numberInt":"828"},{"$numberInt":"829"},{"$numberInt":"830"},{"$numberInt":"831"},{"$numberInt":"832"},{"$numberInt":"833"},{"$numberInt":"834"},{"$numberInt":"835"},{"$numberInt":"836"},{"$numberInt":"837"},{"$numberInt":"838"},{"$numberInt":"839"},{"$numberInt":"840"},{"$numberInt":"841"},{"$numberInt":"842"},{"$numberInt":"843"},{"$numberInt":"844"},{"$numberInt":"845"},{"$numberInt":"846"},{"$numberInt":"847"},{"$numberInt":"848"},{"$numberInt":"849"},{"$numberInt":"850"},{"$numberInt":"851"},{"$numberInt":"852"},{"$numberInt":"853"},{"$numberInt":"854"},{"$numberInt":"855"},{"$numberInt":"856"},{"$numberInt":"857"},{"$numberInt":"858"},{"$numberInt":"859"},{"$numberInt":"860"},{"$numberInt":"861"},{"$numberInt":"862"},{"$numberInt":"863"},{"$numberInt":"864"},{"$numberInt":"865"},{"$numberInt":"866"},{"$numberInt":"867"},{"$numberInt":"868"},{"$numberInt":"869"},{"$numberInt":"870"},{"$numberInt":"871"},{"$numberInt":"872"},{"$numberInt":"873"},{"$numberInt":"874"},{"$numberInt":"875"},{"$numberInt":"876"},{"$numberInt":"877"},{"$numberInt":"878"},{"$numberInt":"879"},{"$numberInt":"880"},{"$numberInt":"881"},{"$numberInt":"882"},{"$numberInt":"883"},{"$numberInt":"884"},{"$numberInt":"885"},{"$numberInt":"886"},{"$numberInt":"887"},{"$numberInt":"888"},{"$numberInt":"889"},{"$numberInt":"890"},{"$numberInt":"891"},{"$numberInt":"892"},{"$numberInt":"893"},{"$numberInt":"894"},{"$numberInt":"895"},{"$numberInt":"896"},{"$numberInt":"897"},{"$numberInt":"898"},{"$numberInt":"899"},{"$numberInt":"900"},{"$numberInt":"901"},{"$numberInt":"902"},{"$numberInt":"903"},{"$numberInt":"904"},{"$numberInt":"905"},{"$numberInt":"906"},{"$numberInt":"907"},{"$numberInt":"908"},{"$numberInt":"909"},{"$numberInt":"910"},{"$numberInt":"911"},{"$numberInt":"912"},{"$numberInt":"913"},{"$numberInt":"914"},{"$numberInt":"915"},{"$numberInt":"916"},{"$numberInt":"917"},{"$numberInt":"918"},{"$numberInt":"919"},{"$numberInt":"920"},{"$numberInt":"921"},{"$numberInt":"922"},{"$numberInt":"923"},{"$numberInt":"924"},{"$numberInt":"925"},{"$numberInt":"926"},{"$numberInt":"927"},{"$numberInt":"928"},{"$numberInt":"929"},{"$numberInt":"930"},{"$numberInt":"931"},{"$numberInt":"932"},{"$numberInt":"933"},{"$numberInt":"934"},{"$numberInt":"935"},{"$numberInt":"936"},{"$numberInt":"937"},{"$numberInt":"938"},{"$numberInt":"939"},{"$numberInt":"940"},{"$numberInt":"941"},{"$numberInt":"942"},{"$numberInt":"943"},{"$numberInt":"944"},{"$numberInt":"945"},{"$numberInt":"946"},{"$numberInt":"947"},{"$numberInt":"948"},{"$numberInt":"949"},{"$numberInt":"950"},{"$numberInt":"951"},{"$numberInt":"952"},{"$numberInt":"953"},{"$numberInt":"954"},{"$numberInt":"955"},{"$numberInt":"956"},{"$numberInt":"957"},{"$numberInt":"958"},{"$numberInt":"959"},{"$numberInt":"960"},{"$numberInt":"961"},{"$numberInt":"962"},{"$numberInt":"963"},{"$numberInt":"964"},{"$numberInt":"965"},{"$numberInt":"966"},{"$numberInt":"967"},{"$numberInt":"968"},{"$numberInt":"969"},{"$numberInt":"970"},{"$numberInt":"971"},{"$numberInt":"972"},{"$numberInt":"973"},{"$numberInt":"974"},{"$numberInt":"975"},{"$numberInt":"976"},{"$numberInt":"977"},{"$numberInt":"978"},{"$numberInt":"979"},{"$numberInt":"980"},{"$numberInt":"981"},{"$numberInt":"982"},{"$numberInt":"983"},{"$numberInt":"984"},{"$numberInt":"985"},{"$numberInt":"986"},{"$numberInt":"987"},{"$numberInt":"988"},{"$numberInt":"989"},{"$numberInt":"990"},{"$numberInt":"991"},{"$numberInt":"992"},{"$numberInt":"993"},{"$numberInt":"994"},{"$numberInt":"995"},{"$numberInt":"996"},{"$numberInt":"997"},{"$numberInt":"998"},{"$numberInt":"999"},{"$numberInt":"1000"},{"$numberInt":"1001"},{"$numberInt":"1002"},{"$numberInt":"1003"},{"$numberInt":"1004"},{"$numberInt":"1005"},{"$numberInt":"1006"},{"$numberInt":"1007"},{"$numberInt":"1008"},{"$numberInt":"1009"},{"$numberInt":"1010"},{"$numberInt":"1011"},{"$numberInt":"1012"},{"$numberInt":"1013"},{"$numberInt":"1014"},{"$numberInt":"1015"},{"$numberInt":"1016"},{"$numberInt":"1017"},{"$numberInt":"1018"},{"$numberInt":"1019"},{"$numberInt":"1020"},{"$numberInt":"1021"},{"$numberInt":"1022"},{"$numberInt":"1023"},{"$numberInt":"1024"},{"$numberInt":"1025"},{"$numberInt":"1026"},{"$numberInt":"1027"},{"$numberInt":"1028"},{"$numberInt":"1029"},{"$numberInt":"1030"},{"$numberInt":"1031"},{"$numberInt":"1032"},{"$numberInt":"1033"},{"$numberInt":"1034"},{"$numberInt":"1035"},{"$numberInt":"1036"},{"$numberInt":"1037"},{"$numberInt":"1038"},{"$numberInt":"1039"},{"$numberInt":"1040"},{"$numberInt":"1041"},{"$numberInt":"1042"},{"$numberInt":"1043"},{"$numberInt":"1044"},{"$numberInt":"1045"},{"$numberInt":"1046"},{"$numberInt":"1047"},{"$numberInt":"1048"},{"$numberInt":"1049"},{"$numberInt":"1050"},{"$numberInt":"1051"},{"$numberInt":"1052"},{"$numberInt":"1053"},{"$numberInt":"1054"},{"$numberInt":"1055"},{"$numberInt":"1056"},{"$numberInt":"1057"},{"$numberInt":"1058"},{"$numberInt":"1059"},{"$numberInt":"1060"},{"$numberInt":"1061"},{"$numberInt":"1062"},{"$numberInt":"1063"},{"$numberInt":"1064"},{"$numberInt":"1065"},{"$numberInt":"1066"},{"$numberInt":"1067"},{"$numberInt":"1068"},{"$numberInt":"1069"},{"$numberInt":"1070"},{"$numberInt":"1071"},{"$numberInt":"1072"},{"$numberInt":"1073"},{"$numberInt":"1074"},{"$numberInt":"1075"},{"$numberInt":"1076"},{"$numberInt":"1077"},{"$numberInt":"1078"},{"$numberInt":"1079"},{"$numberInt":"1080"},{"$numberInt":"1081"},{"$numberInt":"1082"},{"$numberInt":"1083"},{"$numberInt":"1084"},{"$numberInt":"1085"},{"$numberInt":"1086"},{"$numberInt":"1087"},{"$numberInt":"1088"},{"$numberInt":"1089"},{"$numberInt":"1090"},{"$numberInt":"1091"},{"$numberInt":"1092"},{"$numberInt":"1093"},{"$numberInt":"1094"},{"$numberInt":"1095"},{"$numberInt":"1096"},{"$numberInt":"1097"},{"$numberInt":"1098"},{"$numberInt":"1099"},{"$numberInt":"1100"},{"$numberInt":"1101"},{"$numberInt":"1102"},{"$numberInt":"1103"},{"$numberInt":"1104"},{"$numberInt":"1105"},{"$numberInt":"1106"},{"$numberInt":"1107"},{"$numberInt":"1108"},{"$numberInt":"1109"},{"$numberInt":"1110"},{"$numberInt":"1111"},{"$numberInt":"1112"},{"$numberInt":"1113"},{"$numberInt":"1114"},{"$numberInt":"1115"},{"$numberInt":"1116"},{"$numberInt":"1117"},{"$numberInt":"1118"},{"$numberInt":"1119"},{"$numberInt":"1120"},{"$numberInt":"1121"},{"$numberInt":"1122"},{"$numberInt":"1123"},{"$numberInt":"1124"},{"$numberInt":"1125"},{"$numberInt":"1126"},{"$numberInt":"1127"},{"$numberInt":"1128"},{"$numberInt":"1129"},{"$numberInt":"1130"},{"$numberInt":"1131"},{"$numberInt":"1132"},{"$numberInt":"1133"},{"$numberInt":"1134"},{"$numberInt":"1135"},{"$numberInt":"1136"},{"$numberInt":"1137"},{"$numberInt":"1138"},{"$numberInt":"1139"},{"$numberInt":"1140"},{"$numberInt":"1141"},{"$numberInt":"1142"},{"$numberInt":"1143"},{"$numberInt":"1144"},{"$numberInt":"1145"},{"$numberInt":"1146"},{"$numberInt":"1147"},{"$numberInt":"1148"},{"$numberInt":"1149"},{"$numberInt":"1150"},{"$numberInt":"1151"},{"$numberInt":"1152"},{"$numberInt":"1153"},{"$numberInt":"1154"},{"$numberInt":"1155"},{"$numberInt":"1156"},{"$numberInt":"1157"},{"$numberInt":"1158"},{"$numberInt":"1159"},{"$numberInt":"1160"},{"$numberInt":"1161"},{"$numberInt":"1162"},{"$numberInt":"1163"},{"$numberInt":"1164"},{"$numberInt":"1165"},{"$numberInt":"1166"},{"$numberInt":"1167"},{"$numberInt":"1168"},{"$numberInt":"1169"},{"$numberInt":"1170"},{"$numberInt":"1171"},{"$numberInt":"1172"},{"$numberInt":"1173"},{"$numberInt":"1174"},{"$numberInt":"1175"},{"$numberInt":"1176"},{"$numberInt":"1177"},{"$numberInt":"1178"},{"$numberInt":"1179"},{"$numberInt":"1180"},{"$numberInt":"1181"},{"$numberInt":"1182"},{"$numberInt":"1183"},{"$numberInt":"1184"},{"$numberInt":"1185"},{"$numberInt":"1186"},{"$numberInt":"1187"},{"$numberInt":"1188"},{"$numberInt":"1189"},{"$numberInt":"1190"},{"$numberInt":"1191"},{"$numberInt":"1192"},{"$numberInt":"1193"},{"$numberInt":"1194"},{"$numberInt":"1195"},{"$numberInt":"1196"},{"$numberInt":"1197"},{"$numberInt":"1198"},{"$numberInt":"1199"},{"$numberInt":"1200"},{"$numberInt":"1201"},{"$numberInt":"1202"},{"$numberInt":"1203"},{"$numberInt":"1204"},{"$numberInt":"1205"},{"$numberInt":"1206"},{"$numberInt":"1207"},{"$numberInt":"1208"},{"$numberInt":"1209"},{"$numberInt":"1210"},{"$numberInt":"1211"},{"$numberInt":"1212"},{"$numberInt":"1213"},{"$numberInt":"1214"},{"$numberInt":"1215"},{"$numberInt":"1216"},{"$numberInt":"1217"},{"$numberInt":"1218"},{"$numberInt":"1219"},{"$numberInt":"1220"},{"$numberInt":"1221"},{"$numberInt":"1222"},{"$numberInt":"1223"},{"$numberInt":"1224"},{"$numberInt":"1225"},{"$numberInt":"1226"},{"$numberInt":"1227"},{"$numberInt":"1228"},{"$numberInt":"1229"},{"$numberInt":"1230"},{"$numberInt":"1231"},{"$numberInt":"1232"},{"$numberInt":"1233"},{"$numberInt":"1234"},{"$numberInt":"1235"},{"$numberInt":"1236"},{"$numberInt":"1237"},{"$numberInt":"1238"},{"$numberInt":"1239"},{"$numberInt":"1240"},{"$numberInt":"1241"},{"$numberInt":"1242"},{"$numberInt":"1243"},{"$numberInt":"1244"},{"$numberInt":"1245"},{"$numberInt":"1246"},{"$numberInt":"1247"},{"$numberInt":"1248"},{"$numberInt":"1249"},{"$numberInt":"1250"},{"$numberInt":"1251"},{"$numberInt":"1252"},{"$numberInt":"1253"},{"$numberInt":"1254"},{"$numberInt":"1255"},{"$numberInt":"1256"},{"$numberInt":"1257"},{"$numberInt":"1258"},{"$numberInt":"1259"},{"$numberInt":"1260"},{"$numberInt":"1261"},{"$numberInt":"1262"},{"$numberInt":"1263"},{"$numberInt":"1264"},{"$numberInt":"1265"},{"$numberInt":"1266"},{"$numberInt":"1267"},{"$numberInt":"1268"},{"$numberInt":"1269"},{"$numberInt":"1270"},{"$numberInt":"1271"},{"$numberInt":"1272"},{"$numberInt":"1273"},{"$numberInt":"1274"},{"$numberInt":"1275"},{"$numberInt":"1276"},{"$numberInt":"1277"},{"$numberInt":"1278"},{"$numberInt":"1279"},{"$numberInt":"1280"},{"$numberInt":"1281"},{"$numberInt":"1282"},{"$numberInt":"1283"},{"$numberInt":"1284"},{"$numberInt":"1285"},{"$numberInt":"1286"},{"$numberInt":"1287"},{"$numberInt":"1288"},{"$numberInt":"1289"},{"$numberInt":"1290"},{"$numberInt":"1291"},{"$numberInt":"1292"},{"$numberInt":"1293"},{"$numberInt":"1294"},{"$numberInt":"1295"},{"$numberInt":"1296"},{"$numberInt":"1297"},{"$numberInt":"1298"},{"$numberInt":"1299"},{"$numberInt":"1300"},{"$numberInt":"1301"},{"$numberInt":"1302"},{"$numberInt":"1303"},{"$numberInt":"1304"},{"$numberInt":"1305"},{"$numberInt":"1306"},{"$numberInt":"1307"},{"$numberInt":"1308"},{"$numberInt":"1309"},{"$numberInt":"1310"},{"$numberInt":"1311"},{"$numberInt":"1312"},{"$numberInt":"1313"},{"$numberInt":"1314"},{"$numberInt":"1315"},{"$numberInt":"1316"},{"$numberInt":"1317"},{"$numberInt":"1318"},{"$numberInt":"1319"},{"$numberInt":"1320"},{"$numberInt":"1321"},{"$numberInt":"1322"},{"$numberInt":"1323"},{"$numberInt":"1324"},{"$numberInt":"1325"},{"$numberInt":"1326"},{"$numberInt":"1327"},{"$numberInt":"1328"},{"$numberInt":"1329"},{"$numberInt":"1330"},{"$numberInt":"1331"},{"$numberInt":"1332"},{"$numberInt":"1333"},{"$numberInt":"1334"},{"$numberInt":"1335"},{"$numberInt":"1336"},{"$numberInt":"1337"},{"$numberInt":"1338"},{"$numberInt":"1339"},{"$numberInt":"1340"},{"$numberInt":"1341"},{"$numberInt":"1342"},{"$numberInt":"1343"},{"$numberInt":"1344"},{"$numberInt":"1345"},{"$numberInt":"1346"},{"$numberInt":"1347"},{"$numberInt":"1348"},{"$numberInt":"1349"},{"$numberInt":"1350"},{"$numberInt":"1351"},{"$numberInt":"1352"},{"$numberInt":"1353"},{"$numberInt":"1354"},{"$numberInt":"1355"},{"$numberInt":"1356"},{"$numberInt":"1357"},{"$numberInt":"1358"},{"$numberInt":"1359"},{"$numberInt":"1360"},{"$numberInt":"1361"},{"$numberInt":"1362"},{"$numberInt":"1363"},{"$numberInt":"1364"},{"$numberInt":"1365"},{"$numberInt":"1366"},{"$numberInt":"1367"},{"$numberInt":"1368"},{"$numberInt":"1369"},{"$numberInt":"1370"},{"$numberInt":"1371"},{"$numberInt":"1372"},{"$numberInt":"1373"},{"$numberInt":"1374"},{"$numberInt":"1375"},{"$numberInt":"1376"},{"$numberInt":"1377"},{"$numberInt":"1378"},{"$numberInt":"1379"},{"$numberInt":"1380"},{"$numberInt":"1381"},{"$numberInt":"1382"},{"$numberInt":"1383"},{"$numberInt":"1384"},{"$numberInt":"1385"},{"$numberInt":"1386"},{"$numberInt":"1387"},{"$numberInt":"1388"},{"$numberInt":"1389"},{"$numberInt":"1390"},{"$numberInt":"1391"},{"$numberInt":"1392"},{"$numberInt":"1393"},{"$numberInt":"1394"},{"$numberInt":"1395"},{"$numberInt":"1396"},{"$numberInt":"1397"},{"$numberInt":"1398"},{"$numberInt":"1399"},{"$numberInt":"1400"},{"$numberInt":"1401"},{"$numberInt":"1402"},{"$numberInt":"1403"},{"$numberInt":"1404"},{"$numberInt":"1405"},{"$numberInt":"1406"},{"$numberInt":"1407"},{"$numberInt":"1408"},{"$numberInt":"1409"},{"$numberInt":"1410"},{"$numberInt":"1411"},{"$numberInt":"1412"},{"$numberInt":"1413"},{"$numberInt":"1414"},{"$numberInt":"1415"},{"$numberInt":"1416"},{"$numberInt":"1417"},{"$numberInt":"1418"},{"$numberInt":"1419"},{"$numberInt":"1420"},{"$numberInt":"1421"},{"$numberInt":"1422"},{"$numberInt":"1423"},{"$numberInt":"1424"},{"$numberInt":"1425"},{"$numberInt":"1426"},{"$numberInt":"1427"},{"$numberInt":"1428"},{"$numberInt":"1429"},{"$numberInt":"1430"},{"$numberInt":"1431"},{"$numberInt":"1432"},{"$numberInt":"1433"},{"$numberInt":"1434"},{"$numberInt":"1435"},{"$numberInt":"1436"},{"$numberInt":"1437"},{"$numberInt":"1438"},{"$numberInt":"1439"},{"$numberInt":"1440"},{"$numberInt":"1441"},{"$numberInt":"1442"},{"$numberInt":"1443"},{"$numberInt":"1444"},{"$numberInt":"1445"},{"$numberInt":"1446"},{"$numberInt":"1447"},{"$numberInt":"1448"},{"$numberInt":"1449"},{"$numberInt":"1450"},{"$numberInt":"1451"},{"$numberInt":"1452"},{"$numberInt":"1453"},{"$numberInt":"1454"},{"$numberInt":"1455"},{"$numberInt":"1456"},{"$numberInt":"1457"},{"$numberInt":"1458"},{"$numberInt":"1459"},{"$numberInt":"1460"},{"$numberInt":"1461"},{"$numberInt":"1462"},{"$numberInt":"1463"},{"$numberInt":"1464"},{"$numberInt":"1465"},{"$numberInt":"1466"},{"$numberInt":"1467"},{"$numberInt":"1468"},{"$numberInt":"1469"},{"$numberInt":"1470"},{"$numberInt":"1471"},{"$numberInt":"1472"},{"$numberInt":"1473"},{"$numberInt":"1474"},{"$numberInt":"1475"},{"$numberInt":"1476"},{"$numberInt":"1477"},{"$numberInt":"1478"},{"$numberInt":"1479"},{"$numberInt":"1480"},{"$numberInt":"1481"},{"$numberInt":"1482"},{"$numberInt":"1483"},{"$numberInt":"1484"},{"$numberInt":"1485"},{"$numberInt":"1486"},{"$numberInt":"1487"},{"$numberInt":"1488"},{"$numberInt":"1489"},{"$numberInt":"1490"},{"$numberInt":"1491"},{"$numberInt":"1492"},{"$numberInt":"1493"},{"$numberInt":"1494"},{"$numberInt":"1495"},{"$numberInt":"1496"},{"$numberInt":"1497"},{"$numberInt":"1498"},{"$numberInt":"1499"},{"$numberInt":"1500"},{"$numberInt":"1501"},{"$numberInt":"1502"},{"$numberInt":"1503"},{"$numberInt":"1504"},{"$numberInt":"1505"},{"$numberInt":"1506"},{"$numberInt":"1507"},{"$numberInt":"1508"},{"$numberInt":"1509"},{"$numberInt":"1510"},{"$numberInt":"1511"},{"$numberInt":"1512"},{"$numberInt":"1513"},{"$numberInt":"1514"},{"$numberInt":"1515"},{"$numberInt":"1516"},{"$numberInt":"1517"},{"$numberInt":"1518"},{"$numberInt":"1519"},{"$numberInt":"1520"},{"$numberInt":"1521"},{"$numberInt":"1522"},{"$numberInt":"1523"},{"$numberInt":"1524"},{"$numberInt":"1525"},{"$numberInt":"1526"},{"$numberInt":"1527"},{"$numberInt":"1528"},{"$numberInt":"1529"},{"$numberInt":"1530"},{"$numberInt":"1531"},{"$numberInt":"1532"},{"$numberInt":"1533"},{"$numberInt":"1534"},{"$numberInt":"1535"},{"$numberInt":"1536"},{"$numberInt":"1537"},{"$numberInt":"1538"},{"$numberInt":"1539"},{"$numberInt":"1540"},{"$numberInt":"1541"},{"$numberInt":"1542"},{"$numberInt":"1543"},{"$numberInt":"1544"},{"$numberInt":"1545"},{"$numberInt":"1546"},{"$numberInt":"1547"},{"$numberInt":"1548"},{"$numberInt":"1549"},{"$numberInt":"1550"},{"$numberInt":"1551"},{"$numberInt":"1552"},{"$numberInt":"1553"},{"$numberInt":"1554"},{"$numberInt":"1555"},{"$numberInt":"1556"},{"$numberInt":"1557"},{"$numberInt":"1558"},{"$numberInt":"1559"},{"$numberInt":"1560"},{"$numberInt":"1561"},{"$numberInt":"1562"},{"$numberInt":"1563"},{"$numberInt":"1564"},{"$numberInt":"1565"},{"$numberInt":"1566"},{"$numberInt":"1567"},{"$numberInt":"1568"},{"$numberInt":"1569"},{"$numberInt":"1570"},{"$numberInt":"1571"},{"$numberInt":"1572"},{"$numberInt":"1573"},{"$numberInt":"1574"},{"$numberInt":"1575"},{"$numberInt":"1576"},{"$numberInt":"1577"},{"$numberInt":"1578"},{"$numberInt":"1579"},{"$numberInt":"1580"},{"$numberInt":"1581"},{"$numberInt":"1582"},{"$numberInt":"1583"},{"$numberInt":"1584"},{"$numberInt":"1585"},{"$numberInt":"1586"},{"$numberInt":"1587"},{"$numberInt":"1588"},{"$numberInt":"1589"},{"$numberInt":"1590"},{"$numberInt":"1591"},{"$numberInt":"1592"},{"$numberInt":"1593"},{"$numberInt":"1594"},{"$numberInt":"1595"},{"$numberInt":"1596"},{"$numberInt":"1597"},{"$numberInt":"1598"},{"$numberInt":"1599"},{"$numberInt":"1600"},{"$numberInt":"1601"},{"$numberInt":"1602"},{"$numberInt":"1603"},{"$numberInt":"1604"},{"$numberInt":"1605"},{"$numberInt":"1606"},{"$numberInt":"1607"},{"$numberInt":"1608"},{"$numberInt":"1609"},{"$numberInt":"1610"},{"$numberInt":"1611"},{"$numberInt":"1612"},{"$numberInt":"1613"},{"$numberInt":"1614"},{"$numberInt":"1615"},{"$numberInt":"1616"},{"$numberInt":"1617"},{"$numberInt":"1618"},{"$numberInt":"1619"},{"$numberInt":"1620"},{"$numberInt":"1621"},{"$numberInt":"1622"},{"$numberInt":"1623"},{"$numberInt":"1624"},{"$numberInt":"1625"},{"$numberInt":"1626"},{"$numberInt":"1627"},{"$numberInt":"1628"},{"$numberInt":"1629"},{"$numberInt":"1630"},{"$numberInt":"1631"},{"$numberInt":"1632"},{"$numberInt":"1633"},{"$numberInt":"1634"},{"$numberInt":"1635"},{"$numberInt":"1636"},{"$numberInt":"1637"},{"$numberInt":"1638"},{"$numberInt":"1639"},{"$numberInt":"1640"},{"$numberInt":"1641"},{"$numberInt":"1642"},{"$numberInt":"1643"},{"$numberInt":"1644"},{"$numberInt":"1645"},{"$numberInt":"1646"},{"$numberInt":"1647"},{"$numberInt":"1648"},{"$numberInt":"1649"},{"$numberInt":"1650"},{"$numberInt":"1651"},{"$numberInt":"1652"},{"$numberInt":"1653"},{"$numberInt":"1654"},{"$numberInt":"1655"},{"$numberInt":"1656"},{"$numberInt":"1657"},{"$numberInt":"1658"},{"$numberInt":"1659"},{"$numberInt":"1660"},{"$numberInt":"1661"},{"$numberInt":"1662"},{"$numberInt":"1663"},{"$numberInt":"1664"},{"$numberInt":"1665"},{"$numberInt":"1666"},{"$numberInt":"1667"},{"$numberInt":"1668"},{"$numberInt":"1669"},{"$numberInt":"1670"},{"$numberInt":"1671"},{"$numberInt":"1672"},{"$numberInt":"1673"},{"$numberInt":"1674"},{"$numberInt":"1675"},{"$numberInt":"1676"},{"$numberInt":"1677"},{"$numberInt":"1678"},{"$numberInt":"1679"},{"$numberInt":"1680"},{"$numberInt":"1681"},{"$numberInt":"1682"},{"$numberInt":"1683"},{"$numberInt":"1684"},{"$numberInt":"1685"},{"$numberInt":"1686"},{"$numberInt":"1687"},{"$numberInt":"1688"},{"$numberInt":"1689"},{"$numberInt":"1690"},{"$numberInt":"1691"},{"$numberInt":"1692"},{"$numberInt":"1693"},{"$numberInt":"1694"},{"$numberInt":"1695"},{"$numberInt":"1696"},{"$numberInt":"1697"},{"$numberInt":"1698"},{"$numberInt":"1699"},{"$numberInt":"1700"},{"$numberInt":"1701"},{"$numberInt":"1702"},{"$numberInt":"1703"},{"$numberInt":"1704"},{"$numberInt":"1705"},{"$numberInt":"1706"},{"$numberInt":"1707"},{"$numberInt":"1708"},{"$numberInt":"1709"},{"$numberInt":"1710"},{"$numberInt":"1711"},{"$numberInt":"1712"},{"$numberInt":"1713"},{"$numberInt":"1714"},{"$numberInt":"1715"},{"$numberInt":"1716"},{"$numberInt":"1717"},{"$numberInt":"1718"},{"$numberInt":"1719"},{"$numberInt":"1720"},{"$numberInt":"1721"},{"$numberInt":"1722"},{"$numberInt":"1723"},{"$numberInt":"1724"},{"$numberInt":"1725"},{"$numberInt":"1726"},{"$numberInt":"1727"},{"$numberInt":"1728"},{"$numberInt":"1729"},{"$numberInt":"1730"},{"$numberInt":"1731"},{"$numberInt":"1732"},{"$numberInt":"1733"},{"$numberInt":"1734"},{"$numberInt":"1735"},{"$numberInt":"1736"},{"$numberInt":"1737"},{"$numberInt":"1738"},{"$numberInt":"1739"},{"$numberInt":"1740"},{"$numberInt":"1741"},{"$numberInt":"1742"},{"$numberInt":"1743"},{"$numberInt":"1744"},{"$numberInt":"1745"},{"$numberInt":"1746"},{"$numberInt":"1747"},{"$numberInt":"1748"},{"$numberInt":"1749"},{"$numberInt":"1750"},{"$numberInt":"1751"},{"$numberInt":"1752"},{"$numberInt":"1753"},{"$numberInt":"1754"},{"$numberInt":"1755"},{"$numberInt":"1756"},{"$numberInt":"1757"},{"$numberInt":"1758"},{"$numberInt":"1759"},{"$numberInt":"1760"},{"$numberInt":"1761"},{"$numberInt":"1762"},{"$numberInt":"1763"},{"$numberInt":"1764"},{"$numberInt":"1765"},{"$numberInt":"1766"},{"$numberInt":"1767"},{"$numberInt":"1768"},{"$numberInt":"1769"},{"$numberInt":"1770"},{"$numberInt":"1771"},{"$numberInt":"1772"},{"$numberInt":"1773"},{"$numberInt":"1774"},{"$numberInt":"1775"},{"$numberInt":"1776"},{"$numberInt":"1777"},{"$numberInt":"1778"},{"$numberInt":"1779"},{"$numberInt":"1780"},{"$numberInt":"1781"},{"$numberInt":"1782"},{"$numberInt":"1783"},{"$numberInt":"1784"},{"$numberInt":"1785"},{"$numberInt":"1786"},{"$numberInt":"1787"},{"$numberInt":"1788"},{"$numberInt":"1789"},{"$numberInt":"1790"},{"$numberInt":"1791"},{"$numberInt":"1792"},{"$numberInt":"1793"},{"$numberInt":"1794"},{"$numberInt":"1795"},{"$numberInt":"1796"},{"$numberInt":"1797"},{"$numberInt":"1798"},{"$numberInt":"1799"},{"$numberInt":"1800"},{"$numberInt":"1801"},{"$numberInt":"1802"},{"$numberInt":"1803"},{"$numberInt":"1804"},{"$numberInt":"1805"},{"$numberInt":"1806"},{"$numberInt":"1807"},{"$numberInt":"1808"},{"$numberInt":"1809"},{"$numberInt":"1810"},{"$numberInt":"1811"},{"$numberInt":"1812"},{"$numberInt":"1813"},{"$numberInt":"1814"},{"$numberInt":"1815"},{"$numberInt":"1816"},{"$numberInt":"1817"},{"$numberInt":"1818"},{"$numberInt":"1819"},{"$numberInt":"1820"},{"$numberInt":"1821"},{"$numberInt":"1822"},{"$numberInt":"1823"},{"$numberInt":"1824"},{"$numberInt":"1825"},{"$numberInt":"1826"},{"$numberInt":"1827"},{"$numberInt":"1828"},{"$numberInt":"1829"},{"$numberInt":"1830"},{"$numberInt":"1831"},{"$numberInt":"1832"},{"$numberInt":"1833"},{"$numberInt":"1834"},{"$numberInt":"1835"},{"$numberInt":"1836"},{"$numberInt":"1837"},{"$numberInt":"1838"},{"$numberInt":"1839"},{"$numberInt":"1840"},{"$numberInt":"1841"},{"$numberInt":"1842"},{"$numberInt":"1843"},{"$numberInt":"1844"},{"$numberInt":"1845"},{"$numberInt":"1846"},{"$numberInt":"1847"},{"$numberInt":"1848"},{"$numberInt":"1849"},{"$numberInt":"1850"},{"$numberInt":"1851"},{"$numberInt":"1852"},{"$numberInt":"1853"},{"$numberInt":"1854"},{"$numberInt":"1855"},{"$numberInt":"1856"},{"$numberInt":"1857"},{"$numberInt":"1858"},{"$numberInt":"1859"},{"$numberInt":"1860"},{"$numberInt":"1861"},{"$numberInt":"1862"},{"$numberInt":"1863"},{"$numberInt":"1864"},{"$numberInt":"1865"},{"$numberInt":"1866"},{"$numberInt":"1867"},{"$numberInt":"1868"},{"$numberInt":"1869"},{"$numberInt":"1870"},{"$numberInt":"1871"},{"$numberInt":"1872"},{"$numberInt":"1873"},{"$numberInt":"1874"},{"$numberInt":"1875"},{"$numberInt":"1876"},{"$numberInt":"1877"},{"$numberInt":"1878"},{"$numberInt":"1879"},{"$numberInt":"1880"},{"$numberInt":"1881"},{"$numberInt":"1882"},{"$numberInt":"1883"},{"$numberInt":"1884"},{"$numberInt":"1885"},{"$numberInt":"1886"},{"$numberInt":"1887"},{"$numberInt":"1888"},{"$numberInt":"1889"},{"$numberInt":"1890"},{"$numberInt":"1891"},{"$numberInt":"1892"},{"$numberInt":"1893"},{"$numberInt":"1894"},{"$numberInt":"1895"},{"$numberInt":"1896"},{"$numberInt":"1897"},{"$numberInt":"1898"},{"$numberInt":"1899"},{"$numberInt":"1900"},{"$numberInt":"1901"},{"$numberInt":"1902"},{"$numberInt":"1903"},{"$numberInt":"1904"},{"$numberInt":"1905"},{"$numberInt":"1906"},{"$numberInt":"1907"},{"$numberInt":"1908"},{"$numberInt":"1909"},{"$numberInt":"1910"},{"$numberInt":"1911"},{"$numberInt":"1912"},{"$numberInt":"1913"},{"$numberInt":"1914"},{"$numberInt":"1915"},{"$numberInt":"1916"},{"$numberInt":"1917"},{"$numberInt":"1918"},{"$numberInt":"1919"},{"$numberInt":"1920"},{"$numberInt":"1921"},{"$numberInt":"1922"},{"$numberInt":"1923"},{"$numberInt":"1924"},{"$numberInt":"1925"},{"$numberInt":"1926"},{"$numberInt":"1927"},{"$numberInt":"1928"},{"$numberInt":"1929"},{"$numberInt":"1930"},{"$numberInt":"1931"},{"$numberInt":"1932"},{"$numberInt":"1933"},{"$numberInt":"1934"},{"$numberInt":"1935"},{"$numberInt":"1936"},{"$numberInt":"1937"},{"$numberInt":"1938"},{"$numberInt":"1939"},{"$numberInt":"1940"},{"$numberInt":"1941"},{"$numberInt":"1942"},{"$numberInt":"1943"},{"$numberInt":"1944"},{"$numberInt":"1945"},{"$numberInt":"1946"},{"$numberInt":"1947"},{"$numberInt":"1948"},{"$numberInt":"1949"},{"$numberInt":"1950"},{"$numberInt":"1951"},{"$numberInt":"1952"},{"$numberInt":"1953"},{"$numberInt":"1954"},{"$numberInt":"1955"},{"$numberInt":"1956"},{"$numberInt":"1957"},{"$numberInt":"1958"},{"$numberInt":"1959"},{"$numberInt":"1960"},{"$numberInt":"1961"},{"$numberInt":"1962"},{"$numberInt":"1963"},{"$numberInt":"1964"},{"$numberInt":"1965"},{"$numberInt":"1966"},{"$numberInt":"1967"},{"$numberInt":"1968"},{"$numberInt":"1969"},{"$numberInt":"1970"},{"$numberInt":"1971"},{"$numberInt":"1972"},{"$numberInt":"1973"},{"$numberInt":"1974"},{"$numberInt":"1975"},{"$numberInt":"1976"},{"$numberInt":"1977"},{"$numberInt":"1978"},{"$numberInt":"1979"},{"$numberInt":"1980"},{"$numberInt":"1981"},{"$numberInt":"1982"},{"$numberInt":"1983"},{"$numberInt":"1984"},{"$numberInt":"1985"},{"$numberInt":"1986"},{"$numberInt":"1987"},{"$numberInt":"1988"},{"$numberInt":"1989"},{"$numberInt":"1990"},{"$numberInt":"1991"},{"$numberInt":"1992"},{"$numberInt":"1993"},{"$numberInt":"1994"},{"$numberInt":"1995"},{"$numberInt":"1996"},{"$numberInt":"1997"},{"$numberInt":"1998"},{"$numberInt":"1999"},{"$numberInt":"2000"},{"$numberInt":"2001"},{"$numberInt":"2002"},{"$numberInt":"2003"},{"$numberInt":"2004"},{"$numberInt":"2005"},{"$numberInt":"2006"},{"$numberInt":"2007"},{"$numberInt":"2008"},{"$numberInt":"2009"},{"$numberInt":"2010"},{"$numberInt":"2011"},{"$numberInt":"2012"},{"$numberInt":"2013"},{"$numberInt":"2014"},{"$numberInt":"2015"},{"$numberInt":"2016"},{"$numberInt":"2017"},{"$numberInt":"2018"},{"$numberInt":"2019"},{"$numberInt":"2020"},{"$numberInt":"2021"},{"$numberInt":"2022"},{"$numberInt":"2023"},{"$numberInt":"2024"},{"$numberInt":"2025"},{"$numberInt":"2026"},{"$numberInt":"2027"},{"$numberInt":"2028"},{"$numberInt":"2029"},{"$numberInt":"2030"},{"$numberInt":"2031"},{"$numberInt":"2032"},{"$numberInt":"2033"},{"$numberInt":"2034"},{"$numberInt":"2035"},{"$numberInt":"2036"},{"$numberInt":"2037"},{"$numberInt":"2038"},{"$numberInt":"2039"},{"$numberInt":"2040"},{"$numberInt":"2041"},{"$numberInt":"2042"},{"$numberInt":"2043"},{"$numberInt":"2044"},{"$numberInt":"2045"},{"$numberInt":"2046"},{"$numberInt":"2047"},{"$numberInt":"2048"},{"$numberInt":"2049"},{"$numberInt":"2050"},{"$numberInt":"2051"},{"$numberInt":"2052"},{"$numberInt":"2053"},{"$numberInt":"2054"},{"$numberInt":"2055"},{"$numberInt":"2056"},{"$numberInt":"2057"},{"$numberInt":"2058"},{"$numberInt":"2059"},{"$numberInt":"2060"},{"$numberInt":"2061"},{"$numberInt":"2062"},{"$numberInt":"2063"},{"$numberInt":"2064"},{"$numberInt":"2065"},{"$numberInt":"2066"},{"$numberInt":"2067"},{"$numberInt":"2068"},{"$numberInt":"2069"},{"$numberInt":"2070"},{"$numberInt":"2071"},{"$numberInt":"2072"},{"$numberInt":"2073"},{"$numberInt":"2074"},{"$numberInt":"2075"},{"$numberInt":"2076"},{"$numberInt":"2077"},{"$numberInt":"2078"},{"$numberInt":"2079"},{"$numberInt":"2080"},{"$numberInt":"2081"},{"$numberInt":"2082"},{"$numberInt":"2083"},{"$numberInt":"2084"},{"$numberInt":"2085"},{"$numberInt":"2086"},{"$numberInt":"2087"},{"$numberInt":"2088"},{"$numberInt":"2089"},{"$numberInt":"2090"},{"$numberInt":"2091"},{"$numberInt":"2092"},{"$numberInt":"2093"},{"$numberInt":"2094"},{"$numberInt":"2095"},{"$numberInt":"2096"},{"$numberInt":"2097"},{"$numberInt":"2098"},{"$numberInt":"2099"},{"$numberInt":"2100"},{"$numberInt":"2101"},{"$numberInt":"2102"},{"$numberInt":"2103"},{"$numberInt":"2104"},{"$numberInt":"2105"},{"$numberInt":"2106"},{"$numberInt":"2107"},{"$numberInt":"2108"},{"$numberInt":"2109"},{"$numberInt":"2110"},{"$numberInt":"2111"},{"$numberInt":"2112"},{"$numberInt":"2113"},{"$numberInt":"2114"},{"$numberInt":"2115"},{"$numberInt":"2116"},{"$numberInt":"2117"},{"$numberInt":"2118"},{"$numberInt":"2119"},{"$numberInt":"2120"},{"$numberInt":"2121"},{"$numberInt":"2122"},{"$numberInt":"2123"},{"$numberInt":"2124"},{"$numberInt":"2125"},{"$numberInt":"2126"},{"$numberInt":"2127"},{"$numberInt":"2128"},{"$numberInt":"2129"},{"$numberInt":"2130"},{"$numberInt":"2131"},{"$numberInt":"2132"},{"$numberInt":"2133"},{"$numberInt":"2134"},{"$numberInt":"2135"},{"$numberInt":"2136"},{"$numberInt":"2137"},{"$numberInt":"2138"},{"$numberInt":"2139"},{"$numberInt":"2140"},{"$numberInt":"2141"},{"$numberInt":"2142"},{"$numberInt":"2143"},{"$numberInt":"2144"},{"$numberInt":"2145"},{"$numberInt":"2146"},{"$numberInt":"2147"},{"$numberInt":"2148"},{"$numberInt":"2149"},{"$numberInt":"2150"},{"$numberInt":"2151"},{"$numberInt":"2152"},{"$numberInt":"2153"},{"$numberInt":"2154"},{"$numberInt":"2155"},{"$numberInt":"2156"},{"$numberInt":"2157"},{"$numberInt":"2158"},{"$numberInt":"2159"},{"$numberInt":"2160"},{"$numberInt":"2161"},{"$numberInt":"2162"},{"$numberInt":"2163"},{"$numberInt":"2164"},{"$numberInt":"2165"},{"$numberInt":"2166"},{"$numberInt":"2167"},{"$numberInt":"2168"},{"$numberInt":"2169"},{"$numberInt":"2170"},{"$numberInt":"2171"},{"$numberInt":"2172"},{"$numberInt":"2173"},{"$numberInt":"2174"},{"$numberInt":"2175"},{"$numberInt":"2176"},{"$numberInt":"2177"},{"$numberInt":"2178"},{"$numberInt":"2179"},{"$numberInt":"2180"},{"$numberInt":"2181"},{"$numberInt":"2182"},{"$numberInt":"2183"},{"$numberInt":"2184"},{"$numberInt":"2185"},{"$numberInt":"2186"},{"$numberInt":"2187"},{"$numberInt":"2188"},{"$numberInt":"2189"},{"$numberInt":"2190"},{"$numberInt":"2191"},{"$numberInt":"2192"},{"$numberInt":"2193"},{"$numberInt":"2194"},{"$numberInt":"2195"},{"$numberInt":"2196"},{"$numberInt":"2197"},{"$numberInt":"2198"},{"$numberInt":"2199"},{"$numberInt":"2200"},{"$numberInt":"2201"},{"$numberInt":"2202"},{"$numberInt":"2203"},{"$numberInt":"2204"},{"$numberInt":"2205"},{"$numberInt":"2206"},{"$numberInt":"2207"},{"$numberInt":"2208"},{"$numberInt":"2209"},{"$numberInt":"2210"},{"$numberInt":"2211"},{"$numberInt":"2212"},{"$numberInt":"2213"},{"$numberInt":"2214"},{"$numberInt":"2215"},{"$numberInt":"2216"},{"$numberInt":"2217"},{"$numberInt":"2218"},{"$numberInt":"2219"},{"$numberInt":"2220"},{"$numberInt":"2221"},{"$numberInt":"2222"},{"$numberInt":"2223"},{"$numberInt":"2224"},{"$numberInt":"2225"},{"$numberInt":"2226"},{"$numberInt":"2227"},{"$numberInt":"2228"},{"$numberInt":"2229"},{"$numberInt":"2230"},{"$numberInt":"2231"},{"$numberInt":"2232"},{"$numberInt":"2233"},{"$numberInt":"2234"},{"$numberInt":"2235"},{"$numberInt":"2236"},{"$numberInt":"2237"},{"$numberInt":"2238"},{"$numberInt":"2239"},{"$numberInt":"2240"},{"$numberInt":"2241"},{"$numberInt":"2242"},{"$numberInt":"2243"},{"$numberInt":"2244"},{"$numberInt":"2245"},{"$numberInt":"2246"},{"$numberInt":"2247"},{"$numberInt":"2248"},{"$numberInt":"2249"},{"$numberInt":"2250"},{"$numberInt":"2251"},{"$numberInt":"2252"},{"$numberInt":"2253"},{"$numberInt":"2254"},{"$numberInt":"2255"},{"$numberInt":"2256"},{"$numberInt":"2257"},{"$numberInt":"2258"},{"$numberInt":"2259"},{"$numberInt":"2260"},{"$numberInt":"2261"},{"$numberInt":"2262"},{"$numberInt":"2263"},{"$numberInt":"2264"},{"$numberInt":"2265"},{"$numberInt":"2266"},{"$numberInt":"2267"},{"$numberInt":"2268"},{"$numberInt":"2269"},{"$numberInt":"2270"},{"$numberInt":"2271"},{"$numberInt":"2272"},{"$numberInt":"2273"},{"$numberInt":"2274"},{"$numberInt":"2275"},{"$numberInt":"2276"},{"$numberInt":"2277"},{"$numberInt":"2278"},{"$numberInt":"2279"},{"$numberInt":"2280"},{"$numberInt":"2281"},{"$numberInt":"2282"},{"$numberInt":"2283"},{"$numberInt":"2284"},{"$numberInt":"2285"},{"$numberInt":"2286"},{"$numberInt":"2287"},{"$numberInt":"2288"},{"$numberInt":"2289"},{"$numberInt":"2290"},{"$numberInt":"2291"},{"$numberInt":"2292"},{"$numberInt":"2293"},{"$numberInt":"2294"},{"$numberInt":"2295"},{"$numberInt":"2296"},{"$numberInt":"2297"},{"$numberInt":"2298"},{"$numberInt":"2299"},{"$numberInt":"2300"},{"$numberInt":"2301"},{"$numberInt":"2302"},{"$numberInt":"2303"},{"$numberInt":"2304"},{"$numberInt":"2305"},{"$numberInt":"2306"},{"$numberInt":"2307"},{"$numberInt":"2308"},{"$numberInt":"2309"},{"$numberInt":"2310"},{"$numberInt":"2311"},{"$numberInt":"2312"},{"$numberInt":"2313"},{"$numberInt":"2314"},{"$numberInt":"2315"},{"$numberInt":"2316"},{"$numberInt":"2317"},{"$numberInt":"2318"},{"$numberInt":"2319"},{"$numberInt":"2320"},{"$numberInt":"2321"},{"$numberInt":"2322"},{"$numberInt":"2323"},{"$numberInt":"2324"},{"$numberInt":"2325"},{"$numberInt":"2326"},{"$numberInt":"2327"},{"$numberInt":"2328"},{"$numberInt":"2329"},{"$numberInt":"2330"},{"$numberInt":"2331"},{"$numberInt":"2332"},{"$numberInt":"2333"},{"$numberInt":"2334"},{"$numberInt":"2335"},{"$numberInt":"2336"},{"$numberInt":"2337"},{"$numberInt":"2338"},{"$numberInt":"2339"},{"$numberInt":"2340"},{"$numberInt":"2341"},{"$numberInt":"2342"},{"$numberInt":"2343"},{"$numberInt":"2344"},{"$numberInt":"2345"},{"$numberInt":"2346"},{"$numberInt":"2347"},{"$numberInt":"2348"},{"$numberInt":"2349"},{"$numberInt":"2350"},{"$numberInt":"2351"},{"$numberInt":"2352"},{"$numberInt":"2353"},{"$numberInt":"2354"},{"$numberInt":"2355"},{"$numberInt":"2356"},{"$numberInt":"2357"},{"$numberInt":"2358"},{"$numberInt":"2359"},{"$numberInt":"2360"},{"$numberInt":"2361"},{"$numberInt":"2362"},{"$numberInt":"2363"},{"$numberInt":"2364"},{"$numberInt":"2365"},{"$numberInt":"2366"},{"$numberInt":"2367"},{"$numberInt":"2368"},{"$numberInt":"2369"},{"$numberInt":"2370"},{"$numberInt":"2371"},{"$numberInt":"2372"},{"$numberInt":"2373"},{"$numberInt":"2374"},{"$numberInt":"2375"},{"$numberInt":"2376"},{"$numberInt":"2377"},{"$numberInt":"2378"},{"$numberInt":"2379"},{"$numberInt":"2380"},{"$numberInt":"2381"},{"$numberInt":"2382"},{"$numberInt":"2383"},{"$numberInt":"2384"},{"$numberInt":"2385"},{"$numberInt":"2386"},{"$numberInt":"2387"},{"$numberInt":"2388"},{"$numberInt":"2389"},{"$numberInt":"2390"},{"$numberInt":"2391"},{"$numberInt":"2392"},{"$numberInt":"2393"},{"$numberInt":"2394"},{"$numberInt":"2395"},{"$numberInt":"2396"},{"$numberInt":"2397"},{"$numberInt":"2398"},{"$numberInt":"2399"},{"$numberInt":"2400"},{"$numberInt":"2401"},{"$numberInt":"2402"},{"$numberInt":"2403"},{"$numberInt":"2404"},{"$numberInt":"2405"},{"$numberInt":"2406"},{"$numberInt":"2407"},{"$numberInt":"2408"},{"$numberInt":"2409"},{"$numberInt":"2410"},{"$numberInt":"2411"},{"$numberInt":"2412"},{"$numberInt":"2413"},{"$numberInt":"2414"},{"$numberInt":"2415"},{"$numberInt":"2416"},{"$numberInt":"2417"},{"$numberInt":"2418"},{"$numberInt":"2419"},{"$numberInt":"2420"},{"$numberInt":"2421"},{"$numberInt":"2422"},{"$numberInt":"2423"},{"$numberInt":"2424"},{"$numberInt":"2425"},{"$numberInt":"2426"},{"$numberInt":"2427"},{"$numberInt":"2428"},{"$numberInt":"2429"},{"$numberInt":"2430"},{"$numberInt":"2431"},{"$numberInt":"2432"},{"$numberInt":"2433"},{"$numberInt":"2434"},{"$numberInt":"2435"},{"$numberInt":"2436"},{"$numberInt":"2437"},{"$numberInt":"2438"},{"$numberInt":"2439"},{"$numberInt":"2440"},{"$numberInt":"2441"},{"$numberInt":"2442"},{"$numberInt":"2443"},{"$numberInt":"2444"},{"$numberInt":"2445"},{"$numberInt":"2446"},{"$numberInt":"2447"},{"$numberInt":"2448"},{"$numberInt":"2449"},{"$numberInt":"2450"},{"$numberInt":"2451"},{"$numberInt":"2452"},{"$numberInt":"2453"},{"$numberInt":"2454"},{"$numberInt":"2455"},{"$numberInt":"2456"},{"$numberInt":"2457"},{"$numberInt":"2458"},{"$numberInt":"2459"},{"$numberInt":"2460"},{"$numberInt":"2461"},{"$numberInt":"2462"},{"$numberInt":"2463"},{"$numberInt":"2464"},{"$numberInt":"2465"},{"$numberInt":"2466"},{"$numberInt":"2467"},{"$numberInt":"2468"},{"$numberInt":"2469"},{"$numberInt":"2470"},{"$numberInt":"2471"},{"$numberInt":"2472"},{"$numberInt":"2473"},{"$numberInt":"2474"},{"$numberInt":"2475"},{"$numberInt":"2476"},{"$numberInt":"2477"},{"$numberInt":"2478"},{"$numberInt":"2479"},{"$numberInt":"2480"},{"$numberInt":"2481"},{"$numberInt":"2482"},{"$numberInt":"2483"},{"$numberInt":"2484"},{"$numberInt":"2485"},{"$numberInt":"2486"},{"$numberInt":"2487"},{"$numberInt":"2488"},{"$numberInt":"2489"},{"$numberInt":"2490"},{"$numberInt":"2491"},{"$numberInt":"2492"},{"$numberInt":"2493"},{"$numberInt":"2494"},{"$numberInt":"2495"},{"$numberInt":"2496"},{"$numberInt":"2497"},{"$numberInt":"2498"},{"$numberInt":"2499"},{"$numberInt":"2500"},{"$numberInt":"2501"},{"$numberInt":"2502"},{"$numberInt":"2503"},{"$numberInt":"2504"},{"$numberInt":"2505"},{"$numberInt":"2506"},{"$numberInt":"2507"},{"$numberInt":"2508"},{"$numberInt":"2509"},{"$numberInt":"2510"},{"$numberInt":"2511"},{"$numberInt":"2512"},{"$numberInt":"2513"},{"$numberInt":"2514"},{"$numberInt":"2515"},{"$numberInt":"2516"},{"$numberInt":"2517"},{"$numberInt":"2518"},{"$numberInt":"2519"},{"$numberInt":"2520"},{"$numberInt":"2521"},{"$numberInt":"2522"},{"$numberInt":"2523"},{"$numberInt":"2524"},{"$numberInt":"2525"},{"$numberInt":"2526"},{"$numberInt":"2527"},{"$numberInt":"2528"},{"$numberInt":"2529"},{"$numberInt":"2530"},{"$numberInt":"2531"},{"$numberInt":"2532"},{"$numberInt":"2533"},{"$numberInt":"2534"},{"$numberInt":"2535"},{"$numberInt":"2536"},{"$numberInt":"2537"},{"$numberInt":"2538"},{"$numberInt":"2539"},{"$numberInt":"2540"},{"$numberInt":"2541"},{"$numberInt":"2542"},{"$numberInt":"2543"},{"$numberInt":"2544"},{"$numberInt":"2545"},{"$numberInt":"2546"},{"$numberInt":"2547"},{"$numberInt":"2548"},{"$numberInt":"2549"},{"$numberInt":"2550"},{"$numberInt":"2551"},{"$numberInt":"2552"},{"$numberInt":"2553"},{"$numberInt":"2554"},{"$numberInt":"2555"},{"$numberInt":"2556"},{"$numberInt":"2557"},{"$numberInt":"2558"},{"$numberInt":"2559"},{"$numberInt":"2560"},{"$numberInt":"2561"},{"$numberInt":"2562"},{"$numberInt":"2563"},{"$numberInt":"2564"},{"$numberInt":"2565"},{"$numberInt":"2566"},{"$numberInt":"2567"},{"$numberInt":"2568"},{"$numberInt":"2569"},{"$numberInt":"2570"},{"$numberInt":"2571"},{"$numberInt":"2572"},{"$numberInt":"2573"},{"$numberInt":"2574"},{"$numberInt":"2575"},{"$numberInt":"2576"},{"$numberInt":"2577"},{"$numberInt":"2578"},{"$numberInt":"2579"},{"$numberInt":"2580"},{"$numberInt":"2581"},{"$numberInt":"2582"},{"$numberInt":"2583"},{"$numberInt":"2584"},{"$numberInt":"2585"},{"$numberInt":"2586"},{"$numberInt":"2587"},{"$numberInt":"2588"},{"$numberInt":"2589"},{"$numberInt":"2590"},{"$numberInt":"2591"},{"$numberInt":"2592"},{"$numberInt":"2593"},{"$numberInt":"2594"},{"$numberInt":"2595"},{"$numberInt":"2596"},{"$numberInt":"2597"},{"$numberInt":"2598"},{"$numberInt":"2599"},{"$numberInt":"2600"},{"$numberInt":"2601"},{"$numberInt":"2602"},{"$numberInt":"2603"},{"$numberInt":"2604"},{"$numberInt":"2605"},{"$numberInt":"2606"},{"$numberInt":"2607"},{"$numberInt":"2608"},{"$numberInt":"2609"},{"$numberInt":"2610"},{"$numberInt":"2611"},{"$numberInt":"2612"},{"$numberInt":"2613"},{"$numberInt":"2614"},{"$numberInt":"2615"},{"$numberInt":"2616"},{"$numberInt":"2617"},{"$numberInt":"2618"},{"$numberInt":"2619"},{"$numberInt":"2620"},{"$numberInt":"2621"},{"$numberInt":"2622"},{"$numberInt":"2623"},{"$numberInt":"2624"},{"$numberInt":"2625"},{"$numberInt":"2626"},{"$numberInt":"2627"},{"$numberInt":"2628"},{"$numberInt":"2629"},{"$numberInt":"2630"},{"$numberInt":"2631"},{"$numberInt":"2632"},{"$numberInt":"2633"},{"$numberInt":"2634"},{"$numberInt":"2635"},{"$numberInt":"2636"},{"$numberInt":"2637"},{"$numberInt":"2638"},{"$numberInt":"2639"},{"$numberInt":"2640"},{"$numberInt":"2641"},{"$numberInt":"2642"},{"$numberInt":"2643"},{"$numberInt":"2644"},{"$numberInt":"2645"},{"$numberInt":"2646"},{"$numberInt":"2647"},{"$numberInt":"2648"},{"$numberInt":"2649"},{"$numberInt":"2650"},{"$numberInt":"2651"},{"$numberInt":"2652"},{"$numberInt":"2653"},{"$numberInt":"2654"},{"$numberInt":"2655"},{"$numberInt":"2656"},{"$numberInt":"2657"},{"$numberInt":"2658"},{"$numberInt":"2659"},{"$numberInt":"2660"},{"$numberInt":"2661"},{"$numberInt":"2662"},{"$numberInt":"2663"},{"$numberInt":"2664"},{"$numberInt":"2665"},{"$numberInt":"2666"},{"$numberInt":"2667"},{"$numberInt":"2668"},{"$numberInt":"2669"},{"$numberInt":"2670"},{"$numberInt":"2671"},{"$numberInt":"2672"},{"$numberInt":"2673"},{"$numberInt":"2674"},{"$numberInt":"2675"},{"$numberInt":"2676"},{"$numberInt":"2677"},{"$numberInt":"2678"},{"$numberInt":"2679"},{"$numberInt":"2680"},{"$numberInt":"2681"},{"$numberInt":"2682"},{"$numberInt":"2683"},{"$numberInt":"2684"},{"$numberInt":"2685"},{"$numberInt":"2686"},{"$numberInt":"2687"},{"$numberInt":"2688"},{"$numberInt":"2689"},{"$numberInt":"2690"},{"$numberInt":"2691"},{"$numberInt":"2692"},{"$numberInt":"2693"},{"$numberInt":"2694"},{"$numberInt":"2695"},{"$numberInt":"2696"},{"$numberInt":"2697"},{"$numberInt":"2698"},{"$numberInt":"2699"},{"$numberInt":"2700"},{"$numberInt":"2701"},{"$numberInt":"2702"},{"$numberInt":"2703"},{"$numberInt":"2704"},{"$numberInt":"2705"},{"$numberInt":"2706"},{"$numberInt":"2707"},{"$numberInt":"2708"},{"$numberInt":"2709"},{"$numberInt":"2710"},{"$numberInt":"2711"},{"$numberInt":"2712"},{"$numberInt":"2713"},{"$numberInt":"2714"},{"$numberInt":"2715"},{"$numberInt":"2716"},{"$numberInt":"2717"},{"$numberInt":"2718"},{"$numberInt":"2719"},{"$numberInt":"2720"},{"$numberInt":"2721"},{"$numberInt":"2722"},{"$numberInt":"2723"},{"$numberInt":"2724"},{"$numberInt":"2725"},{"$numberInt":"2726"},{"$numberInt":"2727"},{"$numberInt":"2728"},{"$numberInt":"2729"},{"$numberInt":"2730"},{"$numberInt":"2731"},{"$numberInt":"2732"},{"$numberInt":"2733"},{"$numberInt":"2734"},{"$numberInt":"2735"},{"$numberInt":"2736"},{"$numberInt":"2737"},{"$numberInt":"2738"},{"$numberInt":"2739"},{"$numberInt":"2740"},{"$numberInt":"2741"},{"$numberInt":"2742"},{"$numberInt":"2743"},{"$numberInt":"2744"},{"$numberInt":"2745"},{"$numberInt":"2746"},{"$numberInt":"2747"},{"$numberInt":"2748"},{"$numberInt":"2749"},{"$numberInt":"2750"},{"$numberInt":"2751"},{"$numberInt":"2752"},{"$numberInt":"2753"},{"$numberInt":"2754"},{"$numberInt":"2755"},{"$numberInt":"2756"},{"$numberInt":"2757"},{"$numberInt":"2758"},{"$numberInt":"2759"},{"$numberInt":"2760"},{"$numberInt":"2761"},{"$numberInt":"2762"},{"$numberInt":"2763"},{"$numberInt":"2764"},{"$numberInt":"2765"},{"$numberInt":"2766"},{"$numberInt":"2767"},{"$numberInt":"2768"},{"$numberInt":"2769"},{"$numberInt":"2770"},{"$numberInt":"2771"},{"$numberInt":"2772"},{"$numberInt":"2773"},{"$numberInt":"2774"},{"$numberInt":"2775"},{"$numberInt":"2776"},{"$numberInt":"2777"},{"$numberInt":"2778"},{"$numberInt":"2779"},{"$numberInt":"2780"},{"$numberInt":"2781"},{"$numberInt":"2782"},{"$numberInt":"2783"},{"$numberInt":"2784"},{"$numberInt":"2785"},{"$numberInt":"2786"},{"$numberInt":"2787"},{"$numberInt":"2788"},{"$numberInt":"2789"},{"$numberInt":"2790"},{"$numberInt":"2791"},{"$numberInt":"2792"},{"$numberInt":"2793"},{"$numberInt":"2794"},{"$numberInt":"2795"},{"$numberInt":"2796"},{"$numberInt":"2797"},{"$numberInt":"2798"},{"$numberInt":"2799"},{"$numberInt":"2800"},{"$numberInt":"2801"},{"$numberInt":"2802"},{"$numberInt":"2803"},{"$numberInt":"2804"},{"$numberInt":"2805"},{"$numberInt":"2806"},{"$numberInt":"2807"},{"$numberInt":"2808"},{"$numberInt":"2809"},{"$numberInt":"2810"},{"$numberInt":"2811"},{"$numberInt":"2812"},{"$numberInt":"2813"},{"$numberInt":"2814"},{"$numberInt":"2815"},{"$numberInt":"2816"},{"$numberInt":"2817"},{"$numberInt":"2818"},{"$numberInt":"2819"},{"$numberInt":"2820"},{"$numberInt":"2821"},{"$numberInt":"2822"},{"$numberInt":"2823"},{"$numberInt":"2824"},{"$numberInt":"2825"},{"$numberInt":"2826"},{"$numberInt":"2827"},{"$numberInt":"2828"},{"$numberInt":"2829"},{"$numberInt":"2830"},{"$numberInt":"2831"},{"$numberInt":"2832"},{"$numberInt":"2833"},{"$numberInt":"2834"},{"$numberInt":"2835"},{"$numberInt":"2836"},{"$numberInt":"2837"},{"$numberInt":"2838"},{"$numberInt":"2839"},{"$numberInt":"2840"},{"$numberInt":"2841"},{"$numberInt":"2842"},{"$numberInt":"2843"},{"$numberInt":"2844"},{"$numberInt":"2845"},{"$numberInt":"2846"},{"$numberInt":"2847"},{"$numberInt":"2848"},{"$numberInt":"2849"},{"$numberInt":"2850"},{"$numberInt":"2851"},{"$numberInt":"2852"},{"$numberInt":"2853"},{"$numberInt":"2854"},{"$numberInt":"2855"},{"$numberInt":"2856"},{"$numberInt":"2857"},{"$numberInt":"2858"},{"$numberInt":"2859"},{"$numberInt":"2860"},{"$numberInt":"2861"},{"$numberInt":"2862"},{"$numberInt":"2863"},{"$numberInt":"2864"},{"$numberInt":"2865"},{"$numberInt":"2866"},{"$numberInt":"2867"},{"$numberInt":"2868"},{"$numberInt":"2869"},{"$numberInt":"2870"},{"$numberInt":"2871"},{"$numberInt":"2872"},{"$numberInt":"2873"},{"$numberInt":"2874"},{"$numberInt":"2875"},{"$numberInt":"2876"},{"$numberInt":"2877"},{"$numberInt":"2878"},{"$numberInt":"2879"},{"$numberInt":"2880"},{"$numberInt":"2881"},{"$numberInt":"2882"},{"$numberInt":"2883"},{"$numberInt":"2884"},{"$numberInt":"2885"},{"$numberInt":"2886"},{"$numberInt":"2887"},{"$numberInt":"2888"},{"$numberInt":"2889"},{"$numberInt":"2890"},{"$numberInt":"2891"},{"$numberInt":"2892"},{"$numberInt":"2893"},{"$numberInt":"2894"},{"$numberInt":"2895"},{"$numberInt":"2896"},{"$numberInt":"2897"},{"$numberInt":"2898"},{"$numberInt":"2899"},{"$numberInt":"2900"},{"$numberInt":"2901"},{"$numberInt":"2902"},{"$numberInt":"2903"},{"$numberInt":"2904"},{"$numberInt":"2905"},{"$numberInt":"2906"},{"$numberInt":"2907"},{"$numberInt":"2908"},{"$numberInt":"2909"},{"$numberInt":"2910"},{"$numberInt":"2911"},{"$numberInt":"2912"},{"$numberInt":"2913"},{"$numberInt":"2914"},{"$numberInt":"2915"},{"$numberInt":"2916"},{"$numberInt":"2917"},{"$numberInt":"2918"},{"$numberInt":"2919"},{"$numberInt":"2920"},{"$numberInt":"2921"},{"$numberInt":"2922"},{"$numberInt":"2923"},{"$numberInt":"2924"},{"$numberInt":"2925"},{"$numberInt":"2926"},{"$numberInt":"2927"},{"$numberInt":"2928"},{"$numberInt":"2929"},{"$numberInt":"2930"},{"$numberInt":"2931"},{"$numberInt":"2932"},{"$numberInt":"2933"},{"$numberInt":"2934"},{"$numberInt":"2935"},{"$numberInt":"2936"},{"$numberInt":"2937"},{"$numberInt":"2938"},{"$numberInt":"2939"},{"$numberInt":"2940"},{"$numberInt":"2941"},{"$numberInt":"2942"},{"$numberInt":"2943"},{"$numberInt":"2944"},{"$numberInt":"2945"},{"$numberInt":"2946"},{"$numberInt":"2947"},{"$numberInt":"2948"},{"$numberInt":"2949"},{"$numberInt":"2950"},{"$numberInt":"2951"},{"$numberInt":"2952"},{"$numberInt":"2953"},{"$numberInt":"2954"},{"$numberInt":"2955"},{"$numberInt":"2956"},{"$numberInt":"2957"},{"$numberInt":"2958"},{"$numberInt":"2959"},{"$numberInt":"2960"},{"$numberInt":"2961"},{"$numberInt":"2962"},{"$numberInt":"2963"},{"$numberInt":"2964"},{"$numberInt":"2965"},{"$numberInt":"2966"},{"$numberInt":"2967"},{"$numberInt":"2968"},{"$numberInt":"2969"},{"$numberInt":"2970"},{"$numberInt":"2971"},{"$numberInt":"2972"},{"$numberInt":"2973"},{"$numberInt":"2974"},{"$numberInt":"2975"},{"$numberInt":"2976"},{"$numberInt":"2977"},{"$numberInt":"2978"},{"$numberInt":"2979"},{"$numberInt":"2980"},{"$numberInt":"2981"},{"$numberInt":"2982"},{"$numberInt":"2983"},{"$numberInt":"2984"},{"$numberInt":"2985"},{"$numberInt":"2986"},{"$numberInt":"2987"},{"$numberInt":"2988"},{"$numberInt":"2989"},{"$numberInt":"2990"},{"$numberInt":"2991"},{"$numberInt":"2992"},{"$numberInt":"2993"},{"$numberInt":"2994"},{"$numberInt":"2995"},{"$numberInt":"2996"},{"$numberInt":"2997"},{"$numberInt":"2998"},{"$numberInt":"2999"},{"$numberInt":"3000"},{"$numberInt":"3001"},{"$numberInt":"3002"},{"$numberInt":"3003"},{"$numberInt":"3004"},{"$numberInt":"3005"},{"$numberInt":"3006"},{"$numberInt":"3007"},{"$numberInt":"3008"},{"$numberInt":"3009"},{"$numberInt":"3010"},{"$numberInt":"3011"},{"$numberInt":"3012"},{"$numberInt":"3013"},{"$numberInt":"3014"},{"$numberInt":"3015"},{"$numberInt":"3016"},{"$numberInt":"3017"},{"$numberInt":"3018"},{"$numberInt":"3019"},{"$numberInt":"3020"},{"$numberInt":"3021"},{"$numberInt":"3022"},{"$numberInt":"3023"},{"$numberInt":"3024"},{"$numberInt":"3025"},{"$numberInt":"3026"},{"$numberInt":"3027"},{"$numberInt":"3028"},{"$numberInt":"3029"},{"$numberInt":"3030"},{"$numberInt":"3031"},{"$numberInt":"3032"},{"$numberInt":"3033"},{"$numberInt":"3034"},{"$numberInt":"3035"},{"$numberInt":"3036"},{"$numberInt":"3037"},{"$numberInt":"3038"},{"$numberInt":"3039"},{"$numberInt":"3040"},{"$numberInt":"3041"},{"$numberInt":"3042"},{"$numberInt":"3043"},{"$numberInt":"3044"},{"$numberInt":"3045"},{"$numberInt":"3046"},{"$numberInt":"3047"},{"$numberInt":"3048"},{"$numberInt":"3049"},{"$numberInt":"3050"},{"$numberInt":"3051"},{"$numberInt":"3052"},{"$numberInt":"3053"},{"$numberInt":"3054"},{"$numberInt":"3055"},{"$numberInt":"3056"},{"$numberInt":"3057"},{"$numberInt":"3058"},{"$numberInt":"3059"},{"$numberInt":"3060"},{"$numberInt":"3061"},{"$numberInt":"3062"},{"$numberInt":"3063"},{"$numberInt":"3064"},{"$numberInt":"3065"},{"$numberInt":"3066"},{"$numberInt":"3067"},{"$numberInt":"3068"},{"$numberInt":"3069"},{"$numberInt":"3070"},{"$numberInt":"3071"},{"$numberInt":"3072"},{"$numberInt":"3073"},{"$numberInt":"3074"},{"$numberInt":"3075"},{"$numberInt":"3076"},{"$numberInt":"3077"},{"$numberInt":"3078"},{"$numberInt":"3079"},{"$numberInt":"3080"},{"$numberInt":"3081"},{"$numberInt":"3082"},{"$numberInt":"3083"},{"$numberInt":"3084"},{"$numberInt":"3085"},{"$numberInt":"3086"},{"$numberInt":"3087"},{"$numberInt":"3088"},{"$numberInt":"3089"},{"$numberInt":"3090"},{"$numberInt":"3091"},{"$numberInt":"3092"},{"$numberInt":"3093"},{"$numberInt":"3094"},{"$numberInt":"3095"},{"$numberInt":"3096"},{"$numberInt":"3097"},{"$numberInt":"3098"},{"$numberInt":"3099"},{"$numberInt":"3100"},{"$numberInt":"3101"},{"$numberInt":"3102"},{"$numberInt":"3103"},{"$numberInt":"3104"},{"$numberInt":"3105"},{"$numberInt":"3106"},{"$numberInt":"3107"},{"$numberInt":"3108"},{"$numberInt":"3109"},{"$numberInt":"3110"},{"$numberInt":"3111"},{"$numberInt":"3112"},{"$numberInt":"3113"},{"$numberInt":"3114"},{"$numberInt":"3115"},{"$numberInt":"3116"},{"$numberInt":"3117"},{"$numberInt":"3118"},{"$numberInt":"3119"},{"$numberInt":"3120"},{"$numberInt":"3121"},{"$numberInt":"3122"},{"$numberInt":"3123"},{"$numberInt":"3124"},{"$numberInt":"3125"},{"$numberInt":"3126"},{"$numberInt":"3127"},{"$numberInt":"3128"},{"$numberInt":"3129"},{"$numberInt":"3130"},{"$numberInt":"3131"},{"$numberInt":"3132"},{"$numberInt":"3133"},{"$numberInt":"3134"},{"$numberInt":"3135"},{"$numberInt":"3136"},{"$numberInt":"3137"},{"$numberInt":"3138"},{"$numberInt":"3139"},{"$numberInt":"3140"},{"$numberInt":"3141"},{"$numberInt":"3142"},{"$numberInt":"3143"},{"$numberInt":"3144"},{"$numberInt":"3145"},{"$numberInt":"3146"},{"$numberInt":"3147"},{"$numberInt":"3148"},{"$numberInt":"3149"},{"$numberInt":"3150"},{"$numberInt":"3151"},{"$numberInt":"3152"},{"$numberInt":"3153"},{"$numberInt":"3154"},{"$numberInt":"3155"},{"$numberInt":"3156"},{"$numberInt":"3157"},{"$numberInt":"3158"},{"$numberInt":"3159"},{"$numberInt":"3160"},{"$numberInt":"3161"},{"$numberInt":"3162"},{"$numberInt":"3163"},{"$numberInt":"3164"},{"$numberInt":"3165"},{"$numberInt":"3166"},{"$numberInt":"3167"},{"$numberInt":"3168"},{"$numberInt":"3169"},{"$numberInt":"3170"},{"$numberInt":"3171"},{"$numberInt":"3172"},{"$numberInt":"3173"},{"$numberInt":"3174"},{"$numberInt":"3175"},{"$numberInt":"3176"},{"$numberInt":"3177"},{"$numberInt":"3178"},{"$numberInt":"3179"},{"$numberInt":"3180"},{"$numberInt":"3181"},{"$numberInt":"3182"},{"$numberInt":"3183"},{"$numberInt":"3184"},{"$numberInt":"3185"},{"$numberInt":"3186"},{"$numberInt":"3187"},{"$numberInt":"3188"},{"$numberInt":"3189"},{"$numberInt":"3190"},{"$numberInt":"3191"},{"$numberInt":"3192"},{"$numberInt":"3193"},{"$numberInt":"3194"},{"$numberInt":"3195"},{"$numberInt":"3196"},{"$numberInt":"3197"},{"$numberInt":"3198"},{"$numberInt":"3199"},{"$numberInt":"3200"},{"$numberInt":"3201"},{"$numberInt":"3202"},{"$numberInt":"3203"},{"$numberInt":"3204"},{"$numberInt":"3205"},{"$numberInt":"3206"},{"$numberInt":"3207"},{"$numberInt":"3208"},{"$numberInt":"3209"},{"$numberInt":"3210"},{"$numberInt":"3211"},{"$numberInt":"3212"},{"$numberInt":"3213"},{"$numberInt":"3214"},{"$numberInt":"3215"},{"$numberInt":"3216"},{"$numberInt":"3217"},{"$numberInt":"3218"},{"$numberInt":"3219"},{"$numberInt":"3220"},{"$numberInt":"3221"},{"$numberInt":"3222"},{"$numberInt":"3223"},{"$numberInt":"3224"},{"$numberInt":"3225"},{"$numberInt":"3226"},{"$numberInt":"3227"},{"$numberInt":"3228"},{"$numberInt":"3229"},{"$numberInt":"3230"},{"$numberInt":"3231"},{"$numberInt":"3232"},{"$numberInt":"3233"},{"$numberInt":"3234"},{"$numberInt":"3235"},{"$numberInt":"3236"},{"$numberInt":"3237"},{"$numberInt":"3238"},{"$numberInt":"3239"},{"$numberInt":"3240"},{"$numberInt":"3241"},{"$numberInt":"3242"},{"$numberInt":"3243"},{"$numberInt":"3244"},{"$numberInt":"3245"},{"$numberInt":"3246"},{"$numberInt":"3247"},{"$numberInt":"3248"},{"$numberInt":"3249"},{"$numberInt":"3250"},{"$numberInt":"3251"},{"$numberInt":"3252"},{"$numberInt":"3253"},{"$numberInt":"3254"},{"$numberInt":"3255"},{"$numberInt":"3256"},{"$numberInt":"3257"},{"$numberInt":"3258"},{"$numberInt":"3259"},{"$numberInt":"3260"},{"$numberInt":"3261"},{"$numberInt":"3262"},{"$numberInt":"3263"},{"$numberInt":"3264"},{"$numberInt":"3265"},{"$numberInt":"3266"},{"$numberInt":"3267"},{"$numberInt":"3268"},{"$numberInt":"3269"},{"$numberInt":"3270"},{"$numberInt":"3271"},{"$numberInt":"3272"},{"$numberInt":"3273"},{"$numberInt":"3274"},{"$numberInt":"3275"},{"$numberInt":"3276"},{"$numberInt":"3277"},{"$numberInt":"3278"},{"$numberInt":"3279"},{"$numberInt":"3280"},{"$numberInt":"3281"},{"$numberInt":"3282"},{"$numberInt":"3283"},{"$numberInt":"3284"},{"$numberInt":"3285"},{"$numberInt":"3286"},{"$numberInt":"3287"},{"$numberInt":"3288"},{"$numberInt":"3289"},{"$numberInt":"3290"},{"$numberInt":"3291"},{"$numberInt":"3292"},{"$numberInt":"3293"},{"$numberInt":"3294"},{"$numberInt":"3295"},{"$numberInt":"3296"},{"$numberInt":"3297"},{"$numberInt":"3298"},{"$numberInt":"3299"},{"$numberInt":"3300"},{"$numberInt":"3301"},{"$numberInt":"3302"},{"$numberInt":"3303"},{"$numberInt":"3304"},{"$numberInt":"3305"},{"$numberInt":"3306"},{"$numberInt":"3307"},{"$numberInt":"3308"},{"$numberInt":"3309"},{"$numberInt":"3310"},{"$numberInt":"3311"},{"$numberInt":"3312"},{"$numberInt":"3313"},{"$numberInt":"3314"},{"$numberInt":"3315"},{"$numberInt":"3316"},{"$numberInt":"3317"},{"$numberInt":"3318"},{"$numberInt":"3319"},{"$numberInt":"3320"},{"$numberInt":"3321"},{"$numberInt":"3322"},{"$numberInt":"3323"},{"$numberInt":"3324"},{"$numberInt":"3325"},{"$numberInt":"3326"},{"$numberInt":"3327"},{"$numberInt":"3328"},{"$numberInt":"3329"},{"$numberInt":"3330"},{"$numberInt":"3331"},{"$numberInt":"3332"},{"$numberInt":"3333"},{"$numberInt":"3334"},{"$numberInt":"3335"},{"$numberInt":"3336"},{"$numberInt":"3337"},{"$numberInt":"3338"},{"$numberInt":"3339"},{"$numberInt":"3340"},{"$numberInt":"3341"},{"$numberInt":"3342"},{"$numberInt":"3343"},{"$numberInt":"3344"},{"$numberInt":"3345"},{"$numberInt":"3346"},{"$numberInt":"3347"},{"$numberInt":"3348"},{"$numberInt":"3349"},{"$numberInt":"3350"},{"$numberInt":"3351"},{"$numberInt":"3352"},{"$numberInt":"3353"},{"$numberInt":"3354"},{"$numberInt":"3355"},{"$numberInt":"3356"},{"$numberInt":"3357"},{"$numberInt":"3358"},{"$numberInt":"3359"},{"$numberInt":"3360"},{"$numberInt":"3361"},{"$numberInt":"3362"},{"$numberInt":"3363"},{"$numberInt":"3364"},{"$numberInt":"3365"},{"$numberInt":"3366"},{"$numberInt":"3367"},{"$numberInt":"3368"},{"$numberInt":"3369"},{"$numberInt":"3370"},{"$numberInt":"3371"},{"$numberInt":"3372"},{"$numberInt":"3373"},{"$numberInt":"3374"},{"$numberInt":"3375"},{"$numberInt":"3376"},{"$numberInt":"3377"},{"$numberInt":"3378"},{"$numberInt":"3379"},{"$numberInt":"3380"},{"$numberInt":"3381"},{"$numberInt":"3382"},{"$numberInt":"3383"},{"$numberInt":"3384"},{"$numberInt":"3385"},{"$numberInt":"3386"},{"$numberInt":"3387"},{"$numberInt":"3388"},{"$numberInt":"3389"},{"$numberInt":"3390"},{"$numberInt":"3391"},{"$numberInt":"3392"},{"$numberInt":"3393"},{"$numberInt":"3394"},{"$numberInt":"3395"},{"$numberInt":"3396"},{"$numberInt":"3397"},{"$numberInt":"3398"},{"$numberInt":"3399"},{"$numberInt":"3400"},{"$numberInt":"3401"},{"$numberInt":"3402"},{"$numberInt":"3403"},{"$numberInt":"3404"},{"$numberInt":"3405"},{"$numberInt":"3406"},{"$numberInt":"3407"},{"$numberInt":"3408"},{"$numberInt":"3409"},{"$numberInt":"3410"},{"$numberInt":"3411"},{"$numberInt":"3412"},{"$numberInt":"3413"},{"$numberInt":"3414"},{"$numberInt":"3415"},{"$numberInt":"3416"},{"$numberInt":"3417"},{"$numberInt":"3418"},{"$numberInt":"3419"},{"$numberInt":"3420"},{"$numberInt":"3421"},{"$numberInt":"3422"},{"$numberInt":"3423"},{"$numberInt":"3424"},{"$numberInt":"3425"},{"$numberInt":"3426"},{"$numberInt":"3427"},{"$numberInt":"3428"},{"$numberInt":"3429"},{"$numberInt":"3430"},{"$numberInt":"3431"},{"$numberInt":"3432"},{"$numberInt":"3433"},{"$numberInt":"3434"},{"$numberInt":"3435"},{"$numberInt":"3436"},{"$numberInt":"3437"},{"$numberInt":"3438"},{"$numberInt":"3439"},{"$numberInt":"3440"},{"$numberInt":"3441"},{"$numberInt":"3442"},{"$numberInt":"3443"},{"$numberInt":"3444"},{"$numberInt":"3445"},{"$numberInt":"3446"},{"$numberInt":"3447"},{"$numberInt":"3448"},{"$numberInt":"3449"},{"$numberInt":"3450"},{"$numberInt":"3451"},{"$numberInt":"3452"},{"$numberInt":"3453"},{"$numberInt":"3454"},{"$numberInt":"3455"},{"$numberInt":"3456"},{"$numberInt":"3457"},{"$numberInt":"3458"},{"$numberInt":"3459"},{"$numberInt":"3460"},{"$numberInt":"3461"},{"$numberInt":"3462"},{"$numberInt":"3463"},{"$numberInt":"3464"},{"$numberInt":"3465"},{"$numberInt":"3466"},{"$numberInt":"3467"},{"$numberInt":"3468"},{"$numberInt":"3469"},{"$numberInt":"3470"},{"$numberInt":"3471"},{"$numberInt":"3472"},{"$numberInt":"3473"},{"$numberInt":"3474"},{"$numberInt":"3475"},{"$numberInt":"3476"},{"$numberInt":"3477"},{"$numberInt":"3478"},{"$numberInt":"3479"},{"$numberInt":"3480"},{"$numberInt":"3481"},{"$numberInt":"3482"},{"$numberInt":"3483"},{"$numberInt":"3484"},{"$numberInt":"3485"},{"$numberInt":"3486"},{"$numberInt":"3487"},{"$numberInt":"3488"},{"$numberInt":"3489"},{"$numberInt":"3490"},{"$numberInt":"3491"},{"$numberInt":"3492"},{"$numberInt":"3493"},{"$numberInt":"3494"},{"$numberInt":"3495"},{"$numberInt":"3496"},{"$numberInt":"3497"},{"$numberInt":"3498"},{"$numberInt":"3499"},{"$numberInt":"3500"},{"$numberInt":"3501"},{"$numberInt":"3502"},{"$numberInt":"3503"},{"$numberInt":"3504"},{"$numberInt":"3505"},{"$numberInt":"3506"},{"$numberInt":"3507"},{"$numberInt":"3508"},{"$numberInt":"3509"},{"$numberInt":"3510"},{"$numberInt":"3511"},{"$numberInt":"3512"},{"$numberInt":"3513"},{"$numberInt":"3514"},{"$numberInt":"3515"},{"$numberInt":"3516"},{"$numberInt":"3517"},{"$numberInt":"3518"},{"$numberInt":"3519"},{"$numberInt":"3520"},{"$numberInt":"3521"},{"$numberInt":"3522"},{"$numberInt":"3523"},{"$numberInt":"3524"},{"$numberInt":"3525"},{"$numberInt":"3526"},{"$numberInt":"3527"},{"$numberInt":"3528"},{"$numberInt":"3529"},{"$numberInt":"3530"},{"$numberInt":"3531"},{"$numberInt":"3532"},{"$numberInt":"3533"},{"$numberInt":"3534"},{"$numberInt":"3535"},{"$numberInt":"3536"},{"$numberInt":"3537"},{"$numberInt":"3538"},{"$numberInt":"3539"},{"$numberInt":"3540"},{"$numberInt":"3541"},{"$numberInt":"3542"},{"$numberInt":"3543"},{"$numberInt":"3544"},{"$numberInt":"3545"},{"$numberInt":"3546"},{"$numberInt":"3547"},{"$numberInt":"3548"},{"$numberInt":"3549"},{"$numberInt":"3550"},{"$numberInt":"3551"},{"$numberInt":"3552"},{"$numberInt":"3553"},{"$numberInt":"3554"},{"$numberInt":"3555"},{"$numberInt":"3556"},{"$numberInt":"3557"},{"$numberInt":"3558"},{"$numberInt":"3559"},{"$numberInt":"3560"},{"$numberInt":"3561"},{"$numberInt":"3562"},{"$numberInt":"3563"},{"$numberInt":"3564"},{"$numberInt":"3565"},{"$numberInt":"3566"},{"$numberInt":"3567"},{"$numberInt":"3568"},{"$numberInt":"3569"},{"$numberInt":"3570"},{"$numberInt":"3571"},{"$numberInt":"3572"},{"$numberInt":"3573"},{"$numberInt":"3574"},{"$numberInt":"3575"},{"$numberInt":"3576"},{"$numberInt":"3577"},{"$numberInt":"3578"},{"$numberInt":"3579"},{"$numberInt":"3580"},{"$numberInt":"3581"},{"$numberInt":"3582"},{"$numberInt":"3583"},{"$numberInt":"3584"},{"$numberInt":"3585"},{"$numberInt":"3586"},{"$numberInt":"3587"},{"$numberInt":"3588"},{"$numberInt":"3589"},{"$numberInt":"3590"},{"$numberInt":"3591"},{"$numberInt":"3592"},{"$numberInt":"3593"},{"$numberInt":"3594"},{"$numberInt":"3595"},{"$numberInt":"3596"},{"$numberInt":"3597"},{"$numberInt":"3598"},{"$numberInt":"3599"},{"$numberInt":"3600"},{"$numberInt":"3601"},{"$numberInt":"3602"},{"$numberInt":"3603"},{"$numberInt":"3604"},{"$numberInt":"3605"},{"$numberInt":"3606"},{"$numberInt":"3607"},{"$numberInt":"3608"},{"$numberInt":"3609"},{"$numberInt":"3610"},{"$numberInt":"3611"},{"$numberInt":"3612"},{"$numberInt":"3613"},{"$numberInt":"3614"},{"$numberInt":"3615"},{"$numberInt":"3616"},{"$numberInt":"3617"},{"$numberInt":"3618"},{"$numberInt":"3619"},{"$numberInt":"3620"},{"$numberInt":"3621"},{"$numberInt":"3622"},{"$numberInt":"3623"},{"$numberInt":"3624"},{"$numberInt":"3625"},{"$numberInt":"3626"},{"$numberInt":"3627"},{"$numberInt":"3628"},{"$numberInt":"3629"},{"$numberInt":"3630"},{"$numberInt":"3631"},{"$numberInt":"3632"},{"$numberInt":"3633"},{"$numberInt":"3634"},{"$numberInt":"3635"},{"$numberInt":"3636"},{"$numberInt":"3637"},{"$numberInt":"3638"},{"$numberInt":"3639"},{"$numberInt":"3640"},{"$numberInt":"3641"},{"$numberInt":"3642"},{"$numberInt":"3643"},{"$numberInt":"3644"},{"$numberInt":"3645"},{"$numberInt":"3646"},{"$numberInt":"3647"},{"$numberInt":"3648"},{"$numberInt":"3649"},{"$numberInt":"3650"},{"$numberInt":"3651"},{"$numberInt":"3652"},{"$numberInt":"3653"},{"$numberInt":"3654"},{"$numberInt":"3655"},{"$numberInt":"3656"},{"$numberInt":"3657"},{"$numberInt":"3658"},{"$numberInt":"3659"},{"$numberInt":"3660"},{"$numberInt":"3661"},{"$numberInt":"3662"},{"$numberInt":"3663"},{"$numberInt":"3664"},{"$numberInt":"3665"},{"$numberInt":"3666"},{"$numberInt":"3667"},{"$numberInt":"3668"},{"$numberInt":"3669"},{"$numberInt":"3670"},{"$numberInt":"3671"},{"$numberInt":"3672"},{"$numberInt":"3673"},{"$numberInt":"3674"},{"$numberInt":"3675"},{"$numberInt":"3676"},{"$numberInt":"3677"},{"$numberInt":"3678"},{"$numberInt":"3679"},{"$numberInt":"3680"},{"$numberInt":"3681"},{"$numberInt":"3682"},{"$numberInt":"3683"},{"$numberInt":"3684"},{"$numberInt":"3685"},{"$numberInt":"3686"},{"$numberInt":"3687"},{"$numberInt":"3688"},{"$numberInt":"3689"},{"$numberInt":"3690"},{"$numberInt":"3691"},{"$numberInt":"3692"},{"$numberInt":"3693"},{"$numberInt":"3694"},{"$numberInt":"3695"},{"$numberInt":"3696"},{"$numberInt":"3697"},{"$numberInt":"3698"},{"$numberInt":"3699"},{"$numberInt":"3700"},{"$numberInt":"3701"},{"$numberInt":"3702"},{"$numberInt":"3703"},{"$numberInt":"3704"},{"$numberInt":"3705"},{"$numberInt":"3706"},{"$numberInt":"3707"},{"$numberInt":"3708"},{"$numberInt":"3709"},{"$numberInt":"3710"},{"$numberInt":"3711"},{"$numberInt":"3712"},{"$numberInt":"3713"},{"$numberInt":"3714"},{"$numberInt":"3715"},{"$numberInt":"3716"},{"$numberInt":"3717"},{"$numberInt":"3718"},{"$numberInt":"3719"},{"$numberInt":"3720"},{"$numberInt":"3721"},{"$numberInt":"3722"},{"$numberInt":"3723"},{"$numberInt":"3724"},{"$numberInt":"3725"},{"$numberInt":"3726"},{"$numberInt":"3727"},{"$numberInt":"3728"},{"$numberInt":"3729"},{"$numberInt":"3730"},{"$numberInt":"3731"},{"$numberInt":"3732"},{"$numberInt":"3733"},{"$numberInt":"3734"},{"$numberInt":"3735"},{"$numberInt":"3736"},{"$numberInt":"3737"},{"$numberInt":"3738"},{"$numberInt":"3739"},{"$numberInt":"3740"},{"$numberInt":"3741"},{"$numberInt":"3742"},{"$numberInt":"3743"},{"$numberInt":"3744"},{"$numberInt":"3745"},{"$numberInt":"3746"},{"$numberInt":"3747"},{"$numberInt":"3748"},{"$numberInt":"3749"},{"$numberInt":"3750"},{"$numberInt":"3751"},{"$numberInt":"3752"},{"$numberInt":"3753"},{"$numberInt":"3754"},{"$numberInt":"3755"},{"$numberInt":"3756"},{"$numberInt":"3757"},{"$numberInt":"3758"},{"$numberInt":"3759"},{"$numberInt":"3760"},{"$numberInt":"3761"},{"$numberInt":"3762"},{"$numberInt":"3763"},{"$numberInt":"3764"},{"$numberInt":"3765"},{"$numberInt":"3766"},{"$numberInt":"3767"},{"$numberInt":"3768"},{"$numberInt":"3769"},{"$numberInt":"3770"},{"$numberInt":"3771"},{"$numberInt":"3772"},{"$numberInt":"3773"},{"$numberInt":"3774"},{"$numberInt":"3775"},{"$numberInt":"3776"},{"$numberInt":"3777"},{"$numberInt":"3778"},{"$numberInt":"3779"},{"$numberInt":"3780"},{"$numberInt":"3781"},{"$numberInt":"3782"},{"$numberInt":"3783"},{"$numberInt":"3784"},{"$numberInt":"3785"},{"$numberInt":"3786"},{"$numberInt":"3787"},{"$numberInt":"3788"},{"$numberInt":"3789"},{"$numberInt":"3790"},{"$numberInt":"3791"},{"$numberInt":"3792"},{"$numberInt":"3793"},{"$numberInt":"3794"},{"$numberInt":"3795"},{"$numberInt":"3796"},{"$numberInt":"3797"},{"$numberInt":"3798"},{"$numberInt":"3799"},{"$numberInt":"3800"},{"$numberInt":"3801"},{"$numberInt":"3802"},{"$numberInt":"3803"},{"$numberInt":"3804"},{"$numberInt":"3805"},{"$numberInt":"3806"},{"$numberInt":"3807"},{"$numberInt":"3808"},{"$numberInt":"3809"},{"$numberInt":"3810"},{"$numberInt":"3811"},{"$numberInt":"3812"},{"$numberInt":"3813"},{"$numberInt":"3814"},{"$numberInt":"3815"},{"$numberInt":"3816"},{"$numberInt":"3817"},{"$numberInt":"3818"},{"$numberInt":"3819"},{"$numberInt":"3820"},{"$numberInt":"3821"},{"$numberInt":"3822"},{"$numberInt":"3823"},{"$numberInt":"3824"},{"$numberInt":"3825"},{"$numberInt":"3826"},{"$numberInt":"3827"},{"$numberInt":"3828"},{"$numberInt":"3829"},{"$numberInt":"3830"},{"$numberInt":"3831"},{"$numberInt":"3832"},{"$numberInt":"3833"},{"$numberInt":"3834"},{"$numberInt":"3835"},{"$numberInt":"3836"},{"$numberInt":"3837"},{"$numberInt":"3838"},{"$numberInt":"3839"},{"$numberInt":"3840"},{"$numberInt":"3841"},{"$numberInt":"3842"},{"$numberInt":"3843"},{"$numberInt":"3844"},{"$numberInt":"3845"},{"$numberInt":"3846"},{"$numberInt":"3847"},{"$numberInt":"3848"},{"$numberInt":"3849"},{"$numberInt":"3850"},{"$numberInt":"3851"},{"$numberInt":"3852"},{"$numberInt":"3853"},{"$numberInt":"3854"},{"$numberInt":"3855"},{"$numberInt":"3856"},{"$numberInt":"3857"},{"$numberInt":"3858"},{"$numberInt":"3859"},{"$numberInt":"3860"},{"$numberInt":"3861"},{"$numberInt":"3862"},{"$numberInt":"3863"},{"$numberInt":"3864"},{"$numberInt":"3865"},{"$numberInt":"3866"},{"$numberInt":"3867"},{"$numberInt":"3868"},{"$numberInt":"3869"},{"$numberInt":"3870"},{"$numberInt":"3871"},{"$numberInt":"3872"},{"$numberInt":"3873"},{"$numberInt":"3874"},{"$numberInt":"3875"},{"$numberInt":"3876"},{"$numberInt":"3877"},{"$numberInt":"3878"},{"$numberInt":"3879"},{"$numberInt":"3880"},{"$numberInt":"3881"},{"$numberInt":"3882"},{"$numberInt":"3883"},{"$numberInt":"3884"},{"$numberInt":"3885"},{"$numberInt":"3886"},{"$numberInt":"3887"},{"$numberInt":"3888"},{"$numberInt":"3889"},{"$numberInt":"3890"},{"$numberInt":"3891"},{"$numberInt":"3892"},{"$numberInt":"3893"},{"$numberInt":"3894"},{"$numberInt":"3895"},{"$numberInt":"3896"},{"$numberInt":"3897"},{"$numberInt":"3898"},{"$numberInt":"3899"},{"$numberInt":"3900"},{"$numberInt":"3901"},{"$numberInt":"3902"},{"$numberInt":"3903"},{"$numberInt":"3904"},{"$numberInt":"3905"},{"$numberInt":"3906"},{"$numberInt":"3907"},{"$numberInt":"3908"},{"$numberInt":"3909"},{"$numberInt":"3910"},{"$numberInt":"3911"},{"$numberInt":"3912"},{"$numberInt":"3913"},{"$numberInt":"3914"},{"$numberInt":"3915"},{"$numberInt":"3916"},{"$numberInt":"3917"},{"$numberInt":"3918"},{"$numberInt":"3919"},{"$numberInt":"3920"},{"$numberInt":"3921"},{"$numberInt":"3922"},{"$numberInt":"3923"},{"$numberInt":"3924"},{"$numberInt":"3925"},{"$numberInt":"3926"},{"$numberInt":"3927"},{"$numberInt":"3928"},{"$numberInt":"3929"},{"$numberInt":"3930"},{"$numberInt":"3931"},{"$numberInt":"3932"},{"$numberInt":"3933"},{"$numberInt":"3934"},{"$numberInt":"3935"},{"$numberInt":"3936"},{"$numberInt":"3937"},{"$numberInt":"3938"},{"$numberInt":"3939"},{"$numberInt":"3940"},{"$numberInt":"3941"},{"$numberInt":"3942"},{"$numberInt":"3943"},{"$numberInt":"3944"},{"$numberInt":"3945"},{"$numberInt":"3946"},{"$numberInt":"3947"},{"$numberInt":"3948"},{"$numberInt":"3949"},{"$numberInt":"3950"},{"$numberInt":"3951"},{"$numberInt":"3952"},{"$numberInt":"3953"},{"$numberInt":"3954"},{"$numberInt":"3955"},{"$numberInt":"3956"},{"$numberInt":"3957"},{"$numberInt":"3958"},{"$numberInt":"3959"},{"$numberInt":"3960"},{"$numberInt":"3961"},{"$numberInt":"3962"},{"$numberInt":"3963"},{"$numberInt":"3964"},{"$numberInt":"3965"},{"$numberInt":"3966"},{"$numberInt":"3967"},{"$numberInt":"3968"},{"$numberInt":"3969"},{"$numberInt":"3970"},{"$numberInt":"3971"},{"$numberInt":"3972"},{"$numberInt":"3973"},{"$numberInt":"3974"},{"$numberInt":"3975"},{"$numberInt":"3976"},{"$numberInt":"3977"},{"$numberInt":"3978"},{"$numberInt":"3979"},{"$numberInt":"3980"},{"$numberInt":"3981"},{"$numberInt":"3982"},{"$numberInt":"3983"},{"$numberInt":"3984"},{"$numberInt":"3985"},{"$numberInt":"3986"},{"$numberInt":"3987"},{"$numberInt":"3988"},{"$numberInt":"3989"},{"$numberInt":"3990"},{"$numberInt":"3991"},{"$numberInt":"3992"},{"$numberInt":"3993"},{"$numberInt":"3994"},{"$numberInt":"3995"},{"$numberInt":"3996"},{"$numberInt":"3997"},{"$numberInt":"3998"},{"$numberInt":"3999"},{"$numberInt":"4000"},{"$numberInt":"4001"},{"$numberInt":"4002"},{"$numberInt":"4003"},{"$numberInt":"4004"},{"$numberInt":"4005"},{"$numberInt":"4006"},{"$numberInt":"4007"},{"$numberInt":"4008"},{"$numberInt":"4009"},{"$numberInt":"4010"},{"$numberInt":"4011"},{"$numberInt":"4012"},{"$numberInt":"4013"},{"$numberInt":"4014"},{"$numberInt":"4015"},{"$numberInt":"4016"},{"$numberInt":"4017"},{"$numberInt":"4018"},{"$numberInt":"4019"},{"$numberInt":"4020"},{"$numberInt":"4021"},{"$numberInt":"4022"},{"$numberInt":"4023"},{"$numberInt":"4024"},{"$numberInt":"4025"},{"$numberInt":"4026"},{"$numberInt":"4027"},{"$numberInt":"4028"},{"$numberInt":"4029"},{"$numberInt":"4030"},{"$numberInt":"4031"},{"$numberInt":"4032"},{"$numberInt":"4033"},{"$numberInt":"4034"},{"$numberInt":"4035"},{"$numberInt":"4036"},{"$numberInt":"4037"},{"$numberInt":"4038"},{"$numberInt":"4039"},{"$numberInt":"4040"},{"$numberInt":"4041"},{"$numberInt":"4042"},{"$numberInt":"4043"},{"$numberInt":"4044"},{"$numberInt":"4045"},{"$numberInt":"4046"},{"$numberInt":"4047"},{"$numberInt":"4048"},{"$numberInt":"4049"},{"$numberInt":"4050"},{"$numberInt":"4051"},{"$numberInt":"4052"},{"$numberInt":"4053"},{"$numberInt":"4054"},{"$numberInt":"4055"},{"$numberInt":"4056"},{"$numberInt":"4057"},{"$numberInt":"4058"},{"$numberInt":"4059"},{"$numberInt":"4060"},{"$numberInt":"4061"},{"$numberInt":"4062"},{"$numberInt":"4063"},{"$numberInt":"4064"},{"$numberInt":"4065"},{"$numberInt":"4066"},{"$numberInt":"4067"},{"$numberInt":"4068"},{"$numberInt":"4069"},{"$numberInt":"4070"},{"$numberInt":"4071"},{"$numberInt":"4072"},{"$numberInt":"4073"},{"$numberInt":"4074"},{"$numberInt":"4075"},{"$numberInt":"4076"},{"$numberInt":"4077"},{"$numberInt":"4078"},{"$numberInt":"4079"},{"$numberInt":"4080"},{"$numberInt":"4081"},{"$numberInt":"4082"},{"$numberInt":"4083"},{"$numberInt":"4084"},{"$numberInt":"4085"},{"$numberInt":"4086"},{"$numberInt":"4087"},{"$numberInt":"4088"},{"$numberInt":"4089"},{"$numberInt":"4090"},{"$numberInt":"4091"},{"$numberInt":"4092"},{"$numberInt":"4093"},{"$numberInt":"4094"},{"$numberInt":"4095"},{"$numberInt":"4096"},{"$numberInt":"4097"},{"$numberInt":"4098"},{"$numberInt":"4099"},{"$numberInt":"4100"},{"$numberInt":"4101"},{"$numberInt":"4102"},{"$numberInt":"4103"},{"$numberInt":"4104"},{"$numberInt":"4105"},{"$numberInt":"4106"},{"$numberInt":"4107"},{"$numberInt":"4108"},{"$numberInt":"4109"},{"$numberInt":"4110"},{"$numberInt":"4111"},{"$numberInt":"4112"},{"$numberInt":"4113"},{"$numberInt":"4114"},{"$numberInt":"4115"},{"$numberInt":"4116"},{"$numberInt":"4117"},{"$numberInt":"4118"},{"$numberInt":"4119"},{"$numberInt":"4120"},{"$numberInt":"4121"},{"$numberInt":"4122"},{"$numberInt":"4123"},{"$numberInt":"4124"},{"$numberInt":"4125"},{"$numberInt":"4126"},{"$numberInt":"4127"},{"$numberInt":"4128"},{"$numberInt":"4129"},{"$numberInt":"4130"},{"$numberInt":"4131"},{"$numberInt":"4132"},{"$numberInt":"4133"},{"$numberInt":"4134"},{"$numberInt":"4135"},{"$numberInt":"4136"},{"$numberInt":"4137"},{"$numberInt":"4138"},{"$numberInt":"4139"},{"$numberInt":"4140"},{"$numberInt":"4141"},{"$numberInt":"4142"},{"$numberInt":"4143"},{"$numberInt":"4144"},{"$numberInt":"4145"},{"$numberInt":"4146"},{"$numberInt":"4147"},{"$numberInt":"4148"},{"$numberInt":"4149"},{"$numberInt":"4150"},{"$numberInt":"4151"},{"$numberInt":"4152"},{"$numberInt":"4153"},{"$numberInt":"4154"},{"$numberInt":"4155"},{"$numberInt":"4156"},{"$numberInt":"4157"},{"$numberInt":"4158"},{"$numberInt":"4159"},{"$numberInt":"4160"},{"$numberInt":"4161"},{"$numberInt":"4162"},{"$numberInt":"4163"},{"$numberInt":"4164"},{"$numberInt":"4165"},{"$numberInt":"4166"},{"$numberInt":"4167"},{"$numberInt":"4168"},{"$numberInt":"4169"},{"$numberInt":"4170"},{"$numberInt":"4171"},{"$numberInt":"4172"},{"$numberInt":"4173"},{"$numberInt":"4174"},{"$numberInt":"4175"},{"$numberInt":"4176"},{"$numberInt":"4177"},{"$numberInt":"4178"},{"$numberInt":"4179"},{"$numberInt":"4180"},{"$numberInt":"4181"},{"$numberInt":"4182"},{"$numberInt":"4183"},{"$numberInt":"4184"},{"$numberInt":"4185"},{"$numberInt":"4186"},{"$numberInt":"4187"},{"$numberInt":"4188"},{"$numberInt":"4189"},{"$numberInt":"4190"},{"$numberInt":"4191"},{"$numberInt":"4192"},{"$numberInt":"4193"},{"$numberInt":"4194"},{"$numberInt":"4195"},{"$numberInt":"4196"},{"$numberInt":"4197"},{"$numberInt":"4198"},{"$numberInt":"4199"},{"$numberInt":"4200"},{"$numberInt":"4201"},{"$numberInt":"4202"},{"$numberInt":"4203"},{"$numberInt":"4204"},{"$numberInt":"4205"},{"$numberInt":"4206"},{"$numberInt":"4207"},{"$numberInt":"4208"},{"$numberInt":"4209"},{"$numberInt":"4210"},{"$numberInt":"4211"},{"$numberInt":"4212"},{"$numberInt":"4213"},{"$numberInt":"4214"},{"$numberInt":"4215"},{"$numberInt":"4216"},{"$numberInt":"4217"},{"$numberInt":"4218"},{"$numberInt":"4219"},{"$numberInt":"4220"},{"$numberInt":"4221"},{"$numberInt":"4222"},{"$numberInt":"4223"},{"$numberInt":"4224"},{"$numberInt":"4225"},{"$numberInt":"4226"},{"$numberInt":"4227"},{"$numberInt":"4228"},{"$numberInt":"4229"},{"$numberInt":"4230"},{"$numberInt":"4231"},{"$numberInt":"4232"},{"$numberInt":"4233"},{"$numberInt":"4234"},{"$numberInt":"4235"},{"$numberInt":"4236"},{"$numberInt":"4237"},{"$numberInt":"4238"},{"$numberInt":"4239"},{"$numberInt":"4240"},{"$numberInt":"4241"},{"$numberInt":"4242"},{"$numberInt":"4243"},{"$numberInt":"4244"},{"$numberInt":"4245"},{"$numberInt":"4246"},{"$numberInt":"4247"},{"$numberInt":"4248"},{"$numberInt":"4249"},{"$numberInt":"4250"},{"$numberInt":"4251"},{"$numberInt":"4252"},{"$numberInt":"4253"},{"$numberInt":"4254"},{"$numberInt":"4255"},{"$numberInt":"4256"},{"$numberInt":"4257"},{"$numberInt":"4258"},{"$numberInt":"4259"},{"$numberInt":"4260"},{"$numberInt":"4261"},{"$numberInt":"4262"},{"$numberInt":"4263"},{"$numberInt":"4264"},{"$numberInt":"4265"},{"$numberInt":"4266"},{"$numberInt":"4267"},{"$numberInt":"4268"},{"$numberInt":"4269"},{"$numberInt":"4270"},{"$numberInt":"4271"},{"$numberInt":"4272"},{"$numberInt":"4273"},{"$numberInt":"4274"},{"$numberInt":"4275"},{"$numberInt":"4276"},{"$numberInt":"4277"},{"$numberInt":"4278"},{"$numberInt":"4279"},{"$numberInt":"4280"},{"$numberInt":"4281"},{"$numberInt":"4282"},{"$numberInt":"4283"},{"$numberInt":"4284"},{"$numberInt":"4285"},{"$numberInt":"4286"},{"$numberInt":"4287"},{"$numberInt":"4288"},{"$numberInt":"4289"},{"$numberInt":"4290"},{"$numberInt":"4291"},{"$numberInt":"4292"},{"$numberInt":"4293"},{"$numberInt":"4294"},{"$numberInt":"4295"},{"$numberInt":"4296"},{"$numberInt":"4297"},{"$numberInt":"4298"},{"$numberInt":"4299"},{"$numberInt":"4300"},{"$numberInt":"4301"},{"$numberInt":"4302"},{"$numberInt":"4303"},{"$numberInt":"4304"},{"$numberInt":"4305"},{"$numberInt":"4306"},{"$numberInt":"4307"},{"$numberInt":"4308"},{"$numberInt":"4309"},{"$numberInt":"4310"},{"$numberInt":"4311"},{"$numberInt":"4312"},{"$numberInt":"4313"},{"$numberInt":"4314"},{"$numberInt":"4315"},{"$numberInt":"4316"},{"$numberInt":"4317"},{"$numberInt":"4318"},{"$numberInt":"4319"},{"$numberInt":"4320"},{"$numberInt":"4321"},{"$numberInt":"4322"},{"$numberInt":"4323"},{"$numberInt":"4324"},{"$numberInt":"4325"},{"$numberInt":"4326"},{"$numberInt":"4327"},{"$numberInt":"4328"},{"$numberInt":"4329"},{"$numberInt":"4330"},{"$numberInt":"4331"},{"$numberInt":"4332"},{"$numberInt":"4333"},{"$numberInt":"4334"},{"$numberInt":"4335"},{"$numberInt":"4336"},{"$numberInt":"4337"},{"$numberInt":"4338"},{"$numberInt":"4339"},{"$numberInt":"4340"},{"$numberInt":"4341"},{"$numberInt":"4342"},{"$numberInt":"4343"},{"$numberInt":"4344"},{"$numberInt":"4345"},{"$numberInt":"4346"},{"$numberInt":"4347"},{"$numberInt":"4348"},{"$numberInt":"4349"},{"$numberInt":"4350"},{"$numberInt":"4351"},{"$numberInt":"4352"},{"$numberInt":"4353"},{"$numberInt":"4354"},{"$numberInt":"4355"},{"$numberInt":"4356"},{"$numberInt":"4357"},{"$numberInt":"4358"},{"$numberInt":"4359"},{"$numberInt":"4360"},{"$numberInt":"4361"},{"$numberInt":"4362"},{"$numberInt":"4363"},{"$numberInt":"4364"},{"$numberInt":"4365"},{"$numberInt":"4366"},{"$numberInt":"4367"},{"$numberInt":"4368"},{"$numberInt":"4369"},{"$numberInt":"4370"},{"$numberInt":"4371"},{"$numberInt":"4372"},{"$numberInt":"4373"},{"$numberInt":"4374"},{"$numberInt":"4375"},{"$numberInt":"4376"},{"$numberInt":"4377"},{"$numberInt":"4378"},{"$numberInt":"4379"},{"$numberInt":"4380"},{"$numberInt":"4381"},{"$numberInt":"4382"},{"$numberInt":"4383"},{"$numberInt":"4384"},{"$numberInt":"4385"},{"$numberInt":"4386"},{"$numberInt":"4387"},{"$numberInt":"4388"},{"$numberInt":"4389"},{"$numberInt":"4390"},{"$numberInt":"4391"},{"$numberInt":"4392"},{"$numberInt":"4393"},{"$numberInt":"4394"},{"$numberInt":"4395"},{"$numberInt":"4396"},{"$numberInt":"4397"},{"$numberInt":"4398"},{"$numberInt":"4399"},{"$numberInt":"4400"},{"$numberInt":"4401"},{"$numberInt":"4402"},{"$numberInt":"4403"},{"$numberInt":"4404"},{"$numberInt":"4405"},{"$numberInt":"4406"},{"$numberInt":"4407"},{"$numberInt":"4408"},{"$numberInt":"4409"},{"$numberInt":"4410"},{"$numberInt":"4411"},{"$numberInt":"4412"},{"$numberInt":"4413"},{"$numberInt":"4414"},{"$numberInt":"4415"},{"$numberInt":"4416"},{"$numberInt":"4417"},{"$numberInt":"4418"},{"$numberInt":"4419"},{"$numberInt":"4420"},{"$numberInt":"4421"},{"$numberInt":"4422"},{"$numberInt":"4423"},{"$numberInt":"4424"},{"$numberInt":"4425"},{"$numberInt":"4426"},{"$numberInt":"4427"},{"$numberInt":"4428"},{"$numberInt":"4429"},{"$numberInt":"4430"},{"$numberInt":"4431"},{"$numberInt":"4432"},{"$numberInt":"4433"},{"$numberInt":"4434"},{"$numberInt":"4435"},{"$numberInt":"4436"},{"$numberInt":"4437"},{"$numberInt":"4438"},{"$numberInt":"4439"},{"$numberInt":"4440"},{"$numberInt":"4441"},{"$numberInt":"4442"},{"$numberInt":"4443"},{"$numberInt":"4444"},{"$numberInt":"4445"},{"$numberInt":"4446"},{"$numberInt":"4447"},{"$numberInt":"4448"},{"$numberInt":"4449"},{"$numberInt":"4450"},{"$numberInt":"4451"},{"$numberInt":"4452"},{"$numberInt":"4453"},{"$numberInt":"4454"},{"$numberInt":"4455"},{"$numberInt":"4456"},{"$numberInt":"4457"},{"$numberInt":"4458"},{"$numberInt":"4459"},{"$numberInt":"4460"},{"$numberInt":"4461"},{"$numberInt":"4462"},{"$numberInt":"4463"},{"$numberInt":"4464"},{"$numberInt":"4465"},{"$numberInt":"4466"},{"$numberInt":"4467"},{"$numberInt":"4468"},{"$numberInt":"4469"},{"$numberInt":"4470"},{"$numberInt":"4471"},{"$numberInt":"4472"},{"$numberInt":"4473"},{"$numberInt":"4474"},{"$numberInt":"4475"},{"$numberInt":"4476"},{"$numberInt":"4477"},{"$numberInt":"4478"},{"$numberInt":"4479"},{"$numberInt":"4480"},{"$numberInt":"4481"},{"$numberInt":"4482"},{"$numberInt":"4483"},{"$numberInt":"4484"},{"$numberInt":"4485"},{"$numberInt":"4486"},{"$numberInt":"4487"},{"$numberInt":"4488"},{"$numberInt":"4489"},{"$numberInt":"4490"},{"$numberInt":"4491"},{"$numberInt":"4492"},{"$numberInt":"4493"},{"$numberInt":"4494"},{"$numberInt":"4495"},{"$numberInt":"4496"},{"$numberInt":"4497"},{"$numberInt":"4498"},{"$numberInt":"4499"},{"$numberInt":"4500"},{"$numberInt":"4501"},{"$numberInt":"4502"},{"$numberInt":"4503"},{"$numberInt":"4504"},{"$numberInt":"4505"},{"$numberInt":"4506"},{"$numberInt":"4507"},{"$numberInt":"4508"},{"$numberInt":"4509"},{"$numberInt":"4510"},{"$numberInt":"4511"},{"$numberInt":"4512"},{"$numberInt":"4513"},{"$numberInt":"4514"},{"$numberInt":"4515"},{"$numberInt":"4516"},{"$numberInt":"4517"},{"$numberInt":"4518"},{"$numberInt":"4519"},{"$numberInt":"4520"},{"$numberInt":"4521"},{"$numberInt":"4522"},{"$numberInt":"4523"},{"$numberInt":"4524"},{"$numberInt":"4525"},{"$numberInt":"4526"},{"$numberInt":"4527"},{"$numberInt":"4528"},{"$numberInt":"4529"},{"$numberInt":"4530"},{"$numberInt":"4531"},{"$numberInt":"4532"},{"$numberInt":"4533"},{"$numberInt":"4534"},{"$numberInt":"4535"},{"$numberInt":"4536"},{"$numberInt":"4537"},{"$numberInt":"4538"},{"$numberInt":"4539"},{"$numberInt":"4540"},{"$numberInt":"4541"},{"$numberInt":"4542"},{"$numberInt":"4543"},{"$numberInt":"4544"},{"$numberInt":"4545"},{"$numberInt":"4546"},{"$numberInt":"4547"},{"$numberInt":"4548"},{"$numberInt":"4549"},{"$numberInt":"4550"},{"$numberInt":"4551"},{"$numberInt":"4552"},{"$numberInt":"4553"},{"$numberInt":"4554"},{"$numberInt":"4555"},{"$numberInt":"4556"},{"$numberInt":"4557"},{"$numberInt":"4558"},{"$numberInt":"4559"},{"$numberInt":"4560"},{"$numberInt":"4561"},{"$numberInt":"4562"},{"$numberInt":"4563"},{"$numberInt":"4564"},{"$numberInt":"4565"},{"$numberInt":"4566"},{"$numberInt":"4567"},{"$numberInt":"4568"},{"$numberInt":"4569"},{"$numberInt":"4570"},{"$numberInt":"4571"},{"$numberInt":"4572"},{"$numberInt":"4573"},{"$numberInt":"4574"},{"$numberInt":"4575"},{"$numberInt":"4576"},{"$numberInt":"4577"},{"$numberInt":"4578"},{"$numberInt":"4579"},{"$numberInt":"4580"},{"$numberInt":"4581"},{"$numberInt":"4582"},{"$numberInt":"4583"},{"$numberInt":"4584"},{"$numberInt":"4585"},{"$numberInt":"4586"},{"$numberInt":"4587"},{"$numberInt":"4588"},{"$numberInt":"4589"},{"$numberInt":"4590"},{"$numberInt":"4591"},{"$numberInt":"4592"},{"$numberInt":"4593"},{"$numberInt":"4594"},{"$numberInt":"4595"},{"$numberInt":"4596"},{"$numberInt":"4597"},{"$numberInt":"4598"},{"$numberInt":"4599"},{"$numberInt":"4600"},{"$numberInt":"4601"},{"$numberInt":"4602"},{"$numberInt":"4603"},{"$numberInt":"4604"},{"$numberInt":"4605"},{"$numberInt":"4606"},{"$numberInt":"4607"},{"$numberInt":"4608"},{"$numberInt":"4609"},{"$numberInt":"4610"},{"$numberInt":"4611"},{"$numberInt":"4612"},{"$numberInt":"4613"},{"$numberInt":"4614"},{"$numberInt":"4615"},{"$numberInt":"4616"},{"$numberInt":"4617"},{"$numberInt":"4618"},{"$numberInt":"4619"},{"$numberInt":"4620"},{"$numberInt":"4621"},{"$numberInt":"4622"},{"$numberInt":"4623"},{"$numberInt":"4624"},{"$numberInt":"4625"},{"$numberInt":"4626"},{"$numberInt":"4627"},{"$numberInt":"4628"},{"$numberInt":"4629"},{"$numberInt":"4630"},{"$numberInt":"4631"},{"$numberInt":"4632"},{"$numberInt":"4633"},{"$numberInt":"4634"},{"$numberInt":"4635"},{"$numberInt":"4636"},{"$numberInt":"4637"},{"$numberInt":"4638"},{"$numberInt":"4639"},{"$numberInt":"4640"},{"$numberInt":"4641"},{"$numberInt":"4642"},{"$numberInt":"4643"},{"$numberInt":"4644"},{"$numberInt":"4645"},{"$numberInt":"4646"},{"$numberInt":"4647"},{"$numberInt":"4648"},{"$numberInt":"4649"},{"$numberInt":"4650"},{"$numberInt":"4651"},{"$numberInt":"4652"},{"$numberInt":"4653"},{"$numberInt":"4654"},{"$numberInt":"4655"},{"$numberInt":"4656"},{"$numberInt":"4657"},{"$numberInt":"4658"},{"$numberInt":"4659"},{"$numberInt":"4660"},{"$numberInt":"4661"},{"$numberInt":"4662"},{"$numberInt":"4663"},{"$numberInt":"4664"},{"$numberInt":"4665"},{"$numberInt":"4666"},{"$numberInt":"4667"},{"$numberInt":"4668"},{"$numberInt":"4669"},{"$numberInt":"4670"},{"$numberInt":"4671"},{"$numberInt":"4672"},{"$numberInt":"4673"},{"$numberInt":"4674"},{"$numberInt":"4675"},{"$numberInt":"4676"},{"$numberInt":"4677"},{"$numberInt":"4678"},{"$numberInt":"4679"},{"$numberInt":"4680"},{"$numberInt":"4681"},{"$numberInt":"4682"},{"$numberInt":"4683"},{"$numberInt":"4684"},{"$numberInt":"4685"},{"$numberInt":"4686"},{"$numberInt":"4687"},{"$numberInt":"4688"},{"$numberInt":"4689"},{"$numberInt":"4690"},{"$numberInt":"4691"},{"$numberInt":"4692"},{"$numberInt":"4693"},{"$numberInt":"4694"},{"$numberInt":"4695"},{"$numberInt":"4696"},{"$numberInt":"4697"},{"$numberInt":"4698"},{"$numberInt":"4699"},{"$numberInt":"4700"},{"$numberInt":"4701"},{"$numberInt":"4702"},{"$numberInt":"4703"},{"$numberInt":"4704"},{"$numberInt":"4705"},{"$numberInt":"4706"},{"$numberInt":"4707"},{"$numberInt":"4708"},{"$numberInt":"4709"},{"$numberInt":"4710"},{"$numberInt":"4711"},{"$numberInt":"4712"},{"$numberInt":"4713"},{"$numberInt":"4714"},{"$numberInt":"4715"},{"$numberInt":"4716"},{"$numberInt":"4717"},{"$numberInt":"4718"},{"$numberInt":"4719"},{"$numberInt":"4720"},{"$numberInt":"4721"},{"$numberInt":"4722"},{"$numberInt":"4723"},{"$numberInt":"4724"},{"$numberInt":"4725"},{"$numberInt":"4726"},{"$numberInt":"4727"},{"$numberInt":"4728"},{"$numberInt":"4729"},{"$numberInt":"4730"},{"$numberInt":"4731"},{"$numberInt":"4732"},{"$numberInt":"4733"},{"$numberInt":"4734"},{"$numberInt":"4735"},{"$numberInt":"4736"},{"$numberInt":"4737"},{"$numberInt":"4738"},{"$numberInt":"4739"},{"$numberInt":"4740"},{"$numberInt":"4741"},{"$numberInt":"4742"},{"$numberInt":"4743"},{"$numberInt":"4744"},{"$numberInt":"4745"},{"$numberInt":"4746"},{"$numberInt":"4747"},{"$numberInt":"4748"},{"$numberInt":"4749"},{"$numberInt":"4750"},{"$numberInt":"4751"},{"$numberInt":"4752"},{"$numberInt":"4753"},{"$numberInt":"4754"},{"$numberInt":"4755"},{"$numberInt":"4756"},{"$numberInt":"4757"},{"$numberInt":"4758"},{"$numberInt":"4759"},{"$numberInt":"4760"},{"$numberInt":"4761"},{"$numberInt":"4762"},{"$numberInt":"4763"},{"$numberInt":"4764"},{"$numberInt":"4765"},{"$numberInt":"4766"},{"$numberInt":"4767"},{"$numberInt":"4768"},{"$numberInt":"4769"},{"$numberInt":"4770"},{"$numberInt":"4771"},{"$numberInt":"4772"},{"$numberInt":"4773"},{"$numberInt":"4774"},{"$numberInt":"4775"},{"$numberInt":"4776"},{"$numberInt":"4777"},{"$numberInt":"4778"},{"$numberInt":"4779"},{"$numberInt":"4780"},{"$numberInt":"4781"},{"$numberInt":"4782"},{"$numberInt":"4783"},{"$numberInt":"4784"},{"$numberInt":"4785"},{"$numberInt":"4786"},{"$numberInt":"4787"},{"$numberInt":"4788"},{"$numberInt":"4789"},{"$numberInt":"4790"},{"$numberInt":"4791"},{"$numberInt":"4792"},{"$numberInt":"4793"},{"$numberInt":"4794"},{"$numberInt":"4795"},{"$numberInt":"4796"},{"$numberInt":"4797"},{"$numberInt":"4798"},{"$numberInt":"4799"},{"$numberInt":"4800"},{"$numberInt":"4801"},{"$numberInt":"4802"},{"$numberInt":"4803"},{"$numberInt":"4804"},{"$numberInt":"4805"},{"$numberInt":"4806"},{"$numberInt":"4807"},{"$numberInt":"4808"},{"$numberInt":"4809"},{"$numberInt":"4810"},{"$numberInt":"4811"},{"$numberInt":"4812"},{"$numberInt":"4813"},{"$numberInt":"4814"},{"$numberInt":"4815"},{"$numberInt":"4816"},{"$numberInt":"4817"},{"$numberInt":"4818"},{"$numberInt":"4819"},{"$numberInt":"4820"},{"$numberInt":"4821"},{"$numberInt":"4822"},{"$numberInt":"4823"},{"$numberInt":"4824"},{"$numberInt":"4825"},{"$numberInt":"4826"},{"$numberInt":"4827"},{"$numberInt":"4828"},{"$numberInt":"4829"},{"$numberInt":"4830"},{"$numberInt":"4831"},{"$numberInt":"4832"},{"$numberInt":"4833"},{"$numberInt":"4834"},{"$numberInt":"4835"},{"$numberInt":"4836"},{"$numberInt":"4837"},{"$numberInt":"4838"},{"$numberInt":"4839"},{"$numberInt":"4840"},{"$numberInt":"4841"},{"$numberInt":"4842"},{"$numberInt":"4843"},{"$numberInt":"4844"},{"$numberInt":"4845"},{"$numberInt":"4846"},{"$numberInt":"4847"},{"$numberInt":"4848"},{"$numberInt":"4849"},{"$numberInt":"4850"},{"$numberInt":"4851"},{"$numberInt":"4852"},{"$numberInt":"4853"},{"$numberInt":"4854"},{"$numberInt":"4855"},{"$numberInt":"4856"},{"$numberInt":"4857"},{"$numberInt":"4858"},{"$numberInt":"4859"},{"$numberInt":"4860"},{"$numberInt":"4861"},{"$numberInt":"4862"},{"$numberInt":"4863"},{"$numberInt":"4864"},{"$numberInt":"4865"},{"$numberInt":"4866"},{"$numberInt":"4867"},{"$numberInt":"4868"},{"$numberInt":"4869"},{"$numberInt":"4870"},{"$numberInt":"4871"},{"$numberInt":"4872"},{"$numberInt":"4873"},{"$numberInt":"4874"},{"$numberInt":"4875"},{"$numberInt":"4876"},{"$numberInt":"4877"},{"$numberInt":"4878"},{"$numberInt":"4879"},{"$numberInt":"4880"},{"$numberInt":"4881"},{"$numberInt":"4882"},{"$numberInt":"4883"},{"$numberInt":"4884"},{"$numberInt":"4885"},{"$numberInt":"4886"},{"$numberInt":"4887"},{"$numberInt":"4888"},{"$numberInt":"4889"},{"$numberInt":"4890"},{"$numberInt":"4891"},{"$numberInt":"4892"},{"$numberInt":"4893"},{"$numberInt":"4894"},{"$numberInt":"4895"},{"$numberInt":"4896"},{"$numberInt":"4897"},{"$numberInt":"4898"},{"$numberInt":"4899"},{"$numberInt":"4900"},{"$numberInt":"4901"},{"$numberInt":"4902"},{"$numberInt":"4903"},{"$numberInt":"4904"},{"$numberInt":"4905"},{"$numberInt":"4906"},{"$numberInt":"4907"},{"$numberInt":"4908"},{"$numberInt":"4909"},{"$numberInt":"4910"},{"$numberInt":"4911"},{"$numberInt":"4912"},{"$numberInt":"4913"},{"$numberInt":"4914"},{"$numberInt":"4915"},{"$numberInt":"4916"},{"$numberInt":"4917"},{"$numberInt":"4918"},{"$numberInt":"4919"},{"$numberInt":"4920"},{"$numberInt":"4921"},{"$numberInt":"4922"},{"$numberInt":"4923"},{"$numberInt":"4924"},{"$numberInt":"4925"},{"$numberInt":"4926"},{"$numberInt":"4927"},{"$numberInt":"4928"},{"$numberInt":"4929"},{"$numberInt":"4930"},{"$numberInt":"4931"},{"$numberInt":"4932"},{"$numberInt":"4933"},{"$numberInt":"4934"},{"$numberInt":"4935"},{"$numberInt":"4936"},{"$numberInt":"4937"},{"$numberInt":"4938"},{"$numberInt":"4939"},{"$numberInt":"4940"},{"$numberInt":"4941"},{"$numberInt":"4942"},{"$numberInt":"4943"},{"$numberInt":"4944"},{"$numberInt":"4945"},{"$numberInt":"4946"},{"$numberInt":"4947"},{"$numberInt":"4948"},{"$numberInt":"4949"},{"$numberInt":"4950"},{"$numberInt":"4951"},{"$numberInt":"4952"},{"$numberInt":"4953"},{"$numberInt":"4954"},{"$numberInt":"4955"},{"$numberInt":"4956"},{"$numberInt":"4957"},{"$numberInt":"4958"},{"$numberInt":"4959"},{"$numberInt":"4960"},{"$numberInt":"4961"},{"$numberInt":"4962"},{"$numberInt":"4963"},{"$numberInt":"4964"},{"$numberInt":"4965"},{"$numberInt":"4966"},{"$numberInt":"4967"},{"$numberInt":"4968"},{"$numberInt":"4969"},{"$numberInt":"4970"},{"$numberInt":"4971"},{"$numberInt":"4972"},{"$numberInt":"4973"},{"$numberInt":"4974"},{"$numberInt":"4975"},{"$numberInt":"4976"},{"$numberInt":"4977"},{"$numberInt":"4978"},{"$numberInt":"4979"},{"$numberInt":"4980"},{"$numberInt":"4981"},{"$numberInt":"4982"},{"$numberInt":"4983"},{"$numberInt":"4984"},{"$numberInt":"4985"},{"$numberInt":"4986"},{"$numberInt":"4987"},{"$numberInt":"4988"},{"$numberInt":"4989"},{"$numberInt":"4990"},{"$numberInt":"4991"},{"$numberInt":"4992"},{"$numberInt":"4993"},{"$numberInt":"4994"},{"$numberInt":"4995"},{"$numberInt":"4996"},{"$numberInt":"4997"},{"$numberInt":"4998"},{"$numberInt":"4999"},{"$numberInt":"5000"},{"$numberInt":"5001"},{"$numberInt":"5002"},{"$numberInt":"5003"},{"$numberInt":"5004"},{"$numberInt":"5005"},{"$numberInt":"5006"},{"$numberInt":"5007"},{"$numberInt":"5008"},{"$numberInt":"5009"},{"$numberInt":"5010"},{"$numberInt":"5011"},{"$numberInt":"5012"},{"$numberInt":"5013"},{"$numberInt":"5014"},{"$numberInt":"5015"},{"$numberInt":"5016"},{"$numberInt":"5017"},{"$numberInt":"5018"},{"$numberInt":"5019"},{"$numberInt":"5020"},{"$numberInt":"5021"},{"$numberInt":"5022"},{"$numberInt":"5023"},{"$numberInt":"5024"},{"$numberInt":"5025"},{"$numberInt":"5026"},{"$numberInt":"5027"},{"$numberInt":"5028"},{"$numberInt":"5029"},{"$numberInt":"5030"},{"$numberInt":"5031"},{"$numberInt":"5032"},{"$numberInt":"5033"},{"$numberInt":"5034"},{"$numberInt":"5035"},{"$numberInt":"5036"},{"$numberInt":"5037"},{"$numberInt":"5038"},{"$numberInt":"5039"},{"$numberInt":"5040"},{"$numberInt":"5041"},{"$numberInt":"5042"},{"$numberInt":"5043"},{"$numberInt":"5044"},{"$numberInt":"5045"},{"$numberInt":"5046"},{"$numberInt":"5047"},{"$numberInt":"5048"},{"$numberInt":"5049"},{"$numberInt":"5050"},{"$numberInt":"5051"},{"$numberInt":"5052"},{"$numberInt":"5053"},{"$numberInt":"5054"},{"$numberInt":"5055"},{"$numberInt":"5056"},{"$numberInt":"5057"},{"$numberInt":"5058"},{"$numberInt":"5059"},{"$numberInt":"5060"},{"$numberInt":"5061"},{"$numberInt":"5062"},{"$numberInt":"5063"},{"$numberInt":"5064"},{"$numberInt":"5065"},{"$numberInt":"5066"},{"$numberInt":"5067"},{"$numberInt":"5068"},{"$numberInt":"5069"},{"$numberInt":"5070"},{"$numberInt":"5071"},{"$numberInt":"5072"},{"$numberInt":"5073"},{"$numberInt":"5074"},{"$numberInt":"5075"},{"$numberInt":"5076"},{"$numberInt":"5077"},{"$numberInt":"5078"},{"$numberInt":"5079"},{"$numberInt":"5080"},{"$numberInt":"5081"},{"$numberInt":"5082"},{"$numberInt":"5083"},{"$numberInt":"5084"},{"$numberInt":"5085"},{"$numberInt":"5086"},{"$numberInt":"5087"},{"$numberInt":"5088"},{"$numberInt":"5089"},{"$numberInt":"5090"},{"$numberInt":"5091"},{"$numberInt":"5092"},{"$numberInt":"5093"},{"$numberInt":"5094"},{"$numberInt":"5095"},{"$numberInt":"5096"},{"$numberInt":"5097"},{"$numberInt":"5098"},{"$numberInt":"5099"},{"$numberInt":"5100"},{"$numberInt":"5101"},{"$numberInt":"5102"},{"$numberInt":"5103"},{"$numberInt":"5104"},{"$numberInt":"5105"},{"$numberInt":"5106"},{"$numberInt":"5107"},{"$numberInt":"5108"},{"$numberInt":"5109"},{"$numberInt":"5110"},{"$numberInt":"5111"},{"$numberInt":"5112"},{"$numberInt":"5113"},{"$numberInt":"5114"},{"$numberInt":"5115"},{"$numberInt":"5116"},{"$numberInt":"5117"},{"$numberInt":"5118"},{"$numberInt":"5119"},{"$numberInt":"5120"},{"$numberInt":"5121"},{"$numberInt":"5122"},{"$numberInt":"5123"},{"$numberInt":"5124"},{"$numberInt":"5125"},{"$numberInt":"5126"},{"$numberInt":"5127"},{"$numberInt":"5128"},{"$numberInt":"5129"},{"$numberInt":"5130"},{"$numberInt":"5131"},{"$numberInt":"5132"},{"$numberInt":"5133"},{"$numberInt":"5134"},{"$numberInt":"5135"},{"$numberInt":"5136"},{"$numberInt":"5137"},{"$numberInt":"5138"},{"$numberInt":"5139"},{"$numberInt":"5140"},{"$numberInt":"5141"},{"$numberInt":"5142"},{"$numberInt":"5143"},{"$numberInt":"5144"},{"$numberInt":"5145"},{"$numberInt":"5146"},{"$numberInt":"5147"},{"$numberInt":"5148"},{"$numberInt":"5149"},{"$numberInt":"5150"},{"$numberInt":"5151"},{"$numberInt":"5152"},{"$numberInt":"5153"},{"$numberInt":"5154"},{"$numberInt":"5155"},{"$numberInt":"5156"},{"$numberInt":"5157"},{"$numberInt":"5158"},{"$numberInt":"5159"},{"$numberInt":"5160"},{"$numberInt":"5161"},{"$numberInt":"5162"},{"$numberInt":"5163"},{"$numberInt":"5164"},{"$numberInt":"5165"},{"$numberInt":"5166"},{"$numberInt":"5167"},{"$numberInt":"5168"},{"$numberInt":"5169"},{"$numberInt":"5170"},{"$numberInt":"5171"},{"$numberInt":"5172"},{"$numberInt":"5173"},{"$numberInt":"5174"},{"$numberInt":"5175"},{"$numberInt":"5176"},{"$numberInt":"5177"},{"$numberInt":"5178"},{"$numberInt":"5179"},{"$numberInt":"5180"},{"$numberInt":"5181"},{"$numberInt":"5182"},{"$numberInt":"5183"},{"$numberInt":"5184"},{"$numberInt":"5185"},{"$numberInt":"5186"},{"$numberInt":"5187"},{"$numberInt":"5188"},{"$numberInt":"5189"},{"$numberInt":"5190"},{"$numberInt":"5191"},{"$numberInt":"5192"},{"$numberInt":"5193"},{"$numberInt":"5194"},{"$numberInt":"5195"},{"$numberInt":"5196"},{"$numberInt":"5197"},{"$numberInt":"5198"},{"$numberInt":"5199"},{"$numberInt":"5200"},{"$numberInt":"5201"},{"$numberInt":"5202"},{"$numberInt":"5203"},{"$numberInt":"5204"},{"$numberInt":"5205"},{"$numberInt":"5206"},{"$numberInt":"5207"},{"$numberInt":"5208"},{"$numberInt":"5209"},{"$numberInt":"5210"},{"$numberInt":"5211"},{"$numberInt":"5212"},{"$numberInt":"5213"},{"$numberInt":"5214"},{"$numberInt":"5215"},{"$numberInt":"5216"},{"$numberInt":"5217"},{"$numberInt":"5218"},{"$numberInt":"5219"},{"$numberInt":"5220"},{"$numberInt":"5221"},{"$numberInt":"5222"},{"$numberInt":"5223"},{"$numberInt":"5224"},{"$numberInt":"5225"},{"$numberInt":"5226"},{"$numberInt":"5227"},{"$numberInt":"5228"},{"$numberInt":"5229"},{"$numberInt":"5230"},{"$numberInt":"5231"},{"$numberInt":"5232"},{"$numberInt":"5233"},{"$numberInt":"5234"},{"$numberInt":"5235"},{"$numberInt":"5236"},{"$numberInt":"5237"},{"$numberInt":"5238"},{"$numberInt":"5239"},{"$numberInt":"5240"},{"$numberInt":"5241"},{"$numberInt":"5242"},{"$numberInt":"5243"},{"$numberInt":"5244"},{"$numberInt":"5245"},{"$numberInt":"5246"},{"$numberInt":"5247"},{"$numberInt":"5248"},{"$numberInt":"5249"},{"$numberInt":"5250"},{"$numberInt":"5251"},{"$numberInt":"5252"},{"$numberInt":"5253"},{"$numberInt":"5254"},{"$numberInt":"5255"},{"$numberInt":"5256"},{"$numberInt":"5257"},{"$numberInt":"5258"},{"$numberInt":"5259"},{"$numberInt":"5260"},{"$numberInt":"5261"},{"$numberInt":"5262"},{"$numberInt":"5263"},{"$numberInt":"5264"},{"$numberInt":"5265"},{"$numberInt":"5266"},{"$numberInt":"5267"},{"$numberInt":"5268"},{"$numberInt":"5269"},{"$numberInt":"5270"},{"$numberInt":"5271"},{"$numberInt":"5272"},{"$numberInt":"5273"},{"$numberInt":"5274"},{"$numberInt":"5275"},{"$numberInt":"5276"},{"$numberInt":"5277"},{"$numberInt":"5278"},{"$numberInt":"5279"},{"$numberInt":"5280"},{"$numberInt":"5281"},{"$numberInt":"5282"},{"$numberInt":"5283"},{"$numberInt":"5284"},{"$numberInt":"5285"},{"$numberInt":"5286"},{"$numberInt":"5287"},{"$numberInt":"5288"},{"$numberInt":"5289"},{"$numberInt":"5290"},{"$numberInt":"5291"},{"$numberInt":"5292"},{"$numberInt":"5293"},{"$numberInt":"5294"},{"$numberInt":"5295"},{"$numberInt":"5296"},{"$numberInt":"5297"},{"$numberInt":"5298"},{"$numberInt":"5299"},{"$numberInt":"5300"},{"$numberInt":"5301"},{"$numberInt":"5302"},{"$numberInt":"5303"},{"$numberInt":"5304"},{"$numberInt":"5305"},{"$numberInt":"5306"},{"$numberInt":"5307"},{"$numberInt":"5308"},{"$numberInt":"5309"},{"$numberInt":"5310"},{"$numberInt":"5311"},{"$numberInt":"5312"},{"$numberInt":"5313"},{"$numberInt":"5314"},{"$numberInt":"5315"},{"$numberInt":"5316"},{"$numberInt":"5317"},{"$numberInt":"5318"},{"$numberInt":"5319"},{"$numberInt":"5320"},{"$numberInt":"5321"},{"$numberInt":"5322"},{"$numberInt":"5323"},{"$numberInt":"5324"},{"$numberInt":"5325"},{"$numberInt":"5326"},{"$numberInt":"5327"},{"$numberInt":"5328"},{"$numberInt":"5329"},{"$numberInt":"5330"},{"$numberInt":"5331"},{"$numberInt":"5332"},{"$numberInt":"5333"},{"$numberInt":"5334"},{"$numberInt":"5335"},{"$numberInt":"5336"},{"$numberInt":"5337"},{"$numberInt":"5338"},{"$numberInt":"5339"},{"$numberInt":"5340"},{"$numberInt":"5341"},{"$numberInt":"5342"},{"$numberInt":"5343"},{"$numberInt":"5344"},{"$numberInt":"5345"},{"$numberInt":"5346"},{"$numberInt":"5347"},{"$numberInt":"5348"},{"$numberInt":"5349"},{"$numberInt":"5350"},{"$numberInt":"5351"},{"$numberInt":"5352"},{"$numberInt":"5353"},{"$numberInt":"5354"},{"$numberInt":"5355"},{"$numberInt":"5356"},{"$numberInt":"5357"},{"$numberInt":"5358"},{"$numberInt":"5359"},{"$numberInt":"5360"},{"$numberInt":"5361"},{"$numberInt":"5362"},{"$numberInt":"5363"},{"$numberInt":"5364"},{"$numberInt":"5365"},{"$numberInt":"5366"},{"$numberInt":"5367"},{"$numberInt":"5368"},{"$numberInt":"5369"},{"$numberInt":"5370"},{"$numberInt":"5371"},{"$numberInt":"5372"},{"$numberInt":"5373"},{"$numberInt":"5374"},{"$numberInt":"5375"},{"$numberInt":"5376"},{"$numberInt":"5377"},{"$numberInt":"5378"},{"$numberInt":"5379"},{"$numberInt":"5380"},{"$numberInt":"5381"},{"$numberInt":"5382"},{"$numberInt":"5383"},{"$numberInt":"5384"},{"$numberInt":"5385"},{"$numberInt":"5386"},{"$numberInt":"5387"},{"$numberInt":"5388"},{"$numberInt":"5389"},{"$numberInt":"5390"},{"$numberInt":"5391"},{"$numberInt":"5392"},{"$numberInt":"5393"},{"$numberInt":"5394"},{"$numberInt":"5395"},{"$numberInt":"5396"},{"$numberInt":"5397"},{"$numberInt":"5398"},{"$numberInt":"5399"},{"$numberInt":"5400"},{"$numberInt":"5401"},{"$numberInt":"5402"},{"$numberInt":"5403"},{"$numberInt":"5404"},{"$numberInt":"5405"},{"$numberInt":"5406"},{"$numberInt":"5407"},{"$numberInt":"5408"},{"$numberInt":"5409"},{"$numberInt":"5410"},{"$numberInt":"5411"},{"$numberInt":"5412"},{"$numberInt":"5413"},{"$numberInt":"5414"},{"$numberInt":"5415"},{"$numberInt":"5416"},{"$numberInt":"5417"},{"$numberInt":"5418"},{"$numberInt":"5419"},{"$numberInt":"5420"},{"$numberInt":"5421"},{"$numberInt":"5422"},{"$numberInt":"5423"},{"$numberInt":"5424"},{"$numberInt":"5425"},{"$numberInt":"5426"},{"$numberInt":"5427"},{"$numberInt":"5428"},{"$numberInt":"5429"},{"$numberInt":"5430"},{"$numberInt":"5431"},{"$numberInt":"5432"},{"$numberInt":"5433"},{"$numberInt":"5434"},{"$numberInt":"5435"},{"$numberInt":"5436"},{"$numberInt":"5437"},{"$numberInt":"5438"},{"$numberInt":"5439"},{"$numberInt":"5440"},{"$numberInt":"5441"},{"$numberInt":"5442"},{"$numberInt":"5443"},{"$numberInt":"5444"},{"$numberInt":"5445"},{"$numberInt":"5446"},{"$numberInt":"5447"},{"$numberInt":"5448"},{"$numberInt":"5449"},{"$numberInt":"5450"},{"$numberInt":"5451"},{"$numberInt":"5452"},{"$numberInt":"5453"},{"$numberInt":"5454"},{"$numberInt":"5455"},{"$numberInt":"5456"},{"$numberInt":"5457"},{"$numberInt":"5458"},{"$numberInt":"5459"},{"$numberInt":"5460"},{"$numberInt":"5461"},{"$numberInt":"5462"},{"$numberInt":"5463"},{"$numberInt":"5464"},{"$numberInt":"5465"},{"$numberInt":"5466"},{"$numberInt":"5467"},{"$numberInt":"5468"},{"$numberInt":"5469"},{"$numberInt":"5470"},{"$numberInt":"5471"},{"$numberInt":"5472"},{"$numberInt":"5473"},{"$numberInt":"5474"},{"$numberInt":"5475"},{"$numberInt":"5476"},{"$numberInt":"5477"},{"$numberInt":"5478"},{"$numberInt":"5479"},{"$numberInt":"5480"},{"$numberInt":"5481"},{"$numberInt":"5482"},{"$numberInt":"5483"},{"$numberInt":"5484"},{"$numberInt":"5485"},{"$numberInt":"5486"},{"$numberInt":"5487"},{"$numberInt":"5488"},{"$numberInt":"5489"},{"$numberInt":"5490"},{"$numberInt":"5491"},{"$numberInt":"5492"},{"$numberInt":"5493"},{"$numberInt":"5494"},{"$numberInt":"5495"},{"$numberInt":"5496"},{"$numberInt":"5497"},{"$numberInt":"5498"},{"$numberInt":"5499"},{"$numberInt":"5500"},{"$numberInt":"5501"},{"$numberInt":"5502"},{"$numberInt":"5503"},{"$numberInt":"5504"},{"$numberInt":"5505"},{"$numberInt":"5506"},{"$numberInt":"5507"},{"$numberInt":"5508"},{"$numberInt":"5509"},{"$numberInt":"5510"},{"$numberInt":"5511"},{"$numberInt":"5512"},{"$numberInt":"5513"},{"$numberInt":"5514"},{"$numberInt":"5515"},{"$numberInt":"5516"},{"$numberInt":"5517"},{"$numberInt":"5518"},{"$numberInt":"5519"},{"$numberInt":"5520"},{"$numberInt":"5521"},{"$numberInt":"5522"},{"$numberInt":"5523"},{"$numberInt":"5524"},{"$numberInt":"5525"},{"$numberInt":"5526"},{"$numberInt":"5527"},{"$numberInt":"5528"},{"$numberInt":"5529"},{"$numberInt":"5530"},{"$numberInt":"5531"},{"$numberInt":"5532"},{"$numberInt":"5533"},{"$numberInt":"5534"},{"$numberInt":"5535"},{"$numberInt":"5536"},{"$numberInt":"5537"},{"$numberInt":"5538"},{"$numberInt":"5539"},{"$numberInt":"5540"},{"$numberInt":"5541"},{"$numberInt":"5542"},{"$numberInt":"5543"},{"$numberInt":"5544"},{"$numberInt":"5545"},{"$numberInt":"5546"},{"$numberInt":"5547"},{"$numberInt":"5548"},{"$numberInt":"5549"},{"$numberInt":"5550"},{"$numberInt":"5551"},{"$numberInt":"5552"},{"$numberInt":"5553"},{"$numberInt":"5554"},{"$numberInt":"5555"},{"$numberInt":"5556"},{"$numberInt":"5557"},{"$numberInt":"5558"},{"$numberInt":"5559"},{"$numberInt":"5560"},{"$numberInt":"5561"},{"$numberInt":"5562"},{"$numberInt":"5563"},{"$numberInt":"5564"},{"$numberInt":"5565"},{"$numberInt":"5566"},{"$numberInt":"5567"},{"$numberInt":"5568"},{"$numberInt":"5569"},{"$numberInt":"5570"},{"$numberInt":"5571"},{"$numberInt":"5572"},{"$numberInt":"5573"},{"$numberInt":"5574"},{"$numberInt":"5575"},{"$numberInt":"5576"},{"$numberInt":"5577"},{"$numberInt":"5578"},{"$numberInt":"5579"},{"$numberInt":"5580"},{"$numberInt":"5581"},{"$numberInt":"5582"},{"$numberInt":"5583"},{"$numberInt":"5584"},{"$numberInt":"5585"},{"$numberInt":"5586"},{"$numberInt":"5587"},{"$numberInt":"5588"},{"$numberInt":"5589"},{"$numberInt":"5590"},{"$numberInt":"5591"},{"$numberInt":"5592"},{"$numberInt":"5593"},{"$numberInt":"5594"},{"$numberInt":"5595"},{"$numberInt":"5596"},{"$numberInt":"5597"},{"$numberInt":"5598"},{"$numberInt":"5599"},{"$numberInt":"5600"},{"$numberInt":"5601"},{"$numberInt":"5602"},{"$numberInt":"5603"},{"$numberInt":"5604"},{"$numberInt":"5605"},{"$numberInt":"5606"},{"$numberInt":"5607"},{"$numberInt":"5608"},{"$numberInt":"5609"},{"$numberInt":"5610"},{"$numberInt":"5611"},{"$numberInt":"5612"},{"$numberInt":"5613"},{"$numberInt":"5614"},{"$numberInt":"5615"},{"$numberInt":"5616"},{"$numberInt":"5617"},{"$numberInt":"5618"},{"$numberInt":"5619"},{"$numberInt":"5620"},{"$numberInt":"5621"},{"$numberInt":"5622"},{"$numberInt":"5623"},{"$numberInt":"5624"},{"$numberInt":"5625"},{"$numberInt":"5626"},{"$numberInt":"5627"},{"$numberInt":"5628"},{"$numberInt":"5629"},{"$numberInt":"5630"},{"$numberInt":"5631"},{"$numberInt":"5632"},{"$numberInt":"5633"},{"$numberInt":"5634"},{"$numberInt":"5635"},{"$numberInt":"5636"},{"$numberInt":"5637"},{"$numberInt":"5638"},{"$numberInt":"5639"},{"$numberInt":"5640"},{"$numberInt":"5641"},{"$numberInt":"5642"},{"$numberInt":"5643"},{"$numberInt":"5644"},{"$numberInt":"5645"},{"$numberInt":"5646"},{"$numberInt":"5647"},{"$numberInt":"5648"},{"$numberInt":"5649"},{"$numberInt":"5650"},{"$numberInt":"5651"},{"$numberInt":"5652"},{"$numberInt":"5653"},{"$numberInt":"5654"},{"$numberInt":"5655"},{"$numberInt":"5656"},{"$numberInt":"5657"},{"$numberInt":"5658"},{"$numberInt":"5659"},{"$numberInt":"5660"},{"$numberInt":"5661"},{"$numberInt":"5662"},{"$numberInt":"5663"},{"$numberInt":"5664"},{"$numberInt":"5665"},{"$numberInt":"5666"},{"$numberInt":"5667"},{"$numberInt":"5668"},{"$numberInt":"5669"},{"$numberInt":"5670"},{"$numberInt":"5671"},{"$numberInt":"5672"},{"$numberInt":"5673"},{"$numberInt":"5674"},{"$numberInt":"5675"},{"$numberInt":"5676"},{"$numberInt":"5677"},{"$numberInt":"5678"},{"$numberInt":"5679"},{"$numberInt":"5680"},{"$numberInt":"5681"},{"$numberInt":"5682"},{"$numberInt":"5683"},{"$numberInt":"5684"},{"$numberInt":"5685"},{"$numberInt":"5686"},{"$numberInt":"5687"},{"$numberInt":"5688"},{"$numberInt":"5689"},{"$numberInt":"5690"},{"$numberInt":"5691"},{"$numberInt":"5692"},{"$numberInt":"5693"},{"$numberInt":"5694"},{"$numberInt":"5695"},{"$numberInt":"5696"},{"$numberInt":"5697"},{"$numberInt":"5698"},{"$numberInt":"5699"},{"$numberInt":"5700"},{"$numberInt":"5701"},{"$numberInt":"5702"},{"$numberInt":"5703"},{"$numberInt":"5704"},{"$numberInt":"5705"},{"$numberInt":"5706"},{"$numberInt":"5707"},{"$numberInt":"5708"},{"$numberInt":"5709"},{"$numberInt":"5710"},{"$numberInt":"5711"},{"$numberInt":"5712"},{"$numberInt":"5713"},{"$numberInt":"5714"},{"$numberInt":"5715"},{"$numberInt":"5716"},{"$numberInt":"5717"},{"$numberInt":"5718"},{"$numberInt":"5719"},{"$numberInt":"5720"},{"$numberInt":"5721"},{"$numberInt":"5722"},{"$numberInt":"5723"},{"$numberInt":"5724"},{"$numberInt":"5725"},{"$numberInt":"5726"},{"$numberInt":"5727"},{"$numberInt":"5728"},{"$numberInt":"5729"},{"$numberInt":"5730"},{"$numberInt":"5731"},{"$numberInt":"5732"},{"$numberInt":"5733"},{"$numberInt":"5734"},{"$numberInt":"5735"},{"$numberInt":"5736"},{"$numberInt":"5737"},{"$numberInt":"5738"},{"$numberInt":"5739"},{"$numberInt":"5740"},{"$numberInt":"5741"},{"$numberInt":"5742"},{"$numberInt":"5743"},{"$numberInt":"5744"},{"$numberInt":"5745"},{"$numberInt":"5746"},{"$numberInt":"5747"},{"$numberInt":"5748"},{"$numberInt":"5749"},{"$numberInt":"5750"},{"$numberInt":"5751"},{"$numberInt":"5752"},{"$numberInt":"5753"},{"$numberInt":"5754"},{"$numberInt":"5755"},{"$numberInt":"5756"},{"$numberInt":"5757"},{"$numberInt":"5758"},{"$numberInt":"5759"},{"$numberInt":"5760"},{"$numberInt":"5761"},{"$numberInt":"5762"},{"$numberInt":"5763"},{"$numberInt":"5764"},{"$numberInt":"5765"},{"$numberInt":"5766"},{"$numberInt":"5767"},{"$numberInt":"5768"},{"$numberInt":"5769"},{"$numberInt":"5770"},{"$numberInt":"5771"},{"$numberInt":"5772"},{"$numberInt":"5773"},{"$numberInt":"5774"},{"$numberInt":"5775"},{"$numberInt":"5776"},{"$numberInt":"5777"},{"$numberInt":"5778"},{"$numberInt":"5779"},{"$numberInt":"5780"},{"$numberInt":"5781"},{"$numberInt":"5782"},{"$numberInt":"5783"},{"$numberInt":"5784"},{"$numberInt":"5785"},{"$numberInt":"5786"},{"$numberInt":"5787"},{"$numberInt":"5788"},{"$numberInt":"5789"},{"$numberInt":"5790"},{"$numberInt":"5791"},{"$numberInt":"5792"},{"$numberInt":"5793"},{"$numberInt":"5794"},{"$numberInt":"5795"},{"$numberInt":"5796"},{"$numberInt":"5797"},{"$numberInt":"5798"},{"$numberInt":"5799"},{"$numberInt":"5800"},{"$numberInt":"5801"},{"$numberInt":"5802"},{"$numberInt":"5803"},{"$numberInt":"5804"},{"$numberInt":"5805"},{"$numberInt":"5806"},{"$numberInt":"5807"},{"$numberInt":"5808"},{"$numberInt":"5809"},{"$numberInt":"5810"},{"$numberInt":"5811"},{"$numberInt":"5812"},{"$numberInt":"5813"},{"$numberInt":"5814"},{"$numberInt":"5815"},{"$numberInt":"5816"},{"$numberInt":"5817"},{"$numberInt":"5818"},{"$numberInt":"5819"},{"$numberInt":"5820"},{"$numberInt":"5821"},{"$numberInt":"5822"},{"$numberInt":"5823"},{"$numberInt":"5824"},{"$numberInt":"5825"},{"$numberInt":"5826"},{"$numberInt":"5827"},{"$numberInt":"5828"},{"$numberInt":"5829"},{"$numberInt":"5830"},{"$numberInt":"5831"},{"$numberInt":"5832"},{"$numberInt":"5833"},{"$numberInt":"5834"},{"$numberInt":"5835"},{"$numberInt":"5836"},{"$numberInt":"5837"},{"$numberInt":"5838"},{"$numberInt":"5839"},{"$numberInt":"5840"},{"$numberInt":"5841"},{"$numberInt":"5842"},{"$numberInt":"5843"},{"$numberInt":"5844"},{"$numberInt":"5845"},{"$numberInt":"5846"},{"$numberInt":"5847"},{"$numberInt":"5848"},{"$numberInt":"5849"},{"$numberInt":"5850"},{"$numberInt":"5851"},{"$numberInt":"5852"},{"$numberInt":"5853"},{"$numberInt":"5854"},{"$numberInt":"5855"},{"$numberInt":"5856"},{"$numberInt":"5857"},{"$numberInt":"5858"},{"$numberInt":"5859"},{"$numberInt":"5860"},{"$numberInt":"5861"},{"$numberInt":"5862"},{"$numberInt":"5863"},{"$numberInt":"5864"},{"$numberInt":"5865"},{"$numberInt":"5866"},{"$numberInt":"5867"},{"$numberInt":"5868"},{"$numberInt":"5869"},{"$numberInt":"5870"},{"$numberInt":"5871"},{"$numberInt":"5872"},{"$numberInt":"5873"},{"$numberInt":"5874"},{"$numberInt":"5875"},{"$numberInt":"5876"},{"$numberInt":"5877"},{"$numberInt":"5878"},{"$numberInt":"5879"},{"$numberInt":"5880"},{"$numberInt":"5881"},{"$numberInt":"5882"},{"$numberInt":"5883"},{"$numberInt":"5884"},{"$numberInt":"5885"},{"$numberInt":"5886"},{"$numberInt":"5887"},{"$numberInt":"5888"},{"$numberInt":"5889"},{"$numberInt":"5890"},{"$numberInt":"5891"},{"$numberInt":"5892"},{"$numberInt":"5893"},{"$numberInt":"5894"},{"$numberInt":"5895"},{"$numberInt":"5896"},{"$numberInt":"5897"},{"$numberInt":"5898"},{"$numberInt":"5899"},{"$numberInt":"5900"},{"$numberInt":"5901"},{"$numberInt":"5902"},{"$numberInt":"5903"},{"$numberInt":"5904"},{"$numberInt":"5905"},{"$numberInt":"5906"},{"$numberInt":"5907"},{"$numberInt":"5908"},{"$numberInt":"5909"},{"$numberInt":"5910"},{"$numberInt":"5911"},{"$numberInt":"5912"},{"$numberInt":"5913"},{"$numberInt":"5914"},{"$numberInt":"5915"},{"$numberInt":"5916"},{"$numberInt":"5917"},{"$numberInt":"5918"},{"$numberInt":"5919"},{"$numberInt":"5920"},{"$numberInt":"5921"},{"$numberInt":"5922"},{"$numberInt":"5923"},{"$numberInt":"5924"},{"$numberInt":"5925"},{"$numberInt":"5926"},{"$numberInt":"5927"},{"$numberInt":"5928"},{"$numberInt":"5929"},{"$numberInt":"5930"},{"$numberInt":"5931"},{"$numberInt":"5932"},{"$numberInt":"5933"},{"$numberInt":"5934"},{"$numberInt":"5935"},{"$numberInt":"5936"},{"$numberInt":"5937"},{"$numberInt":"5938"},{"$numberInt":"5939"},{"$numberInt":"5940"},{"$numberInt":"5941"},{"$numberInt":"5942"},{"$numberInt":"5943"},{"$numberInt":"5944"},{"$numberInt":"5945"},{"$numberInt":"5946"},{"$numberInt":"5947"},{"$numberInt":"5948"},{"$numberInt":"5949"},{"$numberInt":"5950"},{"$numberInt":"5951"},{"$numberInt":"5952"},{"$numberInt":"5953"},{"$numberInt":"5954"},{"$numberInt":"5955"},{"$numberInt":"5956"},{"$numberInt":"5957"},{"$numberInt":"5958"},{"$numberInt":"5959"},{"$numberInt":"5960"},{"$numberInt":"5961"},{"$numberInt":"5962"},{"$numberInt":"5963"},{"$numberInt":"5964"},{"$numberInt":"5965"},{"$numberInt":"5966"},{"$numberInt":"5967"},{"$numberInt":"5968"},{"$numberInt":"5969"},{"$numberInt":"5970"},{"$numberInt":"5971"},{"$numberInt":"5972"},{"$numberInt":"5973"},{"$numberInt":"5974"},{"$numberInt":"5975"},{"$numberInt":"5976"},{"$numberInt":"5977"},{"$numberInt":"5978"},{"$numberInt":"5979"},{"$numberInt":"5980"},{"$numberInt":"5981"},{"$numberInt":"5982"},{"$numberInt":"5983"},{"$numberInt":"5984"},{"$numberInt":"5985"},{"$numberInt":"5986"},{"$numberInt":"5987"},{"$numberInt":"5988"},{"$numberInt":"5989"},{"$numberInt":"5990"},{"$numberInt":"5991"},{"$numberInt":"5992"},{"$numberInt":"5993"},{"$numberInt":"5994"},{"$numberInt":"5995"},{"$numberInt":"5996"},{"$numberInt":"5997"},{"$numberInt":"5998"},{"$numberInt":"5999"},{"$numberInt":"6000"},{"$numberInt":"6001"},{"$numberInt":"6002"},{"$numberInt":"6003"},{"$numberInt":"6004"},{"$numberInt":"6005"},{"$numberInt":"6006"},{"$numberInt":"6007"},{"$numberInt":"6008"},{"$numberInt":"6009"},{"$numberInt":"6010"},{"$numberInt":"6011"},{"$numberInt":"6012"},{"$numberInt":"6013"},{"$numberInt":"6014"},{"$numberInt":"6015"},{"$numberInt":"6016"},{"$numberInt":"6017"},{"$numberInt":"6018"},{"$numberInt":"6019"},{"$numberInt":"6020"},{"$numberInt":"6021"},{"$numberInt":"6022"},{"$numberInt":"6023"},{"$numberInt":"6024"},{"$numberInt":"6025"},{"$numberInt":"6026"},{"$numberInt":"6027"},{"$numberInt":"6028"},{"$numberInt":"6029"},{"$numberInt":"6030"},{"$numberInt":"6031"},{"$numberInt":"6032"},{"$numberInt":"6033"},{"$numberInt":"6034"},{"$numberInt":"6035"},{"$numberInt":"6036"},{"$numberInt":"6037"},{"$numberInt":"6038"},{"$numberInt":"6039"},{"$numberInt":"6040"},{"$numberInt":"6041"},{"$numberInt":"6042"},{"$numberInt":"6043"},{"$numberInt":"6044"},{"$numberInt":"6045"},{"$numberInt":"6046"},{"$numberInt":"6047"},{"$numberInt":"6048"},{"$numberInt":"6049"},{"$numberInt":"6050"},{"$numberInt":"6051"},{"$numberInt":"6052"},{"$numberInt":"6053"},{"$numberInt":"6054"},{"$numberInt":"6055"},{"$numberInt":"6056"},{"$numberInt":"6057"},{"$numberInt":"6058"},{"$numberInt":"6059"},{"$numberInt":"6060"},{"$numberInt":"6061"},{"$numberInt":"6062"},{"$numberInt":"6063"},{"$numberInt":"6064"},{"$numberInt":"6065"},{"$numberInt":"6066"},{"$numberInt":"6067"},{"$numberInt":"6068"},{"$numberInt":"6069"},{"$numberInt":"6070"},{"$numberInt":"6071"},{"$numberInt":"6072"},{"$numberInt":"6073"},{"$numberInt":"6074"},{"$numberInt":"6075"},{"$numberInt":"6076"},{"$numberInt":"6077"},{"$numberInt":"6078"},{"$numberInt":"6079"},{"$numberInt":"6080"},{"$numberInt":"6081"},{"$numberInt":"6082"},{"$numberInt":"6083"},{"$numberInt":"6084"},{"$numberInt":"6085"},{"$numberInt":"6086"},{"$numberInt":"6087"},{"$numberInt":"6088"},{"$numberInt":"6089"},{"$numberInt":"6090"},{"$numberInt":"6091"},{"$numberInt":"6092"},{"$numberInt":"6093"},{"$numberInt":"6094"},{"$numberInt":"6095"},{"$numberInt":"6096"},{"$numberInt":"6097"},{"$numberInt":"6098"},{"$numberInt":"6099"},{"$numberInt":"6100"},{"$numberInt":"6101"},{"$numberInt":"6102"},{"$numberInt":"6103"},{"$numberInt":"6104"},{"$numberInt":"6105"},{"$numberInt":"6106"},{"$numberInt":"6107"},{"$numberInt":"6108"},{"$numberInt":"6109"},{"$numberInt":"6110"},{"$numberInt":"6111"},{"$numberInt":"6112"},{"$numberInt":"6113"},{"$numberInt":"6114"},{"$numberInt":"6115"},{"$numberInt":"6116"},{"$numberInt":"6117"},{"$numberInt":"6118"},{"$numberInt":"6119"},{"$numberInt":"6120"},{"$numberInt":"6121"},{"$numberInt":"6122"},{"$numberInt":"6123"},{"$numberInt":"6124"},{"$numberInt":"6125"},{"$numberInt":"6126"},{"$numberInt":"6127"},{"$numberInt":"6128"},{"$numberInt":"6129"},{"$numberInt":"6130"},{"$numberInt":"6131"},{"$numberInt":"6132"},{"$numberInt":"6133"},{"$numberInt":"6134"},{"$numberInt":"6135"},{"$numberInt":"6136"},{"$numberInt":"6137"},{"$numberInt":"6138"},{"$numberInt":"6139"},{"$numberInt":"6140"},{"$numberInt":"6141"},{"$numberInt":"6142"},{"$numberInt":"6143"},{"$numberInt":"6144"},{"$numberInt":"6145"},{"$numberInt":"6146"},{"$numberInt":"6147"},{"$numberInt":"6148"},{"$numberInt":"6149"},{"$numberInt":"6150"},{"$numberInt":"6151"},{"$numberInt":"6152"},{"$numberInt":"6153"},{"$numberInt":"6154"},{"$numberInt":"6155"},{"$numberInt":"6156"},{"$numberInt":"6157"},{"$numberInt":"6158"},{"$numberInt":"6159"},{"$numberInt":"6160"},{"$numberInt":"6161"},{"$numberInt":"6162"},{"$numberInt":"6163"},{"$numberInt":"6164"},{"$numberInt":"6165"},{"$numberInt":"6166"},{"$numberInt":"6167"},{"$numberInt":"6168"},{"$numberInt":"6169"},{"$numberInt":"6170"},{"$numberInt":"6171"},{"$numberInt":"6172"},{"$numberInt":"6173"},{"$numberInt":"6174"},{"$numberInt":"6175"},{"$numberInt":"6176"},{"$numberInt":"6177"},{"$numberInt":"6178"},{"$numberInt":"6179"},{"$numberInt":"6180"},{"$numberInt":"6181"},{"$numberInt":"6182"},{"$numberInt":"6183"},{"$numberInt":"6184"},{"$numberInt":"6185"},{"$numberInt":"6186"},{"$numberInt":"6187"},{"$numberInt":"6188"},{"$numberInt":"6189"},{"$numberInt":"6190"},{"$numberInt":"6191"},{"$numberInt":"6192"},{"$numberInt":"6193"},{"$numberInt":"6194"},{"$numberInt":"6195"},{"$numberInt":"6196"},{"$numberInt":"6197"},{"$numberInt":"6198"},{"$numberInt":"6199"},{"$numberInt":"6200"},{"$numberInt":"6201"},{"$numberInt":"6202"},{"$numberInt":"6203"},{"$numberInt":"6204"},{"$numberInt":"6205"},{"$numberInt":"6206"},{"$numberInt":"6207"},{"$numberInt":"6208"},{"$numberInt":"6209"},{"$numberInt":"6210"},{"$numberInt":"6211"},{"$numberInt":"6212"},{"$numberInt":"6213"},{"$numberInt":"6214"},{"$numberInt":"6215"},{"$numberInt":"6216"},{"$numberInt":"6217"},{"$numberInt":"6218"},{"$numberInt":"6219"},{"$numberInt":"6220"},{"$numberInt":"6221"},{"$numberInt":"6222"},{"$numberInt":"6223"},{"$numberInt":"6224"},{"$numberInt":"6225"},{"$numberInt":"6226"},{"$numberInt":"6227"},{"$numberInt":"6228"},{"$numberInt":"6229"},{"$numberInt":"6230"},{"$numberInt":"6231"},{"$numberInt":"6232"},{"$numberInt":"6233"},{"$numberInt":"6234"},{"$numberInt":"6235"},{"$numberInt":"6236"},{"$numberInt":"6237"},{"$numberInt":"6238"},{"$numberInt":"6239"},{"$numberInt":"6240"},{"$numberInt":"6241"},{"$numberInt":"6242"},{"$numberInt":"6243"},{"$numberInt":"6244"},{"$numberInt":"6245"},{"$numberInt":"6246"},{"$numberInt":"6247"},{"$numberInt":"6248"},{"$numberInt":"6249"},{"$numberInt":"6250"},{"$numberInt":"6251"},{"$numberInt":"6252"},{"$numberInt":"6253"},{"$numberInt":"6254"},{"$numberInt":"6255"},{"$numberInt":"6256"},{"$numberInt":"6257"},{"$numberInt":"6258"},{"$numberInt":"6259"},{"$numberInt":"6260"},{"$numberInt":"6261"},{"$numberInt":"6262"},{"$numberInt":"6263"},{"$numberInt":"6264"},{"$numberInt":"6265"},{"$numberInt":"6266"},{"$numberInt":"6267"},{"$numberInt":"6268"},{"$numberInt":"6269"},{"$numberInt":"6270"},{"$numberInt":"6271"},{"$numberInt":"6272"},{"$numberInt":"6273"},{"$numberInt":"6274"},{"$numberInt":"6275"},{"$numberInt":"6276"},{"$numberInt":"6277"},{"$numberInt":"6278"},{"$numberInt":"6279"},{"$numberInt":"6280"},{"$numberInt":"6281"},{"$numberInt":"6282"},{"$numberInt":"6283"},{"$numberInt":"6284"},{"$numberInt":"6285"},{"$numberInt":"6286"},{"$numberInt":"6287"},{"$numberInt":"6288"},{"$numberInt":"6289"},{"$numberInt":"6290"},{"$numberInt":"6291"},{"$numberInt":"6292"},{"$numberInt":"6293"},{"$numberInt":"6294"},{"$numberInt":"6295"},{"$numberInt":"6296"},{"$numberInt":"6297"},{"$numberInt":"6298"},{"$numberInt":"6299"},{"$numberInt":"6300"},{"$numberInt":"6301"},{"$numberInt":"6302"},{"$numberInt":"6303"},{"$numberInt":"6304"},{"$numberInt":"6305"},{"$numberInt":"6306"},{"$numberInt":"6307"},{"$numberInt":"6308"},{"$numberInt":"6309"},{"$numberInt":"6310"},{"$numberInt":"6311"},{"$numberInt":"6312"},{"$numberInt":"6313"},{"$numberInt":"6314"},{"$numberInt":"6315"},{"$numberInt":"6316"},{"$numberInt":"6317"},{"$numberInt":"6318"},{"$numberInt":"6319"},{"$numberInt":"6320"},{"$numberInt":"6321"},{"$numberInt":"6322"},{"$numberInt":"6323"},{"$numberInt":"6324"},{"$numberInt":"6325"},{"$numberInt":"6326"},{"$numberInt":"6327"},{"$numberInt":"6328"},{"$numberInt":"6329"},{"$numberInt":"6330"},{"$numberInt":"6331"},{"$numberInt":"6332"},{"$numberInt":"6333"},{"$numberInt":"6334"},{"$numberInt":"6335"},{"$numberInt":"6336"},{"$numberInt":"6337"},{"$numberInt":"6338"},{"$numberInt":"6339"},{"$numberInt":"6340"},{"$numberInt":"6341"},{"$numberInt":"6342"},{"$numberInt":"6343"},{"$numberInt":"6344"},{"$numberInt":"6345"},{"$numberInt":"6346"},{"$numberInt":"6347"},{"$numberInt":"6348"},{"$numberInt":"6349"},{"$numberInt":"6350"},{"$numberInt":"6351"},{"$numberInt":"6352"},{"$numberInt":"6353"},{"$numberInt":"6354"},{"$numberInt":"6355"},{"$numberInt":"6356"},{"$numberInt":"6357"},{"$numberInt":"6358"},{"$numberInt":"6359"},{"$numberInt":"6360"},{"$numberInt":"6361"},{"$numberInt":"6362"},{"$numberInt":"6363"},{"$numberInt":"6364"},{"$numberInt":"6365"},{"$numberInt":"6366"},{"$numberInt":"6367"},{"$numberInt":"6368"},{"$numberInt":"6369"},{"$numberInt":"6370"},{"$numberInt":"6371"},{"$numberInt":"6372"},{"$numberInt":"6373"},{"$numberInt":"6374"},{"$numberInt":"6375"},{"$numberInt":"6376"},{"$numberInt":"6377"},{"$numberInt":"6378"},{"$numberInt":"6379"},{"$numberInt":"6380"},{"$numberInt":"6381"},{"$numberInt":"6382"},{"$numberInt":"6383"},{"$numberInt":"6384"},{"$numberInt":"6385"},{"$numberInt":"6386"},{"$numberInt":"6387"},{"$numberInt":"6388"},{"$numberInt":"6389"},{"$numberInt":"6390"},{"$numberInt":"6391"},{"$numberInt":"6392"},{"$numberInt":"6393"},{"$numberInt":"6394"},{"$numberInt":"6395"},{"$numberInt":"6396"},{"$numberInt":"6397"},{"$numberInt":"6398"},{"$numberInt":"6399"},{"$numberInt":"6400"},{"$numberInt":"6401"},{"$numberInt":"6402"},{"$numberInt":"6403"},{"$numberInt":"6404"},{"$numberInt":"6405"},{"$numberInt":"6406"},{"$numberInt":"6407"},{"$numberInt":"6408"},{"$numberInt":"6409"},{"$numberInt":"6410"},{"$numberInt":"6411"},{"$numberInt":"6412"},{"$numberInt":"6413"},{"$numberInt":"6414"},{"$numberInt":"6415"},{"$numberInt":"6416"},{"$numberInt":"6417"},{"$numberInt":"6418"},{"$numberInt":"6419"},{"$numberInt":"6420"},{"$numberInt":"6421"},{"$numberInt":"6422"},{"$numberInt":"6423"},{"$numberInt":"6424"},{"$numberInt":"6425"},{"$numberInt":"6426"},{"$numberInt":"6427"},{"$numberInt":"6428"},{"$numberInt":"6429"},{"$numberInt":"6430"},{"$numberInt":"6431"},{"$numberInt":"6432"},{"$numberInt":"6433"},{"$numberInt":"6434"},{"$numberInt":"6435"},{"$numberInt":"6436"},{"$numberInt":"6437"},{"$numberInt":"6438"},{"$numberInt":"6439"},{"$numberInt":"6440"},{"$numberInt":"6441"},{"$numberInt":"6442"},{"$numberInt":"6443"},{"$numberInt":"6444"},{"$numberInt":"6445"},{"$numberInt":"6446"},{"$numberInt":"6447"},{"$numberInt":"6448"},{"$numberInt":"6449"},{"$numberInt":"6450"},{"$numberInt":"6451"},{"$numberInt":"6452"},{"$numberInt":"6453"},{"$numberInt":"6454"},{"$numberInt":"6455"},{"$numberInt":"6456"},{"$numberInt":"6457"},{"$numberInt":"6458"},{"$numberInt":"6459"},{"$numberInt":"6460"},{"$numberInt":"6461"},{"$numberInt":"6462"},{"$numberInt":"6463"},{"$numberInt":"6464"},{"$numberInt":"6465"},{"$numberInt":"6466"},{"$numberInt":"6467"},{"$numberInt":"6468"},{"$numberInt":"6469"},{"$numberInt":"6470"},{"$numberInt":"6471"},{"$numberInt":"6472"},{"$numberInt":"6473"},{"$numberInt":"6474"},{"$numberInt":"6475"},{"$numberInt":"6476"},{"$numberInt":"6477"},{"$numberInt":"6478"},{"$numberInt":"6479"},{"$numberInt":"6480"},{"$numberInt":"6481"},{"$numberInt":"6482"},{"$numberInt":"6483"},{"$numberInt":"6484"},{"$numberInt":"6485"},{"$numberInt":"6486"},{"$numberInt":"6487"},{"$numberInt":"6488"},{"$numberInt":"6489"},{"$numberInt":"6490"},{"$numberInt":"6491"},{"$numberInt":"6492"},{"$numberInt":"6493"},{"$numberInt":"6494"},{"$numberInt":"6495"},{"$numberInt":"6496"},{"$numberInt":"6497"},{"$numberInt":"6498"},{"$numberInt":"6499"},{"$numberInt":"6500"},{"$numberInt":"6501"},{"$numberInt":"6502"},{"$numberInt":"6503"},{"$numberInt":"6504"},{"$numberInt":"6505"},{"$numberInt":"6506"},{"$numberInt":"6507"},{"$numberInt":"6508"},{"$numberInt":"6509"},{"$numberInt":"6510"},{"$numberInt":"6511"},{"$numberInt":"6512"},{"$numberInt":"6513"},{"$numberInt":"6514"},{"$numberInt":"6515"},{"$numberInt":"6516"},{"$numberInt":"6517"},{"$numberInt":"6518"},{"$numberInt":"6519"},{"$numberInt":"6520"},{"$numberInt":"6521"},{"$numberInt":"6522"},{"$numberInt":"6523"},{"$numberInt":"6524"},{"$numberInt":"6525"},{"$numberInt":"6526"},{"$numberInt":"6527"},{"$numberInt":"6528"},{"$numberInt":"6529"},{"$numberInt":"6530"},{"$numberInt":"6531"},{"$numberInt":"6532"},{"$numberInt":"6533"},{"$numberInt":"6534"},{"$numberInt":"6535"},{"$numberInt":"6536"},{"$numberInt":"6537"},{"$numberInt":"6538"},{"$numberInt":"6539"},{"$numberInt":"6540"},{"$numberInt":"6541"},{"$numberInt":"6542"},{"$numberInt":"6543"},{"$numberInt":"6544"},{"$numberInt":"6545"},{"$numberInt":"6546"},{"$numberInt":"6547"},{"$numberInt":"6548"},{"$numberInt":"6549"},{"$numberInt":"6550"},{"$numberInt":"6551"},{"$numberInt":"6552"},{"$numberInt":"6553"},{"$numberInt":"6554"},{"$numberInt":"6555"},{"$numberInt":"6556"},{"$numberInt":"6557"},{"$numberInt":"6558"},{"$numberInt":"6559"},{"$numberInt":"6560"},{"$numberInt":"6561"},{"$numberInt":"6562"},{"$numberInt":"6563"},{"$numberInt":"6564"},{"$numberInt":"6565"},{"$numberInt":"6566"},{"$numberInt":"6567"},{"$numberInt":"6568"},{"$numberInt":"6569"},{"$numberInt":"6570"},{"$numberInt":"6571"},{"$numberInt":"6572"},{"$numberInt":"6573"},{"$numberInt":"6574"},{"$numberInt":"6575"},{"$numberInt":"6576"},{"$numberInt":"6577"},{"$numberInt":"6578"},{"$numberInt":"6579"},{"$numberInt":"6580"},{"$numberInt":"6581"},{"$numberInt":"6582"},{"$numberInt":"6583"},{"$numberInt":"6584"},{"$numberInt":"6585"},{"$numberInt":"6586"},{"$numberInt":"6587"},{"$numberInt":"6588"},{"$numberInt":"6589"},{"$numberInt":"6590"},{"$numberInt":"6591"},{"$numberInt":"6592"},{"$numberInt":"6593"},{"$numberInt":"6594"},{"$numberInt":"6595"},{"$numberInt":"6596"},{"$numberInt":"6597"},{"$numberInt":"6598"},{"$numberInt":"6599"},{"$numberInt":"6600"},{"$numberInt":"6601"},{"$numberInt":"6602"},{"$numberInt":"6603"},{"$numberInt":"6604"},{"$numberInt":"6605"},{"$numberInt":"6606"},{"$numberInt":"6607"},{"$numberInt":"6608"},{"$numberInt":"6609"},{"$numberInt":"6610"},{"$numberInt":"6611"},{"$numberInt":"6612"},{"$numberInt":"6613"},{"$numberInt":"6614"},{"$numberInt":"6615"},{"$numberInt":"6616"},{"$numberInt":"6617"},{"$numberInt":"6618"},{"$numberInt":"6619"},{"$numberInt":"6620"},{"$numberInt":"6621"},{"$numberInt":"6622"},{"$numberInt":"6623"},{"$numberInt":"6624"},{"$numberInt":"6625"},{"$numberInt":"6626"},{"$numberInt":"6627"},{"$numberInt":"6628"},{"$numberInt":"6629"},{"$numberInt":"6630"},{"$numberInt":"6631"},{"$numberInt":"6632"},{"$numberInt":"6633"},{"$numberInt":"6634"},{"$numberInt":"6635"},{"$numberInt":"6636"},{"$numberInt":"6637"},{"$numberInt":"6638"},{"$numberInt":"6639"},{"$numberInt":"6640"},{"$numberInt":"6641"},{"$numberInt":"6642"},{"$numberInt":"6643"},{"$numberInt":"6644"},{"$numberInt":"6645"},{"$numberInt":"6646"},{"$numberInt":"6647"},{"$numberInt":"6648"},{"$numberInt":"6649"},{"$numberInt":"6650"},{"$numberInt":"6651"},{"$numberInt":"6652"},{"$numberInt":"6653"},{"$numberInt":"6654"},{"$numberInt":"6655"},{"$numberInt":"6656"},{"$numberInt":"6657"},{"$numberInt":"6658"},{"$numberInt":"6659"},{"$numberInt":"6660"},{"$numberInt":"6661"},{"$numberInt":"6662"},{"$numberInt":"6663"},{"$numberInt":"6664"},{"$numberInt":"6665"},{"$numberInt":"6666"},{"$numberInt":"6667"},{"$numberInt":"6668"},{"$numberInt":"6669"},{"$numberInt":"6670"},{"$numberInt":"6671"},{"$numberInt":"6672"},{"$numberInt":"6673"},{"$numberInt":"6674"},{"$numberInt":"6675"},{"$numberInt":"6676"},{"$numberInt":"6677"},{"$numberInt":"6678"},{"$numberInt":"6679"},{"$numberInt":"6680"},{"$numberInt":"6681"},{"$numberInt":"6682"},{"$numberInt":"6683"},{"$numberInt":"6684"},{"$numberInt":"6685"},{"$numberInt":"6686"},{"$numberInt":"6687"},{"$numberInt":"6688"},{"$numberInt":"6689"},{"$numberInt":"6690"},{"$numberInt":"6691"},{"$numberInt":"6692"},{"$numberInt":"6693"},{"$numberInt":"6694"},{"$numberInt":"6695"},{"$numberInt":"6696"},{"$numberInt":"6697"},{"$numberInt":"6698"},{"$numberInt":"6699"},{"$numberInt":"6700"},{"$numberInt":"6701"},{"$numberInt":"6702"},{"$numberInt":"6703"},{"$numberInt":"6704"},{"$numberInt":"6705"},{"$numberInt":"6706"},{"$numberInt":"6707"},{"$numberInt":"6708"},{"$numberInt":"6709"},{"$numberInt":"6710"},{"$numberInt":"6711"},{"$numberInt":"6712"},{"$numberInt":"6713"},{"$numberInt":"6714"},{"$numberInt":"6715"},{"$numberInt":"6716"},{"$numberInt":"6717"},{"$numberInt":"6718"},{"$numberInt":"6719"},{"$numberInt":"6720"},{"$numberInt":"6721"},{"$numberInt":"6722"},{"$numberInt":"6723"},{"$numberInt":"6724"},{"$numberInt":"6725"},{"$numberInt":"6726"},{"$numberInt":"6727"},{"$numberInt":"6728"},{"$numberInt":"6729"},{"$numberInt":"6730"},{"$numberInt":"6731"},{"$numberInt":"6732"},{"$numberInt":"6733"},{"$numberInt":"6734"},{"$numberInt":"6735"},{"$numberInt":"6736"},{"$numberInt":"6737"},{"$numberInt":"6738"},{"$numberInt":"6739"},{"$numberInt":"6740"},{"$numberInt":"6741"},{"$numberInt":"6742"},{"$numberInt":"6743"},{"$numberInt":"6744"},{"$numberInt":"6745"},{"$numberInt":"6746"},{"$numberInt":"6747"},{"$numberInt":"6748"},{"$numberInt":"6749"},{"$numberInt":"6750"},{"$numberInt":"6751"},{"$numberInt":"6752"},{"$numberInt":"6753"},{"$numberInt":"6754"},{"$numberInt":"6755"},{"$numberInt":"6756"},{"$numberInt":"6757"},{"$numberInt":"6758"},{"$numberInt":"6759"},{"$numberInt":"6760"},{"$numberInt":"6761"},{"$numberInt":"6762"},{"$numberInt":"6763"},{"$numberInt":"6764"},{"$numberInt":"6765"},{"$numberInt":"6766"},{"$numberInt":"6767"},{"$numberInt":"6768"},{"$numberInt":"6769"},{"$numberInt":"6770"},{"$numberInt":"6771"},{"$numberInt":"6772"},{"$numberInt":"6773"},{"$numberInt":"6774"},{"$numberInt":"6775"},{"$numberInt":"6776"},{"$numberInt":"6777"},{"$numberInt":"6778"},{"$numberInt":"6779"},{"$numberInt":"6780"},{"$numberInt":"6781"},{"$numberInt":"6782"},{"$numberInt":"6783"},{"$numberInt":"6784"},{"$numberInt":"6785"},{"$numberInt":"6786"},{"$numberInt":"6787"},{"$numberInt":"6788"},{"$numberInt":"6789"},{"$numberInt":"6790"},{"$numberInt":"6791"},{"$numberInt":"6792"},{"$numberInt":"6793"},{"$numberInt":"6794"},{"$numberInt":"6795"},{"$numberInt":"6796"},{"$numberInt":"6797"},{"$numberInt":"6798"},{"$numberInt":"6799"},{"$numberInt":"6800"},{"$numberInt":"6801"},{"$numberInt":"6802"},{"$numberInt":"6803"},{"$numberInt":"6804"},{"$numberInt":"6805"},{"$numberInt":"6806"},{"$numberInt":"6807"},{"$numberInt":"6808"},{"$numberInt":"6809"},{"$numberInt":"6810"},{"$numberInt":"6811"},{"$numberInt":"6812"},{"$numberInt":"6813"},{"$numberInt":"6814"},{"$numberInt":"6815"},{"$numberInt":"6816"},{"$numberInt":"6817"},{"$numberInt":"6818"},{"$numberInt":"6819"},{"$numberInt":"6820"},{"$numberInt":"6821"},{"$numberInt":"6822"},{"$numberInt":"6823"},{"$numberInt":"6824"},{"$numberInt":"6825"},{"$numberInt":"6826"},{"$numberInt":"6827"},{"$numberInt":"6828"},{"$numberInt":"6829"},{"$numberInt":"6830"},{"$numberInt":"6831"},{"$numberInt":"6832"},{"$numberInt":"6833"},{"$numberInt":"6834"},{"$numberInt":"6835"},{"$numberInt":"6836"},{"$numberInt":"6837"},{"$numberInt":"6838"},{"$numberInt":"6839"},{"$numberInt":"6840"},{"$numberInt":"6841"},{"$numberInt":"6842"},{"$numberInt":"6843"},{"$numberInt":"6844"},{"$numberInt":"6845"},{"$numberInt":"6846"},{"$numberInt":"6847"},{"$numberInt":"6848"},{"$numberInt":"6849"},{"$numberInt":"6850"},{"$numberInt":"6851"},{"$numberInt":"6852"},{"$numberInt":"6853"},{"$numberInt":"6854"},{"$numberInt":"6855"},{"$numberInt":"6856"},{"$numberInt":"6857"},{"$numberInt":"6858"},{"$numberInt":"6859"},{"$numberInt":"6860"},{"$numberInt":"6861"},{"$numberInt":"6862"},{"$numberInt":"6863"},{"$numberInt":"6864"},{"$numberInt":"6865"},{"$numberInt":"6866"},{"$numberInt":"6867"},{"$numberInt":"6868"},{"$numberInt":"6869"},{"$numberInt":"6870"},{"$numberInt":"6871"},{"$numberInt":"6872"},{"$numberInt":"6873"},{"$numberInt":"6874"},{"$numberInt":"6875"},{"$numberInt":"6876"},{"$numberInt":"6877"},{"$numberInt":"6878"},{"$numberInt":"6879"},{"$numberInt":"6880"},{"$numberInt":"6881"},{"$numberInt":"6882"},{"$numberInt":"6883"},{"$numberInt":"6884"},{"$numberInt":"6885"},{"$numberInt":"6886"},{"$numberInt":"6887"},{"$numberInt":"6888"},{"$numberInt":"6889"},{"$numberInt":"6890"},{"$numberInt":"6891"},{"$numberInt":"6892"},{"$numberInt":"6893"},{"$numberInt":"6894"},{"$numberInt":"6895"},{"$numberInt":"6896"},{"$numberInt":"6897"},{"$numberInt":"6898"},{"$numberInt":"6899"},{"$numberInt":"6900"},{"$numberInt":"6901"},{"$numberInt":"6902"},{"$numberInt":"6903"},{"$numberInt":"6904"},{"$numberInt":"6905"},{"$numberInt":"6906"},{"$numberInt":"6907"},{"$numberInt":"6908"},{"$numberInt":"6909"},{"$numberInt":"6910"},{"$numberInt":"6911"},{"$numberInt":"6912"},{"$numberInt":"6913"},{"$numberInt":"6914"},{"$numberInt":"6915"},{"$numberInt":"6916"},{"$numberInt":"6917"},{"$numberInt":"6918"},{"$numberInt":"6919"},{"$numberInt":"6920"},{"$numberInt":"6921"},{"$numberInt":"6922"},{"$numberInt":"6923"},{"$numberInt":"6924"},{"$numberInt":"6925"},{"$numberInt":"6926"},{"$numberInt":"6927"},{"$numberInt":"6928"},{"$numberInt":"6929"},{"$numberInt":"6930"},{"$numberInt":"6931"},{"$numberInt":"6932"},{"$numberInt":"6933"},{"$numberInt":"6934"},{"$numberInt":"6935"},{"$numberInt":"6936"},{"$numberInt":"6937"},{"$numberInt":"6938"},{"$numberInt":"6939"},{"$numberInt":"6940"},{"$numberInt":"6941"},{"$numberInt":"6942"},{"$numberInt":"6943"},{"$numberInt":"6944"},{"$numberInt":"6945"},{"$numberInt":"6946"},{"$numberInt":"6947"},{"$numberInt":"6948"},{"$numberInt":"6949"},{"$numberInt":"6950"},{"$numberInt":"6951"},{"$numberInt":"6952"},{"$numberInt":"6953"},{"$numberInt":"6954"},{"$numberInt":"6955"},{"$numberInt":"6956"},{"$numberInt":"6957"},{"$numberInt":"6958"},{"$numberInt":"6959"},{"$numberInt":"6960"},{"$numberInt":"6961"},{"$numberInt":"6962"},{"$numberInt":"6963"},{"$numberInt":"6964"},{"$numberInt":"6965"},{"$numberInt":"6966"},{"$numberInt":"6967"},{"$numberInt":"6968"},{"$numberInt":"6969"},{"$numberInt":"6970"},{"$numberInt":"6971"},{"$numberInt":"6972"},{"$numberInt":"6973"},{"$numberInt":"6974"},{"$numberInt":"6975"},{"$numberInt":"6976"},{"$numberInt":"6977"},{"$numberInt":"6978"},{"$numberInt":"6979"},{"$numberInt":"6980"},{"$numberInt":"6981"},{"$numberInt":"6982"},{"$numberInt":"6983"},{"$numberInt":"6984"},{"$numberInt":"6985"},{"$numberInt":"6986"},{"$numberInt":"6987"},{"$numberInt":"6988"},{"$numberInt":"6989"},{"$numberInt":"6990"},{"$numberInt":"6991"},{"$numberInt":"6992"},{"$numberInt":"6993"},{"$numberInt":"6994"},{"$numberInt":"6995"},{"$numberInt":"6996"},{"$numberInt":"6997"},{"$numberInt":"6998"},{"$numberInt":"6999"},{"$numberInt":"7000"},{"$numberInt":"7001"},{"$numberInt":"7002"},{"$numberInt":"7003"},{"$numberInt":"7004"},{"$numberInt":"7005"},{"$numberInt":"7006"},{"$numberInt":"7007"},{"$numberInt":"7008"},{"$numberInt":"7009"},{"$numberInt":"7010"},{"$numberInt":"7011"},{"$numberInt":"7012"},{"$numberInt":"7013"},{"$numberInt":"7014"},{"$numberInt":"7015"},{"$numberInt":"7016"},{"$numberInt":"7017"},{"$numberInt":"7018"},{"$numberInt":"7019"},{"$numberInt":"7020"},{"$numberInt":"7021"},{"$numberInt":"7022"},{"$numberInt":"7023"},{"$numberInt":"7024"},{"$numberInt":"7025"},{"$numberInt":"7026"},{"$numberInt":"7027"},{"$numberInt":"7028"},{"$numberInt":"7029"},{"$numberInt":"7030"},{"$numberInt":"7031"},{"$numberInt":"7032"},{"$numberInt":"7033"},{"$numberInt":"7034"},{"$numberInt":"7035"},{"$numberInt":"7036"},{"$numberInt":"7037"},{"$numberInt":"7038"},{"$numberInt":"7039"},{"$numberInt":"7040"},{"$numberInt":"7041"},{"$numberInt":"7042"},{"$numberInt":"7043"},{"$numberInt":"7044"},{"$numberInt":"7045"},{"$numberInt":"7046"},{"$numberInt":"7047"},{"$numberInt":"7048"},{"$numberInt":"7049"},{"$numberInt":"7050"},{"$numberInt":"7051"},{"$numberInt":"7052"},{"$numberInt":"7053"},{"$numberInt":"7054"},{"$numberInt":"7055"},{"$numberInt":"7056"},{"$numberInt":"7057"},{"$numberInt":"7058"},{"$numberInt":"7059"},{"$numberInt":"7060"},{"$numberInt":"7061"},{"$numberInt":"7062"},{"$numberInt":"7063"},{"$numberInt":"7064"},{"$numberInt":"7065"},{"$numberInt":"7066"},{"$numberInt":"7067"},{"$numberInt":"7068"},{"$numberInt":"7069"},{"$numberInt":"7070"},{"$numberInt":"7071"},{"$numberInt":"7072"},{"$numberInt":"7073"},{"$numberInt":"7074"},{"$numberInt":"7075"},{"$numberInt":"7076"},{"$numberInt":"7077"},{"$numberInt":"7078"},{"$numberInt":"7079"},{"$numberInt":"7080"},{"$numberInt":"7081"},{"$numberInt":"7082"},{"$numberInt":"7083"},{"$numberInt":"7084"},{"$numberInt":"7085"},{"$numberInt":"7086"},{"$numberInt":"7087"},{"$numberInt":"7088"},{"$numberInt":"7089"},{"$numberInt":"7090"},{"$numberInt":"7091"},{"$numberInt":"7092"},{"$numberInt":"7093"},{"$numberInt":"7094"},{"$numberInt":"7095"},{"$numberInt":"7096"},{"$numberInt":"7097"},{"$numberInt":"7098"},{"$numberInt":"7099"},{"$numberInt":"7100"},{"$numberInt":"7101"},{"$numberInt":"7102"},{"$numberInt":"7103"},{"$numberInt":"7104"},{"$numberInt":"7105"},{"$numberInt":"7106"},{"$numberInt":"7107"},{"$numberInt":"7108"},{"$numberInt":"7109"},{"$numberInt":"7110"},{"$numberInt":"7111"},{"$numberInt":"7112"},{"$numberInt":"7113"},{"$numberInt":"7114"},{"$numberInt":"7115"},{"$numberInt":"7116"},{"$numberInt":"7117"},{"$numberInt":"7118"},{"$numberInt":"7119"},{"$numberInt":"7120"},{"$numberInt":"7121"},{"$numberInt":"7122"},{"$numberInt":"7123"},{"$numberInt":"7124"},{"$numberInt":"7125"},{"$numberInt":"7126"},{"$numberInt":"7127"},{"$numberInt":"7128"},{"$numberInt":"7129"},{"$numberInt":"7130"},{"$numberInt":"7131"},{"$numberInt":"7132"},{"$numberInt":"7133"},{"$numberInt":"7134"},{"$numberInt":"7135"},{"$numberInt":"7136"},{"$numberInt":"7137"},{"$numberInt":"7138"},{"$numberInt":"7139"},{"$numberInt":"7140"},{"$numberInt":"7141"},{"$numberInt":"7142"},{"$numberInt":"7143"},{"$numberInt":"7144"},{"$numberInt":"7145"},{"$numberInt":"7146"},{"$numberInt":"7147"},{"$numberInt":"7148"},{"$numberInt":"7149"},{"$numberInt":"7150"},{"$numberInt":"7151"},{"$numberInt":"7152"},{"$numberInt":"7153"},{"$numberInt":"7154"},{"$numberInt":"7155"},{"$numberInt":"7156"},{"$numberInt":"7157"},{"$numberInt":"7158"},{"$numberInt":"7159"},{"$numberInt":"7160"},{"$numberInt":"7161"},{"$numberInt":"7162"},{"$numberInt":"7163"},{"$numberInt":"7164"},{"$numberInt":"7165"},{"$numberInt":"7166"},{"$numberInt":"7167"},{"$numberInt":"7168"},{"$numberInt":"7169"},{"$numberInt":"7170"},{"$numberInt":"7171"},{"$numberInt":"7172"},{"$numberInt":"7173"},{"$numberInt":"7174"},{"$numberInt":"7175"},{"$numberInt":"7176"},{"$numberInt":"7177"},{"$numberInt":"7178"},{"$numberInt":"7179"},{"$numberInt":"7180"},{"$numberInt":"7181"},{"$numberInt":"7182"},{"$numberInt":"7183"},{"$numberInt":"7184"},{"$numberInt":"7185"},{"$numberInt":"7186"},{"$numberInt":"7187"},{"$numberInt":"7188"},{"$numberInt":"7189"},{"$numberInt":"7190"},{"$numberInt":"7191"},{"$numberInt":"7192"},{"$numberInt":"7193"},{"$numberInt":"7194"},{"$numberInt":"7195"},{"$numberInt":"7196"},{"$numberInt":"7197"},{"$numberInt":"7198"},{"$numberInt":"7199"},{"$numberInt":"7200"},{"$numberInt":"7201"},{"$numberInt":"7202"},{"$numberInt":"7203"},{"$numberInt":"7204"},{"$numberInt":"7205"},{"$numberInt":"7206"},{"$numberInt":"7207"},{"$numberInt":"7208"},{"$numberInt":"7209"},{"$numberInt":"7210"},{"$numberInt":"7211"},{"$numberInt":"7212"},{"$numberInt":"7213"},{"$numberInt":"7214"},{"$numberInt":"7215"},{"$numberInt":"7216"},{"$numberInt":"7217"},{"$numberInt":"7218"},{"$numberInt":"7219"},{"$numberInt":"7220"},{"$numberInt":"7221"},{"$numberInt":"7222"},{"$numberInt":"7223"},{"$numberInt":"7224"},{"$numberInt":"7225"},{"$numberInt":"7226"},{"$numberInt":"7227"},{"$numberInt":"7228"},{"$numberInt":"7229"},{"$numberInt":"7230"},{"$numberInt":"7231"},{"$numberInt":"7232"},{"$numberInt":"7233"},{"$numberInt":"7234"},{"$numberInt":"7235"},{"$numberInt":"7236"},{"$numberInt":"7237"},{"$numberInt":"7238"},{"$numberInt":"7239"},{"$numberInt":"7240"},{"$numberInt":"7241"},{"$numberInt":"7242"},{"$numberInt":"7243"},{"$numberInt":"7244"},{"$numberInt":"7245"},{"$numberInt":"7246"},{"$numberInt":"7247"},{"$numberInt":"7248"},{"$numberInt":"7249"},{"$numberInt":"7250"},{"$numberInt":"7251"},{"$numberInt":"7252"},{"$numberInt":"7253"},{"$numberInt":"7254"},{"$numberInt":"7255"},{"$numberInt":"7256"},{"$numberInt":"7257"},{"$numberInt":"7258"},{"$numberInt":"7259"},{"$numberInt":"7260"},{"$numberInt":"7261"},{"$numberInt":"7262"},{"$numberInt":"7263"},{"$numberInt":"7264"},{"$numberInt":"7265"},{"$numberInt":"7266"},{"$numberInt":"7267"},{"$numberInt":"7268"},{"$numberInt":"7269"},{"$numberInt":"7270"},{"$numberInt":"7271"},{"$numberInt":"7272"},{"$numberInt":"7273"},{"$numberInt":"7274"},{"$numberInt":"7275"},{"$numberInt":"7276"},{"$numberInt":"7277"},{"$numberInt":"7278"},{"$numberInt":"7279"},{"$numberInt":"7280"},{"$numberInt":"7281"},{"$numberInt":"7282"},{"$numberInt":"7283"},{"$numberInt":"7284"},{"$numberInt":"7285"},{"$numberInt":"7286"},{"$numberInt":"7287"},{"$numberInt":"7288"},{"$numberInt":"7289"},{"$numberInt":"7290"},{"$numberInt":"7291"},{"$numberInt":"7292"},{"$numberInt":"7293"},{"$numberInt":"7294"},{"$numberInt":"7295"},{"$numberInt":"7296"},{"$numberInt":"7297"},{"$numberInt":"7298"},{"$numberInt":"7299"},{"$numberInt":"7300"},{"$numberInt":"7301"},{"$numberInt":"7302"},{"$numberInt":"7303"},{"$numberInt":"7304"},{"$numberInt":"7305"},{"$numberInt":"7306"},{"$numberInt":"7307"},{"$numberInt":"7308"},{"$numberInt":"7309"},{"$numberInt":"7310"},{"$numberInt":"7311"},{"$numberInt":"7312"},{"$numberInt":"7313"},{"$numberInt":"7314"},{"$numberInt":"7315"},{"$numberInt":"7316"},{"$numberInt":"7317"},{"$numberInt":"7318"},{"$numberInt":"7319"},{"$numberInt":"7320"},{"$numberInt":"7321"},{"$numberInt":"7322"},{"$numberInt":"7323"},{"$numberInt":"7324"},{"$numberInt":"7325"},{"$numberInt":"7326"},{"$numberInt":"7327"},{"$numberInt":"7328"},{"$numberInt":"7329"},{"$numberInt":"7330"},{"$numberInt":"7331"},{"$numberInt":"7332"},{"$numberInt":"7333"},{"$numberInt":"7334"},{"$numberInt":"7335"},{"$numberInt":"7336"},{"$numberInt":"7337"},{"$numberInt":"7338"},{"$numberInt":"7339"},{"$numberInt":"7340"},{"$numberInt":"7341"},{"$numberInt":"7342"},{"$numberInt":"7343"},{"$numberInt":"7344"},{"$numberInt":"7345"},{"$numberInt":"7346"},{"$numberInt":"7347"},{"$numberInt":"7348"},{"$numberInt":"7349"},{"$numberInt":"7350"},{"$numberInt":"7351"},{"$numberInt":"7352"},{"$numberInt":"7353"},{"$numberInt":"7354"},{"$numberInt":"7355"},{"$numberInt":"7356"},{"$numberInt":"7357"},{"$numberInt":"7358"},{"$numberInt":"7359"},{"$numberInt":"7360"},{"$numberInt":"7361"},{"$numberInt":"7362"},{"$numberInt":"7363"},{"$numberInt":"7364"},{"$numberInt":"7365"},{"$numberInt":"7366"},{"$numberInt":"7367"},{"$numberInt":"7368"},{"$numberInt":"7369"},{"$numberInt":"7370"},{"$numberInt":"7371"},{"$numberInt":"7372"},{"$numberInt":"7373"},{"$numberInt":"7374"},{"$numberInt":"7375"},{"$numberInt":"7376"},{"$numberInt":"7377"},{"$numberInt":"7378"},{"$numberInt":"7379"},{"$numberInt":"7380"},{"$numberInt":"7381"},{"$numberInt":"7382"},{"$numberInt":"7383"},{"$numberInt":"7384"},{"$numberInt":"7385"},{"$numberInt":"7386"},{"$numberInt":"7387"},{"$numberInt":"7388"},{"$numberInt":"7389"},{"$numberInt":"7390"},{"$numberInt":"7391"},{"$numberInt":"7392"},{"$numberInt":"7393"},{"$numberInt":"7394"},{"$numberInt":"7395"},{"$numberInt":"7396"},{"$numberInt":"7397"},{"$numberInt":"7398"},{"$numberInt":"7399"},{"$numberInt":"7400"},{"$numberInt":"7401"},{"$numberInt":"7402"},{"$numberInt":"7403"},{"$numberInt":"7404"},{"$numberInt":"7405"},{"$numberInt":"7406"},{"$numberInt":"7407"},{"$numberInt":"7408"},{"$numberInt":"7409"},{"$numberInt":"7410"},{"$numberInt":"7411"},{"$numberInt":"7412"},{"$numberInt":"7413"},{"$numberInt":"7414"},{"$numberInt":"7415"},{"$numberInt":"7416"},{"$numberInt":"7417"},{"$numberInt":"7418"},{"$numberInt":"7419"},{"$numberInt":"7420"},{"$numberInt":"7421"},{"$numberInt":"7422"},{"$numberInt":"7423"},{"$numberInt":"7424"},{"$numberInt":"7425"},{"$numberInt":"7426"},{"$numberInt":"7427"},{"$numberInt":"7428"},{"$numberInt":"7429"},{"$numberInt":"7430"},{"$numberInt":"7431"},{"$numberInt":"7432"},{"$numberInt":"7433"},{"$numberInt":"7434"},{"$numberInt":"7435"},{"$numberInt":"7436"},{"$numberInt":"7437"},{"$numberInt":"7438"},{"$numberInt":"7439"},{"$numberInt":"7440"},{"$numberInt":"7441"},{"$numberInt":"7442"},{"$numberInt":"7443"},{"$numberInt":"7444"},{"$numberInt":"7445"},{"$numberInt":"7446"},{"$numberInt":"7447"},{"$numberInt":"7448"},{"$numberInt":"7449"},{"$numberInt":"7450"},{"$numberInt":"7451"},{"$numberInt":"7452"},{"$numberInt":"7453"},{"$numberInt":"7454"},{"$numberInt":"7455"},{"$numberInt":"7456"},{"$numberInt":"7457"},{"$numberInt":"7458"},{"$numberInt":"7459"},{"$numberInt":"7460"},{"$numberInt":"7461"},{"$numberInt":"7462"},{"$numberInt":"7463"},{"$numberInt":"7464"},{"$numberInt":"7465"},{"$numberInt":"7466"},{"$numberInt":"7467"},{"$numberInt":"7468"},{"$numberInt":"7469"},{"$numberInt":"7470"},{"$numberInt":"7471"},{"$numberInt":"7472"},{"$numberInt":"7473"},{"$numberInt":"7474"},{"$numberInt":"7475"},{"$numberInt":"7476"},{"$numberInt":"7477"},{"$numberInt":"7478"},{"$numberInt":"7479"},{"$numberInt":"7480"},{"$numberInt":"7481"},{"$numberInt":"7482"},{"$numberInt":"7483"},{"$numberInt":"7484"},{"$numberInt":"7485"},{"$numberInt":"7486"},{"$numberInt":"7487"},{"$numberInt":"7488"},{"$numberInt":"7489"},{"$numberInt":"7490"},{"$numberInt":"7491"},{"$numberInt":"7492"},{"$numberInt":"7493"},{"$numberInt":"7494"},{"$numberInt":"7495"},{"$numberInt":"7496"},{"$numberInt":"7497"},{"$numberInt":"7498"},{"$numberInt":"7499"},{"$numberInt":"7500"},{"$numberInt":"7501"},{"$numberInt":"7502"},{"$numberInt":"7503"},{"$numberInt":"7504"},{"$numberInt":"7505"},{"$numberInt":"7506"},{"$numberInt":"7507"},{"$numberInt":"7508"},{"$numberInt":"7509"},{"$numberInt":"7510"},{"$numberInt":"7511"},{"$numberInt":"7512"},{"$numberInt":"7513"},{"$numberInt":"7514"},{"$numberInt":"7515"},{"$numberInt":"7516"},{"$numberInt":"7517"},{"$numberInt":"7518"},{"$numberInt":"7519"},{"$numberInt":"7520"},{"$numberInt":"7521"},{"$numberInt":"7522"},{"$numberInt":"7523"},{"$numberInt":"7524"},{"$numberInt":"7525"},{"$numberInt":"7526"},{"$numberInt":"7527"},{"$numberInt":"7528"},{"$numberInt":"7529"},{"$numberInt":"7530"},{"$numberInt":"7531"},{"$numberInt":"7532"},{"$numberInt":"7533"},{"$numberInt":"7534"},{"$numberInt":"7535"},{"$numberInt":"7536"},{"$numberInt":"7537"},{"$numberInt":"7538"},{"$numberInt":"7539"},{"$numberInt":"7540"},{"$numberInt":"7541"},{"$numberInt":"7542"},{"$numberInt":"7543"},{"$numberInt":"7544"},{"$numberInt":"7545"},{"$numberInt":"7546"},{"$numberInt":"7547"},{"$numberInt":"7548"},{"$numberInt":"7549"},{"$numberInt":"7550"},{"$numberInt":"7551"},{"$numberInt":"7552"},{"$numberInt":"7553"},{"$numberInt":"7554"},{"$numberInt":"7555"},{"$numberInt":"7556"},{"$numberInt":"7557"},{"$numberInt":"7558"},{"$numberInt":"7559"},{"$numberInt":"7560"},{"$numberInt":"7561"},{"$numberInt":"7562"},{"$numberInt":"7563"},{"$numberInt":"7564"},{"$numberInt":"7565"},{"$numberInt":"7566"},{"$numberInt":"7567"},{"$numberInt":"7568"},{"$numberInt":"7569"},{"$numberInt":"7570"},{"$numberInt":"7571"},{"$numberInt":"7572"},{"$numberInt":"7573"},{"$numberInt":"7574"},{"$numberInt":"7575"},{"$numberInt":"7576"},{"$numberInt":"7577"},{"$numberInt":"7578"},{"$numberInt":"7579"},{"$numberInt":"7580"},{"$numberInt":"7581"},{"$numberInt":"7582"},{"$numberInt":"7583"},{"$numberInt":"7584"},{"$numberInt":"7585"},{"$numberInt":"7586"},{"$numberInt":"7587"},{"$numberInt":"7588"},{"$numberInt":"7589"},{"$numberInt":"7590"},{"$numberInt":"7591"},{"$numberInt":"7592"},{"$numberInt":"7593"},{"$numberInt":"7594"},{"$numberInt":"7595"},{"$numberInt":"7596"},{"$numberInt":"7597"},{"$numberInt":"7598"},{"$numberInt":"7599"},{"$numberInt":"7600"},{"$numberInt":"7601"},{"$numberInt":"7602"},{"$numberInt":"7603"},{"$numberInt":"7604"},{"$numberInt":"7605"},{"$numberInt":"7606"},{"$numberInt":"7607"},{"$numberInt":"7608"},{"$numberInt":"7609"},{"$numberInt":"7610"},{"$numberInt":"7611"},{"$numberInt":"7612"},{"$numberInt":"7613"},{"$numberInt":"7614"},{"$numberInt":"7615"},{"$numberInt":"7616"},{"$numberInt":"7617"},{"$numberInt":"7618"},{"$numberInt":"7619"},{"$numberInt":"7620"},{"$numberInt":"7621"},{"$numberInt":"7622"},{"$numberInt":"7623"},{"$numberInt":"7624"},{"$numberInt":"7625"},{"$numberInt":"7626"},{"$numberInt":"7627"},{"$numberInt":"7628"},{"$numberInt":"7629"},{"$numberInt":"7630"},{"$numberInt":"7631"},{"$numberInt":"7632"},{"$numberInt":"7633"},{"$numberInt":"7634"},{"$numberInt":"7635"},{"$numberInt":"7636"},{"$numberInt":"7637"},{"$numberInt":"7638"},{"$numberInt":"7639"},{"$numberInt":"7640"},{"$numberInt":"7641"},{"$numberInt":"7642"},{"$numberInt":"7643"},{"$numberInt":"7644"},{"$numberInt":"7645"},{"$numberInt":"7646"},{"$numberInt":"7647"},{"$numberInt":"7648"},{"$numberInt":"7649"},{"$numberInt":"7650"},{"$numberInt":"7651"},{"$numberInt":"7652"},{"$numberInt":"7653"},{"$numberInt":"7654"},{"$numberInt":"7655"},{"$numberInt":"7656"},{"$numberInt":"7657"},{"$numberInt":"7658"},{"$numberInt":"7659"},{"$numberInt":"7660"},{"$numberInt":"7661"},{"$numberInt":"7662"},{"$numberInt":"7663"},{"$numberInt":"7664"},{"$numberInt":"7665"},{"$numberInt":"7666"},{"$numberInt":"7667"},{"$numberInt":"7668"},{"$numberInt":"7669"},{"$numberInt":"7670"},{"$numberInt":"7671"},{"$numberInt":"7672"},{"$numberInt":"7673"},{"$numberInt":"7674"},{"$numberInt":"7675"},{"$numberInt":"7676"},{"$numberInt":"7677"},{"$numberInt":"7678"},{"$numberInt":"7679"},{"$numberInt":"7680"},{"$numberInt":"7681"},{"$numberInt":"7682"},{"$numberInt":"7683"},{"$numberInt":"7684"},{"$numberInt":"7685"},{"$numberInt":"7686"},{"$numberInt":"7687"},{"$numberInt":"7688"},{"$numberInt":"7689"},{"$numberInt":"7690"},{"$numberInt":"7691"},{"$numberInt":"7692"},{"$numberInt":"7693"},{"$numberInt":"7694"},{"$numberInt":"7695"},{"$numberInt":"7696"},{"$numberInt":"7697"},{"$numberInt":"7698"},{"$numberInt":"7699"},{"$numberInt":"7700"},{"$numberInt":"7701"},{"$numberInt":"7702"},{"$numberInt":"7703"},{"$numberInt":"7704"},{"$numberInt":"7705"},{"$numberInt":"7706"},{"$numberInt":"7707"},{"$numberInt":"7708"},{"$numberInt":"7709"},{"$numberInt":"7710"},{"$numberInt":"7711"},{"$numberInt":"7712"},{"$numberInt":"7713"},{"$numberInt":"7714"},{"$numberInt":"7715"},{"$numberInt":"7716"},{"$numberInt":"7717"},{"$numberInt":"7718"},{"$numberInt":"7719"},{"$numberInt":"7720"},{"$numberInt":"7721"},{"$numberInt":"7722"},{"$numberInt":"7723"},{"$numberInt":"7724"},{"$numberInt":"7725"},{"$numberInt":"7726"},{"$numberInt":"7727"},{"$numberInt":"7728"},{"$numberInt":"7729"},{"$numberInt":"7730"},{"$numberInt":"7731"},{"$numberInt":"7732"},{"$numberInt":"7733"},{"$numberInt":"7734"},{"$numberInt":"7735"},{"$numberInt":"7736"},{"$numberInt":"7737"},{"$numberInt":"7738"},{"$numberInt":"7739"},{"$numberInt":"7740"},{"$numberInt":"7741"},{"$numberInt":"7742"},{"$numberInt":"7743"},{"$numberInt":"7744"},{"$numberInt":"7745"},{"$numberInt":"7746"},{"$numberInt":"7747"},{"$numberInt":"7748"},{"$numberInt":"7749"},{"$numberInt":"7750"},{"$numberInt":"7751"},{"$numberInt":"7752"},{"$numberInt":"7753"},{"$numberInt":"7754"},{"$numberInt":"7755"},{"$numberInt":"7756"},{"$numberInt":"7757"},{"$numberInt":"7758"},{"$numberInt":"7759"},{"$numberInt":"7760"},{"$numberInt":"7761"},{"$numberInt":"7762"},{"$numberInt":"7763"},{"$numberInt":"7764"},{"$numberInt":"7765"},{"$numberInt":"7766"},{"$numberInt":"7767"},{"$numberInt":"7768"},{"$numberInt":"7769"},{"$numberInt":"7770"},{"$numberInt":"7771"},{"$numberInt":"7772"},{"$numberInt":"7773"},{"$numberInt":"7774"},{"$numberInt":"7775"},{"$numberInt":"7776"},{"$numberInt":"7777"},{"$numberInt":"7778"},{"$numberInt":"7779"},{"$numberInt":"7780"},{"$numberInt":"7781"},{"$numberInt":"7782"},{"$numberInt":"7783"},{"$numberInt":"7784"},{"$numberInt":"7785"},{"$numberInt":"7786"},{"$numberInt":"7787"},{"$numberInt":"7788"},{"$numberInt":"7789"},{"$numberInt":"7790"},{"$numberInt":"7791"},{"$numberInt":"7792"},{"$numberInt":"7793"},{"$numberInt":"7794"},{"$numberInt":"7795"},{"$numberInt":"7796"},{"$numberInt":"7797"},{"$numberInt":"7798"},{"$numberInt":"7799"},{"$numberInt":"7800"},{"$numberInt":"7801"},{"$numberInt":"7802"},{"$numberInt":"7803"},{"$numberInt":"7804"},{"$numberInt":"7805"},{"$numberInt":"7806"},{"$numberInt":"7807"},{"$numberInt":"7808"},{"$numberInt":"7809"},{"$numberInt":"7810"},{"$numberInt":"7811"},{"$numberInt":"7812"},{"$numberInt":"7813"},{"$numberInt":"7814"},{"$numberInt":"7815"},{"$numberInt":"7816"},{"$numberInt":"7817"},{"$numberInt":"7818"},{"$numberInt":"7819"},{"$numberInt":"7820"},{"$numberInt":"7821"},{"$numberInt":"7822"},{"$numberInt":"7823"},{"$numberInt":"7824"},{"$numberInt":"7825"},{"$numberInt":"7826"},{"$numberInt":"7827"},{"$numberInt":"7828"},{"$numberInt":"7829"},{"$numberInt":"7830"},{"$numberInt":"7831"},{"$numberInt":"7832"},{"$numberInt":"7833"},{"$numberInt":"7834"},{"$numberInt":"7835"},{"$numberInt":"7836"},{"$numberInt":"7837"},{"$numberInt":"7838"},{"$numberInt":"7839"},{"$numberInt":"7840"},{"$numberInt":"7841"},{"$numberInt":"7842"},{"$numberInt":"7843"},{"$numberInt":"7844"},{"$numberInt":"7845"},{"$numberInt":"7846"},{"$numberInt":"7847"},{"$numberInt":"7848"},{"$numberInt":"7849"},{"$numberInt":"7850"},{"$numberInt":"7851"},{"$numberInt":"7852"},{"$numberInt":"7853"},{"$numberInt":"7854"},{"$numberInt":"7855"},{"$numberInt":"7856"},{"$numberInt":"7857"},{"$numberInt":"7858"},{"$numberInt":"7859"},{"$numberInt":"7860"},{"$numberInt":"7861"},{"$numberInt":"7862"},{"$numberInt":"7863"},{"$numberInt":"7864"},{"$numberInt":"7865"},{"$numberInt":"7866"},{"$numberInt":"7867"},{"$numberInt":"7868"},{"$numberInt":"7869"},{"$numberInt":"7870"},{"$numberInt":"7871"},{"$numberInt":"7872"},{"$numberInt":"7873"},{"$numberInt":"7874"},{"$numberInt":"7875"},{"$numberInt":"7876"},{"$numberInt":"7877"},{"$numberInt":"7878"},{"$numberInt":"7879"},{"$numberInt":"7880"},{"$numberInt":"7881"},{"$numberInt":"7882"},{"$numberInt":"7883"},{"$numberInt":"7884"},{"$numberInt":"7885"},{"$numberInt":"7886"},{"$numberInt":"7887"},{"$numberInt":"7888"},{"$numberInt":"7889"},{"$numberInt":"7890"},{"$numberInt":"7891"},{"$numberInt":"7892"},{"$numberInt":"7893"},{"$numberInt":"7894"},{"$numberInt":"7895"},{"$numberInt":"7896"},{"$numberInt":"7897"},{"$numberInt":"7898"},{"$numberInt":"7899"},{"$numberInt":"7900"},{"$numberInt":"7901"},{"$numberInt":"7902"},{"$numberInt":"7903"},{"$numberInt":"7904"},{"$numberInt":"7905"},{"$numberInt":"7906"},{"$numberInt":"7907"},{"$numberInt":"7908"},{"$numberInt":"7909"},{"$numberInt":"7910"},{"$numberInt":"7911"},{"$numberInt":"7912"},{"$numberInt":"7913"},{"$numberInt":"7914"},{"$numberInt":"7915"},{"$numberInt":"7916"},{"$numberInt":"7917"},{"$numberInt":"7918"},{"$numberInt":"7919"},{"$numberInt":"7920"},{"$numberInt":"7921"},{"$numberInt":"7922"},{"$numberInt":"7923"},{"$numberInt":"7924"},{"$numberInt":"7925"},{"$numberInt":"7926"},{"$numberInt":"7927"},{"$numberInt":"7928"},{"$numberInt":"7929"},{"$numberInt":"7930"},{"$numberInt":"7931"},{"$numberInt":"7932"},{"$numberInt":"7933"},{"$numberInt":"7934"},{"$numberInt":"7935"},{"$numberInt":"7936"},{"$numberInt":"7937"},{"$numberInt":"7938"},{"$numberInt":"7939"},{"$numberInt":"7940"},{"$numberInt":"7941"},{"$numberInt":"7942"},{"$numberInt":"7943"},{"$numberInt":"7944"},{"$numberInt":"7945"},{"$numberInt":"7946"},{"$numberInt":"7947"},{"$numberInt":"7948"},{"$numberInt":"7949"},{"$numberInt":"7950"},{"$numberInt":"7951"},{"$numberInt":"7952"},{"$numberInt":"7953"},{"$numberInt":"7954"},{"$numberInt":"7955"},{"$numberInt":"7956"},{"$numberInt":"7957"},{"$numberInt":"7958"},{"$numberInt":"7959"},{"$numberInt":"7960"},{"$numberInt":"7961"},{"$numberInt":"7962"},{"$numberInt":"7963"},{"$numberInt":"7964"},{"$numberInt":"7965"},{"$numberInt":"7966"},{"$numberInt":"7967"},{"$numberInt":"7968"},{"$numberInt":"7969"},{"$numberInt":"7970"},{"$numberInt":"7971"},{"$numberInt":"7972"},{"$numberInt":"7973"},{"$numberInt":"7974"},{"$numberInt":"7975"},{"$numberInt":"7976"},{"$numberInt":"7977"},{"$numberInt":"7978"},{"$numberInt":"7979"},{"$numberInt":"7980"},{"$numberInt":"7981"},{"$numberInt":"7982"},{"$numberInt":"7983"},{"$numberInt":"7984"},{"$numberInt":"7985"},{"$numberInt":"7986"},{"$numberInt":"7987"},{"$numberInt":"7988"},{"$numberInt":"7989"},{"$numberInt":"7990"},{"$numberInt":"7991"},{"$numberInt":"7992"},{"$numberInt":"7993"},{"$numberInt":"7994"},{"$numberInt":"7995"},{"$numberInt":"7996"},{"$numberInt":"7997"},{"$numberInt":"7998"},{"$numberInt":"7999"},{"$numberInt":"8000"},{"$numberInt":"8001"},{"$numberInt":"8002"},{"$numberInt":"8003"},{"$numberInt":"8004"},{"$numberInt":"8005"},{"$numberInt":"8006"},{"$numberInt":"8007"},{"$numberInt":"8008"},{"$numberInt":"8009"},{"$numberInt":"8010"},{"$numberInt":"8011"},{"$numberInt":"8012"},{"$numberInt":"8013"},{"$numberInt":"8014"},{"$numberInt":"8015"},{"$numberInt":"8016"},{"$numberInt":"8017"},{"$numberInt":"8018"},{"$numberInt":"8019"},{"$numberInt":"8020"},{"$numberInt":"8021"},{"$numberInt":"8022"},{"$numberInt":"8023"},{"$numberInt":"8024"},{"$numberInt":"8025"},{"$numberInt":"8026"},{"$numberInt":"8027"},{"$numberInt":"8028"},{"$numberInt":"8029"},{"$numberInt":"8030"},{"$numberInt":"8031"},{"$numberInt":"8032"},{"$numberInt":"8033"},{"$numberInt":"8034"},{"$numberInt":"8035"},{"$numberInt":"8036"},{"$numberInt":"8037"},{"$numberInt":"8038"},{"$numberInt":"8039"},{"$numberInt":"8040"},{"$numberInt":"8041"},{"$numberInt":"8042"},{"$numberInt":"8043"},{"$numberInt":"8044"},{"$numberInt":"8045"},{"$numberInt":"8046"},{"$numberInt":"8047"},{"$numberInt":"8048"},{"$numberInt":"8049"},{"$numberInt":"8050"},{"$numberInt":"8051"},{"$numberInt":"8052"},{"$numberInt":"8053"},{"$numberInt":"8054"},{"$numberInt":"8055"},{"$numberInt":"8056"},{"$numberInt":"8057"},{"$numberInt":"8058"},{"$numberInt":"8059"},{"$numberInt":"8060"},{"$numberInt":"8061"},{"$numberInt":"8062"},{"$numberInt":"8063"},{"$numberInt":"8064"},{"$numberInt":"8065"},{"$numberInt":"8066"},{"$numberInt":"8067"},{"$numberInt":"8068"},{"$numberInt":"8069"},{"$numberInt":"8070"},{"$numberInt":"8071"},{"$numberInt":"8072"},{"$numberInt":"8073"},{"$numberInt":"8074"},{"$numberInt":"8075"},{"$numberInt":"8076"},{"$numberInt":"8077"},{"$numberInt":"8078"},{"$numberInt":"8079"},{"$numberInt":"8080"},{"$numberInt":"8081"},{"$numberInt":"8082"},{"$numberInt":"8083"},{"$numberInt":"8084"},{"$numberInt":"8085"},{"$numberInt":"8086"},{"$numberInt":"8087"},{"$numberInt":"8088"},{"$numberInt":"8089"},{"$numberInt":"8090"},{"$numberInt":"8091"},{"$numberInt":"8092"},{"$numberInt":"8093"},{"$numberInt":"8094"},{"$numberInt":"8095"},{"$numberInt":"8096"},{"$numberInt":"8097"},{"$numberInt":"8098"},{"$numberInt":"8099"},{"$numberInt":"8100"},{"$numberInt":"8101"},{"$numberInt":"8102"},{"$numberInt":"8103"},{"$numberInt":"8104"},{"$numberInt":"8105"},{"$numberInt":"8106"},{"$numberInt":"8107"},{"$numberInt":"8108"},{"$numberInt":"8109"},{"$numberInt":"8110"},{"$numberInt":"8111"},{"$numberInt":"8112"},{"$numberInt":"8113"},{"$numberInt":"8114"},{"$numberInt":"8115"},{"$numberInt":"8116"},{"$numberInt":"8117"},{"$numberInt":"8118"},{"$numberInt":"8119"},{"$numberInt":"8120"},{"$numberInt":"8121"},{"$numberInt":"8122"},{"$numberInt":"8123"},{"$numberInt":"8124"},{"$numberInt":"8125"},{"$numberInt":"8126"},{"$numberInt":"8127"},{"$numberInt":"8128"},{"$numberInt":"8129"},{"$numberInt":"8130"},{"$numberInt":"8131"},{"$numberInt":"8132"},{"$numberInt":"8133"},{"$numberInt":"8134"},{"$numberInt":"8135"},{"$numberInt":"8136"},{"$numberInt":"8137"},{"$numberInt":"8138"},{"$numberInt":"8139"},{"$numberInt":"8140"},{"$numberInt":"8141"},{"$numberInt":"8142"},{"$numberInt":"8143"},{"$numberInt":"8144"},{"$numberInt":"8145"},{"$numberInt":"8146"},{"$numberInt":"8147"},{"$numberInt":"8148"},{"$numberInt":"8149"},{"$numberInt":"8150"},{"$numberInt":"8151"},{"$numberInt":"8152"},{"$numberInt":"8153"},{"$numberInt":"8154"},{"$numberInt":"8155"},{"$numberInt":"8156"},{"$numberInt":"8157"},{"$numberInt":"8158"},{"$numberInt":"8159"},{"$numberInt":"8160"},{"$numberInt":"8161"},{"$numberInt":"8162"},{"$numberInt":"8163"},{"$numberInt":"8164"},{"$numberInt":"8165"},{"$numberInt":"8166"},{"$numberInt":"8167"},{"$numberInt":"8168"},{"$numberInt":"8169"},{"$numberInt":"8170"},{"$numberInt":"8171"},{"$numberInt":"8172"},{"$numberInt":"8173"},{"$numberInt":"8174"},{"$numberInt":"8175"},{"$numberInt":"8176"},{"$numberInt":"8177"},{"$numberInt":"8178"},{"$numberInt":"8179"},{"$numberInt":"8180"},{"$numberInt":"8181"},{"$numberInt":"8182"},{"$numberInt":"8183"},{"$numberInt":"8184"},{"$numberInt":"8185"},{"$numberInt":"8186"},{"$numberInt":"8187"},{"$numberInt":"8188"},{"$numberInt":"8189"},{"$numberInt":"8190"},{"$numberInt":"8191"},{"$numberInt":"8192"},{"$numberInt":"8193"},{"$numberInt":"8194"},{"$numberInt":"8195"},{"$numberInt":"8196"},{"$numberInt":"8197"},{"$numberInt":"8198"},{"$numberInt":"8199"},{"$numberInt":"8200"},{"$numberInt":"8201"},{"$numberInt":"8202"},{"$numberInt":"8203"},{"$numberInt":"8204"},{"$numberInt":"8205"},{"$numberInt":"8206"},{"$numberInt":"8207"},{"$numberInt":"8208"},{"$numberInt":"8209"},{"$numberInt":"8210"},{"$numberInt":"8211"},{"$numberInt":"8212"},{"$numberInt":"8213"},{"$numberInt":"8214"},{"$numberInt":"8215"},{"$numberInt":"8216"},{"$numberInt":"8217"},{"$numberInt":"8218"},{"$numberInt":"8219"},{"$numberInt":"8220"},{"$numberInt":"8221"},{"$numberInt":"8222"},{"$numberInt":"8223"},{"$numberInt":"8224"},{"$numberInt":"8225"},{"$numberInt":"8226"},{"$numberInt":"8227"},{"$numberInt":"8228"},{"$numberInt":"8229"},{"$numberInt":"8230"},{"$numberInt":"8231"},{"$numberInt":"8232"},{"$numberInt":"8233"},{"$numberInt":"8234"},{"$numberInt":"8235"},{"$numberInt":"8236"},{"$numberInt":"8237"},{"$numberInt":"8238"},{"$numberInt":"8239"},{"$numberInt":"8240"},{"$numberInt":"8241"},{"$numberInt":"8242"},{"$numberInt":"8243"},{"$numberInt":"8244"},{"$numberInt":"8245"},{"$numberInt":"8246"},{"$numberInt":"8247"},{"$numberInt":"8248"},{"$numberInt":"8249"},{"$numberInt":"8250"},{"$numberInt":"8251"},{"$numberInt":"8252"},{"$numberInt":"8253"},{"$numberInt":"8254"},{"$numberInt":"8255"},{"$numberInt":"8256"},{"$numberInt":"8257"},{"$numberInt":"8258"},{"$numberInt":"8259"},{"$numberInt":"8260"},{"$numberInt":"8261"},{"$numberInt":"8262"},{"$numberInt":"8263"},{"$numberInt":"8264"},{"$numberInt":"8265"},{"$numberInt":"8266"},{"$numberInt":"8267"},{"$numberInt":"8268"},{"$numberInt":"8269"},{"$numberInt":"8270"},{"$numberInt":"8271"},{"$numberInt":"8272"},{"$numberInt":"8273"},{"$numberInt":"8274"},{"$numberInt":"8275"},{"$numberInt":"8276"},{"$numberInt":"8277"},{"$numberInt":"8278"},{"$numberInt":"8279"},{"$numberInt":"8280"},{"$numberInt":"8281"},{"$numberInt":"8282"},{"$numberInt":"8283"},{"$numberInt":"8284"},{"$numberInt":"8285"},{"$numberInt":"8286"},{"$numberInt":"8287"},{"$numberInt":"8288"},{"$numberInt":"8289"},{"$numberInt":"8290"},{"$numberInt":"8291"},{"$numberInt":"8292"},{"$numberInt":"8293"},{"$numberInt":"8294"},{"$numberInt":"8295"},{"$numberInt":"8296"},{"$numberInt":"8297"},{"$numberInt":"8298"},{"$numberInt":"8299"},{"$numberInt":"8300"},{"$numberInt":"8301"},{"$numberInt":"8302"},{"$numberInt":"8303"},{"$numberInt":"8304"},{"$numberInt":"8305"},{"$numberInt":"8306"},{"$numberInt":"8307"},{"$numberInt":"8308"},{"$numberInt":"8309"},{"$numberInt":"8310"},{"$numberInt":"8311"},{"$numberInt":"8312"},{"$numberInt":"8313"},{"$numberInt":"8314"},{"$numberInt":"8315"},{"$numberInt":"8316"},{"$numberInt":"8317"},{"$numberInt":"8318"},{"$numberInt":"8319"},{"$numberInt":"8320"},{"$numberInt":"8321"},{"$numberInt":"8322"},{"$numberInt":"8323"},{"$numberInt":"8324"},{"$numberInt":"8325"},{"$numberInt":"8326"},{"$numberInt":"8327"},{"$numberInt":"8328"},{"$numberInt":"8329"},{"$numberInt":"8330"},{"$numberInt":"8331"},{"$numberInt":"8332"},{"$numberInt":"8333"},{"$numberInt":"8334"},{"$numberInt":"8335"},{"$numberInt":"8336"},{"$numberInt":"8337"},{"$numberInt":"8338"},{"$numberInt":"8339"},{"$numberInt":"8340"},{"$numberInt":"8341"},{"$numberInt":"8342"},{"$numberInt":"8343"},{"$numberInt":"8344"},{"$numberInt":"8345"},{"$numberInt":"8346"},{"$numberInt":"8347"},{"$numberInt":"8348"},{"$numberInt":"8349"},{"$numberInt":"8350"},{"$numberInt":"8351"},{"$numberInt":"8352"},{"$numberInt":"8353"},{"$numberInt":"8354"},{"$numberInt":"8355"},{"$numberInt":"8356"},{"$numberInt":"8357"},{"$numberInt":"8358"},{"$numberInt":"8359"},{"$numberInt":"8360"},{"$numberInt":"8361"},{"$numberInt":"8362"},{"$numberInt":"8363"},{"$numberInt":"8364"},{"$numberInt":"8365"},{"$numberInt":"8366"},{"$numberInt":"8367"},{"$numberInt":"8368"},{"$numberInt":"8369"},{"$numberInt":"8370"},{"$numberInt":"8371"},{"$numberInt":"8372"},{"$numberInt":"8373"},{"$numberInt":"8374"},{"$numberInt":"8375"},{"$numberInt":"8376"},{"$numberInt":"8377"},{"$numberInt":"8378"},{"$numberInt":"8379"},{"$numberInt":"8380"},{"$numberInt":"8381"},{"$numberInt":"8382"},{"$numberInt":"8383"},{"$numberInt":"8384"},{"$numberInt":"8385"},{"$numberInt":"8386"},{"$numberInt":"8387"},{"$numberInt":"8388"},{"$numberInt":"8389"},{"$numberInt":"8390"},{"$numberInt":"8391"},{"$numberInt":"8392"},{"$numberInt":"8393"},{"$numberInt":"8394"},{"$numberInt":"8395"},{"$numberInt":"8396"},{"$numberInt":"8397"},{"$numberInt":"8398"},{"$numberInt":"8399"},{"$numberInt":"8400"},{"$numberInt":"8401"},{"$numberInt":"8402"},{"$numberInt":"8403"},{"$numberInt":"8404"},{"$numberInt":"8405"},{"$numberInt":"8406"},{"$numberInt":"8407"},{"$numberInt":"8408"},{"$numberInt":"8409"},{"$numberInt":"8410"},{"$numberInt":"8411"},{"$numberInt":"8412"},{"$numberInt":"8413"},{"$numberInt":"8414"},{"$numberInt":"8415"},{"$numberInt":"8416"},{"$numberInt":"8417"},{"$numberInt":"8418"},{"$numberInt":"8419"},{"$numberInt":"8420"},{"$numberInt":"8421"},{"$numberInt":"8422"},{"$numberInt":"8423"},{"$numberInt":"8424"},{"$numberInt":"8425"},{"$numberInt":"8426"},{"$numberInt":"8427"},{"$numberInt":"8428"},{"$numberInt":"8429"},{"$numberInt":"8430"},{"$numberInt":"8431"},{"$numberInt":"8432"},{"$numberInt":"8433"},{"$numberInt":"8434"},{"$numberInt":"8435"},{"$numberInt":"8436"},{"$numberInt":"8437"},{"$numberInt":"8438"},{"$numberInt":"8439"},{"$numberInt":"8440"},{"$numberInt":"8441"},{"$numberInt":"8442"},{"$numberInt":"8443"},{"$numberInt":"8444"},{"$numberInt":"8445"},{"$numberInt":"8446"},{"$numberInt":"8447"},{"$numberInt":"8448"},{"$numberInt":"8449"},{"$numberInt":"8450"},{"$numberInt":"8451"},{"$numberInt":"8452"},{"$numberInt":"8453"},{"$numberInt":"8454"},{"$numberInt":"8455"},{"$numberInt":"8456"},{"$numberInt":"8457"},{"$numberInt":"8458"},{"$numberInt":"8459"},{"$numberInt":"8460"},{"$numberInt":"8461"},{"$numberInt":"8462"},{"$numberInt":"8463"},{"$numberInt":"8464"},{"$numberInt":"8465"},{"$numberInt":"8466"},{"$numberInt":"8467"},{"$numberInt":"8468"},{"$numberInt":"8469"},{"$numberInt":"8470"},{"$numberInt":"8471"},{"$numberInt":"8472"},{"$numberInt":"8473"},{"$numberInt":"8474"},{"$numberInt":"8475"},{"$numberInt":"8476"},{"$numberInt":"8477"},{"$numberInt":"8478"},{"$numberInt":"8479"},{"$numberInt":"8480"},{"$numberInt":"8481"},{"$numberInt":"8482"},{"$numberInt":"8483"},{"$numberInt":"8484"},{"$numberInt":"8485"},{"$numberInt":"8486"},{"$numberInt":"8487"},{"$numberInt":"8488"},{"$numberInt":"8489"},{"$numberInt":"8490"},{"$numberInt":"8491"},{"$numberInt":"8492"},{"$numberInt":"8493"},{"$numberInt":"8494"},{"$numberInt":"8495"},{"$numberInt":"8496"},{"$numberInt":"8497"},{"$numberInt":"8498"},{"$numberInt":"8499"},{"$numberInt":"8500"},{"$numberInt":"8501"},{"$numberInt":"8502"},{"$numberInt":"8503"},{"$numberInt":"8504"},{"$numberInt":"8505"},{"$numberInt":"8506"},{"$numberInt":"8507"},{"$numberInt":"8508"},{"$numberInt":"8509"},{"$numberInt":"8510"},{"$numberInt":"8511"},{"$numberInt":"8512"},{"$numberInt":"8513"},{"$numberInt":"8514"},{"$numberInt":"8515"},{"$numberInt":"8516"},{"$numberInt":"8517"},{"$numberInt":"8518"},{"$numberInt":"8519"},{"$numberInt":"8520"},{"$numberInt":"8521"},{"$numberInt":"8522"},{"$numberInt":"8523"},{"$numberInt":"8524"},{"$numberInt":"8525"},{"$numberInt":"8526"},{"$numberInt":"8527"},{"$numberInt":"8528"},{"$numberInt":"8529"},{"$numberInt":"8530"},{"$numberInt":"8531"},{"$numberInt":"8532"},{"$numberInt":"8533"},{"$numberInt":"8534"},{"$numberInt":"8535"},{"$numberInt":"8536"},{"$numberInt":"8537"},{"$numberInt":"8538"},{"$numberInt":"8539"},{"$numberInt":"8540"},{"$numberInt":"8541"},{"$numberInt":"8542"},{"$numberInt":"8543"},{"$numberInt":"8544"},{"$numberInt":"8545"},{"$numberInt":"8546"},{"$numberInt":"8547"},{"$numberInt":"8548"},{"$numberInt":"8549"},{"$numberInt":"8550"},{"$numberInt":"8551"},{"$numberInt":"8552"},{"$numberInt":"8553"},{"$numberInt":"8554"},{"$numberInt":"8555"},{"$numberInt":"8556"},{"$numberInt":"8557"},{"$numberInt":"8558"},{"$numberInt":"8559"},{"$numberInt":"8560"},{"$numberInt":"8561"},{"$numberInt":"8562"},{"$numberInt":"8563"},{"$numberInt":"8564"},{"$numberInt":"8565"},{"$numberInt":"8566"},{"$numberInt":"8567"},{"$numberInt":"8568"},{"$numberInt":"8569"},{"$numberInt":"8570"},{"$numberInt":"8571"},{"$numberInt":"8572"},{"$numberInt":"8573"},{"$numberInt":"8574"},{"$numberInt":"8575"},{"$numberInt":"8576"},{"$numberInt":"8577"},{"$numberInt":"8578"},{"$numberInt":"8579"},{"$numberInt":"8580"},{"$numberInt":"8581"},{"$numberInt":"8582"},{"$numberInt":"8583"},{"$numberInt":"8584"},{"$numberInt":"8585"},{"$numberInt":"8586"},{"$numberInt":"8587"},{"$numberInt":"8588"},{"$numberInt":"8589"},{"$numberInt":"8590"},{"$numberInt":"8591"},{"$numberInt":"8592"},{"$numberInt":"8593"},{"$numberInt":"8594"},{"$numberInt":"8595"},{"$numberInt":"8596"},{"$numberInt":"8597"},{"$numberInt":"8598"},{"$numberInt":"8599"},{"$numberInt":"8600"},{"$numberInt":"8601"},{"$numberInt":"8602"},{"$numberInt":"8603"},{"$numberInt":"8604"},{"$numberInt":"8605"},{"$numberInt":"8606"},{"$numberInt":"8607"},{"$numberInt":"8608"},{"$numberInt":"8609"},{"$numberInt":"8610"},{"$numberInt":"8611"},{"$numberInt":"8612"},{"$numberInt":"8613"},{"$numberInt":"8614"},{"$numberInt":"8615"},{"$numberInt":"8616"},{"$numberInt":"8617"},{"$numberInt":"8618"},{"$numberInt":"8619"},{"$numberInt":"8620"},{"$numberInt":"8621"},{"$numberInt":"8622"},{"$numberInt":"8623"},{"$numberInt":"8624"},{"$numberInt":"8625"},{"$numberInt":"8626"},{"$numberInt":"8627"},{"$numberInt":"8628"},{"$numberInt":"8629"},{"$numberInt":"8630"},{"$numberInt":"8631"},{"$numberInt":"8632"},{"$numberInt":"8633"},{"$numberInt":"8634"},{"$numberInt":"8635"},{"$numberInt":"8636"},{"$numberInt":"8637"},{"$numberInt":"8638"},{"$numberInt":"8639"},{"$numberInt":"8640"},{"$numberInt":"8641"},{"$numberInt":"8642"},{"$numberInt":"8643"},{"$numberInt":"8644"},{"$numberInt":"8645"},{"$numberInt":"8646"},{"$numberInt":"8647"},{"$numberInt":"8648"},{"$numberInt":"8649"},{"$numberInt":"8650"},{"$numberInt":"8651"},{"$numberInt":"8652"},{"$numberInt":"8653"},{"$numberInt":"8654"},{"$numberInt":"8655"},{"$numberInt":"8656"},{"$numberInt":"8657"},{"$numberInt":"8658"},{"$numberInt":"8659"},{"$numberInt":"8660"},{"$numberInt":"8661"},{"$numberInt":"8662"},{"$numberInt":"8663"},{"$numberInt":"8664"},{"$numberInt":"8665"},{"$numberInt":"8666"},{"$numberInt":"8667"},{"$numberInt":"8668"},{"$numberInt":"8669"},{"$numberInt":"8670"},{"$numberInt":"8671"},{"$numberInt":"8672"},{"$numberInt":"8673"},{"$numberInt":"8674"},{"$numberInt":"8675"},{"$numberInt":"8676"},{"$numberInt":"8677"},{"$numberInt":"8678"},{"$numberInt":"8679"},{"$numberInt":"8680"},{"$numberInt":"8681"},{"$numberInt":"8682"},{"$numberInt":"8683"},{"$numberInt":"8684"},{"$numberInt":"8685"},{"$numberInt":"8686"},{"$numberInt":"8687"},{"$numberInt":"8688"},{"$numberInt":"8689"},{"$numberInt":"8690"},{"$numberInt":"8691"},{"$numberInt":"8692"},{"$numberInt":"8693"},{"$numberInt":"8694"},{"$numberInt":"8695"},{"$numberInt":"8696"},{"$numberInt":"8697"},{"$numberInt":"8698"},{"$numberInt":"8699"},{"$numberInt":"8700"},{"$numberInt":"8701"},{"$numberInt":"8702"},{"$numberInt":"8703"},{"$numberInt":"8704"},{"$numberInt":"8705"},{"$numberInt":"8706"},{"$numberInt":"8707"},{"$numberInt":"8708"},{"$numberInt":"8709"},{"$numberInt":"8710"},{"$numberInt":"8711"},{"$numberInt":"8712"},{"$numberInt":"8713"},{"$numberInt":"8714"},{"$numberInt":"8715"},{"$numberInt":"8716"},{"$numberInt":"8717"},{"$numberInt":"8718"},{"$numberInt":"8719"},{"$numberInt":"8720"},{"$numberInt":"8721"},{"$numberInt":"8722"},{"$numberInt":"8723"},{"$numberInt":"8724"},{"$numberInt":"8725"},{"$numberInt":"8726"},{"$numberInt":"8727"},{"$numberInt":"8728"},{"$numberInt":"8729"},{"$numberInt":"8730"},{"$numberInt":"8731"},{"$numberInt":"8732"},{"$numberInt":"8733"},{"$numberInt":"8734"},{"$numberInt":"8735"},{"$numberInt":"8736"},{"$numberInt":"8737"},{"$numberInt":"8738"},{"$numberInt":"8739"},{"$numberInt":"8740"},{"$numberInt":"8741"},{"$numberInt":"8742"},{"$numberInt":"8743"},{"$numberInt":"8744"},{"$numberInt":"8745"},{"$numberInt":"8746"},{"$numberInt":"8747"},{"$numberInt":"8748"},{"$numberInt":"8749"},{"$numberInt":"8750"},{"$numberInt":"8751"},{"$numberInt":"8752"},{"$numberInt":"8753"},{"$numberInt":"8754"},{"$numberInt":"8755"},{"$numberInt":"8756"},{"$numberInt":"8757"},{"$numberInt":"8758"},{"$numberInt":"8759"},{"$numberInt":"8760"},{"$numberInt":"8761"},{"$numberInt":"8762"},{"$numberInt":"8763"},{"$numberInt":"8764"},{"$numberInt":"8765"},{"$numberInt":"8766"},{"$numberInt":"8767"},{"$numberInt":"8768"},{"$numberInt":"8769"},{"$numberInt":"8770"},{"$numberInt":"8771"},{"$numberInt":"8772"},{"$numberInt":"8773"},{"$numberInt":"8774"},{"$numberInt":"8775"},{"$numberInt":"8776"},{"$numberInt":"8777"},{"$numberInt":"8778"},{"$numberInt":"8779"},{"$numberInt":"8780"},{"$numberInt":"8781"},{"$numberInt":"8782"},{"$numberInt":"8783"},{"$numberInt":"8784"},{"$numberInt":"8785"},{"$numberInt":"8786"},{"$numberInt":"8787"},{"$numberInt":"8788"},{"$numberInt":"8789"},{"$numberInt":"8790"},{"$numberInt":"8791"},{"$numberInt":"8792"},{"$numberInt":"8793"},{"$numberInt":"8794"},{"$numberInt":"8795"},{"$numberInt":"8796"},{"$numberInt":"8797"},{"$numberInt":"8798"},{"$numberInt":"8799"},{"$numberInt":"8800"},{"$numberInt":"8801"},{"$numberInt":"8802"},{"$numberInt":"8803"},{"$numberInt":"8804"},{"$numberInt":"8805"},{"$numberInt":"8806"},{"$numberInt":"8807"},{"$numberInt":"8808"},{"$numberInt":"8809"},{"$numberInt":"8810"},{"$numberInt":"8811"},{"$numberInt":"8812"},{"$numberInt":"8813"},{"$numberInt":"8814"},{"$numberInt":"8815"},{"$numberInt":"8816"},{"$numberInt":"8817"},{"$numberInt":"8818"},{"$numberInt":"8819"},{"$numberInt":"8820"},{"$numberInt":"8821"},{"$numberInt":"8822"},{"$numberInt":"8823"},{"$numberInt":"8824"},{"$numberInt":"8825"},{"$numberInt":"8826"},{"$numberInt":"8827"},{"$numberInt":"8828"},{"$numberInt":"8829"},{"$numberInt":"8830"},{"$numberInt":"8831"},{"$numberInt":"8832"},{"$numberInt":"8833"},{"$numberInt":"8834"},{"$numberInt":"8835"},{"$numberInt":"8836"},{"$numberInt":"8837"},{"$numberInt":"8838"},{"$numberInt":"8839"},{"$numberInt":"8840"},{"$numberInt":"8841"},{"$numberInt":"8842"},{"$numberInt":"8843"},{"$numberInt":"8844"},{"$numberInt":"8845"},{"$numberInt":"8846"},{"$numberInt":"8847"},{"$numberInt":"8848"},{"$numberInt":"8849"},{"$numberInt":"8850"},{"$numberInt":"8851"},{"$numberInt":"8852"},{"$numberInt":"8853"},{"$numberInt":"8854"},{"$numberInt":"8855"},{"$numberInt":"8856"},{"$numberInt":"8857"},{"$numberInt":"8858"},{"$numberInt":"8859"},{"$numberInt":"8860"},{"$numberInt":"8861"},{"$numberInt":"8862"},{"$numberInt":"8863"},{"$numberInt":"8864"},{"$numberInt":"8865"},{"$numberInt":"8866"},{"$numberInt":"8867"},{"$numberInt":"8868"},{"$numberInt":"8869"},{"$numberInt":"8870"},{"$numberInt":"8871"},{"$numberInt":"8872"},{"$numberInt":"8873"},{"$numberInt":"8874"},{"$numberInt":"8875"},{"$numberInt":"8876"},{"$numberInt":"8877"},{"$numberInt":"8878"},{"$numberInt":"8879"},{"$numberInt":"8880"},{"$numberInt":"8881"},{"$numberInt":"8882"},{"$numberInt":"8883"},{"$numberInt":"8884"},{"$numberInt":"8885"},{"$numberInt":"8886"},{"$numberInt":"8887"},{"$numberInt":"8888"},{"$numberInt":"8889"},{"$numberInt":"8890"},{"$numberInt":"8891"},{"$numberInt":"8892"},{"$numberInt":"8893"},{"$numberInt":"8894"},{"$numberInt":"8895"},{"$numberInt":"8896"},{"$numberInt":"8897"},{"$numberInt":"8898"},{"$numberInt":"8899"},{"$numberInt":"8900"},{"$numberInt":"8901"},{"$numberInt":"8902"},{"$numberInt":"8903"},{"$numberInt":"8904"},{"$numberInt":"8905"},{"$numberInt":"8906"},{"$numberInt":"8907"},{"$numberInt":"8908"},{"$numberInt":"8909"},{"$numberInt":"8910"},{"$numberInt":"8911"},{"$numberInt":"8912"},{"$numberInt":"8913"},{"$numberInt":"8914"},{"$numberInt":"8915"},{"$numberInt":"8916"},{"$numberInt":"8917"},{"$numberInt":"8918"},{"$numberInt":"8919"},{"$numberInt":"8920"},{"$numberInt":"8921"},{"$numberInt":"8922"},{"$numberInt":"8923"},{"$numberInt":"8924"},{"$numberInt":"8925"},{"$numberInt":"8926"},{"$numberInt":"8927"},{"$numberInt":"8928"},{"$numberInt":"8929"},{"$numberInt":"8930"},{"$numberInt":"8931"},{"$numberInt":"8932"},{"$numberInt":"8933"},{"$numberInt":"8934"},{"$numberInt":"8935"},{"$numberInt":"8936"},{"$numberInt":"8937"},{"$numberInt":"8938"},{"$numberInt":"8939"},{"$numberInt":"8940"},{"$numberInt":"8941"},{"$numberInt":"8942"},{"$numberInt":"8943"},{"$numberInt":"8944"},{"$numberInt":"8945"},{"$numberInt":"8946"},{"$numberInt":"8947"},{"$numberInt":"8948"},{"$numberInt":"8949"},{"$numberInt":"8950"},{"$numberInt":"8951"},{"$numberInt":"8952"},{"$numberInt":"8953"},{"$numberInt":"8954"},{"$numberInt":"8955"},{"$numberInt":"8956"},{"$numberInt":"8957"},{"$numberInt":"8958"},{"$numberInt":"8959"},{"$numberInt":"8960"},{"$numberInt":"8961"},{"$numberInt":"8962"},{"$numberInt":"8963"},{"$numberInt":"8964"},{"$numberInt":"8965"},{"$numberInt":"8966"},{"$numberInt":"8967"},{"$numberInt":"8968"},{"$numberInt":"8969"},{"$numberInt":"8970"},{"$numberInt":"8971"},{"$numberInt":"8972"},{"$numberInt":"8973"},{"$numberInt":"8974"},{"$numberInt":"8975"},{"$numberInt":"8976"},{"$numberInt":"8977"},{"$numberInt":"8978"},{"$numberInt":"8979"},{"$numberInt":"8980"},{"$numberInt":"8981"},{"$numberInt":"8982"},{"$numberInt":"8983"},{"$numberInt":"8984"},{"$numberInt":"8985"},{"$numberInt":"8986"},{"$numberInt":"8987"},{"$numberInt":"8988"},{"$numberInt":"8989"},{"$numberInt":"8990"},{"$numberInt":"8991"},{"$numberInt":"8992"},{"$numberInt":"8993"},{"$numberInt":"8994"},{"$numberInt":"8995"},{"$numberInt":"8996"},{"$numberInt":"8997"},{"$numberInt":"8998"},{"$numberInt":"8999"},{"$numberInt":"9000"},{"$numberInt":"9001"},{"$numberInt":"9002"},{"$numberInt":"9003"},{"$numberInt":"9004"},{"$numberInt":"9005"},{"$numberInt":"9006"},{"$numberInt":"9007"},{"$numberInt":"9008"},{"$numberInt":"9009"},{"$numberInt":"9010"},{"$numberInt":"9011"},{"$numberInt":"9012"},{"$numberInt":"9013"},{"$numberInt":"9014"},{"$numberInt":"9015"},{"$numberInt":"9016"},{"$numberInt":"9017"},{"$numberInt":"9018"},{"$numberInt":"9019"},{"$numberInt":"9020"},{"$numberInt":"9021"},{"$numberInt":"9022"},{"$numberInt":"9023"},{"$numberInt":"9024"},{"$numberInt":"9025"},{"$numberInt":"9026"},{"$numberInt":"9027"},{"$numberInt":"9028"},{"$numberInt":"9029"},{"$numberInt":"9030"},{"$numberInt":"9031"},{"$numberInt":"9032"},{"$numberInt":"9033"},{"$numberInt":"9034"},{"$numberInt":"9035"},{"$numberInt":"9036"},{"$numberInt":"9037"},{"$numberInt":"9038"},{"$numberInt":"9039"},{"$numberInt":"9040"},{"$numberInt":"9041"},{"$numberInt":"9042"},{"$numberInt":"9043"},{"$numberInt":"9044"},{"$numberInt":"9045"},{"$numberInt":"9046"},{"$numberInt":"9047"},{"$numberInt":"9048"},{"$numberInt":"9049"},{"$numberInt":"9050"},{"$numberInt":"9051"},{"$numberInt":"9052"},{"$numberInt":"9053"},{"$numberInt":"9054"},{"$numberInt":"9055"},{"$numberInt":"9056"},{"$numberInt":"9057"},{"$numberInt":"9058"},{"$numberInt":"9059"},{"$numberInt":"9060"},{"$numberInt":"9061"},{"$numberInt":"9062"},{"$numberInt":"9063"},{"$numberInt":"9064"},{"$numberInt":"9065"},{"$numberInt":"9066"},{"$numberInt":"9067"},{"$numberInt":"9068"},{"$numberInt":"9069"},{"$numberInt":"9070"},{"$numberInt":"9071"},{"$numberInt":"9072"},{"$numberInt":"9073"},{"$numberInt":"9074"},{"$numberInt":"9075"},{"$numberInt":"9076"},{"$numberInt":"9077"},{"$numberInt":"9078"},{"$numberInt":"9079"},{"$numberInt":"9080"},{"$numberInt":"9081"},{"$numberInt":"9082"},{"$numberInt":"9083"},{"$numberInt":"9084"},{"$numberInt":"9085"},{"$numberInt":"9086"},{"$numberInt":"9087"},{"$numberInt":"9088"},{"$numberInt":"9089"},{"$numberInt":"9090"},{"$numberInt":"9091"},{"$numberInt":"9092"},{"$numberInt":"9093"},{"$numberInt":"9094"},{"$numberInt":"9095"},{"$numberInt":"9096"},{"$numberInt":"9097"},{"$numberInt":"9098"},{"$numberInt":"9099"},{"$numberInt":"9100"},{"$numberInt":"9101"},{"$numberInt":"9102"},{"$numberInt":"9103"},{"$numberInt":"9104"},{"$numberInt":"9105"},{"$numberInt":"9106"},{"$numberInt":"9107"},{"$numberInt":"9108"},{"$numberInt":"9109"},{"$numberInt":"9110"},{"$numberInt":"9111"},{"$numberInt":"9112"},{"$numberInt":"9113"},{"$numberInt":"9114"},{"$numberInt":"9115"},{"$numberInt":"9116"},{"$numberInt":"9117"},{"$numberInt":"9118"},{"$numberInt":"9119"},{"$numberInt":"9120"},{"$numberInt":"9121"},{"$numberInt":"9122"},{"$numberInt":"9123"},{"$numberInt":"9124"},{"$numberInt":"9125"},{"$numberInt":"9126"},{"$numberInt":"9127"},{"$numberInt":"9128"},{"$numberInt":"9129"},{"$numberInt":"9130"},{"$numberInt":"9131"},{"$numberInt":"9132"},{"$numberInt":"9133"},{"$numberInt":"9134"},{"$numberInt":"9135"},{"$numberInt":"9136"},{"$numberInt":"9137"},{"$numberInt":"9138"},{"$numberInt":"9139"},{"$numberInt":"9140"},{"$numberInt":"9141"},{"$numberInt":"9142"},{"$numberInt":"9143"},{"$numberInt":"9144"},{"$numberInt":"9145"},{"$numberInt":"9146"},{"$numberInt":"9147"},{"$numberInt":"9148"},{"$numberInt":"9149"},{"$numberInt":"9150"},{"$numberInt":"9151"},{"$numberInt":"9152"},{"$numberInt":"9153"},{"$numberInt":"9154"},{"$numberInt":"9155"},{"$numberInt":"9156"},{"$numberInt":"9157"},{"$numberInt":"9158"},{"$numberInt":"9159"},{"$numberInt":"9160"},{"$numberInt":"9161"},{"$numberInt":"9162"},{"$numberInt":"9163"},{"$numberInt":"9164"},{"$numberInt":"9165"},{"$numberInt":"9166"},{"$numberInt":"9167"},{"$numberInt":"9168"},{"$numberInt":"9169"},{"$numberInt":"9170"},{"$numberInt":"9171"},{"$numberInt":"9172"},{"$numberInt":"9173"},{"$numberInt":"9174"},{"$numberInt":"9175"},{"$numberInt":"9176"},{"$numberInt":"9177"},{"$numberInt":"9178"},{"$numberInt":"9179"},{"$numberInt":"9180"},{"$numberInt":"9181"},{"$numberInt":"9182"},{"$numberInt":"9183"},{"$numberInt":"9184"},{"$numberInt":"9185"},{"$numberInt":"9186"},{"$numberInt":"9187"},{"$numberInt":"9188"},{"$numberInt":"9189"},{"$numberInt":"9190"},{"$numberInt":"9191"},{"$numberInt":"9192"},{"$numberInt":"9193"},{"$numberInt":"9194"},{"$numberInt":"9195"},{"$numberInt":"9196"},{"$numberInt":"9197"},{"$numberInt":"9198"},{"$numberInt":"9199"},{"$numberInt":"9200"},{"$numberInt":"9201"},{"$numberInt":"9202"},{"$numberInt":"9203"},{"$numberInt":"9204"},{"$numberInt":"9205"},{"$numberInt":"9206"},{"$numberInt":"9207"},{"$numberInt":"9208"},{"$numberInt":"9209"},{"$numberInt":"9210"},{"$numberInt":"9211"},{"$numberInt":"9212"},{"$numberInt":"9213"},{"$numberInt":"9214"},{"$numberInt":"9215"},{"$numberInt":"9216"},{"$numberInt":"9217"},{"$numberInt":"9218"},{"$numberInt":"9219"},{"$numberInt":"9220"},{"$numberInt":"9221"},{"$numberInt":"9222"},{"$numberInt":"9223"},{"$numberInt":"9224"},{"$numberInt":"9225"},{"$numberInt":"9226"},{"$numberInt":"9227"},{"$numberInt":"9228"},{"$numberInt":"9229"},{"$numberInt":"9230"},{"$numberInt":"9231"},{"$numberInt":"9232"},{"$numberInt":"9233"},{"$numberInt":"9234"},{"$numberInt":"9235"},{"$numberInt":"9236"},{"$numberInt":"9237"},{"$numberInt":"9238"},{"$numberInt":"9239"},{"$numberInt":"9240"},{"$numberInt":"9241"},{"$numberInt":"9242"},{"$numberInt":"9243"},{"$numberInt":"9244"},{"$numberInt":"9245"},{"$numberInt":"9246"},{"$numberInt":"9247"},{"$numberInt":"9248"},{"$numberInt":"9249"},{"$numberInt":"9250"},{"$numberInt":"9251"},{"$numberInt":"9252"},{"$numberInt":"9253"},{"$numberInt":"9254"},{"$numberInt":"9255"},{"$numberInt":"9256"},{"$numberInt":"9257"},{"$numberInt":"9258"},{"$numberInt":"9259"},{"$numberInt":"9260"},{"$numberInt":"9261"},{"$numberInt":"9262"},{"$numberInt":"9263"},{"$numberInt":"9264"},{"$numberInt":"9265"},{"$numberInt":"9266"},{"$numberInt":"9267"},{"$numberInt":"9268"},{"$numberInt":"9269"},{"$numberInt":"9270"},{"$numberInt":"9271"},{"$numberInt":"9272"},{"$numberInt":"9273"},{"$numberInt":"9274"},{"$numberInt":"9275"},{"$numberInt":"9276"},{"$numberInt":"9277"},{"$numberInt":"9278"},{"$numberInt":"9279"},{"$numberInt":"9280"},{"$numberInt":"9281"},{"$numberInt":"9282"},{"$numberInt":"9283"},{"$numberInt":"9284"},{"$numberInt":"9285"},{"$numberInt":"9286"},{"$numberInt":"9287"},{"$numberInt":"9288"},{"$numberInt":"9289"},{"$numberInt":"9290"},{"$numberInt":"9291"},{"$numberInt":"9292"},{"$numberInt":"9293"},{"$numberInt":"9294"},{"$numberInt":"9295"},{"$numberInt":"9296"},{"$numberInt":"9297"},{"$numberInt":"9298"},{"$numberInt":"9299"},{"$numberInt":"9300"},{"$numberInt":"9301"},{"$numberInt":"9302"},{"$numberInt":"9303"},{"$numberInt":"9304"},{"$numberInt":"9305"},{"$numberInt":"9306"},{"$numberInt":"9307"},{"$numberInt":"9308"},{"$numberInt":"9309"},{"$numberInt":"9310"},{"$numberInt":"9311"},{"$numberInt":"9312"},{"$numberInt":"9313"},{"$numberInt":"9314"},{"$numberInt":"9315"},{"$numberInt":"9316"},{"$numberInt":"9317"},{"$numberInt":"9318"},{"$numberInt":"9319"},{"$numberInt":"9320"},{"$numberInt":"9321"},{"$numberInt":"9322"},{"$numberInt":"9323"},{"$numberInt":"9324"},{"$numberInt":"9325"},{"$numberInt":"9326"},{"$numberInt":"9327"},{"$numberInt":"9328"},{"$numberInt":"9329"},{"$numberInt":"9330"},{"$numberInt":"9331"},{"$numberInt":"9332"},{"$numberInt":"9333"},{"$numberInt":"9334"},{"$numberInt":"9335"},{"$numberInt":"9336"},{"$numberInt":"9337"},{"$numberInt":"9338"},{"$numberInt":"9339"},{"$numberInt":"9340"},{"$numberInt":"9341"},{"$numberInt":"9342"},{"$numberInt":"9343"},{"$numberInt":"9344"},{"$numberInt":"9345"},{"$numberInt":"9346"},{"$numberInt":"9347"},{"$numberInt":"9348"},{"$numberInt":"9349"},{"$numberInt":"9350"},{"$numberInt":"9351"},{"$numberInt":"9352"},{"$numberInt":"9353"},{"$numberInt":"9354"},{"$numberInt":"9355"},{"$numberInt":"9356"},{"$numberInt":"9357"},{"$numberInt":"9358"},{"$numberInt":"9359"},{"$numberInt":"9360"},{"$numberInt":"9361"},{"$numberInt":"9362"},{"$numberInt":"9363"},{"$numberInt":"9364"},{"$numberInt":"9365"},{"$numberInt":"9366"},{"$numberInt":"9367"},{"$numberInt":"9368"},{"$numberInt":"9369"},{"$numberInt":"9370"},{"$numberInt":"9371"},{"$numberInt":"9372"},{"$numberInt":"9373"},{"$numberInt":"9374"},{"$numberInt":"9375"},{"$numberInt":"9376"},{"$numberInt":"9377"},{"$numberInt":"9378"},{"$numberInt":"9379"},{"$numberInt":"9380"},{"$numberInt":"9381"},{"$numberInt":"9382"},{"$numberInt":"9383"},{"$numberInt":"9384"},{"$numberInt":"9385"},{"$numberInt":"9386"},{"$numberInt":"9387"},{"$numberInt":"9388"},{"$numberInt":"9389"},{"$numberInt":"9390"},{"$numberInt":"9391"},{"$numberInt":"9392"},{"$numberInt":"9393"},{"$numberInt":"9394"},{"$numberInt":"9395"},{"$numberInt":"9396"},{"$numberInt":"9397"},{"$numberInt":"9398"},{"$numberInt":"9399"},{"$numberInt":"9400"},{"$numberInt":"9401"},{"$numberInt":"9402"},{"$numberInt":"9403"},{"$numberInt":"9404"},{"$numberInt":"9405"},{"$numberInt":"9406"},{"$numberInt":"9407"},{"$numberInt":"9408"},{"$numberInt":"9409"},{"$numberInt":"9410"},{"$numberInt":"9411"},{"$numberInt":"9412"},{"$numberInt":"9413"},{"$numberInt":"9414"},{"$numberInt":"9415"},{"$numberInt":"9416"},{"$numberInt":"9417"},{"$numberInt":"9418"},{"$numberInt":"9419"},{"$numberInt":"9420"},{"$numberInt":"9421"},{"$numberInt":"9422"},{"$numberInt":"9423"},{"$numberInt":"9424"},{"$numberInt":"9425"},{"$numberInt":"9426"},{"$numberInt":"9427"},{"$numberInt":"9428"},{"$numberInt":"9429"},{"$numberInt":"9430"},{"$numberInt":"9431"},{"$numberInt":"9432"},{"$numberInt":"9433"},{"$numberInt":"9434"},{"$numberInt":"9435"},{"$numberInt":"9436"},{"$numberInt":"9437"},{"$numberInt":"9438"},{"$numberInt":"9439"},{"$numberInt":"9440"},{"$numberInt":"9441"},{"$numberInt":"9442"},{"$numberInt":"9443"},{"$numberInt":"9444"},{"$numberInt":"9445"},{"$numberInt":"9446"},{"$numberInt":"9447"},{"$numberInt":"9448"},{"$numberInt":"9449"},{"$numberInt":"9450"},{"$numberInt":"9451"},{"$numberInt":"9452"},{"$numberInt":"9453"},{"$numberInt":"9454"},{"$numberInt":"9455"},{"$numberInt":"9456"},{"$numberInt":"9457"},{"$numberInt":"9458"},{"$numberInt":"9459"},{"$numberInt":"9460"},{"$numberInt":"9461"},{"$numberInt":"9462"},{"$numberInt":"9463"},{"$numberInt":"9464"},{"$numberInt":"9465"},{"$numberInt":"9466"},{"$numberInt":"9467"},{"$numberInt":"9468"},{"$numberInt":"9469"},{"$numberInt":"9470"},{"$numberInt":"9471"},{"$numberInt":"9472"},{"$numberInt":"9473"},{"$numberInt":"9474"},{"$numberInt":"9475"},{"$numberInt":"9476"},{"$numberInt":"9477"},{"$numberInt":"9478"},{"$numberInt":"9479"},{"$numberInt":"9480"},{"$numberInt":"9481"},{"$numberInt":"9482"},{"$numberInt":"9483"},{"$numberInt":"9484"},{"$numberInt":"9485"},{"$numberInt":"9486"},{"$numberInt":"9487"},{"$numberInt":"9488"},{"$numberInt":"9489"},{"$numberInt":"9490"},{"$numberInt":"9491"},{"$numberInt":"9492"},{"$numberInt":"9493"},{"$numberInt":"9494"},{"$numberInt":"9495"},{"$numberInt":"9496"},{"$numberInt":"9497"},{"$numberInt":"9498"},{"$numberInt":"9499"},{"$numberInt":"9500"},{"$numberInt":"9501"},{"$numberInt":"9502"},{"$numberInt":"9503"},{"$numberInt":"9504"},{"$numberInt":"9505"},{"$numberInt":"9506"},{"$numberInt":"9507"},{"$numberInt":"9508"},{"$numberInt":"9509"},{"$numberInt":"9510"},{"$numberInt":"9511"},{"$numberInt":"9512"},{"$numberInt":"9513"},{"$numberInt":"9514"},{"$numberInt":"9515"},{"$numberInt":"9516"},{"$numberInt":"9517"},{"$numberInt":"9518"},{"$numberInt":"9519"},{"$numberInt":"9520"},{"$numberInt":"9521"},{"$numberInt":"9522"},{"$numberInt":"9523"},{"$numberInt":"9524"},{"$numberInt":"9525"},{"$numberInt":"9526"},{"$numberInt":"9527"},{"$numberInt":"9528"},{"$numberInt":"9529"},{"$numberInt":"9530"},{"$numberInt":"9531"},{"$numberInt":"9532"},{"$numberInt":"9533"},{"$numberInt":"9534"},{"$numberInt":"9535"},{"$numberInt":"9536"},{"$numberInt":"9537"},{"$numberInt":"9538"},{"$numberInt":"9539"},{"$numberInt":"9540"},{"$numberInt":"9541"},{"$numberInt":"9542"},{"$numberInt":"9543"},{"$numberInt":"9544"},{"$numberInt":"9545"},{"$numberInt":"9546"},{"$numberInt":"9547"},{"$numberInt":"9548"},{"$numberInt":"9549"},{"$numberInt":"9550"},{"$numberInt":"9551"},{"$numberInt":"9552"},{"$numberInt":"9553"},{"$numberInt":"9554"},{"$numberInt":"9555"},{"$numberInt":"9556"},{"$numberInt":"9557"},{"$numberInt":"9558"},{"$numberInt":"9559"},{"$numberInt":"9560"},{"$numberInt":"9561"},{"$numberInt":"9562"},{"$numberInt":"9563"},{"$numberInt":"9564"},{"$numberInt":"9565"},{"$numberInt":"9566"},{"$numberInt":"9567"},{"$numberInt":"9568"},{"$numberInt":"9569"},{"$numberInt":"9570"},{"$numberInt":"9571"},{"$numberInt":"9572"},{"$numberInt":"9573"},{"$numberInt":"9574"},{"$numberInt":"9575"},{"$numberInt":"9576"},{"$numberInt":"9577"},{"$numberInt":"9578"},{"$numberInt":"9579"},{"$numberInt":"9580"},{"$numberInt":"9581"},{"$numberInt":"9582"},{"$numberInt":"9583"},{"$numberInt":"9584"},{"$numberInt":"9585"},{"$numberInt":"9586"},{"$numberInt":"9587"},{"$numberInt":"9588"},{"$numberInt":"9589"},{"$numberInt":"9590"},{"$numberInt":"9591"},{"$numberInt":"9592"},{"$numberInt":"9593"},{"$numberInt":"9594"},{"$numberInt":"9595"},{"$numberInt":"9596"},{"$numberInt":"9597"},{"$numberInt":"9598"},{"$numberInt":"9599"},{"$numberInt":"9600"},{"$numberInt":"9601"},{"$numberInt":"9602"},{"$numberInt":"9603"},{"$numberInt":"9604"},{"$numberInt":"9605"},{"$numberInt":"9606"},{"$numberInt":"9607"},{"$numberInt":"9608"},{"$numberInt":"9609"},{"$numberInt":"9610"},{"$numberInt":"9611"},{"$numberInt":"9612"},{"$numberInt":"9613"},{"$numberInt":"9614"},{"$numberInt":"9615"},{"$numberInt":"9616"},{"$numberInt":"9617"},{"$numberInt":"9618"},{"$numberInt":"9619"},{"$numberInt":"9620"},{"$numberInt":"9621"},{"$numberInt":"9622"},{"$numberInt":"9623"},{"$numberInt":"9624"},{"$numberInt":"9625"},{"$numberInt":"9626"},{"$numberInt":"9627"},{"$numberInt":"9628"},{"$numberInt":"9629"},{"$numberInt":"9630"},{"$numberInt":"9631"},{"$numberInt":"9632"},{"$numberInt":"9633"},{"$numberInt":"9634"},{"$numberInt":"9635"},{"$numberInt":"9636"},{"$numberInt":"9637"},{"$numberInt":"9638"},{"$numberInt":"9639"},{"$numberInt":"9640"},{"$numberInt":"9641"},{"$numberInt":"9642"},{"$numberInt":"9643"},{"$numberInt":"9644"},{"$numberInt":"9645"},{"$numberInt":"9646"},{"$numberInt":"9647"},{"$numberInt":"9648"},{"$numberInt":"9649"},{"$numberInt":"9650"},{"$numberInt":"9651"},{"$numberInt":"9652"},{"$numberInt":"9653"},{"$numberInt":"9654"},{"$numberInt":"9655"},{"$numberInt":"9656"},{"$numberInt":"9657"},{"$numberInt":"9658"},{"$numberInt":"9659"},{"$numberInt":"9660"},{"$numberInt":"9661"},{"$numberInt":"9662"},{"$numberInt":"9663"},{"$numberInt":"9664"},{"$numberInt":"9665"},{"$numberInt":"9666"},{"$numberInt":"9667"},{"$numberInt":"9668"},{"$numberInt":"9669"},{"$numberInt":"9670"},{"$numberInt":"9671"},{"$numberInt":"9672"},{"$numberInt":"9673"},{"$numberInt":"9674"},{"$numberInt":"9675"},{"$numberInt":"9676"},{"$numberInt":"9677"},{"$numberInt":"9678"},{"$numberInt":"9679"},{"$numberInt":"9680"},{"$numberInt":"9681"},{"$numberInt":"9682"},{"$numberInt":"9683"},{"$numberInt":"9684"},{"$numberInt":"9685"},{"$numberInt":"9686"},{"$numberInt":"9687"},{"$numberInt":"9688"},{"$numberInt":"9689"},{"$numberInt":"9690"},{"$numberInt":"9691"},{"$numberInt":"9692"},{"$numberInt":"9693"},{"$numberInt":"9694"},{"$numberInt":"9695"},{"$numberInt":"9696"},{"$numberInt":"9697"},{"$numberInt":"9698"},{"$numberInt":"9699"},{"$numberInt":"9700"},{"$numberInt":"9701"},{"$numberInt":"9702"},{"$numberInt":"9703"},{"$numberInt":"9704"},{"$numberInt":"9705"},{"$numberInt":"9706"},{"$numberInt":"9707"},{"$numberInt":"9708"},{"$numberInt":"9709"},{"$numberInt":"9710"},{"$numberInt":"9711"},{"$numberInt":"9712"},{"$numberInt":"9713"},{"$numberInt":"9714"},{"$numberInt":"9715"},{"$numberInt":"9716"},{"$numberInt":"9717"},{"$numberInt":"9718"},{"$numberInt":"9719"},{"$numberInt":"9720"},{"$numberInt":"9721"},{"$numberInt":"9722"},{"$numberInt":"9723"},{"$numberInt":"9724"},{"$numberInt":"9725"},{"$numberInt":"9726"},{"$numberInt":"9727"},{"$numberInt":"9728"},{"$numberInt":"9729"},{"$numberInt":"9730"},{"$numberInt":"9731"},{"$numberInt":"9732"},{"$numberInt":"9733"},{"$numberInt":"9734"},{"$numberInt":"9735"},{"$numberInt":"9736"},{"$numberInt":"9737"},{"$numberInt":"9738"},{"$numberInt":"9739"},{"$numberInt":"9740"},{"$numberInt":"9741"},{"$numberInt":"9742"},{"$numberInt":"9743"},{"$numberInt":"9744"},{"$numberInt":"9745"},{"$numberInt":"9746"},{"$numberInt":"9747"},{"$numberInt":"9748"},{"$numberInt":"9749"},{"$numberInt":"9750"},{"$numberInt":"9751"},{"$numberInt":"9752"},{"$numberInt":"9753"},{"$numberInt":"9754"},{"$numberInt":"9755"},{"$numberInt":"9756"},{"$numberInt":"9757"},{"$numberInt":"9758"},{"$numberInt":"9759"},{"$numberInt":"9760"},{"$numberInt":"9761"},{"$numberInt":"9762"},{"$numberInt":"9763"},{"$numberInt":"9764"},{"$numberInt":"9765"},{"$numberInt":"9766"},{"$numberInt":"9767"},{"$numberInt":"9768"},{"$numberInt":"9769"},{"$numberInt":"9770"},{"$numberInt":"9771"},{"$numberInt":"9772"},{"$numberInt":"9773"},{"$numberInt":"9774"},{"$numberInt":"9775"},{"$numberInt":"9776"},{"$numberInt":"9777"},{"$numberInt":"9778"},{"$numberInt":"9779"},{"$numberInt":"9780"},{"$numberInt":"9781"},{"$numberInt":"9782"},{"$numberInt":"9783"},{"$numberInt":"9784"},{"$numberInt":"9785"},{"$numberInt":"9786"},{"$numberInt":"9787"},{"$numberInt":"9788"},{"$numberInt":"9789"},{"$numberInt":"9790"},{"$numberInt":"9791"},{"$numberInt":"9792"},{"$numberInt":"9793"},{"$numberInt":"9794"},{"$numberInt":"9795"},{"$numberInt":"9796"},{"$numberInt":"9797"},{"$numberInt":"9798"},{"$numberInt":"9799"},{"$numberInt":"9800"},{"$numberInt":"9801"},{"$numberInt":"9802"},{"$numberInt":"9803"},{"$numberInt":"9804"},{"$numberInt":"9805"},{"$numberInt":"9806"},{"$numberInt":"9807"},{"$numberInt":"9808"},{"$numberInt":"9809"},{"$numberInt":"9810"},{"$numberInt":"9811"},{"$numberInt":"9812"},{"$numberInt":"9813"},{"$numberInt":"9814"},{"$numberInt":"9815"},{"$numberInt":"9816"},{"$numberInt":"9817"},{"$numberInt":"9818"},{"$numberInt":"9819"},{"$numberInt":"9820"},{"$numberInt":"9821"},{"$numberInt":"9822"},{"$numberInt":"9823"},{"$numberInt":"9824"},{"$numberInt":"9825"},{"$numberInt":"9826"},{"$numberInt":"9827"},{"$numberInt":"9828"},{"$numberInt":"9829"},{"$numberInt":"9830"},{"$numberInt":"9831"},{"$numberInt":"9832"},{"$numberInt":"9833"},{"$numberInt":"9834"},{"$numberInt":"9835"},{"$numberInt":"9836"},{"$numberInt":"9837"},{"$numberInt":"9838"},{"$numberInt":"9839"},{"$numberInt":"9840"},{"$numberInt":"9841"},{"$numberInt":"9842"},{"$numberInt":"9843"},{"$numberInt":"9844"},{"$numberInt":"9845"},{"$numberInt":"9846"},{"$numberInt":"9847"},{"$numberInt":"9848"},{"$numberInt":"9849"},{"$numberInt":"9850"},{"$numberInt":"9851"},{"$numberInt":"9852"},{"$numberInt":"9853"},{"$numberInt":"9854"},{"$numberInt":"9855"},{"$numberInt":"9856"},{"$numberInt":"9857"},{"$numberInt":"9858"},{"$numberInt":"9859"},{"$numberInt":"9860"},{"$numberInt":"9861"},{"$numberInt":"9862"},{"$numberInt":"9863"},{"$numberInt":"9864"},{"$numberInt":"9865"},{"$numberInt":"9866"},{"$numberInt":"9867"},{"$numberInt":"9868"},{"$numberInt":"9869"},{"$numberInt":"9870"},{"$numberInt":"9871"},{"$numberInt":"9872"},{"$numberInt":"9873"},{"$numberInt":"9874"},{"$numberInt":"9875"},{"$numberInt":"9876"},{"$numberInt":"9877"},{"$numberInt":"9878"},{"$numberInt":"9879"},{"$numberInt":"9880"},{"$numberInt":"9881"},{"$numberInt":"9882"},{"$numberInt":"9883"},{"$numberInt":"9884"},{"$numberInt":"9885"},{"$numberInt":"9886"},{"$numberInt":"9887"},{"$numberInt":"9888"},{"$numberInt":"9889"},{"$numberInt":"9890"},{"$numberInt":"9891"},{"$numberInt":"9892"},{"$numberInt":"9893"},{"$numberInt":"9894"},{"$numberInt":"9895"},{"$numberInt":"9896"},{"$numberInt":"9897"},{"$numberInt":"9898"},{"$numberInt":"9899"},{"$numberInt":"9900"},{"$numberInt":"9901"},{"$numberInt":"9902"},{"$numberInt":"9903"},{"$numberInt":"9904"},{"$numberInt":"9905"},{"$numberInt":"9906"},{"$numberInt":"9907"},{"$numberInt":"9908"},{"$numberInt":"9909"},{"$numberInt":"9910"},{"$numberInt":"9911"},{"$numberInt":"9912"},{"$numberInt":"9913"},{"$numberInt":"9914"},{"$numberInt":"9915"},{"$numberInt":"9916"},{"$numberInt":"9917"},{"$numberInt":"9918"},{"$numberInt":"9919"},{"$numberInt":"9920"},{"$numberInt":"9921"},{"$numberInt":"9922"},{"$numberInt":"9923"},{"$numberInt":"9924"},{"$numberInt":"9925"},{"$numberInt":"9926"},{"$numberInt":"9927"},{"$numberInt":"9928"},{"$numberInt":"9929"},{"$numberInt":"9930"},{"$numberInt":"9931"},{"$numberInt":"9932"},{"$numberInt":"9933"},{"$numberInt":"9934"},{"$numberInt":"9935"},{"$numberInt":"9936"},{"$numberInt":"9937"},{"$numberInt":"9938"},{"$numberInt":"9939"},{"$numberInt":"9940"},{"$numberInt":"9941"},{"$numberInt":"9942"},{"$numberInt":"9943"},{"$numberInt":"9944"},{"$numberInt":"9945"},{"$numberInt":"9946"},{"$numberInt":"9947"},{"$numberInt":"9948"},{"$numberInt":"9949"},{"$numberInt":"9950"},{"$numberInt":"9951"},{"$numberInt":"9952"},{"$numberInt":"9953"},{"$numberInt":"9954"},{"$numberInt":"9955"},{"$numberInt":"9956"},{"$numberInt":"9957"},{"$numberInt":"9958"},{"$numberInt":"9959"},{"$numberInt":"9960"},{"$numberInt":"9961"},{"$numberInt":"9962"},{"$numberInt":"9963"},{"$numberInt":"9964"},{"$numberInt":"9965"},{"$numberInt":"9966"},{"$numberInt":"9967"},{"$numberInt":"9968"},{"$numberInt":"9969"},{"$numberInt":"9970"},{"$numberInt":"9971"},{"$numberInt":"9972"},{"$numberInt":"9973"},{"$numberInt":"9974"},{"$numberInt":"9975"},{"$numberInt":"9976"},{"$numberInt":"9977"},{"$numberInt":"9978"},{"$numberInt":"9979"},{"$numberInt":"9980"},{"$numberInt":"9981"},{"$numberInt":"9982"},{"$numberInt":"9983"},{"$numberInt":"9984"},{"$numberInt":"9985"},{"$numberInt":"9986"},{"$numberInt":"9987"},{"$numberInt":"9988"},{"$numberInt":"9989"},{"$numberInt":"9990"},{"$numberInt":"9991"},{"$numberInt":"9992"},{"$numberInt":"9993"},{"$numberInt":"9994"},{"$numberInt":"9995"},{"$numberInt":"9996"},{"$numberInt":"9997"},{"$numberInt":"9998"},{"$numberInt":"9999"}]}}}]
+ e2e_dls_catalog_benchmark_test.go:165: catalog time elapsed to first batch: 7m11.223699025s e2e_dls_catalog_benchmark_test.go:166: catalog total time elapsed: 7m11.76312181s, 100000 docs returned
+ e2e_dls_catalog_benchmark_test.go:171: non-catalog time elapsed to first batch: 6m54.431833304s
+ e2e_dls_catalog_benchmark_test.go:172: non-catalog total time elapsed: 6m54.961344593s, 100000 docs returned
+ e2e_dls_catalog_benchmark_test.go:174:
+ catalog speedup: 0.96 7m11.76312181s vs. 6m54.961344593s
+
+--- PASS: TestE2EDLS_Catalog_Benchmark (4944.38s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$match":_{"name":_"Zoey"}}] (376.98s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$count":_"n"}] (575.37s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$match":_{"age":_{"$gt":_{"$numberInt":"500"}}}}] (387.52s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[] (729.82s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$project":_{"name":_{"$numberInt":"1"}}}] (788.22s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$match":_{"name":_{"$in":_["Alejandro","Holden"]}}}] (402.31s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$match":_{"_id":_{"$gte":_[{"$oid":"605c094aec7d3da862579a23"}],"$lte":_[{"$oid":"605c094aec7d3da862579a23"}]}}}] (383.22s)
+ --- PASS: TestE2EDLS_Catalog_Benchmark/[{"$match":_{"age":_{"$in":_[{"$numberInt":"0"},{"$numberInt":"1"},{"$numberInt":"2"},{"$numberInt":"3"},{"$numberInt":"4"},{"$numberInt":"5"},{"$numberInt":"6"},{"$numberInt":"7"},{"$numberInt":"8"},{"$numberInt":"9"},{"$numberInt":"10"},{"$numberInt":"11"},{"$numberInt":"12"},{"$numberInt":"13"},{"$numberInt":"14"},{"$numberInt":"15"},{"$numberInt":"16"},{"$numberInt":"17"},{"$numberInt":"18"},{"$numberInt":"19"},{"$numberInt":"20"},{"$numberInt":"21"},{"$numberInt":"22"},{"$numberInt":"23"},{"$numberInt":"24"},{"$numberInt":"25"},{"$numberInt":"26"},{"$numberInt":"27"},{"$numberInt":"28"},{"$numberInt":"29"},{"$numberInt":"30"},{"$numberInt":"31"},{"$numberInt":"32"},{"$numberInt":"33"},{"$numberInt":"34"},{"$numberInt":"35"},{"$numberInt":"36"},{"$numberInt":"37"},{"$numberInt":"38"},{"$numberInt":"39"},{"$numberInt":"40"},{"$numberInt":"41"},{"$numberInt":"42"},{"$numberInt":"43"},{"$numberInt":"44"},{"$numberInt":"45"},{"$numberInt":"46"},{"$numberInt":"47"},{"$numberInt":"48"},{"$numberInt":"49"},{"$numberInt":"50"},{"$numberInt":"51"},{"$numberInt":"52"},{"$numberInt":"53"},{"$numberInt":"54"},{"$numberInt":"55"},{"$numberInt":"56"},{"$numberInt":"57"},{"$numberInt":"58"},{"$numberInt":"59"},{"$numberInt":"60"},{"$numberInt":"61"},{"$numberInt":"62"},{"$numberInt":"63"},{"$numberInt":"64"},{"$numberInt":"65"},{"$numberInt":"66"},{"$numberInt":"67"},{"$numberInt":"68"},{"$numberInt":"69"},{"$numberInt":"70"},{"$numberInt":"71"},{"$numberInt":"72"},{"$numberInt":"73"},{"$numberInt":"74"},{"$numberInt":"75"},{"$numberInt":"76"},{"$numberInt":"77"},{"$numberInt":"78"},{"$numberInt":"79"},{"$numberInt":"80"},{"$numberInt":"81"},{"$numberInt":"82"},{"$numberInt":"83"},{"$numberInt":"84"},{"$numberInt":"85"},{"$numberInt":"86"},{"$numberInt":"87"},{"$numberInt":"88"},{"$numberInt":"89"},{"$numberInt":"90"},{"$numberInt":"91"},{"$numberInt":"92"},{"$numberInt":"93"},{"$numberInt":"94"},{"$numberInt":"95"},{"$numberInt":"96"},{"$numberInt":"97"},{"$numberInt":"98"},{"$numberInt":"99"},{"$numberInt":"100"},{"$numberInt":"101"},{"$numberInt":"102"},{"$numberInt":"103"},{"$numberInt":"104"},{"$numberInt":"105"},{"$numberInt":"106"},{"$numberInt":"107"},{"$numberInt":"108"},{"$numberInt":"109"},{"$numberInt":"110"},{"$numberInt":"111"},{"$numberInt":"112"},{"$numberInt":"113"},{"$numberInt":"114"},{"$numberInt":"115"},{"$numberInt":"116"},{"$numberInt":"117"},{"$numberInt":"118"},{"$numberInt":"119"},{"$numberInt":"120"},{"$numberInt":"121"},{"$numberInt":"122"},{"$numberInt":"123"},{"$numberInt":"124"},{"$numberInt":"125"},{"$numberInt":"126"},{"$numberInt":"127"},{"$numberInt":"128"},{"$numberInt":"129"},{"$numberInt":"130"},{"$numberInt":"131"},{"$numberInt":"132"},{"$numberInt":"133"},{"$numberInt":"134"},{"$numberInt":"135"},{"$numberInt":"136"},{"$numberInt":"137"},{"$numberInt":"138"},{"$numberInt":"139"},{"$numberInt":"140"},{"$numberInt":"141"},{"$numberInt":"142"},{"$numberInt":"143"},{"$numberInt":"144"},{"$numberInt":"145"},{"$numberInt":"146"},{"$numberInt":"147"},{"$numberInt":"148"},{"$numberInt":"149"},{"$numberInt":"150"},{"$numberInt":"151"},{"$numberInt":"152"},{"$numberInt":"153"},{"$numberInt":"154"},{"$numberInt":"155"},{"$numberInt":"156"},{"$numberInt":"157"},{"$numberInt":"158"},{"$numberInt":"159"},{"$numberInt":"160"},{"$numberInt":"161"},{"$numberInt":"162"},{"$numberInt":"163"},{"$numberInt":"164"},{"$numberInt":"165"},{"$numberInt":"166"},{"$numberInt":"167"},{"$numberInt":"168"},{"$numberInt":"169"},{"$numberInt":"170"},{"$numberInt":"171"},{"$numberInt":"172"},{"$numberInt":"173"},{"$numberInt":"174"},{"$numberInt":"175"},{"$numberInt":"176"},{"$numberInt":"177"},{"$numberInt":"178"},{"$numberInt":"179"},{"$numberInt":"180"},{"$numberInt":"181"},{"$numberInt":"182"},{"$numberInt":"183"},{"$numberInt":"184"},{"$numberInt":"185"},{"$numberInt":"186"},{"$numberInt":"187"},{"$numberInt":"188"},{"$numberInt":"189"},{"$numberInt":"190"},{"$numberInt":"191"},{"$numberInt":"192"},{"$numberInt":"193"},{"$numberInt":"194"},{"$numberInt":"195"},{"$numberInt":"196"},{"$numberInt":"197"},{"$numberInt":"198"},{"$numberInt":"199"},{"$numberInt":"200"},{"$numberInt":"201"},{"$numberInt":"202"},{"$numberInt":"203"},{"$numberInt":"204"},{"$numberInt":"205"},{"$numberInt":"206"},{"$numberInt":"207"},{"$numberInt":"208"},{"$numberInt":"209"},{"$numberInt":"210"},{"$numberInt":"211"},{"$numberInt":"212"},{"$numberInt":"213"},{"$numberInt":"214"},{"$numberInt":"215"},{"$numberInt":"216"},{"$numberInt":"217"},{"$numberInt":"218"},{"$numberInt":"219"},{"$numberInt":"220"},{"$numberInt":"221"},{"$numberInt":"222"},{"$numberInt":"223"},{"$numberInt":"224"},{"$numberInt":"225"},{"$numberInt":"226"},{"$numberInt":"227"},{"$numberInt":"228"},{"$numberInt":"229"},{"$numberInt":"230"},{"$numberInt":"231"},{"$numberInt":"232"},{"$numberInt":"233"},{"$numberInt":"234"},{"$numberInt":"235"},{"$numberInt":"236"},{"$numberInt":"237"},{"$numberInt":"238"},{"$numberInt":"239"},{"$numberInt":"240"},{"$numberInt":"241"},{"$numberInt":"242"},{"$numberInt":"243"},{"$numberInt":"244"},{"$numberInt":"245"},{"$numberInt":"246"},{"$numberInt":"247"},{"$numberInt":"248"},{"$numberInt":"249"},{"$numberInt":"250"},{"$numberInt":"251"},{"$numberInt":"252"},{"$numberInt":"253"},{"$numberInt":"254"},{"$numberInt":"255"},{"$numberInt":"256"},{"$numberInt":"257"},{"$numberInt":"258"},{"$numberInt":"259"},{"$numberInt":"260"},{"$numberInt":"261"},{"$numberInt":"262"},{"$numberInt":"263"},{"$numberInt":"264"},{"$numberInt":"265"},{"$numberInt":"266"},{"$numberInt":"267"},{"$numberInt":"268"},{"$numberInt":"269"},{"$numberInt":"270"},{"$numberInt":"271"},{"$numberInt":"272"},{"$numberInt":"273"},{"$numberInt":"274"},{"$numberInt":"275"},{"$numberInt":"276"},{"$numberInt":"277"},{"$numberInt":"278"},{"$numberInt":"279"},{"$numberInt":"280"},{"$numberInt":"281"},{"$numberInt":"282"},{"$numberInt":"283"},{"$numberInt":"284"},{"$numberInt":"285"},{"$numberInt":"286"},{"$numberInt":"287"},{"$numberInt":"288"},{"$numberInt":"289"},{"$numberInt":"290"},{"$numberInt":"291"},{"$numberInt":"292"},{"$numberInt":"293"},{"$numberInt":"294"},{"$numberInt":"295"},{"$numberInt":"296"},{"$numberInt":"297"},{"$numberInt":"298"},{"$numberInt":"299"},{"$numberInt":"300"},{"$numberInt":"301"},{"$numberInt":"302"},{"$numberInt":"303"},{"$numberInt":"304"},{"$numberInt":"305"},{"$numberInt":"306"},{"$numberInt":"307"},{"$numberInt":"308"},{"$numberInt":"309"},{"$numberInt":"310"},{"$numberInt":"311"},{"$numberInt":"312"},{"$numberInt":"313"},{"$numberInt":"314"},{"$numberInt":"315"},{"$numberInt":"316"},{"$numberInt":"317"},{"$numberInt":"318"},{"$numberInt":"319"},{"$numberInt":"320"},{"$numberInt":"321"},{"$numberInt":"322"},{"$numberInt":"323"},{"$numberInt":"324"},{"$numberInt":"325"},{"$numberInt":"326"},{"$numberInt":"327"},{"$numberInt":"328"},{"$numberInt":"329"},{"$numberInt":"330"},{"$numberInt":"331"},{"$numberInt":"332"},{"$numberInt":"333"},{"$numberInt":"334"},{"$numberInt":"335"},{"$numberInt":"336"},{"$numberInt":"337"},{"$numberInt":"338"},{"$numberInt":"339"},{"$numberInt":"340"},{"$numberInt":"341"},{"$numberInt":"342"},{"$numberInt":"343"},{"$numberInt":"344"},{"$numberInt":"345"},{"$numberInt":"346"},{"$numberInt":"347"},{"$numberInt":"348"},{"$numberInt":"349"},{"$numberInt":"350"},{"$numberInt":"351"},{"$numberInt":"352"},{"$numberInt":"353"},{"$numberInt":"354"},{"$numberInt":"355"},{"$numberInt":"356"},{"$numberInt":"357"},{"$numberInt":"358"},{"$numberInt":"359"},{"$numberInt":"360"},{"$numberInt":"361"},{"$numberInt":"362"},{"$numberInt":"363"},{"$numberInt":"364"},{"$numberInt":"365"},{"$numberInt":"366"},{"$numberInt":"367"},{"$numberInt":"368"},{"$numberInt":"369"},{"$numberInt":"370"},{"$numberInt":"371"},{"$numberInt":"372"},{"$numberInt":"373"},{"$numberInt":"374"},{"$numberInt":"375"},{"$numberInt":"376"},{"$numberInt":"377"},{"$numberInt":"378"},{"$numberInt":"379"},{"$numberInt":"380"},{"$numberInt":"381"},{"$numberInt":"382"},{"$numberInt":"383"},{"$numberInt":"384"},{"$numberInt":"385"},{"$numberInt":"386"},{"$numberInt":"387"},{"$numberInt":"388"},{"$numberInt":"389"},{"$numberInt":"390"},{"$numberInt":"391"},{"$numberInt":"392"},{"$numberInt":"393"},{"$numberInt":"394"},{"$numberInt":"395"},{"$numberInt":"396"},{"$numberInt":"397"},{"$numberInt":"398"},{"$numberInt":"399"},{"$numberInt":"400"},{"$numberInt":"401"},{"$numberInt":"402"},{"$numberInt":"403"},{"$numberInt":"404"},{"$numberInt":"405"},{"$numberInt":"406"},{"$numberInt":"407"},{"$numberInt":"408"},{"$numberInt":"409"},{"$numberInt":"410"},{"$numberInt":"411"},{"$numberInt":"412"},{"$numberInt":"413"},{"$numberInt":"414"},{"$numberInt":"415"},{"$numberInt":"416"},{"$numberInt":"417"},{"$numberInt":"418"},{"$numberInt":"419"},{"$numberInt":"420"},{"$numberInt":"421"},{"$numberInt":"422"},{"$numberInt":"423"},{"$numberInt":"424"},{"$numberInt":"425"},{"$numberInt":"426"},{"$numberInt":"427"},{"$numberInt":"428"},{"$numberInt":"429"},{"$numberInt":"430"},{"$numberInt":"431"},{"$numberInt":"432"},{"$numberInt":"433"},{"$numberInt":"434"},{"$numberInt":"435"},{"$numberInt":"436"},{"$numberInt":"437"},{"$numberInt":"438"},{"$numberInt":"439"},{"$numberInt":"440"},{"$numberInt":"441"},{"$numberInt":"442"},{"$numberInt":"443"},{"$numberInt":"444"},{"$numberInt":"445"},{"$numberInt":"446"},{"$numberInt":"447"},{"$numberInt":"448"},{"$numberInt":"449"},{"$numberInt":"450"},{"$numberInt":"451"},{"$numberInt":"452"},{"$numberInt":"453"},{"$numberInt":"454"},{"$numberInt":"455"},{"$numberInt":"456"},{"$numberInt":"457"},{"$numberInt":"458"},{"$numberInt":"459"},{"$numberInt":"460"},{"$numberInt":"461"},{"$numberInt":"462"},{"$numberInt":"463"},{"$numberInt":"464"},{"$numberInt":"465"},{"$numberInt":"466"},{"$numberInt":"467"},{"$numberInt":"468"},{"$numberInt":"469"},{"$numberInt":"470"},{"$numberInt":"471"},{"$numberInt":"472"},{"$numberInt":"473"},{"$numberInt":"474"},{"$numberInt":"475"},{"$numberInt":"476"},{"$numberInt":"477"},{"$numberInt":"478"},{"$numberInt":"479"},{"$numberInt":"480"},{"$numberInt":"481"},{"$numberInt":"482"},{"$numberInt":"483"},{"$numberInt":"484"},{"$numberInt":"485"},{"$numberInt":"486"},{"$numberInt":"487"},{"$numberInt":"488"},{"$numberInt":"489"},{"$numberInt":"490"},{"$numberInt":"491"},{"$numberInt":"492"},{"$numberInt":"493"},{"$numberInt":"494"},{"$numberInt":"495"},{"$numberInt":"496"},{"$numberInt":"497"},{"$numberInt":"498"},{"$numberInt":"499"},{"$numberInt":"500"},{"$numberInt":"501"},{"$numberInt":"502"},{"$numberInt":"503"},{"$numberInt":"504"},{"$numberInt":"505"},{"$numberInt":"506"},{"$numberInt":"507"},{"$numberInt":"508"},{"$numberInt":"509"},{"$numberInt":"510"},{"$numberInt":"511"},{"$numberInt":"512"},{"$numberInt":"513"},{"$numberInt":"514"},{"$numberInt":"515"},{"$numberInt":"516"},{"$numberInt":"517"},{"$numberInt":"518"},{"$numberInt":"519"},{"$numberInt":"520"},{"$numberInt":"521"},{"$numberInt":"522"},{"$numberInt":"523"},{"$numberInt":"524"},{"$numberInt":"525"},{"$numberInt":"526"},{"$numberInt":"527"},{"$numberInt":"528"},{"$numberInt":"529"},{"$numberInt":"530"},{"$numberInt":"531"},{"$numberInt":"532"},{"$numberInt":"533"},{"$numberInt":"534"},{"$numberInt":"535"},{"$numberInt":"536"},{"$numberInt":"537"},{"$numberInt":"538"},{"$numberInt":"539"},{"$numberInt":"540"},{"$numberInt":"541"},{"$numberInt":"542"},{"$numberInt":"543"},{"$numberInt":"544"},{"$numberInt":"545"},{"$numberInt":"546"},{"$numberInt":"547"},{"$numberInt":"548"},{"$numberInt":"549"},{"$numberInt":"550"},{"$numberInt":"551"},{"$numberInt":"552"},{"$numberInt":"553"},{"$numberInt":"554"},{"$numberInt":"555"},{"$numberInt":"556"},{"$numberInt":"557"},{"$numberInt":"558"},{"$numberInt":"559"},{"$numberInt":"560"},{"$numberInt":"561"},{"$numberInt":"562"},{"$numberInt":"563"},{"$numberInt":"564"},{"$numberInt":"565"},{"$numberInt":"566"},{"$numberInt":"567"},{"$numberInt":"568"},{"$numberInt":"569"},{"$numberInt":"570"},{"$numberInt":"571"},{"$numberInt":"572"},{"$numberInt":"573"},{"$numberInt":"574"},{"$numberInt":"575"},{"$numberInt":"576"},{"$numberInt":"577"},{"$numberInt":"578"},{"$numberInt":"579"},{"$numberInt":"580"},{"$numberInt":"581"},{"$numberInt":"582"},{"$numberInt":"583"},{"$numberInt":"584"},{"$numberInt":"585"},{"$numberInt":"586"},{"$numberInt":"587"},{"$numberInt":"588"},{"$numberInt":"589"},{"$numberInt":"590"},{"$numberInt":"591"},{"$numberInt":"592"},{"$numberInt":"593"},{"$numberInt":"594"},{"$numberInt":"595"},{"$numberInt":"596"},{"$numberInt":"597"},{"$numberInt":"598"},{"$numberInt":"599"},{"$numberInt":"600"},{"$numberInt":"601"},{"$numberInt":"602"},{"$numberInt":"603"},{"$numberInt":"604"},{"$numberInt":"605"},{"$numberInt":"606"},{"$numberInt":"607"},{"$numberInt":"608"},{"$numberInt":"609"},{"$numberInt":"610"},{"$numberInt":"611"},{"$numberInt":"612"},{"$numberInt":"613"},{"$numberInt":"614"},{"$numberInt":"615"},{"$numberInt":"616"},{"$numberInt":"617"},{"$numberInt":"618"},{"$numberInt":"619"},{"$numberInt":"620"},{"$numberInt":"621"},{"$numberInt":"622"},{"$numberInt":"623"},{"$numberInt":"624"},{"$numberInt":"625"},{"$numberInt":"626"},{"$numberInt":"627"},{"$numberInt":"628"},{"$numberInt":"629"},{"$numberInt":"630"},{"$numberInt":"631"},{"$numberInt":"632"},{"$numberInt":"633"},{"$numberInt":"634"},{"$numberInt":"635"},{"$numberInt":"636"},{"$numberInt":"637"},{"$numberInt":"638"},{"$numberInt":"639"},{"$numberInt":"640"},{"$numberInt":"641"},{"$numberInt":"642"},{"$numberInt":"643"},{"$numberInt":"644"},{"$numberInt":"645"},{"$numberInt":"646"},{"$numberInt":"647"},{"$numberInt":"648"},{"$numberInt":"649"},{"$numberInt":"650"},{"$numberInt":"651"},{"$numberInt":"652"},{"$numberInt":"653"},{"$numberInt":"654"},{"$numberInt":"655"},{"$numberInt":"656"},{"$numberInt":"657"},{"$numberInt":"658"},{"$numberInt":"659"},{"$numberInt":"660"},{"$numberInt":"661"},{"$numberInt":"662"},{"$numberInt":"663"},{"$numberInt":"664"},{"$numberInt":"665"},{"$numberInt":"666"},{"$numberInt":"667"},{"$numberInt":"668"},{"$numberInt":"669"},{"$numberInt":"670"},{"$numberInt":"671"},{"$numberInt":"672"},{"$numberInt":"673"},{"$numberInt":"674"},{"$numberInt":"675"},{"$numberInt":"676"},{"$numberInt":"677"},{"$numberInt":"678"},{"$numberInt":"679"},{"$numberInt":"680"},{"$numberInt":"681"},{"$numberInt":"682"},{"$numberInt":"683"},{"$numberInt":"684"},{"$numberInt":"685"},{"$numberInt":"686"},{"$numberInt":"687"},{"$numberInt":"688"},{"$numberInt":"689"},{"$numberInt":"690"},{"$numberInt":"691"},{"$numberInt":"692"},{"$numberInt":"693"},{"$numberInt":"694"},{"$numberInt":"695"},{"$numberInt":"696"},{"$numberInt":"697"},{"$numberInt":"698"},{"$numberInt":"699"},{"$numberInt":"700"},{"$numberInt":"701"},{"$numberInt":"702"},{"$numberInt":"703"},{"$numberInt":"704"},{"$numberInt":"705"},{"$numberInt":"706"},{"$numberInt":"707"},{"$numberInt":"708"},{"$numberInt":"709"},{"$numberInt":"710"},{"$numberInt":"711"},{"$numberInt":"712"},{"$numberInt":"713"},{"$numberInt":"714"},{"$numberInt":"715"},{"$numberInt":"716"},{"$numberInt":"717"},{"$numberInt":"718"},{"$numberInt":"719"},{"$numberInt":"720"},{"$numberInt":"721"},{"$numberInt":"722"},{"$numberInt":"723"},{"$numberInt":"724"},{"$numberInt":"725"},{"$numberInt":"726"},{"$numberInt":"727"},{"$numberInt":"728"},{"$numberInt":"729"},{"$numberInt":"730"},{"$numberInt":"731"},{"$numberInt":"732"},{"$numberInt":"733"},{"$numberInt":"734"},{"$numberInt":"735"},{"$numberInt":"736"},{"$numberInt":"737"},{"$numberInt":"738"},{"$numberInt":"739"},{"$numberInt":"740"},{"$numberInt":"741"},{"$numberInt":"742"},{"$numberInt":"743"},{"$numberInt":"744"},{"$numberInt":"745"},{"$numberInt":"746"},{"$numberInt":"747"},{"$numberInt":"748"},{"$numberInt":"749"},{"$numberInt":"750"},{"$numberInt":"751"},{"$numberInt":"752"},{"$numberInt":"753"},{"$numberInt":"754"},{"$numberInt":"755"},{"$numberInt":"756"},{"$numberInt":"757"},{"$numberInt":"758"},{"$numberInt":"759"},{"$numberInt":"760"},{"$numberInt":"761"},{"$numberInt":"762"},{"$numberInt":"763"},{"$numberInt":"764"},{"$numberInt":"765"},{"$numberInt":"766"},{"$numberInt":"767"},{"$numberInt":"768"},{"$numberInt":"769"},{"$numberInt":"770"},{"$numberInt":"771"},{"$numberInt":"772"},{"$numberInt":"773"},{"$numberInt":"774"},{"$numberInt":"775"},{"$numberInt":"776"},{"$numberInt":"777"},{"$numberInt":"778"},{"$numberInt":"779"},{"$numberInt":"780"},{"$numberInt":"781"},{"$numberInt":"782"},{"$numberInt":"783"},{"$numberInt":"784"},{"$numberInt":"785"},{"$numberInt":"786"},{"$numberInt":"787"},{"$numberInt":"788"},{"$numberInt":"789"},{"$numberInt":"790"},{"$numberInt":"791"},{"$numberInt":"792"},{"$numberInt":"793"},{"$numberInt":"794"},{"$numberInt":"795"},{"$numberInt":"796"},{"$numberInt":"797"},{"$numberInt":"798"},{"$numberInt":"799"},{"$numberInt":"800"},{"$numberInt":"801"},{"$numberInt":"802"},{"$numberInt":"803"},{"$numberInt":"804"},{"$numberInt":"805"},{"$numberInt":"806"},{"$numberInt":"807"},{"$numberInt":"808"},{"$numberInt":"809"},{"$numberInt":"810"},{"$numberInt":"811"},{"$numberInt":"812"},{"$numberInt":"813"},{"$numberInt":"814"},{"$numberInt":"815"},{"$numberInt":"816"},{"$numberInt":"817"},{"$numberInt":"818"},{"$numberInt":"819"},{"$numberInt":"820"},{"$numberInt":"821"},{"$numberInt":"822"},{"$numberInt":"823"},{"$numberInt":"824"},{"$numberInt":"825"},{"$numberInt":"826"},{"$numberInt":"827"},{"$numberInt":"828"},{"$numberInt":"829"},{"$numberInt":"830"},{"$numberInt":"831"},{"$numberInt":"832"},{"$numberInt":"833"},{"$numberInt":"834"},{"$numberInt":"835"},{"$numberInt":"836"},{"$numberInt":"837"},{"$numberInt":"838"},{"$numberInt":"839"},{"$numberInt":"840"},{"$numberInt":"841"},{"$numberInt":"842"},{"$numberInt":"843"},{"$numberInt":"844"},{"$numberInt":"845"},{"$numberInt":"846"},{"$numberInt":"847"},{"$numberInt":"848"},{"$numberInt":"849"},{"$numberInt":"850"},{"$numberInt":"851"},{"$numberInt":"852"},{"$numberInt":"853"},{"$numberInt":"854"},{"$numberInt":"855"},{"$numberInt":"856"},{"$numberInt":"857"},{"$numberInt":"858"},{"$numberInt":"859"},{"$numberInt":"860"},{"$numberInt":"861"},{"$numberInt":"862"},{"$numberInt":"863"},{"$numberInt":"864"},{"$numberInt":"865"},{"$numberInt":"866"},{"$numberInt":"867"},{"$numberInt":"868"},{"$numberInt":"869"},{"$numberInt":"870"},{"$numberInt":"871"},{"$numberInt":"872"},{"$numberInt":"873"},{"$numberInt":"874"},{"$numberInt":"875"},{"$numberInt":"876"},{"$numberInt":"877"},{"$numberInt":"878"},{"$numberInt":"879"},{"$numberInt":"880"},{"$numberInt":"881"},{"$numberInt":"882"},{"$numberInt":"883"},{"$numberInt":"884"},{"$numberInt":"885"},{"$numberInt":"886"},{"$numberInt":"887"},{"$numberInt":"888"},{"$numberInt":"889"},{"$numberInt":"890"},{"$numberInt":"891"},{"$numberInt":"892"},{"$numberInt":"893"},{"$numberInt":"894"},{"$numberInt":"895"},{"$numberInt":"896"},{"$numberInt":"897"},{"$numberInt":"898"},{"$numberInt":"899"},{"$numberInt":"900"},{"$numberInt":"901"},{"$numberInt":"902"},{"$numberInt":"903"},{"$numberInt":"904"},{"$numberInt":"905"},{"$numberInt":"906"},{"$numberInt":"907"},{"$numberInt":"908"},{"$numberInt":"909"},{"$numberInt":"910"},{"$numberInt":"911"},{"$numberInt":"912"},{"$numberInt":"913"},{"$numberInt":"914"},{"$numberInt":"915"},{"$numberInt":"916"},{"$numberInt":"917"},{"$numberInt":"918"},{"$numberInt":"919"},{"$numberInt":"920"},{"$numberInt":"921"},{"$numberInt":"922"},{"$numberInt":"923"},{"$numberInt":"924"},{"$numberInt":"925"},{"$numberInt":"926"},{"$numberInt":"927"},{"$numberInt":"928"},{"$numberInt":"929"},{"$numberInt":"930"},{"$numberInt":"931"},{"$numberInt":"932"},{"$numberInt":"933"},{"$numberInt":"934"},{"$numberInt":"935"},{"$numberInt":"936"},{"$numberInt":"937"},{"$numberInt":"938"},{"$numberInt":"939"},{"$numberInt":"940"},{"$numberInt":"941"},{"$numberInt":"942"},{"$numberInt":"943"},{"$numberInt":"944"},{"$numberInt":"945"},{"$numberInt":"946"},{"$numberInt":"947"},{"$numberInt":"948"},{"$numberInt":"949"},{"$numberInt":"950"},{"$numberInt":"951"},{"$numberInt":"952"},{"$numberInt":"953"},{"$numberInt":"954"},{"$numberInt":"955"},{"$numberInt":"956"},{"$numberInt":"957"},{"$numberInt":"958"},{"$numberInt":"959"},{"$numberInt":"960"},{"$numberInt":"961"},{"$numberInt":"962"},{"$numberInt":"963"},{"$numberInt":"964"},{"$numberInt":"965"},{"$numberInt":"966"},{"$numberInt":"967"},{"$numberInt":"968"},{"$numberInt":"969"},{"$numberInt":"970"},{"$numberInt":"971"},{"$numberInt":"972"},{"$numberInt":"973"},{"$numberInt":"974"},{"$numberInt":"975"},{"$numberInt":"976"},{"$numberInt":"977"},{"$numberInt":"978"},{"$numberInt":"979"},{"$numberInt":"980"},{"$numberInt":"981"},{"$numberInt":"982"},{"$numberInt":"983"},{"$numberInt":"984"},{"$numberInt":"985"},{"$numberInt":"986"},{"$numberInt":"987"},{"$numberInt":"988"},{"$numberInt":"989"},{"$numberInt":"990"},{"$numberInt":"991"},{"$numberInt":"992"},{"$numberInt":"993"},{"$numberInt":"994"},{"$numberInt":"995"},{"$numberInt":"996"},{"$numberInt":"997"},{"$numberInt":"998"},{"$numberInt":"999"},{"$numberInt":"1000"},{"$numberInt":"1001"},{"$numberInt":"1002"},{"$numberInt":"1003"},{"$numberInt":"1004"},{"$numberInt":"1005"},{"$numberInt":"1006"},{"$numberInt":"1007"},{"$numberInt":"1008"},{"$numberInt":"1009"},{"$numberInt":"1010"},{"$numberInt":"1011"},{"$numberInt":"1012"},{"$numberInt":"1013"},{"$numberInt":"1014"},{"$numberInt":"1015"},{"$numberInt":"1016"},{"$numberInt":"1017"},{"$numberInt":"1018"},{"$numberInt":"1019"},{"$numberInt":"1020"},{"$numberInt":"1021"},{"$numberInt":"1022"},{"$numberInt":"1023"},{"$numberInt":"1024"},{"$numberInt":"1025"},{"$numberInt":"1026"},{"$numberInt":"1027"},{"$numberInt":"1028"},{"$numberInt":"1029"},{"$numberInt":"1030"},{"$numberInt":"1031"},{"$numberInt":"1032"},{"$numberInt":"1033"},{"$numberInt":"1034"},{"$numberInt":"1035"},{"$numberInt":"1036"},{"$numberInt":"1037"},{"$numberInt":"1038"},{"$numberInt":"1039"},{"$numberInt":"1040"},{"$numberInt":"1041"},{"$numberInt":"1042"},{"$numberInt":"1043"},{"$numberInt":"1044"},{"$numberInt":"1045"},{"$numberInt":"1046"},{"$numberInt":"1047"},{"$numberInt":"1048"},{"$numberInt":"1049"},{"$numberInt":"1050"},{"$numberInt":"1051"},{"$numberInt":"1052"},{"$numberInt":"1053"},{"$numberInt":"1054"},{"$numberInt":"1055"},{"$numberInt":"1056"},{"$numberInt":"1057"},{"$numberInt":"1058"},{"$numberInt":"1059"},{"$numberInt":"1060"},{"$numberInt":"1061"},{"$numberInt":"1062"},{"$numberInt":"1063"},{"$numberInt":"1064"},{"$numberInt":"1065"},{"$numberInt":"1066"},{"$numberInt":"1067"},{"$numberInt":"1068"},{"$numberInt":"1069"},{"$numberInt":"1070"},{"$numberInt":"1071"},{"$numberInt":"1072"},{"$numberInt":"1073"},{"$numberInt":"1074"},{"$numberInt":"1075"},{"$numberInt":"1076"},{"$numberInt":"1077"},{"$numberInt":"1078"},{"$numberInt":"1079"},{"$numberInt":"1080"},{"$numberInt":"1081"},{"$numberInt":"1082"},{"$numberInt":"1083"},{"$numberInt":"1084"},{"$numberInt":"1085"},{"$numberInt":"1086"},{"$numberInt":"1087"},{"$numberInt":"1088"},{"$numberInt":"1089"},{"$numberInt":"1090"},{"$numberInt":"1091"},{"$numberInt":"1092"},{"$numberInt":"1093"},{"$numberInt":"1094"},{"$numberInt":"1095"},{"$numberInt":"1096"},{"$numberInt":"1097"},{"$numberInt":"1098"},{"$numberInt":"1099"},{"$numberInt":"1100"},{"$numberInt":"1101"},{"$numberInt":"1102"},{"$numberInt":"1103"},{"$numberInt":"1104"},{"$numberInt":"1105"},{"$numberInt":"1106"},{"$numberInt":"1107"},{"$numberInt":"1108"},{"$numberInt":"1109"},{"$numberInt":"1110"},{"$numberInt":"1111"},{"$numberInt":"1112"},{"$numberInt":"1113"},{"$numberInt":"1114"},{"$numberInt":"1115"},{"$numberInt":"1116"},{"$numberInt":"1117"},{"$numberInt":"1118"},{"$numberInt":"1119"},{"$numberInt":"1120"},{"$numberInt":"1121"},{"$numberInt":"1122"},{"$numberInt":"1123"},{"$numberInt":"1124"},{"$numberInt":"1125"},{"$numberInt":"1126"},{"$numberInt":"1127"},{"$numberInt":"1128"},{"$numberInt":"1129"},{"$numberInt":"1130"},{"$numberInt":"1131"},{"$numberInt":"1132"},{"$numberInt":"1133"},{"$numberInt":"1134"},{"$numberInt":"1135"},{"$numberInt":"1136"},{"$numberInt":"1137"},{"$numberInt":"1138"},{"$numberInt":"1139"},{"$numberInt":"1140"},{"$numberInt":"1141"},{"$numberInt":"1142"},{"$numberInt":"1143"},{"$numberInt":"1144"},{"$numberInt":"1145"},{"$numberInt":"1146"},{"$numberInt":"1147"},{"$numberInt":"1148"},{"$numberInt":"1149"},{"$numberInt":"1150"},{"$numberInt":"1151"},{"$numberInt":"1152"},{"$numberInt":"1153"},{"$numberInt":"1154"},{"$numberInt":"1155"},{"$numberInt":"1156"},{"$numberInt":"1157"},{"$numberInt":"1158"},{"$numberInt":"1159"},{"$numberInt":"1160"},{"$numberInt":"1161"},{"$numberInt":"1162"},{"$numberInt":"1163"},{"$numberInt":"1164"},{"$numberInt":"1165"},{"$numberInt":"1166"},{"$numberInt":"1167"},{"$numberInt":"1168"},{"$numberInt":"1169"},{"$numberInt":"1170"},{"$numberInt":"1171"},{"$numberInt":"1172"},{"$numberInt":"1173"},{"$numberInt":"1174"},{"$numberInt":"1175"},{"$numberInt":"1176"},{"$numberInt":"1177"},{"$numberInt":"1178"},{"$numberInt":"1179"},{"$numberInt":"1180"},{"$numberInt":"1181"},{"$numberInt":"1182"},{"$numberInt":"1183"},{"$numberInt":"1184"},{"$numberInt":"1185"},{"$numberInt":"1186"},{"$numberInt":"1187"},{"$numberInt":"1188"},{"$numberInt":"1189"},{"$numberInt":"1190"},{"$numberInt":"1191"},{"$numberInt":"1192"},{"$numberInt":"1193"},{"$numberInt":"1194"},{"$numberInt":"1195"},{"$numberInt":"1196"},{"$numberInt":"1197"},{"$numberInt":"1198"},{"$numberInt":"1199"},{"$numberInt":"1200"},{"$numberInt":"1201"},{"$numberInt":"1202"},{"$numberInt":"1203"},{"$numberInt":"1204"},{"$numberInt":"1205"},{"$numberInt":"1206"},{"$numberInt":"1207"},{"$numberInt":"1208"},{"$numberInt":"1209"},{"$numberInt":"1210"},{"$numberInt":"1211"},{"$numberInt":"1212"},{"$numberInt":"1213"},{"$numberInt":"1214"},{"$numberInt":"1215"},{"$numberInt":"1216"},{"$numberInt":"1217"},{"$numberInt":"1218"},{"$numberInt":"1219"},{"$numberInt":"1220"},{"$numberInt":"1221"},{"$numberInt":"1222"},{"$numberInt":"1223"},{"$numberInt":"1224"},{"$numberInt":"1225"},{"$numberInt":"1226"},{"$numberInt":"1227"},{"$numberInt":"1228"},{"$numberInt":"1229"},{"$numberInt":"1230"},{"$numberInt":"1231"},{"$numberInt":"1232"},{"$numberInt":"1233"},{"$numberInt":"1234"},{"$numberInt":"1235"},{"$numberInt":"1236"},{"$numberInt":"1237"},{"$numberInt":"1238"},{"$numberInt":"1239"},{"$numberInt":"1240"},{"$numberInt":"1241"},{"$numberInt":"1242"},{"$numberInt":"1243"},{"$numberInt":"1244"},{"$numberInt":"1245"},{"$numberInt":"1246"},{"$numberInt":"1247"},{"$numberInt":"1248"},{"$numberInt":"1249"},{"$numberInt":"1250"},{"$numberInt":"1251"},{"$numberInt":"1252"},{"$numberInt":"1253"},{"$numberInt":"1254"},{"$numberInt":"1255"},{"$numberInt":"1256"},{"$numberInt":"1257"},{"$numberInt":"1258"},{"$numberInt":"1259"},{"$numberInt":"1260"},{"$numberInt":"1261"},{"$numberInt":"1262"},{"$numberInt":"1263"},{"$numberInt":"1264"},{"$numberInt":"1265"},{"$numberInt":"1266"},{"$numberInt":"1267"},{"$numberInt":"1268"},{"$numberInt":"1269"},{"$numberInt":"1270"},{"$numberInt":"1271"},{"$numberInt":"1272"},{"$numberInt":"1273"},{"$numberInt":"1274"},{"$numberInt":"1275"},{"$numberInt":"1276"},{"$numberInt":"1277"},{"$numberInt":"1278"},{"$numberInt":"1279"},{"$numberInt":"1280"},{"$numberInt":"1281"},{"$numberInt":"1282"},{"$numberInt":"1283"},{"$numberInt":"1284"},{"$numberInt":"1285"},{"$numberInt":"1286"},{"$numberInt":"1287"},{"$numberInt":"1288"},{"$numberInt":"1289"},{"$numberInt":"1290"},{"$numberInt":"1291"},{"$numberInt":"1292"},{"$numberInt":"1293"},{"$numberInt":"1294"},{"$numberInt":"1295"},{"$numberInt":"1296"},{"$numberInt":"1297"},{"$numberInt":"1298"},{"$numberInt":"1299"},{"$numberInt":"1300"},{"$numberInt":"1301"},{"$numberInt":"1302"},{"$numberInt":"1303"},{"$numberInt":"1304"},{"$numberInt":"1305"},{"$numberInt":"1306"},{"$numberInt":"1307"},{"$numberInt":"1308"},{"$numberInt":"1309"},{"$numberInt":"1310"},{"$numberInt":"1311"},{"$numberInt":"1312"},{"$numberInt":"1313"},{"$numberInt":"1314"},{"$numberInt":"1315"},{"$numberInt":"1316"},{"$numberInt":"1317"},{"$numberInt":"1318"},{"$numberInt":"1319"},{"$numberInt":"1320"},{"$numberInt":"1321"},{"$numberInt":"1322"},{"$numberInt":"1323"},{"$numberInt":"1324"},{"$numberInt":"1325"},{"$numberInt":"1326"},{"$numberInt":"1327"},{"$numberInt":"1328"},{"$numberInt":"1329"},{"$numberInt":"1330"},{"$numberInt":"1331"},{"$numberInt":"1332"},{"$numberInt":"1333"},{"$numberInt":"1334"},{"$numberInt":"1335"},{"$numberInt":"1336"},{"$numberInt":"1337"},{"$numberInt":"1338"},{"$numberInt":"1339"},{"$numberInt":"1340"},{"$numberInt":"1341"},{"$numberInt":"1342"},{"$numberInt":"1343"},{"$numberInt":"1344"},{"$numberInt":"1345"},{"$numberInt":"1346"},{"$numberInt":"1347"},{"$numberInt":"1348"},{"$numberInt":"1349"},{"$numberInt":"1350"},{"$numberInt":"1351"},{"$numberInt":"1352"},{"$numberInt":"1353"},{"$numberInt":"1354"},{"$numberInt":"1355"},{"$numberInt":"1356"},{"$numberInt":"1357"},{"$numberInt":"1358"},{"$numberInt":"1359"},{"$numberInt":"1360"},{"$numberInt":"1361"},{"$numberInt":"1362"},{"$numberInt":"1363"},{"$numberInt":"1364"},{"$numberInt":"1365"},{"$numberInt":"1366"},{"$numberInt":"1367"},{"$numberInt":"1368"},{"$numberInt":"1369"},{"$numberInt":"1370"},{"$numberInt":"1371"},{"$numberInt":"1372"},{"$numberInt":"1373"},{"$numberInt":"1374"},{"$numberInt":"1375"},{"$numberInt":"1376"},{"$numberInt":"1377"},{"$numberInt":"1378"},{"$numberInt":"1379"},{"$numberInt":"1380"},{"$numberInt":"1381"},{"$numberInt":"1382"},{"$numberInt":"1383"},{"$numberInt":"1384"},{"$numberInt":"1385"},{"$numberInt":"1386"},{"$numberInt":"1387"},{"$numberInt":"1388"},{"$numberInt":"1389"},{"$numberInt":"1390"},{"$numberInt":"1391"},{"$numberInt":"1392"},{"$numberInt":"1393"},{"$numberInt":"1394"},{"$numberInt":"1395"},{"$numberInt":"1396"},{"$numberInt":"1397"},{"$numberInt":"1398"},{"$numberInt":"1399"},{"$numberInt":"1400"},{"$numberInt":"1401"},{"$numberInt":"1402"},{"$numberInt":"1403"},{"$numberInt":"1404"},{"$numberInt":"1405"},{"$numberInt":"1406"},{"$numberInt":"1407"},{"$numberInt":"1408"},{"$numberInt":"1409"},{"$numberInt":"1410"},{"$numberInt":"1411"},{"$numberInt":"1412"},{"$numberInt":"1413"},{"$numberInt":"1414"},{"$numberInt":"1415"},{"$numberInt":"1416"},{"$numberInt":"1417"},{"$numberInt":"1418"},{"$numberInt":"1419"},{"$numberInt":"1420"},{"$numberInt":"1421"},{"$numberInt":"1422"},{"$numberInt":"1423"},{"$numberInt":"1424"},{"$numberInt":"1425"},{"$numberInt":"1426"},{"$numberInt":"1427"},{"$numberInt":"1428"},{"$numberInt":"1429"},{"$numberInt":"1430"},{"$numberInt":"1431"},{"$numberInt":"1432"},{"$numberInt":"1433"},{"$numberInt":"1434"},{"$numberInt":"1435"},{"$numberInt":"1436"},{"$numberInt":"1437"},{"$numberInt":"1438"},{"$numberInt":"1439"},{"$numberInt":"1440"},{"$numberInt":"1441"},{"$numberInt":"1442"},{"$numberInt":"1443"},{"$numberInt":"1444"},{"$numberInt":"1445"},{"$numberInt":"1446"},{"$numberInt":"1447"},{"$numberInt":"1448"},{"$numberInt":"1449"},{"$numberInt":"1450"},{"$numberInt":"1451"},{"$numberInt":"1452"},{"$numberInt":"1453"},{"$numberInt":"1454"},{"$numberInt":"1455"},{"$numberInt":"1456"},{"$numberInt":"1457"},{"$numberInt":"1458"},{"$numberInt":"1459"},{"$numberInt":"1460"},{"$numberInt":"1461"},{"$numberInt":"1462"},{"$numberInt":"1463"},{"$numberInt":"1464"},{"$numberInt":"1465"},{"$numberInt":"1466"},{"$numberInt":"1467"},{"$numberInt":"1468"},{"$numberInt":"1469"},{"$numberInt":"1470"},{"$numberInt":"1471"},{"$numberInt":"1472"},{"$numberInt":"1473"},{"$numberInt":"1474"},{"$numberInt":"1475"},{"$numberInt":"1476"},{"$numberInt":"1477"},{"$numberInt":"1478"},{"$numberInt":"1479"},{"$numberInt":"1480"},{"$numberInt":"1481"},{"$numberInt":"1482"},{"$numberInt":"1483"},{"$numberInt":"1484"},{"$numberInt":"1485"},{"$numberInt":"1486"},{"$numberInt":"1487"},{"$numberInt":"1488"},{"$numberInt":"1489"},{"$numberInt":"1490"},{"$numberInt":"1491"},{"$numberInt":"1492"},{"$numberInt":"1493"},{"$numberInt":"1494"},{"$numberInt":"1495"},{"$numberInt":"1496"},{"$numberInt":"1497"},{"$numberInt":"1498"},{"$numberInt":"1499"},{"$numberInt":"1500"},{"$numberInt":"1501"},{"$numberInt":"1502"},{"$numberInt":"1503"},{"$numberInt":"1504"},{"$numberInt":"1505"},{"$numberInt":"1506"},{"$numberInt":"1507"},{"$numberInt":"1508"},{"$numberInt":"1509"},{"$numberInt":"1510"},{"$numberInt":"1511"},{"$numberInt":"1512"},{"$numberInt":"1513"},{"$numberInt":"1514"},{"$numberInt":"1515"},{"$numberInt":"1516"},{"$numberInt":"1517"},{"$numberInt":"1518"},{"$numberInt":"1519"},{"$numberInt":"1520"},{"$numberInt":"1521"},{"$numberInt":"1522"},{"$numberInt":"1523"},{"$numberInt":"1524"},{"$numberInt":"1525"},{"$numberInt":"1526"},{"$numberInt":"1527"},{"$numberInt":"1528"},{"$numberInt":"1529"},{"$numberInt":"1530"},{"$numberInt":"1531"},{"$numberInt":"1532"},{"$numberInt":"1533"},{"$numberInt":"1534"},{"$numberInt":"1535"},{"$numberInt":"1536"},{"$numberInt":"1537"},{"$numberInt":"1538"},{"$numberInt":"1539"},{"$numberInt":"1540"},{"$numberInt":"1541"},{"$numberInt":"1542"},{"$numberInt":"1543"},{"$numberInt":"1544"},{"$numberInt":"1545"},{"$numberInt":"1546"},{"$numberInt":"1547"},{"$numberInt":"1548"},{"$numberInt":"1549"},{"$numberInt":"1550"},{"$numberInt":"1551"},{"$numberInt":"1552"},{"$numberInt":"1553"},{"$numberInt":"1554"},{"$numberInt":"1555"},{"$numberInt":"1556"},{"$numberInt":"1557"},{"$numberInt":"1558"},{"$numberInt":"1559"},{"$numberInt":"1560"},{"$numberInt":"1561"},{"$numberInt":"1562"},{"$numberInt":"1563"},{"$numberInt":"1564"},{"$numberInt":"1565"},{"$numberInt":"1566"},{"$numberInt":"1567"},{"$numberInt":"1568"},{"$numberInt":"1569"},{"$numberInt":"1570"},{"$numberInt":"1571"},{"$numberInt":"1572"},{"$numberInt":"1573"},{"$numberInt":"1574"},{"$numberInt":"1575"},{"$numberInt":"1576"},{"$numberInt":"1577"},{"$numberInt":"1578"},{"$numberInt":"1579"},{"$numberInt":"1580"},{"$numberInt":"1581"},{"$numberInt":"1582"},{"$numberInt":"1583"},{"$numberInt":"1584"},{"$numberInt":"1585"},{"$numberInt":"1586"},{"$numberInt":"1587"},{"$numberInt":"1588"},{"$numberInt":"1589"},{"$numberInt":"1590"},{"$numberInt":"1591"},{"$numberInt":"1592"},{"$numberInt":"1593"},{"$numberInt":"1594"},{"$numberInt":"1595"},{"$numberInt":"1596"},{"$numberInt":"1597"},{"$numberInt":"1598"},{"$numberInt":"1599"},{"$numberInt":"1600"},{"$numberInt":"1601"},{"$numberInt":"1602"},{"$numberInt":"1603"},{"$numberInt":"1604"},{"$numberInt":"1605"},{"$numberInt":"1606"},{"$numberInt":"1607"},{"$numberInt":"1608"},{"$numberInt":"1609"},{"$numberInt":"1610"},{"$numberInt":"1611"},{"$numberInt":"1612"},{"$numberInt":"1613"},{"$numberInt":"1614"},{"$numberInt":"1615"},{"$numberInt":"1616"},{"$numberInt":"1617"},{"$numberInt":"1618"},{"$numberInt":"1619"},{"$numberInt":"1620"},{"$numberInt":"1621"},{"$numberInt":"1622"},{"$numberInt":"1623"},{"$numberInt":"1624"},{"$numberInt":"1625"},{"$numberInt":"1626"},{"$numberInt":"1627"},{"$numberInt":"1628"},{"$numberInt":"1629"},{"$numberInt":"1630"},{"$numberInt":"1631"},{"$numberInt":"1632"},{"$numberInt":"1633"},{"$numberInt":"1634"},{"$numberInt":"1635"},{"$numberInt":"1636"},{"$numberInt":"1637"},{"$numberInt":"1638"},{"$numberInt":"1639"},{"$numberInt":"1640"},{"$numberInt":"1641"},{"$numberInt":"1642"},{"$numberInt":"1643"},{"$numberInt":"1644"},{"$numberInt":"1645"},{"$numberInt":"1646"},{"$numberInt":"1647"},{"$numberInt":"1648"},{"$numberInt":"1649"},{"$numberInt":"1650"},{"$numberInt":"1651"},{"$numberInt":"1652"},{"$numberInt":"1653"},{"$numberInt":"1654"},{"$numberInt":"1655"},{"$numberInt":"1656"},{"$numberInt":"1657"},{"$numberInt":"1658"},{"$numberInt":"1659"},{"$numberInt":"1660"},{"$numberInt":"1661"},{"$numberInt":"1662"},{"$numberInt":"1663"},{"$numberInt":"1664"},{"$numberInt":"1665"},{"$numberInt":"1666"},{"$numberInt":"1667"},{"$numberInt":"1668"},{"$numberInt":"1669"},{"$numberInt":"1670"},{"$numberInt":"1671"},{"$numberInt":"1672"},{"$numberInt":"1673"},{"$numberInt":"1674"},{"$numberInt":"1675"},{"$numberInt":"1676"},{"$numberInt":"1677"},{"$numberInt":"1678"},{"$numberInt":"1679"},{"$numberInt":"1680"},{"$numberInt":"1681"},{"$numberInt":"1682"},{"$numberInt":"1683"},{"$numberInt":"1684"},{"$numberInt":"1685"},{"$numberInt":"1686"},{"$numberInt":"1687"},{"$numberInt":"1688"},{"$numberInt":"1689"},{"$numberInt":"1690"},{"$numberInt":"1691"},{"$numberInt":"1692"},{"$numberInt":"1693"},{"$numberInt":"1694"},{"$numberInt":"1695"},{"$numberInt":"1696"},{"$numberInt":"1697"},{"$numberInt":"1698"},{"$numberInt":"1699"},{"$numberInt":"1700"},{"$numberInt":"1701"},{"$numberInt":"1702"},{"$numberInt":"1703"},{"$numberInt":"1704"},{"$numberInt":"1705"},{"$numberInt":"1706"},{"$numberInt":"1707"},{"$numberInt":"1708"},{"$numberInt":"1709"},{"$numberInt":"1710"},{"$numberInt":"1711"},{"$numberInt":"1712"},{"$numberInt":"1713"},{"$numberInt":"1714"},{"$numberInt":"1715"},{"$numberInt":"1716"},{"$numberInt":"1717"},{"$numberInt":"1718"},{"$numberInt":"1719"},{"$numberInt":"1720"},{"$numberInt":"1721"},{"$numberInt":"1722"},{"$numberInt":"1723"},{"$numberInt":"1724"},{"$numberInt":"1725"},{"$numberInt":"1726"},{"$numberInt":"1727"},{"$numberInt":"1728"},{"$numberInt":"1729"},{"$numberInt":"1730"},{"$numberInt":"1731"},{"$numberInt":"1732"},{"$numberInt":"1733"},{"$numberInt":"1734"},{"$numberInt":"1735"},{"$numberInt":"1736"},{"$numberInt":"1737"},{"$numberInt":"1738"},{"$numberInt":"1739"},{"$numberInt":"1740"},{"$numberInt":"1741"},{"$numberInt":"1742"},{"$numberInt":"1743"},{"$numberInt":"1744"},{"$numberInt":"1745"},{"$numberInt":"1746"},{"$numberInt":"1747"},{"$numberInt":"1748"},{"$numberInt":"1749"},{"$numberInt":"1750"},{"$numberInt":"1751"},{"$numberInt":"1752"},{"$numberInt":"1753"},{"$numberInt":"1754"},{"$numberInt":"1755"},{"$numberInt":"1756"},{"$numberInt":"1757"},{"$numberInt":"1758"},{"$numberInt":"1759"},{"$numberInt":"1760"},{"$numberInt":"1761"},{"$numberInt":"1762"},{"$numberInt":"1763"},{"$numberInt":"1764"},{"$numberInt":"1765"},{"$numberInt":"1766"},{"$numberInt":"1767"},{"$numberInt":"1768"},{"$numberInt":"1769"},{"$numberInt":"1770"},{"$numberInt":"1771"},{"$numberInt":"1772"},{"$numberInt":"1773"},{"$numberInt":"1774"},{"$numberInt":"1775"},{"$numberInt":"1776"},{"$numberInt":"1777"},{"$numberInt":"1778"},{"$numberInt":"1779"},{"$numberInt":"1780"},{"$numberInt":"1781"},{"$numberInt":"1782"},{"$numberInt":"1783"},{"$numberInt":"1784"},{"$numberInt":"1785"},{"$numberInt":"1786"},{"$numberInt":"1787"},{"$numberInt":"1788"},{"$numberInt":"1789"},{"$numberInt":"1790"},{"$numberInt":"1791"},{"$numberInt":"1792"},{"$numberInt":"1793"},{"$numberInt":"1794"},{"$numberInt":"1795"},{"$numberInt":"1796"},{"$numberInt":"1797"},{"$numberInt":"1798"},{"$numberInt":"1799"},{"$numberInt":"1800"},{"$numberInt":"1801"},{"$numberInt":"1802"},{"$numberInt":"1803"},{"$numberInt":"1804"},{"$numberInt":"1805"},{"$numberInt":"1806"},{"$numberInt":"1807"},{"$numberInt":"1808"},{"$numberInt":"1809"},{"$numberInt":"1810"},{"$numberInt":"1811"},{"$numberInt":"1812"},{"$numberInt":"1813"},{"$numberInt":"1814"},{"$numberInt":"1815"},{"$numberInt":"1816"},{"$numberInt":"1817"},{"$numberInt":"1818"},{"$numberInt":"1819"},{"$numberInt":"1820"},{"$numberInt":"1821"},{"$numberInt":"1822"},{"$numberInt":"1823"},{"$numberInt":"1824"},{"$numberInt":"1825"},{"$numberInt":"1826"},{"$numberInt":"1827"},{"$numberInt":"1828"},{"$numberInt":"1829"},{"$numberInt":"1830"},{"$numberInt":"1831"},{"$numberInt":"1832"},{"$numberInt":"1833"},{"$numberInt":"1834"},{"$numberInt":"1835"},{"$numberInt":"1836"},{"$numberInt":"1837"},{"$numberInt":"1838"},{"$numberInt":"1839"},{"$numberInt":"1840"},{"$numberInt":"1841"},{"$numberInt":"1842"},{"$numberInt":"1843"},{"$numberInt":"1844"},{"$numberInt":"1845"},{"$numberInt":"1846"},{"$numberInt":"1847"},{"$numberInt":"1848"},{"$numberInt":"1849"},{"$numberInt":"1850"},{"$numberInt":"1851"},{"$numberInt":"1852"},{"$numberInt":"1853"},{"$numberInt":"1854"},{"$numberInt":"1855"},{"$numberInt":"1856"},{"$numberInt":"1857"},{"$numberInt":"1858"},{"$numberInt":"1859"},{"$numberInt":"1860"},{"$numberInt":"1861"},{"$numberInt":"1862"},{"$numberInt":"1863"},{"$numberInt":"1864"},{"$numberInt":"1865"},{"$numberInt":"1866"},{"$numberInt":"1867"},{"$numberInt":"1868"},{"$numberInt":"1869"},{"$numberInt":"1870"},{"$numberInt":"1871"},{"$numberInt":"1872"},{"$numberInt":"1873"},{"$numberInt":"1874"},{"$numberInt":"1875"},{"$numberInt":"1876"},{"$numberInt":"1877"},{"$numberInt":"1878"},{"$numberInt":"1879"},{"$numberInt":"1880"},{"$numberInt":"1881"},{"$numberInt":"1882"},{"$numberInt":"1883"},{"$numberInt":"1884"},{"$numberInt":"1885"},{"$numberInt":"1886"},{"$numberInt":"1887"},{"$numberInt":"1888"},{"$numberInt":"1889"},{"$numberInt":"1890"},{"$numberInt":"1891"},{"$numberInt":"1892"},{"$numberInt":"1893"},{"$numberInt":"1894"},{"$numberInt":"1895"},{"$numberInt":"1896"},{"$numberInt":"1897"},{"$numberInt":"1898"},{"$numberInt":"1899"},{"$numberInt":"1900"},{"$numberInt":"1901"},{"$numberInt":"1902"},{"$numberInt":"1903"},{"$numberInt":"1904"},{"$numberInt":"1905"},{"$numberInt":"1906"},{"$numberInt":"1907"},{"$numberInt":"1908"},{"$numberInt":"1909"},{"$numberInt":"1910"},{"$numberInt":"1911"},{"$numberInt":"1912"},{"$numberInt":"1913"},{"$numberInt":"1914"},{"$numberInt":"1915"},{"$numberInt":"1916"},{"$numberInt":"1917"},{"$numberInt":"1918"},{"$numberInt":"1919"},{"$numberInt":"1920"},{"$numberInt":"1921"},{"$numberInt":"1922"},{"$numberInt":"1923"},{"$numberInt":"1924"},{"$numberInt":"1925"},{"$numberInt":"1926"},{"$numberInt":"1927"},{"$numberInt":"1928"},{"$numberInt":"1929"},{"$numberInt":"1930"},{"$numberInt":"1931"},{"$numberInt":"1932"},{"$numberInt":"1933"},{"$numberInt":"1934"},{"$numberInt":"1935"},{"$numberInt":"1936"},{"$numberInt":"1937"},{"$numberInt":"1938"},{"$numberInt":"1939"},{"$numberInt":"1940"},{"$numberInt":"1941"},{"$numberInt":"1942"},{"$numberInt":"1943"},{"$numberInt":"1944"},{"$numberInt":"1945"},{"$numberInt":"1946"},{"$numberInt":"1947"},{"$numberInt":"1948"},{"$numberInt":"1949"},{"$numberInt":"1950"},{"$numberInt":"1951"},{"$numberInt":"1952"},{"$numberInt":"1953"},{"$numberInt":"1954"},{"$numberInt":"1955"},{"$numberInt":"1956"},{"$numberInt":"1957"},{"$numberInt":"1958"},{"$numberInt":"1959"},{"$numberInt":"1960"},{"$numberInt":"1961"},{"$numberInt":"1962"},{"$numberInt":"1963"},{"$numberInt":"1964"},{"$numberInt":"1965"},{"$numberInt":"1966"},{"$numberInt":"1967"},{"$numberInt":"1968"},{"$numberInt":"1969"},{"$numberInt":"1970"},{"$numberInt":"1971"},{"$numberInt":"1972"},{"$numberInt":"1973"},{"$numberInt":"1974"},{"$numberInt":"1975"},{"$numberInt":"1976"},{"$numberInt":"1977"},{"$numberInt":"1978"},{"$numberInt":"1979"},{"$numberInt":"1980"},{"$numberInt":"1981"},{"$numberInt":"1982"},{"$numberInt":"1983"},{"$numberInt":"1984"},{"$numberInt":"1985"},{"$numberInt":"1986"},{"$numberInt":"1987"},{"$numberInt":"1988"},{"$numberInt":"1989"},{"$numberInt":"1990"},{"$numberInt":"1991"},{"$numberInt":"1992"},{"$numberInt":"1993"},{"$numberInt":"1994"},{"$numberInt":"1995"},{"$numberInt":"1996"},{"$numberInt":"1997"},{"$numberInt":"1998"},{"$numberInt":"1999"},{"$numberInt":"2000"},{"$numberInt":"2001"},{"$numberInt":"2002"},{"$numberInt":"2003"},{"$numberInt":"2004"},{"$numberInt":"2005"},{"$numberInt":"2006"},{"$numberInt":"2007"},{"$numberInt":"2008"},{"$numberInt":"2009"},{"$numberInt":"2010"},{"$numberInt":"2011"},{"$numberInt":"2012"},{"$numberInt":"2013"},{"$numberInt":"2014"},{"$numberInt":"2015"},{"$numberInt":"2016"},{"$numberInt":"2017"},{"$numberInt":"2018"},{"$numberInt":"2019"},{"$numberInt":"2020"},{"$numberInt":"2021"},{"$numberInt":"2022"},{"$numberInt":"2023"},{"$numberInt":"2024"},{"$numberInt":"2025"},{"$numberInt":"2026"},{"$numberInt":"2027"},{"$numberInt":"2028"},{"$numberInt":"2029"},{"$numberInt":"2030"},{"$numberInt":"2031"},{"$numberInt":"2032"},{"$numberInt":"2033"},{"$numberInt":"2034"},{"$numberInt":"2035"},{"$numberInt":"2036"},{"$numberInt":"2037"},{"$numberInt":"2038"},{"$numberInt":"2039"},{"$numberInt":"2040"},{"$numberInt":"2041"},{"$numberInt":"2042"},{"$numberInt":"2043"},{"$numberInt":"2044"},{"$numberInt":"2045"},{"$numberInt":"2046"},{"$numberInt":"2047"},{"$numberInt":"2048"},{"$numberInt":"2049"},{"$numberInt":"2050"},{"$numberInt":"2051"},{"$numberInt":"2052"},{"$numberInt":"2053"},{"$numberInt":"2054"},{"$numberInt":"2055"},{"$numberInt":"2056"},{"$numberInt":"2057"},{"$numberInt":"2058"},{"$numberInt":"2059"},{"$numberInt":"2060"},{"$numberInt":"2061"},{"$numberInt":"2062"},{"$numberInt":"2063"},{"$numberInt":"2064"},{"$numberInt":"2065"},{"$numberInt":"2066"},{"$numberInt":"2067"},{"$numberInt":"2068"},{"$numberInt":"2069"},{"$numberInt":"2070"},{"$numberInt":"2071"},{"$numberInt":"2072"},{"$numberInt":"2073"},{"$numberInt":"2074"},{"$numberInt":"2075"},{"$numberInt":"2076"},{"$numberInt":"2077"},{"$numberInt":"2078"},{"$numberInt":"2079"},{"$numberInt":"2080"},{"$numberInt":"2081"},{"$numberInt":"2082"},{"$numberInt":"2083"},{"$numberInt":"2084"},{"$numberInt":"2085"},{"$numberInt":"2086"},{"$numberInt":"2087"},{"$numberInt":"2088"},{"$numberInt":"2089"},{"$numberInt":"2090"},{"$numberInt":"2091"},{"$numberInt":"2092"},{"$numberInt":"2093"},{"$numberInt":"2094"},{"$numberInt":"2095"},{"$numberInt":"2096"},{"$numberInt":"2097"},{"$numberInt":"2098"},{"$numberInt":"2099"},{"$numberInt":"2100"},{"$numberInt":"2101"},{"$numberInt":"2102"},{"$numberInt":"2103"},{"$numberInt":"2104"},{"$numberInt":"2105"},{"$numberInt":"2106"},{"$numberInt":"2107"},{"$numberInt":"2108"},{"$numberInt":"2109"},{"$numberInt":"2110"},{"$numberInt":"2111"},{"$numberInt":"2112"},{"$numberInt":"2113"},{"$numberInt":"2114"},{"$numberInt":"2115"},{"$numberInt":"2116"},{"$numberInt":"2117"},{"$numberInt":"2118"},{"$numberInt":"2119"},{"$numberInt":"2120"},{"$numberInt":"2121"},{"$numberInt":"2122"},{"$numberInt":"2123"},{"$numberInt":"2124"},{"$numberInt":"2125"},{"$numberInt":"2126"},{"$numberInt":"2127"},{"$numberInt":"2128"},{"$numberInt":"2129"},{"$numberInt":"2130"},{"$numberInt":"2131"},{"$numberInt":"2132"},{"$numberInt":"2133"},{"$numberInt":"2134"},{"$numberInt":"2135"},{"$numberInt":"2136"},{"$numberInt":"2137"},{"$numberInt":"2138"},{"$numberInt":"2139"},{"$numberInt":"2140"},{"$numberInt":"2141"},{"$numberInt":"2142"},{"$numberInt":"2143"},{"$numberInt":"2144"},{"$numberInt":"2145"},{"$numberInt":"2146"},{"$numberInt":"2147"},{"$numberInt":"2148"},{"$numberInt":"2149"},{"$numberInt":"2150"},{"$numberInt":"2151"},{"$numberInt":"2152"},{"$numberInt":"2153"},{"$numberInt":"2154"},{"$numberInt":"2155"},{"$numberInt":"2156"},{"$numberInt":"2157"},{"$numberInt":"2158"},{"$numberInt":"2159"},{"$numberInt":"2160"},{"$numberInt":"2161"},{"$numberInt":"2162"},{"$numberInt":"2163"},{"$numberInt":"2164"},{"$numberInt":"2165"},{"$numberInt":"2166"},{"$numberInt":"2167"},{"$numberInt":"2168"},{"$numberInt":"2169"},{"$numberInt":"2170"},{"$numberInt":"2171"},{"$numberInt":"2172"},{"$numberInt":"2173"},{"$numberInt":"2174"},{"$numberInt":"2175"},{"$numberInt":"2176"},{"$numberInt":"2177"},{"$numberInt":"2178"},{"$numberInt":"2179"},{"$numberInt":"2180"},{"$numberInt":"2181"},{"$numberInt":"2182"},{"$numberInt":"2183"},{"$numberInt":"2184"},{"$numberInt":"2185"},{"$numberInt":"2186"},{"$numberInt":"2187"},{"$numberInt":"2188"},{"$numberInt":"2189"},{"$numberInt":"2190"},{"$numberInt":"2191"},{"$numberInt":"2192"},{"$numberInt":"2193"},{"$numberInt":"2194"},{"$numberInt":"2195"},{"$numberInt":"2196"},{"$numberInt":"2197"},{"$numberInt":"2198"},{"$numberInt":"2199"},{"$numberInt":"2200"},{"$numberInt":"2201"},{"$numberInt":"2202"},{"$numberInt":"2203"},{"$numberInt":"2204"},{"$numberInt":"2205"},{"$numberInt":"2206"},{"$numberInt":"2207"},{"$numberInt":"2208"},{"$numberInt":"2209"},{"$numberInt":"2210"},{"$numberInt":"2211"},{"$numberInt":"2212"},{"$numberInt":"2213"},{"$numberInt":"2214"},{"$numberInt":"2215"},{"$numberInt":"2216"},{"$numberInt":"2217"},{"$numberInt":"2218"},{"$numberInt":"2219"},{"$numberInt":"2220"},{"$numberInt":"2221"},{"$numberInt":"2222"},{"$numberInt":"2223"},{"$numberInt":"2224"},{"$numberInt":"2225"},{"$numberInt":"2226"},{"$numberInt":"2227"},{"$numberInt":"2228"},{"$numberInt":"2229"},{"$numberInt":"2230"},{"$numberInt":"2231"},{"$numberInt":"2232"},{"$numberInt":"2233"},{"$numberInt":"2234"},{"$numberInt":"2235"},{"$numberInt":"2236"},{"$numberInt":"2237"},{"$numberInt":"2238"},{"$numberInt":"2239"},{"$numberInt":"2240"},{"$numberInt":"2241"},{"$numberInt":"2242"},{"$numberInt":"2243"},{"$numberInt":"2244"},{"$numberInt":"2245"},{"$numberInt":"2246"},{"$numberInt":"2247"},{"$numberInt":"2248"},{"$numberInt":"2249"},{"$numberInt":"2250"},{"$numberInt":"2251"},{"$numberInt":"2252"},{"$numberInt":"2253"},{"$numberInt":"2254"},{"$numberInt":"2255"},{"$numberInt":"2256"},{"$numberInt":"2257"},{"$numberInt":"2258"},{"$numberInt":"2259"},{"$numberInt":"2260"},{"$numberInt":"2261"},{"$numberInt":"2262"},{"$numberInt":"2263"},{"$numberInt":"2264"},{"$numberInt":"2265"},{"$numberInt":"2266"},{"$numberInt":"2267"},{"$numberInt":"2268"},{"$numberInt":"2269"},{"$numberInt":"2270"},{"$numberInt":"2271"},{"$numberInt":"2272"},{"$numberInt":"2273"},{"$numberInt":"2274"},{"$numberInt":"2275"},{"$numberInt":"2276"},{"$numberInt":"2277"},{"$numberInt":"2278"},{"$numberInt":"2279"},{"$numberInt":"2280"},{"$numberInt":"2281"},{"$numberInt":"2282"},{"$numberInt":"2283"},{"$numberInt":"2284"},{"$numberInt":"2285"},{"$numberInt":"2286"},{"$numberInt":"2287"},{"$numberInt":"2288"},{"$numberInt":"2289"},{"$numberInt":"2290"},{"$numberInt":"2291"},{"$numberInt":"2292"},{"$numberInt":"2293"},{"$numberInt":"2294"},{"$numberInt":"2295"},{"$numberInt":"2296"},{"$numberInt":"2297"},{"$numberInt":"2298"},{"$numberInt":"2299"},{"$numberInt":"2300"},{"$numberInt":"2301"},{"$numberInt":"2302"},{"$numberInt":"2303"},{"$numberInt":"2304"},{"$numberInt":"2305"},{"$numberInt":"2306"},{"$numberInt":"2307"},{"$numberInt":"2308"},{"$numberInt":"2309"},{"$numberInt":"2310"},{"$numberInt":"2311"},{"$numberInt":"2312"},{"$numberInt":"2313"},{"$numberInt":"2314"},{"$numberInt":"2315"},{"$numberInt":"2316"},{"$numberInt":"2317"},{"$numberInt":"2318"},{"$numberInt":"2319"},{"$numberInt":"2320"},{"$numberInt":"2321"},{"$numberInt":"2322"},{"$numberInt":"2323"},{"$numberInt":"2324"},{"$numberInt":"2325"},{"$numberInt":"2326"},{"$numberInt":"2327"},{"$numberInt":"2328"},{"$numberInt":"2329"},{"$numberInt":"2330"},{"$numberInt":"2331"},{"$numberInt":"2332"},{"$numberInt":"2333"},{"$numberInt":"2334"},{"$numberInt":"2335"},{"$numberInt":"2336"},{"$numberInt":"2337"},{"$numberInt":"2338"},{"$numberInt":"2339"},{"$numberInt":"2340"},{"$numberInt":"2341"},{"$numberInt":"2342"},{"$numberInt":"2343"},{"$numberInt":"2344"},{"$numberInt":"2345"},{"$numberInt":"2346"},{"$numberInt":"2347"},{"$numberInt":"2348"},{"$numberInt":"2349"},{"$numberInt":"2350"},{"$numberInt":"2351"},{"$numberInt":"2352"},{"$numberInt":"2353"},{"$numberInt":"2354"},{"$numberInt":"2355"},{"$numberInt":"2356"},{"$numberInt":"2357"},{"$numberInt":"2358"},{"$numberInt":"2359"},{"$numberInt":"2360"},{"$numberInt":"2361"},{"$numberInt":"2362"},{"$numberInt":"2363"},{"$numberInt":"2364"},{"$numberInt":"2365"},{"$numberInt":"2366"},{"$numberInt":"2367"},{"$numberInt":"2368"},{"$numberInt":"2369"},{"$numberInt":"2370"},{"$numberInt":"2371"},{"$numberInt":"2372"},{"$numberInt":"2373"},{"$numberInt":"2374"},{"$numberInt":"2375"},{"$numberInt":"2376"},{"$numberInt":"2377"},{"$numberInt":"2378"},{"$numberInt":"2379"},{"$numberInt":"2380"},{"$numberInt":"2381"},{"$numberInt":"2382"},{"$numberInt":"2383"},{"$numberInt":"2384"},{"$numberInt":"2385"},{"$numberInt":"2386"},{"$numberInt":"2387"},{"$numberInt":"2388"},{"$numberInt":"2389"},{"$numberInt":"2390"},{"$numberInt":"2391"},{"$numberInt":"2392"},{"$numberInt":"2393"},{"$numberInt":"2394"},{"$numberInt":"2395"},{"$numberInt":"2396"},{"$numberInt":"2397"},{"$numberInt":"2398"},{"$numberInt":"2399"},{"$numberInt":"2400"},{"$numberInt":"2401"},{"$numberInt":"2402"},{"$numberInt":"2403"},{"$numberInt":"2404"},{"$numberInt":"2405"},{"$numberInt":"2406"},{"$numberInt":"2407"},{"$numberInt":"2408"},{"$numberInt":"2409"},{"$numberInt":"2410"},{"$numberInt":"2411"},{"$numberInt":"2412"},{"$numberInt":"2413"},{"$numberInt":"2414"},{"$numberInt":"2415"},{"$numberInt":"2416"},{"$numberInt":"2417"},{"$numberInt":"2418"},{"$numberInt":"2419"},{"$numberInt":"2420"},{"$numberInt":"2421"},{"$numberInt":"2422"},{"$numberInt":"2423"},{"$numberInt":"2424"},{"$numberInt":"2425"},{"$numberInt":"2426"},{"$numberInt":"2427"},{"$numberInt":"2428"},{"$numberInt":"2429"},{"$numberInt":"2430"},{"$numberInt":"2431"},{"$numberInt":"2432"},{"$numberInt":"2433"},{"$numberInt":"2434"},{"$numberInt":"2435"},{"$numberInt":"2436"},{"$numberInt":"2437"},{"$numberInt":"2438"},{"$numberInt":"2439"},{"$numberInt":"2440"},{"$numberInt":"2441"},{"$numberInt":"2442"},{"$numberInt":"2443"},{"$numberInt":"2444"},{"$numberInt":"2445"},{"$numberInt":"2446"},{"$numberInt":"2447"},{"$numberInt":"2448"},{"$numberInt":"2449"},{"$numberInt":"2450"},{"$numberInt":"2451"},{"$numberInt":"2452"},{"$numberInt":"2453"},{"$numberInt":"2454"},{"$numberInt":"2455"},{"$numberInt":"2456"},{"$numberInt":"2457"},{"$numberInt":"2458"},{"$numberInt":"2459"},{"$numberInt":"2460"},{"$numberInt":"2461"},{"$numberInt":"2462"},{"$numberInt":"2463"},{"$numberInt":"2464"},{"$numberInt":"2465"},{"$numberInt":"2466"},{"$numberInt":"2467"},{"$numberInt":"2468"},{"$numberInt":"2469"},{"$numberInt":"2470"},{"$numberInt":"2471"},{"$numberInt":"2472"},{"$numberInt":"2473"},{"$numberInt":"2474"},{"$numberInt":"2475"},{"$numberInt":"2476"},{"$numberInt":"2477"},{"$numberInt":"2478"},{"$numberInt":"2479"},{"$numberInt":"2480"},{"$numberInt":"2481"},{"$numberInt":"2482"},{"$numberInt":"2483"},{"$numberInt":"2484"},{"$numberInt":"2485"},{"$numberInt":"2486"},{"$numberInt":"2487"},{"$numberInt":"2488"},{"$numberInt":"2489"},{"$numberInt":"2490"},{"$numberInt":"2491"},{"$numberInt":"2492"},{"$numberInt":"2493"},{"$numberInt":"2494"},{"$numberInt":"2495"},{"$numberInt":"2496"},{"$numberInt":"2497"},{"$numberInt":"2498"},{"$numberInt":"2499"},{"$numberInt":"2500"},{"$numberInt":"2501"},{"$numberInt":"2502"},{"$numberInt":"2503"},{"$numberInt":"2504"},{"$numberInt":"2505"},{"$numberInt":"2506"},{"$numberInt":"2507"},{"$numberInt":"2508"},{"$numberInt":"2509"},{"$numberInt":"2510"},{"$numberInt":"2511"},{"$numberInt":"2512"},{"$numberInt":"2513"},{"$numberInt":"2514"},{"$numberInt":"2515"},{"$numberInt":"2516"},{"$numberInt":"2517"},{"$numberInt":"2518"},{"$numberInt":"2519"},{"$numberInt":"2520"},{"$numberInt":"2521"},{"$numberInt":"2522"},{"$numberInt":"2523"},{"$numberInt":"2524"},{"$numberInt":"2525"},{"$numberInt":"2526"},{"$numberInt":"2527"},{"$numberInt":"2528"},{"$numberInt":"2529"},{"$numberInt":"2530"},{"$numberInt":"2531"},{"$numberInt":"2532"},{"$numberInt":"2533"},{"$numberInt":"2534"},{"$numberInt":"2535"},{"$numberInt":"2536"},{"$numberInt":"2537"},{"$numberInt":"2538"},{"$numberInt":"2539"},{"$numberInt":"2540"},{"$numberInt":"2541"},{"$numberInt":"2542"},{"$numberInt":"2543"},{"$numberInt":"2544"},{"$numberInt":"2545"},{"$numberInt":"2546"},{"$numberInt":"2547"},{"$numberInt":"2548"},{"$numberInt":"2549"},{"$numberInt":"2550"},{"$numberInt":"2551"},{"$numberInt":"2552"},{"$numberInt":"2553"},{"$numberInt":"2554"},{"$numberInt":"2555"},{"$numberInt":"2556"},{"$numberInt":"2557"},{"$numberInt":"2558"},{"$numberInt":"2559"},{"$numberInt":"2560"},{"$numberInt":"2561"},{"$numberInt":"2562"},{"$numberInt":"2563"},{"$numberInt":"2564"},{"$numberInt":"2565"},{"$numberInt":"2566"},{"$numberInt":"2567"},{"$numberInt":"2568"},{"$numberInt":"2569"},{"$numberInt":"2570"},{"$numberInt":"2571"},{"$numberInt":"2572"},{"$numberInt":"2573"},{"$numberInt":"2574"},{"$numberInt":"2575"},{"$numberInt":"2576"},{"$numberInt":"2577"},{"$numberInt":"2578"},{"$numberInt":"2579"},{"$numberInt":"2580"},{"$numberInt":"2581"},{"$numberInt":"2582"},{"$numberInt":"2583"},{"$numberInt":"2584"},{"$numberInt":"2585"},{"$numberInt":"2586"},{"$numberInt":"2587"},{"$numberInt":"2588"},{"$numberInt":"2589"},{"$numberInt":"2590"},{"$numberInt":"2591"},{"$numberInt":"2592"},{"$numberInt":"2593"},{"$numberInt":"2594"},{"$numberInt":"2595"},{"$numberInt":"2596"},{"$numberInt":"2597"},{"$numberInt":"2598"},{"$numberInt":"2599"},{"$numberInt":"2600"},{"$numberInt":"2601"},{"$numberInt":"2602"},{"$numberInt":"2603"},{"$numberInt":"2604"},{"$numberInt":"2605"},{"$numberInt":"2606"},{"$numberInt":"2607"},{"$numberInt":"2608"},{"$numberInt":"2609"},{"$numberInt":"2610"},{"$numberInt":"2611"},{"$numberInt":"2612"},{"$numberInt":"2613"},{"$numberInt":"2614"},{"$numberInt":"2615"},{"$numberInt":"2616"},{"$numberInt":"2617"},{"$numberInt":"2618"},{"$numberInt":"2619"},{"$numberInt":"2620"},{"$numberInt":"2621"},{"$numberInt":"2622"},{"$numberInt":"2623"},{"$numberInt":"2624"},{"$numberInt":"2625"},{"$numberInt":"2626"},{"$numberInt":"2627"},{"$numberInt":"2628"},{"$numberInt":"2629"},{"$numberInt":"2630"},{"$numberInt":"2631"},{"$numberInt":"2632"},{"$numberInt":"2633"},{"$numberInt":"2634"},{"$numberInt":"2635"},{"$numberInt":"2636"},{"$numberInt":"2637"},{"$numberInt":"2638"},{"$numberInt":"2639"},{"$numberInt":"2640"},{"$numberInt":"2641"},{"$numberInt":"2642"},{"$numberInt":"2643"},{"$numberInt":"2644"},{"$numberInt":"2645"},{"$numberInt":"2646"},{"$numberInt":"2647"},{"$numberInt":"2648"},{"$numberInt":"2649"},{"$numberInt":"2650"},{"$numberInt":"2651"},{"$numberInt":"2652"},{"$numberInt":"2653"},{"$numberInt":"2654"},{"$numberInt":"2655"},{"$numberInt":"2656"},{"$numberInt":"2657"},{"$numberInt":"2658"},{"$numberInt":"2659"},{"$numberInt":"2660"},{"$numberInt":"2661"},{"$numberInt":"2662"},{"$numberInt":"2663"},{"$numberInt":"2664"},{"$numberInt":"2665"},{"$numberInt":"2666"},{"$numberInt":"2667"},{"$numberInt":"2668"},{"$numberInt":"2669"},{"$numberInt":"2670"},{"$numberInt":"2671"},{"$numberInt":"2672"},{"$numberInt":"2673"},{"$numberInt":"2674"},{"$numberInt":"2675"},{"$numberInt":"2676"},{"$numberInt":"2677"},{"$numberInt":"2678"},{"$numberInt":"2679"},{"$numberInt":"2680"},{"$numberInt":"2681"},{"$numberInt":"2682"},{"$numberInt":"2683"},{"$numberInt":"2684"},{"$numberInt":"2685"},{"$numberInt":"2686"},{"$numberInt":"2687"},{"$numberInt":"2688"},{"$numberInt":"2689"},{"$numberInt":"2690"},{"$numberInt":"2691"},{"$numberInt":"2692"},{"$numberInt":"2693"},{"$numberInt":"2694"},{"$numberInt":"2695"},{"$numberInt":"2696"},{"$numberInt":"2697"},{"$numberInt":"2698"},{"$numberInt":"2699"},{"$numberInt":"2700"},{"$numberInt":"2701"},{"$numberInt":"2702"},{"$numberInt":"2703"},{"$numberInt":"2704"},{"$numberInt":"2705"},{"$numberInt":"2706"},{"$numberInt":"2707"},{"$numberInt":"2708"},{"$numberInt":"2709"},{"$numberInt":"2710"},{"$numberInt":"2711"},{"$numberInt":"2712"},{"$numberInt":"2713"},{"$numberInt":"2714"},{"$numberInt":"2715"},{"$numberInt":"2716"},{"$numberInt":"2717"},{"$numberInt":"2718"},{"$numberInt":"2719"},{"$numberInt":"2720"},{"$numberInt":"2721"},{"$numberInt":"2722"},{"$numberInt":"2723"},{"$numberInt":"2724"},{"$numberInt":"2725"},{"$numberInt":"2726"},{"$numberInt":"2727"},{"$numberInt":"2728"},{"$numberInt":"2729"},{"$numberInt":"2730"},{"$numberInt":"2731"},{"$numberInt":"2732"},{"$numberInt":"2733"},{"$numberInt":"2734"},{"$numberInt":"2735"},{"$numberInt":"2736"},{"$numberInt":"2737"},{"$numberInt":"2738"},{"$numberInt":"2739"},{"$numberInt":"2740"},{"$numberInt":"2741"},{"$numberInt":"2742"},{"$numberInt":"2743"},{"$numberInt":"2744"},{"$numberInt":"2745"},{"$numberInt":"2746"},{"$numberInt":"2747"},{"$numberInt":"2748"},{"$numberInt":"2749"},{"$numberInt":"2750"},{"$numberInt":"2751"},{"$numberInt":"2752"},{"$numberInt":"2753"},{"$numberInt":"2754"},{"$numberInt":"2755"},{"$numberInt":"2756"},{"$numberInt":"2757"},{"$numberInt":"2758"},{"$numberInt":"2759"},{"$numberInt":"2760"},{"$numberInt":"2761"},{"$numberInt":"2762"},{"$numberInt":"2763"},{"$numberInt":"2764"},{"$numberInt":"2765"},{"$numberInt":"2766"},{"$numberInt":"2767"},{"$numberInt":"2768"},{"$numberInt":"2769"},{"$numberInt":"2770"},{"$numberInt":"2771"},{"$numberInt":"2772"},{"$numberInt":"2773"},{"$numberInt":"2774"},{"$numberInt":"2775"},{"$numberInt":"2776"},{"$numberInt":"2777"},{"$numberInt":"2778"},{"$numberInt":"2779"},{"$numberInt":"2780"},{"$numberInt":"2781"},{"$numberInt":"2782"},{"$numberInt":"2783"},{"$numberInt":"2784"},{"$numberInt":"2785"},{"$numberInt":"2786"},{"$numberInt":"2787"},{"$numberInt":"2788"},{"$numberInt":"2789"},{"$numberInt":"2790"},{"$numberInt":"2791"},{"$numberInt":"2792"},{"$numberInt":"2793"},{"$numberInt":"2794"},{"$numberInt":"2795"},{"$numberInt":"2796"},{"$numberInt":"2797"},{"$numberInt":"2798"},{"$numberInt":"2799"},{"$numberInt":"2800"},{"$numberInt":"2801"},{"$numberInt":"2802"},{"$numberInt":"2803"},{"$numberInt":"2804"},{"$numberInt":"2805"},{"$numberInt":"2806"},{"$numberInt":"2807"},{"$numberInt":"2808"},{"$numberInt":"2809"},{"$numberInt":"2810"},{"$numberInt":"2811"},{"$numberInt":"2812"},{"$numberInt":"2813"},{"$numberInt":"2814"},{"$numberInt":"2815"},{"$numberInt":"2816"},{"$numberInt":"2817"},{"$numberInt":"2818"},{"$numberInt":"2819"},{"$numberInt":"2820"},{"$numberInt":"2821"},{"$numberInt":"2822"},{"$numberInt":"2823"},{"$numberInt":"2824"},{"$numberInt":"2825"},{"$numberInt":"2826"},{"$numberInt":"2827"},{"$numberInt":"2828"},{"$numberInt":"2829"},{"$numberInt":"2830"},{"$numberInt":"2831"},{"$numberInt":"2832"},{"$numberInt":"2833"},{"$numberInt":"2834"},{"$numberInt":"2835"},{"$numberInt":"2836"},{"$numberInt":"2837"},{"$numberInt":"2838"},{"$numberInt":"2839"},{"$numberInt":"2840"},{"$numberInt":"2841"},{"$numberInt":"2842"},{"$numberInt":"2843"},{"$numberInt":"2844"},{"$numberInt":"2845"},{"$numberInt":"2846"},{"$numberInt":"2847"},{"$numberInt":"2848"},{"$numberInt":"2849"},{"$numberInt":"2850"},{"$numberInt":"2851"},{"$numberInt":"2852"},{"$numberInt":"2853"},{"$numberInt":"2854"},{"$numberInt":"2855"},{"$numberInt":"2856"},{"$numberInt":"2857"},{"$numberInt":"2858"},{"$numberInt":"2859"},{"$numberInt":"2860"},{"$numberInt":"2861"},{"$numberInt":"2862"},{"$numberInt":"2863"},{"$numberInt":"2864"},{"$numberInt":"2865"},{"$numberInt":"2866"},{"$numberInt":"2867"},{"$numberInt":"2868"},{"$numberInt":"2869"},{"$numberInt":"2870"},{"$numberInt":"2871"},{"$numberInt":"2872"},{"$numberInt":"2873"},{"$numberInt":"2874"},{"$numberInt":"2875"},{"$numberInt":"2876"},{"$numberInt":"2877"},{"$numberInt":"2878"},{"$numberInt":"2879"},{"$numberInt":"2880"},{"$numberInt":"2881"},{"$numberInt":"2882"},{"$numberInt":"2883"},{"$numberInt":"2884"},{"$numberInt":"2885"},{"$numberInt":"2886"},{"$numberInt":"2887"},{"$numberInt":"2888"},{"$numberInt":"2889"},{"$numberInt":"2890"},{"$numberInt":"2891"},{"$numberInt":"2892"},{"$numberInt":"2893"},{"$numberInt":"2894"},{"$numberInt":"2895"},{"$numberInt":"2896"},{"$numberInt":"2897"},{"$numberInt":"2898"},{"$numberInt":"2899"},{"$numberInt":"2900"},{"$numberInt":"2901"},{"$numberInt":"2902"},{"$numberInt":"2903"},{"$numberInt":"2904"},{"$numberInt":"2905"},{"$numberInt":"2906"},{"$numberInt":"2907"},{"$numberInt":"2908"},{"$numberInt":"2909"},{"$numberInt":"2910"},{"$numberInt":"2911"},{"$numberInt":"2912"},{"$numberInt":"2913"},{"$numberInt":"2914"},{"$numberInt":"2915"},{"$numberInt":"2916"},{"$numberInt":"2917"},{"$numberInt":"2918"},{"$numberInt":"2919"},{"$numberInt":"2920"},{"$numberInt":"2921"},{"$numberInt":"2922"},{"$numberInt":"2923"},{"$numberInt":"2924"},{"$numberInt":"2925"},{"$numberInt":"2926"},{"$numberInt":"2927"},{"$numberInt":"2928"},{"$numberInt":"2929"},{"$numberInt":"2930"},{"$numberInt":"2931"},{"$numberInt":"2932"},{"$numberInt":"2933"},{"$numberInt":"2934"},{"$numberInt":"2935"},{"$numberInt":"2936"},{"$numberInt":"2937"},{"$numberInt":"2938"},{"$numberInt":"2939"},{"$numberInt":"2940"},{"$numberInt":"2941"},{"$numberInt":"2942"},{"$numberInt":"2943"},{"$numberInt":"2944"},{"$numberInt":"2945"},{"$numberInt":"2946"},{"$numberInt":"2947"},{"$numberInt":"2948"},{"$numberInt":"2949"},{"$numberInt":"2950"},{"$numberInt":"2951"},{"$numberInt":"2952"},{"$numberInt":"2953"},{"$numberInt":"2954"},{"$numberInt":"2955"},{"$numberInt":"2956"},{"$numberInt":"2957"},{"$numberInt":"2958"},{"$numberInt":"2959"},{"$numberInt":"2960"},{"$numberInt":"2961"},{"$numberInt":"2962"},{"$numberInt":"2963"},{"$numberInt":"2964"},{"$numberInt":"2965"},{"$numberInt":"2966"},{"$numberInt":"2967"},{"$numberInt":"2968"},{"$numberInt":"2969"},{"$numberInt":"2970"},{"$numberInt":"2971"},{"$numberInt":"2972"},{"$numberInt":"2973"},{"$numberInt":"2974"},{"$numberInt":"2975"},{"$numberInt":"2976"},{"$numberInt":"2977"},{"$numberInt":"2978"},{"$numberInt":"2979"},{"$numberInt":"2980"},{"$numberInt":"2981"},{"$numberInt":"2982"},{"$numberInt":"2983"},{"$numberInt":"2984"},{"$numberInt":"2985"},{"$numberInt":"2986"},{"$numberInt":"2987"},{"$numberInt":"2988"},{"$numberInt":"2989"},{"$numberInt":"2990"},{"$numberInt":"2991"},{"$numberInt":"2992"},{"$numberInt":"2993"},{"$numberInt":"2994"},{"$numberInt":"2995"},{"$numberInt":"2996"},{"$numberInt":"2997"},{"$numberInt":"2998"},{"$numberInt":"2999"},{"$numberInt":"3000"},{"$numberInt":"3001"},{"$numberInt":"3002"},{"$numberInt":"3003"},{"$numberInt":"3004"},{"$numberInt":"3005"},{"$numberInt":"3006"},{"$numberInt":"3007"},{"$numberInt":"3008"},{"$numberInt":"3009"},{"$numberInt":"3010"},{"$numberInt":"3011"},{"$numberInt":"3012"},{"$numberInt":"3013"},{"$numberInt":"3014"},{"$numberInt":"3015"},{"$numberInt":"3016"},{"$numberInt":"3017"},{"$numberInt":"3018"},{"$numberInt":"3019"},{"$numberInt":"3020"},{"$numberInt":"3021"},{"$numberInt":"3022"},{"$numberInt":"3023"},{"$numberInt":"3024"},{"$numberInt":"3025"},{"$numberInt":"3026"},{"$numberInt":"3027"},{"$numberInt":"3028"},{"$numberInt":"3029"},{"$numberInt":"3030"},{"$numberInt":"3031"},{"$numberInt":"3032"},{"$numberInt":"3033"},{"$numberInt":"3034"},{"$numberInt":"3035"},{"$numberInt":"3036"},{"$numberInt":"3037"},{"$numberInt":"3038"},{"$numberInt":"3039"},{"$numberInt":"3040"},{"$numberInt":"3041"},{"$numberInt":"3042"},{"$numberInt":"3043"},{"$numberInt":"3044"},{"$numberInt":"3045"},{"$numberInt":"3046"},{"$numberInt":"3047"},{"$numberInt":"3048"},{"$numberInt":"3049"},{"$numberInt":"3050"},{"$numberInt":"3051"},{"$numberInt":"3052"},{"$numberInt":"3053"},{"$numberInt":"3054"},{"$numberInt":"3055"},{"$numberInt":"3056"},{"$numberInt":"3057"},{"$numberInt":"3058"},{"$numberInt":"3059"},{"$numberInt":"3060"},{"$numberInt":"3061"},{"$numberInt":"3062"},{"$numberInt":"3063"},{"$numberInt":"3064"},{"$numberInt":"3065"},{"$numberInt":"3066"},{"$numberInt":"3067"},{"$numberInt":"3068"},{"$numberInt":"3069"},{"$numberInt":"3070"},{"$numberInt":"3071"},{"$numberInt":"3072"},{"$numberInt":"3073"},{"$numberInt":"3074"},{"$numberInt":"3075"},{"$numberInt":"3076"},{"$numberInt":"3077"},{"$numberInt":"3078"},{"$numberInt":"3079"},{"$numberInt":"3080"},{"$numberInt":"3081"},{"$numberInt":"3082"},{"$numberInt":"3083"},{"$numberInt":"3084"},{"$numberInt":"3085"},{"$numberInt":"3086"},{"$numberInt":"3087"},{"$numberInt":"3088"},{"$numberInt":"3089"},{"$numberInt":"3090"},{"$numberInt":"3091"},{"$numberInt":"3092"},{"$numberInt":"3093"},{"$numberInt":"3094"},{"$numberInt":"3095"},{"$numberInt":"3096"},{"$numberInt":"3097"},{"$numberInt":"3098"},{"$numberInt":"3099"},{"$numberInt":"3100"},{"$numberInt":"3101"},{"$numberInt":"3102"},{"$numberInt":"3103"},{"$numberInt":"3104"},{"$numberInt":"3105"},{"$numberInt":"3106"},{"$numberInt":"3107"},{"$numberInt":"3108"},{"$numberInt":"3109"},{"$numberInt":"3110"},{"$numberInt":"3111"},{"$numberInt":"3112"},{"$numberInt":"3113"},{"$numberInt":"3114"},{"$numberInt":"3115"},{"$numberInt":"3116"},{"$numberInt":"3117"},{"$numberInt":"3118"},{"$numberInt":"3119"},{"$numberInt":"3120"},{"$numberInt":"3121"},{"$numberInt":"3122"},{"$numberInt":"3123"},{"$numberInt":"3124"},{"$numberInt":"3125"},{"$numberInt":"3126"},{"$numberInt":"3127"},{"$numberInt":"3128"},{"$numberInt":"3129"},{"$numberInt":"3130"},{"$numberInt":"3131"},{"$numberInt":"3132"},{"$numberInt":"3133"},{"$numberInt":"3134"},{"$numberInt":"3135"},{"$numberInt":"3136"},{"$numberInt":"3137"},{"$numberInt":"3138"},{"$numberInt":"3139"},{"$numberInt":"3140"},{"$numberInt":"3141"},{"$numberInt":"3142"},{"$numberInt":"3143"},{"$numberInt":"3144"},{"$numberInt":"3145"},{"$numberInt":"3146"},{"$numberInt":"3147"},{"$numberInt":"3148"},{"$numberInt":"3149"},{"$numberInt":"3150"},{"$numberInt":"3151"},{"$numberInt":"3152"},{"$numberInt":"3153"},{"$numberInt":"3154"},{"$numberInt":"3155"},{"$numberInt":"3156"},{"$numberInt":"3157"},{"$numberInt":"3158"},{"$numberInt":"3159"},{"$numberInt":"3160"},{"$numberInt":"3161"},{"$numberInt":"3162"},{"$numberInt":"3163"},{"$numberInt":"3164"},{"$numberInt":"3165"},{"$numberInt":"3166"},{"$numberInt":"3167"},{"$numberInt":"3168"},{"$numberInt":"3169"},{"$numberInt":"3170"},{"$numberInt":"3171"},{"$numberInt":"3172"},{"$numberInt":"3173"},{"$numberInt":"3174"},{"$numberInt":"3175"},{"$numberInt":"3176"},{"$numberInt":"3177"},{"$numberInt":"3178"},{"$numberInt":"3179"},{"$numberInt":"3180"},{"$numberInt":"3181"},{"$numberInt":"3182"},{"$numberInt":"3183"},{"$numberInt":"3184"},{"$numberInt":"3185"},{"$numberInt":"3186"},{"$numberInt":"3187"},{"$numberInt":"3188"},{"$numberInt":"3189"},{"$numberInt":"3190"},{"$numberInt":"3191"},{"$numberInt":"3192"},{"$numberInt":"3193"},{"$numberInt":"3194"},{"$numberInt":"3195"},{"$numberInt":"3196"},{"$numberInt":"3197"},{"$numberInt":"3198"},{"$numberInt":"3199"},{"$numberInt":"3200"},{"$numberInt":"3201"},{"$numberInt":"3202"},{"$numberInt":"3203"},{"$numberInt":"3204"},{"$numberInt":"3205"},{"$numberInt":"3206"},{"$numberInt":"3207"},{"$numberInt":"3208"},{"$numberInt":"3209"},{"$numberInt":"3210"},{"$numberInt":"3211"},{"$numberInt":"3212"},{"$numberInt":"3213"},{"$numberInt":"3214"},{"$numberInt":"3215"},{"$numberInt":"3216"},{"$numberInt":"3217"},{"$numberInt":"3218"},{"$numberInt":"3219"},{"$numberInt":"3220"},{"$numberInt":"3221"},{"$numberInt":"3222"},{"$numberInt":"3223"},{"$numberInt":"3224"},{"$numberInt":"3225"},{"$numberInt":"3226"},{"$numberInt":"3227"},{"$numberInt":"3228"},{"$numberInt":"3229"},{"$numberInt":"3230"},{"$numberInt":"3231"},{"$numberInt":"3232"},{"$numberInt":"3233"},{"$numberInt":"3234"},{"$numberInt":"3235"},{"$numberInt":"3236"},{"$numberInt":"3237"},{"$numberInt":"3238"},{"$numberInt":"3239"},{"$numberInt":"3240"},{"$numberInt":"3241"},{"$numberInt":"3242"},{"$numberInt":"3243"},{"$numberInt":"3244"},{"$numberInt":"3245"},{"$numberInt":"3246"},{"$numberInt":"3247"},{"$numberInt":"3248"},{"$numberInt":"3249"},{"$numberInt":"3250"},{"$numberInt":"3251"},{"$numberInt":"3252"},{"$numberInt":"3253"},{"$numberInt":"3254"},{"$numberInt":"3255"},{"$numberInt":"3256"},{"$numberInt":"3257"},{"$numberInt":"3258"},{"$numberInt":"3259"},{"$numberInt":"3260"},{"$numberInt":"3261"},{"$numberInt":"3262"},{"$numberInt":"3263"},{"$numberInt":"3264"},{"$numberInt":"3265"},{"$numberInt":"3266"},{"$numberInt":"3267"},{"$numberInt":"3268"},{"$numberInt":"3269"},{"$numberInt":"3270"},{"$numberInt":"3271"},{"$numberInt":"3272"},{"$numberInt":"3273"},{"$numberInt":"3274"},{"$numberInt":"3275"},{"$numberInt":"3276"},{"$numberInt":"3277"},{"$numberInt":"3278"},{"$numberInt":"3279"},{"$numberInt":"3280"},{"$numberInt":"3281"},{"$numberInt":"3282"},{"$numberInt":"3283"},{"$numberInt":"3284"},{"$numberInt":"3285"},{"$numberInt":"3286"},{"$numberInt":"3287"},{"$numberInt":"3288"},{"$numberInt":"3289"},{"$numberInt":"3290"},{"$numberInt":"3291"},{"$numberInt":"3292"},{"$numberInt":"3293"},{"$numberInt":"3294"},{"$numberInt":"3295"},{"$numberInt":"3296"},{"$numberInt":"3297"},{"$numberInt":"3298"},{"$numberInt":"3299"},{"$numberInt":"3300"},{"$numberInt":"3301"},{"$numberInt":"3302"},{"$numberInt":"3303"},{"$numberInt":"3304"},{"$numberInt":"3305"},{"$numberInt":"3306"},{"$numberInt":"3307"},{"$numberInt":"3308"},{"$numberInt":"3309"},{"$numberInt":"3310"},{"$numberInt":"3311"},{"$numberInt":"3312"},{"$numberInt":"3313"},{"$numberInt":"3314"},{"$numberInt":"3315"},{"$numberInt":"3316"},{"$numberInt":"3317"},{"$numberInt":"3318"},{"$numberInt":"3319"},{"$numberInt":"3320"},{"$numberInt":"3321"},{"$numberInt":"3322"},{"$numberInt":"3323"},{"$numberInt":"3324"},{"$numberInt":"3325"},{"$numberInt":"3326"},{"$numberInt":"3327"},{"$numberInt":"3328"},{"$numberInt":"3329"},{"$numberInt":"3330"},{"$numberInt":"3331"},{"$numberInt":"3332"},{"$numberInt":"3333"},{"$numberInt":"3334"},{"$numberInt":"3335"},{"$numberInt":"3336"},{"$numberInt":"3337"},{"$numberInt":"3338"},{"$numberInt":"3339"},{"$numberInt":"3340"},{"$numberInt":"3341"},{"$numberInt":"3342"},{"$numberInt":"3343"},{"$numberInt":"3344"},{"$numberInt":"3345"},{"$numberInt":"3346"},{"$numberInt":"3347"},{"$numberInt":"3348"},{"$numberInt":"3349"},{"$numberInt":"3350"},{"$numberInt":"3351"},{"$numberInt":"3352"},{"$numberInt":"3353"},{"$numberInt":"3354"},{"$numberInt":"3355"},{"$numberInt":"3356"},{"$numberInt":"3357"},{"$numberInt":"3358"},{"$numberInt":"3359"},{"$numberInt":"3360"},{"$numberInt":"3361"},{"$numberInt":"3362"},{"$numberInt":"3363"},{"$numberInt":"3364"},{"$numberInt":"3365"},{"$numberInt":"3366"},{"$numberInt":"3367"},{"$numberInt":"3368"},{"$numberInt":"3369"},{"$numberInt":"3370"},{"$numberInt":"3371"},{"$numberInt":"3372"},{"$numberInt":"3373"},{"$numberInt":"3374"},{"$numberInt":"3375"},{"$numberInt":"3376"},{"$numberInt":"3377"},{"$numberInt":"3378"},{"$numberInt":"3379"},{"$numberInt":"3380"},{"$numberInt":"3381"},{"$numberInt":"3382"},{"$numberInt":"3383"},{"$numberInt":"3384"},{"$numberInt":"3385"},{"$numberInt":"3386"},{"$numberInt":"3387"},{"$numberInt":"3388"},{"$numberInt":"3389"},{"$numberInt":"3390"},{"$numberInt":"3391"},{"$numberInt":"3392"},{"$numberInt":"3393"},{"$numberInt":"3394"},{"$numberInt":"3395"},{"$numberInt":"3396"},{"$numberInt":"3397"},{"$numberInt":"3398"},{"$numberInt":"3399"},{"$numberInt":"3400"},{"$numberInt":"3401"},{"$numberInt":"3402"},{"$numberInt":"3403"},{"$numberInt":"3404"},{"$numberInt":"3405"},{"$numberInt":"3406"},{"$numberInt":"3407"},{"$numberInt":"3408"},{"$numberInt":"3409"},{"$numberInt":"3410"},{"$numberInt":"3411"},{"$numberInt":"3412"},{"$numberInt":"3413"},{"$numberInt":"3414"},{"$numberInt":"3415"},{"$numberInt":"3416"},{"$numberInt":"3417"},{"$numberInt":"3418"},{"$numberInt":"3419"},{"$numberInt":"3420"},{"$numberInt":"3421"},{"$numberInt":"3422"},{"$numberInt":"3423"},{"$numberInt":"3424"},{"$numberInt":"3425"},{"$numberInt":"3426"},{"$numberInt":"3427"},{"$numberInt":"3428"},{"$numberInt":"3429"},{"$numberInt":"3430"},{"$numberInt":"3431"},{"$numberInt":"3432"},{"$numberInt":"3433"},{"$numberInt":"3434"},{"$numberInt":"3435"},{"$numberInt":"3436"},{"$numberInt":"3437"},{"$numberInt":"3438"},{"$numberInt":"3439"},{"$numberInt":"3440"},{"$numberInt":"3441"},{"$numberInt":"3442"},{"$numberInt":"3443"},{"$numberInt":"3444"},{"$numberInt":"3445"},{"$numberInt":"3446"},{"$numberInt":"3447"},{"$numberInt":"3448"},{"$numberInt":"3449"},{"$numberInt":"3450"},{"$numberInt":"3451"},{"$numberInt":"3452"},{"$numberInt":"3453"},{"$numberInt":"3454"},{"$numberInt":"3455"},{"$numberInt":"3456"},{"$numberInt":"3457"},{"$numberInt":"3458"},{"$numberInt":"3459"},{"$numberInt":"3460"},{"$numberInt":"3461"},{"$numberInt":"3462"},{"$numberInt":"3463"},{"$numberInt":"3464"},{"$numberInt":"3465"},{"$numberInt":"3466"},{"$numberInt":"3467"},{"$numberInt":"3468"},{"$numberInt":"3469"},{"$numberInt":"3470"},{"$numberInt":"3471"},{"$numberInt":"3472"},{"$numberInt":"3473"},{"$numberInt":"3474"},{"$numberInt":"3475"},{"$numberInt":"3476"},{"$numberInt":"3477"},{"$numberInt":"3478"},{"$numberInt":"3479"},{"$numberInt":"3480"},{"$numberInt":"3481"},{"$numberInt":"3482"},{"$numberInt":"3483"},{"$numberInt":"3484"},{"$numberInt":"3485"},{"$numberInt":"3486"},{"$numberInt":"3487"},{"$numberInt":"3488"},{"$numberInt":"3489"},{"$numberInt":"3490"},{"$numberInt":"3491"},{"$numberInt":"3492"},{"$numberInt":"3493"},{"$numberInt":"3494"},{"$numberInt":"3495"},{"$numberInt":"3496"},{"$numberInt":"3497"},{"$numberInt":"3498"},{"$numberInt":"3499"},{"$numberInt":"3500"},{"$numberInt":"3501"},{"$numberInt":"3502"},{"$numberInt":"3503"},{"$numberInt":"3504"},{"$numberInt":"3505"},{"$numberInt":"3506"},{"$numberInt":"3507"},{"$numberInt":"3508"},{"$numberInt":"3509"},{"$numberInt":"3510"},{"$numberInt":"3511"},{"$numberInt":"3512"},{"$numberInt":"3513"},{"$numberInt":"3514"},{"$numberInt":"3515"},{"$numberInt":"3516"},{"$numberInt":"3517"},{"$numberInt":"3518"},{"$numberInt":"3519"},{"$numberInt":"3520"},{"$numberInt":"3521"},{"$numberInt":"3522"},{"$numberInt":"3523"},{"$numberInt":"3524"},{"$numberInt":"3525"},{"$numberInt":"3526"},{"$numberInt":"3527"},{"$numberInt":"3528"},{"$numberInt":"3529"},{"$numberInt":"3530"},{"$numberInt":"3531"},{"$numberInt":"3532"},{"$numberInt":"3533"},{"$numberInt":"3534"},{"$numberInt":"3535"},{"$numberInt":"3536"},{"$numberInt":"3537"},{"$numberInt":"3538"},{"$numberInt":"3539"},{"$numberInt":"3540"},{"$numberInt":"3541"},{"$numberInt":"3542"},{"$numberInt":"3543"},{"$numberInt":"3544"},{"$numberInt":"3545"},{"$numberInt":"3546"},{"$numberInt":"3547"},{"$numberInt":"3548"},{"$numberInt":"3549"},{"$numberInt":"3550"},{"$numberInt":"3551"},{"$numberInt":"3552"},{"$numberInt":"3553"},{"$numberInt":"3554"},{"$numberInt":"3555"},{"$numberInt":"3556"},{"$numberInt":"3557"},{"$numberInt":"3558"},{"$numberInt":"3559"},{"$numberInt":"3560"},{"$numberInt":"3561"},{"$numberInt":"3562"},{"$numberInt":"3563"},{"$numberInt":"3564"},{"$numberInt":"3565"},{"$numberInt":"3566"},{"$numberInt":"3567"},{"$numberInt":"3568"},{"$numberInt":"3569"},{"$numberInt":"3570"},{"$numberInt":"3571"},{"$numberInt":"3572"},{"$numberInt":"3573"},{"$numberInt":"3574"},{"$numberInt":"3575"},{"$numberInt":"3576"},{"$numberInt":"3577"},{"$numberInt":"3578"},{"$numberInt":"3579"},{"$numberInt":"3580"},{"$numberInt":"3581"},{"$numberInt":"3582"},{"$numberInt":"3583"},{"$numberInt":"3584"},{"$numberInt":"3585"},{"$numberInt":"3586"},{"$numberInt":"3587"},{"$numberInt":"3588"},{"$numberInt":"3589"},{"$numberInt":"3590"},{"$numberInt":"3591"},{"$numberInt":"3592"},{"$numberInt":"3593"},{"$numberInt":"3594"},{"$numberInt":"3595"},{"$numberInt":"3596"},{"$numberInt":"3597"},{"$numberInt":"3598"},{"$numberInt":"3599"},{"$numberInt":"3600"},{"$numberInt":"3601"},{"$numberInt":"3602"},{"$numberInt":"3603"},{"$numberInt":"3604"},{"$numberInt":"3605"},{"$numberInt":"3606"},{"$numberInt":"3607"},{"$numberInt":"3608"},{"$numberInt":"3609"},{"$numberInt":"3610"},{"$numberInt":"3611"},{"$numberInt":"3612"},{"$numberInt":"3613"},{"$numberInt":"3614"},{"$numberInt":"3615"},{"$numberInt":"3616"},{"$numberInt":"3617"},{"$numberInt":"3618"},{"$numberInt":"3619"},{"$numberInt":"3620"},{"$numberInt":"3621"},{"$numberInt":"3622"},{"$numberInt":"3623"},{"$numberInt":"3624"},{"$numberInt":"3625"},{"$numberInt":"3626"},{"$numberInt":"3627"},{"$numberInt":"3628"},{"$numberInt":"3629"},{"$numberInt":"3630"},{"$numberInt":"3631"},{"$numberInt":"3632"},{"$numberInt":"3633"},{"$numberInt":"3634"},{"$numberInt":"3635"},{"$numberInt":"3636"},{"$numberInt":"3637"},{"$numberInt":"3638"},{"$numberInt":"3639"},{"$numberInt":"3640"},{"$numberInt":"3641"},{"$numberInt":"3642"},{"$numberInt":"3643"},{"$numberInt":"3644"},{"$numberInt":"3645"},{"$numberInt":"3646"},{"$numberInt":"3647"},{"$numberInt":"3648"},{"$numberInt":"3649"},{"$numberInt":"3650"},{"$numberInt":"3651"},{"$numberInt":"3652"},{"$numberInt":"3653"},{"$numberInt":"3654"},{"$numberInt":"3655"},{"$numberInt":"3656"},{"$numberInt":"3657"},{"$numberInt":"3658"},{"$numberInt":"3659"},{"$numberInt":"3660"},{"$numberInt":"3661"},{"$numberInt":"3662"},{"$numberInt":"3663"},{"$numberInt":"3664"},{"$numberInt":"3665"},{"$numberInt":"3666"},{"$numberInt":"3667"},{"$numberInt":"3668"},{"$numberInt":"3669"},{"$numberInt":"3670"},{"$numberInt":"3671"},{"$numberInt":"3672"},{"$numberInt":"3673"},{"$numberInt":"3674"},{"$numberInt":"3675"},{"$numberInt":"3676"},{"$numberInt":"3677"},{"$numberInt":"3678"},{"$numberInt":"3679"},{"$numberInt":"3680"},{"$numberInt":"3681"},{"$numberInt":"3682"},{"$numberInt":"3683"},{"$numberInt":"3684"},{"$numberInt":"3685"},{"$numberInt":"3686"},{"$numberInt":"3687"},{"$numberInt":"3688"},{"$numberInt":"3689"},{"$numberInt":"3690"},{"$numberInt":"3691"},{"$numberInt":"3692"},{"$numberInt":"3693"},{"$numberInt":"3694"},{"$numberInt":"3695"},{"$numberInt":"3696"},{"$numberInt":"3697"},{"$numberInt":"3698"},{"$numberInt":"3699"},{"$numberInt":"3700"},{"$numberInt":"3701"},{"$numberInt":"3702"},{"$numberInt":"3703"},{"$numberInt":"3704"},{"$numberInt":"3705"},{"$numberInt":"3706"},{"$numberInt":"3707"},{"$numberInt":"3708"},{"$numberInt":"3709"},{"$numberInt":"3710"},{"$numberInt":"3711"},{"$numberInt":"3712"},{"$numberInt":"3713"},{"$numberInt":"3714"},{"$numberInt":"3715"},{"$numberInt":"3716"},{"$numberInt":"3717"},{"$numberInt":"3718"},{"$numberInt":"3719"},{"$numberInt":"3720"},{"$numberInt":"3721"},{"$numberInt":"3722"},{"$numberInt":"3723"},{"$numberInt":"3724"},{"$numberInt":"3725"},{"$numberInt":"3726"},{"$numberInt":"3727"},{"$numberInt":"3728"},{"$numberInt":"3729"},{"$numberInt":"3730"},{"$numberInt":"3731"},{"$numberInt":"3732"},{"$numberInt":"3733"},{"$numberInt":"3734"},{"$numberInt":"3735"},{"$numberInt":"3736"},{"$numberInt":"3737"},{"$numberInt":"3738"},{"$numberInt":"3739"},{"$numberInt":"3740"},{"$numberInt":"3741"},{"$numberInt":"3742"},{"$numberInt":"3743"},{"$numberInt":"3744"},{"$numberInt":"3745"},{"$numberInt":"3746"},{"$numberInt":"3747"},{"$numberInt":"3748"},{"$numberInt":"3749"},{"$numberInt":"3750"},{"$numberInt":"3751"},{"$numberInt":"3752"},{"$numberInt":"3753"},{"$numberInt":"3754"},{"$numberInt":"3755"},{"$numberInt":"3756"},{"$numberInt":"3757"},{"$numberInt":"3758"},{"$numberInt":"3759"},{"$numberInt":"3760"},{"$numberInt":"3761"},{"$numberInt":"3762"},{"$numberInt":"3763"},{"$numberInt":"3764"},{"$numberInt":"3765"},{"$numberInt":"3766"},{"$numberInt":"3767"},{"$numberInt":"3768"},{"$numberInt":"3769"},{"$numberInt":"3770"},{"$numberInt":"3771"},{"$numberInt":"3772"},{"$numberInt":"3773"},{"$numberInt":"3774"},{"$numberInt":"3775"},{"$numberInt":"3776"},{"$numberInt":"3777"},{"$numberInt":"3778"},{"$numberInt":"3779"},{"$numberInt":"3780"},{"$numberInt":"3781"},{"$numberInt":"3782"},{"$numberInt":"3783"},{"$numberInt":"3784"},{"$numberInt":"3785"},{"$numberInt":"3786"},{"$numberInt":"3787"},{"$numberInt":"3788"},{"$numberInt":"3789"},{"$numberInt":"3790"},{"$numberInt":"3791"},{"$numberInt":"3792"},{"$numberInt":"3793"},{"$numberInt":"3794"},{"$numberInt":"3795"},{"$numberInt":"3796"},{"$numberInt":"3797"},{"$numberInt":"3798"},{"$numberInt":"3799"},{"$numberInt":"3800"},{"$numberInt":"3801"},{"$numberInt":"3802"},{"$numberInt":"3803"},{"$numberInt":"3804"},{"$numberInt":"3805"},{"$numberInt":"3806"},{"$numberInt":"3807"},{"$numberInt":"3808"},{"$numberInt":"3809"},{"$numberInt":"3810"},{"$numberInt":"3811"},{"$numberInt":"3812"},{"$numberInt":"3813"},{"$numberInt":"3814"},{"$numberInt":"3815"},{"$numberInt":"3816"},{"$numberInt":"3817"},{"$numberInt":"3818"},{"$numberInt":"3819"},{"$numberInt":"3820"},{"$numberInt":"3821"},{"$numberInt":"3822"},{"$numberInt":"3823"},{"$numberInt":"3824"},{"$numberInt":"3825"},{"$numberInt":"3826"},{"$numberInt":"3827"},{"$numberInt":"3828"},{"$numberInt":"3829"},{"$numberInt":"3830"},{"$numberInt":"3831"},{"$numberInt":"3832"},{"$numberInt":"3833"},{"$numberInt":"3834"},{"$numberInt":"3835"},{"$numberInt":"3836"},{"$numberInt":"3837"},{"$numberInt":"3838"},{"$numberInt":"3839"},{"$numberInt":"3840"},{"$numberInt":"3841"},{"$numberInt":"3842"},{"$numberInt":"3843"},{"$numberInt":"3844"},{"$numberInt":"3845"},{"$numberInt":"3846"},{"$numberInt":"3847"},{"$numberInt":"3848"},{"$numberInt":"3849"},{"$numberInt":"3850"},{"$numberInt":"3851"},{"$numberInt":"3852"},{"$numberInt":"3853"},{"$numberInt":"3854"},{"$numberInt":"3855"},{"$numberInt":"3856"},{"$numberInt":"3857"},{"$numberInt":"3858"},{"$numberInt":"3859"},{"$numberInt":"3860"},{"$numberInt":"3861"},{"$numberInt":"3862"},{"$numberInt":"3863"},{"$numberInt":"3864"},{"$numberInt":"3865"},{"$numberInt":"3866"},{"$numberInt":"3867"},{"$numberInt":"3868"},{"$numberInt":"3869"},{"$numberInt":"3870"},{"$numberInt":"3871"},{"$numberInt":"3872"},{"$numberInt":"3873"},{"$numberInt":"3874"},{"$numberInt":"3875"},{"$numberInt":"3876"},{"$numberInt":"3877"},{"$numberInt":"3878"},{"$numberInt":"3879"},{"$numberInt":"3880"},{"$numberInt":"3881"},{"$numberInt":"3882"},{"$numberInt":"3883"},{"$numberInt":"3884"},{"$numberInt":"3885"},{"$numberInt":"3886"},{"$numberInt":"3887"},{"$numberInt":"3888"},{"$numberInt":"3889"},{"$numberInt":"3890"},{"$numberInt":"3891"},{"$numberInt":"3892"},{"$numberInt":"3893"},{"$numberInt":"3894"},{"$numberInt":"3895"},{"$numberInt":"3896"},{"$numberInt":"3897"},{"$numberInt":"3898"},{"$numberInt":"3899"},{"$numberInt":"3900"},{"$numberInt":"3901"},{"$numberInt":"3902"},{"$numberInt":"3903"},{"$numberInt":"3904"},{"$numberInt":"3905"},{"$numberInt":"3906"},{"$numberInt":"3907"},{"$numberInt":"3908"},{"$numberInt":"3909"},{"$numberInt":"3910"},{"$numberInt":"3911"},{"$numberInt":"3912"},{"$numberInt":"3913"},{"$numberInt":"3914"},{"$numberInt":"3915"},{"$numberInt":"3916"},{"$numberInt":"3917"},{"$numberInt":"3918"},{"$numberInt":"3919"},{"$numberInt":"3920"},{"$numberInt":"3921"},{"$numberInt":"3922"},{"$numberInt":"3923"},{"$numberInt":"3924"},{"$numberInt":"3925"},{"$numberInt":"3926"},{"$numberInt":"3927"},{"$numberInt":"3928"},{"$numberInt":"3929"},{"$numberInt":"3930"},{"$numberInt":"3931"},{"$numberInt":"3932"},{"$numberInt":"3933"},{"$numberInt":"3934"},{"$numberInt":"3935"},{"$numberInt":"3936"},{"$numberInt":"3937"},{"$numberInt":"3938"},{"$numberInt":"3939"},{"$numberInt":"3940"},{"$numberInt":"3941"},{"$numberInt":"3942"},{"$numberInt":"3943"},{"$numberInt":"3944"},{"$numberInt":"3945"},{"$numberInt":"3946"},{"$numberInt":"3947"},{"$numberInt":"3948"},{"$numberInt":"3949"},{"$numberInt":"3950"},{"$numberInt":"3951"},{"$numberInt":"3952"},{"$numberInt":"3953"},{"$numberInt":"3954"},{"$numberInt":"3955"},{"$numberInt":"3956"},{"$numberInt":"3957"},{"$numberInt":"3958"},{"$numberInt":"3959"},{"$numberInt":"3960"},{"$numberInt":"3961"},{"$numberInt":"3962"},{"$numberInt":"3963"},{"$numberInt":"3964"},{"$numberInt":"3965"},{"$numberInt":"3966"},{"$numberInt":"3967"},{"$numberInt":"3968"},{"$numberInt":"3969"},{"$numberInt":"3970"},{"$numberInt":"3971"},{"$numberInt":"3972"},{"$numberInt":"3973"},{"$numberInt":"3974"},{"$numberInt":"3975"},{"$numberInt":"3976"},{"$numberInt":"3977"},{"$numberInt":"3978"},{"$numberInt":"3979"},{"$numberInt":"3980"},{"$numberInt":"3981"},{"$numberInt":"3982"},{"$numberInt":"3983"},{"$numberInt":"3984"},{"$numberInt":"3985"},{"$numberInt":"3986"},{"$numberInt":"3987"},{"$numberInt":"3988"},{"$numberInt":"3989"},{"$numberInt":"3990"},{"$numberInt":"3991"},{"$numberInt":"3992"},{"$numberInt":"3993"},{"$numberInt":"3994"},{"$numberInt":"3995"},{"$numberInt":"3996"},{"$numberInt":"3997"},{"$numberInt":"3998"},{"$numberInt":"3999"},{"$numberInt":"4000"},{"$numberInt":"4001"},{"$numberInt":"4002"},{"$numberInt":"4003"},{"$numberInt":"4004"},{"$numberInt":"4005"},{"$numberInt":"4006"},{"$numberInt":"4007"},{"$numberInt":"4008"},{"$numberInt":"4009"},{"$numberInt":"4010"},{"$numberInt":"4011"},{"$numberInt":"4012"},{"$numberInt":"4013"},{"$numberInt":"4014"},{"$numberInt":"4015"},{"$numberInt":"4016"},{"$numberInt":"4017"},{"$numberInt":"4018"},{"$numberInt":"4019"},{"$numberInt":"4020"},{"$numberInt":"4021"},{"$numberInt":"4022"},{"$numberInt":"4023"},{"$numberInt":"4024"},{"$numberInt":"4025"},{"$numberInt":"4026"},{"$numberInt":"4027"},{"$numberInt":"4028"},{"$numberInt":"4029"},{"$numberInt":"4030"},{"$numberInt":"4031"},{"$numberInt":"4032"},{"$numberInt":"4033"},{"$numberInt":"4034"},{"$numberInt":"4035"},{"$numberInt":"4036"},{"$numberInt":"4037"},{"$numberInt":"4038"},{"$numberInt":"4039"},{"$numberInt":"4040"},{"$numberInt":"4041"},{"$numberInt":"4042"},{"$numberInt":"4043"},{"$numberInt":"4044"},{"$numberInt":"4045"},{"$numberInt":"4046"},{"$numberInt":"4047"},{"$numberInt":"4048"},{"$numberInt":"4049"},{"$numberInt":"4050"},{"$numberInt":"4051"},{"$numberInt":"4052"},{"$numberInt":"4053"},{"$numberInt":"4054"},{"$numberInt":"4055"},{"$numberInt":"4056"},{"$numberInt":"4057"},{"$numberInt":"4058"},{"$numberInt":"4059"},{"$numberInt":"4060"},{"$numberInt":"4061"},{"$numberInt":"4062"},{"$numberInt":"4063"},{"$numberInt":"4064"},{"$numberInt":"4065"},{"$numberInt":"4066"},{"$numberInt":"4067"},{"$numberInt":"4068"},{"$numberInt":"4069"},{"$numberInt":"4070"},{"$numberInt":"4071"},{"$numberInt":"4072"},{"$numberInt":"4073"},{"$numberInt":"4074"},{"$numberInt":"4075"},{"$numberInt":"4076"},{"$numberInt":"4077"},{"$numberInt":"4078"},{"$numberInt":"4079"},{"$numberInt":"4080"},{"$numberInt":"4081"},{"$numberInt":"4082"},{"$numberInt":"4083"},{"$numberInt":"4084"},{"$numberInt":"4085"},{"$numberInt":"4086"},{"$numberInt":"4087"},{"$numberInt":"4088"},{"$numberInt":"4089"},{"$numberInt":"4090"},{"$numberInt":"4091"},{"$numberInt":"4092"},{"$numberInt":"4093"},{"$numberInt":"4094"},{"$numberInt":"4095"},{"$numberInt":"4096"},{"$numberInt":"4097"},{"$numberInt":"4098"},{"$numberInt":"4099"},{"$numberInt":"4100"},{"$numberInt":"4101"},{"$numberInt":"4102"},{"$numberInt":"4103"},{"$numberInt":"4104"},{"$numberInt":"4105"},{"$numberInt":"4106"},{"$numberInt":"4107"},{"$numberInt":"4108"},{"$numberInt":"4109"},{"$numberInt":"4110"},{"$numberInt":"4111"},{"$numberInt":"4112"},{"$numberInt":"4113"},{"$numberInt":"4114"},{"$numberInt":"4115"},{"$numberInt":"4116"},{"$numberInt":"4117"},{"$numberInt":"4118"},{"$numberInt":"4119"},{"$numberInt":"4120"},{"$numberInt":"4121"},{"$numberInt":"4122"},{"$numberInt":"4123"},{"$numberInt":"4124"},{"$numberInt":"4125"},{"$numberInt":"4126"},{"$numberInt":"4127"},{"$numberInt":"4128"},{"$numberInt":"4129"},{"$numberInt":"4130"},{"$numberInt":"4131"},{"$numberInt":"4132"},{"$numberInt":"4133"},{"$numberInt":"4134"},{"$numberInt":"4135"},{"$numberInt":"4136"},{"$numberInt":"4137"},{"$numberInt":"4138"},{"$numberInt":"4139"},{"$numberInt":"4140"},{"$numberInt":"4141"},{"$numberInt":"4142"},{"$numberInt":"4143"},{"$numberInt":"4144"},{"$numberInt":"4145"},{"$numberInt":"4146"},{"$numberInt":"4147"},{"$numberInt":"4148"},{"$numberInt":"4149"},{"$numberInt":"4150"},{"$numberInt":"4151"},{"$numberInt":"4152"},{"$numberInt":"4153"},{"$numberInt":"4154"},{"$numberInt":"4155"},{"$numberInt":"4156"},{"$numberInt":"4157"},{"$numberInt":"4158"},{"$numberInt":"4159"},{"$numberInt":"4160"},{"$numberInt":"4161"},{"$numberInt":"4162"},{"$numberInt":"4163"},{"$numberInt":"4164"},{"$numberInt":"4165"},{"$numberInt":"4166"},{"$numberInt":"4167"},{"$numberInt":"4168"},{"$numberInt":"4169"},{"$numberInt":"4170"},{"$numberInt":"4171"},{"$numberInt":"4172"},{"$numberInt":"4173"},{"$numberInt":"4174"},{"$numberInt":"4175"},{"$numberInt":"4176"},{"$numberInt":"4177"},{"$numberInt":"4178"},{"$numberInt":"4179"},{"$numberInt":"4180"},{"$numberInt":"4181"},{"$numberInt":"4182"},{"$numberInt":"4183"},{"$numberInt":"4184"},{"$numberInt":"4185"},{"$numberInt":"4186"},{"$numberInt":"4187"},{"$numberInt":"4188"},{"$numberInt":"4189"},{"$numberInt":"4190"},{"$numberInt":"4191"},{"$numberInt":"4192"},{"$numberInt":"4193"},{"$numberInt":"4194"},{"$numberInt":"4195"},{"$numberInt":"4196"},{"$numberInt":"4197"},{"$numberInt":"4198"},{"$numberInt":"4199"},{"$numberInt":"4200"},{"$numberInt":"4201"},{"$numberInt":"4202"},{"$numberInt":"4203"},{"$numberInt":"4204"},{"$numberInt":"4205"},{"$numberInt":"4206"},{"$numberInt":"4207"},{"$numberInt":"4208"},{"$numberInt":"4209"},{"$numberInt":"4210"},{"$numberInt":"4211"},{"$numberInt":"4212"},{"$numberInt":"4213"},{"$numberInt":"4214"},{"$numberInt":"4215"},{"$numberInt":"4216"},{"$numberInt":"4217"},{"$numberInt":"4218"},{"$numberInt":"4219"},{"$numberInt":"4220"},{"$numberInt":"4221"},{"$numberInt":"4222"},{"$numberInt":"4223"},{"$numberInt":"4224"},{"$numberInt":"4225"},{"$numberInt":"4226"},{"$numberInt":"4227"},{"$numberInt":"4228"},{"$numberInt":"4229"},{"$numberInt":"4230"},{"$numberInt":"4231"},{"$numberInt":"4232"},{"$numberInt":"4233"},{"$numberInt":"4234"},{"$numberInt":"4235"},{"$numberInt":"4236"},{"$numberInt":"4237"},{"$numberInt":"4238"},{"$numberInt":"4239"},{"$numberInt":"4240"},{"$numberInt":"4241"},{"$numberInt":"4242"},{"$numberInt":"4243"},{"$numberInt":"4244"},{"$numberInt":"4245"},{"$numberInt":"4246"},{"$numberInt":"4247"},{"$numberInt":"4248"},{"$numberInt":"4249"},{"$numberInt":"4250"},{"$numberInt":"4251"},{"$numberInt":"4252"},{"$numberInt":"4253"},{"$numberInt":"4254"},{"$numberInt":"4255"},{"$numberInt":"4256"},{"$numberInt":"4257"},{"$numberInt":"4258"},{"$numberInt":"4259"},{"$numberInt":"4260"},{"$numberInt":"4261"},{"$numberInt":"4262"},{"$numberInt":"4263"},{"$numberInt":"4264"},{"$numberInt":"4265"},{"$numberInt":"4266"},{"$numberInt":"4267"},{"$numberInt":"4268"},{"$numberInt":"4269"},{"$numberInt":"4270"},{"$numberInt":"4271"},{"$numberInt":"4272"},{"$numberInt":"4273"},{"$numberInt":"4274"},{"$numberInt":"4275"},{"$numberInt":"4276"},{"$numberInt":"4277"},{"$numberInt":"4278"},{"$numberInt":"4279"},{"$numberInt":"4280"},{"$numberInt":"4281"},{"$numberInt":"4282"},{"$numberInt":"4283"},{"$numberInt":"4284"},{"$numberInt":"4285"},{"$numberInt":"4286"},{"$numberInt":"4287"},{"$numberInt":"4288"},{"$numberInt":"4289"},{"$numberInt":"4290"},{"$numberInt":"4291"},{"$numberInt":"4292"},{"$numberInt":"4293"},{"$numberInt":"4294"},{"$numberInt":"4295"},{"$numberInt":"4296"},{"$numberInt":"4297"},{"$numberInt":"4298"},{"$numberInt":"4299"},{"$numberInt":"4300"},{"$numberInt":"4301"},{"$numberInt":"4302"},{"$numberInt":"4303"},{"$numberInt":"4304"},{"$numberInt":"4305"},{"$numberInt":"4306"},{"$numberInt":"4307"},{"$numberInt":"4308"},{"$numberInt":"4309"},{"$numberInt":"4310"},{"$numberInt":"4311"},{"$numberInt":"4312"},{"$numberInt":"4313"},{"$numberInt":"4314"},{"$numberInt":"4315"},{"$numberInt":"4316"},{"$numberInt":"4317"},{"$numberInt":"4318"},{"$numberInt":"4319"},{"$numberInt":"4320"},{"$numberInt":"4321"},{"$numberInt":"4322"},{"$numberInt":"4323"},{"$numberInt":"4324"},{"$numberInt":"4325"},{"$numberInt":"4326"},{"$numberInt":"4327"},{"$numberInt":"4328"},{"$numberInt":"4329"},{"$numberInt":"4330"},{"$numberInt":"4331"},{"$numberInt":"4332"},{"$numberInt":"4333"},{"$numberInt":"4334"},{"$numberInt":"4335"},{"$numberInt":"4336"},{"$numberInt":"4337"},{"$numberInt":"4338"},{"$numberInt":"4339"},{"$numberInt":"4340"},{"$numberInt":"4341"},{"$numberInt":"4342"},{"$numberInt":"4343"},{"$numberInt":"4344"},{"$numberInt":"4345"},{"$numberInt":"4346"},{"$numberInt":"4347"},{"$numberInt":"4348"},{"$numberInt":"4349"},{"$numberInt":"4350"},{"$numberInt":"4351"},{"$numberInt":"4352"},{"$numberInt":"4353"},{"$numberInt":"4354"},{"$numberInt":"4355"},{"$numberInt":"4356"},{"$numberInt":"4357"},{"$numberInt":"4358"},{"$numberInt":"4359"},{"$numberInt":"4360"},{"$numberInt":"4361"},{"$numberInt":"4362"},{"$numberInt":"4363"},{"$numberInt":"4364"},{"$numberInt":"4365"},{"$numberInt":"4366"},{"$numberInt":"4367"},{"$numberInt":"4368"},{"$numberInt":"4369"},{"$numberInt":"4370"},{"$numberInt":"4371"},{"$numberInt":"4372"},{"$numberInt":"4373"},{"$numberInt":"4374"},{"$numberInt":"4375"},{"$numberInt":"4376"},{"$numberInt":"4377"},{"$numberInt":"4378"},{"$numberInt":"4379"},{"$numberInt":"4380"},{"$numberInt":"4381"},{"$numberInt":"4382"},{"$numberInt":"4383"},{"$numberInt":"4384"},{"$numberInt":"4385"},{"$numberInt":"4386"},{"$numberInt":"4387"},{"$numberInt":"4388"},{"$numberInt":"4389"},{"$numberInt":"4390"},{"$numberInt":"4391"},{"$numberInt":"4392"},{"$numberInt":"4393"},{"$numberInt":"4394"},{"$numberInt":"4395"},{"$numberInt":"4396"},{"$numberInt":"4397"},{"$numberInt":"4398"},{"$numberInt":"4399"},{"$numberInt":"4400"},{"$numberInt":"4401"},{"$numberInt":"4402"},{"$numberInt":"4403"},{"$numberInt":"4404"},{"$numberInt":"4405"},{"$numberInt":"4406"},{"$numberInt":"4407"},{"$numberInt":"4408"},{"$numberInt":"4409"},{"$numberInt":"4410"},{"$numberInt":"4411"},{"$numberInt":"4412"},{"$numberInt":"4413"},{"$numberInt":"4414"},{"$numberInt":"4415"},{"$numberInt":"4416"},{"$numberInt":"4417"},{"$numberInt":"4418"},{"$numberInt":"4419"},{"$numberInt":"4420"},{"$numberInt":"4421"},{"$numberInt":"4422"},{"$numberInt":"4423"},{"$numberInt":"4424"},{"$numberInt":"4425"},{"$numberInt":"4426"},{"$numberInt":"4427"},{"$numberInt":"4428"},{"$numberInt":"4429"},{"$numberInt":"4430"},{"$numberInt":"4431"},{"$numberInt":"4432"},{"$numberInt":"4433"},{"$numberInt":"4434"},{"$numberInt":"4435"},{"$numberInt":"4436"},{"$numberInt":"4437"},{"$numberInt":"4438"},{"$numberInt":"4439"},{"$numberInt":"4440"},{"$numberInt":"4441"},{"$numberInt":"4442"},{"$numberInt":"4443"},{"$numberInt":"4444"},{"$numberInt":"4445"},{"$numberInt":"4446"},{"$numberInt":"4447"},{"$numberInt":"4448"},{"$numberInt":"4449"},{"$numberInt":"4450"},{"$numberInt":"4451"},{"$numberInt":"4452"},{"$numberInt":"4453"},{"$numberInt":"4454"},{"$numberInt":"4455"},{"$numberInt":"4456"},{"$numberInt":"4457"},{"$numberInt":"4458"},{"$numberInt":"4459"},{"$numberInt":"4460"},{"$numberInt":"4461"},{"$numberInt":"4462"},{"$numberInt":"4463"},{"$numberInt":"4464"},{"$numberInt":"4465"},{"$numberInt":"4466"},{"$numberInt":"4467"},{"$numberInt":"4468"},{"$numberInt":"4469"},{"$numberInt":"4470"},{"$numberInt":"4471"},{"$numberInt":"4472"},{"$numberInt":"4473"},{"$numberInt":"4474"},{"$numberInt":"4475"},{"$numberInt":"4476"},{"$numberInt":"4477"},{"$numberInt":"4478"},{"$numberInt":"4479"},{"$numberInt":"4480"},{"$numberInt":"4481"},{"$numberInt":"4482"},{"$numberInt":"4483"},{"$numberInt":"4484"},{"$numberInt":"4485"},{"$numberInt":"4486"},{"$numberInt":"4487"},{"$numberInt":"4488"},{"$numberInt":"4489"},{"$numberInt":"4490"},{"$numberInt":"4491"},{"$numberInt":"4492"},{"$numberInt":"4493"},{"$numberInt":"4494"},{"$numberInt":"4495"},{"$numberInt":"4496"},{"$numberInt":"4497"},{"$numberInt":"4498"},{"$numberInt":"4499"},{"$numberInt":"4500"},{"$numberInt":"4501"},{"$numberInt":"4502"},{"$numberInt":"4503"},{"$numberInt":"4504"},{"$numberInt":"4505"},{"$numberInt":"4506"},{"$numberInt":"4507"},{"$numberInt":"4508"},{"$numberInt":"4509"},{"$numberInt":"4510"},{"$numberInt":"4511"},{"$numberInt":"4512"},{"$numberInt":"4513"},{"$numberInt":"4514"},{"$numberInt":"4515"},{"$numberInt":"4516"},{"$numberInt":"4517"},{"$numberInt":"4518"},{"$numberInt":"4519"},{"$numberInt":"4520"},{"$numberInt":"4521"},{"$numberInt":"4522"},{"$numberInt":"4523"},{"$numberInt":"4524"},{"$numberInt":"4525"},{"$numberInt":"4526"},{"$numberInt":"4527"},{"$numberInt":"4528"},{"$numberInt":"4529"},{"$numberInt":"4530"},{"$numberInt":"4531"},{"$numberInt":"4532"},{"$numberInt":"4533"},{"$numberInt":"4534"},{"$numberInt":"4535"},{"$numberInt":"4536"},{"$numberInt":"4537"},{"$numberInt":"4538"},{"$numberInt":"4539"},{"$numberInt":"4540"},{"$numberInt":"4541"},{"$numberInt":"4542"},{"$numberInt":"4543"},{"$numberInt":"4544"},{"$numberInt":"4545"},{"$numberInt":"4546"},{"$numberInt":"4547"},{"$numberInt":"4548"},{"$numberInt":"4549"},{"$numberInt":"4550"},{"$numberInt":"4551"},{"$numberInt":"4552"},{"$numberInt":"4553"},{"$numberInt":"4554"},{"$numberInt":"4555"},{"$numberInt":"4556"},{"$numberInt":"4557"},{"$numberInt":"4558"},{"$numberInt":"4559"},{"$numberInt":"4560"},{"$numberInt":"4561"},{"$numberInt":"4562"},{"$numberInt":"4563"},{"$numberInt":"4564"},{"$numberInt":"4565"},{"$numberInt":"4566"},{"$numberInt":"4567"},{"$numberInt":"4568"},{"$numberInt":"4569"},{"$numberInt":"4570"},{"$numberInt":"4571"},{"$numberInt":"4572"},{"$numberInt":"4573"},{"$numberInt":"4574"},{"$numberInt":"4575"},{"$numberInt":"4576"},{"$numberInt":"4577"},{"$numberInt":"4578"},{"$numberInt":"4579"},{"$numberInt":"4580"},{"$numberInt":"4581"},{"$numberInt":"4582"},{"$numberInt":"4583"},{"$numberInt":"4584"},{"$numberInt":"4585"},{"$numberInt":"4586"},{"$numberInt":"4587"},{"$numberInt":"4588"},{"$numberInt":"4589"},{"$numberInt":"4590"},{"$numberInt":"4591"},{"$numberInt":"4592"},{"$numberInt":"4593"},{"$numberInt":"4594"},{"$numberInt":"4595"},{"$numberInt":"4596"},{"$numberInt":"4597"},{"$numberInt":"4598"},{"$numberInt":"4599"},{"$numberInt":"4600"},{"$numberInt":"4601"},{"$numberInt":"4602"},{"$numberInt":"4603"},{"$numberInt":"4604"},{"$numberInt":"4605"},{"$numberInt":"4606"},{"$numberInt":"4607"},{"$numberInt":"4608"},{"$numberInt":"4609"},{"$numberInt":"4610"},{"$numberInt":"4611"},{"$numberInt":"4612"},{"$numberInt":"4613"},{"$numberInt":"4614"},{"$numberInt":"4615"},{"$numberInt":"4616"},{"$numberInt":"4617"},{"$numberInt":"4618"},{"$numberInt":"4619"},{"$numberInt":"4620"},{"$numberInt":"4621"},{"$numberInt":"4622"},{"$numberInt":"4623"},{"$numberInt":"4624"},{"$numberInt":"4625"},{"$numberInt":"4626"},{"$numberInt":"4627"},{"$numberInt":"4628"},{"$numberInt":"4629"},{"$numberInt":"4630"},{"$numberInt":"4631"},{"$numberInt":"4632"},{"$numberInt":"4633"},{"$numberInt":"4634"},{"$numberInt":"4635"},{"$numberInt":"4636"},{"$numberInt":"4637"},{"$numberInt":"4638"},{"$numberInt":"4639"},{"$numberInt":"4640"},{"$numberInt":"4641"},{"$numberInt":"4642"},{"$numberInt":"4643"},{"$numberInt":"4644"},{"$numberInt":"4645"},{"$numberInt":"4646"},{"$numberInt":"4647"},{"$numberInt":"4648"},{"$numberInt":"4649"},{"$numberInt":"4650"},{"$numberInt":"4651"},{"$numberInt":"4652"},{"$numberInt":"4653"},{"$numberInt":"4654"},{"$numberInt":"4655"},{"$numberInt":"4656"},{"$numberInt":"4657"},{"$numberInt":"4658"},{"$numberInt":"4659"},{"$numberInt":"4660"},{"$numberInt":"4661"},{"$numberInt":"4662"},{"$numberInt":"4663"},{"$numberInt":"4664"},{"$numberInt":"4665"},{"$numberInt":"4666"},{"$numberInt":"4667"},{"$numberInt":"4668"},{"$numberInt":"4669"},{"$numberInt":"4670"},{"$numberInt":"4671"},{"$numberInt":"4672"},{"$numberInt":"4673"},{"$numberInt":"4674"},{"$numberInt":"4675"},{"$numberInt":"4676"},{"$numberInt":"4677"},{"$numberInt":"4678"},{"$numberInt":"4679"},{"$numberInt":"4680"},{"$numberInt":"4681"},{"$numberInt":"4682"},{"$numberInt":"4683"},{"$numberInt":"4684"},{"$numberInt":"4685"},{"$numberInt":"4686"},{"$numberInt":"4687"},{"$numberInt":"4688"},{"$numberInt":"4689"},{"$numberInt":"4690"},{"$numberInt":"4691"},{"$numberInt":"4692"},{"$numberInt":"4693"},{"$numberInt":"4694"},{"$numberInt":"4695"},{"$numberInt":"4696"},{"$numberInt":"4697"},{"$numberInt":"4698"},{"$numberInt":"4699"},{"$numberInt":"4700"},{"$numberInt":"4701"},{"$numberInt":"4702"},{"$numberInt":"4703"},{"$numberInt":"4704"},{"$numberInt":"4705"},{"$numberInt":"4706"},{"$numberInt":"4707"},{"$numberInt":"4708"},{"$numberInt":"4709"},{"$numberInt":"4710"},{"$numberInt":"4711"},{"$numberInt":"4712"},{"$numberInt":"4713"},{"$numberInt":"4714"},{"$numberInt":"4715"},{"$numberInt":"4716"},{"$numberInt":"4717"},{"$numberInt":"4718"},{"$numberInt":"4719"},{"$numberInt":"4720"},{"$numberInt":"4721"},{"$numberInt":"4722"},{"$numberInt":"4723"},{"$numberInt":"4724"},{"$numberInt":"4725"},{"$numberInt":"4726"},{"$numberInt":"4727"},{"$numberInt":"4728"},{"$numberInt":"4729"},{"$numberInt":"4730"},{"$numberInt":"4731"},{"$numberInt":"4732"},{"$numberInt":"4733"},{"$numberInt":"4734"},{"$numberInt":"4735"},{"$numberInt":"4736"},{"$numberInt":"4737"},{"$numberInt":"4738"},{"$numberInt":"4739"},{"$numberInt":"4740"},{"$numberInt":"4741"},{"$numberInt":"4742"},{"$numberInt":"4743"},{"$numberInt":"4744"},{"$numberInt":"4745"},{"$numberInt":"4746"},{"$numberInt":"4747"},{"$numberInt":"4748"},{"$numberInt":"4749"},{"$numberInt":"4750"},{"$numberInt":"4751"},{"$numberInt":"4752"},{"$numberInt":"4753"},{"$numberInt":"4754"},{"$numberInt":"4755"},{"$numberInt":"4756"},{"$numberInt":"4757"},{"$numberInt":"4758"},{"$numberInt":"4759"},{"$numberInt":"4760"},{"$numberInt":"4761"},{"$numberInt":"4762"},{"$numberInt":"4763"},{"$numberInt":"4764"},{"$numberInt":"4765"},{"$numberInt":"4766"},{"$numberInt":"4767"},{"$numberInt":"4768"},{"$numberInt":"4769"},{"$numberInt":"4770"},{"$numberInt":"4771"},{"$numberInt":"4772"},{"$numberInt":"4773"},{"$numberInt":"4774"},{"$numberInt":"4775"},{"$numberInt":"4776"},{"$numberInt":"4777"},{"$numberInt":"4778"},{"$numberInt":"4779"},{"$numberInt":"4780"},{"$numberInt":"4781"},{"$numberInt":"4782"},{"$numberInt":"4783"},{"$numberInt":"4784"},{"$numberInt":"4785"},{"$numberInt":"4786"},{"$numberInt":"4787"},{"$numberInt":"4788"},{"$numberInt":"4789"},{"$numberInt":"4790"},{"$numberInt":"4791"},{"$numberInt":"4792"},{"$numberInt":"4793"},{"$numberInt":"4794"},{"$numberInt":"4795"},{"$numberInt":"4796"},{"$numberInt":"4797"},{"$numberInt":"4798"},{"$numberInt":"4799"},{"$numberInt":"4800"},{"$numberInt":"4801"},{"$numberInt":"4802"},{"$numberInt":"4803"},{"$numberInt":"4804"},{"$numberInt":"4805"},{"$numberInt":"4806"},{"$numberInt":"4807"},{"$numberInt":"4808"},{"$numberInt":"4809"},{"$numberInt":"4810"},{"$numberInt":"4811"},{"$numberInt":"4812"},{"$numberInt":"4813"},{"$numberInt":"4814"},{"$numberInt":"4815"},{"$numberInt":"4816"},{"$numberInt":"4817"},{"$numberInt":"4818"},{"$numberInt":"4819"},{"$numberInt":"4820"},{"$numberInt":"4821"},{"$numberInt":"4822"},{"$numberInt":"4823"},{"$numberInt":"4824"},{"$numberInt":"4825"},{"$numberInt":"4826"},{"$numberInt":"4827"},{"$numberInt":"4828"},{"$numberInt":"4829"},{"$numberInt":"4830"},{"$numberInt":"4831"},{"$numberInt":"4832"},{"$numberInt":"4833"},{"$numberInt":"4834"},{"$numberInt":"4835"},{"$numberInt":"4836"},{"$numberInt":"4837"},{"$numberInt":"4838"},{"$numberInt":"4839"},{"$numberInt":"4840"},{"$numberInt":"4841"},{"$numberInt":"4842"},{"$numberInt":"4843"},{"$numberInt":"4844"},{"$numberInt":"4845"},{"$numberInt":"4846"},{"$numberInt":"4847"},{"$numberInt":"4848"},{"$numberInt":"4849"},{"$numberInt":"4850"},{"$numberInt":"4851"},{"$numberInt":"4852"},{"$numberInt":"4853"},{"$numberInt":"4854"},{"$numberInt":"4855"},{"$numberInt":"4856"},{"$numberInt":"4857"},{"$numberInt":"4858"},{"$numberInt":"4859"},{"$numberInt":"4860"},{"$numberInt":"4861"},{"$numberInt":"4862"},{"$numberInt":"4863"},{"$numberInt":"4864"},{"$numberInt":"4865"},{"$numberInt":"4866"},{"$numberInt":"4867"},{"$numberInt":"4868"},{"$numberInt":"4869"},{"$numberInt":"4870"},{"$numberInt":"4871"},{"$numberInt":"4872"},{"$numberInt":"4873"},{"$numberInt":"4874"},{"$numberInt":"4875"},{"$numberInt":"4876"},{"$numberInt":"4877"},{"$numberInt":"4878"},{"$numberInt":"4879"},{"$numberInt":"4880"},{"$numberInt":"4881"},{"$numberInt":"4882"},{"$numberInt":"4883"},{"$numberInt":"4884"},{"$numberInt":"4885"},{"$numberInt":"4886"},{"$numberInt":"4887"},{"$numberInt":"4888"},{"$numberInt":"4889"},{"$numberInt":"4890"},{"$numberInt":"4891"},{"$numberInt":"4892"},{"$numberInt":"4893"},{"$numberInt":"4894"},{"$numberInt":"4895"},{"$numberInt":"4896"},{"$numberInt":"4897"},{"$numberInt":"4898"},{"$numberInt":"4899"},{"$numberInt":"4900"},{"$numberInt":"4901"},{"$numberInt":"4902"},{"$numberInt":"4903"},{"$numberInt":"4904"},{"$numberInt":"4905"},{"$numberInt":"4906"},{"$numberInt":"4907"},{"$numberInt":"4908"},{"$numberInt":"4909"},{"$numberInt":"4910"},{"$numberInt":"4911"},{"$numberInt":"4912"},{"$numberInt":"4913"},{"$numberInt":"4914"},{"$numberInt":"4915"},{"$numberInt":"4916"},{"$numberInt":"4917"},{"$numberInt":"4918"},{"$numberInt":"4919"},{"$numberInt":"4920"},{"$numberInt":"4921"},{"$numberInt":"4922"},{"$numberInt":"4923"},{"$numberInt":"4924"},{"$numberInt":"4925"},{"$numberInt":"4926"},{"$numberInt":"4927"},{"$numberInt":"4928"},{"$numberInt":"4929"},{"$numberInt":"4930"},{"$numberInt":"4931"},{"$numberInt":"4932"},{"$numberInt":"4933"},{"$numberInt":"4934"},{"$numberInt":"4935"},{"$numberInt":"4936"},{"$numberInt":"4937"},{"$numberInt":"4938"},{"$numberInt":"4939"},{"$numberInt":"4940"},{"$numberInt":"4941"},{"$numberInt":"4942"},{"$numberInt":"4943"},{"$numberInt":"4944"},{"$numberInt":"4945"},{"$numberInt":"4946"},{"$numberInt":"4947"},{"$numberInt":"4948"},{"$numberInt":"4949"},{"$numberInt":"4950"},{"$numberInt":"4951"},{"$numberInt":"4952"},{"$numberInt":"4953"},{"$numberInt":"4954"},{"$numberInt":"4955"},{"$numberInt":"4956"},{"$numberInt":"4957"},{"$numberInt":"4958"},{"$numberInt":"4959"},{"$numberInt":"4960"},{"$numberInt":"4961"},{"$numberInt":"4962"},{"$numberInt":"4963"},{"$numberInt":"4964"},{"$numberInt":"4965"},{"$numberInt":"4966"},{"$numberInt":"4967"},{"$numberInt":"4968"},{"$numberInt":"4969"},{"$numberInt":"4970"},{"$numberInt":"4971"},{"$numberInt":"4972"},{"$numberInt":"4973"},{"$numberInt":"4974"},{"$numberInt":"4975"},{"$numberInt":"4976"},{"$numberInt":"4977"},{"$numberInt":"4978"},{"$numberInt":"4979"},{"$numberInt":"4980"},{"$numberInt":"4981"},{"$numberInt":"4982"},{"$numberInt":"4983"},{"$numberInt":"4984"},{"$numberInt":"4985"},{"$numberInt":"4986"},{"$numberInt":"4987"},{"$numberInt":"4988"},{"$numberInt":"4989"},{"$numberInt":"4990"},{"$numberInt":"4991"},{"$numberInt":"4992"},{"$numberInt":"4993"},{"$numberInt":"4994"},{"$numberInt":"4995"},{"$numberInt":"4996"},{"$numberInt":"4997"},{"$numberInt":"4998"},{"$numberInt":"4999"},{"$numberInt":"5000"},{"$numberInt":"5001"},{"$numberInt":"5002"},{"$numberInt":"5003"},{"$numberInt":"5004"},{"$numberInt":"5005"},{"$numberInt":"5006"},{"$numberInt":"5007"},{"$numberInt":"5008"},{"$numberInt":"5009"},{"$numberInt":"5010"},{"$numberInt":"5011"},{"$numberInt":"5012"},{"$numberInt":"5013"},{"$numberInt":"5014"},{"$numberInt":"5015"},{"$numberInt":"5016"},{"$numberInt":"5017"},{"$numberInt":"5018"},{"$numberInt":"5019"},{"$numberInt":"5020"},{"$numberInt":"5021"},{"$numberInt":"5022"},{"$numberInt":"5023"},{"$numberInt":"5024"},{"$numberInt":"5025"},{"$numberInt":"5026"},{"$numberInt":"5027"},{"$numberInt":"5028"},{"$numberInt":"5029"},{"$numberInt":"5030"},{"$numberInt":"5031"},{"$numberInt":"5032"},{"$numberInt":"5033"},{"$numberInt":"5034"},{"$numberInt":"5035"},{"$numberInt":"5036"},{"$numberInt":"5037"},{"$numberInt":"5038"},{"$numberInt":"5039"},{"$numberInt":"5040"},{"$numberInt":"5041"},{"$numberInt":"5042"},{"$numberInt":"5043"},{"$numberInt":"5044"},{"$numberInt":"5045"},{"$numberInt":"5046"},{"$numberInt":"5047"},{"$numberInt":"5048"},{"$numberInt":"5049"},{"$numberInt":"5050"},{"$numberInt":"5051"},{"$numberInt":"5052"},{"$numberInt":"5053"},{"$numberInt":"5054"},{"$numberInt":"5055"},{"$numberInt":"5056"},{"$numberInt":"5057"},{"$numberInt":"5058"},{"$numberInt":"5059"},{"$numberInt":"5060"},{"$numberInt":"5061"},{"$numberInt":"5062"},{"$numberInt":"5063"},{"$numberInt":"5064"},{"$numberInt":"5065"},{"$numberInt":"5066"},{"$numberInt":"5067"},{"$numberInt":"5068"},{"$numberInt":"5069"},{"$numberInt":"5070"},{"$numberInt":"5071"},{"$numberInt":"5072"},{"$numberInt":"5073"},{"$numberInt":"5074"},{"$numberInt":"5075"},{"$numberInt":"5076"},{"$numberInt":"5077"},{"$numberInt":"5078"},{"$numberInt":"5079"},{"$numberInt":"5080"},{"$numberInt":"5081"},{"$numberInt":"5082"},{"$numberInt":"5083"},{"$numberInt":"5084"},{"$numberInt":"5085"},{"$numberInt":"5086"},{"$numberInt":"5087"},{"$numberInt":"5088"},{"$numberInt":"5089"},{"$numberInt":"5090"},{"$numberInt":"5091"},{"$numberInt":"5092"},{"$numberInt":"5093"},{"$numberInt":"5094"},{"$numberInt":"5095"},{"$numberInt":"5096"},{"$numberInt":"5097"},{"$numberInt":"5098"},{"$numberInt":"5099"},{"$numberInt":"5100"},{"$numberInt":"5101"},{"$numberInt":"5102"},{"$numberInt":"5103"},{"$numberInt":"5104"},{"$numberInt":"5105"},{"$numberInt":"5106"},{"$numberInt":"5107"},{"$numberInt":"5108"},{"$numberInt":"5109"},{"$numberInt":"5110"},{"$numberInt":"5111"},{"$numberInt":"5112"},{"$numberInt":"5113"},{"$numberInt":"5114"},{"$numberInt":"5115"},{"$numberInt":"5116"},{"$numberInt":"5117"},{"$numberInt":"5118"},{"$numberInt":"5119"},{"$numberInt":"5120"},{"$numberInt":"5121"},{"$numberInt":"5122"},{"$numberInt":"5123"},{"$numberInt":"5124"},{"$numberInt":"5125"},{"$numberInt":"5126"},{"$numberInt":"5127"},{"$numberInt":"5128"},{"$numberInt":"5129"},{"$numberInt":"5130"},{"$numberInt":"5131"},{"$numberInt":"5132"},{"$numberInt":"5133"},{"$numberInt":"5134"},{"$numberInt":"5135"},{"$numberInt":"5136"},{"$numberInt":"5137"},{"$numberInt":"5138"},{"$numberInt":"5139"},{"$numberInt":"5140"},{"$numberInt":"5141"},{"$numberInt":"5142"},{"$numberInt":"5143"},{"$numberInt":"5144"},{"$numberInt":"5145"},{"$numberInt":"5146"},{"$numberInt":"5147"},{"$numberInt":"5148"},{"$numberInt":"5149"},{"$numberInt":"5150"},{"$numberInt":"5151"},{"$numberInt":"5152"},{"$numberInt":"5153"},{"$numberInt":"5154"},{"$numberInt":"5155"},{"$numberInt":"5156"},{"$numberInt":"5157"},{"$numberInt":"5158"},{"$numberInt":"5159"},{"$numberInt":"5160"},{"$numberInt":"5161"},{"$numberInt":"5162"},{"$numberInt":"5163"},{"$numberInt":"5164"},{"$numberInt":"5165"},{"$numberInt":"5166"},{"$numberInt":"5167"},{"$numberInt":"5168"},{"$numberInt":"5169"},{"$numberInt":"5170"},{"$numberInt":"5171"},{"$numberInt":"5172"},{"$numberInt":"5173"},{"$numberInt":"5174"},{"$numberInt":"5175"},{"$numberInt":"5176"},{"$numberInt":"5177"},{"$numberInt":"5178"},{"$numberInt":"5179"},{"$numberInt":"5180"},{"$numberInt":"5181"},{"$numberInt":"5182"},{"$numberInt":"5183"},{"$numberInt":"5184"},{"$numberInt":"5185"},{"$numberInt":"5186"},{"$numberInt":"5187"},{"$numberInt":"5188"},{"$numberInt":"5189"},{"$numberInt":"5190"},{"$numberInt":"5191"},{"$numberInt":"5192"},{"$numberInt":"5193"},{"$numberInt":"5194"},{"$numberInt":"5195"},{"$numberInt":"5196"},{"$numberInt":"5197"},{"$numberInt":"5198"},{"$numberInt":"5199"},{"$numberInt":"5200"},{"$numberInt":"5201"},{"$numberInt":"5202"},{"$numberInt":"5203"},{"$numberInt":"5204"},{"$numberInt":"5205"},{"$numberInt":"5206"},{"$numberInt":"5207"},{"$numberInt":"5208"},{"$numberInt":"5209"},{"$numberInt":"5210"},{"$numberInt":"5211"},{"$numberInt":"5212"},{"$numberInt":"5213"},{"$numberInt":"5214"},{"$numberInt":"5215"},{"$numberInt":"5216"},{"$numberInt":"5217"},{"$numberInt":"5218"},{"$numberInt":"5219"},{"$numberInt":"5220"},{"$numberInt":"5221"},{"$numberInt":"5222"},{"$numberInt":"5223"},{"$numberInt":"5224"},{"$numberInt":"5225"},{"$numberInt":"5226"},{"$numberInt":"5227"},{"$numberInt":"5228"},{"$numberInt":"5229"},{"$numberInt":"5230"},{"$numberInt":"5231"},{"$numberInt":"5232"},{"$numberInt":"5233"},{"$numberInt":"5234"},{"$numberInt":"5235"},{"$numberInt":"5236"},{"$numberInt":"5237"},{"$numberInt":"5238"},{"$numberInt":"5239"},{"$numberInt":"5240"},{"$numberInt":"5241"},{"$numberInt":"5242"},{"$numberInt":"5243"},{"$numberInt":"5244"},{"$numberInt":"5245"},{"$numberInt":"5246"},{"$numberInt":"5247"},{"$numberInt":"5248"},{"$numberInt":"5249"},{"$numberInt":"5250"},{"$numberInt":"5251"},{"$numberInt":"5252"},{"$numberInt":"5253"},{"$numberInt":"5254"},{"$numberInt":"5255"},{"$numberInt":"5256"},{"$numberInt":"5257"},{"$numberInt":"5258"},{"$numberInt":"5259"},{"$numberInt":"5260"},{"$numberInt":"5261"},{"$numberInt":"5262"},{"$numberInt":"5263"},{"$numberInt":"5264"},{"$numberInt":"5265"},{"$numberInt":"5266"},{"$numberInt":"5267"},{"$numberInt":"5268"},{"$numberInt":"5269"},{"$numberInt":"5270"},{"$numberInt":"5271"},{"$numberInt":"5272"},{"$numberInt":"5273"},{"$numberInt":"5274"},{"$numberInt":"5275"},{"$numberInt":"5276"},{"$numberInt":"5277"},{"$numberInt":"5278"},{"$numberInt":"5279"},{"$numberInt":"5280"},{"$numberInt":"5281"},{"$numberInt":"5282"},{"$numberInt":"5283"},{"$numberInt":"5284"},{"$numberInt":"5285"},{"$numberInt":"5286"},{"$numberInt":"5287"},{"$numberInt":"5288"},{"$numberInt":"5289"},{"$numberInt":"5290"},{"$numberInt":"5291"},{"$numberInt":"5292"},{"$numberInt":"5293"},{"$numberInt":"5294"},{"$numberInt":"5295"},{"$numberInt":"5296"},{"$numberInt":"5297"},{"$numberInt":"5298"},{"$numberInt":"5299"},{"$numberInt":"5300"},{"$numberInt":"5301"},{"$numberInt":"5302"},{"$numberInt":"5303"},{"$numberInt":"5304"},{"$numberInt":"5305"},{"$numberInt":"5306"},{"$numberInt":"5307"},{"$numberInt":"5308"},{"$numberInt":"5309"},{"$numberInt":"5310"},{"$numberInt":"5311"},{"$numberInt":"5312"},{"$numberInt":"5313"},{"$numberInt":"5314"},{"$numberInt":"5315"},{"$numberInt":"5316"},{"$numberInt":"5317"},{"$numberInt":"5318"},{"$numberInt":"5319"},{"$numberInt":"5320"},{"$numberInt":"5321"},{"$numberInt":"5322"},{"$numberInt":"5323"},{"$numberInt":"5324"},{"$numberInt":"5325"},{"$numberInt":"5326"},{"$numberInt":"5327"},{"$numberInt":"5328"},{"$numberInt":"5329"},{"$numberInt":"5330"},{"$numberInt":"5331"},{"$numberInt":"5332"},{"$numberInt":"5333"},{"$numberInt":"5334"},{"$numberInt":"5335"},{"$numberInt":"5336"},{"$numberInt":"5337"},{"$numberInt":"5338"},{"$numberInt":"5339"},{"$numberInt":"5340"},{"$numberInt":"5341"},{"$numberInt":"5342"},{"$numberInt":"5343"},{"$numberInt":"5344"},{"$numberInt":"5345"},{"$numberInt":"5346"},{"$numberInt":"5347"},{"$numberInt":"5348"},{"$numberInt":"5349"},{"$numberInt":"5350"},{"$numberInt":"5351"},{"$numberInt":"5352"},{"$numberInt":"5353"},{"$numberInt":"5354"},{"$numberInt":"5355"},{"$numberInt":"5356"},{"$numberInt":"5357"},{"$numberInt":"5358"},{"$numberInt":"5359"},{"$numberInt":"5360"},{"$numberInt":"5361"},{"$numberInt":"5362"},{"$numberInt":"5363"},{"$numberInt":"5364"},{"$numberInt":"5365"},{"$numberInt":"5366"},{"$numberInt":"5367"},{"$numberInt":"5368"},{"$numberInt":"5369"},{"$numberInt":"5370"},{"$numberInt":"5371"},{"$numberInt":"5372"},{"$numberInt":"5373"},{"$numberInt":"5374"},{"$numberInt":"5375"},{"$numberInt":"5376"},{"$numberInt":"5377"},{"$numberInt":"5378"},{"$numberInt":"5379"},{"$numberInt":"5380"},{"$numberInt":"5381"},{"$numberInt":"5382"},{"$numberInt":"5383"},{"$numberInt":"5384"},{"$numberInt":"5385"},{"$numberInt":"5386"},{"$numberInt":"5387"},{"$numberInt":"5388"},{"$numberInt":"5389"},{"$numberInt":"5390"},{"$numberInt":"5391"},{"$numberInt":"5392"},{"$numberInt":"5393"},{"$numberInt":"5394"},{"$numberInt":"5395"},{"$numberInt":"5396"},{"$numberInt":"5397"},{"$numberInt":"5398"},{"$numberInt":"5399"},{"$numberInt":"5400"},{"$numberInt":"5401"},{"$numberInt":"5402"},{"$numberInt":"5403"},{"$numberInt":"5404"},{"$numberInt":"5405"},{"$numberInt":"5406"},{"$numberInt":"5407"},{"$numberInt":"5408"},{"$numberInt":"5409"},{"$numberInt":"5410"},{"$numberInt":"5411"},{"$numberInt":"5412"},{"$numberInt":"5413"},{"$numberInt":"5414"},{"$numberInt":"5415"},{"$numberInt":"5416"},{"$numberInt":"5417"},{"$numberInt":"5418"},{"$numberInt":"5419"},{"$numberInt":"5420"},{"$numberInt":"5421"},{"$numberInt":"5422"},{"$numberInt":"5423"},{"$numberInt":"5424"},{"$numberInt":"5425"},{"$numberInt":"5426"},{"$numberInt":"5427"},{"$numberInt":"5428"},{"$numberInt":"5429"},{"$numberInt":"5430"},{"$numberInt":"5431"},{"$numberInt":"5432"},{"$numberInt":"5433"},{"$numberInt":"5434"},{"$numberInt":"5435"},{"$numberInt":"5436"},{"$numberInt":"5437"},{"$numberInt":"5438"},{"$numberInt":"5439"},{"$numberInt":"5440"},{"$numberInt":"5441"},{"$numberInt":"5442"},{"$numberInt":"5443"},{"$numberInt":"5444"},{"$numberInt":"5445"},{"$numberInt":"5446"},{"$numberInt":"5447"},{"$numberInt":"5448"},{"$numberInt":"5449"},{"$numberInt":"5450"},{"$numberInt":"5451"},{"$numberInt":"5452"},{"$numberInt":"5453"},{"$numberInt":"5454"},{"$numberInt":"5455"},{"$numberInt":"5456"},{"$numberInt":"5457"},{"$numberInt":"5458"},{"$numberInt":"5459"},{"$numberInt":"5460"},{"$numberInt":"5461"},{"$numberInt":"5462"},{"$numberInt":"5463"},{"$numberInt":"5464"},{"$numberInt":"5465"},{"$numberInt":"5466"},{"$numberInt":"5467"},{"$numberInt":"5468"},{"$numberInt":"5469"},{"$numberInt":"5470"},{"$numberInt":"5471"},{"$numberInt":"5472"},{"$numberInt":"5473"},{"$numberInt":"5474"},{"$numberInt":"5475"},{"$numberInt":"5476"},{"$numberInt":"5477"},{"$numberInt":"5478"},{"$numberInt":"5479"},{"$numberInt":"5480"},{"$numberInt":"5481"},{"$numberInt":"5482"},{"$numberInt":"5483"},{"$numberInt":"5484"},{"$numberInt":"5485"},{"$numberInt":"5486"},{"$numberInt":"5487"},{"$numberInt":"5488"},{"$numberInt":"5489"},{"$numberInt":"5490"},{"$numberInt":"5491"},{"$numberInt":"5492"},{"$numberInt":"5493"},{"$numberInt":"5494"},{"$numberInt":"5495"},{"$numberInt":"5496"},{"$numberInt":"5497"},{"$numberInt":"5498"},{"$numberInt":"5499"},{"$numberInt":"5500"},{"$numberInt":"5501"},{"$numberInt":"5502"},{"$numberInt":"5503"},{"$numberInt":"5504"},{"$numberInt":"5505"},{"$numberInt":"5506"},{"$numberInt":"5507"},{"$numberInt":"5508"},{"$numberInt":"5509"},{"$numberInt":"5510"},{"$numberInt":"5511"},{"$numberInt":"5512"},{"$numberInt":"5513"},{"$numberInt":"5514"},{"$numberInt":"5515"},{"$numberInt":"5516"},{"$numberInt":"5517"},{"$numberInt":"5518"},{"$numberInt":"5519"},{"$numberInt":"5520"},{"$numberInt":"5521"},{"$numberInt":"5522"},{"$numberInt":"5523"},{"$numberInt":"5524"},{"$numberInt":"5525"},{"$numberInt":"5526"},{"$numberInt":"5527"},{"$numberInt":"5528"},{"$numberInt":"5529"},{"$numberInt":"5530"},{"$numberInt":"5531"},{"$numberInt":"5532"},{"$numberInt":"5533"},{"$numberInt":"5534"},{"$numberInt":"5535"},{"$numberInt":"5536"},{"$numberInt":"5537"},{"$numberInt":"5538"},{"$numberInt":"5539"},{"$numberInt":"5540"},{"$numberInt":"5541"},{"$numberInt":"5542"},{"$numberInt":"5543"},{"$numberInt":"5544"},{"$numberInt":"5545"},{"$numberInt":"5546"},{"$numberInt":"5547"},{"$numberInt":"5548"},{"$numberInt":"5549"},{"$numberInt":"5550"},{"$numberInt":"5551"},{"$numberInt":"5552"},{"$numberInt":"5553"},{"$numberInt":"5554"},{"$numberInt":"5555"},{"$numberInt":"5556"},{"$numberInt":"5557"},{"$numberInt":"5558"},{"$numberInt":"5559"},{"$numberInt":"5560"},{"$numberInt":"5561"},{"$numberInt":"5562"},{"$numberInt":"5563"},{"$numberInt":"5564"},{"$numberInt":"5565"},{"$numberInt":"5566"},{"$numberInt":"5567"},{"$numberInt":"5568"},{"$numberInt":"5569"},{"$numberInt":"5570"},{"$numberInt":"5571"},{"$numberInt":"5572"},{"$numberInt":"5573"},{"$numberInt":"5574"},{"$numberInt":"5575"},{"$numberInt":"5576"},{"$numberInt":"5577"},{"$numberInt":"5578"},{"$numberInt":"5579"},{"$numberInt":"5580"},{"$numberInt":"5581"},{"$numberInt":"5582"},{"$numberInt":"5583"},{"$numberInt":"5584"},{"$numberInt":"5585"},{"$numberInt":"5586"},{"$numberInt":"5587"},{"$numberInt":"5588"},{"$numberInt":"5589"},{"$numberInt":"5590"},{"$numberInt":"5591"},{"$numberInt":"5592"},{"$numberInt":"5593"},{"$numberInt":"5594"},{"$numberInt":"5595"},{"$numberInt":"5596"},{"$numberInt":"5597"},{"$numberInt":"5598"},{"$numberInt":"5599"},{"$numberInt":"5600"},{"$numberInt":"5601"},{"$numberInt":"5602"},{"$numberInt":"5603"},{"$numberInt":"5604"},{"$numberInt":"5605"},{"$numberInt":"5606"},{"$numberInt":"5607"},{"$numberInt":"5608"},{"$numberInt":"5609"},{"$numberInt":"5610"},{"$numberInt":"5611"},{"$numberInt":"5612"},{"$numberInt":"5613"},{"$numberInt":"5614"},{"$numberInt":"5615"},{"$numberInt":"5616"},{"$numberInt":"5617"},{"$numberInt":"5618"},{"$numberInt":"5619"},{"$numberInt":"5620"},{"$numberInt":"5621"},{"$numberInt":"5622"},{"$numberInt":"5623"},{"$numberInt":"5624"},{"$numberInt":"5625"},{"$numberInt":"5626"},{"$numberInt":"5627"},{"$numberInt":"5628"},{"$numberInt":"5629"},{"$numberInt":"5630"},{"$numberInt":"5631"},{"$numberInt":"5632"},{"$numberInt":"5633"},{"$numberInt":"5634"},{"$numberInt":"5635"},{"$numberInt":"5636"},{"$numberInt":"5637"},{"$numberInt":"5638"},{"$numberInt":"5639"},{"$numberInt":"5640"},{"$numberInt":"5641"},{"$numberInt":"5642"},{"$numberInt":"5643"},{"$numberInt":"5644"},{"$numberInt":"5645"},{"$numberInt":"5646"},{"$numberInt":"5647"},{"$numberInt":"5648"},{"$numberInt":"5649"},{"$numberInt":"5650"},{"$numberInt":"5651"},{"$numberInt":"5652"},{"$numberInt":"5653"},{"$numberInt":"5654"},{"$numberInt":"5655"},{"$numberInt":"5656"},{"$numberInt":"5657"},{"$numberInt":"5658"},{"$numberInt":"5659"},{"$numberInt":"5660"},{"$numberInt":"5661"},{"$numberInt":"5662"},{"$numberInt":"5663"},{"$numberInt":"5664"},{"$numberInt":"5665"},{"$numberInt":"5666"},{"$numberInt":"5667"},{"$numberInt":"5668"},{"$numberInt":"5669"},{"$numberInt":"5670"},{"$numberInt":"5671"},{"$numberInt":"5672"},{"$numberInt":"5673"},{"$numberInt":"5674"},{"$numberInt":"5675"},{"$numberInt":"5676"},{"$numberInt":"5677"},{"$numberInt":"5678"},{"$numberInt":"5679"},{"$numberInt":"5680"},{"$numberInt":"5681"},{"$numberInt":"5682"},{"$numberInt":"5683"},{"$numberInt":"5684"},{"$numberInt":"5685"},{"$numberInt":"5686"},{"$numberInt":"5687"},{"$numberInt":"5688"},{"$numberInt":"5689"},{"$numberInt":"5690"},{"$numberInt":"5691"},{"$numberInt":"5692"},{"$numberInt":"5693"},{"$numberInt":"5694"},{"$numberInt":"5695"},{"$numberInt":"5696"},{"$numberInt":"5697"},{"$numberInt":"5698"},{"$numberInt":"5699"},{"$numberInt":"5700"},{"$numberInt":"5701"},{"$numberInt":"5702"},{"$numberInt":"5703"},{"$numberInt":"5704"},{"$numberInt":"5705"},{"$numberInt":"5706"},{"$numberInt":"5707"},{"$numberInt":"5708"},{"$numberInt":"5709"},{"$numberInt":"5710"},{"$numberInt":"5711"},{"$numberInt":"5712"},{"$numberInt":"5713"},{"$numberInt":"5714"},{"$numberInt":"5715"},{"$numberInt":"5716"},{"$numberInt":"5717"},{"$numberInt":"5718"},{"$numberInt":"5719"},{"$numberInt":"5720"},{"$numberInt":"5721"},{"$numberInt":"5722"},{"$numberInt":"5723"},{"$numberInt":"5724"},{"$numberInt":"5725"},{"$numberInt":"5726"},{"$numberInt":"5727"},{"$numberInt":"5728"},{"$numberInt":"5729"},{"$numberInt":"5730"},{"$numberInt":"5731"},{"$numberInt":"5732"},{"$numberInt":"5733"},{"$numberInt":"5734"},{"$numberInt":"5735"},{"$numberInt":"5736"},{"$numberInt":"5737"},{"$numberInt":"5738"},{"$numberInt":"5739"},{"$numberInt":"5740"},{"$numberInt":"5741"},{"$numberInt":"5742"},{"$numberInt":"5743"},{"$numberInt":"5744"},{"$numberInt":"5745"},{"$numberInt":"5746"},{"$numberInt":"5747"},{"$numberInt":"5748"},{"$numberInt":"5749"},{"$numberInt":"5750"},{"$numberInt":"5751"},{"$numberInt":"5752"},{"$numberInt":"5753"},{"$numberInt":"5754"},{"$numberInt":"5755"},{"$numberInt":"5756"},{"$numberInt":"5757"},{"$numberInt":"5758"},{"$numberInt":"5759"},{"$numberInt":"5760"},{"$numberInt":"5761"},{"$numberInt":"5762"},{"$numberInt":"5763"},{"$numberInt":"5764"},{"$numberInt":"5765"},{"$numberInt":"5766"},{"$numberInt":"5767"},{"$numberInt":"5768"},{"$numberInt":"5769"},{"$numberInt":"5770"},{"$numberInt":"5771"},{"$numberInt":"5772"},{"$numberInt":"5773"},{"$numberInt":"5774"},{"$numberInt":"5775"},{"$numberInt":"5776"},{"$numberInt":"5777"},{"$numberInt":"5778"},{"$numberInt":"5779"},{"$numberInt":"5780"},{"$numberInt":"5781"},{"$numberInt":"5782"},{"$numberInt":"5783"},{"$numberInt":"5784"},{"$numberInt":"5785"},{"$numberInt":"5786"},{"$numberInt":"5787"},{"$numberInt":"5788"},{"$numberInt":"5789"},{"$numberInt":"5790"},{"$numberInt":"5791"},{"$numberInt":"5792"},{"$numberInt":"5793"},{"$numberInt":"5794"},{"$numberInt":"5795"},{"$numberInt":"5796"},{"$numberInt":"5797"},{"$numberInt":"5798"},{"$numberInt":"5799"},{"$numberInt":"5800"},{"$numberInt":"5801"},{"$numberInt":"5802"},{"$numberInt":"5803"},{"$numberInt":"5804"},{"$numberInt":"5805"},{"$numberInt":"5806"},{"$numberInt":"5807"},{"$numberInt":"5808"},{"$numberInt":"5809"},{"$numberInt":"5810"},{"$numberInt":"5811"},{"$numberInt":"5812"},{"$numberInt":"5813"},{"$numberInt":"5814"},{"$numberInt":"5815"},{"$numberInt":"5816"},{"$numberInt":"5817"},{"$numberInt":"5818"},{"$numberInt":"5819"},{"$numberInt":"5820"},{"$numberInt":"5821"},{"$numberInt":"5822"},{"$numberInt":"5823"},{"$numberInt":"5824"},{"$numberInt":"5825"},{"$numberInt":"5826"},{"$numberInt":"5827"},{"$numberInt":"5828"},{"$numberInt":"5829"},{"$numberInt":"5830"},{"$numberInt":"5831"},{"$numberInt":"5832"},{"$numberInt":"5833"},{"$numberInt":"5834"},{"$numberInt":"5835"},{"$numberInt":"5836"},{"$numberInt":"5837"},{"$numberInt":"5838"},{"$numberInt":"5839"},{"$numberInt":"5840"},{"$numberInt":"5841"},{"$numberInt":"5842"},{"$numberInt":"5843"},{"$numberInt":"5844"},{"$numberInt":"5845"},{"$numberInt":"5846"},{"$numberInt":"5847"},{"$numberInt":"5848"},{"$numberInt":"5849"},{"$numberInt":"5850"},{"$numberInt":"5851"},{"$numberInt":"5852"},{"$numberInt":"5853"},{"$numberInt":"5854"},{"$numberInt":"5855"},{"$numberInt":"5856"},{"$numberInt":"5857"},{"$numberInt":"5858"},{"$numberInt":"5859"},{"$numberInt":"5860"},{"$numberInt":"5861"},{"$numberInt":"5862"},{"$numberInt":"5863"},{"$numberInt":"5864"},{"$numberInt":"5865"},{"$numberInt":"5866"},{"$numberInt":"5867"},{"$numberInt":"5868"},{"$numberInt":"5869"},{"$numberInt":"5870"},{"$numberInt":"5871"},{"$numberInt":"5872"},{"$numberInt":"5873"},{"$numberInt":"5874"},{"$numberInt":"5875"},{"$numberInt":"5876"},{"$numberInt":"5877"},{"$numberInt":"5878"},{"$numberInt":"5879"},{"$numberInt":"5880"},{"$numberInt":"5881"},{"$numberInt":"5882"},{"$numberInt":"5883"},{"$numberInt":"5884"},{"$numberInt":"5885"},{"$numberInt":"5886"},{"$numberInt":"5887"},{"$numberInt":"5888"},{"$numberInt":"5889"},{"$numberInt":"5890"},{"$numberInt":"5891"},{"$numberInt":"5892"},{"$numberInt":"5893"},{"$numberInt":"5894"},{"$numberInt":"5895"},{"$numberInt":"5896"},{"$numberInt":"5897"},{"$numberInt":"5898"},{"$numberInt":"5899"},{"$numberInt":"5900"},{"$numberInt":"5901"},{"$numberInt":"5902"},{"$numberInt":"5903"},{"$numberInt":"5904"},{"$numberInt":"5905"},{"$numberInt":"5906"},{"$numberInt":"5907"},{"$numberInt":"5908"},{"$numberInt":"5909"},{"$numberInt":"5910"},{"$numberInt":"5911"},{"$numberInt":"5912"},{"$numberInt":"5913"},{"$numberInt":"5914"},{"$numberInt":"5915"},{"$numberInt":"5916"},{"$numberInt":"5917"},{"$numberInt":"5918"},{"$numberInt":"5919"},{"$numberInt":"5920"},{"$numberInt":"5921"},{"$numberInt":"5922"},{"$numberInt":"5923"},{"$numberInt":"5924"},{"$numberInt":"5925"},{"$numberInt":"5926"},{"$numberInt":"5927"},{"$numberInt":"5928"},{"$numberInt":"5929"},{"$numberInt":"5930"},{"$numberInt":"5931"},{"$numberInt":"5932"},{"$numberInt":"5933"},{"$numberInt":"5934"},{"$numberInt":"5935"},{"$numberInt":"5936"},{"$numberInt":"5937"},{"$numberInt":"5938"},{"$numberInt":"5939"},{"$numberInt":"5940"},{"$numberInt":"5941"},{"$numberInt":"5942"},{"$numberInt":"5943"},{"$numberInt":"5944"},{"$numberInt":"5945"},{"$numberInt":"5946"},{"$numberInt":"5947"},{"$numberInt":"5948"},{"$numberInt":"5949"},{"$numberInt":"5950"},{"$numberInt":"5951"},{"$numberInt":"5952"},{"$numberInt":"5953"},{"$numberInt":"5954"},{"$numberInt":"5955"},{"$numberInt":"5956"},{"$numberInt":"5957"},{"$numberInt":"5958"},{"$numberInt":"5959"},{"$numberInt":"5960"},{"$numberInt":"5961"},{"$numberInt":"5962"},{"$numberInt":"5963"},{"$numberInt":"5964"},{"$numberInt":"5965"},{"$numberInt":"5966"},{"$numberInt":"5967"},{"$numberInt":"5968"},{"$numberInt":"5969"},{"$numberInt":"5970"},{"$numberInt":"5971"},{"$numberInt":"5972"},{"$numberInt":"5973"},{"$numberInt":"5974"},{"$numberInt":"5975"},{"$numberInt":"5976"},{"$numberInt":"5977"},{"$numberInt":"5978"},{"$numberInt":"5979"},{"$numberInt":"5980"},{"$numberInt":"5981"},{"$numberInt":"5982"},{"$numberInt":"5983"},{"$numberInt":"5984"},{"$numberInt":"5985"},{"$numberInt":"5986"},{"$numberInt":"5987"},{"$numberInt":"5988"},{"$numberInt":"5989"},{"$numberInt":"5990"},{"$numberInt":"5991"},{"$numberInt":"5992"},{"$numberInt":"5993"},{"$numberInt":"5994"},{"$numberInt":"5995"},{"$numberInt":"5996"},{"$numberInt":"5997"},{"$numberInt":"5998"},{"$numberInt":"5999"},{"$numberInt":"6000"},{"$numberInt":"6001"},{"$numberInt":"6002"},{"$numberInt":"6003"},{"$numberInt":"6004"},{"$numberInt":"6005"},{"$numberInt":"6006"},{"$numberInt":"6007"},{"$numberInt":"6008"},{"$numberInt":"6009"},{"$numberInt":"6010"},{"$numberInt":"6011"},{"$numberInt":"6012"},{"$numberInt":"6013"},{"$numberInt":"6014"},{"$numberInt":"6015"},{"$numberInt":"6016"},{"$numberInt":"6017"},{"$numberInt":"6018"},{"$numberInt":"6019"},{"$numberInt":"6020"},{"$numberInt":"6021"},{"$numberInt":"6022"},{"$numberInt":"6023"},{"$numberInt":"6024"},{"$numberInt":"6025"},{"$numberInt":"6026"},{"$numberInt":"6027"},{"$numberInt":"6028"},{"$numberInt":"6029"},{"$numberInt":"6030"},{"$numberInt":"6031"},{"$numberInt":"6032"},{"$numberInt":"6033"},{"$numberInt":"6034"},{"$numberInt":"6035"},{"$numberInt":"6036"},{"$numberInt":"6037"},{"$numberInt":"6038"},{"$numberInt":"6039"},{"$numberInt":"6040"},{"$numberInt":"6041"},{"$numberInt":"6042"},{"$numberInt":"6043"},{"$numberInt":"6044"},{"$numberInt":"6045"},{"$numberInt":"6046"},{"$numberInt":"6047"},{"$numberInt":"6048"},{"$numberInt":"6049"},{"$numberInt":"6050"},{"$numberInt":"6051"},{"$numberInt":"6052"},{"$numberInt":"6053"},{"$numberInt":"6054"},{"$numberInt":"6055"},{"$numberInt":"6056"},{"$numberInt":"6057"},{"$numberInt":"6058"},{"$numberInt":"6059"},{"$numberInt":"6060"},{"$numberInt":"6061"},{"$numberInt":"6062"},{"$numberInt":"6063"},{"$numberInt":"6064"},{"$numberInt":"6065"},{"$numberInt":"6066"},{"$numberInt":"6067"},{"$numberInt":"6068"},{"$numberInt":"6069"},{"$numberInt":"6070"},{"$numberInt":"6071"},{"$numberInt":"6072"},{"$numberInt":"6073"},{"$numberInt":"6074"},{"$numberInt":"6075"},{"$numberInt":"6076"},{"$numberInt":"6077"},{"$numberInt":"6078"},{"$numberInt":"6079"},{"$numberInt":"6080"},{"$numberInt":"6081"},{"$numberInt":"6082"},{"$numberInt":"6083"},{"$numberInt":"6084"},{"$numberInt":"6085"},{"$numberInt":"6086"},{"$numberInt":"6087"},{"$numberInt":"6088"},{"$numberInt":"6089"},{"$numberInt":"6090"},{"$numberInt":"6091"},{"$numberInt":"6092"},{"$numberInt":"6093"},{"$numberInt":"6094"},{"$numberInt":"6095"},{"$numberInt":"6096"},{"$numberInt":"6097"},{"$numberInt":"6098"},{"$numberInt":"6099"},{"$numberInt":"6100"},{"$numberInt":"6101"},{"$numberInt":"6102"},{"$numberInt":"6103"},{"$numberInt":"6104"},{"$numberInt":"6105"},{"$numberInt":"6106"},{"$numberInt":"6107"},{"$numberInt":"6108"},{"$numberInt":"6109"},{"$numberInt":"6110"},{"$numberInt":"6111"},{"$numberInt":"6112"},{"$numberInt":"6113"},{"$numberInt":"6114"},{"$numberInt":"6115"},{"$numberInt":"6116"},{"$numberInt":"6117"},{"$numberInt":"6118"},{"$numberInt":"6119"},{"$numberInt":"6120"},{"$numberInt":"6121"},{"$numberInt":"6122"},{"$numberInt":"6123"},{"$numberInt":"6124"},{"$numberInt":"6125"},{"$numberInt":"6126"},{"$numberInt":"6127"},{"$numberInt":"6128"},{"$numberInt":"6129"},{"$numberInt":"6130"},{"$numberInt":"6131"},{"$numberInt":"6132"},{"$numberInt":"6133"},{"$numberInt":"6134"},{"$numberInt":"6135"},{"$numberInt":"6136"},{"$numberInt":"6137"},{"$numberInt":"6138"},{"$numberInt":"6139"},{"$numberInt":"6140"},{"$numberInt":"6141"},{"$numberInt":"6142"},{"$numberInt":"6143"},{"$numberInt":"6144"},{"$numberInt":"6145"},{"$numberInt":"6146"},{"$numberInt":"6147"},{"$numberInt":"6148"},{"$numberInt":"6149"},{"$numberInt":"6150"},{"$numberInt":"6151"},{"$numberInt":"6152"},{"$numberInt":"6153"},{"$numberInt":"6154"},{"$numberInt":"6155"},{"$numberInt":"6156"},{"$numberInt":"6157"},{"$numberInt":"6158"},{"$numberInt":"6159"},{"$numberInt":"6160"},{"$numberInt":"6161"},{"$numberInt":"6162"},{"$numberInt":"6163"},{"$numberInt":"6164"},{"$numberInt":"6165"},{"$numberInt":"6166"},{"$numberInt":"6167"},{"$numberInt":"6168"},{"$numberInt":"6169"},{"$numberInt":"6170"},{"$numberInt":"6171"},{"$numberInt":"6172"},{"$numberInt":"6173"},{"$numberInt":"6174"},{"$numberInt":"6175"},{"$numberInt":"6176"},{"$numberInt":"6177"},{"$numberInt":"6178"},{"$numberInt":"6179"},{"$numberInt":"6180"},{"$numberInt":"6181"},{"$numberInt":"6182"},{"$numberInt":"6183"},{"$numberInt":"6184"},{"$numberInt":"6185"},{"$numberInt":"6186"},{"$numberInt":"6187"},{"$numberInt":"6188"},{"$numberInt":"6189"},{"$numberInt":"6190"},{"$numberInt":"6191"},{"$numberInt":"6192"},{"$numberInt":"6193"},{"$numberInt":"6194"},{"$numberInt":"6195"},{"$numberInt":"6196"},{"$numberInt":"6197"},{"$numberInt":"6198"},{"$numberInt":"6199"},{"$numberInt":"6200"},{"$numberInt":"6201"},{"$numberInt":"6202"},{"$numberInt":"6203"},{"$numberInt":"6204"},{"$numberInt":"6205"},{"$numberInt":"6206"},{"$numberInt":"6207"},{"$numberInt":"6208"},{"$numberInt":"6209"},{"$numberInt":"6210"},{"$numberInt":"6211"},{"$numberInt":"6212"},{"$numberInt":"6213"},{"$numberInt":"6214"},{"$numberInt":"6215"},{"$numberInt":"6216"},{"$numberInt":"6217"},{"$numberInt":"6218"},{"$numberInt":"6219"},{"$numberInt":"6220"},{"$numberInt":"6221"},{"$numberInt":"6222"},{"$numberInt":"6223"},{"$numberInt":"6224"},{"$numberInt":"6225"},{"$numberInt":"6226"},{"$numberInt":"6227"},{"$numberInt":"6228"},{"$numberInt":"6229"},{"$numberInt":"6230"},{"$numberInt":"6231"},{"$numberInt":"6232"},{"$numberInt":"6233"},{"$numberInt":"6234"},{"$numberInt":"6235"},{"$numberInt":"6236"},{"$numberInt":"6237"},{"$numberInt":"6238"},{"$numberInt":"6239"},{"$numberInt":"6240"},{"$numberInt":"6241"},{"$numberInt":"6242"},{"$numberInt":"6243"},{"$numberInt":"6244"},{"$numberInt":"6245"},{"$numberInt":"6246"},{"$numberInt":"6247"},{"$numberInt":"6248"},{"$numberInt":"6249"},{"$numberInt":"6250"},{"$numberInt":"6251"},{"$numberInt":"6252"},{"$numberInt":"6253"},{"$numberInt":"6254"},{"$numberInt":"6255"},{"$numberInt":"6256"},{"$numberInt":"6257"},{"$numberInt":"6258"},{"$numberInt":"6259"},{"$numberInt":"6260"},{"$numberInt":"6261"},{"$numberInt":"6262"},{"$numberInt":"6263"},{"$numberInt":"6264"},{"$numberInt":"6265"},{"$numberInt":"6266"},{"$numberInt":"6267"},{"$numberInt":"6268"},{"$numberInt":"6269"},{"$numberInt":"6270"},{"$numberInt":"6271"},{"$numberInt":"6272"},{"$numberInt":"6273"},{"$numberInt":"6274"},{"$numberInt":"6275"},{"$numberInt":"6276"},{"$numberInt":"6277"},{"$numberInt":"6278"},{"$numberInt":"6279"},{"$numberInt":"6280"},{"$numberInt":"6281"},{"$numberInt":"6282"},{"$numberInt":"6283"},{"$numberInt":"6284"},{"$numberInt":"6285"},{"$numberInt":"6286"},{"$numberInt":"6287"},{"$numberInt":"6288"},{"$numberInt":"6289"},{"$numberInt":"6290"},{"$numberInt":"6291"},{"$numberInt":"6292"},{"$numberInt":"6293"},{"$numberInt":"6294"},{"$numberInt":"6295"},{"$numberInt":"6296"},{"$numberInt":"6297"},{"$numberInt":"6298"},{"$numberInt":"6299"},{"$numberInt":"6300"},{"$numberInt":"6301"},{"$numberInt":"6302"},{"$numberInt":"6303"},{"$numberInt":"6304"},{"$numberInt":"6305"},{"$numberInt":"6306"},{"$numberInt":"6307"},{"$numberInt":"6308"},{"$numberInt":"6309"},{"$numberInt":"6310"},{"$numberInt":"6311"},{"$numberInt":"6312"},{"$numberInt":"6313"},{"$numberInt":"6314"},{"$numberInt":"6315"},{"$numberInt":"6316"},{"$numberInt":"6317"},{"$numberInt":"6318"},{"$numberInt":"6319"},{"$numberInt":"6320"},{"$numberInt":"6321"},{"$numberInt":"6322"},{"$numberInt":"6323"},{"$numberInt":"6324"},{"$numberInt":"6325"},{"$numberInt":"6326"},{"$numberInt":"6327"},{"$numberInt":"6328"},{"$numberInt":"6329"},{"$numberInt":"6330"},{"$numberInt":"6331"},{"$numberInt":"6332"},{"$numberInt":"6333"},{"$numberInt":"6334"},{"$numberInt":"6335"},{"$numberInt":"6336"},{"$numberInt":"6337"},{"$numberInt":"6338"},{"$numberInt":"6339"},{"$numberInt":"6340"},{"$numberInt":"6341"},{"$numberInt":"6342"},{"$numberInt":"6343"},{"$numberInt":"6344"},{"$numberInt":"6345"},{"$numberInt":"6346"},{"$numberInt":"6347"},{"$numberInt":"6348"},{"$numberInt":"6349"},{"$numberInt":"6350"},{"$numberInt":"6351"},{"$numberInt":"6352"},{"$numberInt":"6353"},{"$numberInt":"6354"},{"$numberInt":"6355"},{"$numberInt":"6356"},{"$numberInt":"6357"},{"$numberInt":"6358"},{"$numberInt":"6359"},{"$numberInt":"6360"},{"$numberInt":"6361"},{"$numberInt":"6362"},{"$numberInt":"6363"},{"$numberInt":"6364"},{"$numberInt":"6365"},{"$numberInt":"6366"},{"$numberInt":"6367"},{"$numberInt":"6368"},{"$numberInt":"6369"},{"$numberInt":"6370"},{"$numberInt":"6371"},{"$numberInt":"6372"},{"$numberInt":"6373"},{"$numberInt":"6374"},{"$numberInt":"6375"},{"$numberInt":"6376"},{"$numberInt":"6377"},{"$numberInt":"6378"},{"$numberInt":"6379"},{"$numberInt":"6380"},{"$numberInt":"6381"},{"$numberInt":"6382"},{"$numberInt":"6383"},{"$numberInt":"6384"},{"$numberInt":"6385"},{"$numberInt":"6386"},{"$numberInt":"6387"},{"$numberInt":"6388"},{"$numberInt":"6389"},{"$numberInt":"6390"},{"$numberInt":"6391"},{"$numberInt":"6392"},{"$numberInt":"6393"},{"$numberInt":"6394"},{"$numberInt":"6395"},{"$numberInt":"6396"},{"$numberInt":"6397"},{"$numberInt":"6398"},{"$numberInt":"6399"},{"$numberInt":"6400"},{"$numberInt":"6401"},{"$numberInt":"6402"},{"$numberInt":"6403"},{"$numberInt":"6404"},{"$numberInt":"6405"},{"$numberInt":"6406"},{"$numberInt":"6407"},{"$numberInt":"6408"},{"$numberInt":"6409"},{"$numberInt":"6410"},{"$numberInt":"6411"},{"$numberInt":"6412"},{"$numberInt":"6413"},{"$numberInt":"6414"},{"$numberInt":"6415"},{"$numberInt":"6416"},{"$numberInt":"6417"},{"$numberInt":"6418"},{"$numberInt":"6419"},{"$numberInt":"6420"},{"$numberInt":"6421"},{"$numberInt":"6422"},{"$numberInt":"6423"},{"$numberInt":"6424"},{"$numberInt":"6425"},{"$numberInt":"6426"},{"$numberInt":"6427"},{"$numberInt":"6428"},{"$numberInt":"6429"},{"$numberInt":"6430"},{"$numberInt":"6431"},{"$numberInt":"6432"},{"$numberInt":"6433"},{"$numberInt":"6434"},{"$numberInt":"6435"},{"$numberInt":"6436"},{"$numberInt":"6437"},{"$numberInt":"6438"},{"$numberInt":"6439"},{"$numberInt":"6440"},{"$numberInt":"6441"},{"$numberInt":"6442"},{"$numberInt":"6443"},{"$numberInt":"6444"},{"$numberInt":"6445"},{"$numberInt":"6446"},{"$numberInt":"6447"},{"$numberInt":"6448"},{"$numberInt":"6449"},{"$numberInt":"6450"},{"$numberInt":"6451"},{"$numberInt":"6452"},{"$numberInt":"6453"},{"$numberInt":"6454"},{"$numberInt":"6455"},{"$numberInt":"6456"},{"$numberInt":"6457"},{"$numberInt":"6458"},{"$numberInt":"6459"},{"$numberInt":"6460"},{"$numberInt":"6461"},{"$numberInt":"6462"},{"$numberInt":"6463"},{"$numberInt":"6464"},{"$numberInt":"6465"},{"$numberInt":"6466"},{"$numberInt":"6467"},{"$numberInt":"6468"},{"$numberInt":"6469"},{"$numberInt":"6470"},{"$numberInt":"6471"},{"$numberInt":"6472"},{"$numberInt":"6473"},{"$numberInt":"6474"},{"$numberInt":"6475"},{"$numberInt":"6476"},{"$numberInt":"6477"},{"$numberInt":"6478"},{"$numberInt":"6479"},{"$numberInt":"6480"},{"$numberInt":"6481"},{"$numberInt":"6482"},{"$numberInt":"6483"},{"$numberInt":"6484"},{"$numberInt":"6485"},{"$numberInt":"6486"},{"$numberInt":"6487"},{"$numberInt":"6488"},{"$numberInt":"6489"},{"$numberInt":"6490"},{"$numberInt":"6491"},{"$numberInt":"6492"},{"$numberInt":"6493"},{"$numberInt":"6494"},{"$numberInt":"6495"},{"$numberInt":"6496"},{"$numberInt":"6497"},{"$numberInt":"6498"},{"$numberInt":"6499"},{"$numberInt":"6500"},{"$numberInt":"6501"},{"$numberInt":"6502"},{"$numberInt":"6503"},{"$numberInt":"6504"},{"$numberInt":"6505"},{"$numberInt":"6506"},{"$numberInt":"6507"},{"$numberInt":"6508"},{"$numberInt":"6509"},{"$numberInt":"6510"},{"$numberInt":"6511"},{"$numberInt":"6512"},{"$numberInt":"6513"},{"$numberInt":"6514"},{"$numberInt":"6515"},{"$numberInt":"6516"},{"$numberInt":"6517"},{"$numberInt":"6518"},{"$numberInt":"6519"},{"$numberInt":"6520"},{"$numberInt":"6521"},{"$numberInt":"6522"},{"$numberInt":"6523"},{"$numberInt":"6524"},{"$numberInt":"6525"},{"$numberInt":"6526"},{"$numberInt":"6527"},{"$numberInt":"6528"},{"$numberInt":"6529"},{"$numberInt":"6530"},{"$numberInt":"6531"},{"$numberInt":"6532"},{"$numberInt":"6533"},{"$numberInt":"6534"},{"$numberInt":"6535"},{"$numberInt":"6536"},{"$numberInt":"6537"},{"$numberInt":"6538"},{"$numberInt":"6539"},{"$numberInt":"6540"},{"$numberInt":"6541"},{"$numberInt":"6542"},{"$numberInt":"6543"},{"$numberInt":"6544"},{"$numberInt":"6545"},{"$numberInt":"6546"},{"$numberInt":"6547"},{"$numberInt":"6548"},{"$numberInt":"6549"},{"$numberInt":"6550"},{"$numberInt":"6551"},{"$numberInt":"6552"},{"$numberInt":"6553"},{"$numberInt":"6554"},{"$numberInt":"6555"},{"$numberInt":"6556"},{"$numberInt":"6557"},{"$numberInt":"6558"},{"$numberInt":"6559"},{"$numberInt":"6560"},{"$numberInt":"6561"},{"$numberInt":"6562"},{"$numberInt":"6563"},{"$numberInt":"6564"},{"$numberInt":"6565"},{"$numberInt":"6566"},{"$numberInt":"6567"},{"$numberInt":"6568"},{"$numberInt":"6569"},{"$numberInt":"6570"},{"$numberInt":"6571"},{"$numberInt":"6572"},{"$numberInt":"6573"},{"$numberInt":"6574"},{"$numberInt":"6575"},{"$numberInt":"6576"},{"$numberInt":"6577"},{"$numberInt":"6578"},{"$numberInt":"6579"},{"$numberInt":"6580"},{"$numberInt":"6581"},{"$numberInt":"6582"},{"$numberInt":"6583"},{"$numberInt":"6584"},{"$numberInt":"6585"},{"$numberInt":"6586"},{"$numberInt":"6587"},{"$numberInt":"6588"},{"$numberInt":"6589"},{"$numberInt":"6590"},{"$numberInt":"6591"},{"$numberInt":"6592"},{"$numberInt":"6593"},{"$numberInt":"6594"},{"$numberInt":"6595"},{"$numberInt":"6596"},{"$numberInt":"6597"},{"$numberInt":"6598"},{"$numberInt":"6599"},{"$numberInt":"6600"},{"$numberInt":"6601"},{"$numberInt":"6602"},{"$numberInt":"6603"},{"$numberInt":"6604"},{"$numberInt":"6605"},{"$numberInt":"6606"},{"$numberInt":"6607"},{"$numberInt":"6608"},{"$numberInt":"6609"},{"$numberInt":"6610"},{"$numberInt":"6611"},{"$numberInt":"6612"},{"$numberInt":"6613"},{"$numberInt":"6614"},{"$numberInt":"6615"},{"$numberInt":"6616"},{"$numberInt":"6617"},{"$numberInt":"6618"},{"$numberInt":"6619"},{"$numberInt":"6620"},{"$numberInt":"6621"},{"$numberInt":"6622"},{"$numberInt":"6623"},{"$numberInt":"6624"},{"$numberInt":"6625"},{"$numberInt":"6626"},{"$numberInt":"6627"},{"$numberInt":"6628"},{"$numberInt":"6629"},{"$numberInt":"6630"},{"$numberInt":"6631"},{"$numberInt":"6632"},{"$numberInt":"6633"},{"$numberInt":"6634"},{"$numberInt":"6635"},{"$numberInt":"6636"},{"$numberInt":"6637"},{"$numberInt":"6638"},{"$numberInt":"6639"},{"$numberInt":"6640"},{"$numberInt":"6641"},{"$numberInt":"6642"},{"$numberInt":"6643"},{"$numberInt":"6644"},{"$numberInt":"6645"},{"$numberInt":"6646"},{"$numberInt":"6647"},{"$numberInt":"6648"},{"$numberInt":"6649"},{"$numberInt":"6650"},{"$numberInt":"6651"},{"$numberInt":"6652"},{"$numberInt":"6653"},{"$numberInt":"6654"},{"$numberInt":"6655"},{"$numberInt":"6656"},{"$numberInt":"6657"},{"$numberInt":"6658"},{"$numberInt":"6659"},{"$numberInt":"6660"},{"$numberInt":"6661"},{"$numberInt":"6662"},{"$numberInt":"6663"},{"$numberInt":"6664"},{"$numberInt":"6665"},{"$numberInt":"6666"},{"$numberInt":"6667"},{"$numberInt":"6668"},{"$numberInt":"6669"},{"$numberInt":"6670"},{"$numberInt":"6671"},{"$numberInt":"6672"},{"$numberInt":"6673"},{"$numberInt":"6674"},{"$numberInt":"6675"},{"$numberInt":"6676"},{"$numberInt":"6677"},{"$numberInt":"6678"},{"$numberInt":"6679"},{"$numberInt":"6680"},{"$numberInt":"6681"},{"$numberInt":"6682"},{"$numberInt":"6683"},{"$numberInt":"6684"},{"$numberInt":"6685"},{"$numberInt":"6686"},{"$numberInt":"6687"},{"$numberInt":"6688"},{"$numberInt":"6689"},{"$numberInt":"6690"},{"$numberInt":"6691"},{"$numberInt":"6692"},{"$numberInt":"6693"},{"$numberInt":"6694"},{"$numberInt":"6695"},{"$numberInt":"6696"},{"$numberInt":"6697"},{"$numberInt":"6698"},{"$numberInt":"6699"},{"$numberInt":"6700"},{"$numberInt":"6701"},{"$numberInt":"6702"},{"$numberInt":"6703"},{"$numberInt":"6704"},{"$numberInt":"6705"},{"$numberInt":"6706"},{"$numberInt":"6707"},{"$numberInt":"6708"},{"$numberInt":"6709"},{"$numberInt":"6710"},{"$numberInt":"6711"},{"$numberInt":"6712"},{"$numberInt":"6713"},{"$numberInt":"6714"},{"$numberInt":"6715"},{"$numberInt":"6716"},{"$numberInt":"6717"},{"$numberInt":"6718"},{"$numberInt":"6719"},{"$numberInt":"6720"},{"$numberInt":"6721"},{"$numberInt":"6722"},{"$numberInt":"6723"},{"$numberInt":"6724"},{"$numberInt":"6725"},{"$numberInt":"6726"},{"$numberInt":"6727"},{"$numberInt":"6728"},{"$numberInt":"6729"},{"$numberInt":"6730"},{"$numberInt":"6731"},{"$numberInt":"6732"},{"$numberInt":"6733"},{"$numberInt":"6734"},{"$numberInt":"6735"},{"$numberInt":"6736"},{"$numberInt":"6737"},{"$numberInt":"6738"},{"$numberInt":"6739"},{"$numberInt":"6740"},{"$numberInt":"6741"},{"$numberInt":"6742"},{"$numberInt":"6743"},{"$numberInt":"6744"},{"$numberInt":"6745"},{"$numberInt":"6746"},{"$numberInt":"6747"},{"$numberInt":"6748"},{"$numberInt":"6749"},{"$numberInt":"6750"},{"$numberInt":"6751"},{"$numberInt":"6752"},{"$numberInt":"6753"},{"$numberInt":"6754"},{"$numberInt":"6755"},{"$numberInt":"6756"},{"$numberInt":"6757"},{"$numberInt":"6758"},{"$numberInt":"6759"},{"$numberInt":"6760"},{"$numberInt":"6761"},{"$numberInt":"6762"},{"$numberInt":"6763"},{"$numberInt":"6764"},{"$numberInt":"6765"},{"$numberInt":"6766"},{"$numberInt":"6767"},{"$numberInt":"6768"},{"$numberInt":"6769"},{"$numberInt":"6770"},{"$numberInt":"6771"},{"$numberInt":"6772"},{"$numberInt":"6773"},{"$numberInt":"6774"},{"$numberInt":"6775"},{"$numberInt":"6776"},{"$numberInt":"6777"},{"$numberInt":"6778"},{"$numberInt":"6779"},{"$numberInt":"6780"},{"$numberInt":"6781"},{"$numberInt":"6782"},{"$numberInt":"6783"},{"$numberInt":"6784"},{"$numberInt":"6785"},{"$numberInt":"6786"},{"$numberInt":"6787"},{"$numberInt":"6788"},{"$numberInt":"6789"},{"$numberInt":"6790"},{"$numberInt":"6791"},{"$numberInt":"6792"},{"$numberInt":"6793"},{"$numberInt":"6794"},{"$numberInt":"6795"},{"$numberInt":"6796"},{"$numberInt":"6797"},{"$numberInt":"6798"},{"$numberInt":"6799"},{"$numberInt":"6800"},{"$numberInt":"6801"},{"$numberInt":"6802"},{"$numberInt":"6803"},{"$numberInt":"6804"},{"$numberInt":"6805"},{"$numberInt":"6806"},{"$numberInt":"6807"},{"$numberInt":"6808"},{"$numberInt":"6809"},{"$numberInt":"6810"},{"$numberInt":"6811"},{"$numberInt":"6812"},{"$numberInt":"6813"},{"$numberInt":"6814"},{"$numberInt":"6815"},{"$numberInt":"6816"},{"$numberInt":"6817"},{"$numberInt":"6818"},{"$numberInt":"6819"},{"$numberInt":"6820"},{"$numberInt":"6821"},{"$numberInt":"6822"},{"$numberInt":"6823"},{"$numberInt":"6824"},{"$numberInt":"6825"},{"$numberInt":"6826"},{"$numberInt":"6827"},{"$numberInt":"6828"},{"$numberInt":"6829"},{"$numberInt":"6830"},{"$numberInt":"6831"},{"$numberInt":"6832"},{"$numberInt":"6833"},{"$numberInt":"6834"},{"$numberInt":"6835"},{"$numberInt":"6836"},{"$numberInt":"6837"},{"$numberInt":"6838"},{"$numberInt":"6839"},{"$numberInt":"6840"},{"$numberInt":"6841"},{"$numberInt":"6842"},{"$numberInt":"6843"},{"$numberInt":"6844"},{"$numberInt":"6845"},{"$numberInt":"6846"},{"$numberInt":"6847"},{"$numberInt":"6848"},{"$numberInt":"6849"},{"$numberInt":"6850"},{"$numberInt":"6851"},{"$numberInt":"6852"},{"$numberInt":"6853"},{"$numberInt":"6854"},{"$numberInt":"6855"},{"$numberInt":"6856"},{"$numberInt":"6857"},{"$numberInt":"6858"},{"$numberInt":"6859"},{"$numberInt":"6860"},{"$numberInt":"6861"},{"$numberInt":"6862"},{"$numberInt":"6863"},{"$numberInt":"6864"},{"$numberInt":"6865"},{"$numberInt":"6866"},{"$numberInt":"6867"},{"$numberInt":"6868"},{"$numberInt":"6869"},{"$numberInt":"6870"},{"$numberInt":"6871"},{"$numberInt":"6872"},{"$numberInt":"6873"},{"$numberInt":"6874"},{"$numberInt":"6875"},{"$numberInt":"6876"},{"$numberInt":"6877"},{"$numberInt":"6878"},{"$numberInt":"6879"},{"$numberInt":"6880"},{"$numberInt":"6881"},{"$numberInt":"6882"},{"$numberInt":"6883"},{"$numberInt":"6884"},{"$numberInt":"6885"},{"$numberInt":"6886"},{"$numberInt":"6887"},{"$numberInt":"6888"},{"$numberInt":"6889"},{"$numberInt":"6890"},{"$numberInt":"6891"},{"$numberInt":"6892"},{"$numberInt":"6893"},{"$numberInt":"6894"},{"$numberInt":"6895"},{"$numberInt":"6896"},{"$numberInt":"6897"},{"$numberInt":"6898"},{"$numberInt":"6899"},{"$numberInt":"6900"},{"$numberInt":"6901"},{"$numberInt":"6902"},{"$numberInt":"6903"},{"$numberInt":"6904"},{"$numberInt":"6905"},{"$numberInt":"6906"},{"$numberInt":"6907"},{"$numberInt":"6908"},{"$numberInt":"6909"},{"$numberInt":"6910"},{"$numberInt":"6911"},{"$numberInt":"6912"},{"$numberInt":"6913"},{"$numberInt":"6914"},{"$numberInt":"6915"},{"$numberInt":"6916"},{"$numberInt":"6917"},{"$numberInt":"6918"},{"$numberInt":"6919"},{"$numberInt":"6920"},{"$numberInt":"6921"},{"$numberInt":"6922"},{"$numberInt":"6923"},{"$numberInt":"6924"},{"$numberInt":"6925"},{"$numberInt":"6926"},{"$numberInt":"6927"},{"$numberInt":"6928"},{"$numberInt":"6929"},{"$numberInt":"6930"},{"$numberInt":"6931"},{"$numberInt":"6932"},{"$numberInt":"6933"},{"$numberInt":"6934"},{"$numberInt":"6935"},{"$numberInt":"6936"},{"$numberInt":"6937"},{"$numberInt":"6938"},{"$numberInt":"6939"},{"$numberInt":"6940"},{"$numberInt":"6941"},{"$numberInt":"6942"},{"$numberInt":"6943"},{"$numberInt":"6944"},{"$numberInt":"6945"},{"$numberInt":"6946"},{"$numberInt":"6947"},{"$numberInt":"6948"},{"$numberInt":"6949"},{"$numberInt":"6950"},{"$numberInt":"6951"},{"$numberInt":"6952"},{"$numberInt":"6953"},{"$numberInt":"6954"},{"$numberInt":"6955"},{"$numberInt":"6956"},{"$numberInt":"6957"},{"$numberInt":"6958"},{"$numberInt":"6959"},{"$numberInt":"6960"},{"$numberInt":"6961"},{"$numberInt":"6962"},{"$numberInt":"6963"},{"$numberInt":"6964"},{"$numberInt":"6965"},{"$numberInt":"6966"},{"$numberInt":"6967"},{"$numberInt":"6968"},{"$numberInt":"6969"},{"$numberInt":"6970"},{"$numberInt":"6971"},{"$numberInt":"6972"},{"$numberInt":"6973"},{"$numberInt":"6974"},{"$numberInt":"6975"},{"$numberInt":"6976"},{"$numberInt":"6977"},{"$numberInt":"6978"},{"$numberInt":"6979"},{"$numberInt":"6980"},{"$numberInt":"6981"},{"$numberInt":"6982"},{"$numberInt":"6983"},{"$numberInt":"6984"},{"$numberInt":"6985"},{"$numberInt":"6986"},{"$numberInt":"6987"},{"$numberInt":"6988"},{"$numberInt":"6989"},{"$numberInt":"6990"},{"$numberInt":"6991"},{"$numberInt":"6992"},{"$numberInt":"6993"},{"$numberInt":"6994"},{"$numberInt":"6995"},{"$numberInt":"6996"},{"$numberInt":"6997"},{"$numberInt":"6998"},{"$numberInt":"6999"},{"$numberInt":"7000"},{"$numberInt":"7001"},{"$numberInt":"7002"},{"$numberInt":"7003"},{"$numberInt":"7004"},{"$numberInt":"7005"},{"$numberInt":"7006"},{"$numberInt":"7007"},{"$numberInt":"7008"},{"$numberInt":"7009"},{"$numberInt":"7010"},{"$numberInt":"7011"},{"$numberInt":"7012"},{"$numberInt":"7013"},{"$numberInt":"7014"},{"$numberInt":"7015"},{"$numberInt":"7016"},{"$numberInt":"7017"},{"$numberInt":"7018"},{"$numberInt":"7019"},{"$numberInt":"7020"},{"$numberInt":"7021"},{"$numberInt":"7022"},{"$numberInt":"7023"},{"$numberInt":"7024"},{"$numberInt":"7025"},{"$numberInt":"7026"},{"$numberInt":"7027"},{"$numberInt":"7028"},{"$numberInt":"7029"},{"$numberInt":"7030"},{"$numberInt":"7031"},{"$numberInt":"7032"},{"$numberInt":"7033"},{"$numberInt":"7034"},{"$numberInt":"7035"},{"$numberInt":"7036"},{"$numberInt":"7037"},{"$numberInt":"7038"},{"$numberInt":"7039"},{"$numberInt":"7040"},{"$numberInt":"7041"},{"$numberInt":"7042"},{"$numberInt":"7043"},{"$numberInt":"7044"},{"$numberInt":"7045"},{"$numberInt":"7046"},{"$numberInt":"7047"},{"$numberInt":"7048"},{"$numberInt":"7049"},{"$numberInt":"7050"},{"$numberInt":"7051"},{"$numberInt":"7052"},{"$numberInt":"7053"},{"$numberInt":"7054"},{"$numberInt":"7055"},{"$numberInt":"7056"},{"$numberInt":"7057"},{"$numberInt":"7058"},{"$numberInt":"7059"},{"$numberInt":"7060"},{"$numberInt":"7061"},{"$numberInt":"7062"},{"$numberInt":"7063"},{"$numberInt":"7064"},{"$numberInt":"7065"},{"$numberInt":"7066"},{"$numberInt":"7067"},{"$numberInt":"7068"},{"$numberInt":"7069"},{"$numberInt":"7070"},{"$numberInt":"7071"},{"$numberInt":"7072"},{"$numberInt":"7073"},{"$numberInt":"7074"},{"$numberInt":"7075"},{"$numberInt":"7076"},{"$numberInt":"7077"},{"$numberInt":"7078"},{"$numberInt":"7079"},{"$numberInt":"7080"},{"$numberInt":"7081"},{"$numberInt":"7082"},{"$numberInt":"7083"},{"$numberInt":"7084"},{"$numberInt":"7085"},{"$numberInt":"7086"},{"$numberInt":"7087"},{"$numberInt":"7088"},{"$numberInt":"7089"},{"$numberInt":"7090"},{"$numberInt":"7091"},{"$numberInt":"7092"},{"$numberInt":"7093"},{"$numberInt":"7094"},{"$numberInt":"7095"},{"$numberInt":"7096"},{"$numberInt":"7097"},{"$numberInt":"7098"},{"$numberInt":"7099"},{"$numberInt":"7100"},{"$numberInt":"7101"},{"$numberInt":"7102"},{"$numberInt":"7103"},{"$numberInt":"7104"},{"$numberInt":"7105"},{"$numberInt":"7106"},{"$numberInt":"7107"},{"$numberInt":"7108"},{"$numberInt":"7109"},{"$numberInt":"7110"},{"$numberInt":"7111"},{"$numberInt":"7112"},{"$numberInt":"7113"},{"$numberInt":"7114"},{"$numberInt":"7115"},{"$numberInt":"7116"},{"$numberInt":"7117"},{"$numberInt":"7118"},{"$numberInt":"7119"},{"$numberInt":"7120"},{"$numberInt":"7121"},{"$numberInt":"7122"},{"$numberInt":"7123"},{"$numberInt":"7124"},{"$numberInt":"7125"},{"$numberInt":"7126"},{"$numberInt":"7127"},{"$numberInt":"7128"},{"$numberInt":"7129"},{"$numberInt":"7130"},{"$numberInt":"7131"},{"$numberInt":"7132"},{"$numberInt":"7133"},{"$numberInt":"7134"},{"$numberInt":"7135"},{"$numberInt":"7136"},{"$numberInt":"7137"},{"$numberInt":"7138"},{"$numberInt":"7139"},{"$numberInt":"7140"},{"$numberInt":"7141"},{"$numberInt":"7142"},{"$numberInt":"7143"},{"$numberInt":"7144"},{"$numberInt":"7145"},{"$numberInt":"7146"},{"$numberInt":"7147"},{"$numberInt":"7148"},{"$numberInt":"7149"},{"$numberInt":"7150"},{"$numberInt":"7151"},{"$numberInt":"7152"},{"$numberInt":"7153"},{"$numberInt":"7154"},{"$numberInt":"7155"},{"$numberInt":"7156"},{"$numberInt":"7157"},{"$numberInt":"7158"},{"$numberInt":"7159"},{"$numberInt":"7160"},{"$numberInt":"7161"},{"$numberInt":"7162"},{"$numberInt":"7163"},{"$numberInt":"7164"},{"$numberInt":"7165"},{"$numberInt":"7166"},{"$numberInt":"7167"},{"$numberInt":"7168"},{"$numberInt":"7169"},{"$numberInt":"7170"},{"$numberInt":"7171"},{"$numberInt":"7172"},{"$numberInt":"7173"},{"$numberInt":"7174"},{"$numberInt":"7175"},{"$numberInt":"7176"},{"$numberInt":"7177"},{"$numberInt":"7178"},{"$numberInt":"7179"},{"$numberInt":"7180"},{"$numberInt":"7181"},{"$numberInt":"7182"},{"$numberInt":"7183"},{"$numberInt":"7184"},{"$numberInt":"7185"},{"$numberInt":"7186"},{"$numberInt":"7187"},{"$numberInt":"7188"},{"$numberInt":"7189"},{"$numberInt":"7190"},{"$numberInt":"7191"},{"$numberInt":"7192"},{"$numberInt":"7193"},{"$numberInt":"7194"},{"$numberInt":"7195"},{"$numberInt":"7196"},{"$numberInt":"7197"},{"$numberInt":"7198"},{"$numberInt":"7199"},{"$numberInt":"7200"},{"$numberInt":"7201"},{"$numberInt":"7202"},{"$numberInt":"7203"},{"$numberInt":"7204"},{"$numberInt":"7205"},{"$numberInt":"7206"},{"$numberInt":"7207"},{"$numberInt":"7208"},{"$numberInt":"7209"},{"$numberInt":"7210"},{"$numberInt":"7211"},{"$numberInt":"7212"},{"$numberInt":"7213"},{"$numberInt":"7214"},{"$numberInt":"7215"},{"$numberInt":"7216"},{"$numberInt":"7217"},{"$numberInt":"7218"},{"$numberInt":"7219"},{"$numberInt":"7220"},{"$numberInt":"7221"},{"$numberInt":"7222"},{"$numberInt":"7223"},{"$numberInt":"7224"},{"$numberInt":"7225"},{"$numberInt":"7226"},{"$numberInt":"7227"},{"$numberInt":"7228"},{"$numberInt":"7229"},{"$numberInt":"7230"},{"$numberInt":"7231"},{"$numberInt":"7232"},{"$numberInt":"7233"},{"$numberInt":"7234"},{"$numberInt":"7235"},{"$numberInt":"7236"},{"$numberInt":"7237"},{"$numberInt":"7238"},{"$numberInt":"7239"},{"$numberInt":"7240"},{"$numberInt":"7241"},{"$numberInt":"7242"},{"$numberInt":"7243"},{"$numberInt":"7244"},{"$numberInt":"7245"},{"$numberInt":"7246"},{"$numberInt":"7247"},{"$numberInt":"7248"},{"$numberInt":"7249"},{"$numberInt":"7250"},{"$numberInt":"7251"},{"$numberInt":"7252"},{"$numberInt":"7253"},{"$numberInt":"7254"},{"$numberInt":"7255"},{"$numberInt":"7256"},{"$numberInt":"7257"},{"$numberInt":"7258"},{"$numberInt":"7259"},{"$numberInt":"7260"},{"$numberInt":"7261"},{"$numberInt":"7262"},{"$numberInt":"7263"},{"$numberInt":"7264"},{"$numberInt":"7265"},{"$numberInt":"7266"},{"$numberInt":"7267"},{"$numberInt":"7268"},{"$numberInt":"7269"},{"$numberInt":"7270"},{"$numberInt":"7271"},{"$numberInt":"7272"},{"$numberInt":"7273"},{"$numberInt":"7274"},{"$numberInt":"7275"},{"$numberInt":"7276"},{"$numberInt":"7277"},{"$numberInt":"7278"},{"$numberInt":"7279"},{"$numberInt":"7280"},{"$numberInt":"7281"},{"$numberInt":"7282"},{"$numberInt":"7283"},{"$numberInt":"7284"},{"$numberInt":"7285"},{"$numberInt":"7286"},{"$numberInt":"7287"},{"$numberInt":"7288"},{"$numberInt":"7289"},{"$numberInt":"7290"},{"$numberInt":"7291"},{"$numberInt":"7292"},{"$numberInt":"7293"},{"$numberInt":"7294"},{"$numberInt":"7295"},{"$numberInt":"7296"},{"$numberInt":"7297"},{"$numberInt":"7298"},{"$numberInt":"7299"},{"$numberInt":"7300"},{"$numberInt":"7301"},{"$numberInt":"7302"},{"$numberInt":"7303"},{"$numberInt":"7304"},{"$numberInt":"7305"},{"$numberInt":"7306"},{"$numberInt":"7307"},{"$numberInt":"7308"},{"$numberInt":"7309"},{"$numberInt":"7310"},{"$numberInt":"7311"},{"$numberInt":"7312"},{"$numberInt":"7313"},{"$numberInt":"7314"},{"$numberInt":"7315"},{"$numberInt":"7316"},{"$numberInt":"7317"},{"$numberInt":"7318"},{"$numberInt":"7319"},{"$numberInt":"7320"},{"$numberInt":"7321"},{"$numberInt":"7322"},{"$numberInt":"7323"},{"$numberInt":"7324"},{"$numberInt":"7325"},{"$numberInt":"7326"},{"$numberInt":"7327"},{"$numberInt":"7328"},{"$numberInt":"7329"},{"$numberInt":"7330"},{"$numberInt":"7331"},{"$numberInt":"7332"},{"$numberInt":"7333"},{"$numberInt":"7334"},{"$numberInt":"7335"},{"$numberInt":"7336"},{"$numberInt":"7337"},{"$numberInt":"7338"},{"$numberInt":"7339"},{"$numberInt":"7340"},{"$numberInt":"7341"},{"$numberInt":"7342"},{"$numberInt":"7343"},{"$numberInt":"7344"},{"$numberInt":"7345"},{"$numberInt":"7346"},{"$numberInt":"7347"},{"$numberInt":"7348"},{"$numberInt":"7349"},{"$numberInt":"7350"},{"$numberInt":"7351"},{"$numberInt":"7352"},{"$numberInt":"7353"},{"$numberInt":"7354"},{"$numberInt":"7355"},{"$numberInt":"7356"},{"$numberInt":"7357"},{"$numberInt":"7358"},{"$numberInt":"7359"},{"$numberInt":"7360"},{"$numberInt":"7361"},{"$numberInt":"7362"},{"$numberInt":"7363"},{"$numberInt":"7364"},{"$numberInt":"7365"},{"$numberInt":"7366"},{"$numberInt":"7367"},{"$numberInt":"7368"},{"$numberInt":"7369"},{"$numberInt":"7370"},{"$numberInt":"7371"},{"$numberInt":"7372"},{"$numberInt":"7373"},{"$numberInt":"7374"},{"$numberInt":"7375"},{"$numberInt":"7376"},{"$numberInt":"7377"},{"$numberInt":"7378"},{"$numberInt":"7379"},{"$numberInt":"7380"},{"$numberInt":"7381"},{"$numberInt":"7382"},{"$numberInt":"7383"},{"$numberInt":"7384"},{"$numberInt":"7385"},{"$numberInt":"7386"},{"$numberInt":"7387"},{"$numberInt":"7388"},{"$numberInt":"7389"},{"$numberInt":"7390"},{"$numberInt":"7391"},{"$numberInt":"7392"},{"$numberInt":"7393"},{"$numberInt":"7394"},{"$numberInt":"7395"},{"$numberInt":"7396"},{"$numberInt":"7397"},{"$numberInt":"7398"},{"$numberInt":"7399"},{"$numberInt":"7400"},{"$numberInt":"7401"},{"$numberInt":"7402"},{"$numberInt":"7403"},{"$numberInt":"7404"},{"$numberInt":"7405"},{"$numberInt":"7406"},{"$numberInt":"7407"},{"$numberInt":"7408"},{"$numberInt":"7409"},{"$numberInt":"7410"},{"$numberInt":"7411"},{"$numberInt":"7412"},{"$numberInt":"7413"},{"$numberInt":"7414"},{"$numberInt":"7415"},{"$numberInt":"7416"},{"$numberInt":"7417"},{"$numberInt":"7418"},{"$numberInt":"7419"},{"$numberInt":"7420"},{"$numberInt":"7421"},{"$numberInt":"7422"},{"$numberInt":"7423"},{"$numberInt":"7424"},{"$numberInt":"7425"},{"$numberInt":"7426"},{"$numberInt":"7427"},{"$numberInt":"7428"},{"$numberInt":"7429"},{"$numberInt":"7430"},{"$numberInt":"7431"},{"$numberInt":"7432"},{"$numberInt":"7433"},{"$numberInt":"7434"},{"$numberInt":"7435"},{"$numberInt":"7436"},{"$numberInt":"7437"},{"$numberInt":"7438"},{"$numberInt":"7439"},{"$numberInt":"7440"},{"$numberInt":"7441"},{"$numberInt":"7442"},{"$numberInt":"7443"},{"$numberInt":"7444"},{"$numberInt":"7445"},{"$numberInt":"7446"},{"$numberInt":"7447"},{"$numberInt":"7448"},{"$numberInt":"7449"},{"$numberInt":"7450"},{"$numberInt":"7451"},{"$numberInt":"7452"},{"$numberInt":"7453"},{"$numberInt":"7454"},{"$numberInt":"7455"},{"$numberInt":"7456"},{"$numberInt":"7457"},{"$numberInt":"7458"},{"$numberInt":"7459"},{"$numberInt":"7460"},{"$numberInt":"7461"},{"$numberInt":"7462"},{"$numberInt":"7463"},{"$numberInt":"7464"},{"$numberInt":"7465"},{"$numberInt":"7466"},{"$numberInt":"7467"},{"$numberInt":"7468"},{"$numberInt":"7469"},{"$numberInt":"7470"},{"$numberInt":"7471"},{"$numberInt":"7472"},{"$numberInt":"7473"},{"$numberInt":"7474"},{"$numberInt":"7475"},{"$numberInt":"7476"},{"$numberInt":"7477"},{"$numberInt":"7478"},{"$numberInt":"7479"},{"$numberInt":"7480"},{"$numberInt":"7481"},{"$numberInt":"7482"},{"$numberInt":"7483"},{"$numberInt":"7484"},{"$numberInt":"7485"},{"$numberInt":"7486"},{"$numberInt":"7487"},{"$numberInt":"7488"},{"$numberInt":"7489"},{"$numberInt":"7490"},{"$numberInt":"7491"},{"$numberInt":"7492"},{"$numberInt":"7493"},{"$numberInt":"7494"},{"$numberInt":"7495"},{"$numberInt":"7496"},{"$numberInt":"7497"},{"$numberInt":"7498"},{"$numberInt":"7499"},{"$numberInt":"7500"},{"$numberInt":"7501"},{"$numberInt":"7502"},{"$numberInt":"7503"},{"$numberInt":"7504"},{"$numberInt":"7505"},{"$numberInt":"7506"},{"$numberInt":"7507"},{"$numberInt":"7508"},{"$numberInt":"7509"},{"$numberInt":"7510"},{"$numberInt":"7511"},{"$numberInt":"7512"},{"$numberInt":"7513"},{"$numberInt":"7514"},{"$numberInt":"7515"},{"$numberInt":"7516"},{"$numberInt":"7517"},{"$numberInt":"7518"},{"$numberInt":"7519"},{"$numberInt":"7520"},{"$numberInt":"7521"},{"$numberInt":"7522"},{"$numberInt":"7523"},{"$numberInt":"7524"},{"$numberInt":"7525"},{"$numberInt":"7526"},{"$numberInt":"7527"},{"$numberInt":"7528"},{"$numberInt":"7529"},{"$numberInt":"7530"},{"$numberInt":"7531"},{"$numberInt":"7532"},{"$numberInt":"7533"},{"$numberInt":"7534"},{"$numberInt":"7535"},{"$numberInt":"7536"},{"$numberInt":"7537"},{"$numberInt":"7538"},{"$numberInt":"7539"},{"$numberInt":"7540"},{"$numberInt":"7541"},{"$numberInt":"7542"},{"$numberInt":"7543"},{"$numberInt":"7544"},{"$numberInt":"7545"},{"$numberInt":"7546"},{"$numberInt":"7547"},{"$numberInt":"7548"},{"$numberInt":"7549"},{"$numberInt":"7550"},{"$numberInt":"7551"},{"$numberInt":"7552"},{"$numberInt":"7553"},{"$numberInt":"7554"},{"$numberInt":"7555"},{"$numberInt":"7556"},{"$numberInt":"7557"},{"$numberInt":"7558"},{"$numberInt":"7559"},{"$numberInt":"7560"},{"$numberInt":"7561"},{"$numberInt":"7562"},{"$numberInt":"7563"},{"$numberInt":"7564"},{"$numberInt":"7565"},{"$numberInt":"7566"},{"$numberInt":"7567"},{"$numberInt":"7568"},{"$numberInt":"7569"},{"$numberInt":"7570"},{"$numberInt":"7571"},{"$numberInt":"7572"},{"$numberInt":"7573"},{"$numberInt":"7574"},{"$numberInt":"7575"},{"$numberInt":"7576"},{"$numberInt":"7577"},{"$numberInt":"7578"},{"$numberInt":"7579"},{"$numberInt":"7580"},{"$numberInt":"7581"},{"$numberInt":"7582"},{"$numberInt":"7583"},{"$numberInt":"7584"},{"$numberInt":"7585"},{"$numberInt":"7586"},{"$numberInt":"7587"},{"$numberInt":"7588"},{"$numberInt":"7589"},{"$numberInt":"7590"},{"$numberInt":"7591"},{"$numberInt":"7592"},{"$numberInt":"7593"},{"$numberInt":"7594"},{"$numberInt":"7595"},{"$numberInt":"7596"},{"$numberInt":"7597"},{"$numberInt":"7598"},{"$numberInt":"7599"},{"$numberInt":"7600"},{"$numberInt":"7601"},{"$numberInt":"7602"},{"$numberInt":"7603"},{"$numberInt":"7604"},{"$numberInt":"7605"},{"$numberInt":"7606"},{"$numberInt":"7607"},{"$numberInt":"7608"},{"$numberInt":"7609"},{"$numberInt":"7610"},{"$numberInt":"7611"},{"$numberInt":"7612"},{"$numberInt":"7613"},{"$numberInt":"7614"},{"$numberInt":"7615"},{"$numberInt":"7616"},{"$numberInt":"7617"},{"$numberInt":"7618"},{"$numberInt":"7619"},{"$numberInt":"7620"},{"$numberInt":"7621"},{"$numberInt":"7622"},{"$numberInt":"7623"},{"$numberInt":"7624"},{"$numberInt":"7625"},{"$numberInt":"7626"},{"$numberInt":"7627"},{"$numberInt":"7628"},{"$numberInt":"7629"},{"$numberInt":"7630"},{"$numberInt":"7631"},{"$numberInt":"7632"},{"$numberInt":"7633"},{"$numberInt":"7634"},{"$numberInt":"7635"},{"$numberInt":"7636"},{"$numberInt":"7637"},{"$numberInt":"7638"},{"$numberInt":"7639"},{"$numberInt":"7640"},{"$numberInt":"7641"},{"$numberInt":"7642"},{"$numberInt":"7643"},{"$numberInt":"7644"},{"$numberInt":"7645"},{"$numberInt":"7646"},{"$numberInt":"7647"},{"$numberInt":"7648"},{"$numberInt":"7649"},{"$numberInt":"7650"},{"$numberInt":"7651"},{"$numberInt":"7652"},{"$numberInt":"7653"},{"$numberInt":"7654"},{"$numberInt":"7655"},{"$numberInt":"7656"},{"$numberInt":"7657"},{"$numberInt":"7658"},{"$numberInt":"7659"},{"$numberInt":"7660"},{"$numberInt":"7661"},{"$numberInt":"7662"},{"$numberInt":"7663"},{"$numberInt":"7664"},{"$numberInt":"7665"},{"$numberInt":"7666"},{"$numberInt":"7667"},{"$numberInt":"7668"},{"$numberInt":"7669"},{"$numberInt":"7670"},{"$numberInt":"7671"},{"$numberInt":"7672"},{"$numberInt":"7673"},{"$numberInt":"7674"},{"$numberInt":"7675"},{"$numberInt":"7676"},{"$numberInt":"7677"},{"$numberInt":"7678"},{"$numberInt":"7679"},{"$numberInt":"7680"},{"$numberInt":"7681"},{"$numberInt":"7682"},{"$numberInt":"7683"},{"$numberInt":"7684"},{"$numberInt":"7685"},{"$numberInt":"7686"},{"$numberInt":"7687"},{"$numberInt":"7688"},{"$numberInt":"7689"},{"$numberInt":"7690"},{"$numberInt":"7691"},{"$numberInt":"7692"},{"$numberInt":"7693"},{"$numberInt":"7694"},{"$numberInt":"7695"},{"$numberInt":"7696"},{"$numberInt":"7697"},{"$numberInt":"7698"},{"$numberInt":"7699"},{"$numberInt":"7700"},{"$numberInt":"7701"},{"$numberInt":"7702"},{"$numberInt":"7703"},{"$numberInt":"7704"},{"$numberInt":"7705"},{"$numberInt":"7706"},{"$numberInt":"7707"},{"$numberInt":"7708"},{"$numberInt":"7709"},{"$numberInt":"7710"},{"$numberInt":"7711"},{"$numberInt":"7712"},{"$numberInt":"7713"},{"$numberInt":"7714"},{"$numberInt":"7715"},{"$numberInt":"7716"},{"$numberInt":"7717"},{"$numberInt":"7718"},{"$numberInt":"7719"},{"$numberInt":"7720"},{"$numberInt":"7721"},{"$numberInt":"7722"},{"$numberInt":"7723"},{"$numberInt":"7724"},{"$numberInt":"7725"},{"$numberInt":"7726"},{"$numberInt":"7727"},{"$numberInt":"7728"},{"$numberInt":"7729"},{"$numberInt":"7730"},{"$numberInt":"7731"},{"$numberInt":"7732"},{"$numberInt":"7733"},{"$numberInt":"7734"},{"$numberInt":"7735"},{"$numberInt":"7736"},{"$numberInt":"7737"},{"$numberInt":"7738"},{"$numberInt":"7739"},{"$numberInt":"7740"},{"$numberInt":"7741"},{"$numberInt":"7742"},{"$numberInt":"7743"},{"$numberInt":"7744"},{"$numberInt":"7745"},{"$numberInt":"7746"},{"$numberInt":"7747"},{"$numberInt":"7748"},{"$numberInt":"7749"},{"$numberInt":"7750"},{"$numberInt":"7751"},{"$numberInt":"7752"},{"$numberInt":"7753"},{"$numberInt":"7754"},{"$numberInt":"7755"},{"$numberInt":"7756"},{"$numberInt":"7757"},{"$numberInt":"7758"},{"$numberInt":"7759"},{"$numberInt":"7760"},{"$numberInt":"7761"},{"$numberInt":"7762"},{"$numberInt":"7763"},{"$numberInt":"7764"},{"$numberInt":"7765"},{"$numberInt":"7766"},{"$numberInt":"7767"},{"$numberInt":"7768"},{"$numberInt":"7769"},{"$numberInt":"7770"},{"$numberInt":"7771"},{"$numberInt":"7772"},{"$numberInt":"7773"},{"$numberInt":"7774"},{"$numberInt":"7775"},{"$numberInt":"7776"},{"$numberInt":"7777"},{"$numberInt":"7778"},{"$numberInt":"7779"},{"$numberInt":"7780"},{"$numberInt":"7781"},{"$numberInt":"7782"},{"$numberInt":"7783"},{"$numberInt":"7784"},{"$numberInt":"7785"},{"$numberInt":"7786"},{"$numberInt":"7787"},{"$numberInt":"7788"},{"$numberInt":"7789"},{"$numberInt":"7790"},{"$numberInt":"7791"},{"$numberInt":"7792"},{"$numberInt":"7793"},{"$numberInt":"7794"},{"$numberInt":"7795"},{"$numberInt":"7796"},{"$numberInt":"7797"},{"$numberInt":"7798"},{"$numberInt":"7799"},{"$numberInt":"7800"},{"$numberInt":"7801"},{"$numberInt":"7802"},{"$numberInt":"7803"},{"$numberInt":"7804"},{"$numberInt":"7805"},{"$numberInt":"7806"},{"$numberInt":"7807"},{"$numberInt":"7808"},{"$numberInt":"7809"},{"$numberInt":"7810"},{"$numberInt":"7811"},{"$numberInt":"7812"},{"$numberInt":"7813"},{"$numberInt":"7814"},{"$numberInt":"7815"},{"$numberInt":"7816"},{"$numberInt":"7817"},{"$numberInt":"7818"},{"$numberInt":"7819"},{"$numberInt":"7820"},{"$numberInt":"7821"},{"$numberInt":"7822"},{"$numberInt":"7823"},{"$numberInt":"7824"},{"$numberInt":"7825"},{"$numberInt":"7826"},{"$numberInt":"7827"},{"$numberInt":"7828"},{"$numberInt":"7829"},{"$numberInt":"7830"},{"$numberInt":"7831"},{"$numberInt":"7832"},{"$numberInt":"7833"},{"$numberInt":"7834"},{"$numberInt":"7835"},{"$numberInt":"7836"},{"$numberInt":"7837"},{"$numberInt":"7838"},{"$numberInt":"7839"},{"$numberInt":"7840"},{"$numberInt":"7841"},{"$numberInt":"7842"},{"$numberInt":"7843"},{"$numberInt":"7844"},{"$numberInt":"7845"},{"$numberInt":"7846"},{"$numberInt":"7847"},{"$numberInt":"7848"},{"$numberInt":"7849"},{"$numberInt":"7850"},{"$numberInt":"7851"},{"$numberInt":"7852"},{"$numberInt":"7853"},{"$numberInt":"7854"},{"$numberInt":"7855"},{"$numberInt":"7856"},{"$numberInt":"7857"},{"$numberInt":"7858"},{"$numberInt":"7859"},{"$numberInt":"7860"},{"$numberInt":"7861"},{"$numberInt":"7862"},{"$numberInt":"7863"},{"$numberInt":"7864"},{"$numberInt":"7865"},{"$numberInt":"7866"},{"$numberInt":"7867"},{"$numberInt":"7868"},{"$numberInt":"7869"},{"$numberInt":"7870"},{"$numberInt":"7871"},{"$numberInt":"7872"},{"$numberInt":"7873"},{"$numberInt":"7874"},{"$numberInt":"7875"},{"$numberInt":"7876"},{"$numberInt":"7877"},{"$numberInt":"7878"},{"$numberInt":"7879"},{"$numberInt":"7880"},{"$numberInt":"7881"},{"$numberInt":"7882"},{"$numberInt":"7883"},{"$numberInt":"7884"},{"$numberInt":"7885"},{"$numberInt":"7886"},{"$numberInt":"7887"},{"$numberInt":"7888"},{"$numberInt":"7889"},{"$numberInt":"7890"},{"$numberInt":"7891"},{"$numberInt":"7892"},{"$numberInt":"7893"},{"$numberInt":"7894"},{"$numberInt":"7895"},{"$numberInt":"7896"},{"$numberInt":"7897"},{"$numberInt":"7898"},{"$numberInt":"7899"},{"$numberInt":"7900"},{"$numberInt":"7901"},{"$numberInt":"7902"},{"$numberInt":"7903"},{"$numberInt":"7904"},{"$numberInt":"7905"},{"$numberInt":"7906"},{"$numberInt":"7907"},{"$numberInt":"7908"},{"$numberInt":"7909"},{"$numberInt":"7910"},{"$numberInt":"7911"},{"$numberInt":"7912"},{"$numberInt":"7913"},{"$numberInt":"7914"},{"$numberInt":"7915"},{"$numberInt":"7916"},{"$numberInt":"7917"},{"$numberInt":"7918"},{"$numberInt":"7919"},{"$numberInt":"7920"},{"$numberInt":"7921"},{"$numberInt":"7922"},{"$numberInt":"7923"},{"$numberInt":"7924"},{"$numberInt":"7925"},{"$numberInt":"7926"},{"$numberInt":"7927"},{"$numberInt":"7928"},{"$numberInt":"7929"},{"$numberInt":"7930"},{"$numberInt":"7931"},{"$numberInt":"7932"},{"$numberInt":"7933"},{"$numberInt":"7934"},{"$numberInt":"7935"},{"$numberInt":"7936"},{"$numberInt":"7937"},{"$numberInt":"7938"},{"$numberInt":"7939"},{"$numberInt":"7940"},{"$numberInt":"7941"},{"$numberInt":"7942"},{"$numberInt":"7943"},{"$numberInt":"7944"},{"$numberInt":"7945"},{"$numberInt":"7946"},{"$numberInt":"7947"},{"$numberInt":"7948"},{"$numberInt":"7949"},{"$numberInt":"7950"},{"$numberInt":"7951"},{"$numberInt":"7952"},{"$numberInt":"7953"},{"$numberInt":"7954"},{"$numberInt":"7955"},{"$numberInt":"7956"},{"$numberInt":"7957"},{"$numberInt":"7958"},{"$numberInt":"7959"},{"$numberInt":"7960"},{"$numberInt":"7961"},{"$numberInt":"7962"},{"$numberInt":"7963"},{"$numberInt":"7964"},{"$numberInt":"7965"},{"$numberInt":"7966"},{"$numberInt":"7967"},{"$numberInt":"7968"},{"$numberInt":"7969"},{"$numberInt":"7970"},{"$numberInt":"7971"},{"$numberInt":"7972"},{"$numberInt":"7973"},{"$numberInt":"7974"},{"$numberInt":"7975"},{"$numberInt":"7976"},{"$numberInt":"7977"},{"$numberInt":"7978"},{"$numberInt":"7979"},{"$numberInt":"7980"},{"$numberInt":"7981"},{"$numberInt":"7982"},{"$numberInt":"7983"},{"$numberInt":"7984"},{"$numberInt":"7985"},{"$numberInt":"7986"},{"$numberInt":"7987"},{"$numberInt":"7988"},{"$numberInt":"7989"},{"$numberInt":"7990"},{"$numberInt":"7991"},{"$numberInt":"7992"},{"$numberInt":"7993"},{"$numberInt":"7994"},{"$numberInt":"7995"},{"$numberInt":"7996"},{"$numberInt":"7997"},{"$numberInt":"7998"},{"$numberInt":"7999"},{"$numberInt":"8000"},{"$numberInt":"8001"},{"$numberInt":"8002"},{"$numberInt":"8003"},{"$numberInt":"8004"},{"$numberInt":"8005"},{"$numberInt":"8006"},{"$numberInt":"8007"},{"$numberInt":"8008"},{"$numberInt":"8009"},{"$numberInt":"8010"},{"$numberInt":"8011"},{"$numberInt":"8012"},{"$numberInt":"8013"},{"$numberInt":"8014"},{"$numberInt":"8015"},{"$numberInt":"8016"},{"$numberInt":"8017"},{"$numberInt":"8018"},{"$numberInt":"8019"},{"$numberInt":"8020"},{"$numberInt":"8021"},{"$numberInt":"8022"},{"$numberInt":"8023"},{"$numberInt":"8024"},{"$numberInt":"8025"},{"$numberInt":"8026"},{"$numberInt":"8027"},{"$numberInt":"8028"},{"$numberInt":"8029"},{"$numberInt":"8030"},{"$numberInt":"8031"},{"$numberInt":"8032"},{"$numberInt":"8033"},{"$numberInt":"8034"},{"$numberInt":"8035"},{"$numberInt":"8036"},{"$numberInt":"8037"},{"$numberInt":"8038"},{"$numberInt":"8039"},{"$numberInt":"8040"},{"$numberInt":"8041"},{"$numberInt":"8042"},{"$numberInt":"8043"},{"$numberInt":"8044"},{"$numberInt":"8045"},{"$numberInt":"8046"},{"$numberInt":"8047"},{"$numberInt":"8048"},{"$numberInt":"8049"},{"$numberInt":"8050"},{"$numberInt":"8051"},{"$numberInt":"8052"},{"$numberInt":"8053"},{"$numberInt":"8054"},{"$numberInt":"8055"},{"$numberInt":"8056"},{"$numberInt":"8057"},{"$numberInt":"8058"},{"$numberInt":"8059"},{"$numberInt":"8060"},{"$numberInt":"8061"},{"$numberInt":"8062"},{"$numberInt":"8063"},{"$numberInt":"8064"},{"$numberInt":"8065"},{"$numberInt":"8066"},{"$numberInt":"8067"},{"$numberInt":"8068"},{"$numberInt":"8069"},{"$numberInt":"8070"},{"$numberInt":"8071"},{"$numberInt":"8072"},{"$numberInt":"8073"},{"$numberInt":"8074"},{"$numberInt":"8075"},{"$numberInt":"8076"},{"$numberInt":"8077"},{"$numberInt":"8078"},{"$numberInt":"8079"},{"$numberInt":"8080"},{"$numberInt":"8081"},{"$numberInt":"8082"},{"$numberInt":"8083"},{"$numberInt":"8084"},{"$numberInt":"8085"},{"$numberInt":"8086"},{"$numberInt":"8087"},{"$numberInt":"8088"},{"$numberInt":"8089"},{"$numberInt":"8090"},{"$numberInt":"8091"},{"$numberInt":"8092"},{"$numberInt":"8093"},{"$numberInt":"8094"},{"$numberInt":"8095"},{"$numberInt":"8096"},{"$numberInt":"8097"},{"$numberInt":"8098"},{"$numberInt":"8099"},{"$numberInt":"8100"},{"$numberInt":"8101"},{"$numberInt":"8102"},{"$numberInt":"8103"},{"$numberInt":"8104"},{"$numberInt":"8105"},{"$numberInt":"8106"},{"$numberInt":"8107"},{"$numberInt":"8108"},{"$numberInt":"8109"},{"$numberInt":"8110"},{"$numberInt":"8111"},{"$numberInt":"8112"},{"$numberInt":"8113"},{"$numberInt":"8114"},{"$numberInt":"8115"},{"$numberInt":"8116"},{"$numberInt":"8117"},{"$numberInt":"8118"},{"$numberInt":"8119"},{"$numberInt":"8120"},{"$numberInt":"8121"},{"$numberInt":"8122"},{"$numberInt":"8123"},{"$numberInt":"8124"},{"$numberInt":"8125"},{"$numberInt":"8126"},{"$numberInt":"8127"},{"$numberInt":"8128"},{"$numberInt":"8129"},{"$numberInt":"8130"},{"$numberInt":"8131"},{"$numberInt":"8132"},{"$numberInt":"8133"},{"$numberInt":"8134"},{"$numberInt":"8135"},{"$numberInt":"8136"},{"$numberInt":"8137"},{"$numberInt":"8138"},{"$numberInt":"8139"},{"$numberInt":"8140"},{"$numberInt":"8141"},{"$numberInt":"8142"},{"$numberInt":"8143"},{"$numberInt":"8144"},{"$numberInt":"8145"},{"$numberInt":"8146"},{"$numberInt":"8147"},{"$numberInt":"8148"},{"$numberInt":"8149"},{"$numberInt":"8150"},{"$numberInt":"8151"},{"$numberInt":"8152"},{"$numberInt":"8153"},{"$numberInt":"8154"},{"$numberInt":"8155"},{"$numberInt":"8156"},{"$numberInt":"8157"},{"$numberInt":"8158"},{"$numberInt":"8159"},{"$numberInt":"8160"},{"$numberInt":"8161"},{"$numberInt":"8162"},{"$numberInt":"8163"},{"$numberInt":"8164"},{"$numberInt":"8165"},{"$numberInt":"8166"},{"$numberInt":"8167"},{"$numberInt":"8168"},{"$numberInt":"8169"},{"$numberInt":"8170"},{"$numberInt":"8171"},{"$numberInt":"8172"},{"$numberInt":"8173"},{"$numberInt":"8174"},{"$numberInt":"8175"},{"$numberInt":"8176"},{"$numberInt":"8177"},{"$numberInt":"8178"},{"$numberInt":"8179"},{"$numberInt":"8180"},{"$numberInt":"8181"},{"$numberInt":"8182"},{"$numberInt":"8183"},{"$numberInt":"8184"},{"$numberInt":"8185"},{"$numberInt":"8186"},{"$numberInt":"8187"},{"$numberInt":"8188"},{"$numberInt":"8189"},{"$numberInt":"8190"},{"$numberInt":"8191"},{"$numberInt":"8192"},{"$numberInt":"8193"},{"$numberInt":"8194"},{"$numberInt":"8195"},{"$numberInt":"8196"},{"$numberInt":"8197"},{"$numberInt":"8198"},{"$numberInt":"8199"},{"$numberInt":"8200"},{"$numberInt":"8201"},{"$numberInt":"8202"},{"$numberInt":"8203"},{"$numberInt":"8204"},{"$numberInt":"8205"},{"$numberInt":"8206"},{"$numberInt":"8207"},{"$numberInt":"8208"},{"$numberInt":"8209"},{"$numberInt":"8210"},{"$numberInt":"8211"},{"$numberInt":"8212"},{"$numberInt":"8213"},{"$numberInt":"8214"},{"$numberInt":"8215"},{"$numberInt":"8216"},{"$numberInt":"8217"},{"$numberInt":"8218"},{"$numberInt":"8219"},{"$numberInt":"8220"},{"$numberInt":"8221"},{"$numberInt":"8222"},{"$numberInt":"8223"},{"$numberInt":"8224"},{"$numberInt":"8225"},{"$numberInt":"8226"},{"$numberInt":"8227"},{"$numberInt":"8228"},{"$numberInt":"8229"},{"$numberInt":"8230"},{"$numberInt":"8231"},{"$numberInt":"8232"},{"$numberInt":"8233"},{"$numberInt":"8234"},{"$numberInt":"8235"},{"$numberInt":"8236"},{"$numberInt":"8237"},{"$numberInt":"8238"},{"$numberInt":"8239"},{"$numberInt":"8240"},{"$numberInt":"8241"},{"$numberInt":"8242"},{"$numberInt":"8243"},{"$numberInt":"8244"},{"$numberInt":"8245"},{"$numberInt":"8246"},{"$numberInt":"8247"},{"$numberInt":"8248"},{"$numberInt":"8249"},{"$numberInt":"8250"},{"$numberInt":"8251"},{"$numberInt":"8252"},{"$numberInt":"8253"},{"$numberInt":"8254"},{"$numberInt":"8255"},{"$numberInt":"8256"},{"$numberInt":"8257"},{"$numberInt":"8258"},{"$numberInt":"8259"},{"$numberInt":"8260"},{"$numberInt":"8261"},{"$numberInt":"8262"},{"$numberInt":"8263"},{"$numberInt":"8264"},{"$numberInt":"8265"},{"$numberInt":"8266"},{"$numberInt":"8267"},{"$numberInt":"8268"},{"$numberInt":"8269"},{"$numberInt":"8270"},{"$numberInt":"8271"},{"$numberInt":"8272"},{"$numberInt":"8273"},{"$numberInt":"8274"},{"$numberInt":"8275"},{"$numberInt":"8276"},{"$numberInt":"8277"},{"$numberInt":"8278"},{"$numberInt":"8279"},{"$numberInt":"8280"},{"$numberInt":"8281"},{"$numberInt":"8282"},{"$numberInt":"8283"},{"$numberInt":"8284"},{"$numberInt":"8285"},{"$numberInt":"8286"},{"$numberInt":"8287"},{"$numberInt":"8288"},{"$numberInt":"8289"},{"$numberInt":"8290"},{"$numberInt":"8291"},{"$numberInt":"8292"},{"$numberInt":"8293"},{"$numberInt":"8294"},{"$numberInt":"8295"},{"$numberInt":"8296"},{"$numberInt":"8297"},{"$numberInt":"8298"},{"$numberInt":"8299"},{"$numberInt":"8300"},{"$numberInt":"8301"},{"$numberInt":"8302"},{"$numberInt":"8303"},{"$numberInt":"8304"},{"$numberInt":"8305"},{"$numberInt":"8306"},{"$numberInt":"8307"},{"$numberInt":"8308"},{"$numberInt":"8309"},{"$numberInt":"8310"},{"$numberInt":"8311"},{"$numberInt":"8312"},{"$numberInt":"8313"},{"$numberInt":"8314"},{"$numberInt":"8315"},{"$numberInt":"8316"},{"$numberInt":"8317"},{"$numberInt":"8318"},{"$numberInt":"8319"},{"$numberInt":"8320"},{"$numberInt":"8321"},{"$numberInt":"8322"},{"$numberInt":"8323"},{"$numberInt":"8324"},{"$numberInt":"8325"},{"$numberInt":"8326"},{"$numberInt":"8327"},{"$numberInt":"8328"},{"$numberInt":"8329"},{"$numberInt":"8330"},{"$numberInt":"8331"},{"$numberInt":"8332"},{"$numberInt":"8333"},{"$numberInt":"8334"},{"$numberInt":"8335"},{"$numberInt":"8336"},{"$numberInt":"8337"},{"$numberInt":"8338"},{"$numberInt":"8339"},{"$numberInt":"8340"},{"$numberInt":"8341"},{"$numberInt":"8342"},{"$numberInt":"8343"},{"$numberInt":"8344"},{"$numberInt":"8345"},{"$numberInt":"8346"},{"$numberInt":"8347"},{"$numberInt":"8348"},{"$numberInt":"8349"},{"$numberInt":"8350"},{"$numberInt":"8351"},{"$numberInt":"8352"},{"$numberInt":"8353"},{"$numberInt":"8354"},{"$numberInt":"8355"},{"$numberInt":"8356"},{"$numberInt":"8357"},{"$numberInt":"8358"},{"$numberInt":"8359"},{"$numberInt":"8360"},{"$numberInt":"8361"},{"$numberInt":"8362"},{"$numberInt":"8363"},{"$numberInt":"8364"},{"$numberInt":"8365"},{"$numberInt":"8366"},{"$numberInt":"8367"},{"$numberInt":"8368"},{"$numberInt":"8369"},{"$numberInt":"8370"},{"$numberInt":"8371"},{"$numberInt":"8372"},{"$numberInt":"8373"},{"$numberInt":"8374"},{"$numberInt":"8375"},{"$numberInt":"8376"},{"$numberInt":"8377"},{"$numberInt":"8378"},{"$numberInt":"8379"},{"$numberInt":"8380"},{"$numberInt":"8381"},{"$numberInt":"8382"},{"$numberInt":"8383"},{"$numberInt":"8384"},{"$numberInt":"8385"},{"$numberInt":"8386"},{"$numberInt":"8387"},{"$numberInt":"8388"},{"$numberInt":"8389"},{"$numberInt":"8390"},{"$numberInt":"8391"},{"$numberInt":"8392"},{"$numberInt":"8393"},{"$numberInt":"8394"},{"$numberInt":"8395"},{"$numberInt":"8396"},{"$numberInt":"8397"},{"$numberInt":"8398"},{"$numberInt":"8399"},{"$numberInt":"8400"},{"$numberInt":"8401"},{"$numberInt":"8402"},{"$numberInt":"8403"},{"$numberInt":"8404"},{"$numberInt":"8405"},{"$numberInt":"8406"},{"$numberInt":"8407"},{"$numberInt":"8408"},{"$numberInt":"8409"},{"$numberInt":"8410"},{"$numberInt":"8411"},{"$numberInt":"8412"},{"$numberInt":"8413"},{"$numberInt":"8414"},{"$numberInt":"8415"},{"$numberInt":"8416"},{"$numberInt":"8417"},{"$numberInt":"8418"},{"$numberInt":"8419"},{"$numberInt":"8420"},{"$numberInt":"8421"},{"$numberInt":"8422"},{"$numberInt":"8423"},{"$numberInt":"8424"},{"$numberInt":"8425"},{"$numberInt":"8426"},{"$numberInt":"8427"},{"$numberInt":"8428"},{"$numberInt":"8429"},{"$numberInt":"8430"},{"$numberInt":"8431"},{"$numberInt":"8432"},{"$numberInt":"8433"},{"$numberInt":"8434"},{"$numberInt":"8435"},{"$numberInt":"8436"},{"$numberInt":"8437"},{"$numberInt":"8438"},{"$numberInt":"8439"},{"$numberInt":"8440"},{"$numberInt":"8441"},{"$numberInt":"8442"},{"$numberInt":"8443"},{"$numberInt":"8444"},{"$numberInt":"8445"},{"$numberInt":"8446"},{"$numberInt":"8447"},{"$numberInt":"8448"},{"$numberInt":"8449"},{"$numberInt":"8450"},{"$numberInt":"8451"},{"$numberInt":"8452"},{"$numberInt":"8453"},{"$numberInt":"8454"},{"$numberInt":"8455"},{"$numberInt":"8456"},{"$numberInt":"8457"},{"$numberInt":"8458"},{"$numberInt":"8459"},{"$numberInt":"8460"},{"$numberInt":"8461"},{"$numberInt":"8462"},{"$numberInt":"8463"},{"$numberInt":"8464"},{"$numberInt":"8465"},{"$numberInt":"8466"},{"$numberInt":"8467"},{"$numberInt":"8468"},{"$numberInt":"8469"},{"$numberInt":"8470"},{"$numberInt":"8471"},{"$numberInt":"8472"},{"$numberInt":"8473"},{"$numberInt":"8474"},{"$numberInt":"8475"},{"$numberInt":"8476"},{"$numberInt":"8477"},{"$numberInt":"8478"},{"$numberInt":"8479"},{"$numberInt":"8480"},{"$numberInt":"8481"},{"$numberInt":"8482"},{"$numberInt":"8483"},{"$numberInt":"8484"},{"$numberInt":"8485"},{"$numberInt":"8486"},{"$numberInt":"8487"},{"$numberInt":"8488"},{"$numberInt":"8489"},{"$numberInt":"8490"},{"$numberInt":"8491"},{"$numberInt":"8492"},{"$numberInt":"8493"},{"$numberInt":"8494"},{"$numberInt":"8495"},{"$numberInt":"8496"},{"$numberInt":"8497"},{"$numberInt":"8498"},{"$numberInt":"8499"},{"$numberInt":"8500"},{"$numberInt":"8501"},{"$numberInt":"8502"},{"$numberInt":"8503"},{"$numberInt":"8504"},{"$numberInt":"8505"},{"$numberInt":"8506"},{"$numberInt":"8507"},{"$numberInt":"8508"},{"$numberInt":"8509"},{"$numberInt":"8510"},{"$numberInt":"8511"},{"$numberInt":"8512"},{"$numberInt":"8513"},{"$numberInt":"8514"},{"$numberInt":"8515"},{"$numberInt":"8516"},{"$numberInt":"8517"},{"$numberInt":"8518"},{"$numberInt":"8519"},{"$numberInt":"8520"},{"$numberInt":"8521"},{"$numberInt":"8522"},{"$numberInt":"8523"},{"$numberInt":"8524"},{"$numberInt":"8525"},{"$numberInt":"8526"},{"$numberInt":"8527"},{"$numberInt":"8528"},{"$numberInt":"8529"},{"$numberInt":"8530"},{"$numberInt":"8531"},{"$numberInt":"8532"},{"$numberInt":"8533"},{"$numberInt":"8534"},{"$numberInt":"8535"},{"$numberInt":"8536"},{"$numberInt":"8537"},{"$numberInt":"8538"},{"$numberInt":"8539"},{"$numberInt":"8540"},{"$numberInt":"8541"},{"$numberInt":"8542"},{"$numberInt":"8543"},{"$numberInt":"8544"},{"$numberInt":"8545"},{"$numberInt":"8546"},{"$numberInt":"8547"},{"$numberInt":"8548"},{"$numberInt":"8549"},{"$numberInt":"8550"},{"$numberInt":"8551"},{"$numberInt":"8552"},{"$numberInt":"8553"},{"$numberInt":"8554"},{"$numberInt":"8555"},{"$numberInt":"8556"},{"$numberInt":"8557"},{"$numberInt":"8558"},{"$numberInt":"8559"},{"$numberInt":"8560"},{"$numberInt":"8561"},{"$numberInt":"8562"},{"$numberInt":"8563"},{"$numberInt":"8564"},{"$numberInt":"8565"},{"$numberInt":"8566"},{"$numberInt":"8567"},{"$numberInt":"8568"},{"$numberInt":"8569"},{"$numberInt":"8570"},{"$numberInt":"8571"},{"$numberInt":"8572"},{"$numberInt":"8573"},{"$numberInt":"8574"},{"$numberInt":"8575"},{"$numberInt":"8576"},{"$numberInt":"8577"},{"$numberInt":"8578"},{"$numberInt":"8579"},{"$numberInt":"8580"},{"$numberInt":"8581"},{"$numberInt":"8582"},{"$numberInt":"8583"},{"$numberInt":"8584"},{"$numberInt":"8585"},{"$numberInt":"8586"},{"$numberInt":"8587"},{"$numberInt":"8588"},{"$numberInt":"8589"},{"$numberInt":"8590"},{"$numberInt":"8591"},{"$numberInt":"8592"},{"$numberInt":"8593"},{"$numberInt":"8594"},{"$numberInt":"8595"},{"$numberInt":"8596"},{"$numberInt":"8597"},{"$numberInt":"8598"},{"$numberInt":"8599"},{"$numberInt":"8600"},{"$numberInt":"8601"},{"$numberInt":"8602"},{"$numberInt":"8603"},{"$numberInt":"8604"},{"$numberInt":"8605"},{"$numberInt":"8606"},{"$numberInt":"8607"},{"$numberInt":"8608"},{"$numberInt":"8609"},{"$numberInt":"8610"},{"$numberInt":"8611"},{"$numberInt":"8612"},{"$numberInt":"8613"},{"$numberInt":"8614"},{"$numberInt":"8615"},{"$numberInt":"8616"},{"$numberInt":"8617"},{"$numberInt":"8618"},{"$numberInt":"8619"},{"$numberInt":"8620"},{"$numberInt":"8621"},{"$numberInt":"8622"},{"$numberInt":"8623"},{"$numberInt":"8624"},{"$numberInt":"8625"},{"$numberInt":"8626"},{"$numberInt":"8627"},{"$numberInt":"8628"},{"$numberInt":"8629"},{"$numberInt":"8630"},{"$numberInt":"8631"},{"$numberInt":"8632"},{"$numberInt":"8633"},{"$numberInt":"8634"},{"$numberInt":"8635"},{"$numberInt":"8636"},{"$numberInt":"8637"},{"$numberInt":"8638"},{"$numberInt":"8639"},{"$numberInt":"8640"},{"$numberInt":"8641"},{"$numberInt":"8642"},{"$numberInt":"8643"},{"$numberInt":"8644"},{"$numberInt":"8645"},{"$numberInt":"8646"},{"$numberInt":"8647"},{"$numberInt":"8648"},{"$numberInt":"8649"},{"$numberInt":"8650"},{"$numberInt":"8651"},{"$numberInt":"8652"},{"$numberInt":"8653"},{"$numberInt":"8654"},{"$numberInt":"8655"},{"$numberInt":"8656"},{"$numberInt":"8657"},{"$numberInt":"8658"},{"$numberInt":"8659"},{"$numberInt":"8660"},{"$numberInt":"8661"},{"$numberInt":"8662"},{"$numberInt":"8663"},{"$numberInt":"8664"},{"$numberInt":"8665"},{"$numberInt":"8666"},{"$numberInt":"8667"},{"$numberInt":"8668"},{"$numberInt":"8669"},{"$numberInt":"8670"},{"$numberInt":"8671"},{"$numberInt":"8672"},{"$numberInt":"8673"},{"$numberInt":"8674"},{"$numberInt":"8675"},{"$numberInt":"8676"},{"$numberInt":"8677"},{"$numberInt":"8678"},{"$numberInt":"8679"},{"$numberInt":"8680"},{"$numberInt":"8681"},{"$numberInt":"8682"},{"$numberInt":"8683"},{"$numberInt":"8684"},{"$numberInt":"8685"},{"$numberInt":"8686"},{"$numberInt":"8687"},{"$numberInt":"8688"},{"$numberInt":"8689"},{"$numberInt":"8690"},{"$numberInt":"8691"},{"$numberInt":"8692"},{"$numberInt":"8693"},{"$numberInt":"8694"},{"$numberInt":"8695"},{"$numberInt":"8696"},{"$numberInt":"8697"},{"$numberInt":"8698"},{"$numberInt":"8699"},{"$numberInt":"8700"},{"$numberInt":"8701"},{"$numberInt":"8702"},{"$numberInt":"8703"},{"$numberInt":"8704"},{"$numberInt":"8705"},{"$numberInt":"8706"},{"$numberInt":"8707"},{"$numberInt":"8708"},{"$numberInt":"8709"},{"$numberInt":"8710"},{"$numberInt":"8711"},{"$numberInt":"8712"},{"$numberInt":"8713"},{"$numberInt":"8714"},{"$numberInt":"8715"},{"$numberInt":"8716"},{"$numberInt":"8717"},{"$numberInt":"8718"},{"$numberInt":"8719"},{"$numberInt":"8720"},{"$numberInt":"8721"},{"$numberInt":"8722"},{"$numberInt":"8723"},{"$numberInt":"8724"},{"$numberInt":"8725"},{"$numberInt":"8726"},{"$numberInt":"8727"},{"$numberInt":"8728"},{"$numberInt":"8729"},{"$numberInt":"8730"},{"$numberInt":"8731"},{"$numberInt":"8732"},{"$numberInt":"8733"},{"$numberInt":"8734"},{"$numberInt":"8735"},{"$numberInt":"8736"},{"$numberInt":"8737"},{"$numberInt":"8738"},{"$numberInt":"8739"},{"$numberInt":"8740"},{"$numberInt":"8741"},{"$numberInt":"8742"},{"$numberInt":"8743"},{"$numberInt":"8744"},{"$numberInt":"8745"},{"$numberInt":"8746"},{"$numberInt":"8747"},{"$numberInt":"8748"},{"$numberInt":"8749"},{"$numberInt":"8750"},{"$numberInt":"8751"},{"$numberInt":"8752"},{"$numberInt":"8753"},{"$numberInt":"8754"},{"$numberInt":"8755"},{"$numberInt":"8756"},{"$numberInt":"8757"},{"$numberInt":"8758"},{"$numberInt":"8759"},{"$numberInt":"8760"},{"$numberInt":"8761"},{"$numberInt":"8762"},{"$numberInt":"8763"},{"$numberInt":"8764"},{"$numberInt":"8765"},{"$numberInt":"8766"},{"$numberInt":"8767"},{"$numberInt":"8768"},{"$numberInt":"8769"},{"$numberInt":"8770"},{"$numberInt":"8771"},{"$numberInt":"8772"},{"$numberInt":"8773"},{"$numberInt":"8774"},{"$numberInt":"8775"},{"$numberInt":"8776"},{"$numberInt":"8777"},{"$numberInt":"8778"},{"$numberInt":"8779"},{"$numberInt":"8780"},{"$numberInt":"8781"},{"$numberInt":"8782"},{"$numberInt":"8783"},{"$numberInt":"8784"},{"$numberInt":"8785"},{"$numberInt":"8786"},{"$numberInt":"8787"},{"$numberInt":"8788"},{"$numberInt":"8789"},{"$numberInt":"8790"},{"$numberInt":"8791"},{"$numberInt":"8792"},{"$numberInt":"8793"},{"$numberInt":"8794"},{"$numberInt":"8795"},{"$numberInt":"8796"},{"$numberInt":"8797"},{"$numberInt":"8798"},{"$numberInt":"8799"},{"$numberInt":"8800"},{"$numberInt":"8801"},{"$numberInt":"8802"},{"$numberInt":"8803"},{"$numberInt":"8804"},{"$numberInt":"8805"},{"$numberInt":"8806"},{"$numberInt":"8807"},{"$numberInt":"8808"},{"$numberInt":"8809"},{"$numberInt":"8810"},{"$numberInt":"8811"},{"$numberInt":"8812"},{"$numberInt":"8813"},{"$numberInt":"8814"},{"$numberInt":"8815"},{"$numberInt":"8816"},{"$numberInt":"8817"},{"$numberInt":"8818"},{"$numberInt":"8819"},{"$numberInt":"8820"},{"$numberInt":"8821"},{"$numberInt":"8822"},{"$numberInt":"8823"},{"$numberInt":"8824"},{"$numberInt":"8825"},{"$numberInt":"8826"},{"$numberInt":"8827"},{"$numberInt":"8828"},{"$numberInt":"8829"},{"$numberInt":"8830"},{"$numberInt":"8831"},{"$numberInt":"8832"},{"$numberInt":"8833"},{"$numberInt":"8834"},{"$numberInt":"8835"},{"$numberInt":"8836"},{"$numberInt":"8837"},{"$numberInt":"8838"},{"$numberInt":"8839"},{"$numberInt":"8840"},{"$numberInt":"8841"},{"$numberInt":"8842"},{"$numberInt":"8843"},{"$numberInt":"8844"},{"$numberInt":"8845"},{"$numberInt":"8846"},{"$numberInt":"8847"},{"$numberInt":"8848"},{"$numberInt":"8849"},{"$numberInt":"8850"},{"$numberInt":"8851"},{"$numberInt":"8852"},{"$numberInt":"8853"},{"$numberInt":"8854"},{"$numberInt":"8855"},{"$numberInt":"8856"},{"$numberInt":"8857"},{"$numberInt":"8858"},{"$numberInt":"8859"},{"$numberInt":"8860"},{"$numberInt":"8861"},{"$numberInt":"8862"},{"$numberInt":"8863"},{"$numberInt":"8864"},{"$numberInt":"8865"},{"$numberInt":"8866"},{"$numberInt":"8867"},{"$numberInt":"8868"},{"$numberInt":"8869"},{"$numberInt":"8870"},{"$numberInt":"8871"},{"$numberInt":"8872"},{"$numberInt":"8873"},{"$numberInt":"8874"},{"$numberInt":"8875"},{"$numberInt":"8876"},{"$numberInt":"8877"},{"$numberInt":"8878"},{"$numberInt":"8879"},{"$numberInt":"8880"},{"$numberInt":"8881"},{"$numberInt":"8882"},{"$numberInt":"8883"},{"$numberInt":"8884"},{"$numberInt":"8885"},{"$numberInt":"8886"},{"$numberInt":"8887"},{"$numberInt":"8888"},{"$numberInt":"8889"},{"$numberInt":"8890"},{"$numberInt":"8891"},{"$numberInt":"8892"},{"$numberInt":"8893"},{"$numberInt":"8894"},{"$numberInt":"8895"},{"$numberInt":"8896"},{"$numberInt":"8897"},{"$numberInt":"8898"},{"$numberInt":"8899"},{"$numberInt":"8900"},{"$numberInt":"8901"},{"$numberInt":"8902"},{"$numberInt":"8903"},{"$numberInt":"8904"},{"$numberInt":"8905"},{"$numberInt":"8906"},{"$numberInt":"8907"},{"$numberInt":"8908"},{"$numberInt":"8909"},{"$numberInt":"8910"},{"$numberInt":"8911"},{"$numberInt":"8912"},{"$numberInt":"8913"},{"$numberInt":"8914"},{"$numberInt":"8915"},{"$numberInt":"8916"},{"$numberInt":"8917"},{"$numberInt":"8918"},{"$numberInt":"8919"},{"$numberInt":"8920"},{"$numberInt":"8921"},{"$numberInt":"8922"},{"$numberInt":"8923"},{"$numberInt":"8924"},{"$numberInt":"8925"},{"$numberInt":"8926"},{"$numberInt":"8927"},{"$numberInt":"8928"},{"$numberInt":"8929"},{"$numberInt":"8930"},{"$numberInt":"8931"},{"$numberInt":"8932"},{"$numberInt":"8933"},{"$numberInt":"8934"},{"$numberInt":"8935"},{"$numberInt":"8936"},{"$numberInt":"8937"},{"$numberInt":"8938"},{"$numberInt":"8939"},{"$numberInt":"8940"},{"$numberInt":"8941"},{"$numberInt":"8942"},{"$numberInt":"8943"},{"$numberInt":"8944"},{"$numberInt":"8945"},{"$numberInt":"8946"},{"$numberInt":"8947"},{"$numberInt":"8948"},{"$numberInt":"8949"},{"$numberInt":"8950"},{"$numberInt":"8951"},{"$numberInt":"8952"},{"$numberInt":"8953"},{"$numberInt":"8954"},{"$numberInt":"8955"},{"$numberInt":"8956"},{"$numberInt":"8957"},{"$numberInt":"8958"},{"$numberInt":"8959"},{"$numberInt":"8960"},{"$numberInt":"8961"},{"$numberInt":"8962"},{"$numberInt":"8963"},{"$numberInt":"8964"},{"$numberInt":"8965"},{"$numberInt":"8966"},{"$numberInt":"8967"},{"$numberInt":"8968"},{"$numberInt":"8969"},{"$numberInt":"8970"},{"$numberInt":"8971"},{"$numberInt":"8972"},{"$numberInt":"8973"},{"$numberInt":"8974"},{"$numberInt":"8975"},{"$numberInt":"8976"},{"$numberInt":"8977"},{"$numberInt":"8978"},{"$numberInt":"8979"},{"$numberInt":"8980"},{"$numberInt":"8981"},{"$numberInt":"8982"},{"$numberInt":"8983"},{"$numberInt":"8984"},{"$numberInt":"8985"},{"$numberInt":"8986"},{"$numberInt":"8987"},{"$numberInt":"8988"},{"$numberInt":"8989"},{"$numberInt":"8990"},{"$numberInt":"8991"},{"$numberInt":"8992"},{"$numberInt":"8993"},{"$numberInt":"8994"},{"$numberInt":"8995"},{"$numberInt":"8996"},{"$numberInt":"8997"},{"$numberInt":"8998"},{"$numberInt":"8999"},{"$numberInt":"9000"},{"$numberInt":"9001"},{"$numberInt":"9002"},{"$numberInt":"9003"},{"$numberInt":"9004"},{"$numberInt":"9005"},{"$numberInt":"9006"},{"$numberInt":"9007"},{"$numberInt":"9008"},{"$numberInt":"9009"},{"$numberInt":"9010"},{"$numberInt":"9011"},{"$numberInt":"9012"},{"$numberInt":"9013"},{"$numberInt":"9014"},{"$numberInt":"9015"},{"$numberInt":"9016"},{"$numberInt":"9017"},{"$numberInt":"9018"},{"$numberInt":"9019"},{"$numberInt":"9020"},{"$numberInt":"9021"},{"$numberInt":"9022"},{"$numberInt":"9023"},{"$numberInt":"9024"},{"$numberInt":"9025"},{"$numberInt":"9026"},{"$numberInt":"9027"},{"$numberInt":"9028"},{"$numberInt":"9029"},{"$numberInt":"9030"},{"$numberInt":"9031"},{"$numberInt":"9032"},{"$numberInt":"9033"},{"$numberInt":"9034"},{"$numberInt":"9035"},{"$numberInt":"9036"},{"$numberInt":"9037"},{"$numberInt":"9038"},{"$numberInt":"9039"},{"$numberInt":"9040"},{"$numberInt":"9041"},{"$numberInt":"9042"},{"$numberInt":"9043"},{"$numberInt":"9044"},{"$numberInt":"9045"},{"$numberInt":"9046"},{"$numberInt":"9047"},{"$numberInt":"9048"},{"$numberInt":"9049"},{"$numberInt":"9050"},{"$numberInt":"9051"},{"$numberInt":"9052"},{"$numberInt":"9053"},{"$numberInt":"9054"},{"$numberInt":"9055"},{"$numberInt":"9056"},{"$numberInt":"9057"},{"$numberInt":"9058"},{"$numberInt":"9059"},{"$numberInt":"9060"},{"$numberInt":"9061"},{"$numberInt":"9062"},{"$numberInt":"9063"},{"$numberInt":"9064"},{"$numberInt":"9065"},{"$numberInt":"9066"},{"$numberInt":"9067"},{"$numberInt":"9068"},{"$numberInt":"9069"},{"$numberInt":"9070"},{"$numberInt":"9071"},{"$numberInt":"9072"},{"$numberInt":"9073"},{"$numberInt":"9074"},{"$numberInt":"9075"},{"$numberInt":"9076"},{"$numberInt":"9077"},{"$numberInt":"9078"},{"$numberInt":"9079"},{"$numberInt":"9080"},{"$numberInt":"9081"},{"$numberInt":"9082"},{"$numberInt":"9083"},{"$numberInt":"9084"},{"$numberInt":"9085"},{"$numberInt":"9086"},{"$numberInt":"9087"},{"$numberInt":"9088"},{"$numberInt":"9089"},{"$numberInt":"9090"},{"$numberInt":"9091"},{"$numberInt":"9092"},{"$numberInt":"9093"},{"$numberInt":"9094"},{"$numberInt":"9095"},{"$numberInt":"9096"},{"$numberInt":"9097"},{"$numberInt":"9098"},{"$numberInt":"9099"},{"$numberInt":"9100"},{"$numberInt":"9101"},{"$numberInt":"9102"},{"$numberInt":"9103"},{"$numberInt":"9104"},{"$numberInt":"9105"},{"$numberInt":"9106"},{"$numberInt":"9107"},{"$numberInt":"9108"},{"$numberInt":"9109"},{"$numberInt":"9110"},{"$numberInt":"9111"},{"$numberInt":"9112"},{"$numberInt":"9113"},{"$numberInt":"9114"},{"$numberInt":"9115"},{"$numberInt":"9116"},{"$numberInt":"9117"},{"$numberInt":"9118"},{"$numberInt":"9119"},{"$numberInt":"9120"},{"$numberInt":"9121"},{"$numberInt":"9122"},{"$numberInt":"9123"},{"$numberInt":"9124"},{"$numberInt":"9125"},{"$numberInt":"9126"},{"$numberInt":"9127"},{"$numberInt":"9128"},{"$numberInt":"9129"},{"$numberInt":"9130"},{"$numberInt":"9131"},{"$numberInt":"9132"},{"$numberInt":"9133"},{"$numberInt":"9134"},{"$numberInt":"9135"},{"$numberInt":"9136"},{"$numberInt":"9137"},{"$numberInt":"9138"},{"$numberInt":"9139"},{"$numberInt":"9140"},{"$numberInt":"9141"},{"$numberInt":"9142"},{"$numberInt":"9143"},{"$numberInt":"9144"},{"$numberInt":"9145"},{"$numberInt":"9146"},{"$numberInt":"9147"},{"$numberInt":"9148"},{"$numberInt":"9149"},{"$numberInt":"9150"},{"$numberInt":"9151"},{"$numberInt":"9152"},{"$numberInt":"9153"},{"$numberInt":"9154"},{"$numberInt":"9155"},{"$numberInt":"9156"},{"$numberInt":"9157"},{"$numberInt":"9158"},{"$numberInt":"9159"},{"$numberInt":"9160"},{"$numberInt":"9161"},{"$numberInt":"9162"},{"$numberInt":"9163"},{"$numberInt":"9164"},{"$numberInt":"9165"},{"$numberInt":"9166"},{"$numberInt":"9167"},{"$numberInt":"9168"},{"$numberInt":"9169"},{"$numberInt":"9170"},{"$numberInt":"9171"},{"$numberInt":"9172"},{"$numberInt":"9173"},{"$numberInt":"9174"},{"$numberInt":"9175"},{"$numberInt":"9176"},{"$numberInt":"9177"},{"$numberInt":"9178"},{"$numberInt":"9179"},{"$numberInt":"9180"},{"$numberInt":"9181"},{"$numberInt":"9182"},{"$numberInt":"9183"},{"$numberInt":"9184"},{"$numberInt":"9185"},{"$numberInt":"9186"},{"$numberInt":"9187"},{"$numberInt":"9188"},{"$numberInt":"9189"},{"$numberInt":"9190"},{"$numberInt":"9191"},{"$numberInt":"9192"},{"$numberInt":"9193"},{"$numberInt":"9194"},{"$numberInt":"9195"},{"$numberInt":"9196"},{"$numberInt":"9197"},{"$numberInt":"9198"},{"$numberInt":"9199"},{"$numberInt":"9200"},{"$numberInt":"9201"},{"$numberInt":"9202"},{"$numberInt":"9203"},{"$numberInt":"9204"},{"$numberInt":"9205"},{"$numberInt":"9206"},{"$numberInt":"9207"},{"$numberInt":"9208"},{"$numberInt":"9209"},{"$numberInt":"9210"},{"$numberInt":"9211"},{"$numberInt":"9212"},{"$numberInt":"9213"},{"$numberInt":"9214"},{"$numberInt":"9215"},{"$numberInt":"9216"},{"$numberInt":"9217"},{"$numberInt":"9218"},{"$numberInt":"9219"},{"$numberInt":"9220"},{"$numberInt":"9221"},{"$numberInt":"9222"},{"$numberInt":"9223"},{"$numberInt":"9224"},{"$numberInt":"9225"},{"$numberInt":"9226"},{"$numberInt":"9227"},{"$numberInt":"9228"},{"$numberInt":"9229"},{"$numberInt":"9230"},{"$numberInt":"9231"},{"$numberInt":"9232"},{"$numberInt":"9233"},{"$numberInt":"9234"},{"$numberInt":"9235"},{"$numberInt":"9236"},{"$numberInt":"9237"},{"$numberInt":"9238"},{"$numberInt":"9239"},{"$numberInt":"9240"},{"$numberInt":"9241"},{"$numberInt":"9242"},{"$numberInt":"9243"},{"$numberInt":"9244"},{"$numberInt":"9245"},{"$numberInt":"9246"},{"$numberInt":"9247"},{"$numberInt":"9248"},{"$numberInt":"9249"},{"$numberInt":"9250"},{"$numberInt":"9251"},{"$numberInt":"9252"},{"$numberInt":"9253"},{"$numberInt":"9254"},{"$numberInt":"9255"},{"$numberInt":"9256"},{"$numberInt":"9257"},{"$numberInt":"9258"},{"$numberInt":"9259"},{"$numberInt":"9260"},{"$numberInt":"9261"},{"$numberInt":"9262"},{"$numberInt":"9263"},{"$numberInt":"9264"},{"$numberInt":"9265"},{"$numberInt":"9266"},{"$numberInt":"9267"},{"$numberInt":"9268"},{"$numberInt":"9269"},{"$numberInt":"9270"},{"$numberInt":"9271"},{"$numberInt":"9272"},{"$numberInt":"9273"},{"$numberInt":"9274"},{"$numberInt":"9275"},{"$numberInt":"9276"},{"$numberInt":"9277"},{"$numberInt":"9278"},{"$numberInt":"9279"},{"$numberInt":"9280"},{"$numberInt":"9281"},{"$numberInt":"9282"},{"$numberInt":"9283"},{"$numberInt":"9284"},{"$numberInt":"9285"},{"$numberInt":"9286"},{"$numberInt":"9287"},{"$numberInt":"9288"},{"$numberInt":"9289"},{"$numberInt":"9290"},{"$numberInt":"9291"},{"$numberInt":"9292"},{"$numberInt":"9293"},{"$numberInt":"9294"},{"$numberInt":"9295"},{"$numberInt":"9296"},{"$numberInt":"9297"},{"$numberInt":"9298"},{"$numberInt":"9299"},{"$numberInt":"9300"},{"$numberInt":"9301"},{"$numberInt":"9302"},{"$numberInt":"9303"},{"$numberInt":"9304"},{"$numberInt":"9305"},{"$numberInt":"9306"},{"$numberInt":"9307"},{"$numberInt":"9308"},{"$numberInt":"9309"},{"$numberInt":"9310"},{"$numberInt":"9311"},{"$numberInt":"9312"},{"$numberInt":"9313"},{"$numberInt":"9314"},{"$numberInt":"9315"},{"$numberInt":"9316"},{"$numberInt":"9317"},{"$numberInt":"9318"},{"$numberInt":"9319"},{"$numberInt":"9320"},{"$numberInt":"9321"},{"$numberInt":"9322"},{"$numberInt":"9323"},{"$numberInt":"9324"},{"$numberInt":"9325"},{"$numberInt":"9326"},{"$numberInt":"9327"},{"$numberInt":"9328"},{"$numberInt":"9329"},{"$numberInt":"9330"},{"$numberInt":"9331"},{"$numberInt":"9332"},{"$numberInt":"9333"},{"$numberInt":"9334"},{"$numberInt":"9335"},{"$numberInt":"9336"},{"$numberInt":"9337"},{"$numberInt":"9338"},{"$numberInt":"9339"},{"$numberInt":"9340"},{"$numberInt":"9341"},{"$numberInt":"9342"},{"$numberInt":"9343"},{"$numberInt":"9344"},{"$numberInt":"9345"},{"$numberInt":"9346"},{"$numberInt":"9347"},{"$numberInt":"9348"},{"$numberInt":"9349"},{"$numberInt":"9350"},{"$numberInt":"9351"},{"$numberInt":"9352"},{"$numberInt":"9353"},{"$numberInt":"9354"},{"$numberInt":"9355"},{"$numberInt":"9356"},{"$numberInt":"9357"},{"$numberInt":"9358"},{"$numberInt":"9359"},{"$numberInt":"9360"},{"$numberInt":"9361"},{"$numberInt":"9362"},{"$numberInt":"9363"},{"$numberInt":"9364"},{"$numberInt":"9365"},{"$numberInt":"9366"},{"$numberInt":"9367"},{"$numberInt":"9368"},{"$numberInt":"9369"},{"$numberInt":"9370"},{"$numberInt":"9371"},{"$numberInt":"9372"},{"$numberInt":"9373"},{"$numberInt":"9374"},{"$numberInt":"9375"},{"$numberInt":"9376"},{"$numberInt":"9377"},{"$numberInt":"9378"},{"$numberInt":"9379"},{"$numberInt":"9380"},{"$numberInt":"9381"},{"$numberInt":"9382"},{"$numberInt":"9383"},{"$numberInt":"9384"},{"$numberInt":"9385"},{"$numberInt":"9386"},{"$numberInt":"9387"},{"$numberInt":"9388"},{"$numberInt":"9389"},{"$numberInt":"9390"},{"$numberInt":"9391"},{"$numberInt":"9392"},{"$numberInt":"9393"},{"$numberInt":"9394"},{"$numberInt":"9395"},{"$numberInt":"9396"},{"$numberInt":"9397"},{"$numberInt":"9398"},{"$numberInt":"9399"},{"$numberInt":"9400"},{"$numberInt":"9401"},{"$numberInt":"9402"},{"$numberInt":"9403"},{"$numberInt":"9404"},{"$numberInt":"9405"},{"$numberInt":"9406"},{"$numberInt":"9407"},{"$numberInt":"9408"},{"$numberInt":"9409"},{"$numberInt":"9410"},{"$numberInt":"9411"},{"$numberInt":"9412"},{"$numberInt":"9413"},{"$numberInt":"9414"},{"$numberInt":"9415"},{"$numberInt":"9416"},{"$numberInt":"9417"},{"$numberInt":"9418"},{"$numberInt":"9419"},{"$numberInt":"9420"},{"$numberInt":"9421"},{"$numberInt":"9422"},{"$numberInt":"9423"},{"$numberInt":"9424"},{"$numberInt":"9425"},{"$numberInt":"9426"},{"$numberInt":"9427"},{"$numberInt":"9428"},{"$numberInt":"9429"},{"$numberInt":"9430"},{"$numberInt":"9431"},{"$numberInt":"9432"},{"$numberInt":"9433"},{"$numberInt":"9434"},{"$numberInt":"9435"},{"$numberInt":"9436"},{"$numberInt":"9437"},{"$numberInt":"9438"},{"$numberInt":"9439"},{"$numberInt":"9440"},{"$numberInt":"9441"},{"$numberInt":"9442"},{"$numberInt":"9443"},{"$numberInt":"9444"},{"$numberInt":"9445"},{"$numberInt":"9446"},{"$numberInt":"9447"},{"$numberInt":"9448"},{"$numberInt":"9449"},{"$numberInt":"9450"},{"$numberInt":"9451"},{"$numberInt":"9452"},{"$numberInt":"9453"},{"$numberInt":"9454"},{"$numberInt":"9455"},{"$numberInt":"9456"},{"$numberInt":"9457"},{"$numberInt":"9458"},{"$numberInt":"9459"},{"$numberInt":"9460"},{"$numberInt":"9461"},{"$numberInt":"9462"},{"$numberInt":"9463"},{"$numberInt":"9464"},{"$numberInt":"9465"},{"$numberInt":"9466"},{"$numberInt":"9467"},{"$numberInt":"9468"},{"$numberInt":"9469"},{"$numberInt":"9470"},{"$numberInt":"9471"},{"$numberInt":"9472"},{"$numberInt":"9473"},{"$numberInt":"9474"},{"$numberInt":"9475"},{"$numberInt":"9476"},{"$numberInt":"9477"},{"$numberInt":"9478"},{"$numberInt":"9479"},{"$numberInt":"9480"},{"$numberInt":"9481"},{"$numberInt":"9482"},{"$numberInt":"9483"},{"$numberInt":"9484"},{"$numberInt":"9485"},{"$numberInt":"9486"},{"$numberInt":"9487"},{"$numberInt":"9488"},{"$numberInt":"9489"},{"$numberInt":"9490"},{"$numberInt":"9491"},{"$numberInt":"9492"},{"$numberInt":"9493"},{"$numberInt":"9494"},{"$numberInt":"9495"},{"$numberInt":"9496"},{"$numberInt":"9497"},{"$numberInt":"9498"},{"$numberInt":"9499"},{"$numberInt":"9500"},{"$numberInt":"9501"},{"$numberInt":"9502"},{"$numberInt":"9503"},{"$numberInt":"9504"},{"$numberInt":"9505"},{"$numberInt":"9506"},{"$numberInt":"9507"},{"$numberInt":"9508"},{"$numberInt":"9509"},{"$numberInt":"9510"},{"$numberInt":"9511"},{"$numberInt":"9512"},{"$numberInt":"9513"},{"$numberInt":"9514"},{"$numberInt":"9515"},{"$numberInt":"9516"},{"$numberInt":"9517"},{"$numberInt":"9518"},{"$numberInt":"9519"},{"$numberInt":"9520"},{"$numberInt":"9521"},{"$numberInt":"9522"},{"$numberInt":"9523"},{"$numberInt":"9524"},{"$numberInt":"9525"},{"$numberInt":"9526"},{"$numberInt":"9527"},{"$numberInt":"9528"},{"$numberInt":"9529"},{"$numberInt":"9530"},{"$numberInt":"9531"},{"$numberInt":"9532"},{"$numberInt":"9533"},{"$numberInt":"9534"},{"$numberInt":"9535"},{"$numberInt":"9536"},{"$numberInt":"9537"},{"$numberInt":"9538"},{"$numberInt":"9539"},{"$numberInt":"9540"},{"$numberInt":"9541"},{"$numberInt":"9542"},{"$numberInt":"9543"},{"$numberInt":"9544"},{"$numberInt":"9545"},{"$numberInt":"9546"},{"$numberInt":"9547"},{"$numberInt":"9548"},{"$numberInt":"9549"},{"$numberInt":"9550"},{"$numberInt":"9551"},{"$numberInt":"9552"},{"$numberInt":"9553"},{"$numberInt":"9554"},{"$numberInt":"9555"},{"$numberInt":"9556"},{"$numberInt":"9557"},{"$numberInt":"9558"},{"$numberInt":"9559"},{"$numberInt":"9560"},{"$numberInt":"9561"},{"$numberInt":"9562"},{"$numberInt":"9563"},{"$numberInt":"9564"},{"$numberInt":"9565"},{"$numberInt":"9566"},{"$numberInt":"9567"},{"$numberInt":"9568"},{"$numberInt":"9569"},{"$numberInt":"9570"},{"$numberInt":"9571"},{"$numberInt":"9572"},{"$numberInt":"9573"},{"$numberInt":"9574"},{"$numberInt":"9575"},{"$numberInt":"9576"},{"$numberInt":"9577"},{"$numberInt":"9578"},{"$numberInt":"9579"},{"$numberInt":"9580"},{"$numberInt":"9581"},{"$numberInt":"9582"},{"$numberInt":"9583"},{"$numberInt":"9584"},{"$numberInt":"9585"},{"$numberInt":"9586"},{"$numberInt":"9587"},{"$numberInt":"9588"},{"$numberInt":"9589"},{"$numberInt":"9590"},{"$numberInt":"9591"},{"$numberInt":"9592"},{"$numberInt":"9593"},{"$numberInt":"9594"},{"$numberInt":"9595"},{"$numberInt":"9596"},{"$numberInt":"9597"},{"$numberInt":"9598"},{"$numberInt":"9599"},{"$numberInt":"9600"},{"$numberInt":"9601"},{"$numberInt":"9602"},{"$numberInt":"9603"},{"$numberInt":"9604"},{"$numberInt":"9605"},{"$numberInt":"9606"},{"$numberInt":"9607"},{"$numberInt":"9608"},{"$numberInt":"9609"},{"$numberInt":"9610"},{"$numberInt":"9611"},{"$numberInt":"9612"},{"$numberInt":"9613"},{"$numberInt":"9614"},{"$numberInt":"9615"},{"$numberInt":"9616"},{"$numberInt":"9617"},{"$numberInt":"9618"},{"$numberInt":"9619"},{"$numberInt":"9620"},{"$numberInt":"9621"},{"$numberInt":"9622"},{"$numberInt":"9623"},{"$numberInt":"9624"},{"$numberInt":"9625"},{"$numberInt":"9626"},{"$numberInt":"9627"},{"$numberInt":"9628"},{"$numberInt":"9629"},{"$numberInt":"9630"},{"$numberInt":"9631"},{"$numberInt":"9632"},{"$numberInt":"9633"},{"$numberInt":"9634"},{"$numberInt":"9635"},{"$numberInt":"9636"},{"$numberInt":"9637"},{"$numberInt":"9638"},{"$numberInt":"9639"},{"$numberInt":"9640"},{"$numberInt":"9641"},{"$numberInt":"9642"},{"$numberInt":"9643"},{"$numberInt":"9644"},{"$numberInt":"9645"},{"$numberInt":"9646"},{"$numberInt":"9647"},{"$numberInt":"9648"},{"$numberInt":"9649"},{"$numberInt":"9650"},{"$numberInt":"9651"},{"$numberInt":"9652"},{"$numberInt":"9653"},{"$numberInt":"9654"},{"$numberInt":"9655"},{"$numberInt":"9656"},{"$numberInt":"9657"},{"$numberInt":"9658"},{"$numberInt":"9659"},{"$numberInt":"9660"},{"$numberInt":"9661"},{"$numberInt":"9662"},{"$numberInt":"9663"},{"$numberInt":"9664"},{"$numberInt":"9665"},{"$numberInt":"9666"},{"$numberInt":"9667"},{"$numberInt":"9668"},{"$numberInt":"9669"},{"$numberInt":"9670"},{"$numberInt":"9671"},{"$numberInt":"9672"},{"$numberInt":"9673"},{"$numberInt":"9674"},{"$numberInt":"9675"},{"$numberInt":"9676"},{"$numberInt":"9677"},{"$numberInt":"9678"},{"$numberInt":"9679"},{"$numberInt":"9680"},{"$numberInt":"9681"},{"$numberInt":"9682"},{"$numberInt":"9683"},{"$numberInt":"9684"},{"$numberInt":"9685"},{"$numberInt":"9686"},{"$numberInt":"9687"},{"$numberInt":"9688"},{"$numberInt":"9689"},{"$numberInt":"9690"},{"$numberInt":"9691"},{"$numberInt":"9692"},{"$numberInt":"9693"},{"$numberInt":"9694"},{"$numberInt":"9695"},{"$numberInt":"9696"},{"$numberInt":"9697"},{"$numberInt":"9698"},{"$numberInt":"9699"},{"$numberInt":"9700"},{"$numberInt":"9701"},{"$numberInt":"9702"},{"$numberInt":"9703"},{"$numberInt":"9704"},{"$numberInt":"9705"},{"$numberInt":"9706"},{"$numberInt":"9707"},{"$numberInt":"9708"},{"$numberInt":"9709"},{"$numberInt":"9710"},{"$numberInt":"9711"},{"$numberInt":"9712"},{"$numberInt":"9713"},{"$numberInt":"9714"},{"$numberInt":"9715"},{"$numberInt":"9716"},{"$numberInt":"9717"},{"$numberInt":"9718"},{"$numberInt":"9719"},{"$numberInt":"9720"},{"$numberInt":"9721"},{"$numberInt":"9722"},{"$numberInt":"9723"},{"$numberInt":"9724"},{"$numberInt":"9725"},{"$numberInt":"9726"},{"$numberInt":"9727"},{"$numberInt":"9728"},{"$numberInt":"9729"},{"$numberInt":"9730"},{"$numberInt":"9731"},{"$numberInt":"9732"},{"$numberInt":"9733"},{"$numberInt":"9734"},{"$numberInt":"9735"},{"$numberInt":"9736"},{"$numberInt":"9737"},{"$numberInt":"9738"},{"$numberInt":"9739"},{"$numberInt":"9740"},{"$numberInt":"9741"},{"$numberInt":"9742"},{"$numberInt":"9743"},{"$numberInt":"9744"},{"$numberInt":"9745"},{"$numberInt":"9746"},{"$numberInt":"9747"},{"$numberInt":"9748"},{"$numberInt":"9749"},{"$numberInt":"9750"},{"$numberInt":"9751"},{"$numberInt":"9752"},{"$numberInt":"9753"},{"$numberInt":"9754"},{"$numberInt":"9755"},{"$numberInt":"9756"},{"$numberInt":"9757"},{"$numberInt":"9758"},{"$numberInt":"9759"},{"$numberInt":"9760"},{"$numberInt":"9761"},{"$numberInt":"9762"},{"$numberInt":"9763"},{"$numberInt":"9764"},{"$numberInt":"9765"},{"$numberInt":"9766"},{"$numberInt":"9767"},{"$numberInt":"9768"},{"$numberInt":"9769"},{"$numberInt":"9770"},{"$numberInt":"9771"},{"$numberInt":"9772"},{"$numberInt":"9773"},{"$numberInt":"9774"},{"$numberInt":"9775"},{"$numberInt":"9776"},{"$numberInt":"9777"},{"$numberInt":"9778"},{"$numberInt":"9779"},{"$numberInt":"9780"},{"$numberInt":"9781"},{"$numberInt":"9782"},{"$numberInt":"9783"},{"$numberInt":"9784"},{"$numberInt":"9785"},{"$numberInt":"9786"},{"$numberInt":"9787"},{"$numberInt":"9788"},{"$numberInt":"9789"},{"$numberInt":"9790"},{"$numberInt":"9791"},{"$numberInt":"9792"},{"$numberInt":"9793"},{"$numberInt":"9794"},{"$numberInt":"9795"},{"$numberInt":"9796"},{"$numberInt":"9797"},{"$numberInt":"9798"},{"$numberInt":"9799"},{"$numberInt":"9800"},{"$numberInt":"9801"},{"$numberInt":"9802"},{"$numberInt":"9803"},{"$numberInt":"9804"},{"$numberInt":"9805"},{"$numberInt":"9806"},{"$numberInt":"9807"},{"$numberInt":"9808"},{"$numberInt":"9809"},{"$numberInt":"9810"},{"$numberInt":"9811"},{"$numberInt":"9812"},{"$numberInt":"9813"},{"$numberInt":"9814"},{"$numberInt":"9815"},{"$numberInt":"9816"},{"$numberInt":"9817"},{"$numberInt":"9818"},{"$numberInt":"9819"},{"$numberInt":"9820"},{"$numberInt":"9821"},{"$numberInt":"9822"},{"$numberInt":"9823"},{"$numberInt":"9824"},{"$numberInt":"9825"},{"$numberInt":"9826"},{"$numberInt":"9827"},{"$numberInt":"9828"},{"$numberInt":"9829"},{"$numberInt":"9830"},{"$numberInt":"9831"},{"$numberInt":"9832"},{"$numberInt":"9833"},{"$numberInt":"9834"},{"$numberInt":"9835"},{"$numberInt":"9836"},{"$numberInt":"9837"},{"$numberInt":"9838"},{"$numberInt":"9839"},{"$numberInt":"9840"},{"$numberInt":"9841"},{"$numberInt":"9842"},{"$numberInt":"9843"},{"$numberInt":"9844"},{"$numberInt":"9845"},{"$numberInt":"9846"},{"$numberInt":"9847"},{"$numberInt":"9848"},{"$numberInt":"9849"},{"$numberInt":"9850"},{"$numberInt":"9851"},{"$numberInt":"9852"},{"$numberInt":"9853"},{"$numberInt":"9854"},{"$numberInt":"9855"},{"$numberInt":"9856"},{"$numberInt":"9857"},{"$numberInt":"9858"},{"$numberInt":"9859"},{"$numberInt":"9860"},{"$numberInt":"9861"},{"$numberInt":"9862"},{"$numberInt":"9863"},{"$numberInt":"9864"},{"$numberInt":"9865"},{"$numberInt":"9866"},{"$numberInt":"9867"},{"$numberInt":"9868"},{"$numberInt":"9869"},{"$numberInt":"9870"},{"$numberInt":"9871"},{"$numberInt":"9872"},{"$numberInt":"9873"},{"$numberInt":"9874"},{"$numberInt":"9875"},{"$numberInt":"9876"},{"$numberInt":"9877"},{"$numberInt":"9878"},{"$numberInt":"9879"},{"$numberInt":"9880"},{"$numberInt":"9881"},{"$numberInt":"9882"},{"$numberInt":"9883"},{"$numberInt":"9884"},{"$numberInt":"9885"},{"$numberInt":"9886"},{"$numberInt":"9887"},{"$numberInt":"9888"},{"$numberInt":"9889"},{"$numberInt":"9890"},{"$numberInt":"9891"},{"$numberInt":"9892"},{"$numberInt":"9893"},{"$numberInt":"9894"},{"$numberInt":"9895"},{"$numberInt":"9896"},{"$numberInt":"9897"},{"$numberInt":"9898"},{"$numberInt":"9899"},{"$numberInt":"9900"},{"$numberInt":"9901"},{"$numberInt":"9902"},{"$numberInt":"9903"},{"$numberInt":"9904"},{"$numberInt":"9905"},{"$numberInt":"9906"},{"$numberInt":"9907"},{"$numberInt":"9908"},{"$numberInt":"9909"},{"$numberInt":"9910"},{"$numberInt":"9911"},{"$numberInt":"9912"},{"$numberInt":"9913"},{"$numberInt":"9914"},{"$numberInt":"9915"},{"$numberInt":"9916"},{"$numberInt":"9917"},{"$numberInt":"9918"},{"$numberInt":"9919"},{"$numberInt":"9920"},{"$numberInt":"9921"},{"$numberInt":"9922"},{"$numberInt":"9923"},{"$numberInt":"9924"},{"$numberInt":"9925"},{"$numberInt":"9926"},{"$numberInt":"9927"},{"$numberInt":"9928"},{"$numberInt":"9929"},{"$numberInt":"9930"},{"$numberInt":"9931"},{"$numberInt":"9932"},{"$numberInt":"9933"},{"$numberInt":"9934"},{"$numberInt":"9935"},{"$numberInt":"9936"},{"$numberInt":"9937"},{"$numberInt":"9938"},{"$numberInt":"9939"},{"$numberInt":"9940"},{"$numberInt":"9941"},{"$numberInt":"9942"},{"$numberInt":"9943"},{"$numberInt":"9944"},{"$numberInt":"9945"},{"$numberInt":"9946"},{"$numberInt":"9947"},{"$numberInt":"9948"},{"$numberInt":"9949"},{"$numberInt":"9950"},{"$numberInt":"9951"},{"$numberInt":"9952"},{"$numberInt":"9953"},{"$numberInt":"9954"},{"$numberInt":"9955"},{"$numberInt":"9956"},{"$numberInt":"9957"},{"$numberInt":"9958"},{"$numberInt":"9959"},{"$numberInt":"9960"},{"$numberInt":"9961"},{"$numberInt":"9962"},{"$numberInt":"9963"},{"$numberInt":"9964"},{"$numberInt":"9965"},{"$numberInt":"9966"},{"$numberInt":"9967"},{"$numberInt":"9968"},{"$numberInt":"9969"},{"$numberInt":"9970"},{"$numberInt":"9971"},{"$numberInt":"9972"},{"$numberInt":"9973"},{"$numberInt":"9974"},{"$numberInt":"9975"},{"$numberInt":"9976"},{"$numberInt":"9977"},{"$numberInt":"9978"},{"$numberInt":"9979"},{"$numberInt":"9980"},{"$numberInt":"9981"},{"$numberInt":"9982"},{"$numberInt":"9983"},{"$numberInt":"9984"},{"$numberInt":"9985"},{"$numberInt":"9986"},{"$numberInt":"9987"},{"$numberInt":"9988"},{"$numberInt":"9989"},{"$numberInt":"9990"},{"$numberInt":"9991"},{"$numberInt":"9992"},{"$numberInt":"9993"},{"$numberInt":"9994"},{"$numberInt":"9995"},{"$numberInt":"9996"},{"$numberInt":"9997"},{"$numberInt":"9998"},{"$numberInt":"9999"}]}}}] (849.70s)
+=== RUN TestE2E_OnlineArchive_Local_Pipeline
+--- SKIP: TestE2E_OnlineArchive_Local_Pipeline (0.00s)
+=== RUN TestE2E_OnlineArchive_Local_Pipeline_LargeIn
+--- SKIP: TestE2E_OnlineArchive_Local_Pipeline_LargeIn (0.00s)
+=== RUN TestE2E_OnlineArchive_Local_Pipeline_EstimatedCount
+--- SKIP: TestE2E_OnlineArchive_Local_Pipeline_EstimatedCount (0.00s)
+=== RUN TestE2E_OnlineArchive_Local_Pipeline_Federated
+--- SKIP: TestE2E_OnlineArchive_Local_Pipeline_Federated (0.00s)
+=== RUN TestE2E_OnlineArchive_Local
+--- SKIP: TestE2E_OnlineArchive_Local (0.00s)
+=== RUN TestE2E_OnlineArchive_Local_Errors
+--- SKIP: TestE2E_OnlineArchive_Local_Errors (0.00s)
+=== RUN TestE2E_OnlineArchive_Local_Command
+--- SKIP: TestE2E_OnlineArchive_Local_Command (0.00s)
+=== RUN TestE2E_DLS_Local
+--- SKIP: TestE2E_DLS_Local (0.00s)
+=== RUN TestE2E_DLS_Local_Wildcard
+--- SKIP: TestE2E_DLS_Local_Wildcard (0.00s)
+=== RUN TestE2E_DLS_Local_Provenance
+--- SKIP: TestE2E_DLS_Local_Provenance (0.00s)
+=== RUN TestE2E_DLS_Local_MaxDataSets
+--- SKIP: TestE2E_DLS_Local_MaxDataSets (0.00s)
+=== RUN TestE2E_DLS_Local_LatestDataSet
+--- SKIP: TestE2E_DLS_Local_LatestDataSet (0.00s)
+=== RUN TestE2E_DLS_Local_EmptyLatestDataSet
+--- SKIP: TestE2E_DLS_Local_EmptyLatestDataSet (0.00s)
+PASS
+ok github.com/10gen/mongohouse/e2e/dls_catalog 4944.728s
diff --git a/agent/command/testdata/xunit/empty.xml b/agent/command/testdata/xunit/empty.xml
new file mode 100644
index 00000000000..cf8946575b0
--- /dev/null
+++ b/agent/command/testdata/xunit/empty.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/agent/command/testdata/xunit/junit_1.xml b/agent/command/testdata/xunit/junit_1.xml
index 8fd7c0fc4cb..e6ced9d30ee 100644
--- a/agent/command/testdata/xunit/junit_1.xml
+++ b/agent/command/testdata/xunit/junit_1.xml
@@ -18,6 +18,8 @@
assert a == 1
AssertionError
+ sysout-testcase
+ syserr-testcase
@@ -70,4 +72,6 @@
AssertionError
+ sysout-suite
+ syserr-suite
diff --git a/agent/command/testdata/xunit/junit_3.xml b/agent/command/testdata/xunit/junit_3.xml
index 433b8baac19..b7070e0ad1d 100644
--- a/agent/command/testdata/xunit/junit_3.xml
+++ b/agent/command/testdata/xunit/junit_3.xml
@@ -1,10 +1,52 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sysout-testcase
+ syserr-testcase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 2.5.1
-]]>= 2.5.1
-]]>= 2.5.5
-]]>= 2.5.3
-]]>= 2.5.3
-]]>= 2.5.3
-]]>= 2.5.3
-]]>
\ No newline at end of file
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 2.5.1
+]]>
+
+
+ = 2.5.1
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 2.5.5
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 2.5.3
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 2.5.3
+]]>
+
+
+
+
+
+
+ = 2.5.3
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 2.5.3
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sysout-suite
+ syserr-suite
+
\ No newline at end of file
diff --git a/agent/command/timeout.go b/agent/command/timeout.go
index cd426c4f4ab..867d51d9f83 100644
--- a/agent/command/timeout.go
+++ b/agent/command/timeout.go
@@ -48,15 +48,15 @@ func (c *timeout) Execute(ctx context.Context,
// If destructuring as ints fails, or neither timeout is set, destructure as strings.
t := &timeoutStr{}
if errStr := mapstructure.Decode(c.params, t); errStr != nil {
- return errors.New("could not decode params as either string or int")
+ return errors.Wrap(err, "decoding mapstructure params")
}
if err := util.ExpandValues(t, conf.Expansions); err != nil {
- return errors.Wrap(err, "error expanding expansion values")
+ return errors.Wrap(err, "applying expansions")
}
timeout, errTimeout := strconv.Atoi(t.TimeoutSecs)
exec, errExec := strconv.Atoi(t.ExecTimeoutSecs)
if errTimeout != nil && errExec != nil {
- return errors.Errorf("could not convert strings to int, %s, %s", t.TimeoutSecs, t.ExecTimeoutSecs)
+ return errors.Errorf("could not convert idle timeout '%s' and exec timeout '%s' to integers", t.TimeoutSecs, t.ExecTimeoutSecs)
}
c.TimeoutSecs = timeout
c.ExecTimeoutSecs = exec
@@ -64,11 +64,11 @@ func (c *timeout) Execute(ctx context.Context,
if c.TimeoutSecs != 0 {
conf.SetIdleTimeout(c.TimeoutSecs)
- logger.Execution().Infof("Set idle timeout to %d seconds", c.TimeoutSecs)
+ logger.Execution().Infof("Set idle timeout to %d seconds.", c.TimeoutSecs)
}
if c.ExecTimeoutSecs != 0 {
conf.SetExecTimeout(c.ExecTimeoutSecs)
- logger.Execution().Infof("Set exec timeout to %d seconds", c.ExecTimeoutSecs)
+ logger.Execution().Infof("Set exec timeout to %d seconds.", c.ExecTimeoutSecs)
}
return nil
diff --git a/agent/command/util.go b/agent/command/util.go
index fdfc2100e73..25a986e1492 100644
--- a/agent/command/util.go
+++ b/agent/command/util.go
@@ -7,15 +7,19 @@ import (
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/pkg/errors"
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/trace"
)
+var tracer trace.Tracer
+
func dirExists(path string) (bool, error) {
stat, err := os.Stat(path)
if err != nil {
if os.IsNotExist(err) {
return false, nil
}
- return false, errors.Wrap(err, "problem running stat on path")
+ return false, errors.Wrap(err, "running stat on path")
}
if !stat.IsDir() {
@@ -37,7 +41,7 @@ func createEnclosingDirectoryIfNeeded(path string) error {
}
if err := os.MkdirAll(localDir, 0755); err != nil {
- return errors.Wrapf(err, "problem creating directory %s", localDir)
+ return errors.Wrapf(err, "creating directory '%s'", localDir)
}
return nil
@@ -46,9 +50,9 @@ func createEnclosingDirectoryIfNeeded(path string) error {
func expandModulePrefix(conf *internal.TaskConfig, module, prefix string, logger client.LoggerProducer) string {
modulePrefix, err := conf.Expansions.ExpandString(prefix)
if err != nil {
+ logger.Task().Error(errors.Wrapf(err, "expanding module prefix '%s'", modulePrefix))
modulePrefix = prefix
- logger.Task().Errorf("module prefix '%s' can't be expanded: %s", prefix, err.Error())
- logger.Task().Warning("will attempt to check out into the module prefix verbatim")
+ logger.Task().Warningf("Will attempt to check out into the module prefix '%s' verbatim.", prefix)
}
if conf.ModulePaths == nil {
conf.ModulePaths = map[string]string{}
@@ -58,8 +62,10 @@ func expandModulePrefix(conf *internal.TaskConfig, module, prefix string, logger
}
// getJoinedWithWorkDir joins the conf.WorkDir A with B like this:
-// if B is relative, return A+B.
-// if B is absolute, return B.
+//
+// if B is relative, return A+B.
+// if B is absolute, return B.
+//
// We use this because B might be absolute.
func getJoinedWithWorkDir(conf *internal.TaskConfig, path string) string {
if filepath.IsAbs(path) {
@@ -67,3 +73,11 @@ func getJoinedWithWorkDir(conf *internal.TaskConfig, path string) string {
}
return filepath.Join(conf.WorkDir, path)
}
+
+func getTracer() trace.Tracer {
+ if tracer == nil {
+ tracer = otel.GetTracerProvider().Tracer("github.com/evergreen-ci/evergreen/agent/command")
+ }
+
+ return tracer
+}
diff --git a/agent/command/util_test.go b/agent/command/util_test.go
index abc8ffe2f20..4ed72cd0968 100644
--- a/agent/command/util_test.go
+++ b/agent/command/util_test.go
@@ -1,7 +1,6 @@
package command
import (
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -13,20 +12,16 @@ import (
func TestCreateEnclosingDirectory(t *testing.T) {
assert := assert.New(t)
- require := require.New(t)
// create a temp directory and ensure that its cleaned up.
- dirname, err := ioutil.TempDir("", "command-test")
- require.NoError(err)
- assert.True(dirExists(dirname))
- defer os.RemoveAll(dirname)
+ dirname := t.TempDir()
// write data to a temp file and then ensure that the directory existing predicate is valid
fileName := filepath.Join(dirname, "foo")
assert.False(dirExists(fileName))
- assert.NoError(ioutil.WriteFile(fileName, []byte("hello world"), 0744))
+ assert.NoError(os.WriteFile(fileName, []byte("hello world"), 0744))
assert.False(dirExists(fileName))
- _, err = os.Stat(fileName)
+ _, err := os.Stat(fileName)
assert.True(!os.IsNotExist(err))
assert.NoError(os.Remove(fileName))
_, err = os.Stat(fileName)
@@ -37,11 +32,6 @@ func TestCreateEnclosingDirectory(t *testing.T) {
fileName = filepath.Join(fileName, "bar")
assert.NoError(createEnclosingDirectoryIfNeeded(fileName))
assert.True(dirExists(filepath.Join(dirname, "foo")))
-
- // ensure that directory existence check is correct
- assert.True(dirExists(dirname))
- assert.NoError(os.RemoveAll(dirname))
- assert.False(dirExists(dirname))
}
func TestGetJoinedWithWorkDir(t *testing.T) {
diff --git a/agent/directory.go b/agent/directory.go
index 2a53b0460a1..c48c1762da7 100644
--- a/agent/directory.go
+++ b/agent/directory.go
@@ -24,22 +24,23 @@ func (a *Agent) createTaskDirectory(tc *taskContext) (string, error) {
_, err := h.Write([]byte(
fmt.Sprintf("%s_%d_%d", tc.taskConfig.Task.Id, tc.taskConfig.Task.Execution, os.Getpid())))
if err != nil {
- tc.logger.Execution().Errorf("Error creating task directory name: %v", err)
+ tc.logger.Execution().Error(errors.Wrap(err, "creating task directory name"))
return "", err
}
dirName := hex.EncodeToString(h.Sum(nil))
- newDir := filepath.Join(tc.taskConfig.Distro.WorkDir, dirName)
+ newDir := filepath.Join(a.opts.WorkingDirectory, dirName)
- tc.logger.Execution().Infof("Making new folder for task execution: %v", newDir)
+ tc.logger.Execution().Infof("Making new folder '%s' for task execution.", newDir)
if err = os.MkdirAll(newDir, 0777); err != nil {
- tc.logger.Execution().Errorf("Error creating task directory: %v", err)
+ tc.logger.Execution().Error(errors.Wrapf(err, "creating task directory '%s'", newDir))
return "", err
}
- if err = os.MkdirAll(filepath.Join(newDir, "tmp"), 0777); err != nil {
- tc.logger.Execution().Warning(message.WrapError(err, "problem creating task temporary, continuing"))
+ tmpDir := filepath.Join(newDir, "tmp")
+ if err = os.MkdirAll(tmpDir, 0777); err != nil {
+ tc.logger.Execution().Warning(errors.Wrapf(err, "creating task temporary directory '%s'", tmpDir))
}
return newDir, nil
@@ -51,35 +52,38 @@ func (a *Agent) createTaskDirectory(tc *taskContext) (string, error) {
// exits.
func (a *Agent) removeTaskDirectory(tc *taskContext) {
if tc.taskDirectory == "" {
- grip.Info("Task directory is not set, not removing")
+ grip.Info("Task directory is not set, not removing.")
return
}
- grip.Infof("Deleting directory for completed task: %s", tc.taskDirectory)
+ grip.Infof("Deleting task directory '%s' for completed task.", tc.taskDirectory)
// Removing long relative paths hangs on Windows https://github.com/golang/go/issues/36375,
// so we have to convert to an absolute path before removing.
abs, err := filepath.Abs(tc.taskDirectory)
if err != nil {
- grip.Critical(errors.Wrap(err, "Problem getting absolute directory for task directory"))
+ grip.Critical(errors.Wrapf(err, "getting absolute path for task directory '%s'", tc.taskDirectory))
return
}
err = a.removeAll(abs)
- grip.Critical(errors.Wrapf(err, "Error removing working directory for the task: %s", tc.taskDirectory))
+ grip.Critical(errors.Wrapf(err, "removing task directory '%s'", tc.taskDirectory))
grip.InfoWhen(err == nil, message.Fields{
- "message": "Successfully deleted directory for completed task",
+ "message": "Successfully deleted directory for completed task.",
"directory": tc.taskDirectory,
})
}
-// removeAll is the same as os.RemoveAll, but recursively changes permissions for subdirectories and contents before removing
+// removeAll is the same as os.RemoveAll, but recursively changes permissions
+// for subdirectories and contents before removing. The permissions change fixes
+// an issue where some files may be marked read-only, which prevents
+// os.RemoveAll from deleting them.
func (a *Agent) removeAll(dir string) error {
- grip.Error(filepath.Walk(dir, func(path string, _ os.FileInfo, err error) error {
+ grip.Error(errors.Wrapf(filepath.Walk(dir, func(path string, _ os.FileInfo, err error) error {
if err != nil {
return nil
}
- grip.Error(os.Chmod(path, 0777))
+ grip.Error(errors.Wrapf(os.Chmod(path, 0777), "changing permission before removal for path '%s'", path))
return nil
- }))
+ }), "recursively walking through path to change permissions"))
return os.RemoveAll(dir)
}
@@ -100,7 +104,7 @@ func (a *Agent) removeAll(dir string) error {
// management, and only attempts to clean up the agent's working
// directory, so files not located in a directory may still cause
// issues.
-func tryCleanupDirectory(dir string) {
+func (a *Agent) tryCleanupDirectory(dir string) {
defer recovery.LogStackTraceAndContinue("clean up directories")
if dir == "" {
@@ -118,18 +122,18 @@ func tryCleanupDirectory(dir string) {
// Don't run in a development environment
if _, err = os.Stat(filepath.Join(dir, ".git")); !os.IsNotExist(err) {
- grip.Notice("refusing to clean a directory that contains '.git'")
+ grip.Notice("Refusing to clean a directory that contains '.git'.")
return
}
usr, err := user.Current()
if err != nil {
- grip.Warning(err)
+ grip.Warning(errors.Wrap(err, "getting current user"))
return
}
if strings.HasPrefix(dir, usr.HomeDir) || strings.Contains(dir, "cygwin") {
- grip.Notice("not cleaning up directory, because it is in the home directory.")
+ grip.Notice("Not cleaning up directory, because it is in the home directory.")
return
}
@@ -159,10 +163,10 @@ func tryCleanupDirectory(dir string) {
return
}
- grip.Infof("attempting to clean up directory '%s'", dir)
+ grip.Infof("Attempting to clean up directory '%s'.", dir)
for _, p := range paths {
- if err = os.RemoveAll(p); err != nil {
- grip.Notice(err)
+ if err = a.removeAll(p); err != nil {
+ grip.Notice(errors.Wrapf(err, "removing path '%s'", p))
}
}
}
diff --git a/agent/directory_test.go b/agent/directory_test.go
index 42864c75914..6e32c3a170c 100644
--- a/agent/directory_test.go
+++ b/agent/directory_test.go
@@ -1,7 +1,6 @@
package agent
import (
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -25,12 +24,12 @@ func TestRemoveTaskDirectory(t *testing.T) {
}
wd, err := os.Getwd()
require.NoError(err)
- tmpDir, err := ioutil.TempDir(wd, "test-remove")
+ tmpDir, err := os.MkdirTemp(wd, "test-remove")
require.NoError(err)
err = os.MkdirAll(filepath.Join(tmpDir, "foo", "bar", a, b), 0755)
require.NoError(err)
// verify files with read-only permissions get deleted
- require.NoError(ioutil.WriteFile(filepath.Join(tmpDir, "read.txt"), []byte("haha can't delete me!"), 0444))
+ require.NoError(os.WriteFile(filepath.Join(tmpDir, "read.txt"), []byte("haha can't delete me!"), 0444))
// remove the task directory
agent := Agent{}
@@ -43,39 +42,37 @@ func TestDirectoryCleanup(t *testing.T) {
assert := assert.New(t)
// create a temp directory for the test
- dir, err := ioutil.TempDir("", "dir-cleanup")
- assert.NoError(err)
- stat, err := os.Stat(dir)
- assert.True(stat.IsDir())
- assert.True(osExists(err))
+ dir := t.TempDir()
// create a file in that directory
fn := filepath.Join(dir, "foo")
- assert.NoError(ioutil.WriteFile(fn, []byte("hello world!"), 0644))
- stat, err = os.Stat(fn)
+ assert.NoError(os.WriteFile(fn, []byte("hello world!"), 0644))
+ stat, err := os.Stat(fn)
assert.False(stat.IsDir())
assert.True(osExists(err))
// cannot run the operation on a file, and it will not delete
- // that files
- tryCleanupDirectory(fn)
+ // that file
+ a := Agent{}
+ a.tryCleanupDirectory(fn)
_, err = os.Stat(fn)
assert.True(osExists(err))
// running the operation on the top level directory does not
- // delete that directory
- tryCleanupDirectory(dir)
+ // delete that directory but does delete the files within it
+ a.tryCleanupDirectory(dir)
_, err = os.Stat(dir)
assert.True(osExists(err))
- // does not clean up files in the root directory
- _, err = os.Stat(fn)
- assert.True(osExists(err))
-
- // verify a subdirectory gets deleted
+ // verify a subdirectory containing a read-only file is deleted
toDelete := filepath.Join(dir, "wrapped-dir-cleanup")
assert.NoError(os.Mkdir(toDelete, 0777))
- tryCleanupDirectory(dir)
+ readOnlyFileToDelete := filepath.Join(toDelete, "read-only")
+ assert.NoError(os.WriteFile(readOnlyFileToDelete, []byte("cookies"), 0644))
+ assert.NoError(os.Chmod(readOnlyFileToDelete, 0444))
+ a.tryCleanupDirectory(dir)
+ _, err = os.Stat(readOnlyFileToDelete)
+ assert.True(os.IsNotExist(err))
_, err = os.Stat(toDelete)
assert.True(os.IsNotExist(err))
@@ -84,11 +81,9 @@ func TestDirectoryCleanup(t *testing.T) {
assert.NoError(os.MkdirAll(gitDir, 0777))
shouldNotDelete := filepath.Join(dir, "dir1", "delete-me")
assert.NoError(os.MkdirAll(shouldNotDelete, 0777))
- tryCleanupDirectory(dir)
+ a.tryCleanupDirectory(dir)
_, err = os.Stat(gitDir)
assert.False(os.IsNotExist(err))
_, err = os.Stat(shouldNotDelete)
assert.False(os.IsNotExist(err))
-
- assert.NoError(os.RemoveAll(dir))
}
diff --git a/agent/doc.go b/agent/doc.go
index a3d3010dd85..006ff6b467b 100644
--- a/agent/doc.go
+++ b/agent/doc.go
@@ -1,2 +1,3 @@
-// Package agent runs tasks on build hosts.
+// Package agent runs tasks on differents runtime environments, such as hosts
+// and containers.
package agent
diff --git a/agent/global.go b/agent/global.go
index c4a1bc23793..5ad03256d9c 100644
--- a/agent/global.go
+++ b/agent/global.go
@@ -18,10 +18,10 @@ const (
// timeout_secs can be specified only on a command.
defaultIdleTimeout = 2 * time.Hour
- // defaultExecTimeoutSecs specifies in seconds the maximum time a task
- // is allowed to run for, even if it is not idle. This default is used
- // if exec_timeout_secs is not specified in the project file.
- // exec_timeout_secs can be specified only at the project and task level.
+ // DefaultExecTimeout specifies the maximum time a task is allowed to run
+ // for, even if it is not idle. This default is used if exec_timeout_secs is
+ // not specified in the project file. exec_timeout_secs can be specified
+ // only at the project and task level.
DefaultExecTimeout = 6 * time.Hour
// defaultHeartbeatInterval is the interval after which agent sends a
diff --git a/agent/internal/client/base_client.go b/agent/internal/client/base_client.go
index a2285e5771e..19044c9f175 100644
--- a/agent/internal/client/base_client.go
+++ b/agent/internal/client/base_client.go
@@ -4,11 +4,10 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
"os"
"strconv"
- "strings"
"sync"
"time"
@@ -118,7 +117,7 @@ func (c *baseCommunicator) createCedarGRPCConn(ctx context.Context) error {
if c.cedarGRPCClient == nil {
cc, err := c.GetCedarConfig(ctx)
if err != nil {
- return errors.Wrap(err, "getting cedar config")
+ return errors.Wrap(err, "getting Cedar config")
}
if cc.BaseURL == "" {
@@ -132,11 +131,14 @@ func (c *baseCommunicator) createCedarGRPCConn(ctx context.Context) error {
RPCPort: cc.RPCPort,
Username: cc.Username,
APIKey: cc.APIKey,
- Retries: 10,
+ // Insecure should always be set to false except when
+ // running Cedar locally, e.g. with our smoke tests.
+ Insecure: cc.Insecure,
+ Retries: 10,
}
c.cedarGRPCClient, err = timber.DialCedar(ctx, c.httpClient, dialOpts)
if err != nil {
- return errors.Wrap(err, "creating cedar grpc client connection")
+ return errors.Wrap(err, "creating Cedar gRPC client connection")
}
}
@@ -144,7 +146,7 @@ func (c *baseCommunicator) createCedarGRPCConn(ctx context.Context) error {
// this way we can fail the agent early and avoid task system failures.
healthClient := gopb.NewHealthClient(c.cedarGRPCClient)
_, err := healthClient.Check(ctx, &gopb.HealthCheckRequest{})
- return errors.Wrap(err, "checking cedar grpc health")
+ return errors.Wrap(err, "checking Cedar gRPC health")
}
// GetProjectRef loads the task's project.
@@ -153,17 +155,15 @@ func (c *baseCommunicator) GetProjectRef(ctx context.Context, taskData TaskData)
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("project_ref")
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get project ref for task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting project ref").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, projectRef); err != nil {
- err = errors.Wrapf(err, "failed reading json for task %s", taskData.ID)
- return nil, err
+ return nil, errors.Wrap(err, "reading project ref from response")
}
return projectRef, nil
}
@@ -171,13 +171,12 @@ func (c *baseCommunicator) GetProjectRef(ctx context.Context, taskData TaskData)
// DisableHost signals to the app server that the host should be disabled.
func (c *baseCommunicator) DisableHost(ctx context.Context, hostID string, details apimodels.DisableInfo) error {
info := requestInfo{
- method: http.MethodPost,
- version: apiVersion2,
- path: fmt.Sprintf("hosts/%s/disable", hostID),
+ method: http.MethodPost,
+ path: fmt.Sprintf("hosts/%s/disable", hostID),
}
resp, err := c.retryRequest(ctx, info, &details)
if err != nil {
- return utility.RespErrorf(resp, "failed to disable host: %s", err.Error())
+ return util.RespErrorf(resp, errors.Wrapf(err, "disabling host '%s'", hostID).Error())
}
defer resp.Body.Close()
@@ -190,17 +189,15 @@ func (c *baseCommunicator) GetTask(ctx context.Context, taskData TaskData) (*tas
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("")
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting task info").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, task); err != nil {
- err = errors.Wrapf(err, "failed reading json for task %s", taskData.ID)
- return nil, err
+ return nil, errors.Wrap(err, "reading task info from response")
}
return task, nil
}
@@ -212,18 +209,17 @@ func (c *baseCommunicator) GetDisplayTaskInfoFromExecution(ctx context.Context,
method: http.MethodGet,
path: fmt.Sprintf("tasks/%s/display_task", td.ID),
taskData: &td,
- version: apiVersion2,
}
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get display task of task %s: %s", td.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting parent display task info").Error())
}
defer resp.Body.Close()
displayTaskInfo := &apimodels.DisplayTaskInfo{}
err = utility.ReadJSON(resp.Body, &displayTaskInfo)
if err != nil {
- return nil, errors.Wrapf(err, "reading display task info of task %s", td.ID)
+ return nil, errors.Wrap(err, "reading parent display task info from response")
}
return displayTaskInfo, nil
@@ -233,18 +229,16 @@ func (c *baseCommunicator) GetDistroView(ctx context.Context, taskData TaskData)
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("distro_view")
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get distro for task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting distro view").Error())
}
defer resp.Body.Close()
var dv apimodels.DistroView
if err = utility.ReadJSON(resp.Body, &dv); err != nil {
- err = errors.Wrapf(err, "unable to read distro response for task %s", taskData.ID)
- return nil, err
+ return nil, errors.Wrap(err, "reading distro view from response")
}
return &dv, nil
}
@@ -254,7 +248,6 @@ func (c *baseCommunicator) GetDistroAMI(ctx context.Context, distro, region stri
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion2,
}
info.path = fmt.Sprintf("distros/%s/ami", distro)
if region != "" {
@@ -262,12 +255,12 @@ func (c *baseCommunicator) GetDistroAMI(ctx context.Context, distro, region stri
}
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return "", utility.RespErrorf(resp, "failed to get distro AMI for task %s: %s", taskData.ID, err.Error())
+ return "", util.RespErrorf(resp, errors.Wrap(err, "getting distro AMI").Error())
}
defer resp.Body.Close()
- out, err := ioutil.ReadAll(resp.Body)
+ out, err := io.ReadAll(resp.Body)
if err != nil {
- return "", errors.Wrapf(err, "problem reading results from body for %s", taskData.ID)
+ return "", errors.Wrap(err, "reading distro AMI from response")
}
return string(out), nil
}
@@ -276,17 +269,17 @@ func (c *baseCommunicator) GetProject(ctx context.Context, taskData TaskData) (*
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("parser_project")
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get project for task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting parser project").Error())
}
- respBytes, err := ioutil.ReadAll(resp.Body)
+ respBytes, err := io.ReadAll(resp.Body)
if err != nil {
- return nil, errors.Wrap(err, "error reading body")
+ return nil, errors.Wrap(err, "reading parser project from response")
}
+
return model.GetProjectFromBSON(respBytes)
}
@@ -295,50 +288,64 @@ func (c *baseCommunicator) GetExpansions(ctx context.Context, taskData TaskData)
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("expansions")
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get expansions for task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting expansions").Error())
}
defer resp.Body.Close()
err = utility.ReadJSON(resp.Body, &e)
if err != nil {
- return nil, errors.Wrapf(err, "unable to read project version response for task %s", taskData.ID)
+ return nil, errors.Wrap(err, "reading expansions from response")
}
return e, nil
}
+func (c *baseCommunicator) GetExpansionsAndVars(ctx context.Context, taskData TaskData) (*apimodels.ExpansionsAndVars, error) {
+ info := requestInfo{
+ method: http.MethodGet,
+ taskData: &taskData,
+ }
+ info.setTaskPathSuffix("expansions_and_vars")
+ resp, err := c.retryRequest(ctx, info, nil)
+ if err != nil {
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting expansions and vars").Error())
+ }
+ defer resp.Body.Close()
+
+ var expAndVars apimodels.ExpansionsAndVars
+ if err = utility.ReadJSON(resp.Body, &expAndVars); err != nil {
+ return nil, errors.Wrap(err, "reading expansions and vars from response")
+ }
+ return &expAndVars, nil
+}
+
func (c *baseCommunicator) Heartbeat(ctx context.Context, taskData TaskData) (string, error) {
data := interface{}("heartbeat")
ctx, cancel := context.WithTimeout(ctx, heartbeatTimeout)
defer cancel()
info := requestInfo{
method: http.MethodPost,
- version: apiVersion1,
taskData: &taskData,
}
info.setTaskPathSuffix("heartbeat")
resp, err := c.request(ctx, info, data)
if err != nil {
- err = errors.Wrapf(err, "error sending heartbeat for task %s", taskData.ID)
- return "", err
+ return "", errors.Wrap(err, "sending heartbeat")
}
defer resp.Body.Close()
if resp.StatusCode == http.StatusConflict {
- return evergreen.TaskConflict, errors.Errorf("Unauthorized - wrong secret")
+ return evergreen.TaskConflict, errors.Errorf("unauthorized - wrong secret")
}
if resp.StatusCode != http.StatusOK {
- return "", errors.Errorf("unexpected status code doing heartbeat: %v",
- resp.StatusCode)
+ return "", util.RespErrorf(resp, "sending heartbeat")
}
heartbeatResponse := &apimodels.HeartbeatResponse{}
if err = utility.ReadJSON(resp.Body, heartbeatResponse); err != nil {
- err = errors.Wrapf(err, "Error unmarshaling heartbeat response for task %s", taskData.ID)
- return "", err
+ return "", errors.Wrap(err, "reading heartbeat reply from response")
}
if heartbeatResponse.Abort {
return evergreen.TaskFailed, nil
@@ -346,32 +353,11 @@ func (c *baseCommunicator) Heartbeat(ctx context.Context, taskData TaskData) (st
return "", nil
}
-// FetchExpansionVars loads expansions for a communicator's task from the API server.
-func (c *baseCommunicator) FetchExpansionVars(ctx context.Context, taskData TaskData) (*apimodels.ExpansionVars, error) {
- resultVars := &apimodels.ExpansionVars{}
- info := requestInfo{
- method: http.MethodGet,
- taskData: &taskData,
- version: apiVersion1,
- }
- info.setTaskPathSuffix("fetch_vars")
- resp, err := c.retryRequest(ctx, info, nil)
- if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get expansion vars for task %s: %s", taskData.ID, err.Error())
- }
- defer resp.Body.Close()
- if err = utility.ReadJSON(resp.Body, resultVars); err != nil {
- err = errors.Wrapf(err, "failed to read vars from response for task %s", taskData.ID)
- return nil, err
- }
- return resultVars, err
-}
-
// GetCedarGRPCConn returns the client connection to cedar if it exists, or
// creates it if it doesn't exist.
func (c *baseCommunicator) GetCedarGRPCConn(ctx context.Context) (*grpc.ClientConn, error) {
if err := c.createCedarGRPCConn(ctx); err != nil {
- return nil, errors.Wrap(err, "setting up cedar grpc connection")
+ return nil, errors.Wrap(err, "setting up Cedar gRPC connection")
}
return c.cedarGRPCClient, nil
}
@@ -451,12 +437,12 @@ func (c *baseCommunicator) makeSender(ctx context.Context, td TaskData, opts []L
}
sender, err = send.NewSplunkLogger(prefix, info, levelInfo)
if err != nil {
- return nil, nil, errors.Wrap(err, "creating splunk logger")
+ return nil, nil, errors.Wrap(err, "creating Splunk logger")
}
underlyingBufferedSenders = append(underlyingBufferedSenders, sender)
sender, err = send.NewBufferedSender(ctx, newAnnotatedWrapper(td.ID, prefix, sender), bufferedSenderOpts)
if err != nil {
- return nil, nil, errors.Wrap(err, "creating buffered splunk logger")
+ return nil, nil, errors.Wrap(err, "creating buffered Splunk logger")
}
case model.LogkeeperLogSender:
config := send.BuildloggerConfig{
@@ -468,12 +454,12 @@ func (c *baseCommunicator) makeSender(ctx context.Context, td TaskData, opts []L
}
sender, err = send.NewBuildlogger(opt.BuilderID, &config, levelInfo)
if err != nil {
- return nil, nil, errors.Wrap(err, "creating logkeeper logger")
+ return nil, nil, errors.Wrap(err, "creating Logkeeper logger")
}
underlyingBufferedSenders = append(underlyingBufferedSenders, sender)
sender, err = send.NewBufferedSender(ctx, sender, bufferedSenderOpts)
if err != nil {
- return nil, nil, errors.Wrap(err, "creating buffered logkeeper logger")
+ return nil, nil, errors.Wrap(err, "creating buffered Logkeeper logger")
}
metadata := LogkeeperMetadata{
@@ -491,11 +477,11 @@ func (c *baseCommunicator) makeSender(ctx context.Context, td TaskData, opts []L
case model.BuildloggerLogSender:
tk, err := c.GetTask(ctx, td)
if err != nil {
- return nil, nil, errors.Wrap(err, "setting up buildlogger sender")
+ return nil, nil, errors.Wrap(err, "setting up Buildlogger sender")
}
if err = c.createCedarGRPCConn(ctx); err != nil {
- return nil, nil, errors.Wrap(err, "setting up cedar grpc connection")
+ return nil, nil, errors.Wrap(err, "setting up Cedar gRPC connection")
}
timberOpts := &buildlogger.LoggerOptions{
@@ -514,7 +500,7 @@ func (c *baseCommunicator) makeSender(ctx context.Context, td TaskData, opts []L
}
sender, err = buildlogger.NewLoggerWithContext(ctx, opt.BuilderID, levelInfo, timberOpts)
if err != nil {
- return nil, nil, errors.Wrap(err, "creating buildlogger logger")
+ return nil, nil, errors.Wrap(err, "creating Buildlogger logger")
}
default:
sender = newEvergreenLogSender(ctx, c, prefix, td, bufferSize, bufferDuration)
@@ -546,7 +532,6 @@ func (c *baseCommunicator) SendLogMessages(ctx context.Context, taskData TaskDat
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("log")
var cancel context.CancelFunc
@@ -564,7 +549,7 @@ func (c *baseCommunicator) SendLogMessages(ctx context.Context, taskData TaskDat
defer recovery.LogStackTraceAndExit("backup timer")
select {
case <-ctx.Done():
- grip.Info("request completed or task ending, stopping backup timer thread")
+ grip.Infof("Request completed or task ending, stopping backup timer thread: %s.", ctx.Err())
return
case t := <-backupTimer.C:
grip.Alert(message.Fields{
@@ -582,30 +567,36 @@ func (c *baseCommunicator) SendLogMessages(ctx context.Context, taskData TaskDat
}()
resp, err := c.retryRequest(ctx, info, &payload)
if err != nil {
- return utility.RespErrorf(resp, "problem sending %d log messages for task %s: %s", len(msgs), taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrapf(err, "sending %d log messages", len(msgs)).Error())
}
defer resp.Body.Close()
return nil
}
-// SendTaskResults posts a task's results, used by the attach results operations.
-func (c *baseCommunicator) SendTaskResults(ctx context.Context, taskData TaskData, r *task.LocalTestResults) error {
- if r == nil || len(r.Results) == 0 {
- return nil
- }
-
+func (c *baseCommunicator) GetPullRequestInfo(ctx context.Context, taskData TaskData, prNum int, owner, repo string, lastAttempt bool) (*apimodels.PullRequestInfo, error) {
info := requestInfo{
- method: http.MethodPost,
+ method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
- info.setTaskPathSuffix("results")
- resp, err := c.retryRequest(ctx, info, r)
+ info.setTaskPathSuffix("pull_request")
+
+ body := apimodels.CheckMergeRequest{
+ PRNum: prNum,
+ Owner: owner,
+ Repo: repo,
+ LastRetry: lastAttempt,
+ }
+ resp, err := c.retryRequest(ctx, info, &body)
if err != nil {
- return utility.RespErrorf(resp, "problem adding %d results to task %s: %s", len(r.Results), taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting the pull request").Error())
}
- defer resp.Body.Close()
- return nil
+
+ res := &apimodels.PullRequestInfo{}
+ if err := utility.ReadJSON(resp.Body, res); err != nil {
+ return nil, errors.Wrap(err, "reading pull request from response")
+ }
+
+ return res, nil
}
// GetPatch tries to get the patch data from the server in json format,
@@ -617,7 +608,6 @@ func (c *baseCommunicator) GetTaskPatch(ctx context.Context, taskData TaskData,
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
suffix := "git/patch"
if patchId != "" {
@@ -626,37 +616,74 @@ func (c *baseCommunicator) GetTaskPatch(ctx context.Context, taskData TaskData,
info.setTaskPathSuffix(suffix)
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get patch for task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrapf(err, "getting patch '%s' for task", patchId).Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, &patch); err != nil {
- return nil, errors.Wrapf(err, "problem parsing patch response for %s", taskData.ID)
+ return nil, errors.Wrap(err, "reading patch for task from response")
}
return &patch, nil
}
-// GetCedarConfig returns the cedar service information including the base URL,
-// URL, RPC port, and credentials.
+// GetCedarConfig returns the Cedar service configuration.
func (c *baseCommunicator) GetCedarConfig(ctx context.Context) (*apimodels.CedarConfig, error) {
info := requestInfo{
- method: http.MethodGet,
- version: apiVersion2,
- path: "agent/cedar_config",
+ method: http.MethodGet,
+ path: "agent/cedar_config",
+ }
+
+ resp, err := c.retryRequest(ctx, info, nil)
+ if err != nil {
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting the Cedar config").Error())
+ }
+
+ config := &apimodels.CedarConfig{}
+ if err := utility.ReadJSON(resp.Body, config); err != nil {
+ return nil, errors.Wrap(err, "reading the Cedar config from response")
+ }
+
+ return config, nil
+}
+
+func (c *baseCommunicator) GetAgentSetupData(ctx context.Context) (*apimodels.AgentSetupData, error) {
+ info := requestInfo{
+ method: http.MethodGet,
+ path: "agent/setup",
+ }
+
+ resp, err := c.retryRequest(ctx, info, nil)
+ if err != nil {
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting agent setup data").Error())
+ }
+
+ var data apimodels.AgentSetupData
+ if err := utility.ReadJSON(resp.Body, &data); err != nil {
+ return nil, errors.Wrap(err, "reading agent setup data from response")
+ }
+
+ return &data, nil
+}
+
+// GetDataPipesConfig returns the Data-Pipes service configuration.
+func (c *baseCommunicator) GetDataPipesConfig(ctx context.Context) (*apimodels.DataPipesConfig, error) {
+ info := requestInfo{
+ method: http.MethodGet,
+ path: "agent/data_pipes_config",
}
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "getting cedar config: %s", err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting the Data-Pipes config").Error())
}
- var cc apimodels.CedarConfig
- if err := utility.ReadJSON(resp.Body, &cc); err != nil {
- return nil, errors.Wrap(err, "reading cedar config from response")
+ config := &apimodels.DataPipesConfig{}
+ if err := utility.ReadJSON(resp.Body, config); err != nil {
+ return nil, errors.Wrap(err, "reading the Data-Pipes config from response")
}
- return &cc, nil
+ return config, nil
}
// GetPatchFiles is used by the git.get_project plugin and fetches
@@ -665,19 +692,18 @@ func (c *baseCommunicator) GetPatchFile(ctx context.Context, taskData TaskData,
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("git/patchfile/" + patchFileID)
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return "", utility.RespErrorf(resp, "failed to get patch file %s for task %s: %s", patchFileID, taskData.ID, err.Error())
+ return "", util.RespErrorf(resp, errors.Wrapf(err, "getting patch file '%s'", patchFileID).Error())
}
defer resp.Body.Close()
var result []byte
- result, err = ioutil.ReadAll(resp.Body)
+ result, err = io.ReadAll(resp.Body)
if err != nil {
- return "", errors.Wrapf(err, "problem reading file %s for patch %s", patchFileID, taskData.ID)
+ return "", errors.Wrapf(err, "reading patch file '%s' from response", patchFileID)
}
return string(result), nil
@@ -693,12 +719,11 @@ func (c *baseCommunicator) SendTestLog(ctx context.Context, taskData TaskData, l
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("test_logs")
resp, err := c.retryRequest(ctx, info, log)
if err != nil {
- return "", utility.RespErrorf(resp, "failed to send test log for task %s: %s", taskData.ID, err.Error())
+ return "", util.RespErrorf(resp, errors.Wrap(err, "sending test log").Error())
}
defer resp.Body.Close()
@@ -706,48 +731,25 @@ func (c *baseCommunicator) SendTestLog(ctx context.Context, taskData TaskData, l
ID string `json:"_id"`
}{}
if err = utility.ReadJSON(resp.Body, &logReply); err != nil {
- message := fmt.Sprintf("Error unmarshalling post test log response: %v", err)
- return "", errors.New(message)
+ return "", errors.Wrap(err, "reading test log reply from response")
}
logID := logReply.ID
return logID, nil
}
-// SendResults posts a set of test results for the communicator's task.
-// If results are empty or nil, this operation is a noop.
-func (c *baseCommunicator) SendTestResults(ctx context.Context, taskData TaskData, results *task.LocalTestResults) error {
- if results == nil || len(results.Results) == 0 {
- return nil
- }
+func (c *baseCommunicator) SetResultsInfo(ctx context.Context, taskData TaskData, service string, failed bool) error {
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
- info.setTaskPathSuffix("results")
- resp, err := c.retryRequest(ctx, info, results)
+ info.path = fmt.Sprintf("tasks/%s/set_results_info", taskData.ID)
+ resp, err := c.retryRequest(ctx, info, &apimodels.TaskTestResultsInfo{Service: service, Failed: failed})
if err != nil {
- return utility.RespErrorf(resp, "failed to send test results for task %s: %s", taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "setting results info").Error())
}
defer resp.Body.Close()
- return nil
-}
-// SetHasCedarResults sets the HasCedarResults flag to true in the given task
-// in the database.
-func (c *baseCommunicator) SetHasCedarResults(ctx context.Context, taskData TaskData, failed bool) error {
- info := requestInfo{
- method: http.MethodPost,
- taskData: &taskData,
- version: apiVersion2,
- }
- info.path = fmt.Sprintf("tasks/%s/set_has_cedar_results", taskData.ID)
- resp, err := c.retryRequest(ctx, info, &apimodels.CedarTestResultsTaskInfo{Failed: failed})
- if err != nil {
- return utility.RespErrorf(resp, "failed to set HasCedarResults for task %s: %s", taskData.ID, err.Error())
- }
- defer resp.Body.Close()
return nil
}
@@ -756,40 +758,38 @@ func (c *baseCommunicator) NewPush(ctx context.Context, taskData TaskData, req *
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("new_push")
resp, err := c.retryRequest(ctx, info, req)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to add pushlog to task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "adding push log").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, &newPushLog); err != nil {
- return nil, errors.Wrapf(err, "problem parsing response for %s", taskData.ID)
+ return nil, errors.Wrap(err, "reading push log reply from response")
}
return &newPushLog, nil
}
-func (c *baseCommunicator) UpdatePushStatus(ctx context.Context, taskData TaskData, pushlog *model.PushLog) error {
+func (c *baseCommunicator) UpdatePushStatus(ctx context.Context, taskData TaskData, pushLog *model.PushLog) error {
newPushLog := model.PushLog{}
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("update_push_status")
- resp, err := c.retryRequest(ctx, info, pushlog)
+ resp, err := c.retryRequest(ctx, info, pushLog)
if err != nil {
- return utility.RespErrorf(resp, "failed to update pushlog status for task %s: %s", taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "updating push log status").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, &newPushLog); err != nil {
- return errors.Wrapf(err, "problem parsing response for %s", taskData.ID)
+ return errors.Wrap(err, "reading push log reply from response")
}
return nil
@@ -804,12 +804,11 @@ func (c *baseCommunicator) AttachFiles(ctx context.Context, taskData TaskData, t
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("files")
resp, err := c.retryRequest(ctx, info, taskFiles)
if err != nil {
- return utility.RespErrorf(resp, "failed to post files for task %s: %s", taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "posting files").Error())
}
defer resp.Body.Close()
@@ -820,13 +819,12 @@ func (c *baseCommunicator) SetDownstreamParams(ctx context.Context, downstreamPa
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("downstreamParams")
resp, err := c.retryRequest(ctx, info, downstreamParams)
if err != nil {
- return utility.RespErrorf(resp, "failed to set upstream params for task %s: %s", taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "setting downstream params").Error())
}
defer resp.Body.Close()
@@ -837,18 +835,17 @@ func (c *baseCommunicator) GetManifest(ctx context.Context, taskData TaskData) (
info := requestInfo{
method: http.MethodGet,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("manifest/load")
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to load manifest for task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "loading manifest").Error())
}
defer resp.Body.Close()
mfest := manifest.Manifest{}
if err = utility.ReadJSON(resp.Body, &mfest); err != nil {
- return nil, errors.Wrapf(err, "problem parsing manifest response for %s", taskData.ID)
+ return nil, errors.Wrap(err, "reading manifest from response")
}
return &mfest, nil
@@ -858,102 +855,31 @@ func (c *baseCommunicator) KeyValInc(ctx context.Context, taskData TaskData, kv
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("keyval/inc")
resp, err := c.retryRequest(ctx, info, kv.Key)
if err != nil {
- return utility.RespErrorf(resp, "failed to increment key for task %s: %s", taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "incrementing key").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, kv); err != nil {
- return errors.Wrapf(err, "problem parsing keyval inc response %s", taskData.ID)
- }
-
- return nil
-}
-
-func (c *baseCommunicator) PostJSONData(ctx context.Context, taskData TaskData, path string, data interface{}) error {
- info := requestInfo{
- method: http.MethodPost,
- taskData: &taskData,
- version: apiVersion1,
+ return errors.Wrap(err, "reading key-value reply from response")
}
- info.setTaskPathSuffix(fmt.Sprintf("json/data/%s", path))
- resp, err := c.retryRequest(ctx, info, data)
- if err != nil {
- return utility.RespErrorf(resp, "failed to post json data for task %s: %s", taskData.ID, err.Error())
- }
- defer resp.Body.Close()
return nil
}
-func (c *baseCommunicator) GetJSONData(ctx context.Context, taskData TaskData, taskName, dataName, variantName string) ([]byte, error) {
- pathParts := []string{"json", "data", taskName, dataName}
- if variantName != "" {
- pathParts = append(pathParts, variantName)
- }
- info := requestInfo{
- method: http.MethodGet,
- taskData: &taskData,
- version: apiVersion1,
- }
- info.setTaskPathSuffix(strings.Join(pathParts, "/"))
- resp, err := c.retryRequest(ctx, info, nil)
- if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get json data for task %s: %s", taskData.ID, err.Error())
- }
- defer resp.Body.Close()
-
- out, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return nil, errors.Wrapf(err, "problem reading results from body for %s", taskData.ID)
- }
-
- return out, nil
-}
-
-func (c *baseCommunicator) GetJSONHistory(ctx context.Context, taskData TaskData, tags bool, taskName, dataName string) ([]byte, error) {
- path := "json/history/"
- if tags {
- path = "json/tags/"
- }
-
- path += fmt.Sprintf("%s/%s", taskName, dataName)
-
- info := requestInfo{
- method: http.MethodGet,
- taskData: &taskData,
- version: apiVersion1,
- }
- info.setTaskPathSuffix(path)
- resp, err := c.retryRequest(ctx, info, nil)
- if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get json history for task %s: %s", taskData.ID, err.Error())
- }
- defer resp.Body.Close()
-
- out, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return nil, errors.Wrapf(err, "problem reading results from body for %s", taskData.ID)
- }
-
- return out, nil
-}
-
// GenerateTasks posts new tasks for the `generate.tasks` command.
func (c *baseCommunicator) GenerateTasks(ctx context.Context, td TaskData, jsonBytes []json.RawMessage) error {
info := requestInfo{
method: http.MethodPost,
taskData: &td,
- version: apiVersion2,
}
info.path = fmt.Sprintf("tasks/%s/generate", td.ID)
resp, err := c.retryRequest(ctx, info, jsonBytes)
if err != nil {
- return utility.RespErrorf(resp, "problem sending `generate.tasks` request: %s", err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "sending generate.tasks request").Error())
}
return nil
}
@@ -963,17 +889,16 @@ func (c *baseCommunicator) GenerateTasksPoll(ctx context.Context, td TaskData) (
info := requestInfo{
method: http.MethodGet,
taskData: &td,
- version: apiVersion2,
}
info.path = fmt.Sprintf("tasks/%s/generate", td.ID)
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to send generate.tasks request for task %s: %s", td.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "sending generate.tasks poll request").Error())
}
defer resp.Body.Close()
generated := &apimodels.GeneratePollResponse{}
if err := utility.ReadJSON(resp.Body, generated); err != nil {
- return nil, errors.Wrapf(err, "problem reading generated from response body for '%s'", td.ID)
+ return nil, errors.Wrap(err, "reading generate.tasks poll reply from response")
}
return generated, nil
}
@@ -983,18 +908,17 @@ func (c *baseCommunicator) CreateHost(ctx context.Context, td TaskData, options
info := requestInfo{
method: http.MethodPost,
taskData: &td,
- version: apiVersion2,
}
info.path = fmt.Sprintf("hosts/%s/create", td.ID)
resp, err := c.retryRequest(ctx, info, options)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to send create.host request for task %s: %s", td.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "sending host.create request").Error())
}
defer resp.Body.Close()
ids := []string{}
if err = utility.ReadJSON(resp.Body, &ids); err != nil {
- return nil, errors.Wrap(err, "problem reading ids from `create.host` response")
+ return nil, errors.Wrap(err, "reading host IDs from response")
}
return ids, nil
}
@@ -1003,39 +927,37 @@ func (c *baseCommunicator) ListHosts(ctx context.Context, td TaskData) (restmode
info := requestInfo{
method: http.MethodGet,
taskData: &td,
- version: apiVersion2,
path: fmt.Sprintf("hosts/%s/list", td.ID),
}
result := restmodel.HostListResults{}
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return result, utility.RespErrorf(resp, "failed to list hosts for task %s: %s", td.ID, err.Error())
+ return result, util.RespErrorf(resp, errors.Wrap(err, "listing hosts").Error())
}
defer resp.Body.Close()
if err := utility.ReadJSON(resp.Body, &result); err != nil {
- return result, errors.Wrapf(err, "problem reading hosts from response body for '%s'", td.ID)
+ return result, errors.Wrap(err, "reading hosts from response")
}
return result, nil
}
func (c *baseCommunicator) GetDistroByName(ctx context.Context, id string) (*restmodel.APIDistro, error) {
info := requestInfo{
- method: http.MethodGet,
- version: apiVersion2,
- path: fmt.Sprintf("distros/%s", id),
+ method: http.MethodGet,
+ path: fmt.Sprintf("distros/%s", id),
}
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to get distro named %s: %s", id, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrapf(err, "getting distro '%s'", id).Error())
}
defer resp.Body.Close()
d := &restmodel.APIDistro{}
if err = utility.ReadJSON(resp.Body, &d); err != nil {
- return nil, errors.Wrapf(err, "reading distro from response body for '%s'", id)
+ return nil, errors.Wrapf(err, "reading distro '%s' from response", id)
}
return d, nil
@@ -1054,12 +976,11 @@ func (c *baseCommunicator) StartTask(ctx context.Context, taskData TaskData) err
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
}
info.setTaskPathSuffix("start")
resp, err := c.retryRequest(ctx, info, taskStartRequest)
if err != nil {
- return utility.RespErrorf(resp, "failed to start task %s: %s", taskData.ID, err.Error())
+ return util.RespErrorf(resp, errors.Wrap(err, "starting task").Error())
}
defer resp.Body.Close()
grip.Info(message.Fields{
@@ -1073,22 +994,21 @@ func (c *baseCommunicator) StartTask(ctx context.Context, taskData TaskData) err
// GetDockerStatus returns status of the container for the given host
func (c *baseCommunicator) GetDockerStatus(ctx context.Context, hostID string) (*cloud.ContainerStatus, error) {
info := requestInfo{
- method: http.MethodGet,
- path: fmt.Sprintf("hosts/%s/status", hostID),
- version: apiVersion2,
+ method: http.MethodGet,
+ path: fmt.Sprintf("hosts/%s/status", hostID),
}
resp, err := c.request(ctx, info, nil)
if err != nil {
- return nil, errors.Wrapf(err, "error getting container status for %s", hostID)
+ return nil, errors.Wrapf(err, "getting status for container '%s'", hostID)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return nil, utility.RespErrorf(resp, "getting container status")
+ return nil, util.RespErrorf(resp, errors.Wrapf(err, "getting status for container '%s'", hostID).Error())
}
status := cloud.ContainerStatus{}
if err := utility.ReadJSON(resp.Body, &status); err != nil {
- return nil, errors.Wrap(err, "problem parsing container status")
+ return nil, errors.Wrapf(err, "reading container status from response for container '%s'", hostID)
}
return &status, nil
@@ -1110,23 +1030,22 @@ func (c *baseCommunicator) GetDockerLogs(ctx context.Context, hostID string, sta
}
info := requestInfo{
- method: http.MethodGet,
- version: apiVersion2,
- path: path,
+ method: http.MethodGet,
+ path: path,
}
resp, err := c.request(ctx, info, "")
if err != nil {
- return nil, errors.Wrapf(err, "problem getting logs for container _id %s", hostID)
+ return nil, errors.Wrapf(err, "getting logs for container '%s'", hostID)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return nil, utility.RespErrorf(resp, "getting logs for container id '%s'", hostID)
+ return nil, util.RespErrorf(resp, "getting logs for container '%s'", hostID)
}
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
if err != nil {
- return nil, errors.Wrap(err, "failed to read response")
+ return nil, errors.Wrap(err, "reading logs from response")
}
return body, nil
@@ -1136,7 +1055,6 @@ func (c *baseCommunicator) ConcludeMerge(ctx context.Context, patchId, status st
info := requestInfo{
method: http.MethodPost,
path: fmt.Sprintf("commit_queue/%s/conclude_merge", patchId),
- version: apiVersion2,
taskData: &td,
}
body := struct {
@@ -1146,12 +1064,12 @@ func (c *baseCommunicator) ConcludeMerge(ctx context.Context, patchId, status st
}
resp, err := c.request(ctx, info, body)
if err != nil {
- return errors.Wrapf(err, "error concluding merge")
+ return errors.Wrapf(err, "concluding merge for patch '%s'", patchId)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return utility.RespErrorf(resp, "error concluding merge")
+ return util.RespErrorf(resp, "concluding merge for patch '%s'", patchId)
}
return nil
@@ -1161,21 +1079,20 @@ func (c *baseCommunicator) GetAdditionalPatches(ctx context.Context, patchId str
info := requestInfo{
method: http.MethodGet,
path: fmt.Sprintf("commit_queue/%s/additional", patchId),
- version: apiVersion2,
taskData: &td,
}
resp, err := c.request(ctx, info, nil)
if err != nil {
- return nil, errors.Wrapf(err, "error getting additional patches")
+ return nil, errors.Wrap(err, "getting additional patches")
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return nil, utility.RespErrorf(resp, "error getting additional patches")
+ return nil, util.RespErrorf(resp, "getting additional patches")
}
patches := []string{}
if err := utility.ReadJSON(resp.Body, &patches); err != nil {
- return nil, errors.Wrap(err, "problem parsing response")
+ return nil, errors.Wrap(err, "reading patch IDs from response")
}
return patches, nil
diff --git a/agent/internal/client/host_client.go b/agent/internal/client/host_client.go
index 5e331269b1b..d9b7b7bb1f0 100644
--- a/agent/internal/client/host_client.go
+++ b/agent/internal/client/host_client.go
@@ -20,6 +20,9 @@ const (
// for an agent running on a host.
type hostCommunicator struct {
baseCommunicator
+
+ hostID string
+ hostSecret string
}
// NewHostCommunicator returns a Communicator capable of making HTTP REST
@@ -32,6 +35,8 @@ func NewHostCommunicator(serverURL, hostID, hostSecret string) Communicator {
evergreen.HostHeader: hostID,
evergreen.HostSecretHeader: hostSecret,
}),
+ hostID: hostID,
+ hostSecret: hostSecret,
}
c.resetClient()
diff --git a/agent/internal/client/host_methods.go b/agent/internal/client/host_methods.go
index 0a6202a32ef..bd703d4b219 100644
--- a/agent/internal/client/host_methods.go
+++ b/agent/internal/client/host_methods.go
@@ -6,33 +6,13 @@ import (
"net/http"
"github.com/evergreen-ci/evergreen/apimodels"
+ "github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
"github.com/pkg/errors"
)
-func (c *hostCommunicator) GetAgentSetupData(ctx context.Context) (*apimodels.AgentSetupData, error) {
- out := &apimodels.AgentSetupData{}
- info := requestInfo{
- method: http.MethodGet,
- version: apiVersion1,
- path: "agent/setup",
- }
-
- resp, err := c.retryRequest(ctx, info, nil)
- if err != nil {
- err = utility.RespErrorf(resp, "failed to get agent setup info: %s", err.Error())
- grip.Alert(err)
- return nil, err
- }
- defer resp.Body.Close()
- if err = utility.ReadJSON(resp.Body, out); err != nil {
- return nil, errors.Wrap(err, "failed to get agent setup info")
- }
- return out, nil
-}
-
// EndTask marks the task as finished with the given status
func (c *hostCommunicator) EndTask(ctx context.Context, detail *apimodels.TaskEndDetail, taskData TaskData) (*apimodels.EndTaskResponse, error) {
grip.Info(message.Fields{
@@ -44,17 +24,15 @@ func (c *hostCommunicator) EndTask(ctx context.Context, detail *apimodels.TaskEn
info := requestInfo{
method: http.MethodPost,
taskData: &taskData,
- version: apiVersion1,
+ path: fmt.Sprintf("hosts/%s/task/%s/end", c.hostID, taskData.ID),
}
- info.setTaskPathSuffix("end")
resp, err := c.retryRequest(ctx, info, detail)
if err != nil {
- return nil, utility.RespErrorf(resp, "failed to end task %s: %s", taskData.ID, err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "ending task").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, taskEndResp); err != nil {
- message := fmt.Sprintf("Error unmarshalling task end response: %v", err)
- return nil, errors.New(message)
+ return nil, errors.Wrap(err, "reading end task reply from response")
}
grip.Info(message.Fields{
"message": "finished EndTask",
@@ -68,20 +46,16 @@ func (c *hostCommunicator) EndTask(ctx context.Context, detail *apimodels.TaskEn
func (c *hostCommunicator) GetNextTask(ctx context.Context, details *apimodels.GetNextTaskDetails) (*apimodels.NextTaskResponse, error) {
nextTask := &apimodels.NextTaskResponse{}
info := requestInfo{
- method: http.MethodGet,
- version: apiVersion1,
+ method: http.MethodGet,
}
- info.path = "agent/next_task"
+ info.path = fmt.Sprintf("hosts/%s/agent/next_task", c.hostID)
resp, err := c.retryRequest(ctx, info, details)
if err != nil {
- err = utility.RespErrorf(resp, "failed to get next task: %s", err.Error())
- grip.Critical(err)
- return nil, err
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting next task").Error())
}
defer resp.Body.Close()
if err = utility.ReadJSON(resp.Body, nextTask); err != nil {
- err = errors.Wrap(err, "failed to read next task from response")
- return nil, err
+ return nil, errors.Wrap(err, "reading next task reply from response")
}
return nextTask, nil
}
diff --git a/agent/internal/client/interface.go b/agent/internal/client/interface.go
index f80e61a0eb6..9c6eb9efdc1 100644
--- a/agent/internal/client/interface.go
+++ b/agent/internal/client/interface.go
@@ -13,7 +13,6 @@ import (
patchmodel "github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
restmodel "github.com/evergreen-ci/evergreen/rest/model"
- "github.com/evergreen-ci/evergreen/util"
"github.com/mongodb/grip"
"google.golang.org/grpc"
)
@@ -56,26 +55,31 @@ type SharedCommunicator interface {
GetDistroView(context.Context, TaskData) (*apimodels.DistroView, error)
// GetDistroAMI gets the AMI for the given distro/region
GetDistroAMI(context.Context, string, string, TaskData) (string, error)
- // GetProject loads the project using the task's version ID
+ // GetProject loads the project using the task's version ID.
GetProject(context.Context, TaskData) (*model.Project, error)
- // GetExpansions returns all expansions for the task known by the app server
- GetExpansions(context.Context, TaskData) (util.Expansions, error)
// Heartbeat will return a non-empty task status if the agent should stop running the task.
// Returning evergreen.TaskConflict means the agent is no longer authorized to run this task and
// should move on to the next available one. Returning evergreen.TaskFailed means that the task
// has been aborted. An empty string indicates the heartbeat has succeeded.
Heartbeat(context.Context, TaskData) (string, error)
- // FetchExpansionVars loads expansions for a communicator's task from the API server.
- FetchExpansionVars(context.Context, TaskData) (*apimodels.ExpansionVars, error)
- // GetCedarConfig returns the cedar service information including the
- // base URL, RPC port, and credentials.
+ // GetExpansionsAndVars returns the expansions, project variables, and
+ // version parameters. For expansions, all expansions are loaded except for
+ // the expansions defined for this task's build variant. For variables,
+ // project variables, project private variables, and version parameters are
+ // included, but not project parameters.
+ GetExpansionsAndVars(context.Context, TaskData) (*apimodels.ExpansionsAndVars, error)
+ // GetCedarConfig returns the Cedar service configuration.
GetCedarConfig(context.Context) (*apimodels.CedarConfig, error)
// GetCedarGRPCConn returns the client connection to cedar if it exists, or
// creates it if it doesn't exist.
GetCedarGRPCConn(context.Context) (*grpc.ClientConn, error)
- // SetHasCedarResults sets the HasCedarResults flag to true in the
- // task and sets CedarResultsFailed if there are failed results.
- SetHasCedarResults(context.Context, TaskData, bool) error
+ // SetResultsInfo sets the test results information in the task.
+ SetResultsInfo(context.Context, TaskData, string, bool) error
+ // GetDataPipesConfig returns the Data-Pipes service configuration.
+ GetDataPipesConfig(context.Context) (*apimodels.DataPipesConfig, error)
+
+ // GetPullRequestInfo takes in a PR number, owner, and repo and returns information from the corresponding pull request.
+ GetPullRequestInfo(context.Context, TaskData, int, string, string, bool) (*apimodels.PullRequestInfo, error)
// DisableHost signals to the app server that the host should be disabled.
DisableHost(context.Context, string, apimodels.DisableInfo) error
@@ -87,25 +91,17 @@ type SharedCommunicator interface {
// SendLogMessages sends a group of log messages to the API Server
SendLogMessages(context.Context, TaskData, []apimodels.LogMessage) error
- // The following operations use the legacy API server and are
- // used by task commands.
- SendTestResults(context.Context, TaskData, *task.LocalTestResults) error
+ // The following operations are used by task commands.
SendTestLog(context.Context, TaskData, *model.TestLog) (string, error)
GetTaskPatch(context.Context, TaskData, string) (*patchmodel.Patch, error)
GetPatchFile(context.Context, TaskData, string) (string, error)
- // The following operations are used by
NewPush(context.Context, TaskData, *apimodels.S3CopyRequest) (*model.PushLog, error)
UpdatePushStatus(context.Context, TaskData, *model.PushLog) error
AttachFiles(context.Context, TaskData, []*artifact.File) error
GetManifest(context.Context, TaskData) (*manifest.Manifest, error)
KeyValInc(context.Context, TaskData, *model.KeyVal) error
- // These are for the taskdata/json plugin that saves perf data
- PostJSONData(context.Context, TaskData, string, interface{}) error
- GetJSONData(context.Context, TaskData, string, string, string) ([]byte, error)
- GetJSONHistory(context.Context, TaskData, bool, string, string) ([]byte, error)
-
// GenerateTasks posts new tasks for the `generate.tasks` command.
GenerateTasks(context.Context, TaskData, []json.RawMessage) error
diff --git a/agent/internal/client/logger_producer.go b/agent/internal/client/logger_producer.go
index 44303f24f9d..c0b6005fd1d 100644
--- a/agent/internal/client/logger_producer.go
+++ b/agent/internal/client/logger_producer.go
@@ -63,7 +63,7 @@ func (l *logHarness) Close() error {
catcher.Add(s.Close())
}
- return errors.Wrap(catcher.Resolve(), "problem closing log harness")
+ return errors.Wrap(catcher.Resolve(), "closing log harness")
}
func (l *logHarness) Closed() bool {
@@ -126,7 +126,7 @@ func (l *singleChannelLogHarness) Close() error {
catcher.Add(l.logger.GetSender().Close())
- return errors.Wrap(catcher.Resolve(), "problem closing log harness")
+ return errors.Wrap(catcher.Resolve(), "closing log harness")
}
func (l *singleChannelLogHarness) Closed() bool {
diff --git a/agent/internal/client/mock.go b/agent/internal/client/mock.go
index bdbf1c07003..bdf53699b61 100644
--- a/agent/internal/client/mock.go
+++ b/agent/internal/client/mock.go
@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "os"
"path/filepath"
"runtime"
"sync"
@@ -18,6 +18,7 @@ import (
"github.com/evergreen-ci/evergreen/model/manifest"
patchmodel "github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/evergreen/rest/model"
"github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
@@ -45,6 +46,7 @@ type Mock struct {
EndTaskResult endTaskResult
ShellExecFilename string
TimeoutFilename string
+ GenerateTasksShouldFail bool
HeartbeatShouldAbort bool
HeartbeatShouldConflict bool
HeartbeatShouldErr bool
@@ -54,13 +56,13 @@ type Mock struct {
CedarGRPCConn *grpc.ClientConn
- AttachedFiles map[string][]*artifact.File
- LogID string
- LocalTestResults *task.LocalTestResults
- HasCedarResults bool
- CedarResultsFailed bool
- TestLogs []*serviceModel.TestLog
- TestLogCount int
+ AttachedFiles map[string][]*artifact.File
+ LogID string
+ LocalTestResults []testresult.TestResult
+ ResultsService string
+ ResultsFailed bool
+ TestLogs []*serviceModel.TestLog
+ TestLogCount int
// data collected by mocked methods
logMessages map[string][]apimodels.LogMessage
@@ -68,6 +70,7 @@ type Mock struct {
keyVal map[string]*serviceModel.KeyVal
LastMessageSent time.Time
DownstreamParams []patchmodel.Parameter
+ Project *serviceModel.Project
mu sync.RWMutex
}
@@ -166,9 +169,7 @@ func (c *Mock) GetProjectRef(ctx context.Context, td TaskData) (*serviceModel.Pr
}
func (c *Mock) GetDistroView(context.Context, TaskData) (*apimodels.DistroView, error) {
- return &apimodels.DistroView{
- WorkDir: ".",
- }, nil
+ return &apimodels.DistroView{}, nil
}
func (c *Mock) GetDistroAMI(context.Context, string, string, TaskData) (string, error) {
@@ -176,11 +177,14 @@ func (c *Mock) GetDistroAMI(context.Context, string, string, TaskData) (string,
}
func (c *Mock) GetProject(ctx context.Context, td TaskData) (*serviceModel.Project, error) {
+ if c.Project != nil {
+ return c.Project, nil
+ }
var err error
var data []byte
_, file, _, _ := runtime.Caller(0)
- data, err = ioutil.ReadFile(filepath.Join(filepath.Dir(file), "testdata", fmt.Sprintf("%s.yaml", td.ID)))
+ data, err = os.ReadFile(filepath.Join(filepath.Dir(file), "testdata", fmt.Sprintf("%s.yaml", td.ID)))
if err != nil {
grip.Error(err)
}
@@ -196,12 +200,30 @@ func (c *Mock) GetExpansions(ctx context.Context, taskData TaskData) (util.Expan
return e, nil
}
+// GetExpansionsAndVars returns a mock ExpansionsAndVars.
+func (c *Mock) GetExpansionsAndVars(ctx context.Context, taskData TaskData) (*apimodels.ExpansionsAndVars, error) {
+ return &apimodels.ExpansionsAndVars{
+ Expansions: util.Expansions{"foo": "bar"},
+ Vars: map[string]string{
+ "shellexec_fn": c.ShellExecFilename,
+ "timeout_fn": c.TimeoutFilename,
+ "my_new_timeout": "2",
+ },
+ Parameters: map[string]string{
+ "overwrite-this-parameter": "new-parameter-value",
+ },
+ PrivateVars: map[string]bool{
+ "some_private_var": true,
+ },
+ }, nil
+}
+
func (c *Mock) Heartbeat(ctx context.Context, td TaskData) (string, error) {
if c.HeartbeatShouldAbort {
return evergreen.TaskFailed, nil
}
if c.HeartbeatShouldConflict {
- return evergreen.TaskConflict, errors.Errorf("Unauthorized - wrong secret")
+ return evergreen.TaskConflict, errors.Errorf("unauthorized - wrong secret")
}
if c.HeartbeatShouldSometimesErr {
if c.HeartbeatShouldErr {
@@ -217,17 +239,6 @@ func (c *Mock) Heartbeat(ctx context.Context, td TaskData) (string, error) {
return "", nil
}
-// FetchExpansionVars returns a mock ExpansionVars.
-func (c *Mock) FetchExpansionVars(ctx context.Context, td TaskData) (*apimodels.ExpansionVars, error) {
- return &apimodels.ExpansionVars{
- Vars: map[string]string{
- "shellexec_fn": c.ShellExecFilename,
- "timeout_fn": c.TimeoutFilename,
- "my_new_timeout": "2",
- },
- }, nil
-}
-
// GetNextTask returns a mock NextTaskResponse.
func (c *Mock) GetNextTask(ctx context.Context, details *apimodels.GetNextTaskDetails) (*apimodels.NextTaskResponse, error) {
if c.NextTaskIsNil {
@@ -253,7 +264,7 @@ func (c *Mock) GetNextTask(ctx context.Context, details *apimodels.GetNextTaskDe
}, nil
}
-// GetCedarConfig returns mock cedar service information.
+// GetCedarConfig returns a mock Cedar service configuration.
func (c *Mock) GetCedarConfig(ctx context.Context) (*apimodels.CedarConfig, error) {
return &apimodels.CedarConfig{
BaseURL: "base_url",
@@ -271,6 +282,16 @@ func (c *Mock) GetCedarGRPCConn(ctx context.Context) (*grpc.ClientConn, error) {
return c.CedarGRPCConn, nil
}
+// GetDataPipesConfig returns a mock Data-Pipes service configuration.
+func (c *Mock) GetDataPipesConfig(ctx context.Context) (*apimodels.DataPipesConfig, error) {
+ return &apimodels.DataPipesConfig{
+ Host: "url",
+ Region: "us-east-1",
+ AWSAccessKey: "access",
+ AWSSecretKey: "secret",
+ }, nil
+}
+
// SendTaskLogMessages posts tasks messages to the api server
func (c *Mock) SendLogMessages(ctx context.Context, td TaskData, msgs []apimodels.LogMessage) error {
c.mu.Lock()
@@ -373,18 +394,10 @@ func (*Mock) CreateSpawnHost(ctx context.Context, spawnRequest *model.HostReques
return mockHost, nil
}
-// SendResults posts a set of test results for the communicator's task.
-// If results are empty or nil, this operation is a noop.
-func (c *Mock) SendTestResults(ctx context.Context, td TaskData, results *task.LocalTestResults) error {
- c.LocalTestResults = results
- return nil
-}
-
-// SetHasCedarResults sets the HasCedarResults flag in the task.
-func (c *Mock) SetHasCedarResults(ctx context.Context, td TaskData, failed bool) error {
- c.HasCedarResults = true
+func (c *Mock) SetResultsInfo(ctx context.Context, td TaskData, service string, failed bool) error {
+ c.ResultsService = service
if failed {
- c.CedarResultsFailed = true
+ c.ResultsFailed = true
}
return nil
}
@@ -414,7 +427,7 @@ func (c *Mock) NewPush(ctx context.Context, td TaskData, req *apimodels.S3CopyRe
return nil, nil
}
-func (c *Mock) UpdatePushStatus(ctx context.Context, td TaskData, pushlog *serviceModel.PushLog) error {
+func (c *Mock) UpdatePushStatus(ctx context.Context, td TaskData, pushLog *serviceModel.PushLog) error {
return nil
}
@@ -442,18 +455,6 @@ func (c *Mock) KeyValInc(ctx context.Context, td TaskData, kv *serviceModel.KeyV
return nil
}
-func (c *Mock) PostJSONData(ctx context.Context, td TaskData, path string, data interface{}) error {
- return nil
-}
-
-func (c *Mock) GetJSONData(ctx context.Context, td TaskData, tn, dn, vn string) ([]byte, error) {
- return nil, nil
-}
-
-func (c *Mock) GetJSONHistory(ctx context.Context, td TaskData, tags bool, tn, dn string) ([]byte, error) {
- return nil, nil
-}
-
// GenerateTasks posts new tasks for the `generate.tasks` command.
func (c *Mock) GenerateTasks(ctx context.Context, td TaskData, jsonBytes []json.RawMessage) error {
if td.ID != "mock_id" {
@@ -466,11 +467,13 @@ func (c *Mock) GenerateTasks(ctx context.Context, td TaskData, jsonBytes []json.
}
func (c *Mock) GenerateTasksPoll(ctx context.Context, td TaskData) (*apimodels.GeneratePollResponse, error) {
- return &apimodels.GeneratePollResponse{
- Finished: true,
- ShouldExit: false,
- Errors: []string{},
- }, nil
+ resp := &apimodels.GeneratePollResponse{
+ Finished: true,
+ }
+ if c.GenerateTasksShouldFail {
+ resp.Error = "error polling generate tasks!"
+ }
+ return resp, nil
}
func (c *Mock) CreateHost(ctx context.Context, td TaskData, options apimodels.CreateHost) ([]string, error) {
@@ -503,3 +506,9 @@ func (c *Mock) ConcludeMerge(ctx context.Context, patchId, status string, td Tas
func (c *Mock) GetAdditionalPatches(ctx context.Context, patchId string, td TaskData) ([]string, error) {
return []string{"555555555555555555555555"}, nil
}
+
+func (c *Mock) GetPullRequestInfo(ctx context.Context, taskData TaskData, prNum int, owner, repo string, lastAttempt bool) (*apimodels.PullRequestInfo, error) {
+ return &apimodels.PullRequestInfo{
+ Mergeable: utility.TruePtr(),
+ }, nil
+}
diff --git a/agent/internal/client/pod_methods.go b/agent/internal/client/pod_methods.go
index fe77b54975c..bad362b2745 100644
--- a/agent/internal/client/pod_methods.go
+++ b/agent/internal/client/pod_methods.go
@@ -6,50 +6,51 @@ import (
"net/http"
"github.com/evergreen-ci/evergreen/apimodels"
+ "github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
"github.com/pkg/errors"
)
-func (c *podCommunicator) GetAgentSetupData(ctx context.Context) (*apimodels.AgentSetupData, error) {
+// EndTask marks the task as finished with the given status.
+func (c *podCommunicator) EndTask(ctx context.Context, detail *apimodels.TaskEndDetail, taskData TaskData) (*apimodels.EndTaskResponse, error) {
info := requestInfo{
- method: http.MethodGet,
- version: apiVersion2,
- path: fmt.Sprintf("pods/%s/agent/setup", c.podID),
+ method: http.MethodPost,
+ taskData: &taskData,
+ path: fmt.Sprintf("pods/%s/task/%s/end", c.podID, taskData.ID),
}
-
- resp, err := c.retryRequest(ctx, info, nil)
+ resp, err := c.retryRequest(ctx, info, detail)
if err != nil {
- return nil, utility.RespErrorf(resp, "getting agent setup data: %s", err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "ending task").Error())
}
-
- var data apimodels.AgentSetupData
- if err := utility.ReadJSON(resp.Body, data); err != nil {
- return nil, errors.Wrap(err, "reading agent setup data from response")
+ var taskEndResp apimodels.EndTaskResponse
+ if err = utility.ReadJSON(resp.Body, &taskEndResp); err != nil {
+ return nil, errors.Wrap(err, "reading end task response")
}
-
- return &data, nil
-}
-
-// EndTask marks the task as finished with the given status
-func (c *podCommunicator) EndTask(ctx context.Context, detail *apimodels.TaskEndDetail, taskData TaskData) (*apimodels.EndTaskResponse, error) {
- return nil, errors.New("TODO: implement")
+ grip.Info(message.Fields{
+ "message": "finished EndTask",
+ "task_id": taskData.ID,
+ "task_secret": taskData.Secret,
+ })
+ return &taskEndResp, nil
}
-// GetNextTask returns a next task response by getting the next task for a given host.
+// GetNextTask returns information about the next task to run, or other
+// miscellaneous actions to take in between tasks.
func (c *podCommunicator) GetNextTask(ctx context.Context, details *apimodels.GetNextTaskDetails) (*apimodels.NextTaskResponse, error) {
info := requestInfo{
- method: http.MethodGet,
- version: apiVersion2,
- path: fmt.Sprintf("pods/%s/agent/next_task", c.podID),
+ method: http.MethodGet,
+ path: fmt.Sprintf("pods/%s/agent/next_task", c.podID),
}
resp, err := c.retryRequest(ctx, info, nil)
if err != nil {
- return nil, utility.RespErrorf(resp, "getting next task: %s", err.Error())
+ return nil, util.RespErrorf(resp, errors.Wrap(err, "getting next task").Error())
}
var nextTask apimodels.NextTaskResponse
if err := utility.ReadJSON(resp.Body, &nextTask); err != nil {
- return nil, errors.Wrap(err, "reading next task from response")
+ return nil, errors.Wrap(err, "reading next task reply from response")
}
return &nextTask, nil
diff --git a/agent/internal/client/request.go b/agent/internal/client/request.go
index 812980801ea..010dfee0fc7 100644
--- a/agent/internal/client/request.go
+++ b/agent/internal/client/request.go
@@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"io"
- "io/ioutil"
"net/http"
"strconv"
"strings"
@@ -22,25 +21,16 @@ import (
type requestInfo struct {
method string
path string
- version apiVersion
taskData *TaskData
}
-// Version is an "enum" for the different API versions
-type apiVersion string
-
-const (
- apiVersion1 apiVersion = "/api/2"
- apiVersion2 apiVersion = evergreen.APIRoutePrefixV2
-)
-
var HTTPConflictError = errors.New(evergreen.TaskConflict)
-func (c *baseCommunicator) newRequest(method, path, taskID, taskSecret, version string, data interface{}) (*http.Request, error) {
- url := c.getPath(path, version)
+func (c *baseCommunicator) newRequest(method, path, taskID, taskSecret string, data interface{}) (*http.Request, error) {
+ url := c.getPath(path, evergreen.APIRoutePrefixV2)
r, err := http.NewRequest(method, url, nil)
if err != nil {
- return nil, errors.New("Error building request")
+ return nil, errors.New("building request")
}
if data != nil {
if rc, ok := data.(io.ReadCloser); ok {
@@ -52,7 +42,7 @@ func (c *baseCommunicator) newRequest(method, path, taskID, taskSecret, version
return nil, err
}
r.Header.Add(evergreen.ContentLengthHeader, strconv.Itoa(len(out)))
- r.Body = ioutil.NopCloser(bytes.NewReader(out))
+ r.Body = io.NopCloser(bytes.NewReader(out))
}
}
@@ -72,10 +62,10 @@ func (c *baseCommunicator) newRequest(method, path, taskID, taskSecret, version
func (c *baseCommunicator) createRequest(info requestInfo, data interface{}) (*http.Request, error) {
if info.method == http.MethodPost && data == nil {
- return nil, errors.New("Attempting to post a nil body")
+ return nil, errors.Errorf("cannot send '%s' request with a nil body", http.MethodPost)
}
if err := info.validateRequestInfo(); err != nil {
- return nil, errors.WithStack(err)
+ return nil, errors.Wrap(err, "validating request info")
}
var taskID, secret string
@@ -83,9 +73,9 @@ func (c *baseCommunicator) createRequest(info requestInfo, data interface{}) (*h
taskID = info.taskData.ID
secret = info.taskData.Secret
}
- r, err := c.newRequest(info.method, info.path, taskID, secret, string(info.version), data)
+ r, err := c.newRequest(info.method, info.path, taskID, secret, data)
if err != nil {
- return nil, errors.Wrap(err, "Error creating request")
+ return nil, errors.Wrap(err, "creating request")
}
return r, nil
@@ -94,11 +84,11 @@ func (c *baseCommunicator) createRequest(info requestInfo, data interface{}) (*h
func (c *baseCommunicator) request(ctx context.Context, info requestInfo, data interface{}) (*http.Response, error) {
r, err := c.createRequest(info, data)
if err != nil {
- return nil, errors.WithStack(err)
+ return nil, errors.Wrap(err, "creating request")
}
resp, err := c.doRequest(ctx, r)
if err != nil {
- return nil, errors.WithStack(err)
+ return nil, errors.Wrap(err, "sending request")
}
return resp, nil
@@ -146,9 +136,9 @@ func (c *baseCommunicator) retryRequest(ctx context.Context, info requestInfo, d
}
}
- r, err := c.createRequest(info, ioutil.NopCloser(bytes.NewReader(out)))
+ r, err := c.createRequest(info, io.NopCloser(bytes.NewReader(out)))
if err != nil {
- return nil, err
+ return nil, errors.Wrap(err, "creating request")
}
r.Header.Add(evergreen.ContentLengthHeader, strconv.Itoa(len(out)))
@@ -184,11 +174,7 @@ func (r *requestInfo) validateRequestInfo() error {
switch r.method {
case http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch:
default:
- return errors.New("invalid HTTP method")
- }
-
- if r.version != apiVersion1 && r.version != apiVersion2 {
- return errors.New("invalid API version")
+ return errors.Errorf("invalid HTTP method '%s'", r.method)
}
return nil
diff --git a/agent/internal/client/request_test.go b/agent/internal/client/request_test.go
index d05b8c020fe..6bf1d5cc8f2 100644
--- a/agent/internal/client/request_test.go
+++ b/agent/internal/client/request_test.go
@@ -31,7 +31,7 @@ func (s *RequestTestSuite) SetupTest() {
}
func (s *RequestTestSuite) TestNewRequest() {
- r, err := s.evergreenREST.newRequest("method", "path", "task1", "taskSecret", string(apiVersion1), nil)
+ r, err := s.evergreenREST.newRequest("method", "path", "task1", "taskSecret", nil)
s.NoError(err)
s.Equal("task1", r.Header.Get(evergreen.TaskHeader))
s.Equal("taskSecret", r.Header.Get(evergreen.TaskSecretHeader))
@@ -41,12 +41,8 @@ func (s *RequestTestSuite) TestNewRequest() {
}
func (s *RequestTestSuite) TestGetPathReturnsCorrectPath() {
- // V1 path
- path := s.evergreenREST.getPath("foo", string(apiVersion1))
- s.Equal("url/api/2/foo", path)
-
// V2 path
- path = s.evergreenREST.getPath("foo", string(apiVersion2))
+ path := s.evergreenREST.getPath("foo", evergreen.APIRoutePrefixV2)
s.Equal("url/rest/v2/foo", path)
}
@@ -57,7 +53,6 @@ func (s *RequestTestSuite) TestValidateRequestInfo() {
}
info := requestInfo{
taskData: &taskData,
- version: apiVersion1,
}
err := info.validateRequestInfo()
s.Error(err)
diff --git a/agent/internal/client/testdata/pre_error.yaml b/agent/internal/client/testdata/pre_error.yaml
new file mode 100644
index 00000000000..6a9b1961c89
--- /dev/null
+++ b/agent/internal/client/testdata/pre_error.yaml
@@ -0,0 +1,31 @@
+command_type: system
+pre_error_fails_task: true
+
+pre:
+ - func: foo
+
+functions:
+ "foo":
+ - command: shell.exec
+ type: setup
+ params:
+ shell: bash
+ script: exit 1
+
+
+tasks:
+ - name: build
+ commands:
+ - command: shell.exec
+ params:
+ working_dir: src
+ script: echo "noop"
+
+
+buildvariants:
+ - name: mock_build_variant
+ display_name: Mock Buildvariant
+ run_on:
+ - mock_distro_id
+ tasks: ["*"]
+
diff --git a/agent/internal/client/testdata/task_id.yaml b/agent/internal/client/testdata/task_id.yaml
index 8bef36cccc5..da5c57eb012 100644
--- a/agent/internal/client/testdata/task_id.yaml
+++ b/agent/internal/client/testdata/task_id.yaml
@@ -1,5 +1,9 @@
command_type: system
+parameters:
+ - key: overwrite-this-parameter
+ value: overwrite-this-value
+
functions:
"foo":
- command: shell.exec
diff --git a/agent/internal/client/timeout_sender_test.go b/agent/internal/client/timeout_sender_test.go
index 77845967db7..75288d44e2c 100644
--- a/agent/internal/client/timeout_sender_test.go
+++ b/agent/internal/client/timeout_sender_test.go
@@ -3,7 +3,7 @@ package client
import (
"context"
"fmt"
- "io/ioutil"
+ "io"
"math/rand"
"os"
"path/filepath"
@@ -69,9 +69,7 @@ func (s *logSenderSuite) SetupTest() {
func (s *logSenderSuite) SetupSuite() {
s.restClient = NewHostCommunicator("foo", "hostID", "hostSecret").(*hostCommunicator)
- tempDir, err := ioutil.TempDir("", "logSenderSuite")
- s.Require().NoError(err)
- s.tempDir = tempDir
+ s.tempDir = s.T().TempDir()
s.numMessages = 1000
s.maxSleep = 10 * time.Millisecond
rand.Seed(time.Now().UnixNano())
@@ -83,10 +81,6 @@ func (s *logSenderSuite) TearDownTest() {
}
}
-func (s *logSenderSuite) TearDownSuite() {
- s.Require().NoError(os.RemoveAll(s.tempDir))
-}
-
func (s *logSenderSuite) randomSleep() {
r := rand.Float64()
sleep := r * float64(s.maxSleep)
@@ -110,7 +104,7 @@ func (s *logSenderSuite) TestFileLogger() {
f, err := os.Open(logFileName)
s.Require().NoError(err)
defer f.Close()
- logs, err := ioutil.ReadAll(f)
+ logs, err := io.ReadAll(f)
s.NoError(err)
logStr := string(logs)
for i := 0; i < s.numMessages; i++ {
diff --git a/agent/internal/task_config.go b/agent/internal/task_config.go
index 6ef9c46771b..98482b1554b 100644
--- a/agent/internal/task_config.go
+++ b/agent/internal/task_config.go
@@ -1,8 +1,10 @@
package internal
import (
+ "context"
"os"
"path/filepath"
+ "strconv"
"strings"
"sync"
@@ -13,7 +15,10 @@ import (
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/evergreen/util"
+ "github.com/mongodb/grip"
"github.com/pkg/errors"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/baggage"
)
type TaskConfig struct {
@@ -64,20 +69,20 @@ func (t *TaskConfig) GetExecTimeout() int {
return t.Timeout.ExecTimeoutSecs
}
-func NewTaskConfig(d *apimodels.DistroView, p *model.Project, t *task.Task, r *model.ProjectRef, patchDoc *patch.Patch, e util.Expansions) (*TaskConfig, error) {
+func NewTaskConfig(workDir string, d *apimodels.DistroView, p *model.Project, t *task.Task, r *model.ProjectRef, patchDoc *patch.Patch, e util.Expansions) (*TaskConfig, error) {
// do a check on if the project is empty
if p == nil {
- return nil, errors.Errorf("project for task with project_id %v is empty", t.Project)
+ return nil, errors.Errorf("project '%s' is nil", t.Project)
}
// check on if the project ref is empty
if r == nil {
- return nil, errors.Errorf("Project ref with identifier: %v was empty", p.Identifier)
+ return nil, errors.Errorf("project ref '%s' is nil", p.Identifier)
}
bv := p.FindBuildVariant(t.BuildVariant)
if bv == nil {
- return nil, errors.Errorf("couldn't find buildvariant: '%v'", t.BuildVariant)
+ return nil, errors.Errorf("cannot find build variant '%s' for task in project '%s'", t.BuildVariant, t.Project)
}
taskConfig := &TaskConfig{
@@ -87,7 +92,7 @@ func NewTaskConfig(d *apimodels.DistroView, p *model.Project, t *task.Task, r *m
Task: t,
BuildVariant: bv,
Expansions: &e,
- WorkDir: d.WorkDir,
+ WorkDir: workDir,
}
if patchDoc != nil {
taskConfig.GithubPatchData = patchDoc.GithubPatchData
@@ -108,22 +113,29 @@ func (c *TaskConfig) GetWorkingDirectory(dir string) (string, error) {
}
if stat, err := os.Stat(dir); os.IsNotExist(err) {
- return "", errors.Errorf("directory %s does not exist", dir)
+ return "", errors.Errorf("path '%s' does not exist", dir)
} else if err != nil || stat == nil {
- return "", errors.Wrapf(err, "error retrieving file info for %s", dir)
+ return "", errors.Wrapf(err, "retrieving file info for path '%s'", dir)
} else if !stat.IsDir() {
- return "", errors.Errorf("path %s is not a directory", dir)
+ return "", errors.Errorf("path '%s' is not a directory", dir)
}
return dir, nil
}
+func (c *TaskConfig) GetCloneMethod() string {
+ if c.Distro != nil {
+ return c.Distro.CloneMethod
+ }
+ return evergreen.CloneMethodOAuth
+}
+
func (tc *TaskConfig) GetTaskGroup(taskGroup string) (*model.TaskGroup, error) {
if tc == nil {
- return nil, errors.New("unable to get task group: TaskConfig is nil")
+ return nil, errors.New("unable to get task group because task config is nil")
}
if tc.Task == nil {
- return nil, errors.New("unable to get task group: task is nil")
+ return nil, errors.New("unable to get task group because task is nil")
}
if tc.Task.Version == "" {
return nil, errors.New("task has no version")
@@ -145,7 +157,7 @@ func (tc *TaskConfig) GetTaskGroup(taskGroup string) (*model.TaskGroup, error) {
} else {
tg = tc.Project.FindTaskGroup(taskGroup)
if tg == nil {
- return nil, errors.Errorf("couldn't find task group %s", tc.Task.TaskGroup)
+ return nil, errors.Errorf("couldn't find task group '%s' in project '%s'", tc.Task.TaskGroup, tc.Project.Identifier)
}
}
if tg.Timeout == nil {
@@ -153,3 +165,44 @@ func (tc *TaskConfig) GetTaskGroup(taskGroup string) (*model.TaskGroup, error) {
}
return tg, nil
}
+
+func (tc *TaskConfig) TaskAttributeMap() map[string]string {
+ return map[string]string{
+ evergreen.TaskIDOtelAttribute: tc.Task.Id,
+ evergreen.TaskNameOtelAttribute: tc.Task.DisplayName,
+ evergreen.TaskExecutionOtelAttribute: strconv.Itoa(tc.Task.Execution),
+ evergreen.VersionIDOtelAttribute: tc.Task.Version,
+ evergreen.VersionRequesterOtelAttribute: tc.Task.Requester,
+ evergreen.BuildIDOtelAttribute: tc.Task.BuildId,
+ evergreen.BuildNameOtelAttribute: tc.Task.BuildVariant,
+ evergreen.ProjectIdentifierOtelAttribute: tc.ProjectRef.Identifier,
+ evergreen.ProjectIDOtelAttribute: tc.ProjectRef.Id,
+ evergreen.DistroIDOtelAttribute: tc.Task.DistroId,
+ }
+}
+
+func (tc *TaskConfig) AddTaskBaggageToCtx(ctx context.Context) (context.Context, error) {
+ catcher := grip.NewBasicCatcher()
+
+ bag := baggage.FromContext(ctx)
+ for key, val := range tc.TaskAttributeMap() {
+ member, err := baggage.NewMember(key, val)
+ if err != nil {
+ catcher.Add(errors.Wrapf(err, "making member for key '%s' val '%s'", key, val))
+ continue
+ }
+ bag, err = bag.SetMember(member)
+ catcher.Add(err)
+ }
+
+ return baggage.ContextWithBaggage(ctx, bag), catcher.Resolve()
+}
+
+func (tc *TaskConfig) TaskAttributes() []attribute.KeyValue {
+ var attributes []attribute.KeyValue
+ for key, val := range tc.TaskAttributeMap() {
+ attributes = append(attributes, attribute.String(key, val))
+ }
+
+ return attributes
+}
diff --git a/agent/internal/task_config_test.go b/agent/internal/task_config_test.go
index 28460a79fe2..19c832bac17 100644
--- a/agent/internal/task_config_test.go
+++ b/agent/internal/task_config_test.go
@@ -42,7 +42,7 @@ func TestTaskConfigGetWorkingDirectory(t *testing.T) {
}
func TestTaskConfigGetTaskGroup(t *testing.T) {
- require.NoError(t, db.ClearCollections(model.VersionCollection), "failed to clear collections")
+ require.NoError(t, db.ClearCollections(model.VersionCollection))
tgName := "example_task_group"
projYml := `
timeout:
@@ -80,8 +80,7 @@ task_groups:
_, err := model.LoadProjectInto(ctx, []byte(projYml), nil, "", p)
require.NoError(t, err)
v := model.Version{
- Id: "v1",
- Config: projYml,
+ Id: "v1",
}
t1 := task.Task{
Id: "t1",
diff --git a/agent/internal/testutil/task_config.go b/agent/internal/testutil/task_config.go
index 82c429f08e4..2991d30eb5d 100644
--- a/agent/internal/testutil/task_config.go
+++ b/agent/internal/testutil/task_config.go
@@ -1,6 +1,8 @@
package testutil
import (
+ "context"
+
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/apimodels"
@@ -10,25 +12,24 @@ import (
)
// MakeTaskConfigFromModelData converts an API TestModelData to a TaskConfig.
-func MakeTaskConfigFromModelData(settings *evergreen.Settings, data *testutil.TestModelData) (*internal.TaskConfig, error) {
+func MakeTaskConfigFromModelData(ctx context.Context, settings *evergreen.Settings, data *testutil.TestModelData) (*internal.TaskConfig, error) {
oauthToken, err := settings.GetGithubOauthToken()
if err != nil {
- return nil, errors.Wrap(err, "error getting oauth token")
+ return nil, errors.Wrap(err, "getting global GitHub OAuth token")
}
exp, err := model.PopulateExpansions(data.Task, data.Host, oauthToken)
if err != nil {
- return nil, errors.Wrap(err, "error populating expansions")
+ return nil, errors.Wrap(err, "populating expansions")
}
var dv *apimodels.DistroView
if data.Host != nil {
dv = &apimodels.DistroView{
CloneMethod: data.Host.Distro.CloneMethod,
- WorkDir: data.Host.Distro.WorkDir,
}
}
- config, err := internal.NewTaskConfig(dv, data.Project, data.Task, data.ProjectRef, nil, exp)
+ config, err := internal.NewTaskConfig(data.Host.Distro.WorkDir, dv, data.Project, data.Task, data.ProjectRef, nil, exp)
if err != nil {
- return nil, errors.Wrap(err, "could not make task config from test model data")
+ return nil, errors.Wrap(err, "making task config from test model data")
}
return config, nil
}
diff --git a/agent/logging.go b/agent/logging.go
index 4307f02a3cb..d9afe82cc6d 100644
--- a/agent/logging.go
+++ b/agent/logging.go
@@ -3,7 +3,6 @@ package agent
import (
"context"
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"strconv"
@@ -61,15 +60,15 @@ func (a *Agent) GetSender(ctx context.Context, prefix string) (send.Sender, erro
Token: a.opts.SetupData.SplunkClientToken,
Channel: a.opts.SetupData.SplunkChannel,
}
- grip.Info("configuring splunk sender")
+ grip.Info("Configuring splunk sender.")
sender, err = send.NewSplunkLogger("evergreen.agent", info, send.LevelInfo{Default: level.Alert, Threshold: level.Alert})
if err != nil {
- return nil, errors.Wrap(err, "problem creating the splunk logger")
+ return nil, errors.Wrap(err, "creating Splunk logger")
}
senders = append(senders, sender)
}
} else {
- grip.Notice("agent started via command - not configuring external logger")
+ grip.Notice("Agent started via command - not configuring external logger.")
}
if prefix == "" {
@@ -77,7 +76,7 @@ func (a *Agent) GetSender(ctx context.Context, prefix string) (send.Sender, erro
} else if prefix == evergreen.LocalLoggingOverride || prefix == "--" || prefix == evergreen.StandardOutputLoggingOverride {
sender, err = send.NewNativeLogger("evergreen.agent", send.LevelInfo{Default: level.Info, Threshold: level.Debug})
if err != nil {
- return nil, errors.Wrap(err, "problem creating a native console logger")
+ return nil, errors.Wrap(err, "creating native console logger")
}
senders = append(senders, sender)
@@ -85,7 +84,7 @@ func (a *Agent) GetSender(ctx context.Context, prefix string) (send.Sender, erro
sender, err = send.NewFileLogger("evergreen.agent",
fmt.Sprintf("%s-%d-%d.log", prefix, os.Getpid(), getInc()), send.LevelInfo{Default: level.Info, Threshold: level.Debug})
if err != nil {
- return nil, errors.Wrap(err, "problem creating a file logger")
+ return nil, errors.Wrap(err, "creating file logger")
}
senders = append(senders, sender)
@@ -130,11 +129,11 @@ func (a *Agent) makeLoggerProducer(ctx context.Context, tc *taskContext, c *mode
func (a *Agent) prepLogger(tc *taskContext, c *model.LoggerConfig, commandName string) client.LoggerConfig {
logDir := filepath.Join(a.opts.WorkingDirectory, taskLogDirectory)
- grip.Error(errors.Wrap(os.MkdirAll(logDir, os.ModeDir|os.ModePerm), "error making log directory"))
+ grip.Error(errors.Wrapf(os.MkdirAll(logDir, os.ModeDir|os.ModePerm), "making log directory '%s'", logDir))
// if this is a command-specific logger, create a dir for the command's logs separate from the overall task
if commandName != "" {
logDir = filepath.Join(logDir, commandName)
- grip.Error(errors.Wrapf(os.MkdirAll(logDir, os.ModeDir|os.ModePerm), "error making log directory for command %s", commandName))
+ grip.Error(errors.Wrapf(os.MkdirAll(logDir, os.ModeDir|os.ModePerm), "making log directory '%s' for command '%s'", logDir, commandName))
}
config := client.LoggerConfig{}
@@ -143,7 +142,7 @@ func (a *Agent) prepLogger(tc *taskContext, c *model.LoggerConfig, commandName s
defaultLogger = tc.taskConfig.ProjectRef.DefaultLogger
}
if !model.IsValidDefaultLogger(defaultLogger) {
- grip.Warningf("default logger '%s' is not valid, setting Evergreen logger as default", defaultLogger)
+ grip.Warningf("Default logger '%s' is not valid, setting Evergreen logger as default.", defaultLogger)
defaultLogger = model.EvergreenLogSender
}
if len(c.Agent) == 0 {
@@ -172,14 +171,14 @@ func (a *Agent) prepLogger(tc *taskContext, c *model.LoggerConfig, commandName s
func (a *Agent) prepSingleLogger(tc *taskContext, in model.LogOpts, logDir, fileName string) client.LogOpts {
splunkServer, err := tc.expansions.ExpandString(in.SplunkServer)
if err != nil {
- grip.Error(errors.Wrap(err, "error expanding splunk server"))
+ grip.Error(errors.Wrap(err, "expanding Splunk server"))
}
splunkToken, err := tc.expansions.ExpandString(in.SplunkToken)
if err != nil {
- grip.Error(errors.Wrap(err, "error expanding splunk token"))
+ grip.Error(errors.Wrap(err, "expanding Splunk token"))
}
if in.LogDirectory != "" {
- grip.Error(errors.Wrap(os.MkdirAll(in.LogDirectory, os.ModeDir|os.ModePerm), "error making log directory"))
+ grip.Error(errors.Wrapf(os.MkdirAll(in.LogDirectory, os.ModeDir|os.ModePerm), "making log directory '%s'", in.LogDirectory))
logDir = in.LogDirectory
}
if tc.logDirectories == nil {
@@ -203,12 +202,12 @@ func (a *Agent) uploadToS3(ctx context.Context, tc *taskContext) error {
}
bucket, err := pail.NewS3Bucket(a.opts.S3Opts)
if err != nil {
- return errors.Wrap(err, "error creating pail")
+ return errors.Wrap(err, "creating Pail bucket")
}
catcher := grip.NewBasicCatcher()
for logDir := range tc.logDirectories {
- catcher.Add(a.uploadLogDir(ctx, tc, bucket, logDir, ""))
+ catcher.Wrapf(a.uploadLogDir(ctx, tc, bucket, logDir, ""), "uploading log directory '%s'", logDir)
}
return catcher.Resolve()
@@ -222,16 +221,16 @@ func (a *Agent) uploadLogDir(ctx context.Context, tc *taskContext, bucket pail.B
if commandName != "" {
directoryName = filepath.Join(directoryName, commandName)
}
- dir, err := ioutil.ReadDir(directoryName)
+ dir, err := os.ReadDir(directoryName)
if err != nil {
- catcher.Add(errors.Wrap(err, "error reading log directory"))
+ catcher.Wrapf(err, "reading log directory '%s'", directoryName)
return catcher.Resolve()
}
for _, f := range dir {
if f.IsDir() {
- catcher.Add(a.uploadLogDir(ctx, tc, bucket, directoryName, f.Name()))
+ catcher.Wrapf(a.uploadLogDir(ctx, tc, bucket, directoryName, f.Name()), "uploading log directory '%s'", f.Name())
} else {
- catcher.Add(a.uploadSingleFile(ctx, tc, bucket, f.Name(), tc.taskConfig.Task.Id, tc.taskConfig.Task.Execution, commandName))
+ catcher.Wrapf(a.uploadSingleFile(ctx, tc, bucket, f.Name(), tc.taskConfig.Task.Id, tc.taskConfig.Task.Execution, commandName), "uploading log file '%s'", f.Name())
}
}
@@ -252,10 +251,10 @@ func (a *Agent) uploadSingleFile(ctx context.Context, tc *taskContext, bucket pa
}
err = bucket.Upload(ctx, fmt.Sprintf("%s/%s", remotePath, file), localPath)
if err != nil {
- return errors.Wrapf(err, "error uploading %s to S3", localPath)
+ return errors.Wrapf(err, "uploading file path '%s' to S3", localPath)
}
remoteURL := util.S3DefaultURL(a.opts.S3Opts.Name, strings.Join([]string{remotePath, file}, "/"))
- tc.logger.Execution().Infof("uploaded file %s from %s to %s", file, localPath, remoteURL)
+ tc.logger.Execution().Infof("Uploaded file '%s' from local path '%s' to remote path '%s/%s' (%s).", file, localPath, remotePath, file, remoteURL)
switch file {
case agentLogFileName:
tc.logs.AgentLogURLs = append(tc.logs.AgentLogURLs, apimodels.LogInfo{
diff --git a/agent/logging_test.go b/agent/logging_test.go
index e1091c40c73..c9afe45eec7 100644
--- a/agent/logging_test.go
+++ b/agent/logging_test.go
@@ -3,7 +3,7 @@ package agent
import (
"context"
"fmt"
- "io/ioutil"
+ "io"
"os"
"path/filepath"
"testing"
@@ -18,6 +18,7 @@ import (
"github.com/mongodb/jasper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+ "go.opentelemetry.io/otel"
)
func TestGetSenderLocal(t *testing.T) {
@@ -32,10 +33,8 @@ func TestCommandFileLogging(t *testing.T) {
assert := assert.New(t)
require := require.New(t)
- tmpDirName, err := ioutil.TempDir("", "agent-logging-")
- require.NoError(err)
+ tmpDirName := t.TempDir()
require.NoError(os.Mkdir(fmt.Sprintf("%s/tmp", tmpDirName), 0666))
- defer os.RemoveAll(tmpDirName)
agt := &Agent{
opts: Options{
@@ -45,7 +44,8 @@ func TestCommandFileLogging(t *testing.T) {
LogPrefix: evergreen.LocalLoggingOverride,
WorkingDirectory: tmpDirName,
},
- comm: client.NewHostCommunicator("www.example.com", "host", "secret"),
+ comm: client.NewHostCommunicator("www.example.com", "host", "secret"),
+ tracer: otel.GetTracerProvider().Tracer("noop_tracer"),
}
jpm, err := jasper.NewSynchronizedManager(false)
require.NoError(err)
@@ -89,7 +89,7 @@ func TestCommandFileLogging(t *testing.T) {
}},
},
BuildVariants: model.BuildVariants{
- {Name: "bv", Tasks: []model.BuildVariantTaskUnit{{Name: "task1"}}},
+ {Name: "bv", Tasks: []model.BuildVariantTaskUnit{{Name: "task1", Variant: "bv"}}},
},
},
Timeout: &internal.Timeout{IdleTimeoutSecs: 15, ExecTimeoutSecs: 15},
@@ -105,7 +105,8 @@ func TestCommandFileLogging(t *testing.T) {
// verify log contents
f, err := os.Open(fmt.Sprintf("%s/%s/%s/task.log", tmpDirName, taskLogDirectory, "shell.exec"))
require.NoError(err)
- bytes, err := ioutil.ReadAll(f)
+ bytes, err := io.ReadAll(f)
+ assert.NoError(f.Close())
require.NoError(err)
assert.Contains(string(bytes), "hello world")
@@ -119,7 +120,8 @@ func TestCommandFileLogging(t *testing.T) {
// verify uploaded log contents
f, err = os.Open(fmt.Sprintf("%s/logs/%s/%d/%s/task.log", tmpDirName, tc.taskConfig.Task.Id, tc.taskConfig.Task.Execution, "shell.exec"))
require.NoError(err)
- bytes, err = ioutil.ReadAll(f)
+ bytes, err = io.ReadAll(f)
+ assert.NoError(f.Close())
require.NoError(err)
assert.Contains(string(bytes), "hello world")
@@ -130,10 +132,7 @@ func TestCommandFileLogging(t *testing.T) {
func TestStartLogging(t *testing.T) {
assert := assert.New(t)
- require := require.New(t)
- tmpDirName, err := ioutil.TempDir("", "reset-logging-")
- require.NoError(err)
- defer os.RemoveAll(tmpDirName)
+ tmpDirName := t.TempDir()
agt := &Agent{
opts: Options{
HostID: "host",
@@ -156,6 +155,7 @@ func TestStartLogging(t *testing.T) {
ctx := context.Background()
assert.NoError(agt.fetchProjectConfig(ctx, tc))
+ require.NotNil(t, tc.project)
assert.EqualValues(model.EvergreenLogSender, tc.project.Loggers.Agent[0].Type)
assert.EqualValues(model.SplunkLogSender, tc.project.Loggers.System[0].Type)
assert.EqualValues(model.FileLogSender, tc.project.Loggers.Task[0].Type)
@@ -177,10 +177,7 @@ func TestStartLogging(t *testing.T) {
func TestStartLoggingErrors(t *testing.T) {
assert := assert.New(t)
- require := require.New(t)
- tmpDirName, err := ioutil.TempDir("", "logging-error-")
- require.NoError(err)
- defer os.RemoveAll(tmpDirName)
+ tmpDirName := t.TempDir()
agt := &Agent{
opts: Options{
HostID: "host",
diff --git a/agent/otel.go b/agent/otel.go
new file mode 100644
index 00000000000..882025e67b5
--- /dev/null
+++ b/agent/otel.go
@@ -0,0 +1,307 @@
+package agent
+
+import (
+ "context"
+ "time"
+
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/agent/internal"
+ "github.com/mongodb/grip"
+ "github.com/pkg/errors"
+ "github.com/shirou/gopsutil/v3/cpu"
+ "github.com/shirou/gopsutil/v3/disk"
+ "github.com/shirou/gopsutil/v3/mem"
+ "github.com/shirou/gopsutil/v3/net"
+ "go.opentelemetry.io/contrib/detectors/aws/ec2"
+ "go.opentelemetry.io/contrib/detectors/aws/ecs"
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+ "go.opentelemetry.io/otel/metric"
+ sdk "go.opentelemetry.io/otel/sdk/metric"
+ "go.opentelemetry.io/otel/sdk/resource"
+ sdktrace "go.opentelemetry.io/otel/sdk/trace"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials"
+)
+
+type taskAttributeKey int
+
+const taskAttributeContextKey taskAttributeKey = iota
+
+const (
+ exportInterval = 15 * time.Second
+ exportTimeout = exportInterval * 2
+ packageName = "github.com/evergreen-ci/evergreen/agent"
+
+ cpuTimeInstrument = "system.cpu.time"
+ cpuUtilInstrument = "system.cpu.utilization"
+
+ memoryUsageInstrument = "system.memory.usage"
+ memoryUtilizationInstrument = "system.memory.utilization"
+
+ diskIOInstrument = "system.disk.io"
+ diskOperationsInstrument = "system.disk.operations"
+ diskIOTimeInstrument = "system.disk.io_time"
+
+ networkIOInstrument = "system.network.io"
+)
+
+func (a *Agent) initOtel(ctx context.Context) error {
+ if a.opts.TraceCollectorEndpoint == "" {
+ a.tracer = otel.GetTracerProvider().Tracer(packageName)
+ return nil
+ }
+
+ r, err := hostResource(ctx)
+ if err != nil {
+ return errors.Wrap(err, "making host resource")
+ }
+
+ a.otelGrpcConn, err = grpc.DialContext(ctx,
+ a.opts.TraceCollectorEndpoint,
+ grpc.WithTransportCredentials(credentials.NewTLS(nil)),
+ )
+ if err != nil {
+ return errors.Wrapf(err, "opening gRPC connection to '%s'", a.opts.TraceCollectorEndpoint)
+ }
+
+ client := otlptracegrpc.NewClient(otlptracegrpc.WithGRPCConn(a.otelGrpcConn))
+ traceExporter, err := otlptrace.New(ctx, client)
+ if err != nil {
+ return errors.Wrap(err, "initializing otel exporter")
+ }
+ tp := sdktrace.NewTracerProvider(
+ sdktrace.WithBatcher(traceExporter),
+ sdktrace.WithResource(r),
+ )
+ tp.RegisterSpanProcessor(NewTaskSpanProcessor())
+ otel.SetTracerProvider(tp)
+ otel.SetErrorHandler(otel.ErrorHandlerFunc(func(err error) {
+ grip.Error(errors.Wrap(err, "encountered otel error"))
+ }))
+
+ a.tracer = tp.Tracer(packageName)
+
+ a.closers = append(a.closers, closerOp{
+ name: "tracer provider shutdown",
+ closerFn: func(ctx context.Context) error {
+ catcher := grip.NewBasicCatcher()
+ catcher.Wrap(tp.Shutdown(ctx), "trace provider shutdown")
+ catcher.Wrap(traceExporter.Shutdown(ctx), "trace exporter shutdown")
+ catcher.Wrap(a.otelGrpcConn.Close(), "closing gRPC connection")
+
+ return catcher.Resolve()
+ },
+ })
+
+ return nil
+}
+
+func (a *Agent) startMetrics(ctx context.Context, tc *internal.TaskConfig) (func(context.Context), error) {
+ metricsExporter, err := otlpmetricgrpc.New(ctx, otlpmetricgrpc.WithGRPCConn(a.otelGrpcConn))
+ if err != nil {
+ return nil, errors.Wrap(err, "making otel metrics exporter")
+ }
+
+ r, err := hostResource(ctx)
+ if err != nil {
+ return nil, errors.Wrap(err, "making resource")
+ }
+
+ r, err = resource.Merge(r, resource.NewSchemaless(tc.TaskAttributes()...))
+ if err != nil {
+ return nil, errors.Wrap(err, "merging host resource with task attributes")
+ }
+
+ meterProvider := sdk.NewMeterProvider(
+ sdk.WithResource(r),
+ sdk.WithReader(sdk.NewPeriodicReader(metricsExporter, sdk.WithInterval(exportInterval), sdk.WithTimeout(exportTimeout))),
+ )
+
+ return func(ctx context.Context) {
+ grip.Error(errors.Wrap(meterProvider.Shutdown(ctx), "doing meter provider"))
+ }, errors.Wrap(instrumentMeter(meterProvider.Meter(packageName)), "instrumenting meter")
+}
+
+func instrumentMeter(meter metric.Meter) error {
+ catcher := grip.NewBasicCatcher()
+
+ catcher.Wrap(addCPUMetrics(meter), "adding CPU metrics")
+ catcher.Wrap(addMemoryMetrics(meter), "adding memory metrics")
+ catcher.Wrap(addDiskMetrics(meter), "adding disk metrics")
+ catcher.Wrap(addNetworkMetrics(meter), "adding network metrics")
+
+ return catcher.Resolve()
+}
+
+func addCPUMetrics(meter metric.Meter) error {
+ cpuTime, err := meter.Float64ObservableCounter(cpuTimeInstrument, metric.WithUnit("s"))
+ if err != nil {
+ return errors.Wrap(err, "making cpu time counter")
+ }
+
+ cpuUtil, err := meter.Float64ObservableGauge(cpuUtilInstrument, metric.WithUnit("1"), metric.WithDescription("Busy CPU time since the last measurement, divided by the elapsed time"))
+ if err != nil {
+ return errors.Wrap(err, "making cpu util gauge")
+ }
+
+ _, err = meter.RegisterCallback(func(ctx context.Context, observer metric.Observer) error {
+ times, err := cpu.TimesWithContext(ctx, false)
+ if err != nil {
+ return errors.Wrap(err, "getting CPU times")
+ }
+ if len(times) != 1 {
+ return errors.Wrap(err, "CPU times had an unexpected length")
+ }
+ observer.ObserveFloat64(cpuTime, times[0].Idle, metric.WithAttributes(attribute.String("state", "idle")))
+ observer.ObserveFloat64(cpuTime, times[0].System, metric.WithAttributes(attribute.String("state", "system")))
+ observer.ObserveFloat64(cpuTime, times[0].User, metric.WithAttributes(attribute.String("state", "user")))
+ observer.ObserveFloat64(cpuTime, times[0].Steal, metric.WithAttributes(attribute.String("state", "steal")))
+ observer.ObserveFloat64(cpuTime, times[0].Iowait, metric.WithAttributes(attribute.String("state", "iowait")))
+
+ return nil
+ }, cpuTime)
+ if err != nil {
+ return errors.Wrap(err, "registering cpu time callback")
+ }
+
+ _, err = meter.RegisterCallback(func(ctx context.Context, observer metric.Observer) error {
+ util, err := cpu.PercentWithContext(ctx, 0, false)
+ if err != nil {
+ return errors.Wrap(err, "getting CPU util")
+ }
+ if len(util) != 1 {
+ return errors.Wrap(err, "CPU util had an unexpected length")
+ }
+ observer.ObserveFloat64(cpuUtil, util[0])
+
+ return nil
+ }, cpuUtil)
+ return errors.Wrap(err, "registering cpu time callback")
+}
+
+func addMemoryMetrics(meter metric.Meter) error {
+ memoryUsage, err := meter.Int64ObservableUpDownCounter(memoryUsageInstrument, metric.WithUnit("By"))
+ if err != nil {
+ return errors.Wrap(err, "making memory usage counter")
+ }
+
+ memoryUtil, err := meter.Float64ObservableGauge(memoryUtilizationInstrument, metric.WithUnit("1"))
+ if err != nil {
+ return errors.Wrap(err, "making memory util gauge")
+ }
+
+ _, err = meter.RegisterCallback(func(ctx context.Context, observer metric.Observer) error {
+ memStats, err := mem.VirtualMemoryWithContext(ctx)
+ if err != nil {
+ return errors.Wrap(err, "getting memory stats")
+ }
+ observer.ObserveInt64(memoryUsage, int64(memStats.Available), metric.WithAttributes(attribute.String("state", "available")))
+ observer.ObserveInt64(memoryUsage, int64(memStats.Used), metric.WithAttributes(attribute.String("state", "used")))
+
+ observer.ObserveFloat64(memoryUtil, memStats.UsedPercent)
+
+ return nil
+ }, memoryUsage, memoryUtil)
+ return errors.Wrap(err, "registering memory callback")
+}
+
+func addDiskMetrics(meter metric.Meter) error {
+ diskIO, err := meter.Int64ObservableCounter(diskIOInstrument, metric.WithUnit("By"))
+ if err != nil {
+ return errors.Wrap(err, "making disk io counter")
+ }
+
+ diskOperations, err := meter.Int64ObservableCounter(diskOperationsInstrument, metric.WithUnit("{operation}"))
+ if err != nil {
+ return errors.Wrap(err, "making disk operations counter")
+ }
+
+ diskIOTime, err := meter.Float64ObservableCounter(diskIOTimeInstrument, metric.WithUnit("s"), metric.WithDescription("Time disk spent activated"))
+ if err != nil {
+ return errors.Wrap(err, "making disk io time counter")
+ }
+
+ _, err = meter.RegisterCallback(func(ctx context.Context, observer metric.Observer) error {
+ ioCountersMap, err := disk.IOCountersWithContext(ctx)
+ if err != nil {
+ return errors.Wrap(err, "getting disk stats")
+ }
+ for disk, counter := range ioCountersMap {
+ observer.ObserveInt64(diskIO, int64(counter.ReadBytes), metric.WithAttributes(attribute.String("device", disk), attribute.String("direction", "read")))
+ observer.ObserveInt64(diskIO, int64(counter.WriteBytes), metric.WithAttributes(attribute.String("device", disk), attribute.String("direction", "write")))
+
+ observer.ObserveInt64(diskOperations, int64(counter.ReadCount), metric.WithAttributes(attribute.String("device", disk), attribute.String("direction", "read")))
+ observer.ObserveInt64(diskOperations, int64(counter.WriteCount), metric.WithAttributes(attribute.String("device", disk), attribute.String("direction", "write")))
+
+ observer.ObserveFloat64(diskIOTime, float64(counter.IoTime), metric.WithAttributes(attribute.String("device", disk)))
+ }
+
+ return nil
+ }, diskIO, diskOperations, diskIOTime)
+ return errors.Wrap(err, "registering disk callback")
+}
+
+func addNetworkMetrics(meter metric.Meter) error {
+ networkIO, err := meter.Int64ObservableCounter(networkIOInstrument, metric.WithUnit("by"))
+ if err != nil {
+ return errors.Wrap(err, "making network io counter")
+ }
+
+ _, err = meter.RegisterCallback(func(ctx context.Context, observer metric.Observer) error {
+ counters, err := net.IOCountersWithContext(ctx, false)
+ if err != nil {
+ return errors.Wrap(err, "getting network stats")
+ }
+ if len(counters) != 1 {
+ return errors.Wrap(err, "Network counters had an unexpected length")
+ }
+
+ for _, counter := range counters {
+ observer.ObserveInt64(networkIO, int64(counter.BytesSent), metric.WithAttributes(attribute.String("direction", "transmit")))
+ observer.ObserveInt64(networkIO, int64(counter.BytesRecv), metric.WithAttributes(attribute.String("direction", "receive")))
+ }
+
+ return nil
+ }, networkIO)
+ return errors.Wrap(err, "registering network io callback")
+}
+
+func hostResource(ctx context.Context) (*resource.Resource, error) {
+ return resource.New(ctx,
+ resource.WithAttributes(semconv.ServiceName("evergreen-agent")),
+ resource.WithAttributes(semconv.ServiceVersion(evergreen.BuildRevision)),
+ resource.WithDetectors(ec2.NewResourceDetector(), ecs.NewResourceDetector()),
+ )
+}
+
+type taskSpanProcessor struct{}
+
+func NewTaskSpanProcessor() sdktrace.SpanProcessor {
+ return &taskSpanProcessor{}
+}
+
+func (processor *taskSpanProcessor) OnStart(ctx context.Context, span sdktrace.ReadWriteSpan) {
+ span.SetAttributes(taskAttributesFromContext(ctx)...)
+}
+
+func (processor *taskSpanProcessor) OnEnd(s sdktrace.ReadOnlySpan) {}
+func (processor *taskSpanProcessor) Shutdown(context.Context) error { return nil }
+func (processor *taskSpanProcessor) ForceFlush(context.Context) error { return nil }
+
+func contextWithTaskAttributes(ctx context.Context, attributes []attribute.KeyValue) context.Context {
+ return context.WithValue(ctx, taskAttributeContextKey, attributes)
+}
+
+func taskAttributesFromContext(ctx context.Context) []attribute.KeyValue {
+ attributesIface := ctx.Value(taskAttributeContextKey)
+ attributes, ok := attributesIface.([]attribute.KeyValue)
+ if !ok {
+ return nil
+ }
+ return attributes
+}
diff --git a/agent/stats.go b/agent/stats.go
index fe8e1e2ef22..78b0ce32bc6 100644
--- a/agent/stats.go
+++ b/agent/stats.go
@@ -12,6 +12,7 @@ import (
"github.com/mongodb/grip/message"
"github.com/mongodb/grip/recovery"
"github.com/mongodb/jasper"
+ "github.com/pkg/errors"
)
// StatsCollector samples machine statistics and logs them
@@ -40,7 +41,7 @@ func (sc *StatsCollector) expandCommands(exp *util.Expansions) {
for _, cmd := range sc.Cmds {
expanded, err := exp.ExpandString(cmd)
if err != nil {
- sc.logger.System().Warningf("Couldn't expand '%s': %v", cmd, err)
+ sc.logger.System().Warning(errors.Wrapf(err, "expanding stats command '%s'", cmd))
continue
}
expandedCmds = append(expandedCmds, expanded)
@@ -50,7 +51,7 @@ func (sc *StatsCollector) expandCommands(exp *util.Expansions) {
func (sc *StatsCollector) logStats(ctx context.Context, exp *util.Expansions) {
if sc.Interval < 0 {
- panic(fmt.Sprintf("Illegal interval: %v", sc.Interval))
+ panic(fmt.Sprintf("Illegal stats collection interval: %s", sc.Interval))
}
if sc.Interval == 0 {
sc.Interval = 60 * time.Second
diff --git a/agent/status.go b/agent/status.go
index d930dbb52fd..c345480114a 100644
--- a/agent/status.go
+++ b/agent/status.go
@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
"os"
"time"
@@ -24,7 +24,7 @@ func (a *Agent) startStatusServer(ctx context.Context, port int) error {
// that a running task depends on, could run.
_, err := http.Get(fmt.Sprintf("http://127.0.0.1:%d/status", port))
if err == nil {
- return errors.Errorf("another agent is running on %d", port)
+ return errors.Errorf("another process is running on localhost port %d", port)
}
app := gimlet.NewApp()
if err = app.SetPort(port); err != nil {
@@ -53,7 +53,7 @@ func (a *Agent) startStatusServer(ctx context.Context, port int) error {
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
}
- grip.Infoln("starting status server on:", srv.Addr)
+ grip.Infoln("Starting status server on address:", srv.Addr)
go func() {
if err := srv.ListenAndServe(); err != nil {
@@ -67,7 +67,7 @@ func (a *Agent) startStatusServer(ctx context.Context, port int) error {
go func() {
<-ctx.Done()
- grip.Info("shutting down status server")
+ grip.Info("Shutting down status server.")
grip.Critical(srv.Shutdown(ctx))
}()
@@ -88,7 +88,7 @@ type statusResponse struct {
// statusHandler is a function that produces the status handler.
func (a *Agent) statusHandler() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- grip.Debug("preparing status response")
+ grip.Debug("Preparing status response.")
resp := buildResponse(a.opts)
// in the future we may want to use the same render
@@ -96,14 +96,14 @@ func (a *Agent) statusHandler() http.HandlerFunc {
// manually is probably good enough for now.
out, err := json.MarshalIndent(resp, " ", " ")
if err != nil {
- grip.Error(err)
+ grip.Error(errors.Wrap(err, "marshalling JSON for status handler response"))
w.WriteHeader(http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
_, err = w.Write(out)
- grip.Error(err)
+ grip.Error(errors.Wrap(err, "writing status handler response"))
}
}
@@ -119,9 +119,9 @@ func (a *Agent) endTaskHandler(w http.ResponseWriter, r *http.Request) {
_ = grip.GetSender().Close()
}()
- payload, err := ioutil.ReadAll(r.Body)
+ payload, err := io.ReadAll(r.Body)
if err != nil {
- _, _ = w.Write([]byte(err.Error()))
+ _, _ = w.Write([]byte(errors.Wrap(err, "reading end task response body").Error()))
w.WriteHeader(http.StatusInternalServerError)
return
}
@@ -130,7 +130,7 @@ func (a *Agent) endTaskHandler(w http.ResponseWriter, r *http.Request) {
if err := json.Unmarshal(payload, &resp); err != nil {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(http.StatusBadRequest)
- _, _ = w.Write([]byte(errors.Wrap(err, "error unmarshalling task resp body").Error()))
+ _, _ = w.Write([]byte(errors.Wrap(err, "reading end task reply from response").Error()))
return
}
@@ -143,7 +143,7 @@ func terminateAgentHandler(w http.ResponseWriter, r *http.Request) {
_ = grip.GetSender().Close()
}()
- msg := map[string]interface{}{
+ msg := message.Fields{
"message": "terminating agent triggered",
"host_id": r.Host,
}
@@ -153,14 +153,14 @@ func terminateAgentHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
out, err := json.MarshalIndent(msg, " ", " ")
if err != nil {
- grip.Error(err)
+ grip.Error(errors.Wrap(err, "marshalling JSON response"))
w.WriteHeader(http.StatusInternalServerError)
}
_, err = w.Write(out)
if flusher, ok := w.(http.Flusher); ok {
flusher.Flush()
}
- grip.Error(err)
+ grip.Error(errors.Wrap(err, "writing response"))
// need to use os.exit rather than a panic because the panic
// handler will recover.
diff --git a/agent/status_test.go b/agent/status_test.go
index 5dbc7cc06aa..76c9999d0a4 100644
--- a/agent/status_test.go
+++ b/agent/status_test.go
@@ -4,11 +4,10 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
"os"
"runtime"
- "strings"
"testing"
"time"
@@ -54,8 +53,6 @@ func (s *StatusSuite) TestBasicAssumptions() {
}
func (s *StatusSuite) TestPopulateSystemInfo() {
- grip.Alert(strings.Join(s.resp.SystemInfo.Errors, ";\n"))
- grip.Info(s.resp.SystemInfo)
s.NotNil(s.resp.SystemInfo)
}
@@ -140,7 +137,7 @@ func (s *StatusSuite) TestAgentFailsToStartTwice() {
case err = <-second:
}
s.Error(err)
- s.Contains(err.Error(), "another agent is running on 2287")
+ s.Contains(err.Error(), "another process is running on localhost port 2287")
cancel()
err = <-first
@@ -190,7 +187,7 @@ func (s *StatusSuite) TestCheckOOMSucceeds() {
s.Require().NoError(err)
if resp.StatusCode != 200 {
- b, err := ioutil.ReadAll(resp.Body)
+ b, err := io.ReadAll(resp.Body)
grip.Error(err)
s.FailNow(fmt.Sprintf("received status code %d from OOM endpoint with body %s", resp.StatusCode, string(b)))
}
diff --git a/agent/system_metrics.go b/agent/system_metrics.go
deleted file mode 100644
index 8eafee4cfc7..00000000000
--- a/agent/system_metrics.go
+++ /dev/null
@@ -1,459 +0,0 @@
-package agent
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "fmt"
- "io"
- "sync"
- "time"
-
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/timber/systemmetrics"
- "github.com/mongodb/ftdc/metrics"
- "github.com/mongodb/grip"
- "github.com/mongodb/grip/recovery"
- "github.com/pkg/errors"
- "github.com/shirou/gopsutil/v3/disk"
- "github.com/shirou/gopsutil/v3/host"
- "github.com/shirou/gopsutil/v3/process"
- "google.golang.org/grpc"
-)
-
-// metricCollector is an interface representing an object that can collect
-// a single system metric over a series of time steps.
-type metricCollector interface {
- // name returns a string indicating the type of metric collected, such as "uptime".
- name() string
- // format returns the format of the collected data.
- format() systemmetrics.DataFormat
- // collect returns the value of the collected metric when the function is called.
- collect(context.Context) ([]byte, error)
-}
-
-// systemMetricsCollector handles collecting an arbitrary set of system
-// metrics at a fixed interval and streaming them to cedar.
-type systemMetricsCollector struct {
- mu sync.Mutex
- stream sync.WaitGroup
- close sync.WaitGroup
- streamingCancel context.CancelFunc
- taskOpts systemmetrics.SystemMetricsOptions
- writeOpts systemmetrics.WriteCloserOptions
- interval time.Duration
- collectors []metricCollector
- client *systemmetrics.SystemMetricsClient
- catcher grip.Catcher
- id string
- closed bool
-}
-
-// systemMetricsCollectorOptions are the required values for creating a new
-// systemMetricsCollector.
-type systemMetricsCollectorOptions struct {
- task *task.Task
- interval time.Duration
- collectors []metricCollector
- conn *grpc.ClientConn
-
- // These options configure the timber stream buffer, and can be left empty
- // to use the default settings.
- maxBufferSize int
- noBufferTimedFlush bool
- bufferTimedFlushInterval time.Duration
-}
-
-func (s *systemMetricsCollectorOptions) validate() error {
- if s.task == nil {
- return errors.New("must provide a valid task")
- }
-
- if s.interval < 0 {
- return errors.New("interval cannot be negative")
- }
- if s.interval == 0 {
- s.interval = time.Minute
- }
-
- if len(s.collectors) == 0 {
- return errors.New("must provide at least one metric collector")
- }
-
- if s.conn == nil {
- return errors.New("must provide an existing client connection to cedar")
- }
-
- if s.bufferTimedFlushInterval < 0 {
- return errors.New("flush interval must not be negative")
- }
-
- if s.maxBufferSize < 0 {
- return errors.New("buffer size must not be negative")
- }
-
- return nil
-}
-
-// newSystemMetricsCollector returns a systemMetricsCollector ready to start
-// collecting from the provided slice of metric collector objects at the
-// provided interval and streaming to cedar.
-func newSystemMetricsCollector(ctx context.Context, opts *systemMetricsCollectorOptions) (*systemMetricsCollector, error) {
- err := opts.validate()
- if err != nil {
- return nil, errors.Wrap(err, "invalid options")
- }
- s := &systemMetricsCollector{
- interval: opts.interval,
- collectors: opts.collectors,
- taskOpts: getSystemMetricsInfo(opts.task),
- writeOpts: systemmetrics.WriteCloserOptions{
- FlushInterval: opts.bufferTimedFlushInterval,
- NoTimedFlush: opts.noBufferTimedFlush,
- MaxBufferSize: opts.maxBufferSize,
- },
- catcher: grip.NewBasicCatcher(),
- }
- s.client, err = systemmetrics.NewSystemMetricsClientWithExistingConnection(ctx, opts.conn)
- if err != nil {
- return nil, errors.Wrap(err, "problem creating new system metrics client")
- }
- return s, nil
-}
-
-// Start commences collecting metrics using each of the provided MetricCollector
-// objects. Regardless of if Start returns an error, Close should still be called
-// to close any opened connections, set the exit code, and handle any returned
-// errors. This can also be handled by cancelling the provided context, but
-// any errors will only be logged to the global error logs in this case.
-func (s *systemMetricsCollector) Start(ctx context.Context) error {
- var err error
- s.id, err = s.client.CreateSystemMetricsRecord(ctx, s.taskOpts)
- if err != nil {
- return errors.Wrap(err, "problem creating cedar system metrics metadata object")
- }
-
- var streamingCtx context.Context
- streamingCtx, s.streamingCancel = context.WithCancel(ctx)
-
- for _, collector := range s.collectors {
- stream, err := s.client.NewSystemMetricsWriteCloser(ctx, systemmetrics.MetricDataOptions{
- Id: s.id,
- MetricType: collector.name(),
- Format: collector.format(),
- }, s.writeOpts)
- if err != nil {
- s.streamingCancel()
- s.streamingCancel = nil
- return errors.Wrap(err, fmt.Sprintf("problem creating system metrics stream for id %s and metricType %s", s.id, collector.name()))
- }
-
- s.stream.Add(1)
- go s.timedCollect(streamingCtx, collector, stream)
- }
- s.close.Add(1)
- go s.closeOnCancel(ctx, streamingCtx)
-
- return nil
-}
-
-func (s *systemMetricsCollector) timedCollect(ctx context.Context, mc metricCollector, stream io.WriteCloser) {
- timer := time.NewTimer(0)
- defer func() {
- s.catcher.Add(errors.Wrap(recovery.HandlePanicWithError(recover(), nil, fmt.Sprintf("panic in system metrics stream for id %s and metricType %s", s.id, mc.name())), ""))
- s.catcher.Add(errors.Wrap(stream.Close(), fmt.Sprintf("problem closing system metrics stream for id %s and metricType %s", s.id, mc.name())))
- timer.Stop()
- s.stream.Done()
- }()
-
- for {
- select {
- case <-ctx.Done():
- return
- case <-timer.C:
- data, err := mc.collect(ctx)
- if err != nil {
- // Do not accumulate errors caused by system metrics collectors
- // closing this metric collector's context.
- if ctx.Err() != nil {
- return
- }
- s.catcher.Add(errors.Wrapf(err, "problem collecting system metrics data for id %s and metricType %s", s.id, mc.name()))
- return
- }
- _, err = stream.Write(data)
- if err != nil {
- // Do not accumulate errors caused by system metrics collectors
- // closing this metric collector's context.
- if ctx.Err() != nil {
- return
- }
- s.catcher.Add(errors.Wrapf(err, "problem writing system metrics data to stream for id %s and metricType %s", s.id, mc.name()))
- return
- }
- _ = timer.Reset(s.interval)
- }
- }
-}
-
-func (s *systemMetricsCollector) closeOnCancel(outerCtx, streamingCtx context.Context) {
- defer s.close.Done()
- for {
- select {
- case <-outerCtx.Done():
- if s.streamingCancel != nil {
- s.streamingCancel()
- }
- s.cleanup()
- grip.Error(s.catcher.Resolve())
- return
- case <-streamingCtx.Done():
- s.cleanup()
- return
- }
- }
-}
-
-func (s *systemMetricsCollector) cleanup() {
- s.stream.Wait()
- s.mu.Lock()
- defer s.mu.Unlock()
-
- if s.client != nil {
- ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
- defer cancel()
- if s.id != "" {
- s.catcher.Add(errors.Wrap(s.client.CloseSystemMetrics(ctx, s.id, s.catcher.HasErrors()), fmt.Sprintf("error closing out system metrics object for id %s", s.id)))
- }
- s.catcher.Add(errors.Wrap(s.client.CloseClient(), fmt.Sprintf("error closing system metrics client for id %s", s.id)))
- }
- s.closed = true
-}
-
-// Close cleans up any remaining connections and closes out the cedar
-// metadata if one was created with the completed_at timestamp and an
-// exit code.
-func (s *systemMetricsCollector) Close() error {
- s.mu.Lock()
- if s.closed {
- s.mu.Unlock()
- return s.catcher.Resolve()
- }
- s.mu.Unlock()
-
- if s.streamingCancel != nil {
- s.streamingCancel()
- }
- s.close.Wait()
- return s.catcher.Resolve()
-}
-
-func getSystemMetricsInfo(t *task.Task) systemmetrics.SystemMetricsOptions {
- return systemmetrics.SystemMetricsOptions{
- Project: t.Project,
- Version: t.Version,
- Variant: t.BuildVariant,
- TaskName: t.DisplayName,
- TaskId: t.Id,
- Execution: int32(t.Execution),
- Mainline: !t.IsPatchRequest(),
- Compression: systemmetrics.CompressionTypeNone,
- Schema: systemmetrics.SchemaTypeRawEvents,
- }
-}
-
-type diskUsageCollector struct {
- dir string
-}
-
-// newDiskusageCollector creates a collector that gathers disk usage information
-// for the given directory.
-func newDiskUsageCollector(dir string) *diskUsageCollector {
- return &diskUsageCollector{
- dir: dir,
- }
-}
-
-type diskUsageWrapper struct {
- Path string `json:"path,omitempty"`
- Fstype string `json:"fstype,omitempty"`
- Total uint64 `json:"total,omitempty"`
- Free uint64 `json:"free,omitempty"`
- Used uint64 `json:"used,omitempty"`
- UsedPercent float64 `json:"used_percent,omitempty"`
- InodesTotal uint64 `json:"inodes_total,omitempty"`
- InodesUsed uint64 `json:"inodes_used,omitempty"`
- InodesFree uint64 `json:"inodes_free,omitempty"`
- InodesUsedPercent float64 `json:"inodes_used_percent,omitempty"`
-}
-
-func (c *diskUsageCollector) name() string { return "disk_usage" }
-
-func (c *diskUsageCollector) format() systemmetrics.DataFormat { return systemmetrics.DataFormatFTDC }
-
-func (c *diskUsageCollector) collect(ctx context.Context) ([]byte, error) {
- usage, err := disk.UsageWithContext(ctx, c.dir)
- if err != nil {
- return nil, errors.Wrap(err, "problem capturing metrics with gopsutil")
- }
- wrapper := diskUsageWrapper{
- Path: usage.Path,
- Fstype: usage.Fstype,
- Total: usage.Total,
- Free: usage.Free,
- Used: usage.Used,
- UsedPercent: usage.UsedPercent,
- InodesTotal: usage.InodesTotal,
- InodesUsed: usage.InodesUsed,
- InodesFree: usage.InodesFree,
- InodesUsedPercent: usage.InodesUsedPercent,
- }
-
- return convertJSONToFTDC(ctx, wrapper)
-}
-
-type uptimeCollector struct{}
-
-// newUptimeCollector creates a collector that gathers host uptime information.
-func newUptimeCollector() *uptimeCollector {
- return new(uptimeCollector)
-}
-
-type uptimeWrapper struct {
- Uptime uint64 `json:"uptime,omitempty"`
-}
-
-func (c *uptimeCollector) name() string { return "uptime" }
-
-func (c *uptimeCollector) format() systemmetrics.DataFormat { return systemmetrics.DataFormatFTDC }
-
-func (c *uptimeCollector) collect(ctx context.Context) ([]byte, error) {
- uptime, err := host.UptimeWithContext(ctx)
- if err != nil {
- return nil, errors.Wrap(err, "problem capturing metrics with gopsutil")
- }
-
- uptimeWrap := uptimeWrapper{Uptime: uptime}
- return convertJSONToFTDC(ctx, uptimeWrap)
-}
-
-type processCollector struct{}
-
-// newProcessCollector creates a collector that collects information on the
-// processes currently running on the host.
-func newProcessCollector() *processCollector {
- return new(processCollector)
-}
-
-type processesWrapper struct {
- Processes []processData `json:"processes,omitempty"`
-}
-
-type processData struct {
- PID int32 `json:"pid,omitempty"`
- CPUPercent float64 `json:"percent_cpu,omitempty"`
- MemoryPercent float32 `json:"percent_mem,omitempty"`
- VirtualMemorySize uint64 `json:"vsz,omitempty"`
- ResidentSetSize uint64 `json:"rss,omitempty"`
- Terminal string `json:"tt,omitempty"`
- Stat []string `json:"stat,omitempty"`
- Started int64 `json:"started"`
- Time string `json:"time,omitempty"`
- Command string `json:"command,omitempty"`
-}
-
-func (c *processCollector) name() string { return "process" }
-
-func (c *processCollector) format() systemmetrics.DataFormat { return systemmetrics.DataFormatJSON }
-
-func (c *processCollector) collect(ctx context.Context) ([]byte, error) {
- var err error
- procs, err := process.ProcessesWithContext(ctx)
- if err != nil {
- return nil, errors.Wrap(err, "problem capturing metrics with gopsutil")
- }
-
- procMetrics := createProcMetrics(ctx, procs)
- procWrapper := processesWrapper{Processes: procMetrics}
-
- results, err := json.Marshal(procWrapper)
- return results, errors.Wrap(err, "problem marshaling processes into JSON")
-}
-
-func createProcMetrics(ctx context.Context, procs []*process.Process) []processData {
- procMetrics := make([]processData, len(procs))
-
- for i, proc := range procs {
- cpuPercent, err := proc.CPUPercentWithContext(ctx)
- if err != nil {
- cpuPercent = 0
- }
- memoryPercent, err := proc.MemoryPercentWithContext(ctx)
- if err != nil {
- memoryPercent = 0
- }
- memInfo, err := proc.MemoryInfoWithContext(ctx)
- var vms, rss uint64
- if err == nil {
- vms = memInfo.VMS
- rss = memInfo.RSS
- }
- terminal, err := proc.TerminalWithContext(ctx)
- if err != nil {
- terminal = ""
- }
- status, err := proc.StatusWithContext(ctx)
- if err != nil {
- status = nil
- }
- createTime, err := proc.CreateTimeWithContext(ctx)
- if err != nil {
- createTime = 0
- }
- var cpuTime string
- times, err := proc.TimesWithContext(ctx)
- if err != nil {
- times = nil
- } else {
- cpuTime = times.CPU
- }
- name, err := proc.NameWithContext(ctx)
- if err != nil {
- name = ""
- }
-
- procWrapper := processData{
- PID: proc.Pid,
- CPUPercent: cpuPercent,
- MemoryPercent: memoryPercent,
- VirtualMemorySize: vms,
- ResidentSetSize: rss,
- Terminal: terminal,
- Stat: status,
- Started: createTime,
- Time: cpuTime,
- Command: name,
- }
- procMetrics[i] = procWrapper
- }
- return procMetrics
-}
-
-func convertJSONToFTDC(ctx context.Context, metric interface{}) ([]byte, error) {
- jsonMetrics, err := json.Marshal(metric)
- if err != nil {
- return nil, errors.Wrap(err, "problem converting metrics to JSON")
- }
-
- opts := metrics.CollectJSONOptions{
- InputSource: bytes.NewReader(jsonMetrics),
- SampleCount: 1,
- FlushInterval: time.Second,
- }
-
- output, err := metrics.CollectJSONStream(ctx, opts)
- if err != nil {
- return nil, errors.Wrap(err, "problem converting FTDC to JSON")
- }
- return output, nil
-}
diff --git a/agent/system_metrics_test.go b/agent/system_metrics_test.go
deleted file mode 100644
index 0cd3e659b0c..00000000000
--- a/agent/system_metrics_test.go
+++ /dev/null
@@ -1,428 +0,0 @@
-package agent
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "fmt"
- "os"
- "runtime"
- "testing"
- "time"
-
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/service/testutil"
- "github.com/evergreen-ci/timber/systemmetrics"
- timberutil "github.com/evergreen-ci/timber/testutil"
- "github.com/mongodb/ftdc"
- "github.com/pkg/errors"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
- "github.com/stretchr/testify/suite"
- "google.golang.org/grpc"
-)
-
-type mockMetricCollector struct {
- collectErr bool
- collectorName string
- count int
-}
-
-func (m *mockMetricCollector) name() string {
- return m.collectorName
-}
-
-func (m *mockMetricCollector) format() systemmetrics.DataFormat {
- return systemmetrics.DataFormatText
-}
-
-func (m *mockMetricCollector) collect(context.Context) ([]byte, error) {
- if m.collectErr {
- return nil, errors.New("Error collecting metrics")
- } else {
- m.count += 1
- return []byte(fmt.Sprintf("%s-%d", m.name(), m.count)), nil
- }
-}
-
-type SystemMetricsSuite struct {
- suite.Suite
- task *task.Task
- conn *grpc.ClientConn
- server *timberutil.MockMetricsServer
- cancel context.CancelFunc
-}
-
-func TestSystemMetricsSuite(t *testing.T) {
- suite.Run(t, new(SystemMetricsSuite))
-}
-
-func (s *SystemMetricsSuite) SetupTest() {
- ctx, cancel := context.WithCancel(context.Background())
- s.cancel = cancel
-
- var err error
- s.server, err = timberutil.NewMockMetricsServer(ctx, testutil.NextPort())
- s.Require().NoError(err)
-
- s.conn, err = grpc.DialContext(ctx, s.server.Address(), grpc.WithInsecure())
- s.Require().NoError(err)
-
- s.task = &task.Task{
- Project: "Project",
- Version: "Version",
- BuildVariant: "Variant",
- DisplayName: "TaskName",
- Id: "Id",
- Execution: 0,
- }
-}
-
-func (s *SystemMetricsSuite) TearDownTest() {
- s.cancel()
-}
-
-// TestNewSystemMetricsCollectorWithConnection tests that newSystemMetricsCollector
-// properly sets all values and sets up a connection to the server when given
-// a valid client connection.
-func (s *SystemMetricsSuite) TestNewSystemMetricsCollectorWithConnection() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- collectors := []metricCollector{&mockMetricCollector{
- collectorName: "first",
- }, &mockMetricCollector{
- collectorName: "second",
- }}
-
- c, err := newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Minute,
- collectors: collectors,
- conn: s.conn,
- bufferTimedFlushInterval: time.Minute,
- noBufferTimedFlush: true,
- maxBufferSize: 1e7,
- })
- s.Require().NoError(err)
- s.Require().NotNil(c)
- s.Assert().Equal(collectors, c.collectors)
- s.Assert().Equal(systemmetrics.SystemMetricsOptions{
- Project: "Project",
- Version: "Version",
- Variant: "Variant",
- TaskName: "TaskName",
- TaskId: "Id",
- Execution: 0,
- Mainline: !s.task.IsPatchRequest(),
- Compression: systemmetrics.CompressionTypeNone,
- Schema: systemmetrics.SchemaTypeRawEvents,
- }, c.taskOpts)
- s.Assert().Equal(time.Minute, c.interval)
- s.Assert().Equal(systemmetrics.WriteCloserOptions{
- FlushInterval: time.Minute,
- NoTimedFlush: true,
- MaxBufferSize: 1e7,
- }, c.writeOpts)
- s.Require().NotNil(c.client)
- s.Require().NoError(c.client.CloseSystemMetrics(ctx, "ID", true))
- s.Assert().NotNil(s.server.Close)
- s.Assert().NotNil(c.catcher)
-
-}
-
-// TestNewSystemMetricsCollectorWithInvalidOpts tests that newSystemMetricsCollector
-// properly returns an error and a nil object when passed invalid options.
-func (s *SystemMetricsSuite) TestNewSystemMetricsCollectorWithInvalidOpts() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- collectors := []metricCollector{&mockMetricCollector{
- collectorName: "first",
- }, &mockMetricCollector{
- collectorName: "second",
- }}
-
- c, err := newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: nil,
- interval: time.Minute,
- collectors: collectors,
- conn: s.conn,
- })
- s.Assert().Error(err)
- s.Assert().Nil(c)
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: -1 * time.Minute,
- collectors: collectors,
- conn: s.conn,
- })
- s.Assert().Error(err)
- s.Assert().Nil(c)
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Minute,
- collectors: []metricCollector{},
- conn: s.conn,
- })
- s.Assert().Error(err)
- s.Assert().Nil(c)
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Minute,
- collectors: collectors,
- conn: nil,
- })
- s.Assert().Error(err)
- s.Assert().Nil(c)
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Minute,
- collectors: collectors,
- conn: s.conn,
- bufferTimedFlushInterval: -1 * time.Minute,
- })
- s.Assert().Error(err)
- s.Assert().Nil(c)
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Minute,
- collectors: collectors,
- conn: s.conn,
- maxBufferSize: -1,
- })
- s.Assert().Error(err)
- s.Assert().Nil(c)
-}
-
-// TestStartSystemMetricsCollector tests that Start properly begins collecting
-// each metric.
-func (s *SystemMetricsSuite) TestStartSystemMetricsCollector() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- collectors := []metricCollector{&mockMetricCollector{
- collectorName: "first",
- }, &mockMetricCollector{
- collectorName: "second",
- }}
-
- c, err := newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Second,
- collectors: collectors,
- conn: s.conn,
- maxBufferSize: 1,
- noBufferTimedFlush: true,
- })
- s.Require().NoError(err)
- s.Require().NotNil(c)
- s.Assert().Nil(s.server.Create)
-
- s.Require().NoError(c.Start(ctx))
- time.Sleep(2 * time.Second)
- s.server.Mu.Lock()
- s.Assert().NotNil(s.server.Create)
- s.Assert().Len(s.server.Data["first"], 2)
- s.server.Mu.Unlock()
- s.Assert().NoError(c.catcher.Resolve())
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Second,
- collectors: collectors,
- conn: s.conn,
- maxBufferSize: 1,
- noBufferTimedFlush: true,
- })
- s.Require().NoError(err)
- s.server.CreateErr = true
- s.Require().Error(c.Start(ctx))
-}
-
-// TestSystemMetricsCollectorStream tests that an individual streaming process
-// properly handles any errors.
-func (s *SystemMetricsSuite) TestSystemMetricsCollectorStreamError() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- collectors := []metricCollector{&mockMetricCollector{
- collectorName: "first",
- }, &mockMetricCollector{
- collectorName: "second",
- }}
-
- c, err := newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Second,
- collectors: collectors,
- conn: s.conn,
- maxBufferSize: 1,
- noBufferTimedFlush: true,
- })
- s.Require().NoError(err)
- s.server.AddErr = true
- s.Require().NoError(c.Start(ctx))
- time.Sleep(2 * c.interval)
-
- s.Require().Error(c.Close())
-}
-
-// TestCloseSystemMetricsCollector tests that Close properly shuts
-// down all connections and processes, and handles errors that occur
-// in the process.
-func (s *SystemMetricsSuite) TestCloseSystemMetricsCollector() {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- collectors := []metricCollector{&mockMetricCollector{
- collectorName: "first",
- }, &mockMetricCollector{
- collectorName: "second",
- }}
-
- c, err := newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Second,
- collectors: collectors,
- conn: s.conn,
- })
- s.Require().NoError(err)
- s.Require().NoError(c.Start(ctx))
-
- s.Require().NoError(c.Close())
- s.server.Mu.Lock()
- s.Assert().NotNil(s.server.Close)
- s.server.Mu.Unlock()
-
- c, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: s.task,
- interval: time.Second,
- collectors: collectors,
- conn: s.conn,
- })
- s.Require().NoError(err)
- s.server.CloseErr = true
- s.Require().NoError(c.Start(ctx))
-
- s.Require().Error(c.Close())
-}
-
-func TestSystemMetricsCollectors(t *testing.T) {
- for testName, testCase := range map[string]struct {
- makeCollector func(t *testing.T) metricCollector
- expectedKeys []string
- }{
- "DiskUsage": {
- makeCollector: func(t *testing.T) metricCollector {
- dir, err := os.Getwd()
- require.NoError(t, err)
- return newDiskUsageCollector(dir)
- },
- expectedKeys: []string{
- "total",
- "free",
- "used",
- },
- },
- "Uptime": {
- makeCollector: func(t *testing.T) metricCollector {
- return newUptimeCollector()
- },
- expectedKeys: []string{"uptime"},
- },
- } {
- t.Run(testName, func(t *testing.T) {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- coll := testCase.makeCollector(t)
-
- output, err := coll.collect(ctx)
- require.NoError(t, err)
-
- iter := ftdc.ReadMetrics(ctx, bytes.NewReader(output))
- require.True(t, iter.Next())
-
- doc := iter.Document()
- for _, key := range testCase.expectedKeys {
- val := doc.Lookup(key)
- assert.NotNil(t, val, "key '%s' missing", key)
- }
- })
- }
-}
-
-func TestCollectProcesses(t *testing.T) {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- coll := &processCollector{}
- output, err := coll.collect(ctx)
-
- assert.NoError(t, err)
- assert.NotEmpty(t, output)
-
- var procs processesWrapper
- require.NoError(t, json.Unmarshal(output, &procs))
- assert.NotEmpty(t, procs)
-
- for _, proc := range procs.Processes {
- // Windows sometimes doesn't have PIDs for its processes.
- if runtime.GOOS == "windows" {
- assert.NotZero(t, proc.Command)
- } else {
- assert.NotZero(t, proc.PID)
- }
- }
-}
-
-func TestSystemMetricsCollectorWithMetricCollectorImplementation(t *testing.T) {
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- srv, err := timberutil.NewMockMetricsServer(ctx, testutil.NextPort())
- require.NoError(t, err)
-
- conn, err := grpc.DialContext(ctx, srv.Address(), grpc.WithInsecure())
- require.NoError(t, err)
-
- tsk := &task.Task{
- Id: "id",
- Project: "project",
- Version: "version",
- BuildVariant: "buildvariant",
- DisplayName: "display_name",
- Execution: 0,
- }
-
- mc := newUptimeCollector()
- coll, err := newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: tsk,
- interval: time.Second,
- collectors: []metricCollector{mc},
- bufferTimedFlushInterval: time.Second,
- conn: conn,
- })
- require.NoError(t, err)
-
- require.NoError(t, coll.Start(ctx))
-
- timer := time.NewTimer(3 * time.Second)
- if <-timer.C; true {
- require.NoError(t, coll.Close())
- }
-
- assert.Equal(t, tsk.Id, srv.Create.Info.TaskId)
- assert.Equal(t, tsk.Project, srv.Create.Info.Project)
- assert.Equal(t, tsk.Version, srv.Create.Info.Version)
- assert.Equal(t, tsk.BuildVariant, srv.Create.Info.Variant)
- assert.NotEmpty(t, srv.Data)
- sentData := srv.Data[mc.name()]
- assert.NotZero(t, len(sentData))
- for _, data := range sentData {
- assert.Equal(t, mc.name(), data.Type)
- assert.Equal(t, mc.format(), systemmetrics.DataFormat(data.Format))
- assert.NotEmpty(t, data.Data)
- }
-}
diff --git a/agent/task.go b/agent/task.go
index 0430e9f7083..cfff9fca410 100644
--- a/agent/task.go
+++ b/agent/task.go
@@ -36,12 +36,12 @@ func (a *Agent) startTask(ctx context.Context, tc *taskContext, complete chan<-
select {
case complete <- evergreen.TaskFailed:
tc.getCurrentCommand().SetType(evergreen.CommandTypeSystem)
- grip.Debug("marked task as system-failed after panic")
+ grip.Debug("Marked task as system-failed after panic.")
default:
- grip.Debug("marking task system failed during panic handling, but complete channel was blocked")
+ grip.Debug("Tried marking task system-failed during panic handling, but complete channel was blocked.")
}
if tc.logger != nil && !tc.logger.Closed() {
- tc.logger.Execution().Error("Evergreen agent hit a runtime error, marking task system-failed")
+ tc.logger.Execution().Error("Evergreen agent hit a runtime error, marking task system-failed.")
}
}
}()
@@ -50,37 +50,36 @@ func (a *Agent) startTask(ctx context.Context, tc *taskContext, complete chan<-
defer taskCancel()
factory, ok := command.GetCommandFactory("setup.initial")
if !ok {
- tc.logger.Execution().Error("problem during configuring initial state")
+ tc.logger.Execution().Error("Marking task as system-failed because setup.initial command is not registered.")
complete <- evergreen.TaskSystemFailed
return
}
if taskCtx.Err() != nil {
- grip.Info("task canceled")
+ grip.Info("Task canceled.")
return
}
tc.setCurrentCommand(factory())
a.comm.UpdateLastMessageTime()
if taskCtx.Err() != nil {
- grip.Info("task canceled")
+ grip.Info("Task canceled.")
return
}
- tc.logger.Task().Infof("Task logger initialized (agent version %s from %s).", evergreen.AgentVersion, evergreen.BuildRevision)
+ tc.logger.Task().Infof("Task logger initialized (agent version '%s' from Evergreen build revision '%s').", evergreen.AgentVersion, evergreen.BuildRevision)
tc.logger.Execution().Info("Execution logger initialized.")
tc.logger.System().Info("System logger initialized.")
if taskCtx.Err() != nil {
- grip.Info("task canceled")
+ grip.Info("Task canceled.")
return
}
hostname, err := os.Hostname()
- if err != nil {
- tc.logger.Execution().Infof("Unable to get hostname: %s", err)
- } else {
- tc.logger.Execution().Infof("Hostname is %s", hostname)
+ tc.logger.Execution().Info(errors.Wrap(err, "getting hostname"))
+ if hostname != "" {
+ tc.logger.Execution().Infof("Hostname is '%s'.", hostname)
}
- tc.logger.Task().Infof("Starting task %v, execution %v.", tc.taskConfig.Task.Id, tc.taskConfig.Task.Execution)
+ tc.logger.Task().Infof("Starting task '%s', execution %d.", tc.taskConfig.Task.Id, tc.taskConfig.Task.Execution)
innerCtx, innerCancel := context.WithCancel(ctx)
defer innerCancel()
@@ -97,19 +96,15 @@ func (a *Agent) startTask(ctx context.Context, tc *taskContext, complete chan<-
)
tc.statsCollector.logStats(innerCtx, tc.taskConfig.Expansions)
- if err := a.setupSystemMetricsCollector(ctx, tc); err != nil {
- tc.logger.System().Error(errors.Wrap(err, "setting up system metrics collector"))
- }
-
if ctx.Err() != nil {
- tc.logger.Task().Info("task canceled")
+ tc.logger.Task().Info("Task canceled.")
return
}
if !tc.ranSetupGroup {
tc.taskDirectory, err = a.createTaskDirectory(tc)
if err != nil {
- tc.logger.Execution().Errorf("error creating task directory: %s", err)
+ tc.logger.Execution().Error(errors.Wrap(err, "creating task directory"))
complete <- evergreen.TaskFailed
return
}
@@ -120,7 +115,7 @@ func (a *Agent) startTask(ctx context.Context, tc *taskContext, complete chan<-
// notify API server that the task has been started.
tc.logger.Execution().Info("Reporting task started.")
if err = a.comm.StartTask(ctx, tc.task); err != nil {
- tc.logger.Execution().Errorf("error marking task started: %v", err)
+ tc.logger.Execution().Error(errors.Wrap(err, "marking task started"))
complete <- evergreen.TaskFailed
return
}
@@ -133,50 +128,25 @@ func (a *Agent) startTask(ctx context.Context, tc *taskContext, complete chan<-
}
if tc.oomTrackerEnabled(a.opts.CloudProvider) {
- tc.logger.Execution().Info("OOM tracker clearing system messages")
+ tc.logger.Execution().Info("OOM tracker clearing system messages.")
if err = tc.oomTracker.Clear(innerCtx); err != nil {
- tc.logger.Execution().Errorf("error clearing system messages: %s", err)
+ tc.logger.Execution().Error(errors.Wrap(err, "clearing OOM tracker system messages"))
}
}
if err = a.runTaskCommands(innerCtx, tc); err != nil {
+ tc.logger.Execution().Error(errors.Wrap(err, "running task commands"))
complete <- evergreen.TaskFailed
return
}
complete <- evergreen.TaskSucceeded
}
-func (a *Agent) setupSystemMetricsCollector(ctx context.Context, tc *taskContext) error {
- conn, err := a.comm.GetCedarGRPCConn(ctx)
- if err != nil {
- return errors.Wrap(err, "getting cedar gRPC client connection")
- }
-
- tc.Lock()
- defer tc.Unlock()
-
- tc.systemMetricsCollector, err = newSystemMetricsCollector(ctx, &systemMetricsCollectorOptions{
- task: tc.taskModel,
- interval: defaultStatsInterval,
- collectors: []metricCollector{
- newUptimeCollector(),
- newProcessCollector(),
- newDiskUsageCollector(tc.taskConfig.WorkDir),
- },
- conn: conn,
- })
- if err != nil {
- return errors.Wrap(err, "initializing system metrics collector")
- }
-
- if err = tc.systemMetricsCollector.Start(ctx); err != nil {
- return errors.Wrap(err, "starting system metrics collection")
- }
- return nil
-}
-
func (a *Agent) runPreTaskCommands(ctx context.Context, tc *taskContext) error {
tc.logger.Task().Info("Running pre-task commands.")
+ ctx, preTaskSpan := a.tracer.Start(ctx, "pre-task-commands")
+ defer preTaskSpan.End()
+
opts := runCommandsOptions{}
if !tc.ranSetupGroup {
@@ -184,11 +154,11 @@ func (a *Agent) runPreTaskCommands(ctx context.Context, tc *taskContext) error {
var cancel context.CancelFunc
taskGroup, err := tc.taskConfig.GetTaskGroup(tc.taskGroup)
if err != nil {
- tc.logger.Execution().Error(errors.Wrap(err, "error fetching task group for pre-group commands"))
+ tc.logger.Execution().Error(errors.Wrap(err, "fetching task group for task setup group commands"))
return nil
}
if taskGroup.SetupGroup != nil {
- tc.logger.Task().Infof("Running setup_group for '%s'.", taskGroup.Name)
+ tc.logger.Task().Infof("Running setup group for task group '%s'.", taskGroup.Name)
opts.failPreAndPost = taskGroup.SetupGroupFailTask
if taskGroup.SetupGroupTimeoutSecs > 0 {
ctx2, cancel = context.WithTimeout(ctx, time.Duration(taskGroup.SetupGroupTimeoutSecs)*time.Second)
@@ -196,31 +166,31 @@ func (a *Agent) runPreTaskCommands(ctx context.Context, tc *taskContext) error {
ctx2, cancel = a.withCallbackTimeout(ctx, tc)
}
defer cancel()
- err = a.runCommands(ctx2, tc, taskGroup.SetupGroup.List(), opts)
+ err = a.runCommands(ctx2, tc, taskGroup.SetupGroup.List(), opts, preBlock)
if err != nil {
- tc.logger.Execution().Error(errors.Wrap(err, "error running task setup group"))
+ tc.logger.Execution().Error(errors.Wrap(err, "running task setup group"))
if taskGroup.SetupGroupFailTask {
return err
}
}
- tc.logger.Task().Infof("Finished running setup_group for '%s'.", taskGroup.Name)
+ tc.logger.Task().Infof("Finished running setup group for task group '%s'.", taskGroup.Name)
}
tc.ranSetupGroup = true
}
taskGroup, err := tc.taskConfig.GetTaskGroup(tc.taskGroup)
if err != nil {
- tc.logger.Execution().Error(errors.Wrap(err, "error fetching task group for pre-task commands"))
+ tc.logger.Execution().Error(errors.Wrap(err, "fetching task group for pre-task commands"))
return nil
}
if taskGroup.SetupTask != nil {
- tc.logger.Task().Infof("Running setup_task for '%s'.", taskGroup.Name)
+ tc.logger.Task().Infof("Running setup task for task group '%s'.", taskGroup.Name)
opts.failPreAndPost = taskGroup.SetupGroupFailTask
- err = a.runCommands(ctx, tc, taskGroup.SetupTask.List(), opts)
+ err = a.runCommands(ctx, tc, taskGroup.SetupTask.List(), opts, preBlock)
}
if err != nil {
- msg := fmt.Sprintf("Running pre-task commands failed: %v", err)
+ msg := fmt.Sprintf("Running pre-task commands failed: %s", err)
tc.logger.Task().Error(msg)
if opts.failPreAndPost {
return errors.New(msg)
@@ -236,7 +206,7 @@ func (tc *taskContext) setCurrentCommand(command command.Command) {
tc.currentCommand = command
if tc.logger != nil {
- tc.logger.Execution().Infof("Current command set to '%s' (%s)", tc.currentCommand.DisplayName(), tc.currentCommand.Type())
+ tc.logger.Execution().Infof("Current command set to '%s' (%s).", tc.currentCommand.DisplayName(), tc.currentCommand.Type())
}
}
@@ -263,10 +233,10 @@ func (tc *taskContext) setCurrentIdleTimeout(cmd command.Command) {
tc.setIdleTimeout(timeout)
if tc.currentCommand != nil {
- tc.logger.Execution().Debugf("Set idle timeout for '%s' (%s) to %s",
+ tc.logger.Execution().Debugf("Set idle timeout for '%s' (%s) to %s.",
tc.currentCommand.DisplayName(), tc.currentCommand.Type(), tc.getIdleTimeout())
} else {
- tc.logger.Execution().Debugf("Set current idle timeout to %s", tc.getIdleTimeout())
+ tc.logger.Execution().Debugf("Set current idle timeout to %s.", tc.getIdleTimeout())
}
}
@@ -351,9 +321,13 @@ func (a *Agent) makeTaskConfig(ctx context.Context, tc *taskContext) (*internal.
}
}
grip.Info("Fetching distro configuration.")
- confDistro, err := a.comm.GetDistroView(ctx, tc.task)
- if err != nil {
- return nil, err
+ var confDistro *apimodels.DistroView
+ var err error
+ if a.opts.Mode == HostMode {
+ confDistro, err = a.comm.GetDistroView(ctx, tc.task)
+ if err != nil {
+ return nil, err
+ }
}
grip.Info("Fetching project ref.")
@@ -367,21 +341,19 @@ func (a *Agent) makeTaskConfig(ctx context.Context, tc *taskContext) (*internal.
var confPatch *patch.Patch
if evergreen.IsGitHubPatchRequester(tc.taskModel.Requester) {
- grip.Info("Fetching patch document for Github PR request.")
+ grip.Info("Fetching patch document for GitHub PR request.")
confPatch, err = a.comm.GetTaskPatch(ctx, tc.task, "")
if err != nil {
- err = errors.Wrap(err, "couldn't fetch patch for Github PR request")
- grip.Error(err.Error())
- return nil, err
+ return nil, errors.Wrap(err, "fetching patch for GitHub PR request")
}
}
- grip.Info("Constructing TaskConfig.")
- taskConfig, err := internal.NewTaskConfig(confDistro, tc.project, tc.taskModel, confRef, confPatch, tc.expansions)
+ grip.Info("Constructing task config.")
+ taskConfig, err := internal.NewTaskConfig(a.opts.WorkingDirectory, confDistro, tc.project, tc.taskModel, confRef, confPatch, tc.expansions)
if err != nil {
return nil, err
}
- taskConfig.Redacted = tc.expVars.PrivateVars
+ taskConfig.Redacted = tc.privateVars
taskConfig.TaskSync = a.opts.SetupData.TaskSync
taskConfig.EC2Keys = a.opts.SetupData.EC2Keys
diff --git a/agent/util/archive.go b/agent/util/archive.go
index f0fd46c5664..3a14a64fcd5 100644
--- a/agent/util/archive.go
+++ b/agent/util/archive.go
@@ -25,7 +25,7 @@ func FindContentsToArchive(ctx context.Context, rootPath string, includes, exclu
catcher := grip.NewBasicCatcher()
archiveContents, err := streamArchiveContents(ctx, rootPath, includes, excludes)
if err != nil {
- return nil, errors.Wrap(err, "problem getting archive contents")
+ return nil, errors.Wrap(err, "getting archive contents")
}
for _, fn := range archiveContents {
if fn.err != nil {
@@ -55,8 +55,8 @@ func streamArchiveContents(ctx context.Context, rootPath string, includes, exclu
continue
}
- if ctx.Err() != nil {
- return nil, errors.New("archive creation operation canceled")
+ if err := ctx.Err(); err != nil {
+ return nil, errors.Wrapf(err, "canceled while streaming archive for include pattern '%s'", includePattern)
}
var walk filepath.WalkFunc
@@ -72,7 +72,7 @@ func streamArchiveContents(ctx context.Context, rootPath string, includes, exclu
archiveContents = append(archiveContents, ArchiveContentFile{path, info, nil})
return nil
}
- catcher.Add(filepath.Walk(dir, walk))
+ catcher.Wrapf(filepath.Walk(dir, walk), "matching files included in filter '%s' for path '%s'", filematch, dir)
} else if strings.Contains(filematch, "**") {
globSuffix := filematch[2:]
walk = func(path string, info os.FileInfo, err error) error {
@@ -87,7 +87,7 @@ func streamArchiveContents(ctx context.Context, rootPath string, includes, exclu
}
return nil
}
- catcher.Add(filepath.Walk(dir, walk))
+ catcher.Wrapf(filepath.Walk(dir, walk), "matching files included in filter '%s' for path '%s'", filematch, dir)
} else {
walk = func(path string, info os.FileInfo, err error) error {
a, b := filepath.Split(path)
@@ -108,7 +108,7 @@ func streamArchiveContents(ctx context.Context, rootPath string, includes, exclu
}
return nil
}
- catcher.Add(filepath.Walk(rootPath, walk))
+ catcher.Wrapf(filepath.Walk(rootPath, walk), "matching files included in filter '%s' for patch '%s'", filematch, rootPath)
}
}
return archiveContents, catcher.Resolve()
diff --git a/agent/util/archive_tar.go b/agent/util/archive_tar.go
index 0c5c2a71d8c..245b02346a6 100644
--- a/agent/util/archive_tar.go
+++ b/agent/util/archive_tar.go
@@ -21,16 +21,16 @@ func BuildArchive(ctx context.Context, tarWriter *tar.Writer, rootPath string, i
excludes []string, logger grip.Journaler) (int, error) {
pathsToAdd, err := streamArchiveContents(ctx, rootPath, includes, []string{})
if err != nil {
- return 0, errors.Wrap(err, "problem getting archive contents")
+ return 0, errors.Wrap(err, "getting archive contents")
}
numFilesArchived := 0
processed := map[string]bool{}
- logger.Infof("beginning to build archive")
+ logger.Infof("Beginning to build archive.")
FileLoop:
for _, file := range pathsToAdd {
- if ctx.Err() != nil {
- return numFilesArchived, errors.Wrap(ctx.Err(), "timeout when building archive")
+ if err := ctx.Err(); err != nil {
+ return numFilesArchived, errors.Wrap(err, "building archive was canceled")
}
var intarball string
@@ -40,13 +40,13 @@ FileLoop:
if file.Info.Mode()&os.ModeSymlink > 0 {
symlinkPath, err := filepath.EvalSymlinks(file.Path)
if err != nil {
- logger.Warningf("Could not follow symlink %s, ignoring", file.Path)
+ logger.Warningf("Could not follow symlink '%s', ignoring.", file.Path)
continue
} else {
- logger.Infof("Following symlink in %s, got: %s", file.Path, symlinkPath)
+ logger.Infof("Following symlink '%s', got path '%s'.", file.Path, symlinkPath)
symlinkFileInfo, err := os.Stat(symlinkPath)
if err != nil {
- logger.Warningf("Failed to get underlying file '%s' for symlink '%s', ignoring", symlinkPath, file.Path)
+ logger.Warningf("Failed to get underlying file for symlink '%s', ignoring.", file.Path)
continue
}
@@ -66,7 +66,7 @@ FileLoop:
//strip any leading slash from the tarball header path
intarball = strings.TrimLeft(intarball, "/")
- logger.Infoln("adding to tarball:", intarball)
+ logger.Infof("Adding file to tarball: '%s'.", intarball)
if _, hasKey := processed[intarball]; hasKey {
continue
} else {
@@ -92,25 +92,26 @@ FileLoop:
numFilesArchived++
err := tarWriter.WriteHeader(hdr)
if err != nil {
- return numFilesArchived, errors.Wrapf(err, "Error writing header for %s", intarball)
+ return numFilesArchived, errors.Wrapf(err, "writing tarball header for file '%s'", intarball)
}
in, err := os.Open(file.Path)
if err != nil {
- return numFilesArchived, errors.Wrapf(err, "Error opening %s", file.Path)
+ return numFilesArchived, errors.Wrapf(err, "opening file '%s'", file.Path)
}
amountWrote, err := io.Copy(tarWriter, in)
if err != nil {
- logger.Debug(in.Close())
- return numFilesArchived, errors.Wrapf(err, "Error writing into tar for %s", file.Path)
+ logger.Debug(errors.Wrapf(in.Close(), "closing file '%s'", file.Path))
+ return numFilesArchived, errors.Wrapf(err, "copying file '%s' into tarball", file.Path)
}
if amountWrote != hdr.Size {
- logger.Debug(in.Close())
- return numFilesArchived, errors.Errorf("Error writing to archive for %s: header size %d but wrote %d", intarball, hdr.Size, amountWrote)
+ logger.Debug(errors.Wrapf(in.Close(), "closing file '%s'", file.Path))
+ return numFilesArchived, errors.Errorf("tarball header size is %d but actually wrote %d", hdr.Size, amountWrote)
}
- logger.Debug(in.Close())
- logger.Warning(tarWriter.Flush())
+
+ logger.Debug(errors.Wrapf(in.Close(), "closing file '%s'", file.Path))
+ logger.Warning(errors.Wrap(tarWriter.Flush(), "flushing tar writer"))
}
return numFilesArchived, nil
@@ -120,13 +121,13 @@ func ExtractTarball(ctx context.Context, reader io.Reader, rootPath string, excl
// wrap the reader in a gzip reader and a tar reader
gzipReader, err := gzip.NewReader(reader)
if err != nil {
- return errors.Wrap(err, "error creating gzip reader")
+ return errors.Wrap(err, "creating gzip reader")
}
tarReader := tar.NewReader(gzipReader)
err = extractTarArchive(ctx, tarReader, rootPath, excludes)
if err != nil {
- return errors.Wrapf(err, "error extracting %s", rootPath)
+ return errors.Wrapf(err, "extracting path '%s'", rootPath)
}
return nil
@@ -142,8 +143,8 @@ func extractTarArchive(ctx context.Context, tarReader *tar.Reader, rootPath stri
if err != nil {
return errors.WithStack(err)
}
- if ctx.Err() != nil {
- return errors.New("extraction operation canceled")
+ if err := ctx.Err(); err != nil {
+ return errors.Wrap(err, "extraction operation canceled")
}
if hdr.Typeflag == tar.TypeDir {
@@ -188,18 +189,19 @@ func extractTarArchive(ctx context.Context, tarReader *tar.Reader, rootPath stri
}
if _, err = io.Copy(f, tarReader); err != nil {
- grip.Error(f.Close())
- return errors.WithStack(err)
+ grip.Error(errors.Wrapf(f.Close(), "closing file '%s'", localFile))
+ return errors.Wrap(err, "copying tar contents to local file '%s'")
}
// File's permissions should match what was in the archive
if err = os.Chmod(f.Name(), os.FileMode(int32(hdr.Mode))); err != nil {
- grip.Error(f.Close())
- return errors.WithStack(err)
+ grip.Error(errors.Wrapf(f.Close(), "closing file '%s'", localFile))
+ return errors.Wrapf(err, "changing file '%s' mode to %d", f.Name(), hdr.Mode)
}
- grip.Error(f.Close())
+
+ grip.Error(errors.Wrapf(f.Close(), "closing file '%s'", localFile))
} else {
- return errors.New("Unknown file type in archive.")
+ return errors.Errorf("unknown file type '%c' in archive", hdr.Typeflag)
}
}
}
@@ -209,12 +211,12 @@ func extractTarArchive(ctx context.Context, tarReader *tar.Reader, rootPath stri
func TarGzReader(path string) (f, gz io.ReadCloser, tarReader *tar.Reader, err error) {
f, err = os.Open(path)
if err != nil {
- return nil, nil, nil, errors.WithStack(err)
+ return nil, nil, nil, errors.Wrapf(err, "opening file '%s'", path)
}
gz, err = gzip.NewReader(f)
if err != nil {
defer f.Close()
- return nil, nil, nil, errors.WithStack(err)
+ return nil, nil, nil, errors.Wrap(err, "initializing gzip reader")
}
tarReader = tar.NewReader(gz)
return f, gz, tarReader, nil
@@ -225,7 +227,7 @@ func TarGzReader(path string) (f, gz io.ReadCloser, tarReader *tar.Reader, err e
func TarGzWriter(path string) (f, gz io.WriteCloser, tarWriter *tar.Writer, err error) {
f, err = os.Create(path)
if err != nil {
- return nil, nil, nil, errors.WithStack(err)
+ return nil, nil, nil, errors.Wrapf(err, "creating file '%s'", path)
}
gz = gzip.NewWriter(f)
tarWriter = tar.NewWriter(gz)
diff --git a/agent/util/archive_tar_test.go b/agent/util/archive_tar_test.go
index 8e63f2acd1e..f5b6c52336c 100644
--- a/agent/util/archive_tar_test.go
+++ b/agent/util/archive_tar_test.go
@@ -2,7 +2,7 @@ package util
import (
"context"
- "io/ioutil"
+ "io"
"os"
"path/filepath"
"runtime"
@@ -31,14 +31,10 @@ func getDirectoryOfFile() string {
func TestArchiveExtract(t *testing.T) {
Convey("After extracting a tarball", t, func() {
testDir := getDirectoryOfFile()
- outputDir, err := ioutil.TempDir("", "artifacts_test")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(outputDir))
- }()
+ outputDir := t.TempDir()
f, gz, tarReader, err := TarGzReader(filepath.Join(testDir, "testdata", "artifacts.tar.gz"))
- require.NoError(t, err, "Couldn't open test tarball")
+ require.NoError(t, err)
defer f.Close()
defer gz.Close()
@@ -49,7 +45,7 @@ func TestArchiveExtract(t *testing.T) {
f, err := os.Open(filepath.Join(outputDir, "artifacts", "dir1", "dir2", "testfile.txt"))
So(err, ShouldBeNil)
defer f.Close()
- data, err := ioutil.ReadAll(f)
+ data, err := io.ReadAll(f)
So(err, ShouldBeNil)
So(string(data), ShouldEqual, "test\n")
})
@@ -61,7 +57,7 @@ func TestMakeArchive(t *testing.T) {
testDir := getDirectoryOfFile()
logger := logging.NewGrip("test.archive")
- outputFile, err := ioutil.TempFile("", "artifacts_test_out.tar.gz")
+ outputFile, err := os.CreateTemp("", "artifacts_test_out.tar.gz")
require.NoError(t, err)
defer func() {
assert.NoError(t, os.RemoveAll(outputFile.Name()))
@@ -69,7 +65,7 @@ func TestMakeArchive(t *testing.T) {
require.NoError(t, outputFile.Close())
f, gz, tarWriter, err := TarGzWriter(outputFile.Name())
- require.NoError(t, err, "Couldn't open test tarball")
+ require.NoError(t, err)
defer f.Close()
defer gz.Close()
defer tarWriter.Close()
@@ -85,7 +81,7 @@ func TestArchiveRoundTrip(t *testing.T) {
testDir := getDirectoryOfFile()
logger := logging.NewGrip("test.archive")
- outputFile, err := ioutil.TempFile("", "artifacts_test_out.tar.gz")
+ outputFile, err := os.CreateTemp("", "artifacts_test_out.tar.gz")
require.NoError(t, err)
require.NoError(t, outputFile.Close())
defer func() {
@@ -93,7 +89,7 @@ func TestArchiveRoundTrip(t *testing.T) {
}()
f, gz, tarWriter, err := TarGzWriter(outputFile.Name())
- require.NoError(t, err, "Couldn't open test tarball")
+ require.NoError(t, err)
includes := []string{"dir1/**"}
excludes := []string{"*.pdb"}
var found int
@@ -104,13 +100,9 @@ func TestArchiveRoundTrip(t *testing.T) {
So(gz.Close(), ShouldBeNil)
So(f.Close(), ShouldBeNil)
- outputDir, err := ioutil.TempDir("", "artifacts_out")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(outputDir))
- }()
+ outputDir := t.TempDir()
f2, gz2, tarReader, err := TarGzReader(outputFile.Name())
- require.NoError(t, err, "Couldn't open test tarball")
+ require.NoError(t, err)
err = extractTarArchive(context.Background(), tarReader, outputDir, []string{})
defer f2.Close()
defer gz2.Close()
@@ -123,7 +115,7 @@ func TestArchiveRoundTrip(t *testing.T) {
// Dereference symlinks
exists = utility.FileExists(filepath.Join(outputDir, "dir1", "dir2", "my_symlink.txt"))
So(exists, ShouldBeTrue)
- contents, err := ioutil.ReadFile(filepath.Join(outputDir, "dir1", "dir2", "my_symlink.txt"))
+ contents, err := os.ReadFile(filepath.Join(outputDir, "dir1", "dir2", "my_symlink.txt"))
So(err, ShouldBeNil)
So(strings.Trim(string(contents), "\r\n\t "), ShouldEqual, "Hello, World")
})
diff --git a/agent/util/ec2.go b/agent/util/ec2.go
index 8edfb5ca907..c79395883f2 100644
--- a/agent/util/ec2.go
+++ b/agent/util/ec2.go
@@ -5,7 +5,6 @@ import (
"fmt"
"io"
"net/http"
- "os"
"time"
"github.com/evergreen-ci/utility"
@@ -24,7 +23,7 @@ func SpotHostWillTerminateSoon() bool {
defer utility.PutHTTPClient(c)
resp, err := c.Get(url)
if err != nil {
- grip.Info(errors.Wrap(err, "problem getting termination endpoint"))
+ grip.Info(errors.Wrap(err, "getting spot host termination time"))
return false
}
defer resp.Body.Close()
@@ -58,10 +57,4 @@ func GetEC2InstanceID(ctx context.Context) (string, error) {
}
return string(instanceID), nil
-
-}
-
-func ExitAgent() {
- grip.Info("Spot instance terminating, so agent is exiting")
- os.Exit(1)
}
diff --git a/agent/util/subtree_unix.go b/agent/util/subtree_unix.go
index 66a23cf153c..f8815210924 100644
--- a/agent/util/subtree_unix.go
+++ b/agent/util/subtree_unix.go
@@ -1,4 +1,4 @@
-// +build darwin linux
+//go:build darwin || linux
package util
@@ -31,25 +31,25 @@ func TrackProcess(key string, pid int, logger grip.Journaler) {}
func KillSpawnedProcs(ctx context.Context, key, workingDir string, logger grip.Journaler) error {
pidsToKill, err := getPIDsToKill(ctx, key, workingDir, logger)
if err != nil {
- return errors.Wrap(err, "problem getting list of PIDs to kill")
+ return errors.Wrap(err, "getting list of PIDs to kill")
}
for _, pid := range pidsToKill {
p := os.Process{Pid: pid}
err := p.Kill()
if err != nil {
- logger.Errorf("Cleanup got error killing pid '%d': %v", pid, err)
+ logger.Errorf("Cleanup got error killing process with PID %d: %s.", pid, err)
} else {
- logger.Infof("Cleanup killed pid '%d'", pid)
+ logger.Infof("Cleanup killed process with PID %d.", pid)
}
}
pidsStillRunning, err := waitForExit(ctx, pidsToKill)
if err != nil {
- logger.Infof("Problem waiting for processes to exit: %s", err)
+ logger.Infof("Problem waiting for processes to exit: %s.", err)
}
for _, pid := range pidsStillRunning {
- logger.Infof("Failed to clean up process '%d'", pid)
+ logger.Infof("Failed to clean up process with PID %d.", pid)
}
return nil
@@ -135,7 +135,7 @@ func waitForExit(ctx context.Context, pidsToWait []int) ([]int, error) {
}
}
if len(unkilledPids) > 0 {
- return true, errors.Errorf("'%d' of '%d' processes are still running", len(unkilledPids), len(pidsToWait))
+ return true, errors.Errorf("%d of %d processes are still running", len(unkilledPids), len(pidsToWait))
}
return false, nil
diff --git a/agent/util/subtree_unix_test.go b/agent/util/subtree_unix_test.go
index 819522a1493..df4cc44b5d4 100644
--- a/agent/util/subtree_unix_test.go
+++ b/agent/util/subtree_unix_test.go
@@ -1,3 +1,4 @@
+//go:build darwin || linux
// +build darwin linux
package util
diff --git a/agent/util/subtree_windows.go b/agent/util/subtree_windows.go
index b6649e0483d..e66b110df94 100644
--- a/agent/util/subtree_windows.go
+++ b/agent/util/subtree_windows.go
@@ -98,7 +98,7 @@ func (r *processRegistry) getJob(taskId string) (*Job, error) {
var err error
j, err = NewJob(taskId)
if err != nil {
- return nil, errors.Wrapf(err, "problem creating job object for %s", taskId)
+ return nil, errors.Wrapf(err, "creating job object for task '%s'", taskId)
}
r.jobs[taskId] = j
@@ -120,7 +120,7 @@ func (r *processRegistry) removeJob(taskId string) error {
var err error
defer func() {
- err = errors.Wrapf(job.Close(), "problem closing job for task %s", taskId)
+ err = errors.Wrapf(job.Close(), "closing job object for task '%s'", taskId)
}()
delete(r.jobs, taskId)
@@ -141,14 +141,14 @@ func (r *processRegistry) removeJob(taskId string) error {
func TrackProcess(taskId string, pid int, logger grip.Journaler) {
job, err := processMapping.getJob(taskId)
if err != nil {
- logger.Errorf("failed creating job object: %v", err)
+ logger.Errorf("Failed to get job object: %s", err)
return
}
- logger.Infof("tracking process with pid %d", pid)
+ logger.Infof("Tracking process with PID %d.", pid)
if err = job.AssignProcess(uint(pid)); err != nil {
- logger.Errorf("failed assigning process %d to job object: %v", pid, err)
+ logger.Errorf("Failed assigning process with PID %d to job object: %s.", pid, err)
return
}
}
@@ -163,12 +163,11 @@ func KillSpawnedProcs(ctx context.Context, key, workingDir string, logger grip.J
}
if err := job.Terminate(0); err != nil {
- logger.Errorf("terminating job object [%s] failed: %v", key, err)
- return errors.WithStack(err)
+ logger.Errorf("Failed to terminate job object '%s': %s.", key, err)
+ return errors.Wrapf(err, "terminating job object '%s'", key)
}
- return errors.Wrap(processMapping.removeJob(key),
- "problem removing job object from internal evergreen tracking mechanism")
+ return errors.Wrapf(processMapping.removeJob(key), "removing job object '%s' from internal Evergreen tracking mechanism", key)
}
///////////////////////////////////////////////////////////////////////////////////////////
@@ -229,20 +228,20 @@ func NewJob(name string) (*Job, error) {
return &Job{handle: hJob}, nil
}
-func (self *Job) AssignProcess(pid uint) error {
+func (j *Job) AssignProcess(pid uint) error {
hProcess, err := OpenProcess(PROCESS_ALL_ACCESS, false, uint32(pid))
if err != nil {
return NewWindowsError("OpenProcess", err)
}
defer CloseHandle(hProcess)
- if err := AssignProcessToJobObject(self.handle, hProcess); err != nil {
+ if err := AssignProcessToJobObject(j.handle, hProcess); err != nil {
return NewWindowsError("AssignProcessToJobObject", err)
}
return nil
}
-func (self *Job) Terminate(exitCode uint) error {
- if err := TerminateJobObject(self.handle, uint32(exitCode)); err != nil {
+func (j *Job) Terminate(exitCode uint) error {
+ if err := TerminateJobObject(j.handle, uint32(exitCode)); err != nil {
return NewWindowsError("TerminateJobObject", err)
}
return nil
@@ -269,12 +268,12 @@ func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (sy
return syscall.Handle(r1), nil
}
-func (self *Job) Close() error {
- if self.handle != 0 {
- if err := CloseHandle(self.handle); err != nil {
+func (j *Job) Close() error {
+ if j.handle != 0 {
+ if err := CloseHandle(j.handle); err != nil {
return NewWindowsError("CloseHandle", err)
}
- self.handle = 0
+ j.handle = 0
}
return nil
}
@@ -358,14 +357,14 @@ func NewWindowsError(functionName string, innerError error) *WindowsError {
return &WindowsError{functionName, innerError}
}
-func (self *WindowsError) FunctionName() string {
- return self.functionName
+func (we *WindowsError) FunctionName() string {
+ return we.functionName
}
-func (self *WindowsError) InnerError() error {
- return self.innerError
+func (we *WindowsError) InnerError() error {
+ return we.innerError
}
-func (self *WindowsError) Error() string {
- return fmt.Sprintf("gowin32: %s failed: %v", self.functionName, self.innerError)
+func (we *WindowsError) Error() string {
+ return fmt.Sprintf("gowin32: %s failed: %v", we.functionName, we.innerError)
}
diff --git a/apimodels/agent_models.go b/apimodels/agent_models.go
index b843a4650d0..0cb7b9a43d3 100644
--- a/apimodels/agent_models.go
+++ b/apimodels/agent_models.go
@@ -34,6 +34,26 @@ type HeartbeatResponse struct {
Abort bool `json:"abort,omitempty"`
}
+// CheckMergeRequest holds information sent by the agent to get a PR and check mergeability.
+type CheckMergeRequest struct {
+ PRNum int `json:"pr_num"`
+ Owner string `json:"owner"`
+ Repo string `json:"repo"`
+ LastRetry bool `json:"last_retry"` // Temporary field to help us understand if we are testing with the wrong commit.
+}
+
+type PullRequestInfo struct {
+ Mergeable *bool `json:"mergeable"`
+ MergeCommitSHA string `json:"merge_commit_sha"`
+}
+
+// TaskTestResultsInfo contains metadata related to test results persisted for
+// a given task.
+type TaskTestResultsInfo struct {
+ Service string `json:"service"`
+ Failed bool `json:"failed"`
+}
+
// TaskEndDetail contains data sent from the agent to the API server after each task run.
// This should be used to store data relating to what happened when the task ran
type TaskEndDetail struct {
@@ -86,22 +106,17 @@ type GetNextTaskDetails struct {
EC2InstanceID string `json:"instance_id,omitempty"`
}
-// ExpansionVars is a map of expansion variables for a project.
-type ExpansionVars struct {
- Vars map[string]string `json:"vars"`
- PrivateVars map[string]bool `json:"private_vars"`
-}
-
type AgentSetupData struct {
- SplunkServerURL string `json:"splunk_server_url"`
- SplunkClientToken string `json:"splunk_client_token"`
- SplunkChannel string `json:"splunk_channel"`
- S3Key string `json:"s3_key"`
- S3Secret string `json:"s3_secret"`
- S3Bucket string `json:"s3_bucket"`
- TaskSync evergreen.S3Credentials `json:"task_sync"`
- EC2Keys []evergreen.EC2Key `json:"ec2_keys"`
- LogkeeperURL string `json:"logkeeper_url"`
+ SplunkServerURL string `json:"splunk_server_url"`
+ SplunkClientToken string `json:"splunk_client_token"`
+ SplunkChannel string `json:"splunk_channel"`
+ S3Key string `json:"s3_key"`
+ S3Secret string `json:"s3_secret"`
+ S3Bucket string `json:"s3_bucket"`
+ TaskSync evergreen.S3Credentials `json:"task_sync"`
+ EC2Keys []evergreen.EC2Key `json:"ec2_keys"`
+ LogkeeperURL string `json:"logkeeper_url"`
+ TraceCollectorEndpoint string `json:"trace_collector_endpoint"`
}
// NextTaskResponse represents the response sent back when an agent asks for a next task
@@ -172,6 +187,10 @@ type RegistrySettings struct {
Password string `mapstructure:"registry_password" json:"registry_password" yaml:"registry_password"`
}
+func (ted *TaskEndDetail) IsEmpty() bool {
+ return ted == nil || ted.Status == ""
+}
+
func (ch *CreateHost) ValidateDocker() error {
catcher := grip.NewBasicCatcher()
@@ -179,7 +198,7 @@ func (ch *CreateHost) ValidateDocker() error {
catcher.Add(ch.validateAgentOptions())
if ch.Image == "" {
- catcher.New("docker image must be set")
+ catcher.New("Docker image must be set")
}
if ch.Distro == "" {
settings, err := evergreen.GetConfig()
@@ -193,7 +212,7 @@ func (ch *CreateHost) ValidateDocker() error {
if ch.ContainerWaitTimeoutSecs <= 0 {
ch.ContainerWaitTimeoutSecs = DefaultContainerWaitTimeoutSecs
} else if ch.ContainerWaitTimeoutSecs >= 3600 || ch.ContainerWaitTimeoutSecs <= 10 {
- catcher.New("container_wait_timeout_secs must be between 10 and 3600 seconds")
+ catcher.New("container wait timeout (seconds) must be between 10 and 3600 seconds")
}
if ch.PollFrequency <= 0 {
@@ -219,23 +238,23 @@ func (ch *CreateHost) ValidateEC2() error {
}
if (ch.AMI != "" && ch.Distro != "") || (ch.AMI == "" && ch.Distro == "") {
- catcher.New("must set exactly one of ami or distro")
+ catcher.New("must set exactly one of AMI or distro")
}
if ch.AMI != "" {
if ch.InstanceType == "" {
- catcher.New("instance_type must be set if ami is set")
+ catcher.New("instance type must be set if AMI is set")
}
if len(ch.SecurityGroups) == 0 {
- catcher.New("must specify security_group_ids if ami is set")
+ catcher.New("must specify security group IDs if AMI is set")
}
if ch.Subnet == "" {
- catcher.New("subnet_id must be set if ami is set")
+ catcher.New("subnet ID must be set if AMI is set")
}
}
if !(ch.AWSKeyID == "" && ch.AWSSecret == "" && ch.KeyName == "") &&
!(ch.AWSKeyID != "" && ch.AWSSecret != "" && ch.KeyName != "") {
- catcher.New("aws_access_key_id, aws_secret_access_key, key_name must all be set or unset")
+ catcher.New("AWS access key ID, AWS secret access key, and key name must all be set or unset")
}
return catcher.Resolve()
@@ -259,13 +278,13 @@ func (ch *CreateHost) validateAgentOptions() error {
ch.SetupTimeoutSecs = DefaultSetupTimeoutSecs
}
if ch.SetupTimeoutSecs < 60 || ch.SetupTimeoutSecs > 3600 {
- catcher.New("timeout_setup_secs must be between 60 and 3600")
+ catcher.New("timeout setup (seconds) must be between 60 and 3600")
}
if ch.TeardownTimeoutSecs == 0 {
ch.TeardownTimeoutSecs = DefaultTeardownTimeoutSecs
}
if ch.TeardownTimeoutSecs < 60 || ch.TeardownTimeoutSecs > 604800 {
- catcher.New("timeout_teardown_secs must be between 60 and 604800")
+ catcher.New("timeout teardown (seconds) must be between 60 and 604800")
}
return catcher.Resolve()
}
@@ -275,14 +294,14 @@ func (ch *CreateHost) setNumHosts() error {
ch.NumHosts = "1"
}
if ch.CloudProvider == ProviderDocker && ch.NumHosts != "1" {
- return errors.Errorf("num_hosts cannot be greater than 1 for cloud provider %s", ProviderDocker)
+ return errors.Errorf("num hosts cannot be greater than 1 for cloud provider '%s'", ProviderDocker)
} else {
numHosts, err := strconv.Atoi(ch.NumHosts)
if err != nil {
- return errors.Errorf("problem parsing '%s' as an int", ch.NumHosts)
+ return errors.Wrapf(err, "parsing num hosts specification '%s' as an int", ch.NumHosts)
}
if numHosts > 10 || numHosts < 0 {
- return errors.New("num_hosts must be between 1 and 10")
+ return errors.New("num hosts must be between 1 and 10")
} else if numHosts == 0 {
ch.NumHosts = "1"
}
@@ -300,7 +319,7 @@ func (ch *CreateHost) Validate() error {
return ch.ValidateDocker()
}
- return errors.Errorf("Cloud provider must be either '%s' or '%s'", ProviderEC2, ProviderDocker)
+ return errors.Errorf("cloud provider must be either '%s' or '%s'", ProviderEC2, ProviderDocker)
}
func (ch *CreateHost) Expand(exp *util.Expansions) error {
@@ -308,12 +327,8 @@ func (ch *CreateHost) Expand(exp *util.Expansions) error {
}
type GeneratePollResponse struct {
- Finished bool `json:"finished"`
- ShouldExit bool `json:"should_exit"`
- Error string `json:"error"`
-
- // TODO: (EVG-16977) Remove the Errors field.
- Errors []string `json:"errors"`
+ Finished bool `json:"finished"`
+ Error string `json:"error"`
}
// DistroView represents the view of data that the agent uses from the distro
@@ -321,5 +336,17 @@ type GeneratePollResponse struct {
type DistroView struct {
CloneMethod string `json:"clone_method"`
DisableShallowClone bool `json:"disable_shallow_clone"`
- WorkDir string `json:"work_dir"`
+}
+
+// ExpansionsAndVars represents expansions, project variables, and parameters
+// used when running a task.
+type ExpansionsAndVars struct {
+ // Expansions contain the expansions for a task.
+ Expansions util.Expansions `json:"expansions"`
+ // Parameters contain the parameters for a task.
+ Parameters map[string]string `json:"parameters"`
+ // Vars contain the project variables and parameters.
+ Vars map[string]string `json:"vars"`
+ // PrivateVars contain the project private variables.
+ PrivateVars map[string]bool `json:"private_vars"`
}
diff --git a/apimodels/cedar_models.go b/apimodels/cedar_models.go
index 46c15ce01ca..22782f5c326 100644
--- a/apimodels/cedar_models.go
+++ b/apimodels/cedar_models.go
@@ -5,8 +5,5 @@ type CedarConfig struct {
RPCPort string `json:"rpc_port"`
Username string `json:"username"`
APIKey string `json:"api_key,omitempty"`
-}
-
-type CedarTestResultsTaskInfo struct {
- Failed bool `json:"failed"`
+ Insecure bool `json:"insecure"`
}
diff --git a/apimodels/data_pipes.go b/apimodels/data_pipes.go
new file mode 100644
index 00000000000..6f69559bd25
--- /dev/null
+++ b/apimodels/data_pipes.go
@@ -0,0 +1,10 @@
+package apimodels
+
+// DataPipesConfig represents the API model for the Data-Pipes configuration.
+type DataPipesConfig struct {
+ Host string `json:"host"`
+ Region string `json:"region"`
+ AWSAccessKey string `json:"aws_access_key"`
+ AWSSecretKey string `json:"aws_secret_key"`
+ AWSToken string `json:"aws_token"`
+}
diff --git a/apimodels/task_log.go b/apimodels/task_log.go
index b4f9891b0f9..727c02c5149 100644
--- a/apimodels/task_log.go
+++ b/apimodels/task_log.go
@@ -120,7 +120,7 @@ func GetBuildloggerLogs(ctx context.Context, opts GetBuildloggerLogsOptions) (io
}
logReader, err := buildlogger.Get(ctx, getOpts)
- return logReader, errors.Wrapf(err, "failed to get logs for '%s' from buildlogger, using evergreen logger", opts.TaskID)
+ return logReader, errors.Wrapf(err, "getting logs for '%s' from Buildlogger, using Evergreen logger", opts.TaskID)
}
// ReadBuildloggerToChan parses Cedar buildlogger log lines by message and
diff --git a/apimodels/test_results.go b/apimodels/test_results.go
index ab0fcacc996..d4ff0d4bd59 100644
--- a/apimodels/test_results.go
+++ b/apimodels/test_results.go
@@ -1,290 +1,5 @@
package apimodels
-import (
- "context"
- "encoding/json"
- "fmt"
- "io"
- "net/http"
- "strings"
- "time"
-
- "github.com/evergreen-ci/timber"
- "github.com/evergreen-ci/timber/testresults"
- "github.com/pkg/errors"
-)
-
-// Valid sort by keys.
-const (
- CedarTestResultsSortByStart = testresults.SortByStart
- CedarTestResultsSortByDuration = testresults.SortByDuration
- CedarTestResultsSortByTestName = testresults.SortByTestName
- CedarTestResultsSortByStatus = testresults.SortByStatus
- CedarTestResultsSortByBaseStatus = testresults.SortByBaseStatus
-)
-
-// CedarTestResults represents the expected test results format returned from
-// Cedar.
-type CedarTestResults struct {
- Stats CedarTestResultsStats `json:"stats"`
- Results []CedarTestResult `json:"results"`
-}
-
-// CedarTestResultsStats represents the expected test results stats format
-// returned from Cedar.
-type CedarTestResultsStats struct {
- TotalCount int `json:"total_count"`
- FailedCount int `json:"failed_count"`
- FilteredCount *int `json:"filtered_count"`
-}
-
-// CedarTestResult represents the expected test result format returned from
-// Cedar.
-type CedarTestResult struct {
- TaskID string `json:"task_id"`
- Execution int `json:"execution"`
- TestName string `json:"test_name"`
- DisplayTestName string `json:"display_test_name"`
- GroupID string `json:"group_id"`
- Status string `json:"status"`
- BaseStatus string `json:"base_status"`
- LogTestName string `json:"log_test_name"`
- LogURL string `json:"log_url"`
- RawLogURL string `json:"raw_log_url"`
- LineNum int `json:"line_num"`
- Start time.Time `json:"test_start_time"`
- End time.Time `json:"test_end_time"`
-}
-
-// GetCedarTestResultsOptions represents the arguments for fetching test
-// results and related information via Cedar.
-type GetCedarTestResultsOptions struct {
- BaseURL string `json:"-"`
- TaskID string `json:"-"`
-
- // General query parameters.
- Execution *int `json:"-"`
- DisplayTask bool `json:"-"`
-
- // Filter, sortring, and pagination query parameters specific to
- // fetching test results.
- TestName string `json:"-"`
- Statuses []string `json:"-"`
- GroupID string `json:"-"`
- SortBy string `json:"-"`
- SortOrderDSC bool `json:"-"`
- BaseTaskID string `json:"-"`
- Limit int `json:"-"`
- Page int `json:"-"`
-}
-
-func (opts GetCedarTestResultsOptions) convert() testresults.GetOptions {
- if !strings.HasPrefix(opts.BaseURL, "http") {
- opts.BaseURL = fmt.Sprintf("https://%s", opts.BaseURL)
- }
- return testresults.GetOptions{
- Cedar: timber.GetOptions{
- BaseURL: opts.BaseURL,
- },
- TaskID: opts.TaskID,
- Execution: opts.Execution,
- DisplayTask: opts.DisplayTask,
- TestName: opts.TestName,
- Statuses: opts.Statuses,
- GroupID: opts.GroupID,
- SortBy: opts.SortBy,
- SortOrderDSC: opts.SortOrderDSC,
- BaseTaskID: opts.BaseTaskID,
- Limit: opts.Limit,
- Page: opts.Page,
- }
-}
-
-// GetCedarTestResults makes a request to Cedar for a task's test results.
-func GetCedarTestResults(ctx context.Context, opts GetCedarTestResultsOptions) (*CedarTestResults, int, error) {
- data, status, err := testresults.Get(ctx, opts.convert())
- if err != nil {
- return nil, 0, errors.Wrap(err, "getting test results from Cedar")
- }
-
- testResults := &CedarTestResults{}
- if status != http.StatusOK {
- return testResults, status, nil
- }
-
- return testResults, status, errors.Wrap(json.Unmarshal(data, testResults), "unmarshaling test results from Cedar")
-}
-
-// GetCedarTestResultsWithStatusError makes a request to Cedar for a task's
-// test results. An error is returned if Cedar sends a non-200 HTTP status.
-func GetCedarTestResultsWithStatusError(ctx context.Context, opts GetCedarTestResultsOptions) (*CedarTestResults, error) {
- testResults, status, err := GetCedarTestResults(ctx, opts)
- if err != nil {
- return nil, err
- }
- if status != http.StatusOK {
- return nil, errors.Errorf("getting test results from Cedar returned HTTP status '%d'", status)
- }
-
- return testResults, nil
-}
-
-// GetMultiPageCedarTestResults makes a request to Cedar for a task's test
-// results and returns an io.ReadCloser that will continue fetching and reading
-// subsequent pages of test results if paginated.
-func GetMultiPageCedarTestResults(ctx context.Context, opts GetCedarTestResultsOptions) (io.ReadCloser, int, error) {
- r, status, err := testresults.GetWithPaginatedReadCloser(ctx, opts.convert())
- if err != nil {
- return nil, 0, errors.Wrap(err, "getting test results from Cedar")
- }
-
- return r, status, nil
-}
-
-// GetCedarTestResultsStats makes a request to Cedar for a task's test results
-// stats. This route ignores filtering, sorting, and pagination query
-// parameters.
-func GetCedarTestResultsStats(ctx context.Context, opts GetCedarTestResultsOptions) (*CedarTestResultsStats, int, error) {
- timberOpts := opts.convert()
- timberOpts.Stats = true
- data, status, err := testresults.Get(ctx, timberOpts)
- if err != nil {
- return nil, 0, errors.Wrap(err, "getting test results stats from Cedar")
- }
-
- stats := &CedarTestResultsStats{}
- if status != http.StatusOK {
- return stats, status, nil
- }
-
- return stats, status, errors.Wrap(json.Unmarshal(data, stats), "unmarshaling test results stats from Cedar")
-}
-
-// GetCedarTestResultsStatsWithStatusError makes a request to Cedar for a
-// task's test results stats. This route ignores filtering, sorting, and
-// pagination query parameters. An error is returned if Cedar sends a non-200
-// HTTP status.
-func GetCedarTestResultsStatsWithStatusError(ctx context.Context, opts GetCedarTestResultsOptions) (*CedarTestResultsStats, error) {
- stats, status, err := GetCedarTestResultsStats(ctx, opts)
- if err != nil {
- return nil, err
- }
- if status != http.StatusOK {
- return nil, errors.Errorf("getting test results stats from Cedar returned HTTP status '%d'", status)
- }
-
- return stats, nil
-}
-
-// GetCedarTestResultsFailedSample makes a request to Cedar for a task's failed
-// test result sample. This route ignores filtering, sorting, and pagination
-// query parameters.
-func GetCedarTestResultsFailedSample(ctx context.Context, opts GetCedarTestResultsOptions) ([]string, int, error) {
- timberOpts := opts.convert()
- timberOpts.FailedSample = true
- data, status, err := testresults.Get(ctx, timberOpts)
- if err != nil {
- return nil, 0, errors.Wrap(err, "getting failed test result sample from Cedar")
- }
-
- sample := []string{}
- if status != http.StatusOK {
- return sample, status, nil
- }
-
- return sample, status, errors.Wrap(json.Unmarshal(data, &sample), "unmarshaling failed test result sample from Cedar")
-}
-
-// GetCedarTestResultsFailedSampleWithStatusError makes a request to Cedar for
-// a task's failed test result sample. This route ignores filtering, sorting,
-// and pagination query parameters. An error is returned if Cedar sends a
-// non-200 HTTP status.
-func GetCedarTestResultsFailedSampleWithStatusError(ctx context.Context, opts GetCedarTestResultsOptions) ([]string, error) {
- sample, status, err := GetCedarTestResultsFailedSample(ctx, opts)
- if err != nil {
- return nil, err
- }
- if status != http.StatusOK {
- return nil, errors.Errorf("getting failed test result sample from Cedar returned HTTP status '%d'", status)
- }
-
- return sample, nil
-}
-
-// CedarFailedTestResultsSample is a sample of test names for a given task and execution.
-type CedarFailedTestResultsSample struct {
- TaskID *string `json:"task_id"`
- Execution int `json:"execution"`
- MatchingFailedTestNames []string `json:"matching_failed_test_names"`
- TotalFailedNames int `json:"total_failed_names"`
-}
-
-// GetCedarFailedTestResultsSampleOptions represents the arguments for fetching
-// test names for failed tests via Cedar.
-type GetCedarFailedTestResultsSampleOptions struct {
- BaseURL string
- SampleOptions CedarFailedTestSampleOptions
-}
-
-// CedarFailedTestSampleOptions specifies the tasks to get the sample for
-// and regexes to filter the test names by.
-type CedarFailedTestSampleOptions struct {
- Tasks []CedarTaskInfo
- RegexFilters []string
-}
-
-// CedarTaskInfo specifies a set of test results to find.
-type CedarTaskInfo struct {
- TaskID string
- Execution int
- DisplayTask bool
-}
-
-func (opts GetCedarFailedTestResultsSampleOptions) convert() testresults.GetFailedSampleOptions {
- return testresults.GetFailedSampleOptions{
- Cedar: timber.GetOptions{
- BaseURL: fmt.Sprintf("https://%s", opts.BaseURL),
- },
- SampleOptions: opts.SampleOptions.convert(),
- }
-}
-
-func (opts *CedarFailedTestSampleOptions) convert() testresults.FailedTestSampleOptions {
- tasks := make([]testresults.TaskInfo, 0, len(opts.Tasks))
- for _, t := range opts.Tasks {
- tasks = append(tasks, t.convert())
- }
-
- return testresults.FailedTestSampleOptions{
- Tasks: tasks,
- RegexFilters: opts.RegexFilters,
- }
-}
-
-func (info *CedarTaskInfo) convert() testresults.TaskInfo {
- return testresults.TaskInfo{
- TaskID: info.TaskID,
- Execution: info.Execution,
- DisplayTask: info.DisplayTask,
- }
-}
-
-// GetCedarFilteredFailedSamples makes a request to Cedar for failed
-// test result samples for the specified tasks.
-func GetCedarFilteredFailedSamples(ctx context.Context, opts GetCedarFailedTestResultsSampleOptions) ([]CedarFailedTestResultsSample, error) {
- data, err := testresults.GetFailedSamples(ctx, opts.convert())
- if err != nil {
- return nil, errors.Wrap(err, "getting failed test result samples from Cedar")
- }
-
- samples := []CedarFailedTestResultsSample{}
- if err = json.Unmarshal(data, &samples); err != nil {
- return nil, errors.Wrap(err, "unmarshaling failed test result samples from Cedar")
- }
-
- return samples, nil
-}
-
// DisplayTaskInfo represents information about a display task necessary for
// creating a cedar test result.
type DisplayTaskInfo struct {
diff --git a/auth/auth.go b/auth/auth.go
index 557c21ac8ad..33a524feae9 100644
--- a/auth/auth.go
+++ b/auth/auth.go
@@ -172,6 +172,7 @@ func SetLoginToken(token, domain string, w http.ResponseWriter) {
Path: "/",
Domain: domain,
Expires: time.Now().Add(365 * 24 * time.Hour),
+ Secure: true,
}
http.SetCookie(w, authTokenCookie)
}
diff --git a/auth/github.go b/auth/github.go
index 392d11ab115..dc739445980 100644
--- a/auth/github.go
+++ b/auth/github.go
@@ -147,7 +147,7 @@ func (gum *GithubUserManager) GetLoginCallbackHandler() http.HandlerFunc {
githubResponse, err := thirdparty.GithubAuthenticate(ctx, code, gum.ClientId, gum.ClientSecret)
if err != nil {
- grip.Errorf("Error sending code and authentication info to Github: %+v", err)
+ grip.Errorf("Error sending code and authentication info to GitHub: %+v", err)
return
}
SetLoginToken(githubResponse.AccessToken, gum.LoginDomain, w)
@@ -162,8 +162,8 @@ func (*GithubUserManager) GetOrCreateUser(u gimlet.User) (gimlet.User, error) {
return getOrCreateUser(u)
}
func (*GithubUserManager) ClearUser(u gimlet.User, all bool) error {
- return errors.New("Github Authentication does not support Clear User")
+ return errors.New("GitHub Authentication does not support Clear User")
}
func (*GithubUserManager) GetGroupsForUser(string) ([]string, error) {
- return nil, errors.New("GetGroupsForUser has not yet been implemented for the Github user manager")
+ return nil, errors.New("GetGroupsForUser has not yet been implemented for the GitHub user manager")
}
diff --git a/cloud/cloud.go b/cloud/cloud.go
index e2fd02c9f6d..876f1ea4a11 100644
--- a/cloud/cloud.go
+++ b/cloud/cloud.go
@@ -22,12 +22,9 @@ type ProviderSettings interface {
FromDistroSettings(distro.Distro, string) error
}
-//Manager is an interface which handles creating new hosts or modifying
-//them via some third-party API.
+// Manager is an interface which handles creating new hosts or modifying
+// them via some third-party API.
type Manager interface {
- // Returns a pointer to the manager's configuration settings struct
- GetSettings() ProviderSettings
-
// Load credentials or other settings from the config file
Configure(context.Context, *evergreen.Settings) error
@@ -81,7 +78,7 @@ type Manager interface {
ModifyVolume(context.Context, *host.Volume, *model.VolumeModifyOptions) error
// GetVolumeAttachment gets a volume's attachment
- GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error)
+ GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error)
// CheckInstanceType determines if the given instance type is available in the current region.
CheckInstanceType(context.Context, string) error
@@ -113,8 +110,13 @@ type ContainerManager interface {
// BatchManager is an interface for cloud providers that support batch operations.
type BatchManager interface {
- // GetInstanceStatuses gets the status of a slice of instances.
- GetInstanceStatuses(context.Context, []host.Host) ([]CloudStatus, error)
+ // GetInstanceStatuses gets the statuses of a slice of instances. It returns
+ // a map of the instance IDs to their current status. If some of the
+ // instance statuses cannot be retrieved, implementations are allowed to
+ // either return an error or return StatusNonExistent for those hosts.
+ // If there is no error, implementations should return the same number of
+ // results in the map as there are hosts.
+ GetInstanceStatuses(context.Context, []host.Host) (map[string]CloudStatus, error)
}
// ManagerOpts is a struct containing the fields needed to get a new cloud manager
@@ -126,9 +128,11 @@ type ManagerOpts struct {
ProviderSecret string
}
+// GetSettings returns an uninitialized ProviderSettings based on the given
+// provider.
func GetSettings(provider string) (ProviderSettings, error) {
switch provider {
- case evergreen.ProviderNameEc2OnDemand, evergreen.ProviderNameEc2Spot, evergreen.ProviderNameEc2Auto, evergreen.ProviderNameEc2Fleet:
+ case evergreen.ProviderNameEc2OnDemand, evergreen.ProviderNameEc2Spot, evergreen.ProviderNameEc2Fleet:
return &EC2ProviderSettings{}, nil
case evergreen.ProviderNameStatic:
return &StaticSettings{}, nil
@@ -143,7 +147,7 @@ func GetSettings(provider string) (ProviderSettings, error) {
case evergreen.ProviderNameVsphere:
return &vsphereSettings{}, nil
}
- return nil, errors.Errorf("invalid provider name %s", provider)
+ return nil, errors.Errorf("invalid provider name '%s'", provider)
}
// GetManager returns an implementation of Manager for the given manager options.
@@ -174,17 +178,6 @@ func GetManager(ctx context.Context, env evergreen.Environment, mgrOpts ManagerO
providerSecret: mgrOpts.ProviderSecret,
},
}
- case evergreen.ProviderNameEc2Auto:
- provider = &ec2Manager{
- env: env,
- EC2ManagerOptions: &EC2ManagerOptions{
- client: &awsClientImpl{},
- provider: autoProvider,
- region: mgrOpts.Region,
- providerKey: mgrOpts.ProviderKey,
- providerSecret: mgrOpts.ProviderSecret,
- },
- }
case evergreen.ProviderNameEc2Fleet:
provider = &ec2FleetManager{
env: env,
@@ -210,11 +203,11 @@ func GetManager(ctx context.Context, env evergreen.Environment, mgrOpts ManagerO
case evergreen.ProviderNameVsphere:
provider = &vsphereManager{}
default:
- return nil, errors.Errorf("No known provider for '%s'", mgrOpts.Provider)
+ return nil, errors.Errorf("no known provider '%s'", mgrOpts.Provider)
}
if err := provider.Configure(ctx, env.Settings()); err != nil {
- return nil, errors.Wrap(err, "Failed to configure cloud provider")
+ return nil, errors.Wrap(err, "configuring cloud provider")
}
return provider, nil
@@ -225,7 +218,7 @@ func GetManager(ctx context.Context, env evergreen.Environment, mgrOpts ManagerO
func GetManagerOptions(d distro.Distro) (ManagerOpts, error) {
region := ""
if len(d.ProviderSettingsList) > 1 {
- if IsEc2Provider(d.Provider) {
+ if evergreen.IsEc2Provider(d.Provider) {
// this shouldn't ever happen, but if it does we want to continue so we don't inadvertently block task queues
grip.Error(message.Fields{
"message": "distro should be modified to have only one provider settings",
@@ -238,10 +231,10 @@ func GetManagerOptions(d distro.Distro) (ManagerOpts, error) {
"distro '%s' has multiple provider settings, but is provider '%s'", d.Id, d.Provider)
}
}
- if IsEc2Provider(d.Provider) {
+ if evergreen.IsEc2Provider(d.Provider) {
s := &EC2ProviderSettings{}
if err := s.FromDistroSettings(d, region); err != nil {
- return ManagerOpts{}, errors.Wrapf(err, "error getting EC2 provider settings from distro")
+ return ManagerOpts{}, errors.Wrapf(err, "getting EC2 provider settings from distro")
}
return getEC2ManagerOptionsFromSettings(d.Provider, s), nil
@@ -258,5 +251,12 @@ func ConvertContainerManager(m Manager) (ContainerManager, error) {
if cm, ok := m.(ContainerManager); ok {
return cm, nil
}
- return nil, errors.New("Error converting manager to container manager")
+ return nil, errors.Errorf("programmer error: cannot convert manager %T to container manager", m)
+}
+
+// VolumeAttachment contains information about a volume attached to a host.
+type VolumeAttachment struct {
+ VolumeID string
+ HostID string
+ DeviceName string
}
diff --git a/cloud/cloud_host.go b/cloud/cloud_host.go
index e47a993f32e..ec2d810cec0 100644
--- a/cloud/cloud_host.go
+++ b/cloud/cloud_host.go
@@ -8,9 +8,9 @@ import (
"github.com/pkg/errors"
)
-//CloudHost is a provider-agnostic host object that delegates methods
-//like status checks, ssh options, DNS name checks, termination, etc. to the
-//underlying provider's implementation.
+// CloudHost is a provider-agnostic host object that delegates methods
+// like status checks, ssh options, DNS name checks, termination, etc. to the
+// underlying provider's implementation.
type CloudHost struct {
Host *host.Host
KeyPath string
@@ -22,7 +22,7 @@ type CloudHost struct {
func GetCloudHost(ctx context.Context, host *host.Host, env evergreen.Environment) (*CloudHost, error) {
mgrOpts, err := GetManagerOptions(host.Distro)
if err != nil {
- return nil, errors.Wrapf(err, "can't get ManagerOpts for '%s'", host.Id)
+ return nil, errors.Wrapf(err, "getting cloud manager options for host '%s'", host.Id)
}
mgr, err := GetManager(ctx, env, mgrOpts)
if err != nil {
diff --git a/cloud/cloud_status.go b/cloud/cloud_status.go
index 65438b7a9de..d31df2165d8 100644
--- a/cloud/cloud_status.go
+++ b/cloud/cloud_status.go
@@ -52,7 +52,11 @@ func (stat CloudStatus) String() string {
return "stopped"
case StatusTerminated:
return "terminated"
- default:
+ case StatusNonExistent:
+ return "nonexistent"
+ case StatusUnknown:
return "unknown"
+ default:
+ return "invalid"
}
}
diff --git a/cloud/cloud_test.go b/cloud/cloud_test.go
index 4a2fcbad49c..409c063487e 100644
--- a/cloud/cloud_test.go
+++ b/cloud/cloud_test.go
@@ -17,14 +17,6 @@ func TestGetManager(t *testing.T) {
Convey("GetManager() should return non-nil for all valid provider names", t, func() {
- Convey("EC2Auto should be returned for ec2-auto provider name", func() {
- mgrOpts := ManagerOpts{Provider: evergreen.ProviderNameEc2Auto, ProviderKey: "key", ProviderSecret: "secret"}
- cloudMgr, err := GetManager(ctx, env, mgrOpts)
- So(cloudMgr, ShouldNotBeNil)
- So(err, ShouldBeNil)
- So(cloudMgr, ShouldHaveSameTypeAs, &ec2Manager{})
- })
-
Convey("EC2Spot should be returned for ec2-spot provider name", func() {
mgrOpts := ManagerOpts{Provider: evergreen.ProviderNameEc2Spot, ProviderKey: "key", ProviderSecret: "secret"}
cloudMgr, err := GetManager(ctx, env, mgrOpts)
@@ -78,6 +70,6 @@ func TestConvertContainerManager(t *testing.T) {
assert.IsType(&dockerManager{}, cm1)
cm2, err := ConvertContainerManager(m2)
- assert.EqualError(err, "Error converting manager to container manager")
+ assert.Error(err)
assert.Nil(cm2)
}
diff --git a/cloud/docker.go b/cloud/docker.go
index c9fe9649077..b97084ff694 100644
--- a/cloud/docker.go
+++ b/cloud/docker.go
@@ -10,11 +10,9 @@ import (
"github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/host"
"github.com/evergreen-ci/evergreen/rest/model"
- "github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
"github.com/pkg/errors"
- "go.mongodb.org/mongo-driver/bson"
)
// dockerManager implements the Manager interface for Docker.
@@ -23,50 +21,20 @@ type dockerManager struct {
env evergreen.Environment
}
-// ProviderSettings specifies the settings used to configure a host instance.
-type dockerSettings struct {
- // ImageURL is the url of the Docker image to use when building the container.
- ImageURL string `mapstructure:"image_url" json:"image_url" bson:"image_url"`
-}
-
-// nolint
-var (
- // bson fields for the ProviderSettings struct
- imageURLKey = bsonutil.MustHaveTag(dockerSettings{}, "ImageURL")
-)
-
-// Validate checks that the settings from the config file are sane.
-func (settings *dockerSettings) Validate() error {
- if settings.ImageURL == "" {
- return errors.New("Image must not be empty")
- }
+// dockerSettings are an empty placeholder to fulfill the ProviderSettings
+// interface.
+type dockerSettings struct{}
- return nil
-}
-
-func (s *dockerSettings) FromDistroSettings(d distro.Distro, _ string) error {
- if len(d.ProviderSettingsList) != 0 {
- bytes, err := d.ProviderSettingsList[0].MarshalBSON()
- if err != nil {
- return errors.Wrap(err, "error marshalling provider setting into bson")
- }
- if err := bson.Unmarshal(bytes, s); err != nil {
- return errors.Wrap(err, "error unmarshalling bson into provider settings")
- }
- }
- return nil
-}
+// Validate is a no-op.
+func (*dockerSettings) Validate() error { return nil }
-// GetSettings returns an empty ProviderSettings struct.
-func (*dockerManager) GetSettings() ProviderSettings {
- return &dockerSettings{}
-}
+// FromDistroSettings is a no-op.
+func (*dockerSettings) FromDistroSettings(distro.Distro, string) error { return nil }
// SpawnHost creates and starts a new Docker container
func (m *dockerManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
- if !IsDockerProvider(h.Distro.Provider) {
- return nil, errors.Errorf("Can't spawn instance of %s for distro %s: provider is %s",
- evergreen.ProviderNameDocker, h.Distro.Id, h.Distro.Provider)
+ if !evergreen.IsDockerProvider(h.Distro.Provider) {
+ return nil, errors.Errorf("can't spawn instance of provider '%s' for distro '%s': distro provider is '%s'", evergreen.ProviderNameDocker, h.Distro.Id, h.Distro.Provider)
}
if err := h.DockerOptions.Validate(); err != nil {
@@ -76,16 +44,16 @@ func (m *dockerManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host
// get parent of host
parentHost, err := h.GetParent()
if err != nil {
- return nil, errors.Wrapf(err, "Error finding parent of host '%s'", h.Id)
+ return nil, errors.Wrapf(err, "finding parent of host '%s'", h.Id)
}
hostIP := parentHost.Host
if hostIP == "" {
- return nil, errors.Wrapf(err, "Error getting host IP for parent host %s", parentHost.Id)
+ return nil, errors.Wrapf(err, "getting host IP for parent host '%s'", parentHost.Id)
}
// Create container
if err = m.client.CreateContainer(ctx, parentHost, h); err != nil {
- err = errors.Wrapf(err, "Failed to create container for host '%s'", h.Id)
+ err = errors.Wrapf(err, "creating container for host '%s'", h.Id)
grip.Info(message.WrapError(err, message.Fields{
"message": "spawn container host failed",
"host_id": h.Id,
@@ -94,26 +62,27 @@ func (m *dockerManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host
}
if err = h.SetAgentRevision(evergreen.AgentVersion); err != nil {
- return nil, errors.Wrapf(err, "error setting agent revision on host %s", h.Id)
+ return nil, errors.Wrapf(err, "setting agent revision on host '%s' to '%s'", h.Id, evergreen.AgentVersion)
}
// The setup was successful. Update the container host accordingly in the database.
if err := h.MarkAsProvisioned(); err != nil {
- return nil, errors.Wrapf(err, "error marking host %s as provisioned", h.Id)
+ return nil, errors.Wrapf(err, "marking host '%s' as provisioned", h.Id)
}
// Start container
if err := m.client.StartContainer(ctx, parentHost, h.Id); err != nil {
- err = errors.Wrapf(err, "Docker start container API call failed for host '%s'", hostIP)
+ catcher := grip.NewBasicCatcher()
+ catcher.Wrapf(err, "starting container for host '%s'", hostIP)
// Clean up
- if err2 := m.client.RemoveContainer(ctx, parentHost, h.Id); err2 != nil {
- err = errors.Wrapf(err, "Unable to cleanup: %+v", err2)
+ if err := m.client.RemoveContainer(ctx, parentHost, h.Id); err != nil {
+ catcher.Wrap(err, "removing container due to failure to start container")
}
- grip.Info(message.WrapError(err, message.Fields{
+ grip.Info(message.WrapError(catcher.Resolve(), message.Fields{
"message": "start container host failed",
"host_id": h.Id,
}))
- return nil, err
+ return nil, catcher.Resolve()
}
grip.Info(message.Fields{
@@ -134,7 +103,7 @@ func (m *dockerManager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cl
// get parent of container host
parent, err := h.GetParent()
if err != nil {
- return StatusUnknown, errors.Wrapf(err, "Error retrieving parent of host '%s'", h.Id)
+ return StatusUnknown, errors.Wrapf(err, "retrieving parent of host '%s'", h.Id)
}
container, err := m.client.GetContainer(ctx, parent, h.Id)
@@ -145,7 +114,7 @@ func (m *dockerManager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cl
if client.IsErrNotFound(err) {
return StatusNonExistent, nil
}
- return StatusUnknown, errors.Wrapf(err, "Failed to get container information for host '%s'", h.Id)
+ return StatusUnknown, errors.Wrapf(err, "getting container information for host '%s'", h.Id)
}
return toEvgStatus(container.State), nil
}
@@ -154,9 +123,9 @@ func (m *dockerManager) SetPortMappings(ctx context.Context, h, parent *host.Hos
container, err := m.client.GetContainer(ctx, parent, h.Id)
if err != nil {
if client.IsErrConnectionFailed(err) {
- return errors.Wrapf(err, "error making connection")
+ return errors.Wrapf(err, "making connection")
}
- return errors.Wrapf(err, "Failed to get container information for host '%s'", h.Id)
+ return errors.Wrapf(err, "getting container information for host '%s'", h.Id)
}
if !container.State.Running {
return errors.Errorf("host '%s' is not running", h.Id)
@@ -164,7 +133,7 @@ func (m *dockerManager) SetPortMappings(ctx context.Context, h, parent *host.Hos
}
if err = h.SetPortMapping(host.GetPortMap(container.NetworkSettings.Ports)); err != nil {
- return errors.Wrapf(err, "error saving ports to host '%s", h.Id)
+ return errors.Wrapf(err, "saving ports to host '%s", h.Id)
}
return nil
}
@@ -174,21 +143,19 @@ func (m *dockerManager) GetDNSName(ctx context.Context, h *host.Host) (string, e
return "", nil
}
-//TerminateInstance destroys a container.
+// TerminateInstance destroys a container.
func (m *dockerManager) TerminateInstance(ctx context.Context, h *host.Host, user, reason string) error {
if h.Status == evergreen.HostTerminated {
- err := errors.Errorf("Can not terminate %s - already marked as terminated!", h.Id)
- return err
+ return errors.Errorf("cannot terminate host '%s' because it's already marked as terminated", h.Id)
}
- // get parent of container host
parent, err := h.GetParent()
if err != nil {
- return errors.Wrapf(err, "Error retrieving parent for host '%s'", h.Id)
+ return errors.Wrapf(err, "retrieving parent for host '%s'", h.Id)
}
if err := m.client.RemoveContainer(ctx, parent, h.Id); err != nil {
- return errors.Wrap(err, "API call to remove container failed")
+ return errors.Wrap(err, "removing container")
}
grip.Info(message.Fields{
@@ -201,15 +168,15 @@ func (m *dockerManager) TerminateInstance(ctx context.Context, h *host.Host, use
}
func (m *dockerManager) StopInstance(ctx context.Context, host *host.Host, user string) error {
- return errors.New("StopInstance is not supported for docker provider")
+ return errors.New("StopInstance is not supported for Docker provider")
}
func (m *dockerManager) StartInstance(ctx context.Context, host *host.Host, user string) error {
- return errors.New("StartInstance is not supported for docker provider")
+ return errors.New("StartInstance is not supported for Docker provider")
}
-//Configure populates a dockerManager by reading relevant settings from the
-//config object.
+// Configure populates a dockerManager by reading relevant settings from the
+// config object.
func (m *dockerManager) Configure(ctx context.Context, s *evergreen.Settings) error {
config := s.Providers.Docker
@@ -218,18 +185,18 @@ func (m *dockerManager) Configure(ctx context.Context, s *evergreen.Settings) er
}
if err := m.client.Init(config.APIVersion); err != nil {
- return errors.Wrap(err, "Failed to initialize client connection")
+ return errors.Wrap(err, "initializing Docker client connection")
}
if m.env == nil {
- return errors.New("docker manager requires access to the evergreen environment")
+ return errors.New("Docker manager requires a non-nil Evergreen environment")
}
return nil
}
-//IsUp checks the container's state by querying the Docker API and
-//returns true if the host should be available to connect with SSH.
+// IsUp checks the container's state by querying the Docker API and
+// returns true if the host should be available to connect with SSH.
func (m *dockerManager) IsUp(ctx context.Context, h *host.Host) (bool, error) {
cloudStatus, err := m.GetInstanceStatus(ctx, h)
if err != nil {
@@ -249,31 +216,31 @@ func (m *dockerManager) Cleanup(context.Context) error {
}
func (m *dockerManager) AttachVolume(context.Context, *host.Host, *host.VolumeAttachment) error {
- return errors.New("can't attach volume with docker provider")
+ return errors.New("can't attach volume with Docker provider")
}
func (m *dockerManager) DetachVolume(context.Context, *host.Host, string) error {
- return errors.New("can't detach volume with docker provider")
+ return errors.New("can't detach volume with Docker provider")
}
func (m *dockerManager) CreateVolume(context.Context, *host.Volume) (*host.Volume, error) {
- return nil, errors.New("can't create volume with docker provider")
+ return nil, errors.New("can't create volume with Docker provider")
}
func (m *dockerManager) DeleteVolume(context.Context, *host.Volume) error {
- return errors.New("can't delete volume with docker provider")
+ return errors.New("can't delete volume with Docker provider")
}
func (m *dockerManager) ModifyVolume(context.Context, *host.Volume, *model.VolumeModifyOptions) error {
- return errors.New("can't modify volume with docker provider")
+ return errors.New("can't modify volume with Docker provider")
}
-func (m *dockerManager) GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error) {
- return nil, errors.New("can't get volume attachment with docker provider")
+func (m *dockerManager) GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error) {
+ return nil, errors.New("can't get volume attachment with Docker provider")
}
func (m *dockerManager) CheckInstanceType(context.Context, string) error {
- return errors.New("can't specify instance type with docker provider")
+ return errors.New("can't specify instance type with Docker provider")
}
// TimeTilNextPayment returns the amount of time until the next payment is due
@@ -285,7 +252,7 @@ func (m *dockerManager) TimeTilNextPayment(_ *host.Host) time.Duration {
func (m *dockerManager) GetContainers(ctx context.Context, h *host.Host) ([]string, error) {
containers, err := m.client.ListContainers(ctx, h)
if err != nil {
- return nil, errors.Wrap(err, "error listing containers")
+ return nil, errors.Wrap(err, "listing containers")
}
ids := []string{}
@@ -293,7 +260,7 @@ func (m *dockerManager) GetContainers(ctx context.Context, h *host.Host) ([]stri
name := container.Names[0]
// names in Docker have leading slashes -- https://github.com/moby/moby/issues/6705
if !strings.HasPrefix(name, "/") {
- return nil, errors.New("error reading container name")
+ return nil, errors.New("container name should have leading slash")
}
name = name[1:]
ids = append(ids, name)
@@ -306,7 +273,7 @@ func (m *dockerManager) GetContainers(ctx context.Context, h *host.Host) ([]stri
func (m *dockerManager) canImageBeRemoved(ctx context.Context, h *host.Host, imageID string) (bool, error) {
containers, err := m.client.ListContainers(ctx, h)
if err != nil {
- return false, errors.Wrap(err, "error listing containers")
+ return false, errors.Wrap(err, "listing containers")
}
for _, container := range containers {
@@ -322,20 +289,20 @@ func (m *dockerManager) RemoveOldestImage(ctx context.Context, h *host.Host) err
// list images in order of most to least recently created
images, err := m.client.ListImages(ctx, h)
if err != nil {
- return errors.Wrap(err, "Error listing images")
+ return errors.Wrap(err, "listing images")
}
for i := len(images) - 1; i >= 0; i-- {
id := images[i].ID
canBeRemoved, err := m.canImageBeRemoved(ctx, h, id)
if err != nil {
- return errors.Wrapf(err, "Error checking whether containers are running on image '%s'", id)
+ return errors.Wrapf(err, "checking whether containers are running on image '%s'", id)
}
// remove image based on ID only if there are no containers running the image
if canBeRemoved {
err = m.client.RemoveImage(ctx, h, id)
if err != nil {
- return errors.Wrapf(err, "Error removing image '%s'", id)
+ return errors.Wrapf(err, "removing image '%s'", id)
}
return nil
}
@@ -347,7 +314,7 @@ func (m *dockerManager) RemoveOldestImage(ctx context.Context, h *host.Host) err
func (m *dockerManager) CalculateImageSpaceUsage(ctx context.Context, h *host.Host) (int64, error) {
images, err := m.client.ListImages(ctx, h)
if err != nil {
- return 0, errors.Wrap(err, "Error listing images")
+ return 0, errors.Wrap(err, "listing images")
}
spaceBytes := int64(0)
@@ -361,13 +328,13 @@ func (m *dockerManager) CalculateImageSpaceUsage(ctx context.Context, h *host.Ho
func (m *dockerManager) GetContainerImage(ctx context.Context, parent *host.Host, options host.DockerOptions) error {
start := time.Now()
if !parent.HasContainers {
- return errors.Errorf("Error provisioning image: '%s' is not a parent", parent.Id)
+ return errors.Errorf("host '%s' is not a container parent", parent.Id)
}
// Import correct base image if not already on host.
image, err := m.client.EnsureImageDownloaded(ctx, parent, options)
if err != nil {
- return errors.Wrapf(err, "Unable to ensure that image '%s' is on host '%s'", options.Image, parent.Id)
+ return errors.Wrapf(err, "ensuring that image '%s' is downloaded on host '%s'", options.Image, parent.Id)
}
grip.Info(message.Fields{
"operation": "EnsureImageDownloaded",
@@ -385,7 +352,7 @@ func (m *dockerManager) GetContainerImage(ctx context.Context, parent *host.Host
// Build image containing Evergreen executable.
_, err = m.client.BuildImageWithAgent(ctx, parent, image)
if err != nil {
- return errors.Wrapf(err, "Failed to build image '%s' with agent on host '%s'", options.Image, parent.Id)
+ return errors.Wrapf(err, "building image '%s' with agent on host '%s'", options.Image, parent.Id)
}
grip.Info(message.Fields{
"operation": "BuildImageWithAgent",
diff --git a/cloud/docker_client.go b/cloud/docker_client.go
index d4694724b29..7b771f27f7a 100644
--- a/cloud/docker_client.go
+++ b/cloud/docker_client.go
@@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
- "io/ioutil"
"net/http"
"path"
"path/filepath"
@@ -210,7 +209,7 @@ func (c *dockerClientImpl) importImage(ctx context.Context, h *host.Host, name,
}
// Wait until ImageImport finishes
- _, err = ioutil.ReadAll(resp)
+ _, err = io.ReadAll(resp)
if err != nil {
return errors.Wrap(err, "Error reading ImageImport response")
}
@@ -245,7 +244,7 @@ func (c *dockerClientImpl) pullImage(ctx context.Context, h *host.Host, url, use
if err != nil {
return errors.Wrap(err, "error pulling image from registry")
}
- _, err = ioutil.ReadAll(resp)
+ _, err = io.ReadAll(resp)
if err != nil {
return errors.Wrap(err, "error reading image pull response")
}
@@ -317,7 +316,7 @@ func (c *dockerClientImpl) BuildImageWithAgent(ctx context.Context, h *host.Host
// wait for ImageBuild to complete -- success response otherwise returned
// before building from Dockerfile is over, and next ContainerCreate will fail
- _, err = ioutil.ReadAll(resp.Body)
+ _, err = io.ReadAll(resp.Body)
if err != nil {
return "", errors.Wrap(err, "Error reading ImageBuild response")
}
@@ -498,18 +497,17 @@ func (c *dockerClientImpl) ListImages(ctx context.Context, h *host.Host) ([]type
func (c *dockerClientImpl) RemoveImage(ctx context.Context, h *host.Host, imageID string) error {
dockerClient, err := c.generateClient(h)
if err != nil {
- return errors.Wrap(err, "Failed to generate docker client")
+ return errors.Wrap(err, "generating Docker client")
}
opts := types.ImageRemoveOptions{Force: true}
removed, err := dockerClient.ImageRemove(ctx, imageID, opts)
if err != nil {
- err = errors.Wrapf(err, "Failed to remove image '%s'", imageID)
- return err
+ return errors.Wrapf(err, "removing image '%s'", imageID)
}
// check to make sure an image was removed
if len(removed) <= 0 {
- return errors.Errorf("Failed to remove image '%s'", imageID)
+ return errors.Errorf("image '%s' was not removed", imageID)
}
return nil
}
@@ -518,12 +516,12 @@ func (c *dockerClientImpl) RemoveImage(ctx context.Context, h *host.Host, imageI
func (c *dockerClientImpl) RemoveContainer(ctx context.Context, h *host.Host, containerID string) error {
dockerClient, err := c.generateClient(h)
if err != nil {
- return errors.Wrap(err, "Failed to generate docker client")
+ return errors.Wrap(err, "generating Docker client")
}
opts := types.ContainerRemoveOptions{Force: true}
if err = dockerClient.ContainerRemove(ctx, containerID, opts); err != nil {
- return errors.Wrapf(err, "Failed to remove container '%s'", containerID)
+ return errors.Wrapf(err, "removing container '%s'", containerID)
}
return nil
@@ -533,12 +531,12 @@ func (c *dockerClientImpl) RemoveContainer(ctx context.Context, h *host.Host, co
func (c *dockerClientImpl) StartContainer(ctx context.Context, h *host.Host, containerID string) error {
dockerClient, err := c.generateClient(h)
if err != nil {
- return errors.Wrap(err, "Failed to generate docker client")
+ return errors.Wrap(err, "generating Docker client")
}
opts := types.ContainerStartOptions{}
if err := dockerClient.ContainerStart(ctx, containerID, opts); err != nil {
- return errors.Wrapf(err, "Failed to start container '%s'", containerID)
+ return errors.Wrapf(err, "starting container '%s'", containerID)
}
return nil
diff --git a/cloud/docker_integration_test.go b/cloud/docker_integration_test.go
index 8f48c4711d5..682aebe8ad9 100644
--- a/cloud/docker_integration_test.go
+++ b/cloud/docker_integration_test.go
@@ -29,7 +29,7 @@ func TestDockerIntegrationSuite(t *testing.T) {
t.Skip()
}
settings := testutil.TestConfig()
- testutil.ConfigureIntegrationTest(t, settings, "TestDockerIntegrationSuite")
+ testutil.ConfigureIntegrationTest(t, settings, t.Name())
s := &DockerIntegrationSuite{
host: host.Host{
Host: dns,
diff --git a/cloud/docker_test.go b/cloud/docker_test.go
index 10b34922515..f354ce38e4c 100644
--- a/cloud/docker_test.go
+++ b/cloud/docker_test.go
@@ -174,7 +174,7 @@ func (s *DockerSuite) TestSpawnInvalidSettings() {
defer cancel()
ec2HostOps := s.hostOpts
- ec2HostOps.Distro.Provider = evergreen.ProviderNameEc2Auto
+ ec2HostOps.Distro.Provider = evergreen.ProviderNameEc2Fleet
h := host.NewIntent(ec2HostOps)
h, err := s.manager.SpawnHost(ctx, h)
s.Error(err)
@@ -371,7 +371,8 @@ func (s *DockerSuite) TestGetContainerImageFailedDownload() {
s.Equal("parent", parent.Id)
err = s.manager.GetContainerImage(ctx, parent, host.DockerOptions{Image: "image-url", Method: distro.DockerImageBuildTypeImport})
- s.EqualError(err, "Unable to ensure that image 'image-url' is on host 'parent': failed to download image")
+ s.Require().Error(err)
+ s.Contains(err.Error(), "failed to download image")
}
func (s *DockerSuite) TestGetContainerImageFailedBuild() {
@@ -388,5 +389,6 @@ func (s *DockerSuite) TestGetContainerImageFailedBuild() {
s.Equal("parent", parent.Id)
err = s.manager.GetContainerImage(ctx, parent, host.DockerOptions{Image: "image-url", Method: distro.DockerImageBuildTypeImport})
- s.EqualError(err, "Failed to build image 'image-url' with agent on host 'parent': failed to build image with agent")
+ s.Require().Error(err)
+ s.Contains(err.Error(), "failed to build image with agent")
}
diff --git a/cloud/ec2.go b/cloud/ec2.go
index 680945f138b..f46280b6b80 100644
--- a/cloud/ec2.go
+++ b/cloud/ec2.go
@@ -62,6 +62,9 @@ type EC2ProviderSettings struct {
// SecurityGroupIDs is a list of security group IDs.
SecurityGroupIDs []string `mapstructure:"security_group_ids" json:"security_group_ids,omitempty" bson:"security_group_ids,omitempty"`
+ // IAMInstanceProfileARN is the Amazon Resource Name (ARN) of the instance profile.
+ IAMInstanceProfileARN string `mapstructure:"iam_instance_profile_arn,omitempty" json:"iam_instance_profile_arn,omitempty" bson:"iam_instance_profile_arn,omitempty"`
+
// SubnetId is only set in a VPC. Either subnet id or vpc name must set.
SubnetId string `mapstructure:"subnet_id" json:"subnet_id,omitempty" bson:"subnet_id,omitempty"`
@@ -109,11 +112,11 @@ func (s *EC2ProviderSettings) Validate() error {
}
if s.BidPrice < 0 {
- catcher.New("Bid price must not be negative")
+ catcher.New("bid price must not be negative")
}
if s.IsVpc && s.SubnetId == "" {
- catcher.New("must set a default subnet for a vpc")
+ catcher.New("must set a default subnet for a VPC")
}
_, err := makeBlockDeviceMappings(s.MountPoints)
@@ -124,7 +127,7 @@ func (s *EC2ProviderSettings) Validate() error {
catcher.Wrap(err, "user data is malformed")
}
- catcher.Wrap(s.FleetOptions.validate(), "invalid Fleet options")
+ catcher.Wrap(s.FleetOptions.validate(), "invalid fleet options")
return catcher.Resolve()
}
@@ -145,11 +148,11 @@ func (s *EC2ProviderSettings) ToDocument() (*birch.Document, error) {
s.Region = s.getRegion()
bytes, err := bson.Marshal(s)
if err != nil {
- return nil, errors.Wrap(err, "error marshalling provider setting into bson")
+ return nil, errors.Wrap(err, "marshalling provider setting into BSON")
}
doc := birch.Document{}
if err = doc.UnmarshalBSON(bytes); err != nil {
- return nil, errors.Wrap(err, "error umarshalling settings bytes into document")
+ return nil, errors.Wrap(err, "umarshalling settings bytes into document")
}
return &doc, nil
}
@@ -157,10 +160,10 @@ func (s *EC2ProviderSettings) ToDocument() (*birch.Document, error) {
func (s *EC2ProviderSettings) FromDocument(doc *birch.Document) error {
bytes, err := doc.MarshalBSON()
if err != nil {
- return errors.Wrap(err, "error marshalling provider setting into bson")
+ return errors.Wrap(err, "marshalling provider setting into BSON")
}
if err := bson.Unmarshal(bytes, s); err != nil {
- return errors.Wrap(err, "error unmarshalling bson into provider settings")
+ return errors.Wrap(err, "unmarshalling BSON into EC2 provider settings")
}
return nil
}
@@ -222,7 +225,6 @@ type ec2ProviderType int
const (
onDemandProvider ec2ProviderType = iota
spotProvider
- autoProvider
)
const (
@@ -233,6 +235,8 @@ const (
SpotStatusFailed = "failed"
EC2ErrorSpotRequestNotFound = "InvalidSpotInstanceRequestID.NotFound"
+
+ defaultIops = 3000
)
const (
@@ -243,7 +247,8 @@ const (
const (
VolumeTypeStandard = "standard"
- VolumeTypeIo2 = "io1"
+ VolumeTypeIo1 = "io1"
+ VolumeTypeGp3 = "gp3"
VolumeTypeGp2 = "gp2"
VolumeTypeSc1 = "sc1"
VolumeTypeSt1 = "st1"
@@ -252,7 +257,8 @@ const (
var (
ValidVolumeTypes = []string{
VolumeTypeStandard,
- VolumeTypeIo2,
+ VolumeTypeIo1,
+ VolumeTypeGp3,
VolumeTypeGp2,
VolumeTypeSc1,
VolumeTypeSt1,
@@ -285,11 +291,6 @@ type ec2Manager struct {
settings *evergreen.Settings
}
-// GetSettings returns a pointer to the manager's configuration settings struct.
-func (m *ec2Manager) GetSettings() ProviderSettings {
- return &EC2ProviderSettings{}
-}
-
// Configure loads credentials or other settings from the config file.
func (m *ec2Manager) Configure(ctx context.Context, settings *evergreen.Settings) error {
m.settings = settings
@@ -301,7 +302,7 @@ func (m *ec2Manager) Configure(ctx context.Context, settings *evergreen.Settings
var err error
m.providerKey, m.providerSecret, err = GetEC2Key(settings)
if err != nil {
- return errors.Wrap(err, "Problem getting EC2 keys")
+ return errors.Wrap(err, "getting EC2 keys")
}
if m.providerKey == "" || m.providerSecret == "" {
return errors.New("provider key/secret can't be empty")
@@ -326,6 +327,10 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
TagSpecifications: makeTagSpecifications(makeTags(h)),
}
+ if ec2Settings.IAMInstanceProfileARN != "" {
+ input.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{Arn: aws.String(ec2Settings.IAMInstanceProfileARN)}
+ }
+
if ec2Settings.IsVpc {
input.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{
{
@@ -345,7 +350,7 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
if ec2Settings.UserData != "" {
expanded, err := expandUserData(ec2Settings.UserData, m.settings.Expansions)
if err != nil {
- return errors.Wrap(err, "problem expanding user data")
+ return errors.Wrap(err, "expanding user data")
}
ec2Settings.UserData = expanded
}
@@ -359,7 +364,7 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
settings.ServiceFlags = *flags
userData, err := makeUserData(ctx, &settings, h, ec2Settings.UserData, ec2Settings.MergeUserDataParts)
if err != nil {
- return errors.Wrap(err, "could not make user data")
+ return errors.Wrap(err, "making user data")
}
ec2Settings.UserData = userData
@@ -383,7 +388,7 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
if err == EC2InsufficientCapacityError {
// try again in another AZ
if subnetErr := m.setNextSubnet(ctx, h); subnetErr == nil {
- msg := "got EC2InsufficientCapacityError"
+ msg := "got EC2InsufficientCapacityError, will try next available subnet"
grip.Info(message.Fields{
"message": msg,
"action": "retrying",
@@ -409,27 +414,7 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
"distro": h.Distro.Id,
}))
}
- grip.WarningWhen(err == EC2InsufficientCapacityError, message.WrapError(err, message.Fields{
- "message": "RunInstances API call encountered insufficient capacity",
- "action": "removing",
- "host_id": h.Id,
- "host_provider": h.Distro.Provider,
- "distro": h.Distro.Id,
- }))
- msg := "RunInstances API call returned an error"
- grip.ErrorWhen(err != EC2InsufficientCapacityError, message.WrapError(err, message.Fields{
- "message": msg,
- "action": "removing",
- "host_id": h.Id,
- "host_provider": h.Distro.Provider,
- "distro": h.Distro.Id,
- }))
- grip.Error(message.WrapError(h.Remove(), message.Fields{
- "message": "error removing intent host",
- "host_id": h.Id,
- "host_provider": h.Distro.Provider,
- "distro": h.Distro.Id,
- }))
+
if h.SpawnOptions.SpawnedByTask {
detailErr := task.AddHostCreateDetails(h.StartedBy, h.Id, h.SpawnOptions.TaskExecutionNumber, err)
grip.Error(message.WrapError(detailErr, message.Fields{
@@ -439,10 +424,12 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
"distro": h.Distro.Id,
}))
}
+
if err != nil {
- return errors.Wrap(err, msg)
+ return errors.Wrap(err, "RunInstances API call returned an error")
}
- msg = "reservation was nil"
+
+ msg := "reservation was nil"
grip.Error(message.Fields{
"message": msg,
"host_id": h.Id,
@@ -480,12 +467,12 @@ func (m *ec2Manager) spawnOnDemandHost(ctx context.Context, h *host.Host, ec2Set
func (m *ec2Manager) setNextSubnet(ctx context.Context, h *host.Host) error {
ec2Settings := &EC2ProviderSettings{}
if err := ec2Settings.FromDistroSettings(h.Distro, m.region); err != nil {
- return errors.Wrap(err, "can't get provider settings")
+ return errors.Wrap(err, "getting provider settings")
}
supportingSubnets, err := typeCache.subnetsWithInstanceType(ctx, m.settings, m.client, instanceRegionPair{instanceType: h.InstanceType, region: ec2Settings.getRegion()})
if err != nil {
- return errors.Wrapf(err, "can't get supported subnets for instance type '%s'", h.InstanceType)
+ return errors.Wrapf(err, "getting supported subnets for instance type '%s'", h.InstanceType)
}
if len(supportingSubnets) == 0 {
return errors.Errorf("instance type '%s' is not supported by any configured subnet for region '%s'", h.InstanceType, ec2Settings.getRegion())
@@ -506,7 +493,7 @@ func (m *ec2Manager) setNextSubnet(ctx context.Context, h *host.Host) error {
ec2Settings.SubnetId = supportingSubnets[nextSubnetIndex%len(supportingSubnets)].SubnetID
newSettingsDocument, err := ec2Settings.ToDocument()
if err != nil {
- return errors.Wrap(err, "can't convert provider settings to document")
+ return errors.Wrap(err, "convert provider settings to document")
}
return h.UpdateCachedDistroProviderSettings([]*birch.Document{newSettingsDocument})
@@ -524,6 +511,10 @@ func (m *ec2Manager) spawnSpotHost(ctx context.Context, h *host.Host, ec2Setting
},
}
+ if ec2Settings.IAMInstanceProfileARN != "" {
+ spotRequest.LaunchSpecification.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{Arn: aws.String(ec2Settings.IAMInstanceProfileARN)}
+ }
+
if ec2Settings.IsVpc {
spotRequest.LaunchSpecification.NetworkInterfaces = []*ec2.InstanceNetworkInterfaceSpecification{
{
@@ -543,7 +534,7 @@ func (m *ec2Manager) spawnSpotHost(ctx context.Context, h *host.Host, ec2Setting
if ec2Settings.UserData != "" {
expanded, err := expandUserData(ec2Settings.UserData, m.settings.Expansions)
if err != nil {
- return errors.Wrap(err, "problem expanding user data")
+ return errors.Wrap(err, "expanding user data")
}
ec2Settings.UserData = expanded
}
@@ -557,7 +548,7 @@ func (m *ec2Manager) spawnSpotHost(ctx context.Context, h *host.Host, ec2Setting
settings.ServiceFlags = *flags
userData, err := makeUserData(ctx, &settings, h, ec2Settings.UserData, ec2Settings.MergeUserDataParts)
if err != nil {
- return errors.Wrap(err, "could not make user data")
+ return errors.Wrap(err, "making user data")
}
ec2Settings.UserData = userData
@@ -585,7 +576,7 @@ func (m *ec2Manager) spawnSpotHost(ctx context.Context, h *host.Host, ec2Setting
"distro": h.Distro.Id,
}))
}
- grip.Error(errors.Wrapf(h.Remove(), "error removing intent host %s", h.Id))
+ grip.Error(errors.Wrapf(h.Remove(), "removing intent host '%s'", h.Id))
return errors.Wrap(err, "RequestSpotInstances API call returned an error")
}
@@ -598,7 +589,7 @@ func (m *ec2Manager) spawnSpotHost(ctx context.Context, h *host.Host, ec2Setting
"distro": h.Distro.Id,
}))
}
- err = errors.Errorf("Spot request %s was found in state %s on intent host %s",
+ err = errors.Errorf("spot request '%s' was found in state '%s' on intent host '%s'",
*spotReqRes.SpotInstanceRequestId, *spotReqRes.State, h.Id)
return err
}
@@ -610,24 +601,23 @@ func (m *ec2Manager) spawnSpotHost(ctx context.Context, h *host.Host, ec2Setting
// SpawnHost spawns a new host.
func (m *ec2Manager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
if h.Distro.Provider != evergreen.ProviderNameEc2OnDemand &&
- h.Distro.Provider != evergreen.ProviderNameEc2Spot &&
- h.Distro.Provider != evergreen.ProviderNameEc2Auto {
- return nil, errors.Errorf("Can't spawn instance for distro %s: provider is %s",
+ h.Distro.Provider != evergreen.ProviderNameEc2Spot {
+ return nil, errors.Errorf("can't spawn EC2 instance for distro '%s': distro provider is '%s'",
h.Distro.Id, h.Distro.Provider)
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return nil, errors.Wrap(err, "error creating client")
+ return nil, errors.Wrap(err, "creating client")
}
defer m.client.Close()
ec2Settings := &EC2ProviderSettings{}
err := ec2Settings.FromDistroSettings(h.Distro, m.region)
if err != nil {
- return nil, errors.Wrap(err, "error getting EC2 settings")
+ return nil, errors.Wrap(err, "getting EC2 settings")
}
if err = ec2Settings.Validate(); err != nil {
- return nil, errors.Wrapf(err, "Invalid EC2 settings in distro %s: %+v", h.Distro.Id, ec2Settings)
+ return nil, errors.Wrapf(err, "invalid EC2 settings in distro %s: %+v", h.Distro.Id, ec2Settings)
}
if ec2Settings.KeyName == "" && !h.UserHost {
if !h.SpawnOptions.SpawnedByTask {
@@ -636,14 +626,14 @@ func (m *ec2Manager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, e
var k string
k, err = m.client.GetKey(ctx, h)
if err != nil {
- return nil, errors.Wrap(err, "not spawning host, problem creating key")
+ return nil, errors.Wrap(err, "getting key name")
}
ec2Settings.KeyName = k
}
blockDevices, err := makeBlockDeviceMappings(ec2Settings.MountPoints)
if err != nil {
- return nil, errors.Wrap(err, "error making block device mappings")
+ return nil, errors.Wrap(err, "making block device mappings")
}
if h.InstanceType != "" {
@@ -745,16 +735,16 @@ func (m *ec2Manager) getResources(ctx context.Context, h *host.Host) ([]string,
"distro": h.Distro.Id,
}))
if err != nil {
- return nil, errors.Wrapf(err, "failed to get spot request info for %s", h.Id)
+ return nil, errors.Wrapf(err, "getting spot request info for host '%s'", h.Id)
}
if instanceID == "" {
- return nil, errors.WithStack(errors.New("spot instance does not yet have an instanceId"))
+ return nil, errors.New("spot instance does not yet have an instanceId")
}
}
volumeIDs, err := m.client.GetVolumeIDs(ctx, h)
if err != nil {
- return nil, errors.Wrapf(err, "can't get volume IDs for '%s'", h.Id)
+ return nil, errors.Wrapf(err, "getting volume IDs for host '%s'", h.Id)
}
resources := []string{instanceID}
@@ -766,25 +756,25 @@ func (m *ec2Manager) getResources(ctx context.Context, h *host.Host) ([]string,
func (m *ec2Manager) addTags(ctx context.Context, h *host.Host, tags []host.Tag) error {
resources, err := m.getResources(ctx, h)
if err != nil {
- return errors.Wrap(err, "error getting host resources")
+ return errors.Wrap(err, "getting host resources")
}
_, err = m.client.CreateTags(ctx, &ec2.CreateTagsInput{
Resources: aws.StringSlice(resources),
Tags: hostToEC2Tags(tags),
})
if err != nil {
- return errors.Wrapf(err, "error creating tags using client for '%s'", h.Id)
+ return errors.Wrapf(err, "creating tags using client for host '%s'", h.Id)
}
h.AddTags(tags)
- return errors.Wrapf(h.SetTags(), "error creating tags in db for '%s'", h.Id)
+ return errors.Wrapf(h.SetTags(), "creating tags in DB for host '%s'", h.Id)
}
// deleteTags removes the specified tags by their keys in the client and db
func (m *ec2Manager) deleteTags(ctx context.Context, h *host.Host, keys []string) error {
resources, err := m.getResources(ctx, h)
if err != nil {
- return errors.Wrap(err, "error getting host resources")
+ return errors.Wrap(err, "getting host resources")
}
deleteTagSlice := make([]*ec2.Tag, len(keys))
for i := range keys {
@@ -795,11 +785,11 @@ func (m *ec2Manager) deleteTags(ctx context.Context, h *host.Host, keys []string
Tags: deleteTagSlice,
})
if err != nil {
- return errors.Wrapf(err, "error deleting tags using client for '%s'", h.Id)
+ return errors.Wrapf(err, "deleting tags using client for host '%s'", h.Id)
}
h.DeleteTags(keys)
- return errors.Wrapf(h.SetTags(), "error deleting tags in db for '%s'", h.Id)
+ return errors.Wrapf(h.SetTags(), "deleting tags in DB for host '%s'", h.Id)
}
// setInstanceType changes the instance type in the client and db
@@ -811,27 +801,27 @@ func (m *ec2Manager) setInstanceType(ctx context.Context, h *host.Host, instance
},
})
if err != nil {
- return errors.Wrapf(err, "error changing instance type using client for '%s'", h.Id)
+ return errors.Wrapf(err, "changing instance type using client for host '%s'", h.Id)
}
- return errors.Wrapf(h.SetInstanceType(instanceType), "error changing instance type in db for '%s'", h.Id)
+ return errors.Wrapf(h.SetInstanceType(instanceType), "changing instance type in DB for host '%s'", h.Id)
}
func (m *ec2Manager) CheckInstanceType(ctx context.Context, instanceType string) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
output, err := m.client.DescribeInstanceTypeOfferings(ctx, &ec2.DescribeInstanceTypeOfferingsInput{})
if err != nil {
- return errors.Wrapf(err, "error describe instance types offered for region '%s", m.region)
+ return errors.Wrapf(err, "describing instance types offered for region '%s'", m.region)
}
for _, availableType := range output.InstanceTypeOfferings {
if availableType.InstanceType != nil && (*availableType.InstanceType) == instanceType {
return nil
}
}
- return errors.Errorf("type '%s' is unavailable in region '%s'", instanceType, m.region)
+ return errors.Errorf("instance type '%s' is unavailable in region '%s'", instanceType, m.region)
}
// setNoExpiration changes whether a host should expire
@@ -840,7 +830,7 @@ func (m *ec2Manager) setNoExpiration(ctx context.Context, h *host.Host, noExpira
if !host.IsIntentHostId(h.Id) {
resources, err := m.getResources(ctx, h)
if err != nil {
- return errors.Wrap(err, "error getting host resources")
+ return errors.Wrap(err, "getting host resources")
}
_, err = m.client.CreateTags(ctx, &ec2.CreateTagsInput{
Resources: aws.StringSlice(resources),
@@ -852,31 +842,31 @@ func (m *ec2Manager) setNoExpiration(ctx context.Context, h *host.Host, noExpira
},
})
if err != nil {
- return errors.Wrapf(err, "error changing expire-on tag using client for '%s", h.Id)
+ return errors.Wrapf(err, "changing expire-on tag using client for host '%s", h.Id)
}
}
if noExpiration {
- return errors.Wrapf(h.MarkShouldNotExpire(expireOnValue), "error marking host should not expire in db for '%s'", h.Id)
+ return errors.Wrapf(h.MarkShouldNotExpire(expireOnValue), "marking host should not expire in DB for host '%s'", h.Id)
}
- return errors.Wrapf(h.MarkShouldExpire(expireOnValue), "error marking host should in db for '%s'", h.Id)
+ return errors.Wrapf(h.MarkShouldExpire(expireOnValue), "marking host should in DB for host '%s'", h.Id)
}
// extendExpiration extends a host's expiration time by the number of hours specified
func (m *ec2Manager) extendExpiration(ctx context.Context, h *host.Host, extension time.Duration) error {
- return errors.Wrapf(h.SetExpirationTime(h.ExpirationTime.Add(extension)), "error extending expiration time in db for '%s'", h.Id)
+ return errors.Wrapf(h.SetExpirationTime(h.ExpirationTime.Add(extension)), "extending expiration time in DB for host '%s'", h.Id)
}
// ModifyHost modifies a spawn host according to the changes specified by a HostModifyOptions struct.
func (m *ec2Manager) ModifyHost(ctx context.Context, h *host.Host, opts host.HostModifyOptions) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
// Validate modify options for user errors that should prevent all modifications
if err := validateEC2HostModifyOptions(h, opts); err != nil {
- return errors.Wrap(err, "error validating EC2 host modify options")
+ return errors.Wrap(err, "validating EC2 host modify options")
}
// Attempt all requested modifications and catch errors from client or db
@@ -910,7 +900,7 @@ func (m *ec2Manager) ModifyHost(ctx context.Context, h *host.Host, opts host.Hos
return catcher.Resolve()
}
if volume.AvailabilityZone != h.Zone {
- catcher.Add(errors.Errorf("can't attach volume in zone '%s' to host in zone '%s'", volume.AvailabilityZone, h.Zone))
+ catcher.Errorf("cannot attach volume in zone '%s' to host in zone '%s'", volume.AvailabilityZone, h.Zone)
return catcher.Resolve()
}
attachment := host.VolumeAttachment{VolumeID: opts.AttachVolume, IsHome: false}
@@ -921,7 +911,7 @@ func (m *ec2Manager) ModifyHost(ctx context.Context, h *host.Host, opts host.Hos
if opts.AddKey != "" {
if err := addPublicKey(ctx, h, opts.AddKey); err != nil {
- catcher.Wrapf(err, "adding key to host '%s'", h.Id)
+ catcher.Wrapf(err, "adding public key to host '%s'", h.Id)
}
}
@@ -937,9 +927,9 @@ func addPublicKey(ctx context.Context, h *host.Host, key string) error {
}
// GetInstanceStatuses returns the current status of a slice of EC2 instances.
-func (m *ec2Manager) GetInstanceStatuses(ctx context.Context, hosts []host.Host) ([]CloudStatus, error) {
+func (m *ec2Manager) GetInstanceStatuses(ctx context.Context, hosts []host.Host) (map[string]CloudStatus, error) {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return nil, errors.Wrap(err, "error creating client")
+ return nil, errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -968,22 +958,26 @@ func (m *ec2Manager) GetInstanceStatuses(ctx context.Context, hosts []host.Host)
if len(spotHosts) > 0 {
spotOut, err := m.client.DescribeSpotRequestsAndSave(ctx, spotHosts)
if err != nil {
- return nil, errors.Wrap(err, "error describing spot instances")
- }
- if len(spotOut.SpotInstanceRequests) != len(spotHosts) {
- return nil, errors.New("programmer error: length of spot instance requests != length of spot host IDs")
+ return nil, errors.Wrap(err, "describing spot instances")
}
spotInstanceRequestsMap := map[string]*ec2.SpotInstanceRequest{}
for i := range spotOut.SpotInstanceRequests {
spotInstanceRequestsMap[*spotOut.SpotInstanceRequests[i].SpotInstanceRequestId] = spotOut.SpotInstanceRequests[i]
}
for i := range spotHosts {
- if spotInstanceRequestsMap[spotHosts[i].Id].InstanceId == nil || *spotInstanceRequestsMap[spotHosts[i].Id].InstanceId == "" {
- hostToStatusMap[spotHosts[i].Id] = cloudStatusFromSpotStatus(*spotInstanceRequestsMap[spotHosts[i].Id].State)
+ spotHostID := spotHosts[i].Id
+ spotRequest, ok := spotInstanceRequestsMap[spotHostID]
+ if !ok {
+ hostToStatusMap[spotHostID] = StatusNonExistent
continue
}
- hostsToCheck = append(hostsToCheck, spotInstanceRequestsMap[spotHosts[i].Id].InstanceId)
- instanceIdToHostMap[*spotInstanceRequestsMap[spotHosts[i].Id].InstanceId] = spotHosts[i]
+ instanceID := aws.StringValue(spotRequest.InstanceId)
+ if instanceID == "" {
+ hostToStatusMap[spotHostID] = cloudStatusFromSpotStatus(*spotRequest.State)
+ continue
+ }
+ hostsToCheck = append(hostsToCheck, &instanceID)
+ instanceIdToHostMap[instanceID] = spotHosts[i]
}
}
@@ -993,7 +987,7 @@ func (m *ec2Manager) GetInstanceStatuses(ctx context.Context, hosts []host.Host)
InstanceIds: hostsToCheck,
})
if err != nil {
- return nil, errors.Wrap(err, "error describing instances")
+ return nil, errors.Wrap(err, "describing instances")
}
if err = validateEc2DescribeInstancesOutput(out); err != nil {
return nil, errors.Wrap(err, "invalid describe instances response")
@@ -1005,36 +999,21 @@ func (m *ec2Manager) GetInstanceStatuses(ctx context.Context, hosts []host.Host)
for i := range hostsToCheck {
instance, ok := reservationsMap[*hostsToCheck[i]]
if !ok {
- // Terminate an unknown host in the db
- for _, h := range hosts {
- if h.Id == *hostsToCheck[i] {
- grip.Error(message.WrapError(h.Terminate(evergreen.User, "host is missing from DescribeInstances response"), message.Fields{
- "message": "can't mark instance as terminated",
- "host_id": h.Id,
- "host_provider": h.Distro.Provider,
- "distro": h.Distro.Id,
- }))
- }
- }
- return nil, errors.Errorf("host '%s' not included in DescribeInstances response", *hostsToCheck[i])
+ hostToStatusMap[*hostsToCheck[i]] = StatusNonExistent
+ continue
}
status := ec2StatusToEvergreenStatus(*instance.State.Name)
if status == StatusRunning {
// cache instance information so we can make fewer calls to AWS's API
if err = cacheHostData(ctx, instanceIdToHostMap[*hostsToCheck[i]], instance, m.client); err != nil {
- return nil, errors.Wrapf(err, "can't cache host data for '%s'", *hostsToCheck[i])
+ return nil, errors.Wrapf(err, "caching EC2 host data for host '%s'", *hostsToCheck[i])
}
}
hostToStatusMap[instanceIdToHostMap[*hostsToCheck[i]].Id] = status
}
}
- // Populate cloud statuses
- statuses := []CloudStatus{}
- for _, h := range hosts {
- statuses = append(statuses, hostToStatusMap[h.Id])
- }
- return statuses, nil
+ return hostToStatusMap, nil
}
// GetInstanceStatus returns the current status of an EC2 instance.
@@ -1042,7 +1021,7 @@ func (m *ec2Manager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cloud
status := StatusUnknown
if err := m.client.Create(m.credentials, m.region); err != nil {
- return status, errors.Wrap(err, "error creating client")
+ return status, errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1053,11 +1032,11 @@ func (m *ec2Manager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cloud
} else {
spotDetails, err := m.client.DescribeSpotRequestsAndSave(ctx, []*host.Host{h})
if err != nil {
- err = errors.Wrapf(err, "failed to get spot request info for %s", h.Id)
+ err = errors.Wrapf(err, "getting spot request info for host '%s'", h.Id)
return status, err
}
if len(spotDetails.SpotInstanceRequests) == 0 {
- return status, errors.Errorf("'%s' has no corresponding spot instance request", h.Id)
+ return status, errors.Errorf("host '%s' has no corresponding spot instance request", h.Id)
}
spotInstance := spotDetails.SpotInstanceRequests[0]
if spotInstance.InstanceId == nil || *spotInstance.InstanceId == "" {
@@ -1070,7 +1049,7 @@ func (m *ec2Manager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cloud
instance, err := m.client.GetInstanceInfo(ctx, id)
if err != nil {
- if err == noReservationError {
+ if isEC2InstanceNotFound(err) {
return StatusNonExistent, nil
}
grip.Error(message.WrapError(err, message.Fields{
@@ -1087,7 +1066,7 @@ func (m *ec2Manager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cloud
if status == StatusRunning {
// cache instance information so we can make fewer calls to AWS's API
if err = cacheHostData(ctx, h, instance, m.client); err != nil {
- return status, errors.Wrapf(err, "can't cache host data for '%s'", h.Id)
+ return status, errors.Wrapf(err, "caching EC2 host data for host '%s'", h.Id)
}
}
@@ -1095,16 +1074,14 @@ func (m *ec2Manager) GetInstanceStatus(ctx context.Context, h *host.Host) (Cloud
}
func (m *ec2Manager) SetPortMappings(context.Context, *host.Host, *host.Host) error {
- return errors.New("can't set port mappings with ec2 provider")
+ return errors.New("can't set port mappings with EC2 provider")
}
// TerminateInstance terminates the EC2 instance.
func (m *ec2Manager) TerminateInstance(ctx context.Context, h *host.Host, user, reason string) error {
// terminate the instance
if h.Status == evergreen.HostTerminated {
- err := errors.Errorf("Can not terminate %s - already marked as "+
- "terminated!", h.Id)
- return err
+ return errors.Errorf("cannot terminate host '%s' because it's already marked as terminated", h.Id)
}
if h.Distro.BootstrapSettings.Method == distro.BootstrapMethodUserData {
@@ -1116,7 +1093,7 @@ func (m *ec2Manager) TerminateInstance(ctx context.Context, h *host.Host, user,
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1132,16 +1109,16 @@ func (m *ec2Manager) TerminateInstance(ctx context.Context, h *host.Host, user,
"user": user,
"distro": h.Distro.Id,
}))
- return errors.Wrap(err, "error canceling spot request")
+ return errors.Wrap(err, "canceling spot request")
}
// the spot request wasn't fulfilled, so don't attempt to terminate in ec2
if instanceId == "" {
- return errors.Wrap(h.Terminate(user, "spot request was not fulfilled"), "failed to terminate instance in db")
+ return errors.Wrap(h.Terminate(user, "spot request was not fulfilled"), "terminating host in DB")
}
}
if !IsEC2InstanceID(instanceId) {
- return errors.Wrap(h.Terminate(user, fmt.Sprintf("detected invalid instance ID %s", instanceId)), "failed to terminate instance in db")
+ return errors.Wrap(h.Terminate(user, fmt.Sprintf("detected invalid instance ID '%s'", instanceId)), "terminating instance in DB")
}
resp, err := m.client.TerminateInstances(ctx, &ec2.TerminateInstancesInput{
InstanceIds: []*string{aws.String(instanceId)},
@@ -1171,7 +1148,7 @@ func (m *ec2Manager) TerminateInstance(ctx context.Context, h *host.Host, user,
for _, vol := range h.Volumes {
volDB, err := host.FindVolumeByID(vol.VolumeID)
if err != nil {
- return errors.Wrap(err, "can't query for volumes")
+ return errors.Wrap(err, "finding volumes for host")
}
if volDB == nil {
continue
@@ -1185,7 +1162,7 @@ func (m *ec2Manager) TerminateInstance(ctx context.Context, h *host.Host, user,
"host_id": h.Id,
"volume": volDB.ID,
}))
- return errors.Wrapf(err, "error updating volume '%s' expiration", volDB.ID)
+ return errors.Wrapf(err, "updating expiration for volume '%s'", volDB.ID)
}
}
@@ -1199,15 +1176,15 @@ func (m *ec2Manager) TerminateInstance(ctx context.Context, h *host.Host, user,
}
}
- return errors.Wrap(h.Terminate(user, reason), "failed to terminate instance in db")
+ return errors.Wrap(h.Terminate(user, reason), "terminating host in DB")
}
// StopInstance stops a running EC2 instance.
func (m *ec2Manager) StopInstance(ctx context.Context, h *host.Host, user string) error {
if h.Status == evergreen.HostStopped {
- return errors.Errorf("cannot stop '%s' - already marked as stopped", h.Id)
+ return errors.Errorf("cannot stop host '%s' because it is already marked as stopped", h.Id)
} else if h.Status != evergreen.HostRunning && h.Status != evergreen.HostStopping {
- return errors.Errorf("cannot stop '%s' - host status is '%s'", h.Id, h.Status)
+ return errors.Errorf("cannot stop host '%s' because its status ('%s') is not a stoppable state", h.Id, h.Status)
}
if err := m.client.Create(m.credentials, m.region); err != nil {
@@ -1224,7 +1201,7 @@ func (m *ec2Manager) StopInstance(ctx context.Context, h *host.Host, user string
if len(out.StoppingInstances) == 1 {
instance := out.StoppingInstances[0]
- status := ec2StatusToEvergreenStatus(utility.FromStringPtr(instance.CurrentState.Name))
+ status := ec2StatusToEvergreenStatus(aws.StringValue(instance.CurrentState.Name))
switch status {
case StatusStopping:
grip.Error(message.WrapError(h.SetStopping(user), message.Fields{
@@ -1284,11 +1261,11 @@ func (m *ec2Manager) StopInstance(ctx context.Context, h *host.Host, user string
// StartInstance starts a stopped EC2 instance.
func (m *ec2Manager) StartInstance(ctx context.Context, h *host.Host, user string) error {
if h.Status != evergreen.HostStopped {
- return errors.Errorf("cannot start '%s' - host status is '%s'", h.Id, h.Status)
+ return errors.Errorf("cannot start host '%s' because its status is '%s'", h.Id, h.Status)
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1296,7 +1273,7 @@ func (m *ec2Manager) StartInstance(ctx context.Context, h *host.Host, user strin
InstanceIds: []*string{aws.String(h.Id)},
})
if err != nil {
- return errors.Wrapf(err, "error starting EC2 instance '%s'", h.Id)
+ return errors.Wrapf(err, "starting EC2 instance '%s'", h.Id)
}
var instance *ec2.Instance
@@ -1308,7 +1285,7 @@ func (m *ec2Manager) StartInstance(ctx context.Context, h *host.Host, user strin
func() (bool, error) {
instance, err = m.client.GetInstanceInfo(ctx, h.Id)
if err != nil {
- return false, errors.Wrap(err, "error getting instance info")
+ return false, errors.Wrap(err, "getting instance info")
}
if ec2StatusToEvergreenStatus(*instance.State.Name) == StatusRunning {
return false, nil
@@ -1320,11 +1297,11 @@ func (m *ec2Manager) StartInstance(ctx context.Context, h *host.Host, user strin
})
if err != nil {
- return errors.Wrap(err, "error checking if spawnhost started")
+ return errors.Wrap(err, "checking if spawn host started")
}
if err = cacheHostData(ctx, h, instance, m.client); err != nil {
- return errors.Wrapf(err, "can't cache host data for instance '%s'", h.Id)
+ return errors.Wrapf(err, "cache EC2 host data for host '%s'", h.Id)
}
grip.Info(message.Fields{
@@ -1335,7 +1312,7 @@ func (m *ec2Manager) StartInstance(ctx context.Context, h *host.Host, user strin
"distro": h.Distro.Id,
})
- return errors.Wrap(h.SetRunning(user), "failed to mark instance as running in db")
+ return errors.Wrap(h.SetRunning(user), "failed to mark instance as running in DB")
}
func (m *ec2Manager) cancelSpotRequest(ctx context.Context, h *host.Host) (string, error) {
@@ -1352,7 +1329,7 @@ func (m *ec2Manager) cancelSpotRequest(ctx context.Context, h *host.Host) (strin
"host_provider": h.Distro.Provider,
"distro": h.Distro.Id,
}))
- return "", errors.Wrapf(err, "failed to get spot request info for %s", h.Id)
+ return "", errors.Wrapf(err, "getting spot request info for host '%s'", h.Id)
}
if _, err = m.client.CancelSpotInstanceRequests(ctx, &ec2.CancelSpotInstanceRequestsInput{
SpotInstanceRequestIds: []*string{aws.String(h.Id)},
@@ -1368,7 +1345,7 @@ func (m *ec2Manager) cancelSpotRequest(ctx context.Context, h *host.Host) (strin
"host_provider": h.Distro.Provider,
"distro": h.Distro.Id,
})
- return "", errors.Wrapf(err, "Failed to cancel spot request for host %s", h.Id)
+ return "", errors.Wrapf(err, "cancelling spot request for host '%s'", h.Id)
}
grip.Info(message.Fields{
"message": "canceled spot request",
@@ -1384,7 +1361,7 @@ func (m *ec2Manager) cancelSpotRequest(ctx context.Context, h *host.Host) (strin
func (m *ec2Manager) IsUp(ctx context.Context, h *host.Host) (bool, error) {
status, err := m.GetInstanceStatus(ctx, h)
if err != nil {
- return false, errors.Wrap(err, "error checking if instance is up")
+ return false, errors.Wrap(err, "checking if instance is up")
}
if status == StatusRunning {
return true, nil
@@ -1401,17 +1378,17 @@ func (m *ec2Manager) OnUp(ctx context.Context, h *host.Host) error {
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
resources, err := m.getResources(ctx, h)
if err != nil {
- return errors.Wrap(err, "error getting resources")
+ return errors.Wrap(err, "getting resources")
}
if err = m.client.SetTags(ctx, resources, h); err != nil {
- return errors.Wrap(err, "error settings tags")
+ return errors.Wrap(err, "setting tags")
}
return nil
@@ -1419,7 +1396,7 @@ func (m *ec2Manager) OnUp(ctx context.Context, h *host.Host) error {
func (m *ec2Manager) AttachVolume(ctx context.Context, h *host.Host, attachment *host.VolumeAttachment) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1431,7 +1408,7 @@ func (m *ec2Manager) AttachVolume(ctx context.Context, h *host.Host, attachment
if attachment.DeviceName == "" {
deviceName, err := generateDeviceNameForVolume(opts)
if err != nil {
- return errors.Wrap(err, "error generating initial device name")
+ return errors.Wrap(err, "generating initial device name")
}
attachment.DeviceName = deviceName
}
@@ -1442,25 +1419,25 @@ func (m *ec2Manager) AttachVolume(ctx context.Context, h *host.Host, attachment
VolumeId: aws.String(attachment.VolumeID),
}, opts)
if err != nil {
- return errors.Wrapf(err, "error attaching volume '%s' to host '%s'", attachment.VolumeID, h.Id)
+ return errors.Wrapf(err, "attaching volume '%s' to host '%s'", attachment.VolumeID, h.Id)
}
if volume != nil && volume.Device != nil {
attachment.DeviceName = *volume.Device
}
- return errors.Wrapf(h.AddVolumeToHost(attachment), "error attaching volume '%s' to host '%s' in db", attachment.VolumeID, h.Id)
+ return errors.Wrapf(h.AddVolumeToHost(attachment), "attaching volume '%s' to host '%s' in DB", attachment.VolumeID, h.Id)
}
func (m *ec2Manager) DetachVolume(ctx context.Context, h *host.Host, volumeID string) error {
v, err := host.FindVolumeByID(volumeID)
if err != nil {
- return errors.Wrapf(err, "can't get volume '%s'", volumeID)
+ return errors.Wrapf(err, "getting volume '%s'", volumeID)
}
if v == nil {
- return errors.Errorf("no volume '%s' found", volumeID)
+ return errors.Errorf("volume '%s' not found", volumeID)
}
if err = m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1469,21 +1446,21 @@ func (m *ec2Manager) DetachVolume(ctx context.Context, h *host.Host, volumeID st
VolumeId: aws.String(volumeID),
})
if err != nil {
- return errors.Wrapf(err, "error detaching volume '%s' from host '%s' in client", volumeID, h.Id)
+ return errors.Wrapf(err, "detaching volume '%s' from host '%s' in client", volumeID, h.Id)
}
if v.Expiration.Before(time.Now().Add(evergreen.DefaultSpawnHostExpiration)) {
if err = m.modifyVolumeExpiration(ctx, v, time.Now().Add(evergreen.DefaultSpawnHostExpiration)); err != nil {
- return errors.Wrapf(err, "can't update expiration for volume '%s'", volumeID)
+ return errors.Wrapf(err, "updating expiration for volume '%s'", volumeID)
}
}
- return errors.Wrapf(h.RemoveVolumeFromHost(volumeID), "error detaching volume '%s' from host '%s' in db", volumeID, h.Id)
+ return errors.Wrapf(h.RemoveVolumeFromHost(volumeID), "detaching volume '%s' from host '%s' in DB", volumeID, h.Id)
}
func (m *ec2Manager) CreateVolume(ctx context.Context, volume *host.Volume) (*host.Volume, error) {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return nil, errors.Wrap(err, "error creating client")
+ return nil, errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1492,18 +1469,29 @@ func (m *ec2Manager) CreateVolume(ctx context.Context, volume *host.Volume) (*ho
{Key: aws.String(evergreen.TagOwner), Value: aws.String(volume.CreatedBy)},
{Key: aws.String(evergreen.TagExpireOn), Value: aws.String(expireInDays(evergreen.SpawnHostExpireDays))},
}
-
- resp, err := m.client.CreateVolume(ctx, &ec2.CreateVolumeInput{
+ input := &ec2.CreateVolumeInput{
AvailabilityZone: aws.String(volume.AvailabilityZone),
VolumeType: aws.String(volume.Type),
Size: aws.Int64(int64(volume.Size)),
TagSpecifications: []*ec2.TagSpecification{
{ResourceType: aws.String(ec2.ResourceTypeVolume), Tags: volumeTags},
},
- })
+ }
+
+ if volume.Throughput > 0 {
+ input.Throughput = aws.Int64(int64(volume.Throughput))
+ }
+
+ if volume.IOPS > 0 {
+ input.Iops = aws.Int64(int64(volume.IOPS))
+ } else if volume.Type == VolumeTypeIo1 { // Iops is required for io1.
+ input.Iops = aws.Int64(int64(defaultIops))
+ }
+
+ resp, err := m.client.CreateVolume(ctx, input)
if err != nil {
- return nil, errors.Wrap(err, "error creating volume in client")
+ return nil, errors.Wrap(err, "creating volume in client")
}
if resp.VolumeId == nil {
return nil, errors.New("new volume returned by EC2 does not have an ID")
@@ -1511,7 +1499,7 @@ func (m *ec2Manager) CreateVolume(ctx context.Context, volume *host.Volume) (*ho
volume.ID = *resp.VolumeId
if err = volume.Insert(); err != nil {
- return nil, errors.Wrap(err, "error creating volume in db")
+ return nil, errors.Wrap(err, "creating volume in DB")
}
return volume, nil
@@ -1519,7 +1507,7 @@ func (m *ec2Manager) CreateVolume(ctx context.Context, volume *host.Volume) (*ho
func (m *ec2Manager) DeleteVolume(ctx context.Context, volume *host.Volume) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1527,15 +1515,15 @@ func (m *ec2Manager) DeleteVolume(ctx context.Context, volume *host.Volume) erro
VolumeId: aws.String(volume.ID),
})
if err != nil {
- return errors.Wrapf(err, "error deleting volume '%s' in client", volume.ID)
+ return errors.Wrapf(err, "deleting volume '%s' in client", volume.ID)
}
- return errors.Wrapf(volume.Remove(), "error deleting volume '%s' in db", volume.ID)
+ return errors.Wrapf(volume.Remove(), "deleting volume '%s' in DB", volume.ID)
}
-func (m *ec2Manager) GetVolumeAttachment(ctx context.Context, volumeID string) (*host.VolumeAttachment, error) {
+func (m *ec2Manager) GetVolumeAttachment(ctx context.Context, volumeID string) (*VolumeAttachment, error) {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return nil, errors.Wrap(err, "error creating client")
+ return nil, errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1543,11 +1531,11 @@ func (m *ec2Manager) GetVolumeAttachment(ctx context.Context, volumeID string) (
VolumeIds: aws.StringSlice([]string{volumeID}),
})
if err != nil {
- return nil, errors.Wrapf(err, "error describing volume '%s'", volumeID)
+ return nil, errors.Wrapf(err, "describing volume '%s'", volumeID)
}
if volumeInfo == nil || len(volumeInfo.Volumes) == 0 || volumeInfo.Volumes[0] == nil {
- return nil, errors.Errorf("no volume '%s' found in ec2", volumeID)
+ return nil, errors.Errorf("no volume '%s' found in EC2", volumeID)
}
// no attachments found
@@ -1560,10 +1548,10 @@ func (m *ec2Manager) GetVolumeAttachment(ctx context.Context, volumeID string) (
ec2Attachment.VolumeId == nil ||
ec2Attachment.Device == nil ||
ec2Attachment.InstanceId == nil {
- return nil, errors.New("aws returned an invalid volume attachment")
+ return nil, errors.Errorf("AWS returned an invalid volume attachment %+v", ec2Attachment)
}
- attachment := &host.VolumeAttachment{
+ attachment := &VolumeAttachment{
VolumeID: *ec2Attachment.VolumeId,
DeviceName: *ec2Attachment.Device,
HostID: *ec2Attachment.InstanceId,
@@ -1574,7 +1562,7 @@ func (m *ec2Manager) GetVolumeAttachment(ctx context.Context, volumeID string) (
func (m *ec2Manager) modifyVolumeExpiration(ctx context.Context, volume *host.Volume, newExpiration time.Time) error {
if err := volume.SetExpiration(newExpiration); err != nil {
- return errors.Wrapf(err, "can't update expiration for volume '%s'", volume.ID)
+ return errors.Wrapf(err, "updating expiration for volume '%s'", volume.ID)
}
_, err := m.client.CreateTags(ctx, &ec2.CreateTagsInput{
@@ -1584,7 +1572,7 @@ func (m *ec2Manager) modifyVolumeExpiration(ctx context.Context, volume *host.Vo
Value: aws.String(newExpiration.Add(time.Hour * 24 * evergreen.SpawnHostExpireDays).Format(evergreen.ExpireOnFormat))}},
})
if err != nil {
- return errors.Wrapf(err, "can't update expire-on tag for volume '%s'", volume.ID)
+ return errors.Wrapf(err, "updating expire-on tag for volume '%s'", volume.ID)
}
return nil
@@ -1592,35 +1580,35 @@ func (m *ec2Manager) modifyVolumeExpiration(ctx context.Context, volume *host.Vo
func (m *ec2Manager) ModifyVolume(ctx context.Context, volume *host.Volume, opts *model.VolumeModifyOptions) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
if !utility.IsZeroTime(opts.Expiration) {
if err := m.modifyVolumeExpiration(ctx, volume, opts.Expiration); err != nil {
- return errors.Wrapf(err, "error modifying volume '%s' expiration", volume.ID)
+ return errors.Wrapf(err, "modifying volume '%s' expiration", volume.ID)
}
if err := volume.SetNoExpiration(false); err != nil {
- return errors.Wrapf(err, "error clearing volume '%s' no-expiration in db", volume.ID)
+ return errors.Wrapf(err, "clearing volume '%s' no-expiration in DB", volume.ID)
}
}
if opts.NoExpiration && opts.HasExpiration {
- return errors.New("can't set no expiration and has expiration")
+ return errors.New("can't set both no expiration and has expiration")
}
if opts.NoExpiration {
if err := m.modifyVolumeExpiration(ctx, volume, time.Now().Add(evergreen.SpawnHostNoExpirationDuration)); err != nil {
- return errors.Wrapf(err, "error modifying volume '%s' background expiration", volume.ID)
+ return errors.Wrapf(err, "modifying volume '%s' background expiration", volume.ID)
}
if err := volume.SetNoExpiration(true); err != nil {
- return errors.Wrapf(err, "error setting volume '%s' no-expiration in db", volume.ID)
+ return errors.Wrapf(err, "setting volume '%s' no-expiration in DB", volume.ID)
}
}
if opts.HasExpiration {
if err := volume.SetNoExpiration(false); err != nil {
- return errors.Wrapf(err, "error clearing volume '%s' no-expiration in db", volume.ID)
+ return errors.Wrapf(err, "clearing volume '%s' no-expiration in DB", volume.ID)
}
}
@@ -1630,16 +1618,16 @@ func (m *ec2Manager) ModifyVolume(ctx context.Context, volume *host.Volume, opts
Size: aws.Int64(int64(opts.Size)),
})
if err != nil {
- return errors.Wrapf(err, "error modifying volume '%s' size in client", volume.ID)
+ return errors.Wrapf(err, "modifying volume '%s' size in client", volume.ID)
}
if err = volume.SetSize(opts.Size); err != nil {
- return errors.Wrapf(err, "error modifying volume '%s' size in db", volume.ID)
+ return errors.Wrapf(err, "modifying volume '%s' size in DB", volume.ID)
}
}
if opts.NewName != "" {
if err := volume.SetDisplayName(opts.NewName); err != nil {
- return errors.Wrapf(err, "error modifying volume '%s' name in db", volume.ID)
+ return errors.Wrapf(err, "modifying volume '%s' name in DB", volume.ID)
}
}
return nil
@@ -1648,7 +1636,7 @@ func (m *ec2Manager) ModifyVolume(ctx context.Context, volume *host.Volume, opts
// GetDNSName returns the DNS name for the host.
func (m *ec2Manager) GetDNSName(ctx context.Context, h *host.Host) (string, error) {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return "", errors.Wrap(err, "error creating client")
+ return "", errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -1684,9 +1672,21 @@ func cloudStatusFromSpotStatus(state string) CloudStatus {
func (m *ec2Manager) AddSSHKey(ctx context.Context, pair evergreen.SSHKeyPair) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
- return errors.Wrap(addSSHKey(ctx, m.client, pair), "could not add SSH key")
+ return errors.Wrap(addSSHKey(ctx, m.client, pair), "adding public SSH key")
+}
+
+func (m *ec2Manager) getProvider(ctx context.Context, h *host.Host, ec2settings *EC2ProviderSettings) (ec2ProviderType, error) {
+ if h.UserHost || m.provider == onDemandProvider {
+ h.Distro.Provider = evergreen.ProviderNameEc2OnDemand
+ return onDemandProvider, nil
+ }
+ if m.provider == spotProvider {
+ h.Distro.Provider = evergreen.ProviderNameEc2Spot
+ return spotProvider, nil
+ }
+ return 0, errors.Errorf("provider type is %d, expected %d or %d", m.provider, onDemandProvider, spotProvider)
}
diff --git a/cloud/ec2_client.go b/cloud/ec2_client.go
index 46c0ed09f58..26aa18ccf3c 100644
--- a/cloud/ec2_client.go
+++ b/cloud/ec2_client.go
@@ -143,7 +143,7 @@ type AWSClient interface {
}
// awsClientImpl wraps ec2.EC2.
-type awsClientImpl struct { //nolint
+type awsClientImpl struct { //nolint:all
session *session.Session
httpClient *http.Client
pricing *pricing.Pricing
@@ -183,7 +183,7 @@ func (c *awsClientImpl) Create(creds *credentials.Credentials, region string) er
Credentials: creds,
})
if err != nil {
- return errors.Wrap(err, "error creating session")
+ return errors.Wrap(err, "creating session")
}
c.session = s
}
@@ -492,7 +492,7 @@ func (c *awsClientImpl) DescribeSpotRequestsAndSave(ctx context.Context, hosts [
instances, err := c.DescribeSpotInstanceRequests(ctx, apiInput)
if err != nil {
- return nil, errors.Wrap(err, "error describing spot requests")
+ return nil, errors.Wrap(err, "describing spot instance requests")
}
catcher := grip.NewSimpleCatcher()
@@ -794,7 +794,7 @@ func (c *awsClientImpl) DescribeVpcs(ctx context.Context, input *ec2.DescribeVpc
func (c *awsClientImpl) GetInstanceInfo(ctx context.Context, id string) (*ec2.Instance, error) {
if strings.HasPrefix(id, "sir") {
- return nil, errors.Errorf("id appears to be a spot instance request ID, not a host ID (%s)", id)
+ return nil, errors.Errorf("ID '%s' appears to be a spot instance request ID, not a host ID", id)
}
if host.IsIntentHostId(id) {
return nil, errors.Errorf("host ID '%s' is for an intent host", id)
@@ -812,7 +812,7 @@ func (c *awsClientImpl) GetInstanceInfo(ctx context.Context, id string) (*ec2.In
instances := reservation[0].Instances
if len(instances) == 0 {
- err = errors.Errorf("'%s' was not found in reservation '%s'",
+ err = errors.Errorf("host '%s' was not found in reservation '%s'",
id, *resp.Reservations[0].ReservationId)
return nil, err
}
@@ -1029,12 +1029,14 @@ func (c *awsClientImpl) CreateFleet(ctx context.Context, input *ec2.CreateFleetI
// to the standard `err != nil` case above.
if !ec2CreateFleetResponseContainsInstance(output) {
if len(output.Errors) > 0 {
- grip.Debug(message.WrapError(errors.New(output.Errors[0].String()), msg))
- return true, errors.Errorf("Got error in CreateFleet response: %s", output.Errors[0].String())
+ err := errors.New(output.Errors[0].String())
+ grip.Debug(message.WrapError(err, msg))
+ return true, errors.Wrap(err, "CreateFleet response contained errors")
}
- grip.Error(message.WrapError(errors.New("No instance ID and no error in CreateFleet response"), msg))
+ err := errors.New("CreateFleet response contained neither an instance ID nor error")
+ grip.Error(message.WrapError(err, msg))
// This condition is unexpected, so do not retry.
- return false, errors.New("No instance ID no error in create fleet response")
+ return false, err
}
grip.Info(msg)
return false, nil
@@ -1048,14 +1050,14 @@ func (c *awsClientImpl) CreateFleet(ctx context.Context, input *ec2.CreateFleetI
func (c *awsClientImpl) GetKey(ctx context.Context, h *host.Host) (string, error) {
t, err := task.FindOneId(h.StartedBy)
if err != nil {
- return "", errors.Wrapf(err, "problem finding task %s", h.StartedBy)
+ return "", errors.Wrapf(err, "finding task '%s'", h.StartedBy)
}
if t == nil {
- return "", errors.Errorf("no task found %s", h.StartedBy)
+ return "", errors.Errorf("task '%s' not found", h.StartedBy)
}
k, err := model.GetAWSKeyForProject(t.Project)
if err != nil {
- return "", errors.Wrap(err, "problem getting key for project")
+ return "", errors.Wrap(err, "getting key for project")
}
if k.Name != "" {
return k.Name, nil
@@ -1063,7 +1065,7 @@ func (c *awsClientImpl) GetKey(ctx context.Context, h *host.Host) (string, error
newKey, err := c.makeNewKey(ctx, t.Project, h)
if err != nil {
- return "", errors.Wrap(err, "problem creating new key")
+ return "", errors.Wrap(err, "creating new key")
}
return newKey, nil
}
@@ -1079,11 +1081,11 @@ func (c *awsClientImpl) makeNewKey(ctx context.Context, project string, h *host.
}
resp, err := c.CreateKeyPair(ctx, &ec2.CreateKeyPairInput{KeyName: aws.String(name)})
if err != nil {
- return "", errors.Wrap(err, "problem creating key pair")
+ return "", errors.Wrap(err, "creating key pair")
}
if err := model.SetAWSKeyForProject(project, &model.AWSSSHKey{Name: name, Value: *resp.KeyMaterial}); err != nil {
- return "", errors.Wrap(err, "problem setting key")
+ return "", errors.Wrap(err, "setting key for project")
}
return name, nil
@@ -1103,12 +1105,12 @@ func (c *awsClientImpl) SetTags(ctx context.Context, resources []string, h *host
"host_provider": h.Distro.Provider,
"distro": h.Distro.Id,
}))
- return errors.Wrapf(err, "failed to attach tags for %s", h.Id)
+ return errors.Wrapf(err, "attaching tags for host '%s'", h.Id)
}
// Push instance tag changes to database
if err := h.SetTags(); err != nil {
- return errors.Wrap(err, "failed to update instance tags in database")
+ return errors.Wrap(err, "updating instance tags in the database")
}
grip.Debug(message.Fields{
@@ -1125,12 +1127,12 @@ func (c *awsClientImpl) SetTags(ctx context.Context, resources []string, h *host
func (c *awsClientImpl) GetInstanceBlockDevices(ctx context.Context, h *host.Host) ([]*ec2.InstanceBlockDeviceMapping, error) {
id, err := c.getHostInstanceID(ctx, h)
if err != nil {
- return nil, errors.Wrapf(err, "can't get instance ID for '%s'", h.Id)
+ return nil, errors.Wrapf(err, "getting instance ID for host '%s'", h.Id)
}
instance, err := c.GetInstanceInfo(ctx, id)
if err != nil {
- return nil, errors.Wrap(err, "error getting instance info")
+ return nil, errors.Wrap(err, "getting instance info")
}
return instance.BlockDeviceMappings, nil
@@ -1140,10 +1142,10 @@ func (c *awsClientImpl) GetVolumeIDs(ctx context.Context, h *host.Host) ([]strin
if h.Volumes == nil {
devices, err := c.GetInstanceBlockDevices(ctx, h)
if err != nil {
- return nil, errors.Wrap(err, "error getting devices")
+ return nil, errors.Wrap(err, "getting devices")
}
if err := h.SetVolumes(makeVolumeAttachments(devices)); err != nil {
- return nil, errors.Wrap(err, "error saving host volumes")
+ return nil, errors.Wrap(err, "saving host volumes")
}
}
@@ -1163,12 +1165,12 @@ func (c *awsClientImpl) GetPublicDNSName(ctx context.Context, h *host.Host) (str
id, err := c.getHostInstanceID(ctx, h)
if err != nil {
- return "", errors.Wrapf(err, "can't get instance ID for '%s'", h.Id)
+ return "", errors.Wrapf(err, "getting instance ID for host '%s'", h.Id)
}
instance, err := c.GetInstanceInfo(ctx, id)
if err != nil {
- return "", errors.Wrap(err, "error getting instance info")
+ return "", errors.Wrap(err, "getting instance info")
}
return *instance.PublicDnsName, nil
@@ -1180,10 +1182,10 @@ func (c *awsClientImpl) getHostInstanceID(ctx context.Context, h *host.Host) (st
var err error
id, err = c.GetSpotInstanceId(ctx, h)
if err != nil {
- return "", errors.Wrapf(err, "failed to get spot request info for %s", h.Id)
+ return "", errors.Wrapf(err, "getting spot request info for host '%s'", h.Id)
}
if id == "" {
- return "", errors.WithStack(errors.New("spot instance does not yet have an instanceId"))
+ return "", errors.New("spot instance does not yet have an instanceId")
}
}
@@ -1226,6 +1228,7 @@ type awsClientMock struct { //nolint
*ec2.Instance
*ec2.DescribeSpotInstanceRequestsOutput
*ec2.DescribeInstancesOutput
+ RequestGetInstanceInfoError error
*ec2.DescribeInstanceTypeOfferingsOutput
launchTemplates []*ec2.LaunchTemplate
@@ -1527,6 +1530,10 @@ func (c *awsClientMock) DescribeVpcs(ctx context.Context, input *ec2.DescribeVpc
}
func (c *awsClientMock) GetInstanceInfo(ctx context.Context, id string) (*ec2.Instance, error) {
+ if c.RequestGetInstanceInfoError != nil {
+ return nil, c.RequestGetInstanceInfoError
+ }
+
if c.Instance != nil {
return c.Instance, nil
}
@@ -1667,10 +1674,10 @@ func (c *awsClientMock) GetVolumeIDs(ctx context.Context, h *host.Host) ([]strin
if h.Volumes == nil {
devices, err := c.GetInstanceBlockDevices(ctx, h)
if err != nil {
- return nil, errors.Wrap(err, "error getting devices")
+ return nil, errors.Wrap(err, "getting devices")
}
if err := h.SetVolumes(makeVolumeAttachments(devices)); err != nil {
- return nil, errors.Wrap(err, "error setting host volumes")
+ return nil, errors.Wrap(err, "setting host volumes")
}
}
diff --git a/cloud/ec2_cost_test.go b/cloud/ec2_cost_test.go
deleted file mode 100644
index 4a5467a0eb9..00000000000
--- a/cloud/ec2_cost_test.go
+++ /dev/null
@@ -1,311 +0,0 @@
-// +build !race
-
-package cloud
-
-import (
- "context"
- "testing"
- "time"
-
- "github.com/evergreen-ci/birch"
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/model/distro"
- "github.com/evergreen-ci/evergreen/model/host"
- "github.com/evergreen-ci/evergreen/testutil"
- "github.com/stretchr/testify/suite"
-)
-
-type CostUnitSuite struct {
- suite.Suite
- rates []spotRate
-}
-
-func TestCostUnitSuite(t *testing.T) {
- suite.Run(t, new(CostUnitSuite))
-}
-
-// mins returns a time X minutes after UNIX epoch
-func mins(x int64) time.Time {
- return time.Unix(60*x, 0)
-}
-
-func (s *CostUnitSuite) SetupTest() {
- s.rates = []spotRate{
- {Time: mins(0), Price: 1.0},
- {Time: mins(60), Price: .5},
- {Time: mins(2 * 60), Price: 1.0},
- {Time: mins(3 * 60), Price: 2.0},
- {Time: mins(4 * 60), Price: 1.0},
- }
-}
-
-func (s *CostUnitSuite) TestOnDemandPriceAPITranslation() {
- s.Equal("Linux", osBillingName(osLinux))
- s.Equal(string(osSUSE), osBillingName(osSUSE))
- s.Equal(string(osWindows), osBillingName(osWindows))
- r, err := regionFullname("us-east-1")
- s.NoError(err)
- s.Equal("US East (N. Virginia)", r)
- r, err = regionFullname("us-west-1")
- s.NoError(err)
- s.Equal("US West (N. California)", r)
- r, err = regionFullname("us-west-2")
- s.NoError(err)
- s.Equal("US West (Oregon)", r)
- _, err = regionFullname("amazing")
- s.Error(err)
-}
-
-func (s *CostUnitSuite) TestTimeTilNextPayment() {
- hourlyHost := host.Host{
- Id: "hourlyHost",
- Distro: distro.Distro{
- Arch: "windows_amd64",
- },
- CreationTime: time.Date(2017, 1, 1, 0, 30, 0, 0, time.Local),
- StartTime: time.Date(2017, 1, 1, 1, 0, 0, 0, time.Local),
- }
- secondlyHost := host.Host{
- Id: "secondlyHost",
- Distro: distro.Distro{
- Arch: "linux_amd64",
- },
- CreationTime: time.Date(2017, 1, 1, 0, 0, 0, 0, time.Local),
- StartTime: time.Date(2017, 1, 1, 0, 30, 0, 0, time.Local),
- }
- hourlyHostNoStartTime := host.Host{
- Id: "hourlyHostNoStartTime",
- Distro: distro.Distro{
- Arch: "windows_amd64",
- },
- CreationTime: time.Date(2017, 1, 1, 0, 0, 0, 0, time.Local),
- }
- now := time.Now()
- timeTilNextHour := int(time.Hour) - (now.Minute()*int(time.Minute) + now.Second()*int(time.Second) + now.Nanosecond()*int(time.Nanosecond))
-
- timeNextPayment := timeTilNextEC2Payment(&hourlyHost)
- s.InDelta(timeTilNextHour, timeNextPayment.Nanoseconds(), float64(1*time.Millisecond))
-
- timeNextPayment = timeTilNextEC2Payment(&secondlyHost)
- s.InDelta(1*time.Second, timeNextPayment.Nanoseconds(), float64(1*time.Millisecond))
-
- timeNextPayment = timeTilNextEC2Payment(&hourlyHostNoStartTime)
- s.InDelta(timeTilNextHour, timeNextPayment.Nanoseconds(), float64(1*time.Millisecond))
-}
-
-type CostIntegrationSuite struct {
- suite.Suite
- m *ec2Manager
- client AWSClient
- h *host.Host
- ctx context.Context
- cancel context.CancelFunc
-}
-
-func TestCostIntegrationSuite(t *testing.T) {
- suite.Run(t, new(CostIntegrationSuite))
-}
-
-func (s *CostIntegrationSuite) SetupSuite() {
- s.ctx, s.cancel = context.WithCancel(context.Background())
- env := testutil.NewEnvironment(s.ctx, s.T())
- settings := env.Settings()
- testutil.ConfigureIntegrationTest(s.T(), settings, "CostIntegrationSuite")
-
- s.m = &ec2Manager{env: env, EC2ManagerOptions: &EC2ManagerOptions{client: &awsClientImpl{}}}
- s.NoError(s.m.Configure(s.ctx, settings))
- s.NoError(s.m.client.Create(s.m.credentials, evergreen.DefaultEC2Region))
- s.client = s.m.client
-}
-
-func (s *CostIntegrationSuite) TearDownSuite() {
- s.cancel()
-}
-
-func (s *CostIntegrationSuite) SetupTest() {
- pkgCachingPriceFetcher.ec2Prices = nil
- s.h = &host.Host{
- Id: "h1",
- Distro: distro.Distro{
- ProviderSettingsList: []*birch.Document{birch.NewDocument(
- birch.EC.String("ami", "ami"),
- birch.EC.String("key_name", "key"),
- birch.EC.String("instance_type", "instance"),
- birch.EC.String("aws_access_key_id", "key_id"),
- birch.EC.Double("bid_price", 0.001),
- birch.EC.SliceString("security_group_ids", []string{"abcdef"}),
- )},
- Provider: evergreen.ProviderNameEc2OnDemand,
- },
- }
-}
-
-func (s *CostIntegrationSuite) TestFetchOnDemandPricingCached() {
- pkgCachingPriceFetcher.ec2Prices = map[odInfo]float64{
- odInfo{os: "Linux", instance: "c3.4xlarge", region: "US East (N. Virginia)"}: .1,
- odInfo{os: "Windows", instance: "c3.4xlarge", region: "US East (N. Virginia)"}: .2,
- odInfo{os: "Linux", instance: "c3.xlarge", region: "US East (N. Virginia)"}: .3,
- odInfo{os: "Windows", instance: "c3.xlarge", region: "US East (N. Virginia)"}: .4,
- odInfo{os: "Linux", instance: "m5.4xlarge", region: "US East (N. Virginia)"}: .5,
- odInfo{os: "Windows", instance: "m5.4xlarge", region: "US East (N. Virginia)"}: .6,
- odInfo{os: "Linux", instance: "m5.xlarge", region: "US East (N. Virginia)"}: .7,
- odInfo{os: "Windows", instance: "m5.xlarge", region: "US East (N. Virginia)"}: .8,
- }
-
- price, err := pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "c3.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.1, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "c3.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.2, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "c3.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.3, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "c3.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.4, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "m5.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.5, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "m5.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.6, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "m5.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.7, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "m5.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.8, price)
-}
-
-func (s *CostIntegrationSuite) TestFetchOnDemandPricingUncached() {
- price, err := pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "c3.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.84, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "c3.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(1.504, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "c3.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.21, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "c3.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.376, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "m5.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.768, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "m5.4xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(1.504, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osLinux, "m5.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.192, price)
-
- price, err = pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, osWindows, "m5.xlarge", "us-east-1")
- s.NoError(err)
- s.Equal(.376, price)
-
- s.Equal(.84, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Linux", instance: "c3.4xlarge", region: "US East (N. Virginia)"}])
- s.Equal(1.504, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Windows", instance: "c3.4xlarge", region: "US East (N. Virginia)"}])
- s.Equal(.21, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Linux", instance: "c3.xlarge", region: "US East (N. Virginia)"}])
- s.Equal(.376, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Windows", instance: "c3.xlarge", region: "US East (N. Virginia)"}])
- s.Equal(.768, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Linux", instance: "m5.4xlarge", region: "US East (N. Virginia)"}])
- s.Equal(1.504, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Windows", instance: "m5.4xlarge", region: "US East (N. Virginia)"}])
- s.Equal(.192, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Linux", instance: "m5.xlarge", region: "US East (N. Virginia)"}])
- s.Equal(.376, pkgCachingPriceFetcher.ec2Prices[odInfo{os: "Windows", instance: "m5.xlarge", region: "US East (N. Virginia)"}])
-}
-
-func (s *CostIntegrationSuite) TestGetProviderStatic() {
- settings := &EC2ProviderSettings{}
- settings.InstanceType = "m4.large"
- settings.IsVpc = true
-
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- s.m.provider = onDemandProvider
- provider, err := s.m.getProvider(ctx, s.h, settings)
- s.NoError(err)
- s.Equal(onDemandProvider, provider)
-
- s.m.provider = spotProvider
- provider, err = s.m.getProvider(ctx, s.h, settings)
- s.NoError(err)
- s.Equal(spotProvider, provider)
-
- s.m.provider = 5
- _, err = s.m.getProvider(ctx, s.h, settings)
- s.Error(err)
-
- s.m.provider = -5
- _, err = s.m.getProvider(ctx, s.h, settings)
- s.Error(err)
-}
-
-func (s *CostIntegrationSuite) TestGetProviderAuto() {
- s.h.Distro.Arch = "linux"
- settings := &EC2ProviderSettings{}
- s.m.provider = autoProvider
-
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
-
- m4LargeOnDemand, err := pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, getOsName(s.h), "m4.large", evergreen.DefaultEC2Region)
- s.InDelta(.1, m4LargeOnDemand, .05)
- s.NoError(err)
-
- t2MicroOnDemand, err := pkgCachingPriceFetcher.getEC2OnDemandCost(context.Background(), s.m.client, getOsName(s.h), "t2.micro", evergreen.DefaultEC2Region)
- s.InDelta(.0116, t2MicroOnDemand, .01)
- s.NoError(err)
-
- settings.InstanceType = "m4.large"
- settings.IsVpc = true
- m4LargeSpot, az, err := pkgCachingPriceFetcher.getLatestSpotCostForInstance(ctx, s.m.client, settings, getOsName(s.h), "")
- s.Contains(az, "us-east")
- s.True(m4LargeSpot > 0)
- s.NoError(err)
-
- settings.InstanceType = "t2.micro"
- settings.IsVpc = true
- t2MicroSpot, az, err := pkgCachingPriceFetcher.getLatestSpotCostForInstance(ctx, s.m.client, settings, getOsName(s.h), "")
- s.Contains(az, "us-east")
- s.True(t2MicroSpot > 0)
- s.NoError(err)
-
- settings.InstanceType = "m4.large"
- settings.IsVpc = true
- provider, err := s.m.getProvider(ctx, s.h, settings)
- s.NoError(err)
- if m4LargeSpot < m4LargeOnDemand {
- s.Equal(spotProvider, provider)
- s.Equal(evergreen.ProviderNameEc2Spot, s.h.Distro.Provider)
- } else {
- s.Equal(onDemandProvider, provider)
- s.Equal(evergreen.ProviderNameEc2OnDemand, s.h.Distro.Provider)
- }
-
- settings.InstanceType = "t2.micro"
- settings.IsVpc = true
- provider, err = s.m.getProvider(ctx, s.h, settings)
- s.NoError(err)
- if t2MicroSpot < t2MicroOnDemand {
- s.Equal(spotProvider, provider)
- s.Equal(evergreen.ProviderNameEc2Spot, s.h.Distro.Provider)
- } else {
- s.Equal(onDemandProvider, provider)
- s.Equal(evergreen.ProviderNameEc2OnDemand, s.h.Distro.Provider)
- }
-}
diff --git a/cloud/ec2_fleet.go b/cloud/ec2_fleet.go
index 7c4bd978cde..cddc8684821 100644
--- a/cloud/ec2_fleet.go
+++ b/cloud/ec2_fleet.go
@@ -7,7 +7,6 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/evergreen-ci/evergreen"
@@ -41,7 +40,7 @@ func (c instanceTypeSubnetCache) subnetsWithInstanceType(ctx context.Context, se
supportingAZs, err := c.getAZs(ctx, settings, client, instanceRegion)
if err != nil {
- return nil, errors.Wrap(err, "can't get supporting AZs")
+ return nil, errors.Wrap(err, "getting supported AZs")
}
subnets := make([]evergreen.Subnet, 0, len(supportingAZs))
@@ -64,10 +63,10 @@ func (c instanceTypeSubnetCache) getAZs(ctx context.Context, settings *evergreen
},
})
if err != nil {
- return nil, errors.Wrapf(err, "can't get instance types for '%s' in '%s'", instanceRegion.instanceType, instanceRegion.region)
+ return nil, errors.Wrapf(err, "getting instance types for filter '%s' in region '%s'", instanceRegion.instanceType, instanceRegion.region)
}
if output == nil {
- return nil, errors.Errorf("DescribeInstanceTypeOfferings returned nil output for instance type '%s' in '%s'", instanceRegion.instanceType, instanceRegion.region)
+ return nil, errors.Errorf("DescribeInstanceTypeOfferings returned nil output for instance type filter '%s' in '%s'", instanceRegion.instanceType, instanceRegion.region)
}
supportingAZs := make([]string, 0, len(output.InstanceTypeOfferings))
for _, offering := range output.InstanceTypeOfferings {
@@ -93,10 +92,6 @@ type ec2FleetManager struct {
env evergreen.Environment
}
-func (m *ec2FleetManager) GetSettings() ProviderSettings {
- return &EC2ProviderSettings{}
-}
-
func (m *ec2FleetManager) Configure(ctx context.Context, settings *evergreen.Settings) error {
m.settings = settings
@@ -107,7 +102,7 @@ func (m *ec2FleetManager) Configure(ctx context.Context, settings *evergreen.Set
var err error
m.providerKey, m.providerSecret, err = GetEC2Key(settings)
if err != nil {
- return errors.Wrap(err, "Problem getting EC2 keys")
+ return errors.Wrap(err, "getting EC2 keys")
}
if m.providerKey == "" || m.providerSecret == "" {
return errors.New("provider key/secret can't be empty")
@@ -123,21 +118,20 @@ func (m *ec2FleetManager) Configure(ctx context.Context, settings *evergreen.Set
func (m *ec2FleetManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
if h.Distro.Provider != evergreen.ProviderNameEc2Fleet {
- return nil, errors.Errorf("Can't spawn instance for distro %s: provider is %s",
- h.Distro.Id, h.Distro.Provider)
+ return nil, errors.Errorf("can't spawn instance for distro '%s': distro provider is '%s'", h.Distro.Id, h.Distro.Provider)
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return nil, errors.Wrap(err, "error creating client")
+ return nil, errors.Wrap(err, "creating client")
}
defer m.client.Close()
ec2Settings := &EC2ProviderSettings{}
if err := ec2Settings.FromDistroSettings(h.Distro, ""); err != nil {
- return nil, errors.Wrap(err, "error getting EC2 settings")
+ return nil, errors.Wrap(err, "getting EC2 settings")
}
if err := ec2Settings.Validate(); err != nil {
- return nil, errors.Wrapf(err, "Invalid EC2 settings in distro %s: %+v", h.Distro.Id, ec2Settings)
+ return nil, errors.Wrapf(err, "invalid EC2 settings in distro '%s': %+v", h.Distro.Id, ec2Settings)
}
if ec2Settings.KeyName == "" && !h.UserHost {
@@ -146,7 +140,7 @@ func (m *ec2FleetManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Ho
}
k, err := m.client.GetKey(ctx, h)
if err != nil {
- return nil, errors.Wrap(err, "not spawning host, problem creating key")
+ return nil, errors.Wrap(err, "getting public key")
}
ec2Settings.KeyName = k
}
@@ -172,17 +166,17 @@ func (m *ec2FleetManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Ho
}
func (m *ec2FleetManager) ModifyHost(context.Context, *host.Host, host.HostModifyOptions) error {
- return errors.New("can't modify instances for ec2 fleet provider")
+ return errors.New("can't modify instances for EC2 fleet provider")
}
-func (m *ec2FleetManager) GetInstanceStatuses(ctx context.Context, hosts []host.Host) ([]CloudStatus, error) {
+func (m *ec2FleetManager) GetInstanceStatuses(ctx context.Context, hosts []host.Host) (map[string]CloudStatus, error) {
instanceIDs := make([]*string, 0, len(hosts))
for _, h := range hosts {
instanceIDs = append(instanceIDs, aws.String(h.Id))
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return nil, errors.Wrap(err, "error creating client")
+ return nil, errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -197,43 +191,37 @@ func (m *ec2FleetManager) GetInstanceStatuses(ctx context.Context, hosts []host.
})
if err != nil {
- return nil, errors.Wrap(err, "error describing instances")
+ return nil, errors.Wrap(err, "describing instances")
}
if err = validateEc2DescribeInstancesOutput(describeInstancesOutput); err != nil {
return nil, errors.Wrap(err, "invalid describe instances response")
}
- if len(instanceIDs) != len(describeInstancesOutput.Reservations) {
- return nil, errors.Errorf("AWS returned %d statuses for %d hosts", len(describeInstancesOutput.Reservations), len(instanceIDs))
- }
-
+ statuses := map[string]CloudStatus{}
instanceMap := map[string]*ec2.Instance{}
for i := range describeInstancesOutput.Reservations {
instanceMap[*describeInstancesOutput.Reservations[i].Instances[0].InstanceId] = describeInstancesOutput.Reservations[i].Instances[0]
+ instanceInfo := describeInstancesOutput.Reservations[i].Instances[0]
+ instanceID := *instanceInfo.InstanceId
+ status := ec2StatusToEvergreenStatus(*instanceInfo.State.Name)
+ statuses[instanceID] = status
}
- // Return as an ordered slice of statuses
- runningHosts := 0
- statuses := []CloudStatus{}
- startAt = time.Now()
for _, h := range hosts {
- status := ec2StatusToEvergreenStatus(*instanceMap[h.Id].State.Name)
+ status, ok := statuses[h.Id]
+ if !ok {
+ statuses[h.Id] = StatusNonExistent
+ }
if status == StatusRunning {
// cache instance information so we can make fewer calls to AWS's API
grip.Error(message.WrapError(cacheHostData(ctx, &h, instanceMap[h.Id], m.client), message.Fields{
"message": "can't update host cached data",
"host_id": h.Id,
}))
- runningHosts += 1
}
- statuses = append(statuses, status)
}
- grip.Debug(message.Fields{
- "message": "finished caching host data",
- "num_hosts_running": runningHosts,
- "duration_secs": time.Since(startAt).Seconds(),
- })
+
return statuses, nil
}
@@ -241,22 +229,22 @@ func (m *ec2FleetManager) GetInstanceStatus(ctx context.Context, h *host.Host) (
status := StatusUnknown
if err := m.client.Create(m.credentials, m.region); err != nil {
- return status, errors.Wrap(err, "error creating client")
+ return status, errors.Wrap(err, "creating client")
}
defer m.client.Close()
instance, err := m.client.GetInstanceInfo(ctx, h.Id)
if err != nil {
+ if isEC2InstanceNotFound(err) {
+ return StatusNonExistent, nil
+ }
grip.Error(message.WrapError(err, message.Fields{
"message": "error getting instance info",
"host_id": h.Id,
"host_provider": h.Distro.Provider,
"distro": h.Distro.Id,
}))
- if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == EC2ErrorNotFound {
- return StatusNonExistent, nil
- }
- return status, errors.Wrap(err, "error getting instance info")
+ return status, errors.Wrap(err, "getting instance info")
}
if instance.State == nil || instance.State.Name == nil || *instance.State.Name == "" {
@@ -275,17 +263,17 @@ func (m *ec2FleetManager) GetInstanceStatus(ctx context.Context, h *host.Host) (
}
func (m *ec2FleetManager) SetPortMappings(context.Context, *host.Host, *host.Host) error {
- return errors.New("can't set port mappings with ec2 fleet provider")
+ return errors.New("can't set port mappings with EC2 fleet provider")
}
func (m *ec2FleetManager) CheckInstanceType(ctx context.Context, instanceType string) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
output, err := m.client.DescribeInstanceTypeOfferings(ctx, &ec2.DescribeInstanceTypeOfferingsInput{})
if err != nil {
- return errors.Wrapf(err, "error describe instance types offered for region '%s", m.region)
+ return errors.Wrapf(err, "describing instance types offered for region '%s", m.region)
}
validTypes := []string{}
for _, availableType := range output.InstanceTypeOfferings {
@@ -294,15 +282,15 @@ func (m *ec2FleetManager) CheckInstanceType(ctx context.Context, instanceType st
}
validTypes = append(validTypes, *availableType.InstanceType)
}
- return errors.Errorf("available types for region '%s' are: %v", m.region, validTypes)
+ return errors.Errorf("available types for region '%s' are: %s", m.region, validTypes)
}
func (m *ec2FleetManager) TerminateInstance(ctx context.Context, h *host.Host, user, reason string) error {
if h.Status == evergreen.HostTerminated {
- return errors.Errorf("Can not terminate %s - already marked as terminated!", h.Id)
+ return errors.Errorf("cannot terminate host '%s' because it's already marked as terminated", h.Id)
}
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -329,7 +317,7 @@ func (m *ec2FleetManager) TerminateInstance(ctx context.Context, h *host.Host, u
"host_id": h.Id,
"distro": h.Distro.Id,
})
- return errors.New("invalid terminate instances response")
+ return errors.New("TerminateInstances response did not contain an instance ID")
}
grip.Info(message.Fields{
"message": "terminated instance",
@@ -341,23 +329,23 @@ func (m *ec2FleetManager) TerminateInstance(ctx context.Context, h *host.Host, u
})
}
- return errors.Wrap(h.Terminate(user, reason), "failed to terminate instance in db")
+ return errors.Wrap(h.Terminate(user, reason), "terminating instance in DB")
}
// StopInstance should do nothing for EC2 Fleet.
func (m *ec2FleetManager) StopInstance(context.Context, *host.Host, string) error {
- return errors.New("can't stop instances for ec2 fleet provider")
+ return errors.New("can't stop instances for EC2 fleet provider")
}
// StartInstance should do nothing for EC2 Fleet.
func (m *ec2FleetManager) StartInstance(context.Context, *host.Host, string) error {
- return errors.New("can't start instances for ec2 fleet provider")
+ return errors.New("can't start instances for EC2 fleet provider")
}
func (m *ec2FleetManager) IsUp(ctx context.Context, h *host.Host) (bool, error) {
status, err := m.GetInstanceStatus(ctx, h)
if err != nil {
- return false, errors.Wrap(err, "error checking if instance is up")
+ return false, errors.Wrap(err, "checking if instance is up")
}
if status == StatusRunning {
return true, nil
@@ -372,7 +360,7 @@ func (m *ec2FleetManager) OnUp(ctx context.Context, h *host.Host) error {
func (m *ec2FleetManager) Cleanup(ctx context.Context) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -409,32 +397,32 @@ func (m *ec2FleetManager) Cleanup(ctx context.Context) error {
}
func (m *ec2FleetManager) AttachVolume(context.Context, *host.Host, *host.VolumeAttachment) error {
- return errors.New("can't attach volume with ec2 fleet provider")
+ return errors.New("can't attach volume with EC2 fleet provider")
}
func (m *ec2FleetManager) DetachVolume(context.Context, *host.Host, string) error {
- return errors.New("can't detach volume with ec2 fleet provider")
+ return errors.New("can't detach volume with EC2 fleet provider")
}
func (m *ec2FleetManager) CreateVolume(context.Context, *host.Volume) (*host.Volume, error) {
- return nil, errors.New("can't create volume with ec2 fleet provider")
+ return nil, errors.New("can't create volume with EC2 fleet provider")
}
func (m *ec2FleetManager) DeleteVolume(context.Context, *host.Volume) error {
- return errors.New("can't delete volume with ec2 fleet provider")
+ return errors.New("can't delete volume with EC2 fleet provider")
}
func (m *ec2FleetManager) ModifyVolume(context.Context, *host.Volume, *model.VolumeModifyOptions) error {
- return errors.New("can't modify volume with ec2 fleet provider")
+ return errors.New("can't modify volume with EC2 fleet provider")
}
-func (m *ec2FleetManager) GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error) {
- return nil, errors.New("can't get volume attachment with ec2 fleet provider")
+func (m *ec2FleetManager) GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error) {
+ return nil, errors.New("can't get volume attachment with EC2 fleet provider")
}
func (m *ec2FleetManager) GetDNSName(ctx context.Context, h *host.Host) (string, error) {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return "", errors.Wrap(err, "error creating client")
+ return "", errors.Wrap(err, "creating client")
}
defer m.client.Close()
@@ -457,12 +445,12 @@ func (m *ec2FleetManager) spawnFleetSpotHost(ctx context.Context, h *host.Host,
}()
if err := m.uploadLaunchTemplate(ctx, h, ec2Settings); err != nil {
- return errors.Wrapf(err, "unable to upload launch template for '%s'", h.Id)
+ return errors.Wrapf(err, "unable to upload launch template for host '%s'", h.Id)
}
instanceID, err := m.requestFleet(ctx, h, ec2Settings)
if err != nil {
- return errors.Wrapf(err, "can't request fleet")
+ return errors.Wrapf(err, "requesting fleet")
}
h.Id = *instanceID
@@ -472,7 +460,7 @@ func (m *ec2FleetManager) spawnFleetSpotHost(ctx context.Context, h *host.Host,
func (m *ec2FleetManager) uploadLaunchTemplate(ctx context.Context, h *host.Host, ec2Settings *EC2ProviderSettings) error {
blockDevices, err := makeBlockDeviceMappingsTemplate(ec2Settings.MountPoints)
if err != nil {
- return errors.Wrap(err, "error making block device mappings")
+ return errors.Wrap(err, "making block device mappings")
}
launchTemplate := &ec2.RequestLaunchTemplateData{
@@ -483,6 +471,10 @@ func (m *ec2FleetManager) uploadLaunchTemplate(ctx context.Context, h *host.Host
TagSpecifications: makeTagTemplate(makeTags(h)),
}
+ if ec2Settings.IAMInstanceProfileARN != "" {
+ launchTemplate.IamInstanceProfile = &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{Arn: aws.String(ec2Settings.IAMInstanceProfileARN)}
+ }
+
if ec2Settings.IsVpc {
launchTemplate.NetworkInterfaces = []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{
{
@@ -508,7 +500,7 @@ func (m *ec2FleetManager) uploadLaunchTemplate(ctx context.Context, h *host.Host
settings.ServiceFlags = *flags
userData, err := makeUserData(ctx, &settings, h, ec2Settings.UserData, ec2Settings.MergeUserDataParts)
if err != nil {
- return errors.Wrap(err, "could not make user data")
+ return errors.Wrap(err, "making user data")
}
ec2Settings.UserData = userData
@@ -516,7 +508,7 @@ func (m *ec2FleetManager) uploadLaunchTemplate(ctx context.Context, h *host.Host
var expanded string
expanded, err = expandUserData(ec2Settings.UserData, m.settings.Expansions)
if err != nil {
- return errors.Wrap(err, "problem expanding user data")
+ return errors.Wrap(err, "expanding user data")
}
if err = validateUserDataSize(expanded, h.Distro.Id); err != nil {
return errors.WithStack(err)
@@ -541,7 +533,7 @@ func (m *ec2FleetManager) uploadLaunchTemplate(ctx context.Context, h *host.Host
"host_tag": h.Tag,
})
} else {
- return errors.Wrap(err, "can't upload config template to AWS")
+ return errors.Wrap(err, "uploading config template to AWS")
}
}
@@ -554,7 +546,7 @@ func (m *ec2FleetManager) requestFleet(ctx context.Context, h *host.Host, ec2Set
if ec2Settings.VpcName != "" {
overrides, err = m.makeOverrides(ctx, ec2Settings)
if err != nil {
- return nil, errors.Wrapf(err, "can't make overrides for VPC '%s'", ec2Settings.VpcName)
+ return nil, errors.Wrapf(err, "making overrides for VPC '%s'", ec2Settings.VpcName)
}
}
@@ -582,7 +574,7 @@ func (m *ec2FleetManager) requestFleet(ctx context.Context, h *host.Host, ec2Set
createFleetResponse, err := m.client.CreateFleet(ctx, createFleetInput)
if err != nil {
- return nil, errors.Wrap(err, "error creating fleet")
+ return nil, errors.Wrap(err, "creating fleet")
}
return createFleetResponse.Instances[0].InstanceIds[0], nil
}
@@ -595,7 +587,7 @@ func (m *ec2FleetManager) makeOverrides(ctx context.Context, ec2Settings *EC2Pro
supportingSubnets, err := typeCache.subnetsWithInstanceType(ctx, m.settings, m.client, instanceRegionPair{instanceType: ec2Settings.InstanceType, region: ec2Settings.getRegion()})
if err != nil {
- return nil, errors.Wrapf(err, "can't get AZs supporting instance type '%s'", ec2Settings.InstanceType)
+ return nil, errors.Wrapf(err, "getting AZs supporting instance type '%s'", ec2Settings.InstanceType)
}
if len(supportingSubnets) == 0 || (len(supportingSubnets) == 1 && supportingSubnets[0].SubnetID == ec2Settings.SubnetId) {
return nil, nil
@@ -623,9 +615,9 @@ func subnetMatchesAz(subnet *ec2.Subnet) bool {
func (m *ec2FleetManager) AddSSHKey(ctx context.Context, pair evergreen.SSHKeyPair) error {
if err := m.client.Create(m.credentials, m.region); err != nil {
- return errors.Wrap(err, "error creating client")
+ return errors.Wrap(err, "creating client")
}
defer m.client.Close()
- return errors.Wrap(addSSHKey(ctx, m.client, pair), "could not add SSH key")
+ return errors.Wrap(addSSHKey(ctx, m.client, pair), "adding public SSH key")
}
diff --git a/cloud/ec2_fleet_test.go b/cloud/ec2_fleet_test.go
index 41379f913e4..2e86d6cc01a 100644
--- a/cloud/ec2_fleet_test.go
+++ b/cloud/ec2_fleet_test.go
@@ -6,6 +6,7 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/evergreen-ci/birch"
@@ -13,6 +14,7 @@ import (
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/host"
+ "github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -32,6 +34,7 @@ func TestFleet(t *testing.T) {
statuses, err := m.GetInstanceStatuses(context.Background(), hosts)
assert.NoError(t, err)
+ assert.Len(t, statuses, len(hosts), "should return same number of statuses as there are hosts")
for _, status := range statuses {
assert.Equal(t, StatusRunning, status)
}
@@ -54,6 +57,22 @@ func TestFleet(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "us-east-1a", hDb.Zone)
},
+ "GetInstanceStatusNonExistentInstance": func(*testing.T) {
+ awsError := awserr.New(EC2ErrorNotFound, "The instance ID 'test-id' does not exist", nil)
+ wrappedAwsError := errors.Wrap(awsError, "EC2 API returned error for DescribeInstances")
+ mockClient := m.client.(*awsClientMock)
+ mockClient.RequestGetInstanceInfoError = wrappedAwsError
+ status, err := m.GetInstanceStatus(context.Background(), h)
+ assert.NoError(t, err)
+ assert.Equal(t, StatusNonExistent, status)
+ },
+ "GetInstanceStatusNonExistentReservation": func(*testing.T) {
+ mockClient := m.client.(*awsClientMock)
+ mockClient.RequestGetInstanceInfoError = noReservationError
+ status, err := m.GetInstanceStatus(context.Background(), h)
+ assert.NoError(t, err)
+ assert.Equal(t, StatusNonExistent, status)
+ },
"TerminateInstance": func(*testing.T) {
assert.NoError(t, m.TerminateInstance(context.Background(), h, "evergreen", ""))
@@ -77,7 +96,7 @@ func TestFleet(t *testing.T) {
assert.Equal(t, "ht_1", *mockClient.DeleteLaunchTemplateInput.LaunchTemplateName)
},
"RequestFleet": func(*testing.T) {
- ec2Settings := &EC2ProviderSettings{VpcName: "my_vpc", InstanceType: "instanceType0"}
+ ec2Settings := &EC2ProviderSettings{VpcName: "my_vpc", InstanceType: "instanceType0", IAMInstanceProfileARN: "my-profile"}
instanceID, err := m.requestFleet(context.Background(), h, ec2Settings)
assert.NoError(t, err)
@@ -89,7 +108,8 @@ func TestFleet(t *testing.T) {
},
"MakeOverrides": func(*testing.T) {
ec2Settings := &EC2ProviderSettings{
- InstanceType: "instanceType0",
+ InstanceType: "instanceType0",
+ IAMInstanceProfileARN: "my-profile",
}
overrides, err := m.makeOverrides(context.Background(), ec2Settings)
assert.NoError(t, err)
@@ -104,8 +124,9 @@ func TestFleet(t *testing.T) {
assert.Nil(t, overrides)
ec2Settings = &EC2ProviderSettings{
- InstanceType: "instanceType0",
- SubnetId: "subnet-654321",
+ InstanceType: "instanceType0",
+ IAMInstanceProfileARN: "my-profile",
+ SubnetId: "subnet-654321",
}
overrides, err = m.makeOverrides(context.Background(), ec2Settings)
assert.NoError(t, err)
diff --git a/cloud/ec2_integration_test.go b/cloud/ec2_integration_test.go
index 36cfb00cbfb..7c8be1d45ee 100644
--- a/cloud/ec2_integration_test.go
+++ b/cloud/ec2_integration_test.go
@@ -1,3 +1,4 @@
+//go:build !race
// +build !race
package cloud
@@ -65,7 +66,7 @@ func TestSpawnEC2InstanceOnDemand(t *testing.T) {
env := testutil.NewEnvironment(ctx, t)
testConfig := env.Settings()
- testutil.ConfigureIntegrationTest(t, testConfig, "TestSpawnEC2Instance")
+ testutil.ConfigureIntegrationTest(t, testConfig, t.Name())
require.NoError(db.Clear(host.Collection))
opts := &EC2ManagerOptions{
@@ -112,7 +113,7 @@ func TestSpawnEC2InstanceSpot(t *testing.T) {
env := testutil.NewEnvironment(ctx, t)
testConfig := env.Settings()
- testutil.ConfigureIntegrationTest(t, testConfig, "TestSpawnSpotInstance")
+ testutil.ConfigureIntegrationTest(t, testConfig, t.Name())
require.NoError(db.Clear(host.Collection))
opts := &EC2ManagerOptions{
client: &awsClientImpl{},
@@ -152,7 +153,7 @@ func (s *EC2Suite) TestGetInstanceInfoFailsEarlyForSpotInstanceRequests() {
info, err := m.client.GetInstanceInfo(ctx, "sir-123456")
s.Nil(info)
- s.Errorf(err, "id appears to be a spot instance request ID, not a host ID (\"sir-123456\")")
+ s.Errorf(err, "ID 'sir-123456' appears to be a spot instance request ID, not a host ID")
}
func (s *EC2Suite) TestGetInstanceInfoFailsEarlyForIntentHosts() {
diff --git a/cloud/ec2_price.go b/cloud/ec2_price.go
deleted file mode 100644
index f215b26fb02..00000000000
--- a/cloud/ec2_price.go
+++ /dev/null
@@ -1,437 +0,0 @@
-package cloud
-
-import (
- "context"
- "fmt"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/service/ec2"
- "github.com/aws/aws-sdk-go/service/pricing"
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/model/host"
- "github.com/mongodb/grip"
- "github.com/mongodb/grip/message"
- "github.com/pkg/errors"
-)
-
-const spotPriceCacheTTL = 2 * time.Minute
-
-type cachingPriceFetcher struct {
- ec2Prices map[odInfo]float64
- spotPrices map[string]cachedSpotRate
- sync.RWMutex
-}
-
-type cachedSpotRate struct {
- collectedAt time.Time
-}
-
-// spotRate is an internal type for simplifying Amazon's price history responses.
-type spotRate struct {
- Time time.Time
- Price float64
- Zone string
-}
-
-var pkgCachingPriceFetcher *cachingPriceFetcher
-
-func init() {
- pkgCachingPriceFetcher = new(cachingPriceFetcher)
- pkgCachingPriceFetcher.spotPrices = make(map[string]cachedSpotRate)
-}
-
-func (cpf *cachingPriceFetcher) getEC2OnDemandCost(ctx context.Context, client AWSClient, osEC2Name osType, instance, region string) (float64, error) {
- if cpf.ec2Prices == nil {
- cpf.Lock()
- cpf.ec2Prices = map[odInfo]float64{}
- cpf.Unlock()
- }
-
- // convert to pricing api strings
- osPriceName := osBillingName(osEC2Name)
- region, err := regionFullname(region)
- if err != nil {
- return 0, err
- }
-
- cpf.RLock()
- if val, ok := cpf.ec2Prices[odInfo{
- os: osPriceName, instance: instance, region: region,
- }]; ok {
- cpf.RUnlock()
- return val, nil
- }
- cpf.RUnlock()
-
- getProductsInput := cpf.makeGetProductsInput(odInfo{os: osPriceName, instance: instance, region: region})
- out, err := client.GetProducts(ctx, getProductsInput)
- if err != nil {
- return 0, errors.Wrap(err, "problem querying for pricing data")
- }
-
- p, err := cpf.parseAWSPricing(out)
- if err != nil {
- return 0, errors.Wrap(err, "problem parsing aws pricing")
- }
- cpf.Lock()
- defer cpf.Unlock()
- cpf.ec2Prices[odInfo{os: osPriceName, instance: instance, region: region}] = p
- return p, nil
-}
-
-func (cpf *cachingPriceFetcher) makeGetProductsInput(info odInfo) *pricing.GetProductsInput {
- const match = "TERM_MATCH"
- constructGetProductsInput := &pricing.GetProductsInput{
- Filters: []*pricing.Filter{
- {
- Field: aws.String("ServiceCode"),
- Type: aws.String(match),
- Value: aws.String("AmazonEC2"),
- },
- {
- Field: aws.String("productFamily"),
- Type: aws.String(match),
- Value: aws.String("Compute Instance"),
- },
- {
- Field: aws.String("preInstalledSw"),
- Type: aws.String(match),
- Value: aws.String("NA"),
- },
- {
- Field: aws.String("tenancy"),
- Type: aws.String(match),
- Value: aws.String("Shared"),
- },
- {
- Field: aws.String("capacityStatus"),
- Type: aws.String(match),
- Value: aws.String("UnusedCapacityReservation"),
- },
- {
- Field: aws.String("instanceType"),
- Type: aws.String(match),
- Value: aws.String(info.instance),
- },
- {
- Field: aws.String("operatingSystem"),
- Type: aws.String(match),
- Value: aws.String(info.os),
- },
- {
- Field: aws.String("location"),
- Type: aws.String(match),
- Value: aws.String(info.region),
- },
- },
- ServiceCode: aws.String("AmazonEC2"),
- }
- return constructGetProductsInput
-}
-
-// Parse a JSON document like this one
-// {
-// "version": "20181031070014",
-// "terms": {
-// "OnDemand": {
-// "XCH2WN4F4MYH63N8.JRTCKXETXF": {
-// "termAttributes": {
-// },
-// "sku": "XCH2WN4F4MYH63N8",
-// "priceDimensions": {
-// "XCH2WN4F4MYH63N8.JRTCKXETXF.6YS6EN2CT7": {
-// "unit": "Hrs",
-// "rateCode": "XCH2WN4F4MYH63N8.JRTCKXETXF.6YS6EN2CT7",
-// "pricePerUnit": {
-// "USD": "0.8400000000"
-// },
-// "endRange": "Inf",
-// "description": "$0.840 per Unused Reservation Linux c3.4xlarge Instance Hour",
-// "beginRange": "0",
-// "appliesTo": []
-// }
-// },
-// "offerTermCode": "JRTCKXETXF",
-// "effectiveDate": "2018-10-01T00:00:00Z"
-// }
-// }
-// },
-// [...]
-func (cpf *cachingPriceFetcher) parseAWSPricing(out *pricing.GetProductsOutput) (float64, error) {
- if len(out.PriceList) != 1 {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- terms, ok := out.PriceList[0]["terms"]
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- termsMap, ok := terms.(map[string]interface{})
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- onDemand, ok := termsMap["OnDemand"]
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- onDemandMap, ok := onDemand.(map[string]interface{})
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- var priceDimensionMap map[string]interface{}
- for _, v := range onDemandMap {
- onDemandMapComponent, ok := v.(map[string]interface{})
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- priceDimension, ok := onDemandMapComponent["priceDimensions"]
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- priceDimensionMap, ok = priceDimension.(map[string]interface{})
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- }
- var price string
- for _, v := range priceDimensionMap {
- priceDimensionComponent, ok := v.(map[string]interface{})
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- pricePerUnit, ok := priceDimensionComponent["pricePerUnit"]
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- pricePerUnitMap, ok := pricePerUnit.(map[string]interface{})
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- USD, ok := pricePerUnitMap["USD"]
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- price, ok = USD.(string)
- if !ok {
- return 0, errors.Errorf("problem parsing price list %v", out.PriceList)
- }
- }
- p, err := strconv.ParseFloat(price, 64)
- if err != nil {
- return 0, errors.Wrapf(err, "problem parsing %s as int", price)
- }
- return p, nil
-}
-
-// getLatestSpotCostForInstance gets the latest price for a spot instance in the given zone
-// pass an empty zone to find the lowest priced zone
-func (cpf *cachingPriceFetcher) getLatestSpotCostForInstance(ctx context.Context, client AWSClient, settings *EC2ProviderSettings, os osType, zone string) (float64, string, error) {
- osName := string(os)
- if settings.IsVpc {
- osName += " (Amazon VPC)"
- }
-
- grip.Debug(message.Fields{
- "message": "getting spot history",
- "instance_type": settings.InstanceType,
- "function": "getLatestSpotCostForInstance",
- "start_time": "future",
- })
-
- args := hourlySpotPriceHistoryInput{
- iType: settings.InstanceType,
- os: osType(osName),
- // passing a future start time gets the latest price only
- start: time.Now().UTC().Add(24 * time.Hour),
- end: time.Now().UTC().Add(25 * time.Hour),
- zone: zone,
- }
-
- prices, err := cpf.describeSpotPriceHistory(ctx, client, args)
- if err != nil {
- return 0, "", errors.WithStack(err)
- }
- if len(prices) == 0 {
- return 0, "", errors.New("no prices found")
- }
-
- var min float64
- var az string
- for i := range prices {
- p, err := strconv.ParseFloat(*prices[i].SpotPrice, 64)
- if err != nil {
- return 0, "", errors.Wrapf(err, "problem parsing %s", *prices[i].SpotPrice)
- }
- if min == 0 || p < min {
- min = p
- az = *prices[i].AvailabilityZone
- }
- }
- return min, az, nil
-}
-
-func (m *ec2Manager) getProvider(ctx context.Context, h *host.Host, ec2settings *EC2ProviderSettings) (ec2ProviderType, error) {
- var (
- err error
- onDemandPrice float64
- spotPrice float64
- az string
- )
- if h.UserHost || m.provider == onDemandProvider {
- h.Distro.Provider = evergreen.ProviderNameEc2OnDemand
- return onDemandProvider, nil
- }
- if m.provider == spotProvider {
- h.Distro.Provider = evergreen.ProviderNameEc2Spot
- return spotProvider, nil
- }
- if m.provider == autoProvider {
- // The price fetcher tool is only used for the default region.
- // Suppress errors, because this isn't crucial to determining the provider type.
- if ec2settings.getRegion() == evergreen.DefaultEC2Region {
- if h.UserHost || m.provider == onDemandProvider || m.provider == autoProvider {
- onDemandPrice, err = pkgCachingPriceFetcher.getEC2OnDemandCost(ctx, m.client, getOsName(h), ec2settings.InstanceType, ec2settings.getRegion())
- grip.Error(message.WrapError(err, message.Fields{
- "message": "problem getting ec2 on-demand cost",
- "host": h.Id,
- }))
- }
- if m.provider == spotProvider || m.provider == autoProvider {
- // passing empty zone to find the "best"
- spotPrice, az, err = pkgCachingPriceFetcher.getLatestSpotCostForInstance(ctx, m.client, ec2settings, getOsName(h), "")
- grip.Error(message.WrapError(err, message.Fields{
- "message": "problem getting latest ec2 spot price",
- "host": h.Id,
- }))
- }
- }
-
- if spotPrice < onDemandPrice {
- ec2settings.BidPrice = onDemandPrice
- if ec2settings.VpcName != "" {
- subnetID, err := m.getSubnetForAZ(ctx, az, ec2settings.VpcName)
- if err != nil {
- return 0, errors.Wrap(err, "error settings dynamic subnet for spot")
- }
- ec2settings.SubnetId = subnetID
- }
- h.Distro.Provider = evergreen.ProviderNameEc2Spot
- return spotProvider, nil
- }
- h.Distro.Provider = evergreen.ProviderNameEc2OnDemand
- return onDemandProvider, nil
- }
- return 0, errors.Errorf("provider is %d, expected %d, %d, or %d", m.provider, onDemandProvider, spotProvider, autoProvider)
-}
-
-func (m *ec2Manager) getSubnetForAZ(ctx context.Context, azName, vpcName string) (string, error) {
- vpcs, err := m.client.DescribeVpcs(ctx, &ec2.DescribeVpcsInput{
- Filters: []*ec2.Filter{
- &ec2.Filter{
- Name: aws.String("tag:Name"),
- Values: []*string{
- aws.String(vpcName),
- },
- },
- },
- })
- if err != nil {
- return "", errors.Wrap(err, "error finding vpc id")
- }
- vpcID := *vpcs.Vpcs[0].VpcId
-
- subnets, err := m.client.DescribeSubnets(ctx, &ec2.DescribeSubnetsInput{
- Filters: []*ec2.Filter{
- &ec2.Filter{
- Name: aws.String("vpc-id"),
- Values: []*string{aws.String(vpcID)},
- },
- &ec2.Filter{
- Name: aws.String("availability-zone"),
- Values: []*string{aws.String(azName)},
- },
- &ec2.Filter{
- Name: aws.String("tag:Name"),
- Values: []*string{aws.String(vpcName + ".subnet_" + strings.Split(azName, "-")[2])},
- },
- },
- })
- if err != nil {
- return "", errors.Wrap(err, "error finding subnet id")
- }
- return *subnets.Subnets[0].SubnetId, nil
-}
-
-type hourlySpotPriceHistoryInput struct {
- iType string
- zone string
- os osType
- start time.Time
- end time.Time
-}
-
-func (i hourlySpotPriceHistoryInput) String() string {
- return fmt.Sprintln(i.iType, i.zone, i.os, i.start.Round(spotPriceCacheTTL).Unix())
-}
-
-// describeHourlySpotPriceHistory talks to Amazon to get spot price history
-func (cpf *cachingPriceFetcher) describeSpotPriceHistory(ctx context.Context, client AWSClient, input hourlySpotPriceHistoryInput) ([]*ec2.SpotPrice, error) {
- cpf.Lock()
- defer cpf.Unlock()
-
- cleanedNum := 0
- for k, v := range cpf.spotPrices {
- if time.Since(v.collectedAt) > spotPriceCacheTTL {
- cleanedNum++
- delete(cpf.spotPrices, k)
- }
- }
- grip.DebugWhen(cleanedNum > 0, message.Fields{
- "message": "cleaned cached spot prices",
- "ttl_secs": spotPriceCacheTTL.Seconds(),
- "expired": cleanedNum,
- "remaining": len(cpf.spotPrices),
- })
-
- // expand times to contain the full runtime of the host
- startFilter, endFilter := input.start.Add(-time.Hour), input.end.Add(time.Hour)
- osStr := string(input.os)
- grip.Debug(message.Fields{
- "instance_type": &input.iType,
- "start_time": &startFilter,
- "end_time": &endFilter,
- "function": "describeHourlySpotPriceHistory",
- })
- filter := &ec2.DescribeSpotPriceHistoryInput{
- InstanceTypes: []*string{&input.iType},
- ProductDescriptions: []*string{&osStr},
- AvailabilityZone: &input.zone,
- StartTime: &startFilter,
- EndTime: &endFilter,
- }
- // iterate through all pages of results (the helper that does this for us appears to be broken)
- history := []*ec2.SpotPrice{}
- for {
- h, err := client.DescribeSpotPriceHistory(ctx, filter)
- if err != nil {
- return nil, errors.WithStack(err)
- }
- history = append(history, h.SpotPriceHistory...)
- if h.NextToken != nil && *h.NextToken != "" {
- filter.NextToken = h.NextToken
- } else {
- break
- }
- }
- return history, nil
-}
-
-func getOsName(h *host.Host) osType {
- if strings.Contains(h.Distro.Arch, "windows") {
- return osWindows
- }
- return osLinux
-}
diff --git a/cloud/ec2_test.go b/cloud/ec2_test.go
index a9c3806be27..f046bd6f1d1 100644
--- a/cloud/ec2_test.go
+++ b/cloud/ec2_test.go
@@ -37,8 +37,6 @@ type EC2Suite struct {
onDemandWithRegionManager Manager
spotOpts *EC2ManagerOptions
spotManager Manager
- autoOpts *EC2ManagerOptions
- autoManager Manager
impl *ec2Manager
mock *awsClientMock
h *host.Host
@@ -92,14 +90,6 @@ func (s *EC2Suite) SetupTest() {
_ = s.spotManager.Configure(s.ctx, &evergreen.Settings{
Expansions: map[string]string{"test": "expand"},
})
- s.autoOpts = &EC2ManagerOptions{
- client: &awsClientMock{},
- provider: autoProvider,
- }
- s.autoManager = &ec2Manager{env: s.env, EC2ManagerOptions: s.autoOpts}
- _ = s.autoManager.Configure(s.ctx, &evergreen.Settings{
- Expansions: map[string]string{"test": "expand"},
- })
var ok bool
s.impl, ok = s.onDemandManager.(*ec2Manager)
s.Require().True(ok)
@@ -291,10 +281,6 @@ func (s *EC2Suite) TestMakeDeviceMappingsTemplate() {
s.Equal("snapshot-1", *b[0].Ebs.SnapshotId)
}
-func (s *EC2Suite) TestGetSettings() {
- s.Equal(&EC2ProviderSettings{}, s.onDemandManager.GetSettings())
-}
-
func (s *EC2Suite) TestConfigure() {
settings := &evergreen.Settings{}
ctx, cancel := context.WithCancel(s.ctx)
@@ -338,13 +324,10 @@ func (s *EC2Suite) TestSpawnHostInvalidInput() {
spawned, err := s.onDemandManager.SpawnHost(ctx, h)
s.Nil(spawned)
s.Error(err)
- s.EqualError(err, "Can't spawn instance for distro id: provider is foo")
+ s.EqualError(err, "can't spawn EC2 instance for distro 'id': distro provider is 'foo'")
}
func (s *EC2Suite) TestSpawnHostClassicOnDemand() {
- pkgCachingPriceFetcher.ec2Prices = map[odInfo]float64{
- odInfo{"Linux", "instanceType", "US East (N. Virginia)"}: .1,
- }
s.h.Distro.Id = "distro_id"
s.h.Distro.Provider = evergreen.ProviderNameEc2OnDemand
s.h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
@@ -355,6 +338,7 @@ func (s *EC2Suite) TestSpawnHostClassicOnDemand() {
birch.EC.String("user_data", someUserData),
birch.EC.String("region", evergreen.DefaultEC2Region),
birch.EC.SliceString("security_group_ids", []string{"sg-123456"}),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.Array("mount_points", birch.NewArray(
birch.VC.Document(birch.NewDocument(
birch.EC.String("device_name", "device"),
@@ -383,21 +367,20 @@ func (s *EC2Suite) TestSpawnHostClassicOnDemand() {
s.Equal("virtual", *runInput.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *runInput.BlockDeviceMappings[0].DeviceName)
s.Equal("sg-123456", *runInput.SecurityGroups[0])
+ s.Equal("my_profile", *runInput.IamInstanceProfile.Arn)
s.Nil(runInput.SecurityGroupIds)
s.Nil(runInput.SubnetId)
s.Equal(base64OfSomeUserData, *runInput.UserData)
}
func (s *EC2Suite) TestSpawnHostVPCOnDemand() {
- pkgCachingPriceFetcher.ec2Prices = map[odInfo]float64{
- odInfo{"Linux", "instanceType", "US East (N. Virginia)"}: .1,
- }
h := &host.Host{}
h.Distro.Id = "distro_id"
h.Distro.Provider = evergreen.ProviderNameEc2OnDemand
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", "keyName"),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -428,6 +411,7 @@ func (s *EC2Suite) TestSpawnHostVPCOnDemand() {
runInput := *mock.RunInstancesInput
s.Equal("ami", *runInput.ImageId)
s.Equal("instanceType", *runInput.InstanceType)
+ s.Equal("my_profile", *runInput.IamInstanceProfile.Arn)
s.Equal("keyName", *runInput.KeyName)
s.Equal("virtual", *runInput.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *runInput.BlockDeviceMappings[0].DeviceName)
@@ -444,6 +428,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpot() {
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", "keyName"),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -473,6 +458,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpot() {
requestInput := *mock.RequestSpotInstancesInput
s.Equal("ami", *requestInput.LaunchSpecification.ImageId)
s.Equal("instanceType", *requestInput.LaunchSpecification.InstanceType)
+ s.Equal("my_profile", *requestInput.LaunchSpecification.IamInstanceProfile.Arn)
s.Equal("keyName", *requestInput.LaunchSpecification.KeyName)
s.Equal("virtual", *requestInput.LaunchSpecification.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *requestInput.LaunchSpecification.BlockDeviceMappings[0].DeviceName)
@@ -489,6 +475,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpotInsufficientCapacityFallback() {
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", "keyName"),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -525,6 +512,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpotInsufficientCapacityFallback() {
requestInput := *mock.RequestSpotInstancesInput
s.Equal("ami", *requestInput.LaunchSpecification.ImageId)
s.Equal("instanceType", *requestInput.LaunchSpecification.InstanceType)
+ s.Equal("my_profile", *requestInput.LaunchSpecification.IamInstanceProfile.Arn)
s.Equal("keyName", *requestInput.LaunchSpecification.KeyName)
s.Equal("virtual", *requestInput.LaunchSpecification.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *requestInput.LaunchSpecification.BlockDeviceMappings[0].DeviceName)
@@ -538,6 +526,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpotInsufficientCapacityFallback() {
runInput := *mock.RunInstancesInput
s.Equal("ami", *runInput.ImageId)
s.Equal("instanceType", *runInput.InstanceType)
+ s.Equal("my_profile", *runInput.IamInstanceProfile.Arn)
s.Equal("keyName", *runInput.KeyName)
s.Require().Len(runInput.BlockDeviceMappings, 1)
s.Equal("virtual", *runInput.BlockDeviceMappings[0].VirtualName)
@@ -555,6 +544,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpotUnfulfillableCapacityFallback() {
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", "keyName"),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -591,6 +581,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpotUnfulfillableCapacityFallback() {
requestInput := *mock.RequestSpotInstancesInput
s.Equal("ami", *requestInput.LaunchSpecification.ImageId)
s.Equal("instanceType", *requestInput.LaunchSpecification.InstanceType)
+ s.Equal("my_profile", *requestInput.LaunchSpecification.IamInstanceProfile.Arn)
s.Equal("keyName", *requestInput.LaunchSpecification.KeyName)
s.Equal("virtual", *requestInput.LaunchSpecification.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *requestInput.LaunchSpecification.BlockDeviceMappings[0].DeviceName)
@@ -604,6 +595,7 @@ func (s *EC2Suite) TestSpawnHostClassicSpotUnfulfillableCapacityFallback() {
runInput := *mock.RunInstancesInput
s.Equal("ami", *runInput.ImageId)
s.Equal("instanceType", *runInput.InstanceType)
+ s.Equal("my_profile", *runInput.IamInstanceProfile.Arn)
s.Equal("keyName", *runInput.KeyName)
s.Require().Len(runInput.BlockDeviceMappings, 1)
s.Equal("virtual", *runInput.BlockDeviceMappings[0].VirtualName)
@@ -621,6 +613,7 @@ func (s *EC2Suite) TestSpawnHostVPCSpot() {
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", "keyName"),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -650,6 +643,7 @@ func (s *EC2Suite) TestSpawnHostVPCSpot() {
requestInput := *mock.RequestSpotInstancesInput
s.Equal("ami", *requestInput.LaunchSpecification.ImageId)
s.Equal("instanceType", *requestInput.LaunchSpecification.InstanceType)
+ s.Equal("my_profile", *requestInput.LaunchSpecification.IamInstanceProfile.Arn)
s.Equal("keyName", *requestInput.LaunchSpecification.KeyName)
s.Equal("virtual", *requestInput.LaunchSpecification.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *requestInput.LaunchSpecification.BlockDeviceMappings[0].DeviceName)
@@ -666,6 +660,7 @@ func (s *EC2Suite) TestNoKeyAndNotSpawnHostForTaskShouldFail() {
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", ""),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -695,6 +690,7 @@ func (s *EC2Suite) TestSpawnHostForTask() {
h.Distro.ProviderSettingsList = []*birch.Document{birch.NewDocument(
birch.EC.String("ami", "ami"),
birch.EC.String("instance_type", "instanceType"),
+ birch.EC.String("iam_instance_profile_arn", "my_profile"),
birch.EC.String("key_name", ""),
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.String("user_data", someUserData),
@@ -743,6 +739,7 @@ func (s *EC2Suite) TestSpawnHostForTask() {
runInput := *mock.RunInstancesInput
s.Equal("ami", *runInput.ImageId)
s.Equal("instanceType", *runInput.InstanceType)
+ s.Equal("my_profile", *runInput.IamInstanceProfile.Arn)
s.Equal("evg_auto_evergreen", *runInput.KeyName)
s.Equal("virtual", *runInput.BlockDeviceMappings[0].VirtualName)
s.Equal("device", *runInput.BlockDeviceMappings[0].DeviceName)
@@ -755,7 +752,7 @@ func (s *EC2Suite) TestSpawnHostForTask() {
func (s *EC2Suite) TestModifyHost() {
changes := host.HostModifyOptions{
AddInstanceTags: []host.Tag{
- host.Tag{
+ {
Key: "key-2",
Value: "val-2",
CanBeModified: true,
@@ -773,19 +770,36 @@ func (s *EC2Suite) TestModifyHost() {
s.Error(s.onDemandManager.ModifyHost(ctx, s.h, changes))
s.Require().NoError(s.h.Remove())
+ s.h.CreationTime = time.Now()
+ s.h.ExpirationTime = s.h.CreationTime.Add(time.Hour * 24 * 7)
+ s.h.NoExpiration = false
s.h.Status = evergreen.HostStopped
s.Require().NoError(s.h.Insert())
+
+ // updating instance tags and instance type
s.NoError(s.onDemandManager.ModifyHost(ctx, s.h, changes))
found, err := host.FindOne(host.ById(s.h.Id))
s.NoError(err)
- s.Equal([]host.Tag{host.Tag{Key: "key-2", Value: "val-2", CanBeModified: true}}, found.InstanceTags)
+ s.Equal([]host.Tag{{Key: "key-2", Value: "val-2", CanBeModified: true}}, found.InstanceTags)
s.Equal(changes.InstanceType, found.InstanceType)
- intent := host.Host{
- Id: "evg-1234",
- NoExpiration: false,
+ // updating host expiration
+ prevExpirationTime := found.ExpirationTime
+ changes = host.HostModifyOptions{
+ AddHours: time.Hour * 24,
+ }
+ s.NoError(s.onDemandManager.ModifyHost(ctx, s.h, changes))
+ found, err = host.FindOne(host.ById(s.h.Id))
+ s.NoError(err)
+ s.True(found.ExpirationTime.Equal(prevExpirationTime.Add(changes.AddHours)))
+
+ // trying to update host expiration past 14 days should error
+ changes = host.HostModifyOptions{
+ AddHours: evergreen.MaxSpawnHostExpirationDurationHours,
}
- s.NoError(intent.Insert())
+ s.Error(s.onDemandManager.ModifyHost(ctx, s.h, changes))
+
+ // modifying host to have no expiration
noExpiration := true
changes = host.HostModifyOptions{NoExpiration: &noExpiration}
s.NoError(s.onDemandManager.ModifyHost(ctx, s.h, changes))
@@ -793,6 +807,7 @@ func (s *EC2Suite) TestModifyHost() {
s.NoError(err)
s.True(found.NoExpiration)
+ // attaching a volume to host
volumeToMount := host.Volume{
ID: "thang",
AvailabilityZone: "us-east-1a",
@@ -805,7 +820,7 @@ func (s *EC2Suite) TestModifyHost() {
AttachVolume: "thang",
}
s.NoError(s.onDemandManager.ModifyHost(ctx, s.h, changes))
- found, err = host.FindOne(host.ById(s.h.Id))
+ _, err = host.FindOne(host.ById(s.h.Id))
s.NoError(err)
s.Require().NoError(s.h.Remove())
}
@@ -1019,12 +1034,13 @@ func (s *EC2Suite) TestTimeTilNextPaymentLinux() {
s.Equal(time.Second, s.onDemandManager.TimeTilNextPayment(h))
}
-func (s *EC2Suite) TestTimeTilNextPaymentWindows() {
+func (s *EC2Suite) TestTimeTilNextPaymentSUSE() {
now := time.Now()
thirtyMinutesAgo := now.Add(-30 * time.Minute)
h := &host.Host{
Distro: distro.Distro{
- Arch: "windows",
+ Id: "suse15-large",
+ Arch: "linux",
},
CreationTime: thirtyMinutesAgo,
StartTime: thirtyMinutesAgo.Add(time.Minute),
@@ -1040,13 +1056,6 @@ func (s *EC2Suite) TestGetInstanceName() {
func (s *EC2Suite) TestGetProvider() {
s.h.Distro.Arch = "Linux/Unix"
- pkgCachingPriceFetcher.ec2Prices = map[odInfo]float64{
- odInfo{
- os: "Linux",
- instance: "instance",
- region: "US East (N. Virginia)",
- }: 23.2,
- }
ec2Settings := &EC2ProviderSettings{
InstanceType: "instance",
IsVpc: true,
@@ -1057,14 +1066,11 @@ func (s *EC2Suite) TestGetProvider() {
ctx, cancel := context.WithCancel(s.ctx)
defer cancel()
- manager, ok := s.autoManager.(*ec2Manager)
+ manager, ok := s.spotManager.(*ec2Manager)
s.True(ok)
provider, err := manager.getProvider(ctx, s.h, ec2Settings)
s.NoError(err)
s.Equal(spotProvider, provider)
- // subnet should be set based on vpc name
- s.Equal("subnet-654321", ec2Settings.SubnetId)
- s.Equal(s.h.Distro.Provider, evergreen.ProviderNameEc2Spot)
s.h.UserHost = true
provider, err = manager.getProvider(ctx, s.h, ec2Settings)
@@ -1138,29 +1144,84 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
// spot IDs returned doesn't match spot IDs submitted
mock.DescribeSpotInstanceRequestsOutput = &ec2.DescribeSpotInstanceRequestsOutput{
SpotInstanceRequests: []*ec2.SpotInstanceRequest{
- &ec2.SpotInstanceRequest{
- InstanceId: aws.String("sir-1"),
+ {
+ InstanceId: aws.String("nonexistent"),
State: aws.String(SpotStatusActive),
SpotInstanceRequestId: aws.String("1"),
},
},
}
+ mock.DescribeInstancesOutput = &ec2.DescribeInstancesOutput{
+ Reservations: []*ec2.Reservation{
+ {
+ Instances: []*ec2.Instance{
+ {
+ InstanceId: aws.String("i-6"),
+ State: &ec2.InstanceState{
+ Name: aws.String(ec2.InstanceStateNameShuttingDown),
+ },
+ },
+ },
+ },
+ {
+ Instances: []*ec2.Instance{
+ {
+ InstanceId: aws.String("i-4"),
+ State: &ec2.InstanceState{
+ Name: aws.String(ec2.InstanceStateNameRunning),
+ },
+ PublicDnsName: aws.String("public_dns_name_3"),
+ PrivateIpAddress: aws.String("3.3.3.3"),
+ Placement: &ec2.Placement{
+ AvailabilityZone: aws.String("us-east-1a"),
+ },
+ LaunchTime: aws.Time(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)),
+ BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{
+ {
+ Ebs: &ec2.EbsInstanceBlockDevice{
+ VolumeId: aws.String("volume_id"),
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ Instances: []*ec2.Instance{
+ {
+ InstanceId: aws.String("i-5"),
+ State: &ec2.InstanceState{
+ Name: aws.String(ec2.InstanceStateNameTerminated),
+ },
+ },
+ },
+ },
+ },
+ }
s.True(ok)
batchManager, ok := s.onDemandManager.(BatchManager)
s.True(ok)
s.NotNil(batchManager)
- _, err := batchManager.GetInstanceStatuses(ctx, hosts)
- s.Error(err, "return an error if the number of spot IDs returned is different from submitted")
+ statuses, err := batchManager.GetInstanceStatuses(ctx, hosts)
+ s.NoError(err, "does not error if some of the instances do not exist")
+ s.Equal(map[string]CloudStatus{
+ "i-2": StatusNonExistent,
+ "i-4": StatusRunning,
+ "i-5": StatusTerminated,
+ "i-6": StatusTerminated,
+ "sir-1": StatusNonExistent,
+ "sir-3": StatusNonExistent,
+ }, statuses)
mock.DescribeSpotInstanceRequestsOutput = &ec2.DescribeSpotInstanceRequestsOutput{
SpotInstanceRequests: []*ec2.SpotInstanceRequest{
// This host returns with no id
- &ec2.SpotInstanceRequest{
+ {
InstanceId: aws.String("i-3"),
State: aws.String(SpotStatusActive),
SpotInstanceRequestId: aws.String("sir-3"),
},
- &ec2.SpotInstanceRequest{
+ {
SpotInstanceRequestId: aws.String("sir-1"),
State: aws.String(ec2.SpotInstanceStateFailed),
},
@@ -1182,7 +1243,7 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
},
LaunchTime: aws.Time(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)),
BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{
- &ec2.InstanceBlockDeviceMapping{
+ {
Ebs: &ec2.EbsInstanceBlockDevice{
VolumeId: aws.String("volume_id"),
},
@@ -1205,7 +1266,7 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
},
LaunchTime: aws.Time(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)),
BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{
- &ec2.InstanceBlockDeviceMapping{
+ {
Ebs: &ec2.EbsInstanceBlockDevice{
VolumeId: aws.String("volume_id"),
},
@@ -1238,7 +1299,7 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
},
LaunchTime: aws.Time(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)),
BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{
- &ec2.InstanceBlockDeviceMapping{
+ {
Ebs: &ec2.EbsInstanceBlockDevice{
VolumeId: aws.String("volume_id"),
},
@@ -1259,7 +1320,7 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
},
},
}
- statuses, err := batchManager.GetInstanceStatuses(ctx, hosts)
+ statuses, err = batchManager.GetInstanceStatuses(ctx, hosts)
s.NoError(err)
s.Len(mock.DescribeSpotInstanceRequestsInput.SpotInstanceRequestIds, 2)
s.Len(mock.DescribeInstancesInput.InstanceIds, 5)
@@ -1269,14 +1330,14 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
s.Equal("i-6", *mock.DescribeInstancesInput.InstanceIds[3])
s.Equal("i-3", *mock.DescribeInstancesInput.InstanceIds[4])
s.Len(statuses, 6)
- s.Equal(statuses, []CloudStatus{
- StatusFailed,
- StatusRunning,
- StatusRunning,
- StatusRunning,
- StatusTerminated,
- StatusTerminated,
- })
+ s.Equal(map[string]CloudStatus{
+ "i-2": StatusRunning,
+ "i-4": StatusRunning,
+ "i-5": StatusTerminated,
+ "i-6": StatusTerminated,
+ "sir-1": StatusFailed,
+ "sir-3": StatusRunning,
+ }, statuses)
s.Equal("public_dns_name_1", hosts[1].Host)
s.Equal("1.1.1.1", hosts[1].IPv4)
@@ -1288,7 +1349,7 @@ func (s *EC2Suite) TestGetInstanceStatuses() {
s.Equal("i-3", hosts[2].ExternalIdentifier)
}
-func (s *EC2Suite) TestGetInstanceStatusesTerminate() {
+func (s *EC2Suite) TestGetInstanceStatusesForNonexistentInstances() {
hosts := []host.Host{
{
Id: "i-1",
@@ -1329,7 +1390,7 @@ func (s *EC2Suite) TestGetInstanceStatusesTerminate() {
},
LaunchTime: aws.Time(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)),
BlockDeviceMappings: []*ec2.InstanceBlockDeviceMapping{
- &ec2.InstanceBlockDeviceMapping{
+ {
Ebs: &ec2.EbsInstanceBlockDevice{
VolumeId: aws.String("volume_id"),
},
@@ -1343,12 +1404,11 @@ func (s *EC2Suite) TestGetInstanceStatusesTerminate() {
batchManager := s.onDemandManager.(BatchManager)
s.NotNil(batchManager)
- _, err := batchManager.GetInstanceStatuses(context.Background(), hosts)
- s.Error(err)
-
- h, err := host.FindOneId("i-2")
+ statuses, err := batchManager.GetInstanceStatuses(context.Background(), hosts)
s.NoError(err)
- s.Equal(evergreen.HostTerminated, h.Status)
+ s.Len(statuses, len(hosts), "should have one status for the existing host and one for the nonexistent host")
+ s.Equal(statuses[hosts[0].Id], StatusRunning)
+ s.Equal(statuses[hosts[1].Id], StatusNonExistent)
}
func (s *EC2Suite) TestGetRegion() {
@@ -1363,7 +1423,7 @@ func (s *EC2Suite) TestGetRegion() {
}
func (s *EC2Suite) TestUserDataExpand() {
- expanded, err := expandUserData("${test} a thing", s.autoManager.(*ec2Manager).settings.Expansions)
+ expanded, err := expandUserData("${test} a thing", s.onDemandManager.(*ec2Manager).settings.Expansions)
s.NoError(err)
s.Equal("expand a thing", expanded)
}
@@ -1448,6 +1508,7 @@ func (s *EC2Suite) TestFromDistroSettings() {
birch.EC.String("subnet_id", "subnet-123456"),
birch.EC.Double("bid_price", 0.001),
birch.EC.String("region", evergreen.DefaultEC2Region),
+ birch.EC.String("iam_instance_profile_arn", "a_new_arn"),
birch.EC.SliceString("security_group_ids", []string{"abcdef"}),
)},
}
@@ -1461,16 +1522,18 @@ func (s *EC2Suite) TestFromDistroSettings() {
s.Equal("abcdef", ec2Settings.SecurityGroupIDs[0])
s.Equal(float64(0.001), ec2Settings.BidPrice)
s.Equal(evergreen.DefaultEC2Region, ec2Settings.Region)
+ s.Equal("a_new_arn", ec2Settings.IAMInstanceProfileARN)
// create provider list, choose by region
settings2 := EC2ProviderSettings{
- Region: "us-east-2",
- AMI: "other_ami",
- InstanceType: "other_instance",
- SecurityGroupIDs: []string{"ghijkl"},
- BidPrice: float64(0.002),
- AWSKeyID: "other_key_id",
- KeyName: "other_key",
+ Region: "us-east-2",
+ AMI: "other_ami",
+ InstanceType: "other_instance",
+ SecurityGroupIDs: []string{"ghijkl"},
+ IAMInstanceProfileARN: "a_beautiful_profile",
+ BidPrice: float64(0.002),
+ AWSKeyID: "other_key_id",
+ KeyName: "other_key",
}
bytes, err := bson.Marshal(ec2Settings)
s.NoError(err)
@@ -1486,6 +1549,7 @@ func (s *EC2Suite) TestFromDistroSettings() {
s.NoError(ec2Settings.FromDistroSettings(d, "us-east-2"))
s.Equal(ec2Settings.Region, "us-east-2")
s.Equal(ec2Settings.InstanceType, "other_instance")
+ s.Equal(ec2Settings.IAMInstanceProfileARN, "a_beautiful_profile")
}
func (s *EC2Suite) TestGetEC2ManagerOptions() {
diff --git a/cloud/ec2_util.go b/cloud/ec2_util.go
index 8c905b1fe9b..6fdf1ceee22 100644
--- a/cloud/ec2_util.go
+++ b/cloud/ec2_util.go
@@ -39,6 +39,14 @@ const (
var (
EC2InsufficientCapacityError = errors.New(EC2InsufficientCapacity)
ec2TemplateNameExistsError = errors.New(ec2TemplateNameExists)
+
+ // Linux and Windows are billed by the second.
+ // See https://aws.amazon.com/ec2/pricing/on-demand/
+ byTheSecondBillingOS = []string{"linux", "windows"}
+
+ // Commercial Linux distributions are billed by the hour
+ // See https://aws.amazon.com/linux/commercial-linux/faqs/#Pricing_and_Billing
+ commercialLinuxDistros = []string{"suse"}
)
type MountPoint struct {
@@ -73,48 +81,14 @@ var (
VolumeTypeKey = bsonutil.MustHaveTag(MountPoint{}, "VolumeType")
)
-// type/consts for price evaluation based on OS
-type osType string
-
-const (
- osLinux osType = "Linux/UNIX"
- osSUSE osType = "SUSE Linux"
- osWindows osType = "Windows"
-)
-
-// regionFullname takes the API ID of amazon region and returns the
-// full region name. For instance, "us-west-1" becomes "US West (N. California)".
-// This is necessary as the On Demand pricing endpoint uses the full name, unlike
-// the rest of the API. THIS FUNCTION ONLY HANDLES U.S. REGIONS.
-func regionFullname(region string) (string, error) {
- switch region {
- case "us-east-1":
- return "US East (N. Virginia)", nil
- case "us-west-1":
- return "US West (N. California)", nil
- case "us-west-2":
- return "US West (Oregon)", nil
- }
- return "", errors.Errorf("region %v not supported", region)
-}
-
// AztoRegion takes an availability zone and returns the region id.
func AztoRegion(az string) string {
// an amazon region is just the availability zone minus the final letter
return az[:len(az)-1]
}
-// returns the format of os name expected by EC2 On Demand billing data,
-// bucking the normal AWS API naming scheme.
-func osBillingName(os osType) string {
- if os == osLinux {
- return "Linux"
- }
- return string(os)
-}
-
-//ec2StatusToEvergreenStatus returns a "universal" status code based on EC2's
-//provider-specific status codes.
+// ec2StatusToEvergreenStatus returns a "universal" status code based on EC2's
+// provider-specific status codes.
func ec2StatusToEvergreenStatus(ec2Status string) CloudStatus {
switch ec2Status {
case ec2.InstanceStateNamePending:
@@ -129,7 +103,7 @@ func ec2StatusToEvergreenStatus(ec2Status string) CloudStatus {
return StatusTerminated
default:
grip.Error(message.Fields{
- "message": "got an unknown ec2 state name",
+ "message": "got an unknown EC2 state name",
"status": ec2Status,
})
return StatusUnknown
@@ -172,14 +146,14 @@ func makeTags(intentHost *host.Host) []host.Tag {
}
systemTags := []host.Tag{
- host.Tag{Key: evergreen.TagName, Value: intentHost.Id, CanBeModified: false},
- host.Tag{Key: evergreen.TagDistro, Value: intentHost.Distro.Id, CanBeModified: false},
- host.Tag{Key: evergreen.TagEvergreenService, Value: hostname, CanBeModified: false},
- host.Tag{Key: evergreen.TagUsername, Value: username, CanBeModified: false},
- host.Tag{Key: evergreen.TagOwner, Value: intentHost.StartedBy, CanBeModified: false},
- host.Tag{Key: evergreen.TagMode, Value: "production", CanBeModified: false},
- host.Tag{Key: evergreen.TagStartTime, Value: intentHost.CreationTime.Format(evergreen.NameTimeFormat), CanBeModified: false},
- host.Tag{Key: evergreen.TagExpireOn, Value: expireOn, CanBeModified: false},
+ {Key: evergreen.TagName, Value: intentHost.Id, CanBeModified: false},
+ {Key: evergreen.TagDistro, Value: intentHost.Distro.Id, CanBeModified: false},
+ {Key: evergreen.TagEvergreenService, Value: hostname, CanBeModified: false},
+ {Key: evergreen.TagUsername, Value: username, CanBeModified: false},
+ {Key: evergreen.TagOwner, Value: intentHost.StartedBy, CanBeModified: false},
+ {Key: evergreen.TagMode, Value: "production", CanBeModified: false},
+ {Key: evergreen.TagStartTime, Value: intentHost.CreationTime.Format(evergreen.NameTimeFormat), CanBeModified: false},
+ {Key: evergreen.TagExpireOn, Value: expireOn, CanBeModified: false},
}
if intentHost.UserHost {
@@ -250,19 +224,19 @@ func timeTilNextEC2Payment(h *host.Host) time.Duration {
return time.Second
}
-// UsesHourlyBilling checks if a distro name to see if it is billed hourly,
-// and returns true if so (for example, most linux distros are by-the-minute).
+// UsesHourlyBilling returns if a distro is billed hourly.
func UsesHourlyBilling(d *distro.Distro) bool {
- if !strings.Contains(d.Arch, "linux") {
- // windows or osx
- return true
+ byTheSecondOS := false
+ for _, arch := range byTheSecondBillingOS {
+ byTheSecondOS = byTheSecondOS || strings.Contains(d.Arch, arch)
}
- // one exception is OK. If we start adding more,
- // might be time to add some more abstract handling
- if strings.Contains(d.Id, "suse") {
- return true
+
+ commercialLinuxDistro := false
+ for _, distro := range commercialLinuxDistros {
+ commercialLinuxDistro = commercialLinuxDistro || strings.Contains(d.Id, distro)
}
- return false
+
+ return !byTheSecondOS || commercialLinuxDistro
}
// Determines how long until a payment is due for the specified host, for hosts
@@ -294,7 +268,7 @@ func expandUserData(userData string, expansions map[string]string) (string, erro
exp := util.NewExpansions(expansions)
expanded, err := exp.ExpandString(userData)
if err != nil {
- return "", errors.Wrap(err, "error expanding userdata script")
+ return "", errors.Wrap(err, "expanding user data script")
}
return expanded, nil
}
@@ -323,10 +297,10 @@ func cacheHostData(ctx context.Context, h *host.Host, instance *ec2.Instance, cl
return errors.New("instance missing launch time")
}
if instance.PublicDnsName == nil {
- return errors.New("instance missing public dns name")
+ return errors.New("instance missing public DNS name")
}
if instance.PrivateIpAddress == nil {
- return errors.New("instance missing private ip address")
+ return errors.New("instance missing private IP address")
}
h.Zone = *instance.Placement.AvailabilityZone
h.StartTime = *instance.LaunchTime
@@ -335,14 +309,14 @@ func cacheHostData(ctx context.Context, h *host.Host, instance *ec2.Instance, cl
h.IPv4 = *instance.PrivateIpAddress
if err := h.CacheHostData(); err != nil {
- return errors.Wrap(err, "error updating host document in db")
+ return errors.Wrap(err, "updating host document in DB")
}
// set IPv6 address, if applicable
for _, networkInterface := range instance.NetworkInterfaces {
if len(networkInterface.Ipv6Addresses) > 0 {
if err := h.SetIPv6Address(*networkInterface.Ipv6Addresses[0].Ipv6Address); err != nil {
- return errors.Wrap(err, "error setting ipv6 address")
+ return errors.Wrap(err, "setting IPv6 address")
}
break
}
@@ -353,30 +327,12 @@ func cacheHostData(ctx context.Context, h *host.Host, instance *ec2.Instance, cl
// templateNameInvalidRegex matches any character that may not be included a launch template name.
// Names may only contain word characters ([a-zA-Z0-9_]) and the following special characters: ( ) . / -
-var templateNameInvalidRegex = regexp.MustCompile("[^\\w()./-]+") //nolint gosimple
+var templateNameInvalidRegex = regexp.MustCompile("[^\\w()./-]+") //nolint:gosimple
func cleanLaunchTemplateName(name string) string {
return templateNameInvalidRegex.ReplaceAllString(name, "")
}
-// odInfo is an internal type for keying hosts by the attributes that affect billing.
-type odInfo struct {
- os string
- instance string
- region string
-}
-
-// Terms is an internal type for loading price API results into.
-type Terms struct {
- OnDemand map[string]map[string]struct {
- PriceDimensions map[string]struct {
- PricePerUnit struct {
- USD string
- }
- }
- }
-}
-
// formats /dev/sd[f-p]and xvd[f-p] taken from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html
func generateDeviceNameForVolume(opts generateDeviceNameOptions) (string, error) {
letters := "fghijklmnop"
@@ -432,7 +388,7 @@ func makeBlockDeviceMappings(mounts []MountPoint) ([]*ec2aws.BlockDeviceMapping,
}
// This parameter is valid only for gp3 volumes.
if utility.FromStringPtr(m.Ebs.VolumeType) != ec2aws.VolumeTypeGp3 {
- return nil, errors.New(fmt.Sprintf("throughput is not valid for volume type '%s', it is only valid for gp3 volumes", utility.FromStringPtr(m.Ebs.VolumeType)))
+ return nil, errors.Errorf("throughput is not valid for volume type '%s', it is only valid for gp3 volumes", utility.FromStringPtr(m.Ebs.VolumeType))
}
m.Ebs.Throughput = aws.Int64(mount.Throughput)
}
@@ -483,7 +439,7 @@ func makeBlockDeviceMappingsTemplate(mounts []MountPoint) ([]*ec2aws.LaunchTempl
}
// This parameter is valid only for gp3 volumes.
if utility.FromStringPtr(m.Ebs.VolumeType) != ec2aws.VolumeTypeGp3 {
- return nil, errors.New(fmt.Sprintf("throughput is not valid for volume type '%s', it is only valid for gp3 volumes", utility.FromStringPtr(m.Ebs.VolumeType)))
+ return nil, errors.Errorf("throughput is not valid for volume type '%s', it is only valid for gp3 volumes", utility.FromStringPtr(m.Ebs.VolumeType))
}
m.Ebs.Throughput = aws.Int64(mount.Throughput)
}
@@ -524,10 +480,10 @@ func validateEc2DescribeInstancesOutput(describeInstancesResponse *ec2aws.Descri
catcher := grip.NewBasicCatcher()
for _, reservation := range describeInstancesResponse.Reservations {
if len(reservation.Instances) == 0 {
- catcher.Add(errors.New("reservation missing instance"))
+ catcher.New("reservation missing instance")
} else {
instance := reservation.Instances[0]
- catcher.NewWhen(instance.InstanceId == nil, "instance missing instance id")
+ catcher.NewWhen(instance.InstanceId == nil, "instance missing instance ID")
catcher.NewWhen(instance.State == nil || instance.State.Name == nil || len(*instance.State.Name) == 0, "instance missing state name")
}
}
@@ -535,31 +491,6 @@ func validateEc2DescribeInstancesOutput(describeInstancesResponse *ec2aws.Descri
return catcher.Resolve()
}
-func IsEc2Provider(provider string) bool {
- return provider == evergreen.ProviderNameEc2Auto ||
- provider == evergreen.ProviderNameEc2OnDemand ||
- provider == evergreen.ProviderNameEc2Spot ||
- provider == evergreen.ProviderNameEc2Fleet
-}
-
-func IsDockerProvider(provider string) bool {
- return provider == evergreen.ProviderNameDocker ||
- provider == evergreen.ProviderNameDockerMock
-}
-
-func getEC2ManagerOptionsFromSettings(provider string, settings *EC2ProviderSettings) ManagerOpts {
- region := settings.Region
- if region == "" {
- region = evergreen.DefaultEC2Region
- }
- return ManagerOpts{
- Provider: provider,
- Region: region,
- ProviderKey: settings.AWSKeyID,
- ProviderSecret: settings.AWSSecret,
- }
-}
-
// Get EC2 key and secret from the AWS configuration
func GetEC2Key(s *evergreen.Settings) (string, string, error) {
if len(s.Providers.AWS.EC2Keys) == 0 {
@@ -571,15 +502,28 @@ func GetEC2Key(s *evergreen.Settings) (string, string, error) {
// Error if key or secret are blank
if key == "" || secret == "" {
- return "", "", errors.New("AWS ID and Secret must not be blank")
+ return "", "", errors.New("AWS key and secret must not be blank")
}
return key, secret, nil
}
+func getEC2ManagerOptionsFromSettings(provider string, settings *EC2ProviderSettings) ManagerOpts {
+ region := settings.Region
+ if region == "" {
+ region = evergreen.DefaultEC2Region
+ }
+ return ManagerOpts{
+ Provider: provider,
+ Region: region,
+ ProviderKey: settings.AWSKeyID,
+ ProviderSecret: settings.AWSSecret,
+ }
+}
+
func validateEC2HostModifyOptions(h *host.Host, opts host.HostModifyOptions) error {
if opts.InstanceType != "" && h.Status != evergreen.HostStopped {
- return errors.New("host must be stopped to modify instance typed")
+ return errors.New("host must be stopped to modify instance type")
}
if time.Until(h.ExpirationTime.Add(opts.AddHours)) > evergreen.MaxSpawnHostExpirationDurationHours {
return errors.Errorf("cannot extend host '%s' expiration by '%s' -- maximum host duration is limited to %s", h.Id, opts.AddHours.String(), evergreen.MaxSpawnHostExpirationDurationHours.String())
@@ -591,7 +535,7 @@ func validateEC2HostModifyOptions(h *host.Host, opts host.HostModifyOptions) err
func ValidVolumeOptions(v *host.Volume, s *evergreen.Settings) error {
catcher := grip.NewBasicCatcher()
if !utility.StringSliceContains(ValidVolumeTypes, v.Type) {
- catcher.Add(errors.Errorf("Valid EBS volume types are: %v", ValidVolumeTypes))
+ catcher.Errorf("invalid volume type '%s', valid EBS volume types are: %s", v.Type, ValidVolumeTypes)
}
_, err := getSubnetForZone(s.Providers.AWS.Subnets, v.AvailabilityZone)
@@ -607,7 +551,7 @@ func getSubnetForZone(subnets []evergreen.Subnet, zone string) (string, error) {
}
zones = append(zones, subnet.AZ)
}
- return "", errors.Errorf("Valid availability zones are: %v", zones)
+ return "", errors.Errorf("invalid availability zone '%s', valid availability zones are: %s", zone, zones)
}
// addSSHKey adds an SSH key for the given client. If an SSH key already exists
@@ -620,7 +564,7 @@ func addSSHKey(ctx context.Context, client AWSClient, pair evergreen.SSHKeyPair)
if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == EC2DuplicateKeyPair {
return nil
}
- return errors.Wrap(err, "could not add new SSH key")
+ return errors.Wrap(err, "importing public SSH key")
}
return nil
}
@@ -648,3 +592,41 @@ func ModifyVolumeBadRequest(err error) bool {
func IsEC2InstanceID(id string) bool {
return strings.HasPrefix(id, "i-")
}
+
+// Gp2EquivalentThroughputForGp3 returns a throughput value for gp3 volumes that's at least
+// equivalent to the throughput of gp2 volumes.
+// See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/general-purpose.html for more information.
+func Gp2EquivalentThroughputForGp3(volumeSize int) int {
+ if volumeSize <= 170 {
+ return 128
+ }
+ return 250
+}
+
+// Gp2EquivalentIOPSForGp3 returns an IOPS value for gp3 volumes that's at least
+// equivalent to the IOPS of gp2 volumes.
+// See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/general-purpose.html for more information.
+func Gp2EquivalentIOPSForGp3(volumeSize int) int {
+ iops := volumeSize * 3
+
+ if volumeSize <= 1000 {
+ iops = 3000
+ }
+ if iops >= 16000 {
+ iops = 16000
+ }
+
+ return iops
+}
+
+// isEC2InstanceNotFound returns whether or not the given error is due to the
+// EC2 instance not being found.
+func isEC2InstanceNotFound(err error) bool {
+ if err == noReservationError {
+ return true
+ }
+ if ec2Err, ok := errors.Cause(err).(awserr.Error); ok && ec2Err.Code() == EC2ErrorNotFound {
+ return true
+ }
+ return false
+}
diff --git a/cloud/ec2_util_test.go b/cloud/ec2_util_test.go
index c57a9277f71..a6c9b5f2001 100644
--- a/cloud/ec2_util_test.go
+++ b/cloud/ec2_util_test.go
@@ -3,6 +3,7 @@ package cloud
import (
"testing"
+ "github.com/evergreen-ci/evergreen/model/distro"
"github.com/stretchr/testify/assert"
)
@@ -29,3 +30,43 @@ func TestCleanLaunchTemplateName(t *testing.T) {
})
}
}
+
+func TestUsesHourlyBilling(t *testing.T) {
+ for name, testCase := range map[string]struct {
+ distro distro.Distro
+ hourly bool
+ }{
+ "ubuntu": {
+ distro: distro.Distro{
+ Id: "ubuntu",
+ Arch: "linux",
+ },
+ hourly: false,
+ },
+ "windows": {
+ distro: distro.Distro{
+ Id: "windows-large",
+ Arch: "windows",
+ },
+ hourly: false,
+ },
+ "suse": {
+ distro: distro.Distro{
+ Id: "suse15-large",
+ Arch: "linux",
+ },
+ hourly: true,
+ },
+ "mac": {
+ distro: distro.Distro{
+ Id: "macos-1100",
+ Arch: "osx",
+ },
+ hourly: true,
+ },
+ } {
+ t.Run(name, func(t *testing.T) {
+ assert.Equal(t, UsesHourlyBilling(&testCase.distro), testCase.hourly)
+ })
+ }
+}
diff --git a/cloud/gce.go b/cloud/gce.go
index ee3e5a7051b..eb4730ada9e 100644
--- a/cloud/gce.go
+++ b/cloud/gce.go
@@ -55,15 +55,15 @@ func (opts *GCESettings) Validate() error {
customMachine := opts.NumCPUs > 0 && opts.MemoryMB > 0
if standardMachine == customMachine {
- return errors.New("Must specify either machine type OR num CPUs and memory")
+ return errors.New("must specify either machine type or num CPUs and memory")
}
if (opts.ImageFamily == "") == (opts.ImageName == "") {
- return errors.New("Exactly one of image family or image name must be blank")
+ return errors.New("exactly one of image family or image name must be blank")
}
if opts.DiskType == "" {
- return errors.New("Disk type must not be blank")
+ return errors.New("disk type must not be blank")
}
return nil
@@ -73,21 +73,15 @@ func (opts *GCESettings) FromDistroSettings(d distro.Distro, _ string) error {
if len(d.ProviderSettingsList) != 0 {
bytes, err := d.ProviderSettingsList[0].MarshalBSON()
if err != nil {
- return errors.Wrap(err, "error marshalling provider setting into bson")
+ return errors.Wrap(err, "marshalling provider setting into BSON")
}
if err := bson.Unmarshal(bytes, opts); err != nil {
- return errors.Wrap(err, "error unmarshalling bson into provider settings")
+ return errors.Wrap(err, "unmarshalling BSON into provider settings")
}
}
return nil
}
-// GetSettings returns an empty GCESettings struct since settings are configured on
-// instance creation.
-func (m *gceManager) GetSettings() ProviderSettings {
- return &GCESettings{}
-}
-
// Configure loads the necessary credentials from the global config object.
func (m *gceManager) Configure(ctx context.Context, s *evergreen.Settings) error {
config := s.Providers.GCE
@@ -105,7 +99,7 @@ func (m *gceManager) Configure(ctx context.Context, s *evergreen.Settings) error
}
if err := m.client.Init(ctx, jwtConfig); err != nil {
- return errors.Wrap(err, "Failed to initialize client connection")
+ return errors.Wrap(err, "initializing client connection")
}
return nil
@@ -115,35 +109,43 @@ func (m *gceManager) Configure(ctx context.Context, s *evergreen.Settings) error
// Information about the intended (and eventually created) host is recorded in a DB document.
//
// ProviderSettings in the distro should have the following settings:
-// - Project: Google Compute project ID
-// - Zone: project zone i.e. us-east1-c
+//
+// - Project: Google Compute project ID
+//
+// - Zone: project zone i.e. us-east1-c
//
// (Exactly one of ImageName or ImageFamily must be specified)
-// - ImageName: the disk will use the private image of the specified name
-// - ImageFamily: the disk will use the newest image from a private image family
+//
+// - ImageName: the disk will use the private image of the specified name
+//
+// - ImageFamily: the disk will use the newest image from a private image family
//
// (Either MachineName OR both NumCPUs and MemoryMB must be specified)
-// - MachineName: instance type i.e. n1-standard-8
-// - NumCPUs: number of cores i.e. 2
-// - MemoryMB: memory, in MB i.e. 1024
//
-// - DiskSizeGB: boot disk size, in base-2 GB
-// - DiskType: boot disk type i.e. pd-standard
+// - MachineName: instance type i.e. n1-standard-8
//
-// - NetworkTags: (optional) security groups
-// - SSHKeys: username-key pairs
+// - NumCPUs: number of cores i.e. 2
+//
+// - MemoryMB: memory, in MB i.e. 1024
+//
+// - DiskSizeGB: boot disk size, in base-2 GB
+//
+// - DiskType: boot disk type i.e. pd-standard
+//
+// - NetworkTags: (optional) security groups
+//
+// - SSHKeys: username-key pairs
func (m *gceManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
if h.Distro.Provider != ProviderName {
- return nil, errors.Errorf("Can't spawn instance of %s for distro %s: provider is %s",
- ProviderName, h.Distro.Id, h.Distro.Provider)
+ return nil, errors.Errorf("spawning instance for distro '%s': distro provider is '%s'", h.Distro.Id, h.Distro.Provider)
}
s := &GCESettings{}
if err := s.FromDistroSettings(h.Distro, ""); err != nil {
- return nil, errors.Wrapf(err, "Error decoding params for distro %s", h.Distro.Id)
+ return nil, errors.Wrapf(err, "decoding params for distro '%s'", h.Distro.Id)
}
if err := s.Validate(); err != nil {
- return nil, errors.Wrapf(err, "Invalid settings in distro %s", h.Distro.Id)
+ return nil, errors.Wrapf(err, "invalid provider settings in distro '%s'", h.Distro.Id)
}
grip.Debugf("Settings validated for distro %s", h.Distro.Id)
@@ -157,10 +159,13 @@ func (m *gceManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, e
// Start the instance, and remove the intent host document if unsuccessful.
if _, err := m.client.CreateInstance(h, s); err != nil {
if rmErr := h.Remove(); rmErr != nil {
- grip.Errorf("Could not remove intent host '%s': %+v", h.Id, rmErr)
+ grip.Error(message.WrapError(rmErr, message.Fields{
+ "message": "could not remove intent host",
+ "host_id": h.Id,
+ }))
}
grip.Error(err)
- return nil, errors.Wrapf(err, "Could not start new instance for distro '%s'", h.Distro.Id)
+ return nil, errors.Wrapf(err, "starting new instance for distro '%s'", h.Distro.Id)
}
grip.Debug(message.Fields{"message": "new gce host", "instance": h.Id, "object": h})
@@ -168,7 +173,7 @@ func (m *gceManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, e
}
func (m *gceManager) ModifyHost(context.Context, *host.Host, host.HostModifyOptions) error {
- return errors.New("can't modify instances with gce provider")
+ return errors.New("can't modify instances with GCE provider")
}
// GetInstanceStatus gets the current operational status of the provisioned host,
@@ -182,19 +187,17 @@ func (m *gceManager) GetInstanceStatus(ctx context.Context, host *host.Host) (Cl
}
func (m *gceManager) SetPortMappings(context.Context, *host.Host, *host.Host) error {
- return errors.New("can't set port mappings with gce provider")
+ return errors.New("can't set port mappings with GCE provider")
}
// TerminateInstance requests a server previously provisioned to be removed.
func (m *gceManager) TerminateInstance(ctx context.Context, host *host.Host, user, reason string) error {
if host.Status == evergreen.HostTerminated {
- err := errors.Errorf("Can not terminate %s - already marked as terminated!", host.Id)
- grip.Error(err)
- return err
+ return errors.Errorf("cannot terminate host '%s' because it's already marked as terminated", host.Id)
}
if err := m.client.DeleteInstance(host); err != nil {
- return errors.Wrap(err, "API call to delete instance failed")
+ return errors.Wrap(err, "deleting instance")
}
// Set the host status as terminated and update its termination time
@@ -202,11 +205,11 @@ func (m *gceManager) TerminateInstance(ctx context.Context, host *host.Host, use
}
func (m *gceManager) StopInstance(ctx context.Context, host *host.Host, user string) error {
- return errors.New("StopInstance is not supported for gce provider")
+ return errors.New("StopInstance is not supported for GCE provider")
}
func (m *gceManager) StartInstance(ctx context.Context, host *host.Host, user string) error {
- return errors.New("StartInstance is not supported for gce provider")
+ return errors.New("StartInstance is not supported for GCE provider")
}
// IsUp checks whether the provisioned host is running.
@@ -225,31 +228,31 @@ func (m *gceManager) OnUp(context.Context, *host.Host) error {
}
func (m *gceManager) AttachVolume(context.Context, *host.Host, *host.VolumeAttachment) error {
- return errors.New("can't attach volume with gce provider")
+ return errors.New("can't attach volume with GCE provider")
}
func (m *gceManager) DetachVolume(context.Context, *host.Host, string) error {
- return errors.New("can't detach volume with gce provider")
+ return errors.New("can't detach volume with GCE provider")
}
func (m *gceManager) CreateVolume(context.Context, *host.Volume) (*host.Volume, error) {
- return nil, errors.New("can't create volume with gce provider")
+ return nil, errors.New("can't create volume with GCE provider")
}
func (m *gceManager) DeleteVolume(context.Context, *host.Volume) error {
- return errors.New("can't delete volume with gce provider")
+ return errors.New("can't delete volume with GCE provider")
}
func (m *gceManager) ModifyVolume(context.Context, *host.Volume, *model.VolumeModifyOptions) error {
- return errors.New("can't modify volume with gce provider")
+ return errors.New("can't modify volume with GCE provider")
}
-func (m *gceManager) GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error) {
- return nil, errors.New("can't get volume attachment with gce provider")
+func (m *gceManager) GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error) {
+ return nil, errors.New("can't get volume attachment with GCE provider")
}
func (m *gceManager) CheckInstanceType(context.Context, string) error {
- return errors.New("can't specify instance type with gce provider")
+ return errors.New("can't specify instance type with GCE provider")
}
// Cleanup is a noop for the gce provider.
@@ -312,7 +315,6 @@ func (m *gceManager) TimeTilNextPayment(h *host.Host) time.Duration {
return tilEndBufferTime
}
-// TODO: this must be implemented to support adding SSH keys.
func (m *gceManager) AddSSHKey(ctx context.Context, pair evergreen.SSHKeyPair) error {
return nil
}
diff --git a/cloud/gce_client.go b/cloud/gce_client.go
index 47c0a1e999b..73947eea75b 100644
--- a/cloud/gce_client.go
+++ b/cloud/gce_client.go
@@ -39,7 +39,7 @@ func (c *gceClientImpl) Init(ctx context.Context, config *jwt.Config) error {
// Connect to Google Compute Engine.
service, err := compute.New(client)
if err != nil {
- return errors.Wrap(err, "failed to connect to Google Compute Engine service")
+ return errors.Wrap(err, "connecting to Google Compute Engine service")
}
grip.Debug("connected to Google Compute Engine service")
@@ -118,7 +118,7 @@ func (c *gceClientImpl) CreateInstance(h *host.Host, s *GCESettings) (string, er
// Make the API call to insert the instance
if _, err := c.InstancesService.Insert(h.Project, h.Zone, instance).Do(); err != nil {
- return "", errors.Wrap(err, "API call to insert instance failed")
+ return "", errors.Wrap(err, "inserting instance failed")
}
return instance.Name, nil
@@ -128,7 +128,7 @@ func (c *gceClientImpl) CreateInstance(h *host.Host, s *GCESettings) (string, er
func (c *gceClientImpl) GetInstance(h *host.Host) (*compute.Instance, error) {
instance, err := c.InstancesService.Get(h.Project, h.Zone, h.Id).Do()
if err != nil {
- return nil, errors.Wrap(err, "API call to get instance failed")
+ return nil, errors.Wrap(err, "getting instance failed")
}
return instance, nil
@@ -137,7 +137,7 @@ func (c *gceClientImpl) GetInstance(h *host.Host) (*compute.Instance, error) {
// DeleteInstance requests an instance previously provisioned to be removed.
func (c *gceClientImpl) DeleteInstance(h *host.Host) error {
if _, err := c.InstancesService.Delete(h.Project, h.Zone, h.Id).Do(); err != nil {
- return errors.Wrap(err, "API call to delete instance failed")
+ return errors.Wrap(err, "deleting instance failed")
}
return nil
diff --git a/cloud/gce_mock_test.go b/cloud/gce_mock_test.go
index 24e3ca7aae0..5539026b935 100644
--- a/cloud/gce_mock_test.go
+++ b/cloud/gce_mock_test.go
@@ -23,7 +23,7 @@ type gceClientMock struct {
func (c *gceClientMock) Init(context.Context, *jwt.Config) error {
if c.failInit {
- return errors.New("failed to initialize Client")
+ return errors.New("failed to initialize client")
}
return nil
diff --git a/cloud/gce_test.go b/cloud/gce_test.go
index 4349d636754..c409bdc3a34 100644
--- a/cloud/gce_test.go
+++ b/cloud/gce_test.go
@@ -302,7 +302,7 @@ func (s *GCESuite) TestSpawnInvalidSettings() {
defer cancel()
var err error
- s.hostOpts.Distro = distro.Distro{Provider: evergreen.ProviderNameEc2Auto}
+ s.hostOpts.Distro = distro.Distro{Provider: evergreen.ProviderNameEc2Fleet}
h := host.NewIntent(s.hostOpts)
s.NotNil(h)
h, err = s.manager.SpawnHost(ctx, h)
diff --git a/cloud/mock.go b/cloud/mock.go
index fe8158ecd71..57177603571 100644
--- a/cloud/mock.go
+++ b/cloud/mock.go
@@ -149,11 +149,11 @@ func makeMockManager() Manager {
}
}
-func (mockMgr *mockManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
- l := mockMgr.mutex
+func (m *mockManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- mockMgr.Instances[h.Id] = MockInstance{
+ m.Instances[h.Id] = MockInstance{
IsUp: false,
IsSSHReachable: false,
Status: StatusInitializing,
@@ -164,39 +164,39 @@ func (mockMgr *mockManager) SpawnHost(ctx context.Context, h *host.Host) (*host.
return h, nil
}
-func (mockMgr *mockManager) ModifyHost(ctx context.Context, host *host.Host, changes host.HostModifyOptions) error {
- l := mockMgr.mutex
+func (m *mockManager) ModifyHost(ctx context.Context, host *host.Host, changes host.HostModifyOptions) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
var err error
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", host.Id)
+ return errors.Errorf("unable to fetch host '%s'", host.Id)
}
if len(changes.AddInstanceTags) > 0 {
host.AddTags(changes.AddInstanceTags)
instance.Tags = host.InstanceTags
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
if err = host.SetTags(); err != nil {
- return errors.Errorf("error adding tags in db")
+ return errors.Errorf("adding tags in DB")
}
}
if len(changes.DeleteInstanceTags) > 0 {
instance.Tags = host.InstanceTags
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
host.DeleteTags(changes.DeleteInstanceTags)
if err = host.SetTags(); err != nil {
- return errors.Errorf("error deleting tags in db")
+ return errors.Errorf("deleting tags in DB")
}
}
if changes.InstanceType != "" {
instance.Type = host.InstanceType
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
if err = host.SetInstanceType(changes.InstanceType); err != nil {
- return errors.Errorf("error setting instance type in db")
+ return errors.Errorf("setting instance type in DB")
}
}
@@ -204,34 +204,37 @@ func (mockMgr *mockManager) ModifyHost(ctx context.Context, host *host.Host, cha
expireOnValue := expireInDays(30)
if *changes.NoExpiration {
if err = host.MarkShouldNotExpire(expireOnValue); err != nil {
- return errors.Errorf("error setting no expiration in db")
+ return errors.Errorf("setting no expiration in DB")
}
}
if err = host.MarkShouldExpire(expireOnValue); err != nil {
- return errors.Errorf("error setting expiration in db")
+ return errors.Errorf("setting expiration in DB")
}
}
if changes.NewName != "" {
if err = host.SetDisplayName(changes.NewName); err != nil {
- return errors.Errorf("error setting display name in db")
+ return errors.Errorf("setting display name in DB")
}
}
return nil
}
-// get the status of an instance
-func (mockMgr *mockManager) GetInstanceStatus(ctx context.Context, host *host.Host) (CloudStatus, error) {
- l := mockMgr.mutex
- l.RLock()
- instance, ok := mockMgr.Instances[host.Id]
- l.RUnlock()
+// GetInstanceStatus gets the status of one instance according to the instance
+// data stored in the mock manager.
+func (m *mockManager) GetInstanceStatus(ctx context.Context, h *host.Host) (CloudStatus, error) {
+ return m.getOrDefaultInstanceStatus(ctx, h.Id), nil
+}
+
+func (m *mockManager) getOrDefaultInstanceStatus(ctx context.Context, hostID string) CloudStatus {
+ m.mutex.RLock()
+ instance, ok := m.Instances[hostID]
+ m.mutex.RUnlock()
if !ok {
- return StatusUnknown, errors.Errorf("unable to fetch host: %s", host.Id)
+ return StatusNonExistent
}
-
- return instance.Status, nil
+ return instance.Status
}
func (m *mockManager) SetPortMappings(context.Context, *host.Host, *host.Host) error {
@@ -239,106 +242,102 @@ func (m *mockManager) SetPortMappings(context.Context, *host.Host, *host.Host) e
}
// get instance DNS
-func (mockMgr *mockManager) GetDNSName(ctx context.Context, host *host.Host) (string, error) {
- l := mockMgr.mutex
+func (m *mockManager) GetDNSName(ctx context.Context, host *host.Host) (string, error) {
+ l := m.mutex
l.RLock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
l.RUnlock()
if !ok {
- return "", errors.Errorf("unable to fetch host: %s", host.Id)
+ return "", errors.Errorf("unable to fetch host '%s'", host.Id)
}
return instance.DNSName, nil
}
-func (_ *mockManager) GetSettings() ProviderSettings {
- return &MockProviderSettings{}
-}
-
// terminate an instance
-func (mockMgr *mockManager) TerminateInstance(ctx context.Context, host *host.Host, user, reason string) error {
- l := mockMgr.mutex
+func (m *mockManager) TerminateInstance(ctx context.Context, host *host.Host, user, reason string) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", host.Id)
+ return errors.Errorf("unable to fetch host '%s'", host.Id)
}
instance.Status = StatusTerminated
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
return errors.WithStack(host.Terminate(user, reason))
}
-func (mockMgr *mockManager) StopInstance(ctx context.Context, host *host.Host, user string) error {
- l := mockMgr.mutex
+func (m *mockManager) StopInstance(ctx context.Context, host *host.Host, user string) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", host.Id)
+ return errors.Errorf("unable to fetch host '%s'", host.Id)
}
if host.Status != evergreen.HostRunning {
- return errors.Errorf("cannot stop %s; instance not running", host.Id)
+ return errors.Errorf("cannot stop host '%s' because the instance is not running", host.Id)
}
instance.Status = StatusStopped
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
return errors.WithStack(host.SetStopped(user))
}
-func (mockMgr *mockManager) StartInstance(ctx context.Context, host *host.Host, user string) error {
- l := mockMgr.mutex
+func (m *mockManager) StartInstance(ctx context.Context, host *host.Host, user string) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", host.Id)
+ return errors.Errorf("unable to fetch host '%s'", host.Id)
}
if host.Status != evergreen.HostStopped {
- return errors.Errorf("cannot start %s; instance not stopped", host.Id)
+ return errors.Errorf("cannot start host '%s' because the instance is not stopped", host.Id)
}
instance.Status = StatusRunning
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
return errors.WithStack(host.SetRunning(user))
}
-func (mockMgr *mockManager) Configure(ctx context.Context, settings *evergreen.Settings) error {
+func (m *mockManager) Configure(ctx context.Context, settings *evergreen.Settings) error {
//no-op. maybe will need to load something from settings in the future.
return nil
}
-func (mockMgr *mockManager) IsUp(ctx context.Context, host *host.Host) (bool, error) {
- l := mockMgr.mutex
+func (m *mockManager) IsUp(ctx context.Context, host *host.Host) (bool, error) {
+ l := m.mutex
l.RLock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
l.RUnlock()
if !ok {
- return false, errors.Errorf("unable to fetch host: %s", host.Id)
+ return false, errors.Errorf("unable to fetch host '%s'", host.Id)
}
return instance.IsUp, nil
}
-func (mockMgr *mockManager) OnUp(ctx context.Context, host *host.Host) error {
- l := mockMgr.mutex
+func (m *mockManager) OnUp(ctx context.Context, host *host.Host) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", host.Id)
+ return errors.Errorf("unable to fetch host '%s'", host.Id)
}
instance.OnUpRan = true
- mockMgr.Instances[host.Id] = instance
+ m.Instances[host.Id] = instance
return nil
}
-func (mockMgr *mockManager) TimeTilNextPayment(host *host.Host) time.Duration {
- l := mockMgr.mutex
+func (m *mockManager) TimeTilNextPayment(host *host.Host) time.Duration {
+ l := m.mutex
l.RLock()
- instance, ok := mockMgr.Instances[host.Id]
+ instance, ok := m.Instances[host.Id]
l.RUnlock()
if !ok {
return time.Duration(0)
@@ -346,50 +345,50 @@ func (mockMgr *mockManager) TimeTilNextPayment(host *host.Host) time.Duration {
return instance.TimeTilNextPayment
}
-func (mockMgr *mockManager) AttachVolume(ctx context.Context, h *host.Host, attachment *host.VolumeAttachment) error {
- l := mockMgr.mutex
+func (m *mockManager) AttachVolume(ctx context.Context, h *host.Host, attachment *host.VolumeAttachment) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- instance, ok := mockMgr.Instances[h.Id]
+ instance, ok := m.Instances[h.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", h.Id)
+ return errors.Errorf("unable to fetch host '%s'", h.Id)
}
instance.BlockDevices = append(instance.BlockDevices, attachment.VolumeID)
- mockMgr.Instances[h.Id] = instance
+ m.Instances[h.Id] = instance
return errors.WithStack(h.AddVolumeToHost(attachment))
}
-func (mockMgr *mockManager) DetachVolume(ctx context.Context, h *host.Host, volumeID string) error {
- l := mockMgr.mutex
+func (m *mockManager) DetachVolume(ctx context.Context, h *host.Host, volumeID string) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- instance, ok := mockMgr.Instances[h.Id]
+ instance, ok := m.Instances[h.Id]
if !ok {
- return errors.Errorf("unable to fetch host: %s", h.Id)
+ return errors.Errorf("unable to fetch host '%s'", h.Id)
}
for i := range instance.BlockDevices {
if volumeID == instance.BlockDevices[i] {
instance.BlockDevices = append(instance.BlockDevices[:i], instance.BlockDevices[i+1:]...)
}
}
- mockMgr.Instances[h.Id] = instance
+ m.Instances[h.Id] = instance
return errors.WithStack(h.RemoveVolumeFromHost(volumeID))
}
-func (mockMgr *mockManager) CreateVolume(ctx context.Context, volume *host.Volume) (*host.Volume, error) {
- l := mockMgr.mutex
+func (m *mockManager) CreateVolume(ctx context.Context, volume *host.Volume) (*host.Volume, error) {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- if mockMgr.Volumes == nil {
- mockMgr.Volumes = map[string]MockVolume{}
+ if m.Volumes == nil {
+ m.Volumes = map[string]MockVolume{}
}
if volume.ID == "" {
volume.ID = primitive.NewObjectID().String()
}
- mockMgr.Volumes[volume.ID] = MockVolume{}
+ m.Volumes[volume.ID] = MockVolume{}
if err := volume.Insert(); err != nil {
return nil, errors.WithStack(err)
}
@@ -397,19 +396,19 @@ func (mockMgr *mockManager) CreateVolume(ctx context.Context, volume *host.Volum
return volume, nil
}
-func (mockMgr *mockManager) DeleteVolume(ctx context.Context, volume *host.Volume) error {
- l := mockMgr.mutex
+func (m *mockManager) DeleteVolume(ctx context.Context, volume *host.Volume) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- delete(mockMgr.Volumes, volume.ID)
+ delete(m.Volumes, volume.ID)
return errors.WithStack(volume.Remove())
}
-func (mockMgr *mockManager) ModifyVolume(ctx context.Context, volume *host.Volume, opts *model.VolumeModifyOptions) error {
- l := mockMgr.mutex
+func (m *mockManager) ModifyVolume(ctx context.Context, volume *host.Volume, opts *model.VolumeModifyOptions) error {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- v, ok := mockMgr.Volumes[volume.ID]
+ v, ok := m.Volumes[volume.ID]
if opts.Size > 0 {
v.Size = opts.Size
volume.Size = opts.Size
@@ -434,32 +433,35 @@ func (mockMgr *mockManager) ModifyVolume(ctx context.Context, volume *host.Volum
}
if ok {
- mockMgr.Volumes[volume.ID] = v
+ m.Volumes[volume.ID] = v
}
return nil
}
-func (mockMgr *mockManager) GetVolumeAttachment(ctx context.Context, volumeID string) (*host.VolumeAttachment, error) {
- l := mockMgr.mutex
+func (m *mockManager) GetVolumeAttachment(ctx context.Context, volumeID string) (*VolumeAttachment, error) {
+ l := m.mutex
l.Lock()
defer l.Unlock()
- for id, instance := range mockMgr.Instances {
+ for id, instance := range m.Instances {
for _, device := range instance.BlockDevices {
if device == volumeID {
- return &host.VolumeAttachment{HostID: id, VolumeID: volumeID}, nil
+ return &VolumeAttachment{HostID: id, VolumeID: volumeID}, nil
}
}
}
return nil, nil
}
-func (mockMgr *mockManager) GetInstanceStatuses(ctx context.Context, hosts []host.Host) ([]CloudStatus, error) {
- if len(hosts) != 1 {
- return nil, errors.New("expecting 1 hosts")
+// GetInstanceStatus gets the status of all the instances in the slice according
+// to the instance data stored in the mock manager.
+func (m *mockManager) GetInstanceStatuses(ctx context.Context, hosts []host.Host) (map[string]CloudStatus, error) {
+ statuses := map[string]CloudStatus{}
+ for _, h := range hosts {
+ statuses[h.Id] = m.getOrDefaultInstanceStatus(ctx, h.Id)
}
- return []CloudStatus{StatusRunning}, nil
+ return statuses, nil
}
func (m *mockManager) CheckInstanceType(ctx context.Context, instanceType string) error {
diff --git a/cloud/openstack.go b/cloud/openstack.go
index 496eee3b1dd..4dfed6a2c71 100644
--- a/cloud/openstack.go
+++ b/cloud/openstack.go
@@ -33,19 +33,19 @@ type openStackSettings struct {
// Validate verifies a set of ProviderSettings.
func (opts *openStackSettings) Validate() error {
if opts.ImageName == "" {
- return errors.New("Image name must not be blank")
+ return errors.New("image name must not be blank")
}
if opts.FlavorName == "" {
- return errors.New("Flavor name must not be blank")
+ return errors.New("flavor name must not be blank")
}
if opts.KeyName == "" {
- return errors.New("Key name must not be blank")
+ return errors.New("key name must not be blank")
}
if opts.SecurityGroup == "" {
- return errors.New("Security group must not be blank")
+ return errors.New("security group must not be blank")
}
return nil
@@ -55,21 +55,15 @@ func (opts *openStackSettings) FromDistroSettings(d distro.Distro, _ string) err
if len(d.ProviderSettingsList) != 0 {
bytes, err := d.ProviderSettingsList[0].MarshalBSON()
if err != nil {
- return errors.Wrap(err, "error marshalling provider setting into bson")
+ return errors.Wrap(err, "marshalling provider setting into BSON")
}
if err := bson.Unmarshal(bytes, opts); err != nil {
- return errors.Wrap(err, "error unmarshalling bson into provider settings")
+ return errors.Wrap(err, "unmarshalling BSON into provider settings")
}
}
return nil
}
-// GetSettings returns an empty ProviderSettings struct since settings are configured on
-// instance creation.
-func (m *openStackManager) GetSettings() ProviderSettings {
- return &openStackSettings{}
-}
-
// Configure loads the necessary credentials from the global config object.
func (m *openStackManager) Configure(ctx context.Context, s *evergreen.Settings) error {
config := s.Providers.OpenStack
@@ -92,7 +86,7 @@ func (m *openStackManager) Configure(ctx context.Context, s *evergreen.Settings)
}
if err := m.client.Init(*m.authOptions, *m.endpointOpts); err != nil {
- return errors.Wrap(err, "Failed to initialize client connection")
+ return errors.Wrap(err, "initializing client connection")
}
return nil
@@ -102,23 +96,22 @@ func (m *openStackManager) Configure(ctx context.Context, s *evergreen.Settings)
// Information about the intended (and eventually created) host is recorded in a DB document.
//
// ProviderSettings in the distro should have the following settings:
-// - ImageName: image name
-// - FlavorName: like an AWS instance type i.e. m1.large
-// - KeyName: (optional) keypair name associated with the account
-// - SecurityGroup: (optional) security group name
+// - ImageName: image name
+// - FlavorName: like an AWS instance type i.e. m1.large
+// - KeyName: (optional) keypair name associated with the account
+// - SecurityGroup: (optional) security group name
func (m *openStackManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
if h.Distro.Provider != evergreen.ProviderNameOpenstack {
- return nil, errors.Errorf("Can't spawn instance of %s for distro %s: provider is %s",
- evergreen.ProviderNameOpenstack, h.Distro.Id, h.Distro.Provider)
+ return nil, errors.Errorf("can't spawn instance for distro '%s': distro provider is '%s'", h.Distro.Id, h.Distro.Provider)
}
settings := &openStackSettings{}
if err := settings.FromDistroSettings(h.Distro, ""); err != nil {
- return nil, errors.Wrapf(err, "error getting settings from distro %s", h.Distro.Id)
+ return nil, errors.Wrapf(err, "getting provider settings from distro '%s'", h.Distro.Id)
}
if err := settings.Validate(); err != nil {
- return nil, errors.Wrapf(err, "Invalid settings in distro %s", h.Distro.Id)
+ return nil, errors.Wrapf(err, "invalid provider settings in distro '%s'", h.Distro.Id)
}
// Start the instance, and remove the intent host document if unsuccessful.
@@ -132,19 +125,23 @@ func (m *openStackManager) SpawnHost(ctx context.Context, h *host.Host) (*host.H
"error": rmErr,
})
}
- return nil, errors.Wrapf(err, "Could not start new instance for distro '%s'", h.Distro.Id)
+ return nil, errors.Wrapf(err, "starting new instances for distro '%s'", h.Distro.Id)
}
// Update the ID of the host with the real one
h.Id = server.ID
- grip.Debug(message.Fields{"message": "new openstack host", "instance": h.Id, "object": h})
+ grip.Debug(message.Fields{
+ "message": "new OpenStack host",
+ "instance": h.Id,
+ "host": h,
+ })
return h, nil
}
func (m *openStackManager) ModifyHost(context.Context, *host.Host, host.HostModifyOptions) error {
- return errors.New("can't modify instances with openstack provider")
+ return errors.New("can't modify instances with OpenStack provider")
}
// GetInstanceStatus gets the current operational status of the provisioned host,
@@ -158,15 +155,13 @@ func (m *openStackManager) GetInstanceStatus(ctx context.Context, host *host.Hos
}
func (m *openStackManager) SetPortMappings(context.Context, *host.Host, *host.Host) error {
- return errors.New("can't set port mappings with openstack provider")
+ return errors.New("can't set port mappings with OpenStack provider")
}
// TerminateInstance requests a server previously provisioned to be removed.
func (m *openStackManager) TerminateInstance(ctx context.Context, host *host.Host, user, reason string) error {
if host.Status == evergreen.HostTerminated {
- err := errors.Errorf("Can not terminate %s - already marked as terminated!", host.Id)
- grip.Error(err)
- return err
+ return errors.Errorf("cannot terminate host '%s' because it's already marked as terminated", host.Id)
}
if err := m.client.DeleteInstance(host.Id); err != nil {
@@ -178,11 +173,11 @@ func (m *openStackManager) TerminateInstance(ctx context.Context, host *host.Hos
}
func (m *openStackManager) StopInstance(ctx context.Context, host *host.Host, user string) error {
- return errors.New("StopInstance is not supported for openstack provider")
+ return errors.New("StopInstance is not supported for OpenStack provider")
}
func (m *openStackManager) StartInstance(ctx context.Context, host *host.Host, user string) error {
- return errors.New("StartInstance is not supported for openstack provider")
+ return errors.New("StartInstance is not supported for OpenStack provider")
}
// IsUp checks whether the provisioned host is running.
@@ -210,57 +205,54 @@ func (m *openStackManager) GetDNSName(ctx context.Context, host *host.Host) (str
for _, subnet := range server.Addresses {
addresses, ok := subnet.([]interface{})
if !ok {
- return "", errors.Errorf(
- "type conversion of %+v to []interface{} for host %s", subnet, host.Id)
+ return "", errors.Errorf("cannot convert type of subnet %+v to []interface{} for host '%s'", subnet, host.Id)
}
for _, address := range addresses {
keyvalues, ok := address.(map[string]interface{})
if !ok {
- return "", errors.Errorf(
- "type conversion of %+v to map[string]interface{} for host %s", address, host.Id)
+ return "", errors.Errorf("cannot convert type of addresses %+v to map[string]interface{} for host '%s'", address, host.Id)
}
if ip := keyvalues["addr"]; ip != nil {
ip, ok = ip.(string)
if !ok {
- return "", errors.Errorf(
- "type conversion of %+v to string for host %s", ip, host.Id)
+ return "", errors.Errorf("cannot convert type of address %+v to string for host '%s'", ip, host.Id)
}
return ip.(string), nil
}
}
}
- return "", errors.Errorf("could not find IP for host %s", host.Id)
+ return "", errors.Errorf("could not find IP for host '%s'", host.Id)
}
func (m *openStackManager) AttachVolume(context.Context, *host.Host, *host.VolumeAttachment) error {
- return errors.New("can't attach volume with openstack provider")
+ return errors.New("can't attach volume with OpenStack provider")
}
func (m *openStackManager) DetachVolume(context.Context, *host.Host, string) error {
- return errors.New("can't detach volume with openstack provider")
+ return errors.New("can't detach volume with OpenStack provider")
}
func (m *openStackManager) CreateVolume(context.Context, *host.Volume) (*host.Volume, error) {
- return nil, errors.New("can't create volumes with openstack provider")
+ return nil, errors.New("can't create volumes with OpenStack provider")
}
func (m *openStackManager) DeleteVolume(context.Context, *host.Volume) error {
- return errors.New("can't delete volumes with openstack provider")
+ return errors.New("can't delete volumes with OpenStack provider")
}
func (m *openStackManager) ModifyVolume(context.Context, *host.Volume, *model.VolumeModifyOptions) error {
- return errors.New("can't modify volume with openstack provider")
+ return errors.New("can't modify volume with OpenStack provider")
}
-func (m *openStackManager) GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error) {
- return nil, errors.New("can't get volume attachment with openstack provider")
+func (m *openStackManager) GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error) {
+ return nil, errors.New("can't get volume attachment with OpenStack provider")
}
func (m *openStackManager) CheckInstanceType(context.Context, string) error {
- return errors.New("can't specify instance type with openstack provider")
+ return errors.New("can't specify instance type with OpenStack provider")
}
// Cleanup is a noop for the openstack provider.
@@ -274,7 +266,6 @@ func (m *openStackManager) TimeTilNextPayment(host *host.Host) time.Duration {
return time.Duration(0)
}
-// TODO: this must be implemented to support adding SSH keys.
func (m *openStackManager) AddSSHKey(ctx context.Context, pair evergreen.SSHKeyPair) error {
return nil
}
diff --git a/cloud/openstack_client.go b/cloud/openstack_client.go
index b2a4af49a36..f522e19deb7 100644
--- a/cloud/openstack_client.go
+++ b/cloud/openstack_client.go
@@ -25,12 +25,12 @@ type openStackClientImpl struct {
func (c *openStackClientImpl) Init(ao gophercloud.AuthOptions, eo gophercloud.EndpointOpts) error {
providerClient, err := openstack.AuthenticatedClient(ao)
if err != nil {
- return errors.Wrap(err, "OpenStack AuthenticatedClient API call failed")
+ return errors.Wrap(err, "authenticating client")
}
c.ServiceClient, err = openstack.NewComputeV2(providerClient, eo)
if err != nil {
- return errors.Wrap(err, "OpenStack NewComputeV2 API call failed")
+ return errors.Wrap(err, "creating compute v2 client")
}
return nil
}
@@ -43,17 +43,17 @@ func (c *openStackClientImpl) CreateInstance(opts servers.CreateOpts, keyName st
KeyName: keyName,
}
server, err := servers.Create(c.ServiceClient, optsExt).Extract()
- return server, errors.Wrap(err, "OpenStack Create API call failed")
+ return server, errors.Wrap(err, "provisioning new server")
}
// GetInstance requests details on a single server, by ID.
func (c *openStackClientImpl) GetInstance(id string) (*servers.Server, error) {
server, err := servers.Get(c.ServiceClient, id).Extract()
- return server, errors.Wrap(err, "OpenStack Get API call failed")
+ return server, errors.Wrap(err, "getting server")
}
// DeleteInstance requests a server previously provisioned to be removed, by ID.
func (c *openStackClientImpl) DeleteInstance(id string) error {
err := servers.Delete(c.ServiceClient, id).ExtractErr()
- return errors.Wrap(err, "OpenStack Delete API call failed")
+ return errors.Wrap(err, "deleting server")
}
diff --git a/cloud/openstack_test.go b/cloud/openstack_test.go
index fedfc644ded..b30528cce9e 100644
--- a/cloud/openstack_test.go
+++ b/cloud/openstack_test.go
@@ -230,7 +230,7 @@ func (s *OpenStackSuite) TestSpawnInvalidSettings() {
defer cancel()
var err error
- s.hostOpts.Distro = distro.Distro{Provider: evergreen.ProviderNameEc2Auto}
+ s.hostOpts.Distro = distro.Distro{Provider: evergreen.ProviderNameEc2Fleet}
h := host.NewIntent(s.hostOpts)
s.NotNil(h)
h, err = s.manager.SpawnHost(ctx, h)
diff --git a/cloud/pod_agent_util.go b/cloud/pod_agent_util.go
index 6f0b57a14c2..3180de8ff77 100644
--- a/cloud/pod_agent_util.go
+++ b/cloud/pod_agent_util.go
@@ -2,113 +2,52 @@ package cloud
import (
"fmt"
- "path/filepath"
"strings"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/model/pod"
)
-// agentScript returns the script to provision and run the agent in the pod's
-// container.
-func agentScript(settings *evergreen.Settings, p *pod.Pod) []string {
- scriptCmds := []string{downloadAgentCommands(settings, p)}
- if p.TaskContainerCreationOpts.OS == pod.OSLinux {
- scriptCmds = append(scriptCmds, fmt.Sprintf("chmod +x %s", clientName(p)))
- }
- agentCmd := strings.Join(agentCommand(settings, p), " ")
- scriptCmds = append(scriptCmds, agentCmd)
+// bootstrapContainerCommand returns the script to bootstrap the pod's primary container
+// to run the agent.
+func bootstrapContainerCommand(settings *evergreen.Settings, opts pod.TaskContainerCreationOptions) []string {
+ scriptCmds := downloadPodProvisioningScriptCommand(settings, opts)
- return append(invokeShellScriptCommand(p), strings.Join(scriptCmds, " && "))
+ return append(invokeShellScriptCommand(opts), scriptCmds)
}
// invokeShellScriptCommand returns the arguments to invoke an in-line shell
// script in the pod's container.
-func invokeShellScriptCommand(p *pod.Pod) []string {
- if p.TaskContainerCreationOpts.OS == pod.OSWindows {
- return []string{"cmd.exe", "/c"}
+func invokeShellScriptCommand(opts pod.TaskContainerCreationOptions) []string {
+ if opts.OS == pod.OSWindows {
+ return []string{"powershell.exe", "-noninteractive", "-noprofile", "-Command"}
}
return []string{"bash", "-c"}
}
-// agentCommand returns the arguments to start the agent in the pod's container.
-func agentCommand(settings *evergreen.Settings, p *pod.Pod) []string {
- var pathSep string
- if p.TaskContainerCreationOpts.OS == pod.OSWindows {
- pathSep = "\\"
- } else {
- pathSep = "/"
- }
-
- return []string{
- fmt.Sprintf(".%s%s", pathSep, clientName(p)),
- "agent",
- fmt.Sprintf("--api_server=%s", settings.ApiUrl),
- "--mode=pod",
- fmt.Sprintf("--log_prefix=%s", filepath.Join(p.TaskContainerCreationOpts.WorkingDir, "agent")),
- fmt.Sprintf("--working_directory=%s", p.TaskContainerCreationOpts.WorkingDir),
- }
-}
-
-// downloadAgentCommands returns the commands to download the agent in the pod's
-// container.
-func downloadAgentCommands(settings *evergreen.Settings, p *pod.Pod) string {
+// downloadPodProvisioningScriptCommand returns the command to download and
+// execute the provisioning script for a pod's container options.
+func downloadPodProvisioningScriptCommand(settings *evergreen.Settings, opts pod.TaskContainerCreationOptions) string {
const (
curlDefaultNumRetries = 10
- curlDefaultMaxSecs = 100
+ curlDefaultMaxSecs = 60
)
retryArgs := curlRetryArgs(curlDefaultNumRetries, curlDefaultMaxSecs)
- var curlCmd string
- if !settings.ServiceFlags.S3BinaryDownloadsDisabled && settings.PodInit.S3BaseURL != "" {
- // Attempt to download the agent from S3, but fall back to downloading
- // from the app server if it fails.
- // Include -f to return an error code from curl if the HTTP request
- // fails (e.g. it receives 403 Forbidden or 404 Not Found).
- curlCmd = fmt.Sprintf("(curl -fLO %s %s || curl -fLO %s %s)", s3ClientURL(settings, p), retryArgs, clientURL(settings, p), retryArgs)
- } else {
- curlCmd = fmt.Sprintf("curl -fLO %s %s", clientURL(settings, p), retryArgs)
- }
-
- return curlCmd
-}
+ // Return the command to download the provisioning script from the app
+ // server and run it in a shell script.
-// clientURL returns the URL used to get the latest Evergreen client version
-// directly from the Evergreen server.
-func clientURL(settings *evergreen.Settings, p *pod.Pod) string {
- return strings.Join([]string{
- strings.TrimSuffix(settings.ApiUrl, "/"),
- strings.TrimSuffix(settings.ClientBinariesDir, "/"),
- clientURLSubpath(p),
- }, "/")
-}
-
-// s3ClientURL returns the URL in S3 where the Evergreen client version can be
-// retrieved for this server's particular Evergreen build version.
-func s3ClientURL(settings *evergreen.Settings, p *pod.Pod) string {
- return strings.Join([]string{
- strings.TrimSuffix(settings.PodInit.S3BaseURL, "/"),
- evergreen.BuildRevision,
- clientURLSubpath(p),
- }, "/")
-}
-
-// clientURLSubpath returns the URL path to the compiled agent.
-func clientURLSubpath(p *pod.Pod) string {
- return filepath.Join(
- fmt.Sprintf("%s_%s", p.TaskContainerCreationOpts.OS, p.TaskContainerCreationOpts.Arch),
- clientName(p),
- )
-}
-
-// clientName returns the file name of the agent binary.
-func clientName(p *pod.Pod) string {
- name := "evergreen"
- if p.TaskContainerCreationOpts.OS == pod.OSWindows {
- return name + ".exe"
+ if opts.OS == pod.OSLinux {
+ // For Linux, run the script using bash syntax to interpolate the
+ // environment variables and pipe the script into another bash instance.
+ return fmt.Sprintf("curl %s -L -H \"%s: ${%s}\" -H \"%s: ${%s}\" %s/rest/v2/pods/${%s}/provisioning_script | bash -s", retryArgs, evergreen.PodHeader, pod.PodIDEnvVar, evergreen.PodSecretHeader, pod.PodSecretEnvVar, strings.TrimSuffix(settings.ApiUrl, "/"), pod.PodIDEnvVar)
}
- return name
+
+ // For Windows, run the script using PowerShell syntax to interpolate the
+ // environment variables and pipe the script into another PowerShell
+ // instance.
+ return fmt.Sprintf("curl.exe %s -L -H \"%s: $env:%s\" -H \"%s: $env:%s\" %s/rest/v2/pods/$env:%s/provisioning_script | powershell.exe -noprofile -noninteractive -", retryArgs, evergreen.PodHeader, pod.PodIDEnvVar, evergreen.PodSecretHeader, pod.PodSecretEnvVar, strings.TrimSuffix(settings.ApiUrl, "/"), pod.PodIDEnvVar)
}
// curlRetryArgs constructs options to configure the curl retry behavior.
diff --git a/cloud/pod_agent_util_test.go b/cloud/pod_agent_util_test.go
index 66b178bbae5..f39c55363c7 100644
--- a/cloud/pod_agent_util_test.go
+++ b/cloud/pod_agent_util_test.go
@@ -1,7 +1,6 @@
package cloud
import (
- "fmt"
"testing"
"github.com/evergreen-ci/evergreen"
@@ -10,99 +9,42 @@ import (
"github.com/stretchr/testify/require"
)
-func TestAgentScript(t *testing.T) {
+func TestBootstrapContainerCommand(t *testing.T) {
const workingDir = "/data/mci"
- t.Run("WithoutS3", func(t *testing.T) {
- settings := &evergreen.Settings{
- ApiUrl: "www.test.com",
- ClientBinariesDir: "clients",
- }
-
- t.Run("Linux", func(t *testing.T) {
- p := &pod.Pod{
- ID: "id",
- TaskContainerCreationOpts: pod.TaskContainerCreationOptions{
- OS: pod.OSLinux,
- Arch: pod.ArchAMD64,
- WorkingDir: workingDir,
- },
- }
- cmd := agentScript(settings, p)
- require.NotZero(t, cmd)
+ settings := evergreen.Settings{
+ ApiUrl: "https://example.com",
+ ClientBinariesDir: "clients",
+ }
- expected := []string{
- "bash", "-c",
- "curl -fLO www.test.com/clients/linux_amd64/evergreen --retry 10 --retry-max-time 100 && " +
- "chmod +x evergreen && " +
- "./evergreen agent --api_server=www.test.com --mode=pod --log_prefix=/data/mci/agent --working_directory=/data/mci",
- }
- assert.Equal(t, expected, cmd)
- })
- t.Run("Windows", func(t *testing.T) {
- p := &pod.Pod{
- ID: "id",
- TaskContainerCreationOpts: pod.TaskContainerCreationOptions{
- OS: pod.OSWindows,
- Arch: pod.ArchAMD64,
- WorkingDir: workingDir,
- },
- }
- cmd := agentScript(settings, p)
- require.NotZero(t, cmd)
+ t.Run("Linux", func(t *testing.T) {
+ opts := pod.TaskContainerCreationOptions{
+ OS: pod.OSLinux,
+ Arch: pod.ArchAMD64,
+ WorkingDir: workingDir,
+ }
+ cmd := bootstrapContainerCommand(&settings, opts)
+ require.NotZero(t, cmd)
- expected := []string{
- "cmd.exe", "/c",
- "curl -fLO www.test.com/clients/windows_amd64/evergreen.exe --retry 10 --retry-max-time 100 && " +
- ".\\evergreen.exe agent --api_server=www.test.com --mode=pod --log_prefix=/data/mci/agent --working_directory=/data/mci",
- }
- assert.Equal(t, expected, cmd)
- })
+ expected := []string{
+ "bash", "-c",
+ "curl --retry 10 --retry-max-time 60 -L -H \"Pod-Id: ${POD_ID}\" -H \"Pod-Secret: ${POD_SECRET}\" https://example.com/rest/v2/pods/${POD_ID}/provisioning_script | bash -s",
+ }
+ assert.Equal(t, expected, cmd)
})
-
- t.Run("WithS3", func(t *testing.T) {
- settings := &evergreen.Settings{
- ApiUrl: "www.test.com",
- PodInit: evergreen.PodInitConfig{S3BaseURL: "https://foo.com"},
- ClientBinariesDir: "clients",
+ t.Run("Windows", func(t *testing.T) {
+ p := pod.TaskContainerCreationOptions{
+ OS: pod.OSWindows,
+ Arch: pod.ArchAMD64,
+ WorkingDir: workingDir,
}
- t.Run("Linux", func(t *testing.T) {
- p := &pod.Pod{
- ID: "id",
- TaskContainerCreationOpts: pod.TaskContainerCreationOptions{
- OS: pod.OSLinux,
- Arch: pod.ArchAMD64,
- WorkingDir: workingDir,
- },
- }
- cmd := agentScript(settings, p)
- require.NotZero(t, cmd)
+ cmd := bootstrapContainerCommand(&settings, p)
+ require.NotZero(t, cmd)
- expected := []string{
- "bash", "-c",
- fmt.Sprintf("(curl -fLO https://foo.com/%s/linux_amd64/evergreen --retry 10 --retry-max-time 100 || curl -fLO www.test.com/clients/linux_amd64/evergreen --retry 10 --retry-max-time 100) && "+
- "chmod +x evergreen && "+
- "./evergreen agent --api_server=www.test.com --mode=pod --log_prefix=/data/mci/agent --working_directory=/data/mci", evergreen.BuildRevision),
- }
- assert.Equal(t, expected, cmd)
- })
- t.Run("Windows", func(t *testing.T) {
- p := &pod.Pod{
- ID: "id",
- TaskContainerCreationOpts: pod.TaskContainerCreationOptions{
- OS: pod.OSWindows,
- Arch: pod.ArchAMD64,
- WorkingDir: workingDir,
- },
- }
- cmd := agentScript(settings, p)
- require.NotZero(t, cmd)
- expected := []string{
- "cmd.exe", "/c",
- fmt.Sprintf("(curl -fLO https://foo.com/%s/windows_amd64/evergreen.exe --retry 10 --retry-max-time 100 || curl -fLO www.test.com/clients/windows_amd64/evergreen.exe --retry 10 --retry-max-time 100) && "+
- ".\\evergreen.exe agent --api_server=www.test.com --mode=pod --log_prefix=/data/mci/agent --working_directory=/data/mci", evergreen.BuildRevision),
- }
- assert.Equal(t, expected, cmd)
- })
+ expected := []string{
+ "powershell.exe", "-noninteractive", "-noprofile", "-Command",
+ "curl.exe --retry 10 --retry-max-time 60 -L -H \"Pod-Id: $env:POD_ID\" -H \"Pod-Secret: $env:POD_SECRET\" https://example.com/rest/v2/pods/$env:POD_ID/provisioning_script | powershell.exe -noprofile -noninteractive -",
+ }
+ assert.Equal(t, expected, cmd)
})
}
diff --git a/cloud/pod_util.go b/cloud/pod_util.go
index 67fb7a18d12..ac890d4fa00 100644
--- a/cloud/pod_util.go
+++ b/cloud/pod_util.go
@@ -1,38 +1,85 @@
package cloud
import (
- "fmt"
- "strings"
+ "context"
+ "math"
+ "github.com/aws/aws-sdk-go/aws"
+ awsECS "github.com/aws/aws-sdk-go/service/ecs"
+ "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/evergreen-ci/cocoa"
"github.com/evergreen-ci/cocoa/awsutil"
"github.com/evergreen-ci/cocoa/ecs"
+ cocoaMock "github.com/evergreen-ci/cocoa/mock"
"github.com/evergreen-ci/cocoa/secret"
+ "github.com/evergreen-ci/cocoa/tag"
"github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/pod"
+ "github.com/evergreen-ci/evergreen/model/pod/definition"
"github.com/evergreen-ci/utility"
"github.com/pkg/errors"
)
// MakeECSClient creates a cocoa.ECSClient to interact with ECS.
func MakeECSClient(settings *evergreen.Settings) (cocoa.ECSClient, error) {
- return ecs.NewBasicECSClient(podAWSOptions(settings))
+ switch settings.Providers.AWS.Pod.SecretsManager.ClientType {
+ case evergreen.AWSClientTypeMock:
+ // This should only ever be used for testing purposes.
+ return &cocoaMock.ECSClient{}, nil
+ default:
+ return ecs.NewBasicClient(podAWSOptions(settings))
+ }
}
// MakeSecretsManagerClient creates a cocoa.SecretsManagerClient to interact
// with Secrets Manager.
func MakeSecretsManagerClient(settings *evergreen.Settings) (cocoa.SecretsManagerClient, error) {
- return secret.NewBasicSecretsManagerClient(podAWSOptions(settings))
+ switch settings.Providers.AWS.Pod.SecretsManager.ClientType {
+ case evergreen.AWSClientTypeMock:
+ // This should only ever be used for testing purposes.
+ return &cocoaMock.SecretsManagerClient{}, nil
+ default:
+ return secret.NewBasicSecretsManagerClient(podAWSOptions(settings))
+ }
+}
+
+// MakeTagClient creates a cocoa.TagClient to interact with the Resource Groups
+// Tagging API.
+func MakeTagClient(settings *evergreen.Settings) (cocoa.TagClient, error) {
+ return tag.NewBasicTagClient(podAWSOptions(settings))
+}
+
+const (
+ // SecretsManagerResourceFilter is the name of the resource filter to find
+ // Secrets Manager secrets.
+ SecretsManagerResourceFilter = "secretsmanager:secret"
+ // PodDefinitionResourceFilter is the name of the resource filter to find
+ // ECS pod definitions.
+ PodDefinitionResourceFilter = "ecs:task-definition"
+)
+
+// MakeSecretsManagerVault creates a cocoa.Vault backed by Secrets Manager with
+// an optional cocoa.SecretCache.
+func MakeSecretsManagerVault(c cocoa.SecretsManagerClient) (cocoa.Vault, error) {
+ return secret.NewBasicSecretsManager(*secret.NewBasicSecretsManagerOptions().
+ SetClient(c).
+ SetCache(model.ContainerSecretCache{}))
}
-// MakeSecretsManagerVault creates a cocoa.Vault backed by Secrets Manager.
-func MakeSecretsManagerVault(c cocoa.SecretsManagerClient) cocoa.Vault {
- return secret.NewBasicSecretsManager(c)
+// MakeECSPodDefinitionManager creates a cocoa.ECSPodDefinitionManager that
+// creates pod definitions in ECS and secrets backed by an optional cocoa.Vault.
+func MakeECSPodDefinitionManager(c cocoa.ECSClient, v cocoa.Vault) (cocoa.ECSPodDefinitionManager, error) {
+ return ecs.NewBasicPodDefinitionManager(*ecs.NewBasicPodDefinitionManagerOptions().
+ SetClient(c).
+ SetVault(v).
+ SetCache(definition.PodDefinitionCache{}))
}
-// MakeECSPodCreator creates a cocoa.ECSPodCreator to create pods backed by ECS and secrets backed by a secret Vault.
+// MakeECSPodCreator creates a cocoa.ECSPodCreator to create pods backed by ECS
+// and secrets backed by an optional cocoa.Vault.
func MakeECSPodCreator(c cocoa.ECSClient, v cocoa.Vault) (cocoa.ECSPodCreator, error) {
- return ecs.NewBasicECSPodCreator(c, v)
+ return ecs.NewBasicPodCreator(c, v)
}
// ExportECSPod exports the pod DB model to its equivalent cocoa.ECSPod backed
@@ -48,13 +95,13 @@ func ExportECSPod(p *pod.Pod, c cocoa.ECSClient, v cocoa.Vault) (cocoa.ECSPod, e
return nil, errors.Wrap(err, "exporting pod resources")
}
- opts := ecs.NewBasicECSPodOptions().
+ opts := ecs.NewBasicPodOptions().
SetClient(c).
SetVault(v).
SetResources(res).
SetStatusInfo(*stat)
- return ecs.NewBasicECSPod(opts)
+ return ecs.NewBasicPod(opts)
}
// exportECSPodStatusInfo exports the pod's status information to its equivalent
@@ -114,9 +161,7 @@ func exportECSPodResources(info pod.ResourceInfo) cocoa.ECSPodResources {
}
if info.DefinitionID != "" {
- taskDef := cocoa.NewECSTaskDefinition().
- SetID(info.DefinitionID).
- SetOwned(true)
+ taskDef := cocoa.NewECSTaskDefinition().SetID(info.DefinitionID)
res.SetTaskDefinition(*taskDef)
}
@@ -154,7 +199,6 @@ func ImportECSPodResources(res cocoa.ECSPodResources) pod.ResourceInfo {
Cluster: utility.FromStringPtr(res.Cluster),
Containers: containerResources,
}
-
}
// exportECSContainerResources exports the ECS container resource information
@@ -165,9 +209,7 @@ func exportECSContainerResources(info pod.ContainerResourceInfo) cocoa.ECSContai
SetName(info.Name)
for _, id := range info.SecretIDs {
- s := cocoa.NewContainerSecret().
- SetID(id).
- SetOwned(true)
+ s := cocoa.NewContainerSecret().SetID(id)
res.AddSecrets(*s)
}
@@ -180,114 +222,145 @@ const (
agentContainerName = "evg-agent"
// agentPort is the standard port that the agent runs on.
agentPort = 2285
+ // awsLogsGroup is the log configuration option name for specifying the log group.
+ awsLogsGroup = "awslogs-group"
+ // awsLogsGroup is the log configuration option name for specifying the AWS region.
+ awsLogsRegion = "awslogs-region"
+ // awsLogsStreamPrefix is the log configuration option name for specifying the log stream prefix.
+ awsLogsStreamPrefix = "awslogs-stream-prefix"
)
-// ExportECSPodCreationOptions exports the ECS pod resources into
-// cocoa.ECSPodExecutionOptions.
-func ExportECSPodCreationOptions(settings *evergreen.Settings, p *pod.Pod) (*cocoa.ECSPodCreationOptions, error) {
+// ExportECSPodDefinitionOptions exports the ECS pod creation options into
+// cocoa.ECSPodDefinitionOptions to create the pod definition.
+func ExportECSPodDefinitionOptions(settings *evergreen.Settings, opts pod.TaskContainerCreationOptions) (*cocoa.ECSPodDefinitionOptions, error) {
ecsConf := settings.Providers.AWS.Pod.ECS
- execOpts, err := exportECSPodExecutionOptions(ecsConf, p.TaskContainerCreationOpts)
- if err != nil {
- return nil, errors.Wrap(err, "exporting pod execution options")
- }
- containerDef, err := exportECSPodContainerDef(settings, p)
+ containerDef, err := exportECSPodContainerDef(settings, opts)
if err != nil {
return nil, errors.Wrap(err, "exporting pod container definition")
}
- opts := cocoa.NewECSPodCreationOptions().
- SetName(strings.Join([]string{strings.TrimRight(ecsConf.TaskDefinitionPrefix, "-"), "agent", p.ID}, "-")).
+ defOpts := cocoa.NewECSPodDefinitionOptions().
+ SetName(opts.GetFamily(ecsConf)).
+ SetCPU(opts.CPU).
+ SetMemoryMB(opts.MemoryMB).
SetTaskRole(ecsConf.TaskRole).
SetExecutionRole(ecsConf.ExecutionRole).
- SetExecutionOptions(*execOpts).
AddContainerDefinitions(*containerDef)
-
if len(ecsConf.AWSVPC.Subnets) != 0 || len(ecsConf.AWSVPC.SecurityGroups) != 0 {
- opts.SetNetworkMode(cocoa.NetworkModeAWSVPC)
+ defOpts.SetNetworkMode(cocoa.NetworkModeAWSVPC)
}
- return opts, nil
-}
+ if err := defOpts.Validate(); err != nil {
+ return nil, errors.Wrap(err, "invalid pod definition options")
+ }
-// Constants related to secrets stored in Secrets Manager.
-const (
- // internalSecretNamespace is the namespace for secrets that are
- // Evergreen-internal.
- internalSecretNamespace = "evg-internal"
- // repoCredsSecretName is the name of the secret used to store private
- // repository credentials for pods.
- repoCredsSecretName = "repo-creds"
-)
+ return defOpts, nil
+}
// exportECSPodContainerDef exports the ECS pod container definition into the
// equivalent cocoa.ECSContainerDefintion.
-func exportECSPodContainerDef(settings *evergreen.Settings, p *pod.Pod) (*cocoa.ECSContainerDefinition, error) {
+func exportECSPodContainerDef(settings *evergreen.Settings, opts pod.TaskContainerCreationOptions) (*cocoa.ECSContainerDefinition, error) {
+ ecsConf := settings.Providers.AWS.Pod.ECS
def := cocoa.NewECSContainerDefinition().
SetName(agentContainerName).
- SetImage(p.TaskContainerCreationOpts.Image).
- SetMemoryMB(p.TaskContainerCreationOpts.MemoryMB).
- SetCPU(p.TaskContainerCreationOpts.CPU).
- SetWorkingDir(p.TaskContainerCreationOpts.WorkingDir).
- SetCommand(agentScript(settings, p)).
- SetEnvironmentVariables(exportPodEnvVars(settings.Providers.AWS.Pod.SecretsManager, p)).
+ SetImage(opts.Image).
+ SetMemoryMB(opts.MemoryMB).
+ SetCPU(opts.CPU).
+ SetWorkingDir(opts.WorkingDir).
+ SetCommand(bootstrapContainerCommand(settings, opts)).
+ SetEnvironmentVariables(exportPodEnvSecrets(opts)).
AddPortMappings(*cocoa.NewPortMapping().SetContainerPort(agentPort))
- if p.TaskContainerCreationOpts.RepoUsername != "" && p.TaskContainerCreationOpts.RepoPassword != "" {
- secretName := makeInternalSecretName(settings.Providers.AWS.Pod.SecretsManager, p, repoCredsSecretName)
-
- def.SetRepositoryCredentials(*cocoa.NewRepositoryCredentials().
- SetName(secretName).
- SetOwned(true).
- SetNewCredentials(*cocoa.NewStoredRepositoryCredentials().
- SetUsername(p.TaskContainerCreationOpts.RepoUsername).
- SetPassword(p.TaskContainerCreationOpts.RepoPassword)))
+ if opts.RepoCredsExternalID != "" {
+ def.SetRepositoryCredentials(*cocoa.NewRepositoryCredentials().SetID(opts.RepoCredsExternalID))
+ }
+ if ecsConf.LogRegion != "" && ecsConf.LogGroup != "" && ecsConf.LogStreamPrefix != "" {
+ def.SetLogConfiguration(*cocoa.NewLogConfiguration().SetLogDriver(awsECS.LogDriverAwslogs).SetOptions(map[string]string{
+ awsLogsGroup: ecsConf.LogGroup,
+ awsLogsRegion: ecsConf.LogRegion,
+ awsLogsStreamPrefix: ecsConf.LogStreamPrefix,
+ }))
}
return def, nil
}
-const (
- ecsWindowsVersionTagConstraint = "attribute:WindowsVersion"
-)
-
-// exportECSPodExecutionOptions exports the ECS configuration into
+// ExportECSPodExecutionOptions exports the ECS configuration into
// cocoa.ECSPodExecutionOptions.
-func exportECSPodExecutionOptions(ecsConfig evergreen.ECSConfig, containerOpts pod.TaskContainerCreationOptions) (*cocoa.ECSPodExecutionOptions, error) {
- opts := cocoa.NewECSPodExecutionOptions()
+func ExportECSPodExecutionOptions(ecsConfig evergreen.ECSConfig, containerOpts pod.TaskContainerCreationOptions) (*cocoa.ECSPodExecutionOptions, error) {
+ execOpts := cocoa.NewECSPodExecutionOptions().
+ SetOverrideOptions(exportECSOverridePodDef(containerOpts)).
+ // This enables the ability to connect directly to a running container
+ // in ECS (e.g. similar to SSH'ing into a host), which is convenient for
+ // debugging issues.
+ SetSupportsDebugMode(true)
if len(ecsConfig.AWSVPC.Subnets) != 0 || len(ecsConfig.AWSVPC.SecurityGroups) != 0 {
- opts.SetAWSVPCOptions(*cocoa.NewAWSVPCOptions().
+ execOpts.SetAWSVPCOptions(*cocoa.NewAWSVPCOptions().
SetSubnets(ecsConfig.AWSVPC.Subnets).
SetSecurityGroups(ecsConfig.AWSVPC.SecurityGroups))
}
- placementOpts := cocoa.NewECSPodPlacementOptions()
- if containerOpts.WindowsVersion != "" {
- windowsVersionConstraint := fmt.Sprintf("%s == %s", ecsWindowsVersionTagConstraint, containerOpts.WindowsVersion)
- placementOpts.AddInstanceFilters(windowsVersionConstraint)
- }
- opts.SetPlacementOptions(*placementOpts)
-
+ // Pods need to run inside container instances that have a compatible
+ // environment, so specifying the capacity provider essentially specifies
+ // the host environment it must run inside.
var foundCapacityProvider bool
for _, cp := range ecsConfig.CapacityProviders {
+ if containerOpts.OS == pod.OSWindows && !containerOpts.WindowsVersion.Matches(cp.WindowsVersion) {
+ continue
+ }
if containerOpts.OS.Matches(cp.OS) && containerOpts.Arch.Matches(cp.Arch) {
- opts.SetCapacityProvider(cp.Name)
+ execOpts.SetCapacityProvider(cp.Name)
foundCapacityProvider = true
break
}
}
if !foundCapacityProvider {
+ if containerOpts.OS == pod.OSWindows {
+ return nil, errors.Errorf("container OS '%s' with version '%s' and arch '%s' did not match any recognized capacity provider", containerOpts.OS, containerOpts.WindowsVersion, containerOpts.Arch)
+ }
return nil, errors.Errorf("container OS '%s' and arch '%s' did not match any recognized capacity provider", containerOpts.OS, containerOpts.Arch)
}
+ var foundCluster bool
for _, cluster := range ecsConfig.Clusters {
if containerOpts.OS.Matches(cluster.OS) {
- return opts.SetCluster(cluster.Name), nil
+ execOpts.SetCluster(cluster.Name)
+ foundCluster = true
+ break
}
}
+ if !foundCluster {
+ return nil, errors.Errorf("container OS '%s' did not match any recognized ECS cluster", containerOpts.OS)
+ }
+
+ if err := execOpts.Validate(); err != nil {
+ return nil, errors.Wrap(err, "invalid options")
+ }
+
+ return execOpts, nil
+}
+
+// exportECSOverridePodDef exports the pod definition options that should be
+// overridden when starting the pod. It explicitly overrides the pod
+// definitions's environment variables to inject those that are pod-specific.
+func exportECSOverridePodDef(opts pod.TaskContainerCreationOptions) cocoa.ECSOverridePodDefinitionOptions {
+ overrideContainerDef := cocoa.NewECSOverrideContainerDefinition().SetName(agentContainerName)
+
+ for name, value := range opts.EnvVars {
+ overrideContainerDef.AddEnvironmentVariables(*cocoa.NewKeyValue().
+ SetName(name).
+ SetValue(value))
+ }
+
+ return *cocoa.NewECSOverridePodDefinitionOptions().AddContainerDefinitions(*overrideContainerDef)
+}
- return nil, errors.Errorf("container OS '%s' did not match any recognized ECS cluster", containerOpts.OS)
+// ExportECSPodDefinition exports the pod definition into an
+// cocoa.ECSTaskDefinition.
+func ExportECSPodDefinition(podDef definition.PodDefinition) cocoa.ECSTaskDefinition {
+ return *cocoa.NewECSTaskDefinition().SetID(podDef.ExternalID)
}
// podAWSOptions creates options to initialize an AWS client for pod management.
@@ -303,44 +376,143 @@ func podAWSOptions(settings *evergreen.Settings) awsutil.ClientOptions {
return *opts
}
-// exportPodEnvVars converts a map of environment variables and a map of secrets
-// to a slice of cocoa.EnvironmentVariables.
-func exportPodEnvVars(smConf evergreen.SecretsManagerConfig, p *pod.Pod) []cocoa.EnvironmentVariable {
+// exportPodEnvSecrets converts the secret environment variables into to a slice
+// of cocoa.EnvironmentVariables.
+func exportPodEnvSecrets(opts pod.TaskContainerCreationOptions) []cocoa.EnvironmentVariable {
var allEnvVars []cocoa.EnvironmentVariable
- for k, v := range p.TaskContainerCreationOpts.EnvVars {
- allEnvVars = append(allEnvVars, *cocoa.NewEnvironmentVariable().SetName(k).SetValue(v))
- }
+ // This intentionally does not set the plaintext environment variables
+ // because some of them (such as the pod ID) vary between each pod. If they
+ // were included in the pod definition, it would reduce the reusability of
+ // pod definitions.
+ // Instead of setting these per-pod values in the pod definition, these
+ // environment variables are injected via overriding options when the pod is
+ // started.
- for envVarName, s := range p.TaskContainerCreationOpts.EnvSecrets {
- opts := cocoa.NewSecretOptions().SetOwned(utility.FromBoolPtr(s.Owned))
- if utility.FromBoolPtr(s.Exists) && s.ExternalID != "" {
- opts.SetID(s.ExternalID)
- } else if s.Name != "" {
- opts.SetName(makeSecretName(smConf, p, s.Name))
- } else {
- opts.SetName(makeSecretName(smConf, p, envVarName))
- }
- if !utility.FromBoolPtr(s.Exists) && s.Value != "" {
- opts.SetNewValue(s.Value)
- }
+ for envVarName, s := range opts.EnvSecrets {
+ secretOpts := cocoa.NewSecretOptions().SetID(s.ExternalID)
allEnvVars = append(allEnvVars, *cocoa.NewEnvironmentVariable().
SetName(envVarName).
- SetSecretOptions(*opts))
+ SetSecretOptions(*secretOpts))
}
return allEnvVars
}
-// makeSecretName creates a Secrets Manager secret name for the pod.
-func makeSecretName(smConf evergreen.SecretsManagerConfig, p *pod.Pod, name string) string {
- return strings.Join([]string{strings.TrimRight(smConf.SecretPrefix, "/"), "agent", p.ID, name}, "/")
+// GetFilteredResourceIDs gets resources that match the given resource and tag
+// filters. If the limit is positive, it will return at most that many results.
+// If the limit is zero, this will return no results. If the limit is negative,
+// the results are unlimited
+func GetFilteredResourceIDs(ctx context.Context, c cocoa.TagClient, resources []string, tags map[string][]string, limit int) ([]string, error) {
+ if limit == 0 {
+ return []string{}, nil
+ }
+ if limit < 0 {
+ limit = math.MaxInt64
+ }
+
+ var tagFilters []*resourcegroupstaggingapi.TagFilter
+ for key, vals := range tags {
+ tagFilters = append(tagFilters, &resourcegroupstaggingapi.TagFilter{
+ Key: aws.String(key),
+ Values: utility.ToStringPtrSlice(vals),
+ })
+ }
+ resourceFilters := utility.ToStringPtrSlice(resources)
+
+ var allIDs []string
+ remaining := limit
+ var nextToken *string
+ for {
+ var (
+ ids []string
+ err error
+ )
+ ids, nextToken, err = getResourcesPage(ctx, c, resourceFilters, tagFilters, nextToken, limit)
+ if err != nil {
+ return nil, errors.Wrap(err, "getting resources matching filters")
+ }
+ allIDs = append(allIDs, ids...)
+ remaining = remaining - len(ids)
+ if remaining <= 0 {
+ break
+ }
+ if len(ids) == 0 {
+ break
+ }
+ if nextToken == nil {
+ break
+ }
+ }
+
+ return allIDs, nil
+}
+
+func getResourcesPage(ctx context.Context, c cocoa.TagClient, resourceFilters []*string, tagFilters []*resourcegroupstaggingapi.TagFilter, nextToken *string, limit int) ([]string, *string, error) {
+ var ids []string
+
+ resp, err := c.GetResources(ctx, &resourcegroupstaggingapi.GetResourcesInput{
+ PaginationToken: nextToken,
+ ResourceTypeFilters: resourceFilters,
+ TagFilters: tagFilters,
+ })
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "getting resources")
+ }
+ if resp == nil {
+ return nil, nil, errors.Errorf("unexpected nil response for getting resources")
+ }
+
+ for _, tagMapping := range resp.ResourceTagMappingList {
+ if len(ids) >= limit {
+ break
+ }
+
+ if tagMapping == nil {
+ continue
+ }
+ if tagMapping.ResourceARN == nil {
+ continue
+ }
+
+ ids = append(ids, utility.FromStringPtr(tagMapping.ResourceARN))
+ }
+
+ return ids, resp.PaginationToken, nil
+}
+
+// NoopECSPodDefinitionCache is an implementation of cocoa.ECSPodDefinitionCache
+// that no-ops for all operations.
+type NoopECSPodDefinitionCache struct{}
+
+// Put is a no-op.
+func (c *NoopECSPodDefinitionCache) Put(context.Context, cocoa.ECSPodDefinitionItem) error {
+ return nil
+}
+
+// Delete is a no-op.
+func (c *NoopECSPodDefinitionCache) Delete(context.Context, string) error {
+ return nil
+}
+
+// NoopSecretCache is an implementation of cocoa.SecretCache that no-ops for all
+// operations.
+type NoopSecretCache struct {
+ Tag string
+}
+
+// Put is a no-op.
+func (c *NoopSecretCache) Put(context.Context, cocoa.SecretCacheItem) error {
+ return nil
+}
+
+// Delete is a no-op.
+func (c *NoopSecretCache) Delete(context.Context, string) error {
+ return nil
}
-// makeInternalSecretName creates a Secrets Manager secret name for the pod in a
-// reserved namespace that is meant for Evergreen-internal purposes and should
-// not be exposed to users.
-func makeInternalSecretName(smConf evergreen.SecretsManagerConfig, p *pod.Pod, name string) string {
- return makeSecretName(smConf, p, fmt.Sprintf("%s/%s", internalSecretNamespace, name))
+// GetTag returns the tag field.
+func (c *NoopSecretCache) GetTag() string {
+ return c.Tag
}
diff --git a/cloud/pod_util_test.go b/cloud/pod_util_test.go
index 0ea349840a1..5c7a3f72b03 100644
--- a/cloud/pod_util_test.go
+++ b/cloud/pod_util_test.go
@@ -2,11 +2,17 @@ package cloud
import (
"context"
+ "fmt"
+ "strconv"
"strings"
"testing"
+ "github.com/aws/aws-sdk-go/aws"
+ awsECS "github.com/aws/aws-sdk-go/service/ecs"
+ "github.com/aws/aws-sdk-go/service/secretsmanager"
"github.com/evergreen-ci/cocoa"
- "github.com/evergreen-ci/cocoa/mock"
+ cocoaMock "github.com/evergreen-ci/cocoa/mock"
+ "github.com/evergreen-ci/cocoa/secret"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/model/pod"
"github.com/evergreen-ci/utility"
@@ -52,18 +58,20 @@ func TestMakeSecretsManagerVault(t *testing.T) {
t.Run("Succeeds", func(t *testing.T) {
c, err := MakeSecretsManagerClient(validPodClientSettings())
require.NoError(t, err)
- assert.NotZero(t, MakeSecretsManagerVault(c))
+ v, err := MakeSecretsManagerVault(c)
+ assert.NoError(t, err)
+ assert.NotZero(t, v)
})
}
func TestMakeECSPodCreator(t *testing.T) {
t.Run("Succeeds", func(t *testing.T) {
- c, err := MakeECSPodCreator(&mock.ECSClient{}, &mock.Vault{})
+ c, err := MakeECSPodCreator(&cocoaMock.ECSClient{}, &cocoaMock.Vault{})
require.NoError(t, err)
assert.NotZero(t, c)
})
t.Run("FailsWithoutRequiredClient", func(t *testing.T) {
- c, err := MakeECSPodCreator(nil, &mock.Vault{})
+ c, err := MakeECSPodCreator(nil, &cocoaMock.Vault{})
require.Error(t, err)
assert.Zero(t, c)
})
@@ -79,7 +87,7 @@ func TestExportECSPod(t *testing.T) {
assert.Equal(t, p.Resources.ExternalID, utility.FromStringPtr(resources.TaskID))
require.NotZero(t, resources.TaskDefinition)
assert.Equal(t, p.Resources.DefinitionID, utility.FromStringPtr(resources.TaskDefinition.ID))
- assert.True(t, utility.FromBoolPtr(resources.TaskDefinition.Owned))
+ assert.False(t, utility.FromBoolPtr(resources.TaskDefinition.Owned))
assert.Equal(t, p.Resources.Cluster, utility.FromStringPtr(resources.Cluster))
require.Len(t, resources.Containers, len(p.Resources.Containers))
for i := range p.Resources.Containers {
@@ -136,7 +144,8 @@ func TestExportECSPod(t *testing.T) {
defer func() {
assert.NoError(t, smClient.Close(ctx))
}()
- vault := MakeSecretsManagerVault(smClient)
+ vault, err := MakeSecretsManagerVault(smClient)
+ require.NoError(t, err)
tCase(ctx, t, &p, ecsClient, vault)
})
@@ -213,7 +222,7 @@ func TestExportECSPodResources(t *testing.T) {
})
require.NotZero(t, r.TaskDefinition)
assert.Equal(t, id, utility.FromStringPtr(r.TaskDefinition.ID))
- assert.True(t, utility.FromBoolPtr(r.TaskDefinition.Owned))
+ assert.False(t, utility.FromBoolPtr(r.TaskDefinition.Owned))
assert.Zero(t, r.TaskID)
assert.Zero(t, r.Cluster)
assert.Zero(t, r.Containers)
@@ -235,7 +244,7 @@ func TestExportECSPodResources(t *testing.T) {
require.Len(t, exported.Secrets, len(c.SecretIDs))
for i := range c.SecretIDs {
assert.True(t, utility.StringSliceContains(c.SecretIDs, utility.FromStringPtr(exported.Secrets[i].ID)))
- assert.True(t, utility.FromBoolPtr(exported.Secrets[i].Owned))
+ assert.False(t, utility.FromBoolPtr(exported.Secrets[i].Owned))
}
})
}
@@ -322,45 +331,29 @@ func TestExportECSContainerStatusInfo(t *testing.T) {
})
}
-func TestExportECSPodCreationOptions(t *testing.T) {
- validPod := func() *pod.Pod {
- return &pod.Pod{
- TaskContainerCreationOpts: pod.TaskContainerCreationOptions{
- Image: "image",
- MemoryMB: 128,
- CPU: 128,
- OS: pod.OSLinux,
- Arch: pod.ArchAMD64,
- WorkingDir: "/root",
- EnvVars: map[string]string{
- "ENV_VAR": "value",
- },
- EnvSecrets: map[string]pod.Secret{
- "SECRET_ENV_VAR": {
- Name: "name0",
- ExternalID: "external_id",
- Value: "value0",
- Exists: utility.TruePtr(),
- Owned: utility.FalsePtr(),
- },
- "SHARED_SECRET_ENV_VAR": {
- Name: "name1",
- Value: "value1",
- Exists: utility.FalsePtr(),
- Owned: utility.TruePtr(),
- },
- "UNNAMED_SECRET_ENV_VAR": {
- Value: "value2",
- Exists: utility.FalsePtr(),
- Owned: utility.TruePtr(),
- },
+func TestExportECSPodDefinitionOptions(t *testing.T) {
+ validContainerOpts := func() pod.TaskContainerCreationOptions {
+ return pod.TaskContainerCreationOptions{
+ Image: "image",
+ MemoryMB: 128,
+ CPU: 128,
+ OS: pod.OSLinux,
+ Arch: pod.ArchAMD64,
+ WorkingDir: "/root",
+ EnvVars: map[string]string{
+ "ENV_VAR": "value",
+ },
+ EnvSecrets: map[string]pod.Secret{
+ "SECRET_ENV_VAR": {
+ ExternalID: "external_id",
+ Value: "value0",
},
},
}
}
- validSettings := func() *evergreen.Settings {
- return &evergreen.Settings{
+ validSettings := func() evergreen.Settings {
+ return evergreen.Settings{
Providers: evergreen.CloudProviders{
AWS: evergreen.AWSConfig{
Pod: evergreen.AWSPodConfig{
@@ -372,19 +365,9 @@ func TestExportECSPodCreationOptions(t *testing.T) {
Subnets: []string{"subnet-12345"},
SecurityGroups: []string{"sg-12345"},
},
- Clusters: []evergreen.ECSClusterConfig{
- {
- OS: evergreen.ECSOSLinux,
- Name: "cluster",
- },
- },
- CapacityProviders: []evergreen.ECSCapacityProvider{
- {
- Name: "capacity_provider",
- OS: evergreen.ECSOSLinux,
- Arch: evergreen.ECSArchAMD64,
- },
- },
+ LogRegion: "us-east-1",
+ LogGroup: "log_group",
+ LogStreamPrefix: "log_stream_prefix",
},
SecretsManager: evergreen.SecretsManagerConfig{
SecretPrefix: "secret_prefix",
@@ -397,115 +380,176 @@ func TestExportECSPodCreationOptions(t *testing.T) {
t.Run("Succeeds", func(t *testing.T) {
settings := validSettings()
- p := validPod()
- opts, err := ExportECSPodCreationOptions(settings, p)
+ containerOpts := validContainerOpts()
+ podDefOpts, err := ExportECSPodDefinitionOptions(&settings, containerOpts)
require.NoError(t, err)
- require.NotZero(t, opts)
- require.Equal(t, settings.Providers.AWS.Pod.ECS.TaskRole, utility.FromStringPtr(opts.TaskRole))
- require.Equal(t, settings.Providers.AWS.Pod.ECS.ExecutionRole, utility.FromStringPtr(opts.ExecutionRole))
- require.NotZero(t, opts.NetworkMode)
- assert.Equal(t, cocoa.NetworkModeAWSVPC, *opts.NetworkMode)
-
- require.NotZero(t, opts.ExecutionOpts)
- require.Equal(t, settings.Providers.AWS.Pod.ECS.Clusters[0].Name, utility.FromStringPtr(opts.ExecutionOpts.Cluster))
- require.NotZero(t, opts.ExecutionOpts.AWSVPCOpts)
- assert.Equal(t, settings.Providers.AWS.Pod.ECS.AWSVPC.Subnets, opts.ExecutionOpts.AWSVPCOpts.Subnets)
- assert.Equal(t, settings.Providers.AWS.Pod.ECS.AWSVPC.SecurityGroups, opts.ExecutionOpts.AWSVPCOpts.SecurityGroups)
- require.NotZero(t, opts.ExecutionOpts.PlacementOpts)
- assert.Equal(t, settings.Providers.AWS.Pod.ECS.CapacityProviders[0].Name, utility.FromStringPtr(opts.ExecutionOpts.CapacityProvider))
-
- assert.True(t, strings.HasPrefix(utility.FromStringPtr(opts.Name), settings.Providers.AWS.Pod.ECS.TaskDefinitionPrefix))
- assert.Contains(t, utility.FromStringPtr(opts.Name), p.ID)
-
- require.Len(t, opts.ContainerDefinitions, 1)
- cDef := opts.ContainerDefinitions[0]
- require.Equal(t, p.TaskContainerCreationOpts.Image, utility.FromStringPtr(cDef.Image))
- require.Equal(t, p.TaskContainerCreationOpts.MemoryMB, utility.FromIntPtr(cDef.MemoryMB))
- require.Equal(t, p.TaskContainerCreationOpts.CPU, utility.FromIntPtr(cDef.CPU))
- require.Equal(t, p.TaskContainerCreationOpts.WorkingDir, utility.FromStringPtr(cDef.WorkingDir))
+ require.NotZero(t, podDefOpts)
+ require.Equal(t, settings.Providers.AWS.Pod.ECS.TaskRole, utility.FromStringPtr(podDefOpts.TaskRole))
+ require.Equal(t, settings.Providers.AWS.Pod.ECS.ExecutionRole, utility.FromStringPtr(podDefOpts.ExecutionRole))
+ require.NotZero(t, podDefOpts.NetworkMode)
+ assert.Equal(t, cocoa.NetworkModeAWSVPC, *podDefOpts.NetworkMode)
+
+ assert.True(t, strings.HasPrefix(utility.FromStringPtr(podDefOpts.Name), settings.Providers.AWS.Pod.ECS.TaskDefinitionPrefix))
+ assert.Contains(t, utility.FromStringPtr(podDefOpts.Name), containerOpts.Hash())
+ require.Equal(t, containerOpts.CPU, utility.FromIntPtr(podDefOpts.CPU))
+ require.Equal(t, containerOpts.MemoryMB, utility.FromIntPtr(podDefOpts.MemoryMB))
+
+ require.Len(t, podDefOpts.ContainerDefinitions, 1)
+ cDef := podDefOpts.ContainerDefinitions[0]
+ require.Equal(t, containerOpts.Image, utility.FromStringPtr(cDef.Image))
+ require.Equal(t, containerOpts.MemoryMB, utility.FromIntPtr(cDef.MemoryMB))
+ require.Equal(t, containerOpts.CPU, utility.FromIntPtr(cDef.CPU))
+ require.Equal(t, containerOpts.WorkingDir, utility.FromStringPtr(cDef.WorkingDir))
require.Len(t, cDef.PortMappings, 1)
assert.Equal(t, agentPort, utility.FromIntPtr(cDef.PortMappings[0].ContainerPort))
- require.Len(t, cDef.EnvVars, 4)
- for _, envVar := range cDef.EnvVars {
- envVarName := utility.FromStringPtr(envVar.Name)
- switch envVarName {
- case "ENV_VAR":
- assert.Equal(t, p.TaskContainerCreationOpts.EnvVars[utility.FromStringPtr(envVar.Name)], utility.FromStringPtr(envVar.Value))
- case "SECRET_ENV_VAR":
- s := p.TaskContainerCreationOpts.EnvSecrets[utility.FromStringPtr(envVar.Name)]
- assert.Zero(t, envVar.SecretOpts.NewValue)
- assert.Zero(t, envVar.SecretOpts.Name)
- secretName := utility.FromStringPtr(envVar.SecretOpts.ID)
- assert.Equal(t, s.ExternalID, secretName)
- assert.False(t, utility.FromBoolPtr(envVar.SecretOpts.Owned))
- case "SHARED_SECRET_ENV_VAR":
- s := p.TaskContainerCreationOpts.EnvSecrets[utility.FromStringPtr(envVar.Name)]
- assert.Equal(t, s.Value, utility.FromStringPtr(envVar.SecretOpts.NewValue))
- assert.Zero(t, envVar.SecretOpts.ID)
- secretName := utility.FromStringPtr(envVar.SecretOpts.Name)
- assert.True(t, strings.HasPrefix(secretName, settings.Providers.AWS.Pod.SecretsManager.SecretPrefix))
- assert.Contains(t, secretName, p.ID)
- assert.Contains(t, secretName, s.Name)
- assert.True(t, utility.FromBoolPtr(envVar.SecretOpts.Owned))
- case "UNNAMED_SECRET_ENV_VAR":
- s := p.TaskContainerCreationOpts.EnvSecrets[utility.FromStringPtr(envVar.Name)]
- assert.Equal(t, s.Value, utility.FromStringPtr(envVar.SecretOpts.NewValue))
- assert.Zero(t, envVar.SecretOpts.ID)
- secretName := utility.FromStringPtr(envVar.SecretOpts.Name)
- assert.True(t, strings.HasPrefix(secretName, settings.Providers.AWS.Pod.SecretsManager.SecretPrefix))
- assert.Contains(t, secretName, p.ID)
- assert.Contains(t, secretName, envVarName)
- assert.True(t, utility.FromBoolPtr(envVar.SecretOpts.Owned))
- default:
- require.FailNow(t, "unexpected environment variable '%s'", envVarName)
- }
- }
+ assert.Equal(t, awsECS.LogDriverAwslogs, utility.FromStringPtr(cDef.LogConfiguration.LogDriver))
+ assert.Equal(t, "us-east-1", cDef.LogConfiguration.Options[awsLogsRegion])
+ assert.Equal(t, "log_group", cDef.LogConfiguration.Options[awsLogsGroup])
+
+ require.Len(t, cDef.EnvVars, 1, "container definition should contain just the secret environment variable, not the plaintext one")
+ expectedSecret := containerOpts.EnvSecrets[utility.FromStringPtr(cDef.EnvVars[0].Name)]
+ assert.Equal(t, expectedSecret.ExternalID, utility.FromStringPtr(cDef.EnvVars[0].SecretOpts.ID))
+ assert.False(t, utility.FromBoolPtr(cDef.EnvVars[0].SecretOpts.Owned))
})
t.Run("SucceedsWithRepositoryCredentials", func(t *testing.T) {
settings := validSettings()
- p := validPod()
- p.TaskContainerCreationOpts.RepoUsername = "username"
- p.TaskContainerCreationOpts.RepoPassword = "password"
- opts, err := ExportECSPodCreationOptions(settings, p)
+ containerOpts := validContainerOpts()
+ containerOpts.RepoCredsExternalID = "repo_credss_external_id"
+ podDefOpts, err := ExportECSPodDefinitionOptions(&settings, containerOpts)
require.NoError(t, err)
- require.NotZero(t, opts)
+ require.NotZero(t, containerOpts)
- require.Len(t, opts.ContainerDefinitions, 1)
- cDef := opts.ContainerDefinitions[0]
- assert.True(t, strings.HasPrefix(utility.FromStringPtr(cDef.RepoCreds.Name), settings.Providers.AWS.Pod.SecretsManager.SecretPrefix))
- assert.Contains(t, utility.FromStringPtr(cDef.RepoCreds.Name), p.ID)
- assert.Equal(t, utility.FromStringPtr(cDef.RepoCreds.NewCreds.Username), p.TaskContainerCreationOpts.RepoUsername)
- assert.Equal(t, utility.FromStringPtr(cDef.RepoCreds.NewCreds.Password), p.TaskContainerCreationOpts.RepoPassword)
+ require.Len(t, podDefOpts.ContainerDefinitions, 1)
+ cDef := podDefOpts.ContainerDefinitions[0]
+ require.NotZero(t, cDef.RepoCreds)
+ assert.Equal(t, utility.FromStringPtr(cDef.RepoCreds.ID), containerOpts.RepoCredsExternalID)
})
- t.Run("OnlyUsesAWSVPCWhenAWSVPCSettingsAreGiven", func(t *testing.T) {
+ t.Run("DefaultsToBridgeNetworkingWhenAWSVPCSettingsAreUnset", func(t *testing.T) {
settings := validSettings()
settings.Providers.AWS.Pod.ECS.AWSVPC = evergreen.AWSVPCConfig{}
- p := validPod()
- opts, err := ExportECSPodCreationOptions(settings, p)
+ podDefOpts, err := ExportECSPodDefinitionOptions(&settings, validContainerOpts())
require.NoError(t, err)
- assert.NoError(t, opts.Validate())
- assert.Zero(t, opts.NetworkMode)
+ assert.NoError(t, podDefOpts.Validate())
+ assert.Zero(t, podDefOpts.NetworkMode)
+ })
+}
+
+func TestExportECSPodExecutionOptions(t *testing.T) {
+ getECSConfig := func() evergreen.ECSConfig {
+ return evergreen.ECSConfig{
+ TaskRole: "task_role",
+ TaskDefinitionPrefix: "task_definition_prefix",
+ ExecutionRole: "execution_role",
+ AWSVPC: evergreen.AWSVPCConfig{
+ Subnets: []string{"subnet-12345"},
+ SecurityGroups: []string{"sg-12345"},
+ },
+ Clusters: []evergreen.ECSClusterConfig{
+ {
+ OS: evergreen.ECSOSLinux,
+ Name: "linux_cluster",
+ },
+ {
+ OS: evergreen.ECSOSWindows,
+ Name: "windows_cluster",
+ },
+ },
+ CapacityProviders: []evergreen.ECSCapacityProvider{
+ {
+ Name: "linux_capacity_provider",
+ OS: evergreen.ECSOSLinux,
+ Arch: evergreen.ECSArchAMD64,
+ },
+ {
+ Name: "windows_capacity_provider",
+ OS: evergreen.ECSOSWindows,
+ Arch: evergreen.ECSArchAMD64,
+ WindowsVersion: evergreen.ECSWindowsServer2022,
+ },
+ },
+ }
+ }
+ getContainerOpts := func() pod.TaskContainerCreationOptions {
+ return pod.TaskContainerCreationOptions{
+ OS: pod.OSLinux,
+ Arch: pod.ArchAMD64,
+ EnvVars: map[string]string{"ENV_VAR": "value"},
+ }
+ }
+
+ t.Run("SpecifiesLinuxClusterAndCapacityProviderWithLinuxPod", func(t *testing.T) {
+ ecsConf := getECSConfig()
+ containerOpts := getContainerOpts()
+ execOpts, err := ExportECSPodExecutionOptions(ecsConf, containerOpts)
+ require.NoError(t, err)
+ require.NotZero(t, execOpts)
+
+ require.Equal(t, ecsConf.Clusters[0].Name, utility.FromStringPtr(execOpts.Cluster))
+ assert.Equal(t, ecsConf.CapacityProviders[0].Name, utility.FromStringPtr(execOpts.CapacityProvider))
+ require.NotZero(t, execOpts.AWSVPCOpts)
+ assert.Equal(t, ecsConf.AWSVPC.Subnets, execOpts.AWSVPCOpts.Subnets)
+ assert.Equal(t, ecsConf.AWSVPC.SecurityGroups, execOpts.AWSVPCOpts.SecurityGroups)
+ require.NotZero(t, execOpts.OverrideOpts)
+ require.Len(t, execOpts.OverrideOpts.ContainerDefinitions, 1, "should override the pod definition's container definition")
+ overrideContainerDef := execOpts.OverrideOpts.ContainerDefinitions[0]
+ require.Len(t, overrideContainerDef.EnvVars, 1, "should override the container definition's plaintext environment variables")
+ overrideEnvVar := overrideContainerDef.EnvVars[0]
+ assert.Equal(t, "ENV_VAR", utility.FromStringPtr(overrideEnvVar.Name), "should override environment variable")
+ assert.Equal(t, containerOpts.EnvVars["ENV_VAR"], utility.FromStringPtr(overrideEnvVar.Value), "should override plaintext environment variable's value")
+ })
+ t.Run("OmitsAWSVPCOptionsWhenUnset", func(t *testing.T) {
+ ecsConf := getECSConfig()
+ ecsConf.AWSVPC = evergreen.AWSVPCConfig{}
+ containerOpts := getContainerOpts()
+ execOpts, err := ExportECSPodExecutionOptions(ecsConf, containerOpts)
+ require.NoError(t, err)
+ require.NotZero(t, execOpts)
+
+ assert.Zero(t, execOpts.AWSVPCOpts)
+ require.Equal(t, ecsConf.Clusters[0].Name, utility.FromStringPtr(execOpts.Cluster))
+ assert.Equal(t, ecsConf.CapacityProviders[0].Name, utility.FromStringPtr(execOpts.CapacityProvider))
+ })
+ t.Run("SpecifiesWindowsClusterAndCapacityProviderWithWindowsPod", func(t *testing.T) {
+ ecsConf := getECSConfig()
+ containerOpts := getContainerOpts()
+ containerOpts.OS = pod.OSWindows
+ containerOpts.Arch = pod.ArchAMD64
+ containerOpts.WindowsVersion = pod.WindowsVersionServer2022
+
+ execOpts, err := ExportECSPodExecutionOptions(ecsConf, containerOpts)
+ require.NoError(t, err)
+ require.NotZero(t, execOpts)
+ require.Equal(t, ecsConf.Clusters[1].Name, utility.FromStringPtr(execOpts.Cluster))
+ assert.Equal(t, ecsConf.CapacityProviders[1].Name, utility.FromStringPtr(execOpts.CapacityProvider))
})
t.Run("FailsWithNoECSConfig", func(t *testing.T) {
- settings := validSettings()
- settings.Providers.AWS.Pod.ECS = evergreen.ECSConfig{}
- opts, err := ExportECSPodCreationOptions(settings, validPod())
- require.NotZero(t, err)
- assert.Zero(t, opts)
+ execOpts, err := ExportECSPodExecutionOptions(evergreen.ECSConfig{}, getContainerOpts())
+ assert.Error(t, err)
+ assert.Zero(t, execOpts)
})
t.Run("FailsWithNoMatchingCluster", func(t *testing.T) {
- settings := validSettings()
- settings.Providers.AWS.Pod.ECS.Clusters[0].OS = evergreen.ECSOSWindows
- opts, err := ExportECSPodCreationOptions(settings, &pod.Pod{})
+ ecsConf := getECSConfig()
+ ecsConf.Clusters[0].OS = evergreen.ECSOSWindows
+ execOpts, err := ExportECSPodExecutionOptions(ecsConf, getContainerOpts())
assert.Error(t, err)
- assert.Zero(t, opts)
+ assert.Zero(t, execOpts)
})
- t.Run("FailsWithNoMatchingCapacityProvider", func(t *testing.T) {
- settings := validSettings()
- settings.Providers.AWS.Pod.ECS.CapacityProviders[0].Arch = evergreen.ECSArchARM64
- opts, err := ExportECSPodCreationOptions(settings, &pod.Pod{})
+ t.Run("FailsWithNoMatchingCapacityProviderForLinux", func(t *testing.T) {
+ ecsConf := getECSConfig()
+ ecsConf.CapacityProviders[0].Arch = evergreen.ECSArchARM64
+ execOpts, err := ExportECSPodExecutionOptions(ecsConf, getContainerOpts())
+ assert.Error(t, err)
+ assert.Zero(t, execOpts)
+ })
+ t.Run("FailsWithNoMatchingCapacityProviderForWindows", func(t *testing.T) {
+ ecsConf := getECSConfig()
+ containerOpts := getContainerOpts()
+ containerOpts.OS = pod.OSWindows
+ containerOpts.Arch = pod.ArchAMD64
+ containerOpts.WindowsVersion = pod.WindowsVersionServer2016
+ execOpts, err := ExportECSPodExecutionOptions(ecsConf, containerOpts)
assert.Error(t, err)
- assert.Zero(t, opts)
+ assert.Zero(t, execOpts)
})
}
@@ -521,3 +565,98 @@ func validPodClientSettings() *evergreen.Settings {
},
}
}
+
+func TestGetFilteredResourceIDs(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ defer cocoaMock.ResetGlobalSecretCache()
+
+ tagClient := &cocoaMock.TagClient{}
+ defer func() {
+ tagClient.Close(ctx)
+ }()
+
+ sc := &NoopSecretCache{Tag: "cache-tag"}
+
+ smClient := &cocoaMock.SecretsManagerClient{}
+ defer func() {
+ smClient.Close(ctx)
+ }()
+ v, err := secret.NewBasicSecretsManager(*secret.NewBasicSecretsManagerOptions().
+ SetClient(smClient).
+ SetCache(sc))
+ require.NoError(t, err)
+
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, secretIDs []string){
+ "ReturnsAllResultsForNoFiltersWhenNumberOfMatchesEqualsLimit": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, nil, nil, len(secretIDs))
+ require.NoError(t, err)
+ assert.ElementsMatch(t, secretIDs, ids)
+ },
+ "ReturnsAllResultsForNegativeLimit": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{SecretsManagerResourceFilter}, nil, -1)
+ require.NoError(t, err)
+ assert.ElementsMatch(t, secretIDs, ids)
+ },
+ "ReturnsNoResultsForZeroLimit": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{SecretsManagerResourceFilter}, nil, 0)
+ require.NoError(t, err)
+ assert.Empty(t, ids)
+ },
+ "ReturnsLimitedResultsWhenNumberOfMatchesIsGreaterThanLimit": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ n := len(secretIDs) - 2
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{SecretsManagerResourceFilter}, nil, n)
+ require.NoError(t, err)
+ assert.Subset(t, secretIDs, ids)
+ assert.Len(t, ids, n)
+ },
+ "ReturnsAllResultsWhenNumberOfMatchesIsLessThanLimit": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ n := len(secretIDs) + 1
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{SecretsManagerResourceFilter}, nil, n)
+ require.NoError(t, err)
+ assert.ElementsMatch(t, secretIDs, ids)
+ },
+ "ReturnsNoResultsForNoMatchingResourceFilter": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{PodDefinitionResourceFilter}, nil, len(secretIDs))
+ require.NoError(t, err)
+ assert.Empty(t, ids)
+ },
+ "ReturnsOnlyResultsMatchingTagFilter": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ // Create untagged secret, which shouldn't appear in the results.
+ _, err := smClient.CreateSecret(ctx, &secretsmanager.CreateSecretInput{
+ Name: aws.String(t.Name() + utility.RandomString()),
+ SecretString: aws.String(utility.RandomString()),
+ })
+ require.NoError(t, err)
+
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{SecretsManagerResourceFilter}, map[string][]string{
+ sc.GetTag(): {strconv.FormatBool(true)},
+ }, len(secretIDs)+1)
+ require.NoError(t, err)
+ assert.ElementsMatch(t, secretIDs, ids)
+ },
+ "ReturnsNoResultsForNoMatchingTagFilter": func(ctx context.Context, t *testing.T, secretIDs []string) {
+ ids, err := GetFilteredResourceIDs(ctx, tagClient, []string{SecretsManagerResourceFilter}, map[string][]string{
+ "nonexistent_key": {"nonexistent_value"},
+ }, len(secretIDs))
+ require.NoError(t, err)
+ assert.Empty(t, ids)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ cocoaMock.ResetGlobalSecretCache()
+
+ var secretIDs []string
+ for i := 0; i < 5; i++ {
+ id, err := v.CreateSecret(ctx, *cocoa.NewNamedSecret().
+ SetName(fmt.Sprintf("%s%d", t.Name(), i)).
+ SetValue(fmt.Sprintf("some_value%d", i)))
+ require.NoError(t, err)
+ secretIDs = append(secretIDs, id)
+ }
+
+ tCase(ctx, t, secretIDs)
+ })
+ }
+}
diff --git a/cloud/spawn.go b/cloud/spawn.go
index c6201f83485..def95ffe235 100644
--- a/cloud/spawn.go
+++ b/cloud/spawn.go
@@ -48,20 +48,20 @@ type SpawnOptions struct {
func (so *SpawnOptions) validate(settings *evergreen.Settings) error {
d, err := distro.FindOneId(so.DistroId)
if err != nil {
- return errors.Errorf("error finding distro '%s'", so.DistroId)
+ return errors.Errorf("finding distro '%s'", so.DistroId)
}
if d == nil {
return errors.Errorf("distro '%s' not found", so.DistroId)
}
if !d.SpawnAllowed {
- return errors.Errorf("Invalid spawn options: spawning not allowed for distro %s", so.DistroId)
+ return errors.Errorf("spawn hosts not allowed for distro '%s'", so.DistroId)
}
// if the user already has too many active spawned hosts, deny the request
activeSpawnedHosts, err := host.Find(host.ByUserWithRunningStatus(so.UserName))
if err != nil {
- return errors.Wrap(err, "Error occurred finding user's current hosts")
+ return errors.Wrap(err, "finding user's current hosts")
}
if err = checkSpawnHostLimitExceeded(len(activeSpawnedHosts), settings); err != nil {
@@ -70,17 +70,17 @@ func (so *SpawnOptions) validate(settings *evergreen.Settings) error {
// validate public key
if err = evergreen.ValidateSSHKey(so.PublicKey); err != nil {
- return errors.Wrap(err, "Invalid spawn options")
+ return errors.Wrap(err, "invalid SSH key options")
}
sections := strings.Split(so.PublicKey, " ")
if len(sections) < 2 {
- return errors.Errorf("Invalid spawn options: missing space in key")
+ return errors.Errorf("missing space in public key")
}
// check for valid base64
if _, err = base64.StdEncoding.DecodeString(sections[1]); err != nil {
- return errors.New("Invalid spawn options: key contains invalid base64 string")
+ return errors.New("public key contains invalid base64 string")
}
return nil
@@ -88,8 +88,7 @@ func (so *SpawnOptions) validate(settings *evergreen.Settings) error {
func checkSpawnHostLimitExceeded(numCurrentHosts int, settings *evergreen.Settings) error {
if numCurrentHosts >= settings.Spawnhost.SpawnHostsPerUser {
- return errors.Errorf("User is already running the max allowed number of spawn hosts (%d of %d)",
- numCurrentHosts, settings.Spawnhost.SpawnHostsPerUser)
+ return errors.Errorf("user is already running the max allowed number of spawn hosts (%d of %d)", numCurrentHosts, settings.Spawnhost.SpawnHostsPerUser)
}
return nil
}
@@ -103,22 +102,22 @@ func CreateSpawnHost(ctx context.Context, so SpawnOptions, settings *evergreen.S
// load in the appropriate distro
d, err := distro.FindOneId(so.DistroId)
if err != nil {
- return nil, errors.WithStack(errors.Wrap(err, "error finding distro"))
+ return nil, errors.WithStack(errors.Wrap(err, "finding distro"))
}
if d == nil {
return nil, errors.Errorf("distro '%s' not found", so.DistroId)
}
- if so.Region == "" && IsEc2Provider(d.Provider) {
+ if so.Region == "" && evergreen.IsEc2Provider(d.Provider) {
u := gimlet.GetUser(ctx)
dbUser, ok := u.(*user.DBUser)
if !ok {
- return nil, errors.Errorf("error getting DBUser from User")
+ return nil, errors.Errorf("getting DBUser from User")
}
so.Region = dbUser.GetRegion()
}
if so.Userdata != "" {
- if !IsEc2Provider(d.Provider) {
- return nil, errors.Errorf("cannot set userdata for provider '%s'", d.Provider)
+ if !evergreen.IsEc2Provider(d.Provider) {
+ return nil, errors.Errorf("cannot set user data for non-EC2 provider '%s'", d.Provider)
}
if _, err = parseUserData(so.Userdata); err != nil {
return nil, errors.Wrap(err, "user data is malformed")
@@ -152,12 +151,12 @@ func CreateSpawnHost(ctx context.Context, so SpawnOptions, settings *evergreen.S
d.ProviderSettingsList, err = modifySpawnHostProviderSettings(*d, settings, so.Region, so.HomeVolumeID)
if err != nil {
- return nil, errors.Wrap(err, "can't get new provider settings")
+ return nil, errors.Wrap(err, "getting new provider settings")
}
if so.InstanceType != "" {
if err := CheckInstanceTypeValid(ctx, *d, so.InstanceType, settings.Providers.AWS.AllowedInstanceTypes); err != nil {
- return nil, errors.Wrap(err, "error validating instance type")
+ return nil, errors.Wrap(err, "validating instance type")
}
}
@@ -170,9 +169,11 @@ func CreateSpawnHost(ctx context.Context, so SpawnOptions, settings *evergreen.S
}
// spawn the host
+ currentTime := time.Now()
expiration := evergreen.DefaultSpawnHostExpiration
+
if so.Expiration != nil {
- expiration = time.Until(*so.Expiration)
+ expiration = so.Expiration.Sub(currentTime)
}
if so.NoExpiration {
expiration = evergreen.SpawnHostNoExpirationDuration
@@ -181,7 +182,7 @@ func CreateSpawnHost(ctx context.Context, so SpawnOptions, settings *evergreen.S
Distro: *d,
ProvisionOptions: so.ProvisionOptions,
UserName: so.UserName,
- ExpirationTime: time.Now().Add(expiration),
+ ExpirationTime: currentTime.Add(expiration),
UserHost: true,
InstanceTags: so.InstanceTags,
InstanceType: so.InstanceType,
@@ -195,7 +196,7 @@ func CreateSpawnHost(ctx context.Context, so SpawnOptions, settings *evergreen.S
intentHost := host.NewIntent(hostOptions)
if intentHost == nil { // theoretically this should not happen
- return nil, errors.New("unable to intent host: NewIntent did not return a host")
+ return nil, errors.New("could not create new intent host")
}
return intentHost, nil
}
@@ -206,20 +207,20 @@ func CheckInstanceTypeValid(ctx context.Context, d distro.Distro, requestedType
// if it's not in the settings list, check the distro
originalInstanceType, ok := d.ProviderSettingsList[0].Lookup("instance_type").StringValueOK()
if !ok || originalInstanceType != requestedType {
- return errors.New("This instance type has not been allowed by admins")
+ return errors.New("this instance type has not been allowed by admins")
}
}
env := evergreen.GetEnvironment()
opts, err := GetManagerOptions(d)
if err != nil {
- return errors.Wrap(err, "error getting manager options")
+ return errors.Wrap(err, "getting cloud manager options")
}
m, err := GetManager(ctx, env, opts)
if err != nil {
- return errors.Wrap(err, "error getting manager")
+ return errors.Wrap(err, "getting cloud manager")
}
if err := m.CheckInstanceType(ctx, requestedType); err != nil {
- return errors.Wrapf(err, "error checking instance type '%s'", requestedType)
+ return errors.Wrapf(err, "checking instance type '%s'", requestedType)
}
return nil
}
@@ -227,10 +228,10 @@ func CheckInstanceTypeValid(ctx context.Context, d distro.Distro, requestedType
// SetHostRDPPassword is a shared utility function to change the password on a windows host
func SetHostRDPPassword(ctx context.Context, env evergreen.Environment, h *host.Host, pwd string) (int, error) {
if !h.Distro.IsWindows() {
- return http.StatusBadRequest, errors.New("rdp password can only be set on Windows hosts")
+ return http.StatusBadRequest, errors.New("RDP password can only be set on Windows hosts")
}
if !host.ValidateRDPPassword(pwd) {
- return http.StatusBadRequest, errors.New("Invalid password")
+ return http.StatusBadRequest, errors.New("invalid password")
}
if h.Status != evergreen.HostRunning {
return http.StatusBadRequest, errors.New("RDP passwords can only be set on running hosts")
@@ -245,7 +246,7 @@ func SetHostRDPPassword(ctx context.Context, env evergreen.Environment, h *host.
func updateRDPPassword(ctx context.Context, env evergreen.Environment, host *host.Host, password string) error {
pwdUpdateCmd, err := constructPwdUpdateCommand(ctx, env, host, password)
if err != nil {
- return errors.Wrap(err, "Error constructing host RDP password")
+ return errors.Wrap(err, "constructing host RDP password")
}
stdout := util.NewMBCappedWriter()
@@ -258,18 +259,18 @@ func updateRDPPassword(ctx context.Context, env evergreen.Environment, host *hos
grip.Warning(message.Fields{
"stdout": stdout.String(),
"stderr": stderr.String(),
- "operation": "set host rdp password",
+ "operation": "set host RDP password",
"host_id": host.Id,
"cmd": pwdUpdateCmd.String(),
"err": err.Error(),
})
- return errors.Wrap(err, "Error updating host RDP password")
+ return errors.Wrap(err, "updating host RDP password")
}
grip.Debug(message.Fields{
"stdout": stdout.String(),
"stderr": stderr.String(),
- "operation": "set host rdp password",
+ "operation": "set host RDP password",
"host_id": host.Id,
"cmd": pwdUpdateCmd.String(),
})
@@ -294,10 +295,10 @@ func constructPwdUpdateCommand(ctx context.Context, env evergreen.Environment, h
func TerminateSpawnHost(ctx context.Context, env evergreen.Environment, host *host.Host, user, reason string) error {
if host.Status == evergreen.HostTerminated {
- return errors.New("Host is already terminated")
+ return errors.New("host is already terminated")
}
if host.Status == evergreen.HostUninitialized {
- return host.SetTerminated(user, "host never started")
+ return host.SetTerminated(user, "host is an intent host")
}
cloudHost, err := GetCloudHost(ctx, host, env)
if err != nil {
@@ -331,24 +332,24 @@ func MakeExtendedSpawnHostExpiration(host *host.Host, extendBy time.Duration) (t
func modifySpawnHostProviderSettings(d distro.Distro, settings *evergreen.Settings, region, volumeID string) ([]*birch.Document, error) {
ec2Settings := EC2ProviderSettings{}
if err := ec2Settings.FromDistroSettings(d, region); err != nil {
- return nil, errors.Wrapf(err, "error getting ec2 provider from distro")
+ return nil, errors.Wrapf(err, "getting ec2 provider from distro")
}
if volumeID != "" {
volume, err := host.FindVolumeByID(volumeID)
if err != nil {
- return nil, errors.Wrapf(err, "can't get volume '%s'", volumeID)
+ return nil, errors.Wrapf(err, "getting volume '%s'", volumeID)
}
ec2Settings.SubnetId, err = getSubnetForZone(settings.Providers.AWS.Subnets, volume.AvailabilityZone)
if err != nil {
- return nil, errors.Wrapf(err, "no subnet found for AZ '%s'", volume.AvailabilityZone)
+ return nil, errors.Wrapf(err, "getting subnet for AZ '%s'", volume.AvailabilityZone)
}
}
doc, err := ec2Settings.ToDocument()
if err != nil {
- return nil, errors.Wrap(err, "can't convert ec2Settings back to doc")
+ return nil, errors.Wrap(err, "converting EC2 provider settings back to BSON doc")
}
return []*birch.Document{doc}, nil
diff --git a/cloud/static.go b/cloud/static.go
index 33c0269d1d2..227d52bfbd0 100644
--- a/cloud/static.go
+++ b/cloud/static.go
@@ -49,10 +49,10 @@ func (s *StaticSettings) FromDistroSettings(d distro.Distro, _ string) error {
if len(d.ProviderSettingsList) != 0 {
bytes, err := d.ProviderSettingsList[0].MarshalBSON()
if err != nil {
- return errors.Wrap(err, "error marshalling provider setting into bson")
+ return errors.Wrap(err, "marshalling provider setting into BSON")
}
if err := bson.Unmarshal(bytes, s); err != nil {
- return errors.Wrap(err, "error unmarshalling bson into provider settings")
+ return errors.Wrap(err, "unmarshalling BSON into provider settings")
}
}
return nil
@@ -92,12 +92,20 @@ func (staticMgr *staticManager) TerminateInstance(ctx context.Context, host *hos
"hostname": host.Host,
})
if err := host.Remove(); err != nil {
- grip.Errorf("Error removing decommissioned %s static host (%s): %+v",
- host.Distro, host.Host, err)
+ grip.Error(message.WrapError(err, message.Fields{
+ "message": "could not remove decommissioned static host",
+ "host_id": host.Id,
+ "distro": host.Distro.Id,
+ }))
}
}
- grip.Debugf("Not terminating static '%s' host: %s", host.Distro.Id, host.Host)
+ grip.Debug(message.Fields{
+ "message": "cannot terminate a static host",
+ "host_id": host.Id,
+ "distro": host.Distro.Id,
+ })
+
return nil
}
@@ -109,10 +117,6 @@ func (staticMgr *staticManager) StartInstance(ctx context.Context, host *host.Ho
return errors.New("StartInstance is not supported for static provider")
}
-func (staticMgr *staticManager) GetSettings() ProviderSettings {
- return &StaticSettings{}
-}
-
func (staticMgr *staticManager) Configure(ctx context.Context, settings *evergreen.Settings) error {
//no-op. maybe will need to load something from settings in the future.
return nil
@@ -146,7 +150,7 @@ func (m *staticManager) ModifyVolume(context.Context, *host.Volume, *model.Volum
return errors.New("can't modify volume with static provider")
}
-func (m *staticManager) GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error) {
+func (m *staticManager) GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error) {
return nil, errors.New("can't get volume attachment with static provider")
}
diff --git a/cloud/userdata.go b/cloud/userdata.go
index 82a7eeb7130..216ffadd1af 100644
--- a/cloud/userdata.go
+++ b/cloud/userdata.go
@@ -72,20 +72,20 @@ func parseUserData(userData string) (*userData, error) {
var persist bool
persist, userData, err = extractPersistTags(userData)
if err != nil {
- return nil, errors.Wrap(err, "problem extracting persist tags")
+ return nil, errors.Wrap(err, "extracting persist tags")
}
var directive userdata.Directive
directive, userData, err = extractDirective(userData)
if err != nil {
- return nil, errors.Wrap(err, "problem extracting directive")
+ return nil, errors.Wrap(err, "extracting directive")
}
var closingTag userdata.ClosingTag
if directive.NeedsClosingTag() {
userData, err = extractClosingTag(userData, directive.ClosingTag())
if err != nil {
- return nil, errors.Wrapf(err, "problem extracting closing tag '%s'", closingTag)
+ return nil, errors.Wrapf(err, "extracting closing tag '%s'", closingTag)
}
}
@@ -142,7 +142,7 @@ const (
func extractPersistTags(userData string) (found bool, userDataWithoutPersist string, err error) {
persistRegexp, err := regexp.Compile(persistTagPattern)
if err != nil {
- return false, "", errors.Wrap(err, "could not compile persist tag pattern")
+ return false, "", errors.Wrap(err, "compiling persist tag pattern")
}
userDataWithoutPersist = persistRegexp.ReplaceAllString(userData, "")
return len(userDataWithoutPersist) != len(userData), userDataWithoutPersist, nil
@@ -155,17 +155,17 @@ func makeMultipartUserData(files map[string]*userData) (string, error) {
parts := multipart.NewWriter(buf)
if err := writeUserDataHeaders(buf, parts.Boundary()); err != nil {
- return "", errors.Wrap(err, "error writing MIME headers")
+ return "", errors.Wrap(err, "writing MIME headers")
}
for fileName, userData := range files {
if err := writeUserDataPart(parts, userData, fileName); err != nil {
- return "", errors.Wrapf(err, "error writing user data '%s'", fileName)
+ return "", errors.Wrapf(err, "writing user data part '%s'", fileName)
}
}
if err := parts.Close(); err != nil {
- return "", errors.Wrap(err, "error closing MIME writer")
+ return "", errors.Wrap(err, "closing MIME writer")
}
return buf.String(), nil
@@ -181,12 +181,12 @@ func writeUserDataHeaders(writer io.Writer, boundary string) error {
for key := range topLevelHeaders {
header := fmt.Sprintf("%s: %s", key, topLevelHeaders.Get(key))
if _, err := writer.Write([]byte(header + "\r\n")); err != nil {
- return errors.Wrapf(err, "error writing top-level header '%s'", header)
+ return errors.Wrapf(err, "writing top-level header '%s'", header)
}
}
if _, err := writer.Write([]byte("\r\n")); err != nil {
- return errors.Wrap(err, "error writing top-level header line break")
+ return errors.Wrap(err, "writing top-level header line break")
}
return nil
@@ -201,7 +201,7 @@ func writeUserDataPart(writer *multipart.Writer, u *userData, fileName string) e
contentType, err := userdata.DirectiveToContentType(u.Directive)
if err != nil {
- return errors.Wrap(err, "could not detect MIME content type of user data")
+ return errors.Wrap(err, "detecting MIME content type of user data")
}
header := textproto.MIMEHeader{}
@@ -211,11 +211,11 @@ func writeUserDataPart(writer *multipart.Writer, u *userData, fileName string) e
part, err := writer.CreatePart(header)
if err != nil {
- return errors.Wrap(err, "error making custom user data part")
+ return errors.Wrap(err, "making custom user data part")
}
if _, err := part.Write([]byte(u.String())); err != nil {
- return errors.Wrap(err, "error writing custom user data")
+ return errors.Wrap(err, "writing custom user data")
}
return nil
@@ -232,7 +232,7 @@ func makeUserData(ctx context.Context, settings *evergreen.Settings, h *host.Hos
if custom != "" {
customUserData, err = parseUserData(custom)
if err != nil {
- return "", errors.Wrap(err, "could not parse custom user data")
+ return "", errors.Wrap(err, "parsing custom user data")
}
}
@@ -249,7 +249,7 @@ func makeUserData(ctx context.Context, settings *evergreen.Settings, h *host.Hos
}
provision, err := newUserData(*provisionOpts)
if err != nil {
- return "", errors.Wrap(err, "could not create provisioning user data from options")
+ return "", errors.Wrap(err, "creating provisioning user data from options")
}
if mergeParts {
@@ -257,7 +257,7 @@ func makeUserData(ctx context.Context, settings *evergreen.Settings, h *host.Hos
if customUserData != nil {
mergedUserData, err = provision.merge(customUserData)
if err != nil {
- return "", errors.Wrap(err, "could not merge user data parts into single part")
+ return "", errors.Wrap(err, "merging user data parts into single part")
}
} else {
mergedUserData = provision
@@ -274,7 +274,7 @@ func makeUserData(ctx context.Context, settings *evergreen.Settings, h *host.Hos
}
multipartUserData, err := makeMultipartUserData(parts)
if err != nil {
- return "", errors.Wrap(err, "error creating user data with multiple parts")
+ return "", errors.Wrap(err, "creating user data with multiple parts")
}
return multipartUserData, nil
diff --git a/cloud/userdata/directives.go b/cloud/userdata/directives.go
index ce8345c9fe1..9e3b9692787 100644
--- a/cloud/userdata/directives.go
+++ b/cloud/userdata/directives.go
@@ -51,7 +51,7 @@ func DirectiveToContentType(d Directive) (string, error) {
return contentType, nil
}
}
- return "", errors.Errorf("unrecognized directive '%s'", d)
+ return "", errors.Errorf("unrecognized cloud-init directive '%s'", d)
}
// NeedsClosingTag returns whether or not this directive must be closed.
diff --git a/cloud/volume.go b/cloud/volume.go
index 86094321f4e..11b7502ccf8 100644
--- a/cloud/volume.go
+++ b/cloud/volume.go
@@ -20,11 +20,11 @@ func CreateVolume(ctx context.Context, env evergreen.Environment, volume *host.V
}
mgr, err := GetManager(ctx, env, mgrOpts)
if err != nil {
- return nil, errors.Wrapf(err, "error getting manager")
+ return nil, errors.Wrapf(err, "getting cloud manager")
}
if volume, err = mgr.CreateVolume(ctx, volume); err != nil {
- return nil, errors.Wrapf(err, "error creating volume")
+ return nil, errors.Wrapf(err, "creating volume")
}
return volume, nil
}
@@ -34,6 +34,10 @@ func GetEC2ManagerForVolume(ctx context.Context, vol *host.Volume) (Manager, err
if os.Getenv("SETTINGS_OVERRIDE") != "" {
// Use the mock manager during integration tests
provider = evergreen.ProviderNameMock
+ // Set a host that will be utilized during Spruce e2e tests in spawn/volume.ts.
+ // A host is required to be set in order to unmount or delete a volume.
+ mockState := GetMockProvider()
+ mockState.Set("7f909d47566126bd39a05c1a5bd5d111c2e68de3830a8be414c18c231a47f4fc", MockInstance{})
}
mgrOpts := ManagerOpts{
Provider: provider,
@@ -41,20 +45,20 @@ func GetEC2ManagerForVolume(ctx context.Context, vol *host.Volume) (Manager, err
}
env := evergreen.GetEnvironment()
mgr, err := GetManager(ctx, env, mgrOpts)
- return mgr, errors.Wrapf(err, "can't get manager for volume '%s'", vol.ID)
+ return mgr, errors.Wrapf(err, "getting cloud manager for volume '%s'", vol.ID)
}
func DeleteVolume(ctx context.Context, volumeId string) (int, error) {
if volumeId == "" {
- return http.StatusBadRequest, errors.New("must specify volume id")
+ return http.StatusBadRequest, errors.New("must specify volume ID")
}
vol, err := host.FindVolumeByID(volumeId)
if err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't get volume '%s'", volumeId)
+ return http.StatusInternalServerError, errors.Wrapf(err, "getting volume '%s'", volumeId)
}
if vol == nil {
- return http.StatusNotFound, errors.Errorf("volume '%s' does not exist", volumeId)
+ return http.StatusNotFound, errors.Errorf("volume '%s' not found", volumeId)
}
if vol.Host != "" {
statusCode, detachErr := DetachVolume(ctx, volumeId)
@@ -68,53 +72,53 @@ func DeleteVolume(ctx context.Context, volumeId string) (int, error) {
}
err = mgr.DeleteVolume(ctx, vol)
if err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't delete volume '%s'", vol.ID)
+ return http.StatusInternalServerError, errors.Wrapf(err, "deleting volume '%s'", vol.ID)
}
return http.StatusOK, nil
}
func AttachVolume(ctx context.Context, volumeId string, hostId string) (int, error) {
if volumeId == "" {
- return http.StatusBadRequest, errors.New("must specify volume id")
+ return http.StatusBadRequest, errors.New("must specify volume ID")
}
vol, err := host.FindVolumeByID(volumeId)
if err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't get volume '%s'", volumeId)
+ return http.StatusInternalServerError, errors.Wrapf(err, "getting volume '%s'", volumeId)
}
if vol == nil {
- return http.StatusNotFound, errors.Errorf("volume '%s' does not exist", volumeId)
+ return http.StatusNotFound, errors.Errorf("volume '%s' not found", volumeId)
}
mgr, err := GetEC2ManagerForVolume(ctx, vol)
if err != nil {
return http.StatusInternalServerError, err
}
if hostId == "" {
- return http.StatusBadRequest, errors.New("must specify host id")
+ return http.StatusBadRequest, errors.New("must specify host ID")
}
h, err := host.FindOneId(hostId)
if err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't get host '%s'", vol.Host)
+ return http.StatusInternalServerError, errors.Wrapf(err, "getting host '%s'", vol.Host)
}
if h == nil {
- return http.StatusNotFound, errors.Errorf("host '%s' does not exist", hostId)
+ return http.StatusNotFound, errors.Errorf("host '%s' not found", hostId)
}
if vol.AvailabilityZone != h.Zone {
return http.StatusBadRequest, errors.New("host and volume must have same availability zone")
}
if err = mgr.AttachVolume(ctx, h, &host.VolumeAttachment{VolumeID: vol.ID}); err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't attach volume '%s'", vol.ID)
+ return http.StatusInternalServerError, errors.Wrapf(err, "attaching volume '%s' to host '%s'", vol.ID, h.Id)
}
return http.StatusOK, nil
}
func DetachVolume(ctx context.Context, volumeId string) (int, error) {
if volumeId == "" {
- return http.StatusBadRequest, errors.New("must specify volume id")
+ return http.StatusBadRequest, errors.New("must specify volume ID")
}
vol, err := host.FindVolumeByID(volumeId)
if err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't get volume '%s'", volumeId)
+ return http.StatusInternalServerError, errors.Wrapf(err, "getting volume '%s'", volumeId)
}
if vol == nil {
return http.StatusNotFound, errors.Errorf("volume '%s' does not exist", volumeId)
@@ -138,18 +142,18 @@ func DetachVolume(ctx context.Context, volumeId string) (int, error) {
"action": "DetachVolume",
}))
}
- return http.StatusInternalServerError, errors.Errorf("host '%s' for volume '%s' doesn't exist", vol.Host, vol.ID)
+ return http.StatusInternalServerError, errors.Errorf("host '%s' for volume '%s' not found", vol.Host, vol.ID)
}
if err := mgr.DetachVolume(ctx, h, vol.ID); err != nil {
- return http.StatusInternalServerError, errors.Wrapf(err, "can't detach volume '%s'", vol.ID)
+ return http.StatusInternalServerError, errors.Wrapf(err, "detaching volume '%s'", vol.ID)
}
return http.StatusOK, nil
}
func RequestNewVolume(ctx context.Context, volume host.Volume) (*host.Volume, int, error) {
if volume.Size == 0 {
- return nil, http.StatusBadRequest, errors.New("Must specify volume size")
+ return nil, http.StatusBadRequest, errors.New("must specify volume size")
}
err := ValidVolumeOptions(&volume, evergreen.GetEnvironment().Settings())
if err != nil {
@@ -161,7 +165,7 @@ func RequestNewVolume(ctx context.Context, volume host.Volume) (*host.Volume, in
}
vol, err := mgr.CreateVolume(ctx, &volume)
if err != nil {
- return nil, http.StatusInternalServerError, errors.Wrap(err, "error creating volume")
+ return nil, http.StatusInternalServerError, errors.Wrap(err, "creating volume")
}
return vol, http.StatusOK, nil
}
diff --git a/cloud/vsphere.go b/cloud/vsphere.go
index 7afb8a08081..6bdaaa795f7 100644
--- a/cloud/vsphere.go
+++ b/cloud/vsphere.go
@@ -63,12 +63,6 @@ func (opts *vsphereSettings) FromDistroSettings(d distro.Distro, _ string) error
return nil
}
-// GetSettings returns an empty vsphereSettings struct
-// since settings are configured on instance creation.
-func (m *vsphereManager) GetSettings() ProviderSettings {
- return &vsphereSettings{}
-}
-
// Configure loads the necessary credentials from the global config object.
func (m *vsphereManager) Configure(ctx context.Context, s *evergreen.Settings) error {
ao := authOptions(s.Providers.VSphere)
@@ -88,18 +82,18 @@ func (m *vsphereManager) Configure(ctx context.Context, s *evergreen.Settings) e
// Information about the intended (and eventually created) host is recorded in a DB document.
//
// vsphereSettings in the distro should have the following settings:
-// - Template (string): name of the template VM
-// - Datastore (string): (optional) name/path of the datastore to attach to e.g. 1TB_SSD
-// - ResourcePool (string): (optional) name/path of a resource pool e.g. Resources
-// - NumCPUs (int32): (optional) number of CPUs e.g. 2
-// - MemoryMB (int64): (optional) memory in MB e.g. 2048
+// - Template (string): name of the template VM
+// - Datastore (string): (optional) name/path of the datastore to attach to e.g. 1TB_SSD
+// - ResourcePool (string): (optional) name/path of a resource pool e.g. Resources
+// - NumCPUs (int32): (optional) number of CPUs e.g. 2
+// - MemoryMB (int64): (optional) memory in MB e.g. 2048
//
// Optional fields use the default values of the template vm if not specified.
-// -
+//
+// -
func (m *vsphereManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) {
if h.Distro.Provider != evergreen.ProviderNameVsphere {
- return nil, errors.Errorf("Can't spawn instance of %s for distro %s: provider is %s",
- evergreen.ProviderNameVsphere, h.Distro.Id, h.Distro.Provider)
+ return nil, errors.Errorf("can't spawn instance for distro '%s': distro provider is '%s'", h.Distro.Id, h.Distro.Provider)
}
s := &vsphereSettings{}
@@ -195,31 +189,31 @@ func (m *vsphereManager) OnUp(ctx context.Context, host *host.Host) error {
}
func (m *vsphereManager) AttachVolume(context.Context, *host.Host, *host.VolumeAttachment) error {
- return errors.New("can't attach volume with vsphere provider")
+ return errors.New("can't attach volume with vSphere provider")
}
func (m *vsphereManager) DetachVolume(context.Context, *host.Host, string) error {
- return errors.New("can't detach volume with vsphere provider")
+ return errors.New("can't detach volume with vSphere provider")
}
func (m *vsphereManager) CreateVolume(context.Context, *host.Volume) (*host.Volume, error) {
- return nil, errors.New("can't create volumes with vsphere provider")
+ return nil, errors.New("can't create volumes with vSphere provider")
}
func (m *vsphereManager) DeleteVolume(context.Context, *host.Volume) error {
- return errors.New("can't delete volumes with vsphere provider")
+ return errors.New("can't delete volumes with vSphere provider")
}
func (m *vsphereManager) ModifyVolume(context.Context, *host.Volume, *model.VolumeModifyOptions) error {
- return errors.New("can't modify volume with vsphere provider")
+ return errors.New("can't modify volume with vSphere provider")
}
-func (m *vsphereManager) GetVolumeAttachment(context.Context, string) (*host.VolumeAttachment, error) {
- return nil, errors.New("can't get volume attachment with vsphere provider")
+func (m *vsphereManager) GetVolumeAttachment(context.Context, string) (*VolumeAttachment, error) {
+ return nil, errors.New("can't get volume attachment with vSphere provider")
}
func (m *vsphereManager) CheckInstanceType(context.Context, string) error {
- return errors.New("can't specify instance type with vsphere provider")
+ return errors.New("can't specify instance type with vSphere provider")
}
// Cleanup is a noop for the vsphere provider.
@@ -231,7 +225,7 @@ func (m *vsphereManager) Cleanup(context.Context) error {
func (m *vsphereManager) GetDNSName(ctx context.Context, h *host.Host) (string, error) {
ip, err := m.client.GetIP(ctx, h)
if err != nil {
- return "", errors.Wrapf(err, "client failed to get IP for host %s", h.Id)
+ return "", errors.Wrapf(err, "getting IP for host '%s'", h.Id)
}
return ip, nil
@@ -243,7 +237,6 @@ func (m *vsphereManager) TimeTilNextPayment(host *host.Host) time.Duration {
return time.Duration(0)
}
-// TODO: this must be implemented to support adding SSH keys.
func (m *vsphereManager) AddSSHKey(ctx context.Context, pair evergreen.SSHKeyPair) error {
return nil
}
diff --git a/cloud/vsphere_client.go b/cloud/vsphere_client.go
index a38e9df8bad..dc61c5bfd40 100644
--- a/cloud/vsphere_client.go
+++ b/cloud/vsphere_client.go
@@ -52,7 +52,7 @@ func (c *vsphereClientImpl) Init(ctx context.Context, ao *authOptions) error {
insecureSkipVerify := true
client, err := govmomi.NewClient(ctx, u, insecureSkipVerify)
if err != nil {
- return errors.Wrapf(err, "could not connect to vmware host")
+ return errors.Wrapf(err, "connecting to to VMware host")
}
if !client.IsVC() {
@@ -67,11 +67,11 @@ func (c *vsphereClientImpl) Init(ctx context.Context, ao *authOptions) error {
// Set datacenter path for finder to search for objects.
dc, err := c.Finder.DefaultDatacenter(ctx)
if err != nil {
- return errors.Wrap(err, "could not find default datacenter")
+ return errors.Wrap(err, "finding default datacenter")
}
c.Finder.SetDatacenter(dc)
c.Datacenter = dc
- grip.Debugf("finder will look in datacenter %s", dc.Common.InventoryPath)
+ grip.Debugf("finder will look in datacenter '%s'", dc.Common.InventoryPath)
return nil
}
@@ -83,12 +83,12 @@ func (c *vsphereClientImpl) GetIP(ctx context.Context, h *host.Host) (string, er
vm, err := c.getInstance(ctx, h.Id)
if err != nil {
- return "", errors.Wrap(err, "API call to get instance failed")
+ return "", errors.Wrap(err, "getting instance")
}
ip, err := vm.WaitForIP(ctx)
if err != nil {
- return "", errors.Wrapf(err, "could not read ip for host %s", h.Id)
+ return "", errors.Wrapf(err, "waiting for IP for host '%s'", h.Id)
}
return ip, nil
@@ -97,14 +97,12 @@ func (c *vsphereClientImpl) GetIP(ctx context.Context, h *host.Host) (string, er
func (c *vsphereClientImpl) GetPowerState(ctx context.Context, h *host.Host) (types.VirtualMachinePowerState, error) {
vm, err := c.getInstance(ctx, h.Id)
if err != nil {
- err = errors.Wrap(err, "API call to get instance failed")
- return types.VirtualMachinePowerState(""), err
+ return types.VirtualMachinePowerState(""), errors.Wrap(err, "getting instance")
}
state, err := vm.PowerState(ctx)
if err != nil {
- err = errors.Wrapf(err, "could not read power state for host %s", h.Id)
- return types.VirtualMachinePowerState(""), err
+ return types.VirtualMachinePowerState(""), errors.Wrapf(err, "reading power state for host '%s'", h.Id)
}
return state, nil
@@ -113,7 +111,7 @@ func (c *vsphereClientImpl) GetPowerState(ctx context.Context, h *host.Host) (ty
func (c *vsphereClientImpl) CreateInstance(ctx context.Context, h *host.Host, s *vsphereSettings) (string, error) {
// Locate and organize resources for creating a virtual machine.
grip.Info(message.Fields{
- "message": "locating and organizing resources for creating a vm",
+ "message": "locating and organizing resources for creating a VM",
"datacenter": c.Datacenter,
"template": s.Template,
"datastore": s.Datastore,
@@ -124,30 +122,30 @@ func (c *vsphereClientImpl) CreateInstance(ctx context.Context, h *host.Host, s
t, err := c.getInstance(ctx, s.Template)
if err != nil {
- return "", errors.Wrapf(err, "error finding template %s", s.Template)
+ return "", errors.Wrapf(err, "finding template '%s'", s.Template)
}
folders, err := c.Datacenter.Folders(ctx)
if err != nil {
- return "", errors.Wrapf(err, "error getting folders from datacenter %v", c.Datacenter)
+ return "", errors.Wrapf(err, "getting folders from datacenter %v", c.Datacenter)
}
spec, err := c.cloneSpec(ctx, s)
if err != nil {
- err = errors.Wrap(err, "error making spec to clone vm")
+ err = errors.Wrap(err, "making spec to clone VM")
grip.Error(err)
return "", err
}
// Deploy the virtual machine from a template as a virtual machine.
if _, err = t.Clone(ctx, folders.VmFolder, h.Id, spec); err != nil {
- err = errors.Wrapf(err, "error making task to clone vm %s", t)
+ err = errors.Wrapf(err, "making task to clone VM %v", t)
grip.Error(err)
return "", err
}
grip.Info(message.Fields{
- "message": "cloning vm, may take a few minutes to start up...",
+ "message": "cloning VM, may take a few minutes to start up...",
"template": s.Template,
"host_id": h.Id,
})
@@ -158,30 +156,30 @@ func (c *vsphereClientImpl) CreateInstance(ctx context.Context, h *host.Host, s
func (c *vsphereClientImpl) DeleteInstance(ctx context.Context, h *host.Host) error {
vm, err := c.getInstance(ctx, h.Id)
if err != nil {
- return errors.Wrap(err, "API call to get instance failed")
+ return errors.Wrap(err, "getting instance")
}
// make sure the instance is powered off before removing
state, err := vm.PowerState(ctx)
if err != nil {
- return errors.Wrapf(err, "could not read power state of %s", h.Id)
+ return errors.Wrapf(err, "reading power state of host '%s'", h.Id)
}
if state == types.VirtualMachinePowerStatePoweredOn {
var task *object.Task
task, err = vm.PowerOff(ctx)
if err != nil {
- return errors.Wrap(err, "failed to create power off task")
+ return errors.Wrap(err, "creating power off task")
}
if err = task.Wait(ctx); err != nil {
- return errors.Wrap(err, "power off task failed to execute")
+ return errors.Wrap(err, "waiting for VM to power off")
}
}
// remove the instance
if _, err = vm.Destroy(ctx); err != nil {
- return errors.Wrapf(err, "error destroying vm %v", vm)
+ return errors.Wrapf(err, "destroying VM %v", vm)
}
return nil
diff --git a/cloud/vsphere_test.go b/cloud/vsphere_test.go
index a96e4c79b86..6214a469ada 100644
--- a/cloud/vsphere_test.go
+++ b/cloud/vsphere_test.go
@@ -211,7 +211,7 @@ func (s *VSphereSuite) TestSpawnInvalidSettings() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- s.hostOpts.Distro = distro.Distro{Provider: evergreen.ProviderNameEc2Auto}
+ s.hostOpts.Distro = distro.Distro{Provider: evergreen.ProviderNameEc2Fleet}
h := host.NewIntent(s.hostOpts)
s.NotNil(h)
h, err := s.manager.SpawnHost(ctx, h)
diff --git a/cloud/vsphere_util.go b/cloud/vsphere_util.go
index 26474666f07..4faeef17ef0 100644
--- a/cloud/vsphere_util.go
+++ b/cloud/vsphere_util.go
@@ -31,7 +31,7 @@ func vsphereToEvgStatus(state types.VirtualMachinePowerState) CloudStatus {
func (c *vsphereClientImpl) getInstance(ctx context.Context, name string) (*object.VirtualMachine, error) {
vm, err := c.Finder.VirtualMachine(ctx, name)
if err != nil {
- return nil, errors.Wrapf(err, "could not find vm for host %s", name)
+ return nil, errors.Wrapf(err, "finding VM for host '%s'", name)
}
return vm, err
@@ -46,7 +46,7 @@ func (c *vsphereClientImpl) relocateSpec(ctx context.Context, s *vsphereSettings
// resource pool is required
rp, err := c.Finder.ResourcePool(ctx, s.ResourcePool)
if err != nil {
- err = errors.Wrapf(err, "error finding pool %s", s.ResourcePool)
+ err = errors.Wrapf(err, "finding pool '%s'", s.ResourcePool)
grip.Error(err)
return spec, err
}
@@ -56,7 +56,7 @@ func (c *vsphereClientImpl) relocateSpec(ctx context.Context, s *vsphereSettings
if s.Datastore != "" {
ds, err := c.Finder.Datastore(ctx, s.Datastore)
if err != nil {
- err = errors.Wrapf(err, "error finding datastore %s", s.Datastore)
+ err = errors.Wrapf(err, "finding datastore '%s'", s.Datastore)
grip.Error(err)
return spec, err
}
@@ -98,7 +98,7 @@ func (c *vsphereClientImpl) cloneSpec(ctx context.Context, s *vsphereSettings) (
cs := c.configSpec(s)
rs, err := c.relocateSpec(ctx, s)
if err != nil {
- return spec, errors.Wrap(err, "error making relocate spec")
+ return spec, errors.Wrap(err, "making relocate spec")
}
spec = types.VirtualMachineCloneSpec{
diff --git a/cmd/build-cross-compile/build-cross-compile.go b/cmd/build-cross-compile/build-cross-compile.go
index b9cc9d87948..65e22b927ac 100644
--- a/cmd/build-cross-compile/build-cross-compile.go
+++ b/cmd/build-cross-compile/build-cross-compile.go
@@ -16,6 +16,7 @@ func main() {
directory string
source string
ldFlags string
+ gcFlags string
buildName string
output string
goBin string
@@ -38,6 +39,7 @@ func main() {
flag.StringVar(&directory, "directory", "", "output directory")
flag.StringVar(&source, "source", "", "path to source file")
flag.StringVar(&ldFlags, "ldflags", "", "specify any ldflags to pass to go build")
+ flag.StringVar(&gcFlags, "gcflags", "", "specify any gcflags to pass to go build")
flag.StringVar(&buildName, "buildName", "", "use GOOS_ARCH to specify target platform")
flag.StringVar(&goBin, "goBinary", "go", "specify path to go binary")
flag.StringVar(&output, "output", "", "specify the name of executable")
@@ -67,6 +69,10 @@ func main() {
ldfQuoted := fmt.Sprintf("-ldflags=\"%s\"", ldFlags)
cmd.Args = append(cmd.Args, ldf)
+ gcf := fmt.Sprintf("-gcflags=%s", gcFlags)
+ gcfQuoted := fmt.Sprintf("-gcflags=\"%s\"", gcFlags)
+ cmd.Args = append(cmd.Args, gcf)
+
cmd.Env = os.Environ()
if tmpdir := os.Getenv("TMPDIR"); tmpdir != "" {
cmd.Env = append(cmd.Env, "TMPDIR="+strings.Replace(tmpdir, `\`, `\\`, -1))
@@ -84,6 +90,7 @@ func main() {
cmd.Stderr = os.Stderr
cmdString := strings.Join(cmd.Args, " ")
+ cmdString = strings.Replace(cmdString, gcf, gcfQuoted, -1)
fmt.Println(goos, goarch, strings.Replace(cmdString, ldf, ldfQuoted, -1))
if err := cmd.Run(); err != nil {
fmt.Printf("problem building %s: %v\n", output, err)
diff --git a/cmd/codegen/core/codegen.go b/cmd/codegen/core/codegen.go
index 651cfd39f39..cf6441f5bff 100644
--- a/cmd/codegen/core/codegen.go
+++ b/cmd/codegen/core/codegen.go
@@ -5,7 +5,7 @@ import (
"fmt"
"go/importer"
"go/types"
- "io/ioutil"
+ "os"
"path/filepath"
"regexp"
"sort"
@@ -220,7 +220,7 @@ func dbField(gqlDefinition ast.FieldDefinition) string {
// getTemplate is a utility function that takes a filepath (relative to the directory of this file)
// and returns a parsed go template from it
func getTemplate(file string) (*template.Template, error) {
- f, err := ioutil.ReadFile(filepath.Join(pathPrefix, file))
+ f, err := os.ReadFile(filepath.Join(pathPrefix, file))
if err != nil {
return nil, err
}
diff --git a/cmd/codegen/core/codegen_test.go b/cmd/codegen/core/codegen_test.go
index a0f0fd2e979..d971b5e4d9f 100644
--- a/cmd/codegen/core/codegen_test.go
+++ b/cmd/codegen/core/codegen_test.go
@@ -1,7 +1,6 @@
package core
import (
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -18,7 +17,7 @@ func TestCodegen(t *testing.T) {
t.Skip()
return
}
- configFile, err := ioutil.ReadFile("testdata/schema/config.yml")
+ configFile, err := os.ReadFile("testdata/schema/config.yml")
require.NoError(t, err)
var gqlConfig config.Config
err = yaml.Unmarshal(configFile, &gqlConfig)
@@ -28,7 +27,7 @@ func TestCodegen(t *testing.T) {
mapping[dbModel] = info.Model[0]
}
- schemaFiles, err := ioutil.ReadDir(filepath.Join("testdata", "schema"))
+ schemaFiles, err := os.ReadDir(filepath.Join("testdata", "schema"))
require.NoError(t, err)
for _, info := range schemaFiles {
if !strings.HasSuffix(info.Name(), ".graphql") {
@@ -36,17 +35,17 @@ func TestCodegen(t *testing.T) {
}
name := strings.Replace(info.Name(), ".graphql", "", -1)
t.Run(name, func(t *testing.T) {
- f, err := ioutil.ReadFile(filepath.Join("testdata", "schema", name+".graphql"))
+ f, err := os.ReadFile(filepath.Join("testdata", "schema", name+".graphql"))
require.NoError(t, err)
generated, converters, err := Codegen(string(f), mapping)
require.NoError(t, err)
- expected, err := ioutil.ReadFile(filepath.Join("testdata", "expected", name+".go"))
+ expected, err := os.ReadFile(filepath.Join("testdata", "expected", name+".go"))
require.NoError(t, err)
assert.Equal(t, string(expected), string(generated))
converterFilepath := filepath.Join("testdata", "expected", name+"__converters.go")
- expected, err = ioutil.ReadFile(converterFilepath)
+ expected, err = os.ReadFile(converterFilepath)
require.NoError(t, err)
assert.Equal(t, string(expected), string(converters))
})
diff --git a/cmd/codegen/entry.go b/cmd/codegen/entry.go
index b75914982d2..d78d9c1ef96 100644
--- a/cmd/codegen/entry.go
+++ b/cmd/codegen/entry.go
@@ -2,7 +2,7 @@ package main
import (
"flag"
- "io/ioutil"
+ "os"
"github.com/99designs/gqlgen/codegen/config"
"github.com/evergreen-ci/evergreen/cmd/codegen/core"
@@ -25,12 +25,12 @@ func main() {
flag.Parse()
const pathToRestModels = "cmd/codegen/core"
- configData, err := ioutil.ReadFile(configFile)
+ configData, err := os.ReadFile(configFile)
grip.EmergencyFatal(errors.Wrap(err, "unable to read config file"))
var gqlConfig config.Config
err = yaml.Unmarshal(configData, &gqlConfig)
grip.EmergencyFatal(errors.Wrap(err, "unable to parse config file"))
- schema, err := ioutil.ReadFile(schemaFile)
+ schema, err := os.ReadFile(schemaFile)
grip.EmergencyFatal(errors.Wrap(err, "unable to read schema file"))
mapping := core.ModelMapping{}
@@ -40,9 +40,9 @@ func main() {
core.SetGeneratePathPrefix(pathToRestModels)
model, helper, err := core.Codegen(string(schema), mapping)
grip.EmergencyFatal(errors.Wrap(err, "error generating code"))
- err = ioutil.WriteFile(modelFile, model, 0644)
+ err = os.WriteFile(modelFile, model, 0644)
grip.EmergencyFatal(errors.Wrap(err, "error writing to model file"))
- err = ioutil.WriteFile(helperFile, helper, 0644)
+ err = os.WriteFile(helperFile, helper, 0644)
grip.EmergencyFatal(errors.Wrap(err, "error writing to helper file"))
grip.Infof("%s and %s have been updated with the generated code", modelFile, helperFile)
diff --git a/cmd/evergreen/evergreen.go b/cmd/evergreen/evergreen.go
index 0ccbd5c718c..707041c0da9 100644
--- a/cmd/evergreen/evergreen.go
+++ b/cmd/evergreen/evergreen.go
@@ -49,7 +49,6 @@ func buildApp() *cli.App {
operations.Volume(),
operations.Notification(),
operations.Buildlogger(),
- operations.Generate(),
// Top-level commands.
operations.Keys(),
@@ -62,6 +61,7 @@ func buildApp() *cli.App {
operations.Subscriptions(),
operations.CommitQueue(),
operations.Scheduler(),
+ operations.Client(),
// Patch creation and management commands (top-level)
operations.Patch(),
diff --git a/cmd/evg-lint/evg-lint.go b/cmd/evg-lint/evg-lint.go
index 9937129d05c..3e6b45a5d36 100644
--- a/cmd/evg-lint/evg-lint.go
+++ b/cmd/evg-lint/evg-lint.go
@@ -1,5 +1,4 @@
//go:build tools
-// +build tools
// This is a helper file to track evg-lint as a Go tooling dependency in Go
// modules.
diff --git a/cmd/generate-lint/generate-lint.go b/cmd/generate-lint/generate-lint.go
index ef9daba59c6..a212b894fa3 100644
--- a/cmd/generate-lint/generate-lint.go
+++ b/cmd/generate-lint/generate-lint.go
@@ -3,7 +3,6 @@ package main
import (
"encoding/json"
"fmt"
- "io/ioutil"
"os"
"os/exec"
"path"
@@ -172,5 +171,5 @@ func main() {
grip.EmergencyFatal(err)
}
jsonBytes, _ := json.MarshalIndent(generate, "", " ")
- grip.Error(ioutil.WriteFile(jsonFilename, jsonBytes, 0644))
+ grip.Error(os.WriteFile(jsonFilename, jsonBytes, 0644))
}
diff --git a/cmd/gqlgen/gqlgen.go b/cmd/gqlgen/gqlgen.go
index 9ce3cb8e915..cdc137e987a 100644
--- a/cmd/gqlgen/gqlgen.go
+++ b/cmd/gqlgen/gqlgen.go
@@ -1,5 +1,4 @@
//go:build tools
-// +build tools
// This is a helper file to track gqlgen as a Go tooling dependency in Go
// modules.
diff --git a/cmd/load-smoke-data/load-smoke-data.go b/cmd/load-smoke-data/load-smoke-data.go
index 75b386ebf41..358fb9a0223 100644
--- a/cmd/load-smoke-data/load-smoke-data.go
+++ b/cmd/load-smoke-data/load-smoke-data.go
@@ -11,9 +11,9 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/host"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/utility"
"github.com/mongodb/amboy"
"github.com/mongodb/amboy/queue"
@@ -42,7 +42,7 @@ func getFiles(root string) ([]string, error) {
})
if err != nil {
- return nil, errors.Wrapf(err, "problem finding import files in %s", root)
+ return nil, errors.Wrapf(err, "finding import files in path '%s'", root)
}
return out, nil
@@ -62,21 +62,28 @@ func insertFileDocsToDB(ctx context.Context, fn string, db *mongo.Database, logs
if collName == model.TaskLogCollection {
collection = logsDb.Collection(collName)
}
- if collName == testresult.Collection { // add the necessary test results index
- if _, err = collection.Indexes().CreateOne(ctx, mongo.IndexModel{
- Keys: testresult.TestResultsIndex,
+ switch collName {
+ case task.Collection:
+ if _, err = collection.Indexes().CreateMany(ctx, []mongo.IndexModel{
+ {
+ Keys: task.ActivatedTasksByDistroIndex,
+ },
+ {
+ Keys: task.DurationIndex,
+ },
}); err != nil {
- return errors.Wrap(err, "creating test results index")
+ return errors.Wrap(err, "creating task indexes")
}
- }
- if collName == task.Collection { // add the necessary tasks index
+ case host.Collection:
if _, err = collection.Indexes().CreateOne(ctx, mongo.IndexModel{
- Keys: task.ActivatedTasksByDistroIndex,
+ Keys: host.StatusIndex,
}); err != nil {
- return errors.Wrap(err, "creating activated tasks by distro index")
+ return errors.Wrap(err, "creating host index")
}
}
scanner := bufio.NewScanner(file)
+ // Set the max buffer size to the max size of a Mongo document (16MB).
+ scanner.Buffer(make([]byte, 4096), 16*1024*1024)
count := 0
for scanner.Scan() {
count++
diff --git a/test_auth.yml b/cmd/mongo-auth/test_auth.yml
similarity index 100%
rename from test_auth.yml
rename to cmd/mongo-auth/test_auth.yml
diff --git a/cmd/parse-host-file/parse-host-file.go b/cmd/parse-host-file/parse-host-file.go
index 4f0c1216b82..0894de40c60 100644
--- a/cmd/parse-host-file/parse-host-file.go
+++ b/cmd/parse-host-file/parse-host-file.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"flag"
"fmt"
- "io/ioutil"
+ "io"
"os"
)
@@ -28,7 +28,7 @@ func main() {
fmt.Println(err.Error())
os.Exit(1)
}
- bytes, err := ioutil.ReadAll(f)
+ bytes, err := io.ReadAll(f)
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
@@ -45,7 +45,7 @@ func main() {
}
data := []byte(fmt.Sprintf("docker_host: %s", hosts[0].DNS))
- err = ioutil.WriteFile("bin/expansions.yml", data, 0644)
+ err = os.WriteFile("bin/expansions.yml", data, 0644)
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
diff --git a/cmd/sign-executable/go.mod b/cmd/sign-executable/go.mod
index 4e3be845158..0d3819aa28e 100644
--- a/cmd/sign-executable/go.mod
+++ b/cmd/sign-executable/go.mod
@@ -3,7 +3,6 @@ module github.com/evergreen-ci/evergreen/cmd/sign-executable
go 1.16
require (
- github.com/evergreen-ci/utility v0.0.0-20220404192535-d16eb64796e6
github.com/pkg/errors v0.9.1
github.com/urfave/cli v1.22.5
)
diff --git a/cmd/sign-executable/go.sum b/cmd/sign-executable/go.sum
index 7c7429f13b2..5e2df210739 100644
--- a/cmd/sign-executable/go.sum
+++ b/cmd/sign-executable/go.sum
@@ -1,531 +1,15 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
-cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
-cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
-cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
-cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
-cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
-cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
-cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
-cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
-cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
-cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
-cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
-cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
-cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
-cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
-cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
-cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
-cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
-cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
-cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
-cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
-cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
-cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
-cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/PuerkitoBio/rehttp v1.1.0 h1:JFZ7OeK+hbJpTxhNB0NDZT47AuXqCU0Smxfjtph7/Rs=
-github.com/PuerkitoBio/rehttp v1.1.0/go.mod h1:LUwKPoDbDIA2RL5wYZCNsQ90cx4OJ4AWBmq6KzWZL1s=
-github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
-github.com/andygrunwald/go-jira v0.0.0-20170512141550-c8c6680f245f/go.mod h1:yNYQrX3nGSrVdcVsM2mWz2pm7tTeDtYfRyVEkc3VUiY=
-github.com/andygrunwald/go-jira v1.14.0 h1:7GT/3qhar2dGJ0kq8w0d63liNyHOnxZsUZ9Pe4+AKBI=
-github.com/andygrunwald/go-jira v1.14.0/go.mod h1:KMo2f4DgMZA1C9FdImuLc04x4WQhn5derQpnsuBFgqE=
-github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=
-github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA=
-github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
-github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
-github.com/bluele/slack v0.0.0-20180528010058-b4b4d354a079 h1:dm7wU6Dyf+rVGryOAB8/J/I+pYT/9AdG8dstD3kdMWU=
-github.com/bluele/slack v0.0.0-20180528010058-b4b4d354a079/go.mod h1:W679Ri2W93VLD8cVpEY/zLH1ow4zhJcCyjzrKxfM3QM=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/coreos/go-systemd v0.0.0-20160607160209-6dc8b843c670/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
-github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go.mod h1:tmAIfUFEirG/Y8jhZ9M+h36obRZAk/1fcSpXwAVlfqE=
-github.com/dghubble/oauth1 v0.7.0/go.mod h1:8pFdfPkv/jr8mkChVbNVuJ0suiHe278BtWI4Tk1ujxk=
-github.com/dghubble/oauth1 v0.7.1 h1:JjbOVSVVkms9A4h/sTQy5Jb2nFuAAVb2qVYgenJPyrE=
-github.com/dghubble/oauth1 v0.7.1/go.mod h1:0eEzON0UY/OLACQrmnjgJjmvCGXzjBCsZqL1kWDXtF0=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/evergreen-ci/gimlet v0.0.0-20220401150826-5898de01dbd8 h1:7G4BRPX+FH5KP1n2odBZmcejCF+Oq1pjvH9E1zs/Szo=
-github.com/evergreen-ci/gimlet v0.0.0-20220401150826-5898de01dbd8/go.mod h1:LfnJ3oYEVFUHwIPoAotvn9bbtAT+lAaCpH5YYnyxluk=
-github.com/evergreen-ci/negroni v1.0.1-0.20211028183800-67b6d7c2c035 h1:oVU/ni/sRq+GAogUMLa7LBGtvVHMVLbisuytxBC5KaY=
-github.com/evergreen-ci/negroni v1.0.1-0.20211028183800-67b6d7c2c035/go.mod h1:pvK7NM0ZC+sfTLuIiJN4BgM1S9S5Oo79PJReAFFph18=
-github.com/evergreen-ci/utility v0.0.0-20220404192535-d16eb64796e6 h1:K7gQ8KBfq3wH8+BSSjZG9ZdD9P5KO2XZJxVQeg0eUW8=
-github.com/evergreen-ci/utility v0.0.0-20220404192535-d16eb64796e6/go.mod h1:wSui4nRyDZzm2db7Ju7ZzBAelLyVLmcTPJEIh1IdSrc=
-github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
-github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
-github.com/fuyufjh/splunk-hec-go v0.3.3/go.mod h1:DSeNMkIDw6WdmEnc4CBxC1+Hk12JEQcsaymRG/g/Qns=
-github.com/fuyufjh/splunk-hec-go v0.3.4-0.20190414090710-10df423a9f36 h1:eUGetkix+fHaXePa+lCFL/z+Wpetv/afdd798N0EdcY=
-github.com/fuyufjh/splunk-hec-go v0.3.4-0.20190414090710-10df423a9f36/go.mod h1:DSeNMkIDw6WdmEnc4CBxC1+Hk12JEQcsaymRG/g/Qns=
-github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
-github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-ldap/ldap/v3 v3.4.2/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg=
-github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
-github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
-github.com/goccy/go-json v0.9.4/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
-github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
-github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
-github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
-github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
-github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
-github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
-github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
-github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
-github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
-github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
-github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
-github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
-github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y=
-github.com/lestrrat-go/blackmagic v1.0.0/go.mod h1:TNgH//0vYSs8VXDCfkZLgIrVTTXQELZffUV0tz3MtdQ=
-github.com/lestrrat-go/codegen v1.0.0/go.mod h1:JhJw6OQAuPEfVKUCLItpaVLumDGWQznd1VaXrBk9TdM=
-github.com/lestrrat-go/httpcc v1.0.0/go.mod h1:tGS/u00Vh5N6FHNkExqGGNId8e0Big+++0Gf8MBnAvE=
-github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc=
-github.com/lestrrat-go/jwx v1.2.18/go.mod h1:bWTBO7IHHVMtNunM8so9MT8wD+euEY1PzGEyCnuI2qM=
-github.com/lestrrat-go/option v0.0.0-20210103042652-6f1ecfceda35/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
-github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
-github.com/lestrrat-go/pdebug/v3 v3.0.1/go.mod h1:za+m+Ve24yCxTEhR59N7UlnJomWwCiIqbJRmKeiADU4=
-github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
-github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
-github.com/mattn/go-xmpp v0.0.0-20161121012536-f4550b539938/go.mod h1:Cs5mF0OsrRRmhkyOod//ldNPOwJsrBvJ+1WRspv0xoc=
-github.com/mattn/go-xmpp v0.0.0-20210723025538-3871461df959 h1:heUerLk4jOhweir4OqSGDUZueo9dRRtBcglPB44XRYY=
-github.com/mattn/go-xmpp v0.0.0-20210723025538-3871461df959/go.mod h1:Cs5mF0OsrRRmhkyOod//ldNPOwJsrBvJ+1WRspv0xoc=
-github.com/mongodb/grip v0.0.0-20211018154934-e661a71929d5/go.mod h1:g0r93iHSTLD50bDT7vNj+z+Y3nKz9o/tQXtB9esq2tk=
-github.com/mongodb/grip v0.0.0-20220401165023-6a1d9bb90c21 h1:SBXhTs+Umg5AX4uBrNbfq6hbxJELFCN42j3fC7QJG+M=
-github.com/mongodb/grip v0.0.0-20220401165023-6a1d9bb90c21/go.mod h1:QfF6CwbaTQx1Kgww77c6ROPBFN+JCiU2qBnk2SjKHyU=
-github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
-github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
-github.com/okta/okta-jwt-verifier-golang v1.2.1/go.mod h1:cHffA777f7Yi4K+yDzUp89sGD5v8sk04Pc3CiT1OMR8=
-github.com/patrickmn/go-cache v0.0.0-20180815053127-5633e0862627/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
-github.com/phyber/negroni-gzip v0.0.0-20180113114010-ef6356a5d029/go.mod h1:94RTq2fypdZCze25ZEZSjtbAQRT3cL/8EuRUqAZC/+w=
-github.com/phyber/negroni-gzip v1.0.0 h1:ru1uBeaUeoAXYgZRE7RsH7ftj/t5v/hkufXv1OYbNK8=
-github.com/phyber/negroni-gzip v1.0.0/go.mod h1:poOYjiFVKpeib8SnUpOgfQGStKNGLKsM8l09lOTNeyw=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
-github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
-github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
-github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
-github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
-github.com/shirou/gopsutil v3.21.9+incompatible h1:LTLpUnfX81MkHeCtSrwNKZwuW5Id6kCa7/P43NdcNn4=
-github.com/shirou/gopsutil v3.21.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
-github.com/shirou/gopsutil/v3 v3.22.3 h1:UebRzEomgMpv61e3hgD1tGooqX5trFbdU/ehphbHd00=
-github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
-github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
-github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
-github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
-github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
-github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
-github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
-github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o=
-github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
-github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM=
-github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc=
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
-github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
-github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
-github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
-github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
-github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
-github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
-github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
-go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
-go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
-golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
-golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
-golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
-golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
-golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
-golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
-golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I=
-golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
-golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo=
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
-golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
-google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
-google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
-google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
-google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
-google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
-google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
-google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
-gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/cmd/sign-executable/sign-executable.go b/cmd/sign-executable/sign-executable.go
index d9eb4a874ac..6fb5ce674a2 100644
--- a/cmd/sign-executable/sign-executable.go
+++ b/cmd/sign-executable/sign-executable.go
@@ -6,14 +6,12 @@ import (
"context"
"fmt"
"io"
- "io/ioutil"
"log"
"net/http"
"os"
"os/exec"
"path"
- "github.com/evergreen-ci/utility"
"github.com/pkg/errors"
"github.com/urfave/cli"
)
@@ -22,8 +20,6 @@ const (
getClientSubcommand = "get-client"
signSubcommand = "sign"
notaryClientFilename = "macnotary"
-
- maxRetries = 3
)
func zipFile(inputFilePath, destinationPath string) error {
@@ -147,12 +143,10 @@ func signWithNotaryClient(ctx context.Context, zipToSignPath, destinationPath st
args = append(args, "--secret", opts.notarySecret)
}
- return utility.Retry(ctx, func() (bool, error) {
- cmd := exec.CommandContext(ctx, opts.notaryClientPath, args...)
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- return true, errors.Wrap(cmd.Run(), "running notary client")
- }, utility.RetryOptions{MaxAttempts: maxRetries})
+ cmd := exec.CommandContext(ctx, opts.notaryClientPath, args...)
+ cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stderr
+ return errors.Wrap(cmd.Run(), "running notary client")
}
func downloadClient(ctx context.Context, opts fetchClientOpts) error {
@@ -169,7 +163,7 @@ func downloadClient(ctx context.Context, opts fetchClientOpts) error {
}
func signExecutable(ctx context.Context, opts signOpts) error {
- tempDir, err := ioutil.TempDir("", "evergreen")
+ tempDir, err := os.MkdirTemp("", "evergreen")
if err != nil {
return errors.Wrap(err, "creating temp dir")
}
diff --git a/cmd/upload-s3/upload-s3.go b/cmd/upload-s3/upload-s3.go
index a8df60ae182..a3cb27e868a 100644
--- a/cmd/upload-s3/upload-s3.go
+++ b/cmd/upload-s3/upload-s3.go
@@ -51,7 +51,7 @@ func main() {
Credentials: pail.CreateAWSCredentials(awsKey, awsSecret, ""),
Region: endpoints.UsEast1RegionID,
Name: bucketName,
- MaxRetries: 10,
+ MaxRetries: utility.ToIntPtr(10),
Permissions: pail.S3PermissionsPublicRead,
Verbose: true,
}
diff --git a/config.go b/config.go
index 65f2d625146..65af2529dee 100644
--- a/config.go
+++ b/config.go
@@ -3,7 +3,6 @@ package evergreen
import (
"context"
"fmt"
- "io/ioutil"
"net/http"
"os"
"path/filepath"
@@ -25,86 +24,89 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readconcern"
"go.mongodb.org/mongo-driver/mongo/writeconcern"
- yaml "gopkg.in/yaml.v3"
+ "gopkg.in/yaml.v3"
)
var (
- // Should be specified with -ldflags at build time
+ // BuildRevision should be specified with -ldflags at build time
BuildRevision = ""
- // Commandline Version String; used to control auto-updating.
- ClientVersion = "2022-06-07"
+ // ClientVersion is the commandline version string used to control auto-updating.
+ ClientVersion = "2023-05-02"
// Agent version to control agent rollover.
- AgentVersion = "2022-06-23"
+ AgentVersion = "2023-05-09"
)
// ConfigSection defines a sub-document in the evergreen config
// any config sections must also be added to registry.go
type ConfigSection interface {
- // SectionId() returns the ID of the section to be used in the database document and struct tag
+ // SectionId returns the ID of the section to be used in the database document and struct tag
SectionId() string
- // Get() populates the section from the DB
+ // Get populates the section from the DB
Get(Environment) error
- // Set() upserts the section document into the DB
+ // Set upserts the section document into the DB
Set() error
- // ValidateAndDefault() validates input and sets defaults
+ // ValidateAndDefault validates input and sets defaults
ValidateAndDefault() error
}
// Settings contains all configuration settings for running Evergreen. Settings
// with the "id" struct tag should implement the ConfigSection interface.
type Settings struct {
- Id string `bson:"_id" json:"id" yaml:"id"`
- Alerts AlertsConfig `yaml:"alerts" bson:"alerts" json:"alerts" id:"alerts"`
- Amboy AmboyConfig `yaml:"amboy" bson:"amboy" json:"amboy" id:"amboy"`
- Api APIConfig `yaml:"api" bson:"api" json:"api" id:"api"`
- ApiUrl string `yaml:"api_url" bson:"api_url" json:"api_url"`
- AuthConfig AuthConfig `yaml:"auth" bson:"auth" json:"auth" id:"auth"`
- Banner string `bson:"banner" json:"banner" yaml:"banner"`
- BannerTheme BannerTheme `bson:"banner_theme" json:"banner_theme" yaml:"banner_theme"`
- Cedar CedarConfig `bson:"cedar" json:"cedar" yaml:"cedar" id:"cedar"`
- ClientBinariesDir string `yaml:"client_binaries_dir" bson:"client_binaries_dir" json:"client_binaries_dir"`
- CommitQueue CommitQueueConfig `yaml:"commit_queue" bson:"commit_queue" json:"commit_queue" id:"commit_queue"`
- ConfigDir string `yaml:"configdir" bson:"configdir" json:"configdir"`
- ContainerPools ContainerPoolsConfig `yaml:"container_pools" bson:"container_pools" json:"container_pools" id:"container_pools"`
- Credentials map[string]string `yaml:"credentials" bson:"credentials" json:"credentials"`
- CredentialsNew util.KeyValuePairSlice `yaml:"credentials_new" bson:"credentials_new" json:"credentials_new"`
- Database DBSettings `yaml:"database" json:"database" bson:"database"`
- DomainName string `yaml:"domain_name" bson:"domain_name" json:"domain_name"`
- Expansions map[string]string `yaml:"expansions" bson:"expansions" json:"expansions"`
- ExpansionsNew util.KeyValuePairSlice `yaml:"expansions_new" bson:"expansions_new" json:"expansions_new"`
- GithubPRCreatorOrg string `yaml:"github_pr_creator_org" bson:"github_pr_creator_org" json:"github_pr_creator_org"`
- GithubOrgs []string `yaml:"github_orgs" bson:"github_orgs" json:"github_orgs"`
- DisabledGQLQueries []string `yaml:"disabled_gql_queries" bson:"disabled_gql_queries" json:"disabled_gql_queries"`
- HostInit HostInitConfig `yaml:"hostinit" bson:"hostinit" json:"hostinit" id:"hostinit"`
- HostJasper HostJasperConfig `yaml:"host_jasper" bson:"host_jasper" json:"host_jasper" id:"host_jasper"`
- Jira JiraConfig `yaml:"jira" bson:"jira" json:"jira" id:"jira"`
- JIRANotifications JIRANotificationsConfig `yaml:"jira_notifications" json:"jira_notifications" bson:"jira_notifications" id:"jira_notifications"`
- Keys map[string]string `yaml:"keys" bson:"keys" json:"keys"`
- KeysNew util.KeyValuePairSlice `yaml:"keys_new" bson:"keys_new" json:"keys_new"`
- LDAPRoleMap LDAPRoleMap `yaml:"ldap_role_map" bson:"ldap_role_map" json:"ldap_role_map"`
- LoggerConfig LoggerConfig `yaml:"logger_config" bson:"logger_config" json:"logger_config" id:"logger_config"`
- LogPath string `yaml:"log_path" bson:"log_path" json:"log_path"`
- NewRelic NewRelicConfig `yaml:"newrelic" bson:"newrelic" json:"newrelic" id:"newrelic"`
- Notify NotifyConfig `yaml:"notify" bson:"notify" json:"notify" id:"notify"`
- Plugins PluginConfig `yaml:"plugins" bson:"plugins" json:"plugins"`
- PluginsNew util.KeyValuePairSlice `yaml:"plugins_new" bson:"plugins_new" json:"plugins_new"`
- PodInit PodInitConfig `yaml:"pod_init" bson:"pod_init" json:"pod_init" id:"pod_init"`
- PprofPort string `yaml:"pprof_port" bson:"pprof_port" json:"pprof_port"`
- Presto PrestoConfig `yaml:"presto" bson:"presto" json:"presto" id:"presto"`
- Providers CloudProviders `yaml:"providers" bson:"providers" json:"providers" id:"providers"`
- RepoTracker RepoTrackerConfig `yaml:"repotracker" bson:"repotracker" json:"repotracker" id:"repotracker"`
- Scheduler SchedulerConfig `yaml:"scheduler" bson:"scheduler" json:"scheduler" id:"scheduler"`
- ServiceFlags ServiceFlags `bson:"service_flags" json:"service_flags" id:"service_flags" yaml:"service_flags"`
- SSHKeyDirectory string `yaml:"ssh_key_directory" bson:"ssh_key_directory" json:"ssh_key_directory"`
- SSHKeyPairs []SSHKeyPair `yaml:"ssh_key_pairs" bson:"ssh_key_pairs" json:"ssh_key_pairs"`
- Slack SlackConfig `yaml:"slack" bson:"slack" json:"slack" id:"slack"`
- Splunk send.SplunkConnectionInfo `yaml:"splunk" bson:"splunk" json:"splunk"`
- Triggers TriggerConfig `yaml:"triggers" bson:"triggers" json:"triggers" id:"triggers"`
- Ui UIConfig `yaml:"ui" bson:"ui" json:"ui" id:"ui"`
- Spawnhost SpawnHostConfig `yaml:"spawnhost" bson:"spawnhost" json:"spawnhost" id:"spawnhost"`
- ShutdownWaitSeconds int `yaml:"shutdown_wait_seconds" bson:"shutdown_wait_seconds" json:"shutdown_wait_seconds"`
+ Id string `bson:"_id" json:"id" yaml:"id"`
+ Alerts AlertsConfig `yaml:"alerts" bson:"alerts" json:"alerts" id:"alerts"`
+ Amboy AmboyConfig `yaml:"amboy" bson:"amboy" json:"amboy" id:"amboy"`
+ Api APIConfig `yaml:"api" bson:"api" json:"api" id:"api"`
+ ApiUrl string `yaml:"api_url" bson:"api_url" json:"api_url"`
+ AuthConfig AuthConfig `yaml:"auth" bson:"auth" json:"auth" id:"auth"`
+ AWSInstanceRole string `yaml:"aws_instance_role" bson:"aws_instance_role" json:"aws_instance_role"`
+ Banner string `bson:"banner" json:"banner" yaml:"banner"`
+ BannerTheme BannerTheme `bson:"banner_theme" json:"banner_theme" yaml:"banner_theme"`
+ Cedar CedarConfig `bson:"cedar" json:"cedar" yaml:"cedar" id:"cedar"`
+ ClientBinariesDir string `yaml:"client_binaries_dir" bson:"client_binaries_dir" json:"client_binaries_dir"`
+ CommitQueue CommitQueueConfig `yaml:"commit_queue" bson:"commit_queue" json:"commit_queue" id:"commit_queue"`
+ ConfigDir string `yaml:"configdir" bson:"configdir" json:"configdir"`
+ ContainerPools ContainerPoolsConfig `yaml:"container_pools" bson:"container_pools" json:"container_pools" id:"container_pools"`
+ Credentials map[string]string `yaml:"credentials" bson:"credentials" json:"credentials"`
+ CredentialsNew util.KeyValuePairSlice `yaml:"credentials_new" bson:"credentials_new" json:"credentials_new"`
+ Database DBSettings `yaml:"database" json:"database" bson:"database"`
+ DataPipes DataPipesConfig `yaml:"data_pipes" json:"data_pipes" bson:"data_pipes" id:"data_pipes"`
+ DomainName string `yaml:"domain_name" bson:"domain_name" json:"domain_name"`
+ Expansions map[string]string `yaml:"expansions" bson:"expansions" json:"expansions"`
+ ExpansionsNew util.KeyValuePairSlice `yaml:"expansions_new" bson:"expansions_new" json:"expansions_new"`
+ GithubPRCreatorOrg string `yaml:"github_pr_creator_org" bson:"github_pr_creator_org" json:"github_pr_creator_org"`
+ GithubOrgs []string `yaml:"github_orgs" bson:"github_orgs" json:"github_orgs"`
+ DisabledGQLQueries []string `yaml:"disabled_gql_queries" bson:"disabled_gql_queries" json:"disabled_gql_queries"`
+ HostInit HostInitConfig `yaml:"hostinit" bson:"hostinit" json:"hostinit" id:"hostinit"`
+ HostJasper HostJasperConfig `yaml:"host_jasper" bson:"host_jasper" json:"host_jasper" id:"host_jasper"`
+ Jira JiraConfig `yaml:"jira" bson:"jira" json:"jira" id:"jira"`
+ JIRANotifications JIRANotificationsConfig `yaml:"jira_notifications" json:"jira_notifications" bson:"jira_notifications" id:"jira_notifications"`
+ Keys map[string]string `yaml:"keys" bson:"keys" json:"keys"`
+ KeysNew util.KeyValuePairSlice `yaml:"keys_new" bson:"keys_new" json:"keys_new"`
+ LDAPRoleMap LDAPRoleMap `yaml:"ldap_role_map" bson:"ldap_role_map" json:"ldap_role_map"`
+ LoggerConfig LoggerConfig `yaml:"logger_config" bson:"logger_config" json:"logger_config" id:"logger_config"`
+ LogPath string `yaml:"log_path" bson:"log_path" json:"log_path"`
+ NewRelic NewRelicConfig `yaml:"newrelic" bson:"newrelic" json:"newrelic" id:"newrelic"`
+ Notify NotifyConfig `yaml:"notify" bson:"notify" json:"notify" id:"notify"`
+ Plugins PluginConfig `yaml:"plugins" bson:"plugins" json:"plugins"`
+ PluginsNew util.KeyValuePairSlice `yaml:"plugins_new" bson:"plugins_new" json:"plugins_new"`
+ PodLifecycle PodLifecycleConfig `yaml:"pod_lifecycle" bson:"pod_lifecycle" json:"pod_lifecycle" id:"pod_lifecycle"`
+ PprofPort string `yaml:"pprof_port" bson:"pprof_port" json:"pprof_port"`
+ ProjectCreation ProjectCreationConfig `yaml:"project_creation" bson:"project_creation" json:"project_creation" id:"project_creation"`
+ Providers CloudProviders `yaml:"providers" bson:"providers" json:"providers" id:"providers"`
+ RepoTracker RepoTrackerConfig `yaml:"repotracker" bson:"repotracker" json:"repotracker" id:"repotracker"`
+ Scheduler SchedulerConfig `yaml:"scheduler" bson:"scheduler" json:"scheduler" id:"scheduler"`
+ ServiceFlags ServiceFlags `bson:"service_flags" json:"service_flags" id:"service_flags" yaml:"service_flags"`
+ SSHKeyDirectory string `yaml:"ssh_key_directory" bson:"ssh_key_directory" json:"ssh_key_directory"`
+ SSHKeyPairs []SSHKeyPair `yaml:"ssh_key_pairs" bson:"ssh_key_pairs" json:"ssh_key_pairs"`
+ Slack SlackConfig `yaml:"slack" bson:"slack" json:"slack" id:"slack"`
+ Splunk SplunkConfig `yaml:"splunk" bson:"splunk" json:"splunk" id:"splunk"`
+ Triggers TriggerConfig `yaml:"triggers" bson:"triggers" json:"triggers" id:"triggers"`
+ Ui UIConfig `yaml:"ui" bson:"ui" json:"ui" id:"ui"`
+ Spawnhost SpawnHostConfig `yaml:"spawnhost" bson:"spawnhost" json:"spawnhost" id:"spawnhost"`
+ ShutdownWaitSeconds int `yaml:"shutdown_wait_seconds" bson:"shutdown_wait_seconds" json:"shutdown_wait_seconds"`
+ Tracer TracerConfig `yaml:"tracer" bson:"tracer" json:"tracer" id:"tracer"`
}
func (c *Settings) SectionId() string { return ConfigDocID }
@@ -120,10 +122,10 @@ func (c *Settings) Get(env Environment) error {
*c = Settings{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -140,6 +142,7 @@ func (c *Settings) Set() error {
_, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
"$set": bson.M{
apiUrlKey: c.ApiUrl,
+ awsInstanceRoleKey: c.AWSInstanceRole,
bannerKey: c.Banner,
bannerThemeKey: c.BannerTheme,
clientBinariesDirKey: c.ClientBinariesDir,
@@ -168,7 +171,7 @@ func (c *Settings) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating section '%s'", c.SectionId())
}
func (c *Settings) ValidateAndDefault() error {
@@ -178,27 +181,28 @@ func (c *Settings) ValidateAndDefault() error {
catcher.Add(errors.New("API hostname must not be empty"))
}
if c.ConfigDir == "" {
- catcher.Add(errors.New("Config directory must not be empty"))
+ catcher.Add(errors.New("config directory must not be empty"))
}
+
if len(c.CredentialsNew) > 0 {
if c.Credentials, err = c.CredentialsNew.Map(); err != nil {
- catcher.Add(errors.Wrap(err, "error parsing credentials"))
+ catcher.Add(errors.Wrap(err, "parsing credentials"))
}
}
if len(c.ExpansionsNew) > 0 {
if c.Expansions, err = c.ExpansionsNew.Map(); err != nil {
- catcher.Add(errors.Wrap(err, "error parsing expansions"))
+ catcher.Add(errors.Wrap(err, "parsing expansions"))
}
}
if len(c.KeysNew) > 0 {
if c.Keys, err = c.KeysNew.Map(); err != nil {
- catcher.Add(errors.Wrap(err, "error parsing keys"))
+ catcher.Add(errors.Wrap(err, "parsing keys"))
}
}
if len(c.PluginsNew) > 0 {
tempPlugins, err := c.PluginsNew.NestedMap()
if err != nil {
- catcher.Add(errors.Wrap(err, "error parsing plugins"))
+ catcher.Add(errors.Wrap(err, "parsing plugins"))
}
c.Plugins = map[string]map[string]interface{}{}
for k1, v1 := range tempPlugins {
@@ -212,7 +216,7 @@ func (c *Settings) ValidateAndDefault() error {
keys := map[string]bool{}
for _, mapping := range c.LDAPRoleMap {
if keys[mapping.LDAPGroup] {
- catcher.Add(errors.Errorf("duplicate LDAP group value %s found in LDAP-role mappings", mapping.LDAPGroup))
+ catcher.Errorf("duplicate LDAP group value %s found in LDAP-role mappings", mapping.LDAPGroup)
}
keys[mapping.LDAPGroup] = true
}
@@ -284,7 +288,7 @@ func (c *Settings) ValidateAndDefault() error {
// NewSettings builds an in-memory representation of the given settings file.
func NewSettings(filename string) (*Settings, error) {
- configData, err := ioutil.ReadFile(filename)
+ configData, err := os.ReadFile(filename)
if err != nil {
return nil, err
}
@@ -326,13 +330,13 @@ func BootstrapConfig(env Environment) (*Settings, error) {
propName := valConfig.Type().Field(i).Name
section, ok := sections[sectionId]
if !ok {
- catcher.Add(fmt.Errorf("config section %s not found in registry", sectionId))
+ catcher.Add(fmt.Errorf("config section '%s' not found in registry", sectionId))
continue
}
// retrieve the section's document from the db
if err := section.Get(env); err != nil {
- catcher.Add(errors.Wrapf(err, "error populating section %s", sectionId))
+ catcher.Add(errors.Wrapf(err, "populating section '%s'", sectionId))
continue
}
@@ -340,7 +344,7 @@ func BootstrapConfig(env Environment) (*Settings, error) {
sectionVal := reflect.ValueOf(section).Elem()
propVal := reflect.ValueOf(config).Elem().FieldByName(propName)
if !propVal.CanSet() {
- catcher.Add(fmt.Errorf("unable to set field %s in %s", propName, sectionId))
+ catcher.Errorf("unable to set field '%s' in section '%s'", propName, sectionId)
continue
}
propVal.Set(sectionVal)
@@ -386,7 +390,7 @@ func UpdateConfig(config *Settings) error {
// type assert to the ConfigSection interface
section, ok := propInterface.(ConfigSection)
if !ok {
- catcher.Add(fmt.Errorf("unable to convert config section %s", propName))
+ catcher.Errorf("unable to convert config section '%s'", propName)
continue
}
@@ -434,7 +438,7 @@ func (settings *Settings) Validate() error {
// type assert to the ConfigSection interface
section, ok := propInterface.(ConfigSection)
if !ok {
- catcher.Add(fmt.Errorf("unable to convert config section %s", propName))
+ catcher.Errorf("unable to convert config section '%s'", propName)
continue
}
err := section.ValidateAndDefault()
@@ -447,7 +451,7 @@ func (settings *Settings) Validate() error {
sectionVal := reflect.ValueOf(section).Elem()
propAddr := reflect.ValueOf(settings).Elem().FieldByName(propName)
if !propAddr.CanSet() {
- catcher.Add(fmt.Errorf("unable to set field %s in %s", propName, sectionId))
+ catcher.Errorf("unable to set field '%s' 'in' %s", propName, sectionId)
continue
}
propAddr.Set(sectionVal)
@@ -468,7 +472,7 @@ func (s *Settings) GetSender(ctx context.Context, env Environment) (send.Sender,
fallback, err = send.NewErrorLogger("evergreen.err",
send.LevelInfo{Default: level.Info, Threshold: level.Debug})
if err != nil {
- return nil, errors.Wrap(err, "problem configuring err fallback logger")
+ return nil, errors.Wrap(err, "configuring error fallback logger")
}
// setup the base/default logger (generally direct to systemd
@@ -483,21 +487,21 @@ func (s *Settings) GetSender(ctx context.Context, env Environment) (send.Sender,
default:
sender, err = send.MakeFileLogger(s.LogPath)
if err != nil {
- return nil, errors.Wrap(err, "could not configure file logger")
+ return nil, errors.Wrap(err, "configuring file logger")
}
}
if err = sender.SetLevel(levelInfo); err != nil {
- return nil, errors.Wrap(err, "problem setting level")
+ return nil, errors.Wrap(err, "setting level")
}
if err = sender.SetErrorHandler(send.ErrorHandlerFromSender(fallback)); err != nil {
- return nil, errors.Wrap(err, "problem setting error handler")
+ return nil, errors.Wrap(err, "setting error handler")
}
senders = append(senders, sender)
// set up external log aggregation services:
//
- if s.Splunk.Populated() {
+ if s.Splunk.SplunkConnectionInfo.Populated() {
retryConf := utility.NewDefaultHTTPRetryConf()
retryConf.MaxDelay = time.Second
retryConf.BaseDelay = 10 * time.Millisecond
@@ -534,29 +538,29 @@ func (s *Settings) GetSender(ctx context.Context, env Environment) (send.Sender,
}
if err = sender.SetErrorHandler(send.ErrorHandlerFromSender(slackFallback)); err != nil {
- return nil, errors.Wrap(err, "problem setting error handler")
+ return nil, errors.Wrap(err, "setting error handler")
}
senders = append(senders, logger.MakeQueueSender(ctx, env.LocalQueue(), sender))
}
- grip.Warning(errors.Wrap(err, "problem setting up slack alert logger"))
+ grip.Warning(errors.Wrap(err, "setting up Slack alert logger"))
}
return send.NewConfiguredMultiSender(senders...), nil
}
func (s *Settings) makeSplunkSender(ctx context.Context, client *http.Client, levelInfo send.LevelInfo, fallback send.Sender) (send.Sender, error) {
- sender, err := send.NewSplunkLoggerWithClient("", s.Splunk, grip.GetSender().Level(), client)
+ sender, err := send.NewSplunkLoggerWithClient("", s.Splunk.SplunkConnectionInfo, grip.GetSender().Level(), client)
if err != nil {
return nil, errors.Wrap(err, "making splunk logger")
}
if err = sender.SetLevel(levelInfo); err != nil {
- return nil, errors.Wrap(err, "problem setting splunk level")
+ return nil, errors.Wrap(err, "setting Splunk level")
}
if err = sender.SetErrorHandler(send.ErrorHandlerFromSender(fallback)); err != nil {
- return nil, errors.Wrap(err, "setting splunk error handler")
+ return nil, errors.Wrap(err, "setting Splunk error handler")
}
opts := send.BufferedSenderOptions{
@@ -570,11 +574,11 @@ func (s *Settings) makeSplunkSender(ctx context.Context, client *http.Client, le
BufferedSenderOptions: opts,
IncomingBufferFactor: s.LoggerConfig.Buffer.IncomingBufferFactor,
}); err != nil {
- return nil, errors.Wrap(err, "making splunk async buffered sender")
+ return nil, errors.Wrap(err, "making Splunk async buffered sender")
}
} else {
if sender, err = send.NewBufferedSender(ctx, sender, opts); err != nil {
- return nil, errors.Wrap(err, "making splunk buffered sender")
+ return nil, errors.Wrap(err, "making Splunk buffered sender")
}
}
@@ -583,7 +587,7 @@ func (s *Settings) makeSplunkSender(ctx context.Context, client *http.Client, le
func (s *Settings) GetGithubOauthStrings() ([]string, error) {
var tokens []string
- var token_name string
+ var tokenName string
token, ok := s.Credentials["github"]
if ok && token != "" {
@@ -594,8 +598,8 @@ func (s *Settings) GetGithubOauthStrings() ([]string, error) {
}
for i := 1; i < 10; i++ {
- token_name = fmt.Sprintf("github_alt%d", i)
- token, ok := s.Credentials[token_name]
+ tokenName = fmt.Sprintf("github_alt%d", i)
+ token, ok := s.Credentials[tokenName]
if ok && token != "" {
tokens = append(tokens, token)
} else {
@@ -641,7 +645,7 @@ func splitToken(oauthString string) (string, error) {
func GetServiceFlags() (*ServiceFlags, error) {
flags := &ServiceFlags{}
if err := flags.Get(GetEnvironment()); err != nil {
- return nil, errors.Wrap(err, "error retrieving section from DB")
+ return nil, errors.Wrapf(err, "getting section '%s'", flags.SectionId())
}
return flags, nil
}
diff --git a/config_alerts_notify.go b/config_alerts_notify.go
index 3fa05be865b..1bbfe6acf38 100644
--- a/config_alerts_notify.go
+++ b/config_alerts_notify.go
@@ -33,11 +33,11 @@ func (c *NotifyConfig) Get(env Environment) error {
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -50,7 +50,7 @@ func (c *NotifyConfig) Set() error {
coll := env.DB().Collection(ConfigCollection)
_, err := coll.ReplaceOne(ctx, byId(c.SectionId()), c, options.Replace().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating section '%s'", c.SectionId())
}
func (c *NotifyConfig) ValidateAndDefault() error {
@@ -88,11 +88,11 @@ func (c *AlertsConfig) Get(env Environment) error {
*c = AlertsConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -110,7 +110,7 @@ func (c *AlertsConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *AlertsConfig) ValidateAndDefault() error { return nil }
diff --git a/config_amboy.go b/config_amboy.go
index f23e9fdd6c0..0d9bc838908 100644
--- a/config_amboy.go
+++ b/config_amboy.go
@@ -1,6 +1,7 @@
package evergreen
import (
+ "regexp"
"time"
"github.com/mongodb/amboy"
@@ -16,7 +17,7 @@ import (
type AmboyConfig struct {
Name string `bson:"name" json:"name" yaml:"name"`
SingleName string `bson:"single_name" json:"single_name" yaml:"single_name"`
- DB string `bson:"database" json:"database" yaml:"database"`
+ DBConnection AmboyDBConfig `bson:"db_connection" json:"db_connection" yaml:"db_connection"`
PoolSizeLocal int `bson:"pool_size_local" json:"pool_size_local" yaml:"pool_size_local"`
PoolSizeRemote int `bson:"pool_size_remote" json:"pool_size_remote" yaml:"pool_size_remote"`
LocalStorage int `bson:"local_storage_size" json:"local_storage_size" yaml:"local_storage_size"`
@@ -29,6 +30,19 @@ type AmboyConfig struct {
SampleSize int `bson:"sample_size" json:"sample_size" yaml:"sample_size"`
Retry AmboyRetryConfig `bson:"retry" json:"retry" yaml:"retry"`
NamedQueues []AmboyNamedQueueConfig `bson:"named_queues" json:"named_queues" yaml:"named_queues"`
+ // SkipPreferredIndexes indicates whether or not to use the preferred
+ // indexes for the remote queues. This is not a value that can or should be
+ // configured in production, but is useful to explicitly set for testing
+ // environments, where the required indexes may not be set up.
+ SkipPreferredIndexes bool `bson:"skip_preferred_indexes" json:"skip_preferred_indexes" yaml:"skip_preferred_indexes"`
+}
+
+// AmboyDBConfig configures Amboy's database connection.
+type AmboyDBConfig struct {
+ URL string `bson:"url" json:"url" yaml:"url"`
+ Database string `bson:"database" json:"database" yaml:"database"`
+ Username string `bson:"username" json:"username" yaml:"username"`
+ Password string `bson:"password" json:"password" yaml:"password"`
}
// AmboyRetryConfig represents configuration settings for Amboy's retryability
@@ -46,6 +60,7 @@ type AmboyRetryConfig struct {
// queues in the Amboy queue group.
type AmboyNamedQueueConfig struct {
Name string `bson:"name" json:"name" yaml:"name"`
+ Regexp string `bson:"regexp" json:"regexp" yaml:"regexp"`
NumWorkers int `bson:"num_workers" json:"num_workers" yaml:"num_workers"`
SampleSize int `bson:"sample_size" json:"sample_size" yaml:"sample_size"`
LockTimeoutSeconds int `bson:"lock_timeout_seconds" json:"lock_timeout_seconds" yaml:"lock_timeout_seconds"`
@@ -54,7 +69,7 @@ type AmboyNamedQueueConfig struct {
var (
amboyNameKey = bsonutil.MustHaveTag(AmboyConfig{}, "Name")
amboySingleNameKey = bsonutil.MustHaveTag(AmboyConfig{}, "SingleName")
- amboyDBKey = bsonutil.MustHaveTag(AmboyConfig{}, "DB")
+ amboyDBConnectionKey = bsonutil.MustHaveTag(AmboyConfig{}, "DBConnection")
amboyPoolSizeLocalKey = bsonutil.MustHaveTag(AmboyConfig{}, "PoolSizeLocal")
amboyPoolSizeRemoteKey = bsonutil.MustHaveTag(AmboyConfig{}, "PoolSizeRemote")
amboyLocalStorageKey = bsonutil.MustHaveTag(AmboyConfig{}, "LocalStorage")
@@ -83,11 +98,11 @@ func (c *AmboyConfig) Get(env Environment) error {
*c = AmboyConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
}
@@ -100,13 +115,13 @@ func (c *AmboyConfig) Set() error {
_, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
"$set": bson.M{
- amboyNameKey: c.Name,
- amboySingleNameKey: c.SingleName,
- amboyDBKey: c.DB,
- amboyPoolSizeLocalKey: c.PoolSizeLocal,
- amboyPoolSizeRemoteKey: c.PoolSizeRemote,
- amboyLocalStorageKey: c.LocalStorage,
- amboyGroupDefaultWorkersKey: c.GroupDefaultWorkers,
+ amboyNameKey: c.Name,
+ amboySingleNameKey: c.SingleName,
+ amboyDBConnectionKey: c.DBConnection,
+ amboyPoolSizeLocalKey: c.PoolSizeLocal,
+ amboyPoolSizeRemoteKey: c.PoolSizeRemote,
+ amboyLocalStorageKey: c.LocalStorage,
+ amboyGroupDefaultWorkersKey: c.GroupDefaultWorkers,
amboyGroupBackgroundCreateFrequencyMinutesKey: c.GroupBackgroundCreateFrequencyMinutes,
amboyGroupPruneFrequencyMinutesKey: c.GroupPruneFrequencyMinutes,
amboyGroupTTLMinutesKey: c.GroupTTLMinutes,
@@ -118,7 +133,7 @@ func (c *AmboyConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
const (
@@ -141,6 +156,17 @@ const (
)
func (c *AmboyConfig) ValidateAndDefault() error {
+ catcher := grip.NewBasicCatcher()
+ for _, namedQueue := range c.NamedQueues {
+ if namedQueue.Regexp != "" {
+ _, err := regexp.Compile(namedQueue.Regexp)
+ catcher.Wrapf(err, "invalid regexp '%s'", namedQueue.Regexp)
+ }
+ }
+ if catcher.HasErrors() {
+ return errors.Wrap(catcher.Resolve(), "invalid regexp for named queues")
+ }
+
if c.Name == "" {
c.Name = DefaultAmboyQueueName
}
@@ -149,8 +175,8 @@ func (c *AmboyConfig) ValidateAndDefault() error {
c.SingleName = defaultSingleAmboyQueueName
}
- if c.DB == "" {
- c.DB = defaultAmboyDBName
+ if c.DBConnection.Database == "" {
+ c.DBConnection.Database = defaultAmboyDBName
}
if c.PoolSizeLocal == 0 {
diff --git a/config_api.go b/config_api.go
index 2fd7e86e5c0..04cbf02ba37 100644
--- a/config_api.go
+++ b/config_api.go
@@ -40,7 +40,7 @@ func (c *APIConfig) Get(env Environment) error {
return nil
}
- return errors.Wrapf(err, "retrieving config section '%s'", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
diff --git a/config_auth.go b/config_auth.go
index ce7d2cbc6d2..e55bad09b93 100644
--- a/config_auth.go
+++ b/config_auth.go
@@ -118,11 +118,11 @@ func (c *AuthConfig) Get(env Environment) error {
*c = AuthConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -147,7 +147,7 @@ func (c *AuthConfig) Set() error {
AuthAllowServiceUsersKey: c.AllowServiceUsers,
}}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *AuthConfig) checkDuplicateUsers() error {
@@ -182,7 +182,7 @@ func (c *AuthConfig) ValidateAndDefault() error {
AuthMultiKey}, c.PreferredType), "invalid auth type '%s'", c.PreferredType)
if c.LDAP == nil && c.Naive == nil && c.OnlyAPI == nil && c.Github == nil && c.Okta == nil && c.Multi == nil {
- catcher.Add(errors.New("You must specify one form of authentication"))
+ catcher.Add(errors.New("must specify one form of authentication"))
}
catcher.Add(c.checkDuplicateUsers())
@@ -198,7 +198,7 @@ func (c *AuthConfig) ValidateAndDefault() error {
if c.Github != nil {
if c.Github.Users == nil && c.Github.Organization == "" {
- catcher.Add(errors.New("Must specify either a set of users or an organization for Github Authentication"))
+ catcher.Add(errors.New("must specify either a set of users or an organization for GitHub authentication"))
}
}
diff --git a/config_cedar.go b/config_cedar.go
index dab72e046b0..fae3e6fba7c 100644
--- a/config_cedar.go
+++ b/config_cedar.go
@@ -1,6 +1,7 @@
package evergreen
import (
+ "github.com/mongodb/anser/bsonutil"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
@@ -12,8 +13,18 @@ type CedarConfig struct {
RPCPort string `bson:"rpc_port" json:"rpc_port" yaml:"rpc_port"`
User string `bson:"user" json:"user" yaml:"user"`
APIKey string `bson:"api_key" json:"api_key" yaml:"api_key"`
+ // Insecure disables TLS, this should only be used for testing.
+ Insecure bool `bson:"insecure" json:"insecure" yaml:"insecure"`
}
+var (
+ cedarConfigBaseURLKey = bsonutil.MustHaveTag(CedarConfig{}, "BaseURL")
+ cedarConfigRPCPortKey = bsonutil.MustHaveTag(CedarConfig{}, "RPCPort")
+ cedarConfigUserKey = bsonutil.MustHaveTag(CedarConfig{}, "User")
+ cedarConfigAPIKeyKey = bsonutil.MustHaveTag(CedarConfig{}, "APIKey")
+ cedarConfigInsecureKey = bsonutil.MustHaveTag(CedarConfig{}, "Insecure")
+)
+
func (*CedarConfig) SectionId() string { return "cedar" }
func (c *CedarConfig) Get(env Environment) error {
@@ -27,11 +38,11 @@ func (c *CedarConfig) Get(env Environment) error {
*c = CedarConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -45,14 +56,15 @@ func (c *CedarConfig) Set() error {
_, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
"$set": bson.M{
- "base_url": c.BaseURL,
- "rpc_port": c.RPCPort,
- "user": c.User,
- "api_key": c.APIKey,
+ cedarConfigBaseURLKey: c.BaseURL,
+ cedarConfigRPCPortKey: c.RPCPort,
+ cedarConfigUserKey: c.User,
+ cedarConfigAPIKeyKey: c.APIKey,
+ cedarConfigInsecureKey: c.Insecure,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *CedarConfig) ValidateAndDefault() error { return nil }
diff --git a/config_cloud.go b/config_cloud.go
index 97a220827a0..e02e548fec3 100644
--- a/config_cloud.go
+++ b/config_cloud.go
@@ -1,6 +1,7 @@
package evergreen
import (
+ "github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
@@ -8,6 +9,14 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
)
+var (
+ cloudProvidersAWSKey = bsonutil.MustHaveTag(CloudProviders{}, "AWS")
+ cloudProvidersDockerKey = bsonutil.MustHaveTag(CloudProviders{}, "Docker")
+ cloudProvidersGCEKey = bsonutil.MustHaveTag(CloudProviders{}, "GCE")
+ cloudProvidersOpenStackKey = bsonutil.MustHaveTag(CloudProviders{}, "OpenStack")
+ cloudProvidersVSphereKey = bsonutil.MustHaveTag(CloudProviders{}, "VSphere")
+)
+
// CloudProviders stores configuration settings for the supported cloud host providers.
type CloudProviders struct {
AWS AWSConfig `bson:"aws" json:"aws" yaml:"aws"`
@@ -30,11 +39,11 @@ func (c *CloudProviders) Get(env Environment) error {
*c = CloudProviders{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -48,15 +57,15 @@ func (c *CloudProviders) Set() error {
_, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
"$set": bson.M{
- "aws": c.AWS,
- "docker": c.Docker,
- "gce": c.GCE,
- "openstack": c.OpenStack,
- "vsphere": c.VSphere,
+ cloudProvidersAWSKey: c.AWS,
+ cloudProvidersDockerKey: c.Docker,
+ cloudProvidersGCEKey: c.GCE,
+ cloudProvidersOpenStackKey: c.OpenStack,
+ cloudProvidersVSphereKey: c.VSphere,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *CloudProviders) ValidateAndDefault() error {
@@ -90,6 +99,10 @@ type AWSConfig struct {
// TaskSyncRead stores credentials for reading task data in S3.
TaskSyncRead S3Credentials `bson:"task_sync_read" json:"task_sync_read" yaml:"task_sync_read"`
+ // ParserProject is configuration for storing and accessing parser projects
+ // in S3.
+ ParserProject ParserProjectS3Config `bson:"parser_project" json:"parser_project" yaml:"parser_project"`
+
DefaultSecurityGroup string `bson:"default_security_group" json:"default_security_group" yaml:"default_security_group"`
AllowedRegions []string `bson:"allowed_regions" json:"allowed_regions" yaml:"allowed_regions"`
@@ -98,7 +111,7 @@ type AWSConfig struct {
MaxVolumeSizePerUser int `bson:"max_volume_size" json:"max_volume_size" yaml:"max_volume_size"`
// Pod represents configuration for using pods in AWS.
- Pod AWSPodConfig
+ Pod AWSPodConfig `bson:"pod" json:"pod" yaml:"pod"`
}
type S3Credentials struct {
@@ -115,6 +128,15 @@ func (c *S3Credentials) Validate() error {
return catcher.Resolve()
}
+// ParserProjectS3Config is the configuration options for storing and accessing
+// parser projects in S3.
+type ParserProjectS3Config struct {
+ S3Credentials `bson:",inline" yaml:",inline"`
+ Prefix string `bson:"prefix" json:"prefix" yaml:"prefix"`
+}
+
+func (c *ParserProjectS3Config) Validate() error { return nil }
+
// AWSPodConfig represents configuration for using pods backed by AWS.
type AWSPodConfig struct {
// Role is the role to assume to make API calls that manage pods.
@@ -135,6 +157,12 @@ func (c *AWSPodConfig) Validate() error {
// ECSConfig represents configuration for AWS ECS.
type ECSConfig struct {
+ // MaxCPU is the maximum allowed CPU units (1024 CPU units = 1 vCPU) that a
+ // single pod can use.
+ MaxCPU int `bson:"max_cpu" json:"max_cpu" yaml:"max_cpu"`
+ // MaxMemoryMB is the maximum allowed memory (in MB) that a single pod can
+ // use.
+ MaxMemoryMB int `bson:"max_memory_mb" json:"max_memory_mb" yaml:"max_memory_mb"`
// TaskDefinitionPrefix is the prefix for the task definition families.
TaskDefinitionPrefix string `bson:"task_definition_prefix" json:"task_definition_prefix" yaml:"task_definition_prefix"`
// TaskRole is the IAM role that ECS tasks can assume to make AWS requests.
@@ -142,12 +170,22 @@ type ECSConfig struct {
// ExecutionRole is the IAM role that ECS container instances can assume to
// make AWS requests.
ExecutionRole string `bson:"execution_role" json:"execution_role" yaml:"execution_role"`
+ // LogRegion is the region used by the task definition's log configuration.
+ LogRegion string `bson:"log_region" json:"log_region" yaml:"log_region"`
+ // LogGroup is the log group name used by the task definition's log configuration.
+ LogGroup string `bson:"log_group" json:"log_group" yaml:"log_group"`
+ // LogStreamPrefix is the prefix used to determine log group stream names.
+ LogStreamPrefix string `bson:"log_stream_prefix" json:"log_stream_prefix" yaml:"log_stream_prefix"`
// AWSVPC specifies configuration when ECS tasks use AWSVPC networking.
AWSVPC AWSVPCConfig `bson:"awsvpc" json:"awsvpc" yaml:"awsvpc"`
// Clusters specify the configuration of each particular ECS cluster.
Clusters []ECSClusterConfig `bson:"clusters" json:"clusters" yaml:"clusters"`
// CapacityProviders specify the available capacity provider configurations.
CapacityProviders []ECSCapacityProvider `bson:"capacity_providers" json:"capacity_providers" yaml:"capacity_providers"`
+ // ClientType represents the type of Secrets Manager client implementation
+ // that will be used. This is not a value that can or should be configured
+ // for production, but is useful to explicitly set for testing purposes.
+ ClientType AWSClientType `bson:"client_type" json:"client_type" yaml:"client_type"`
}
// AWSVPCConfig represents configuration when using AWSVPC networking in ECS.
@@ -185,6 +223,7 @@ const (
ECSOSWindows = "windows"
)
+// Validate checks that the OS is a valid one for running containers.
func (p ECSOS) Validate() error {
switch p {
case ECSOSLinux, ECSOSWindows:
@@ -194,6 +233,46 @@ func (p ECSOS) Validate() error {
}
}
+// ECSArch represents a CPU architecture that can run containers in ECS.
+type ECSArch string
+
+const (
+ ECSArchAMD64 = "amd64"
+ ECSArchARM64 = "arm64"
+)
+
+// Validate checks that the CPU architecture is a valid one for running
+// containers.
+func (a ECSArch) Validate() error {
+ switch a {
+ case ECSArchAMD64, ECSArchARM64:
+ return nil
+ default:
+ return errors.Errorf("unrecognized ECS capacity provider arch '%s'", a)
+ }
+}
+
+// ECSWindowsVersion represents a particular Windows OS version that can run
+// containers in ECS.
+type ECSWindowsVersion string
+
+const (
+ ECSWindowsServer2016 = "windows_server_2016"
+ ECSWindowsServer2019 = "windows_server_2019"
+ ECSWindowsServer2022 = "windows_server_2022"
+)
+
+// Validate checks that the Windows OS version is a valid one for running
+// containers.
+func (v ECSWindowsVersion) Validate() error {
+ switch v {
+ case ECSWindowsServer2016, ECSWindowsServer2019, ECSWindowsServer2022:
+ return nil
+ default:
+ return errors.Errorf("unrecognized ECS Windows version '%s'", v)
+ }
+}
+
// ECSCapacityProvider represents a capacity provider in ECS.
type ECSCapacityProvider struct {
// Name is the capacity provider name.
@@ -204,6 +283,10 @@ type ECSCapacityProvider struct {
// Arch is the type of CPU architecture that the container instances in this
// capacity provider can run.
Arch ECSArch `bson:"arch" json:"arch" yaml:"arch"`
+ // WindowsVersion is the particular version of Windows that container
+ // instances in this capacity provider run. This only applies if the OS is
+ // Windows.
+ WindowsVersion ECSWindowsVersion `bson:"windows_version" json:"windows_version" yaml:"windows_version"`
}
// Validate checks that the required settings are given for the capacity
@@ -213,24 +296,16 @@ func (p *ECSCapacityProvider) Validate() error {
catcher.NewWhen(p.Name == "", "must provide a capacity provider name")
catcher.Add(p.OS.Validate())
catcher.Add(p.Arch.Validate())
- return catcher.Resolve()
-}
-
-// ECSArch represents a CPU architecture that can run containers in ECS.
-type ECSArch string
-
-const (
- ECSArchAMD64 = "amd64"
- ECSArchARM64 = "arm64"
-)
-
-func (a ECSArch) Validate() error {
- switch a {
- case ECSArchAMD64, ECSArchARM64:
- return nil
- default:
- return errors.Errorf("unrecognized ECS capacity provider arch '%s'", a)
+ if p.OS == ECSOSWindows {
+ if p.WindowsVersion == "" {
+ catcher.New("must specify a particular Windows version when using Windows OS")
+ } else {
+ catcher.Add(p.WindowsVersion.Validate())
+ }
+ } else if p.OS != ECSOSWindows && p.WindowsVersion != "" {
+ catcher.New("cannot specify a Windows version for a non-Windows OS")
}
+ return catcher.Resolve()
}
// Validate checks that the ECS cluster configuration has the required fields
@@ -246,8 +321,24 @@ func (c *ECSClusterConfig) Validate() error {
type SecretsManagerConfig struct {
// SecretPrefix is the prefix for secret names.
SecretPrefix string `bson:"secret_prefix" json:"secret_prefix" yaml:"secret_prefix"`
+ // ClientType represents the type of Secrets Manager client implementation
+ // that will be used. This is not a value that can or should be configured
+ // for production, but is useful to explicitly set for testing purposes.
+ ClientType AWSClientType `bson:"client_type" json:"client_type" yaml:"client_type"`
}
+// AWSClientType represents the different types of AWS client implementations
+// that can be used.
+type AWSClientType string
+
+const (
+ // AWSClientTypeBasic is the standard implementation of an AWS client.
+ AWSClientTypeBasic AWSClientType = ""
+ // AWSClientTypeMock is the mock implementation of an AWS client for testing
+ // purposes only. This should never be used in production.
+ AWSClientTypeMock AWSClientType = "mock"
+)
+
// DockerConfig stores auth info for Docker.
type DockerConfig struct {
APIVersion string `bson:"api_version" json:"api_version" yaml:"api_version"`
diff --git a/config_commitqueue.go b/config_commitqueue.go
index 361e7346272..e4fed1b7c93 100644
--- a/config_commitqueue.go
+++ b/config_commitqueue.go
@@ -9,17 +9,19 @@ import (
)
type CommitQueueConfig struct {
- MergeTaskDistro string `yaml:"merge_task_distro" bson:"merge_task_distro" json:"merge_task_distro"`
- CommitterName string `yaml:"committer_name" bson:"committer_name" json:"committer_name"`
- CommitterEmail string `yaml:"committer_email" bson:"committer_email" json:"committer_email"`
- BatchSize int `yaml:"batch_size" bson:"batch_size" json:"batch_size"`
+ MergeTaskDistro string `yaml:"merge_task_distro" bson:"merge_task_distro" json:"merge_task_distro"`
+ CommitterName string `yaml:"committer_name" bson:"committer_name" json:"committer_name"`
+ CommitterEmail string `yaml:"committer_email" bson:"committer_email" json:"committer_email"`
+ BatchSize int `yaml:"batch_size" bson:"batch_size" json:"batch_size"`
+ MaxSystemFailedTaskRetries int `yaml:"max_system_failed_task_retries" bson:"max_system_failed_task_retries" json:"max_system_failed_task_retries"`
}
var (
- mergeTaskDistroKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "MergeTaskDistro")
- committerNameKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "CommitterName")
- committerEmailKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "CommitterEmail")
- commitQueueBatchSizeKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "BatchSize")
+ mergeTaskDistroKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "MergeTaskDistro")
+ committerNameKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "CommitterName")
+ committerEmailKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "CommitterEmail")
+ commitQueueBatchSizeKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "BatchSize")
+ maxSystemFailedTaskRetriesKey = bsonutil.MustHaveTag(CommitQueueConfig{}, "MaxSystemFailedTaskRetries")
)
func (c *CommitQueueConfig) SectionId() string { return "commit_queue" }
@@ -36,11 +38,11 @@ func (c *CommitQueueConfig) Get(env Environment) error {
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -55,13 +57,14 @@ func (c *CommitQueueConfig) Set() error {
_, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
"$set": bson.M{
- mergeTaskDistroKey: c.MergeTaskDistro,
- committerNameKey: c.CommitterName,
- committerEmailKey: c.CommitterEmail,
- commitQueueBatchSizeKey: c.BatchSize,
+ mergeTaskDistroKey: c.MergeTaskDistro,
+ committerNameKey: c.CommitterName,
+ committerEmailKey: c.CommitterEmail,
+ commitQueueBatchSizeKey: c.BatchSize,
+ maxSystemFailedTaskRetriesKey: c.MaxSystemFailedTaskRetries,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *CommitQueueConfig) ValidateAndDefault() error {
diff --git a/config_containerpools.go b/config_containerpools.go
index 8298f568ba2..bbb559a6cca 100644
--- a/config_containerpools.go
+++ b/config_containerpools.go
@@ -38,11 +38,11 @@ func (c *ContainerPoolsConfig) Get(env Environment) error {
*c = ContainerPoolsConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -60,7 +60,7 @@ func (c *ContainerPoolsConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
// GetContainerPool retrieves the container pool with a given id from
@@ -78,7 +78,7 @@ func (c *ContainerPoolsConfig) ValidateAndDefault() error {
// ensure that max_containers is positive
for _, pool := range c.Pools {
if pool.MaxContainers <= 0 {
- return errors.Errorf("container pool field max_containers must be positive integer")
+ return errors.Errorf("container pool max containers must be positive integer")
}
}
return nil
diff --git a/config_data_pipes.go b/config_data_pipes.go
new file mode 100644
index 00000000000..43d5e70a009
--- /dev/null
+++ b/config_data_pipes.go
@@ -0,0 +1,72 @@
+package evergreen
+
+import (
+ "github.com/mongodb/anser/bsonutil"
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+ "go.mongodb.org/mongo-driver/mongo"
+ "go.mongodb.org/mongo-driver/mongo/options"
+)
+
+// DataPipesConfig represents the admin config section for the Data-Pipes
+// results service. See `https://github.com/10gen/data-pipes` for more
+// information.
+type DataPipesConfig struct {
+ Host string `bson:"host" json:"host" yaml:"host"`
+ Region string `bson:"region" json:"region" yaml:"region"`
+ AWSAccessKey string `bson:"aws_access_key" json:"aws_access_key" yaml:"aws_access_key"`
+ AWSSecretKey string `bson:"aws_secret_key" json:"aws_secret_key" yaml:"aws_secret_key"`
+ AWSToken string `bson:"aws_token" json:"aws_token" yaml:"aws_token"`
+}
+
+var (
+ dataPipesConfigHostKey = bsonutil.MustHaveTag(DataPipesConfig{}, "Host")
+ dataPipesConfigRegionKey = bsonutil.MustHaveTag(DataPipesConfig{}, "Region")
+ dataPipesConfigAWSAccessKeyKey = bsonutil.MustHaveTag(DataPipesConfig{}, "AWSAccessKey")
+ dataPipesConfigAWSSecretKeyKey = bsonutil.MustHaveTag(DataPipesConfig{}, "AWSSecretKey")
+ dataPipesConfigAWSTokenKey = bsonutil.MustHaveTag(DataPipesConfig{}, "AWSToken")
+)
+
+func (*DataPipesConfig) SectionId() string { return "data_pipes" }
+
+func (c *DataPipesConfig) Get(env Environment) error {
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ res := coll.FindOne(ctx, byId(c.SectionId()))
+ if err := res.Err(); err != nil {
+ if err == mongo.ErrNoDocuments {
+ *c = DataPipesConfig{}
+ return nil
+ }
+ return errors.Wrapf(err, "retrieving section %s", c.SectionId())
+ }
+
+ if err := res.Decode(c); err != nil {
+ return errors.Wrap(err, "decoding result")
+ }
+
+ return nil
+}
+
+func (c *DataPipesConfig) Set() error {
+ env := GetEnvironment()
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
+ "$set": bson.M{
+ dataPipesConfigHostKey: c.Host,
+ dataPipesConfigRegionKey: c.Region,
+ dataPipesConfigAWSAccessKeyKey: c.AWSAccessKey,
+ dataPipesConfigAWSSecretKeyKey: c.AWSSecretKey,
+ dataPipesConfigAWSTokenKey: c.AWSToken,
+ },
+ }, options.Update().SetUpsert(true))
+
+ return errors.Wrapf(err, "updating section %s", c.SectionId())
+}
+
+func (c *DataPipesConfig) ValidateAndDefault() error { return nil }
diff --git a/config_db.go b/config_db.go
index 5f382e4fe65..b0a0fc5addd 100644
--- a/config_db.go
+++ b/config_db.go
@@ -12,7 +12,7 @@ var (
ConfigDocID = "global"
)
-//nolint: deadcode, unused
+//nolint:unused
var (
idKey = bsonutil.MustHaveTag(Settings{}, "Id")
bannerKey = bsonutil.MustHaveTag(Settings{}, "Banner")
@@ -20,6 +20,7 @@ var (
serviceFlagsKey = bsonutil.MustHaveTag(Settings{}, "ServiceFlags")
configDirKey = bsonutil.MustHaveTag(Settings{}, "ConfigDir")
apiUrlKey = bsonutil.MustHaveTag(Settings{}, "ApiUrl")
+ awsInstanceRoleKey = bsonutil.MustHaveTag(Settings{}, "AWSInstanceRole")
cedarKey = bsonutil.MustHaveTag(Settings{}, "Cedar")
clientBinariesDirKey = bsonutil.MustHaveTag(Settings{}, "ClientBinariesDir")
hostJasperKey = bsonutil.MustHaveTag(Settings{}, "HostJasper")
@@ -93,6 +94,7 @@ var (
backgroundCleanupDisabledKey = bsonutil.MustHaveTag(ServiceFlags{}, "BackgroundCleanupDisabled")
cloudCleanupDisabledKey = bsonutil.MustHaveTag(ServiceFlags{}, "CloudCleanupDisabled")
containerConfigurationsDisabledKey = bsonutil.MustHaveTag(ServiceFlags{}, "ContainerConfigurationsDisabled")
+ legacyUIPublicAccessDisabledKey = bsonutil.MustHaveTag(ServiceFlags{}, "LegacyUIPublicAccessDisabled")
unrecognizedPodCleanupDisabledKey = bsonutil.MustHaveTag(ServiceFlags{}, "UnrecognizedPodCleanupDisabled")
// ContainerPoolsConfig keys
@@ -107,13 +109,13 @@ var (
hostInitMaxTotalDynamicHostsKey = bsonutil.MustHaveTag(HostInitConfig{}, "MaxTotalDynamicHosts")
hostInitS3BaseURLKey = bsonutil.MustHaveTag(HostInitConfig{}, "S3BaseURL")
- podInitS3BaseURLKey = bsonutil.MustHaveTag(PodInitConfig{}, "S3BaseURL")
- podInitMaxParallelPodRequestsKey = bsonutil.MustHaveTag(PodInitConfig{}, "MaxParallelPodRequests")
-
// Spawnhost keys
unexpirableHostsPerUserKey = bsonutil.MustHaveTag(SpawnHostConfig{}, "UnexpirableHostsPerUser")
unexpirableVolumesPerUserKey = bsonutil.MustHaveTag(SpawnHostConfig{}, "UnexpirableVolumesPerUser")
spawnhostsPerUserKey = bsonutil.MustHaveTag(SpawnHostConfig{}, "SpawnHostsPerUser")
+
+ tracerEnabledKey = bsonutil.MustHaveTag(TracerConfig{}, "Enabled")
+ tracerCollectorEndpoint = bsonutil.MustHaveTag(TracerConfig{}, "CollectorEndpoint")
)
func byId(id string) bson.M {
diff --git a/config_hostinit.go b/config_hostinit.go
index c7ed623d556..5912f30e141 100644
--- a/config_hostinit.go
+++ b/config_hostinit.go
@@ -32,11 +32,11 @@ func (c *HostInitConfig) Get(env Environment) error {
*c = HostInitConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -58,7 +58,7 @@ func (c *HostInitConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *HostInitConfig) ValidateAndDefault() error {
@@ -66,22 +66,22 @@ func (c *HostInitConfig) ValidateAndDefault() error {
if c.HostThrottle == 0 {
c.HostThrottle = defaultHostThrottle
}
- catcher.NewWhen(c.HostThrottle < 0, "HostThrottle cannot be negative")
+ catcher.NewWhen(c.HostThrottle < 0, "host throttle cannot be negative")
if c.ProvisioningThrottle == 0 {
c.ProvisioningThrottle = 200
}
- catcher.NewWhen(c.ProvisioningThrottle < 0, "ProvisioningThrottle cannot be negative")
+ catcher.NewWhen(c.ProvisioningThrottle < 0, "host provisioning throttle cannot be negative")
if c.CloudStatusBatchSize == 0 {
c.CloudStatusBatchSize = 500
}
- catcher.NewWhen(c.CloudStatusBatchSize < 0, "CloudStatusBatchSize cannot be negative")
+ catcher.NewWhen(c.CloudStatusBatchSize < 0, "cloud host status batch size cannot be negative")
if c.MaxTotalDynamicHosts == 0 {
c.MaxTotalDynamicHosts = 5000
}
- catcher.NewWhen(c.MaxTotalDynamicHosts < 0, "MaxTotalDynamicHosts cannot be negative")
+ catcher.NewWhen(c.MaxTotalDynamicHosts < 0, "max total dynamic hosts cannot be negative")
return catcher.Resolve()
}
diff --git a/config_jasper.go b/config_jasper.go
index 5e054157af0..8b0bfefb9a1 100644
--- a/config_jasper.go
+++ b/config_jasper.go
@@ -39,11 +39,11 @@ func (c *HostJasperConfig) Get(env Environment) error {
*c = HostJasperConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -65,7 +65,7 @@ func (c *HostJasperConfig) Set() error {
hostJasperVersionKey: c.Version,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *HostJasperConfig) ValidateAndDefault() error {
diff --git a/config_jira.go b/config_jira.go
index 03bc03c69d1..a5db8e19dba 100644
--- a/config_jira.go
+++ b/config_jira.go
@@ -43,11 +43,11 @@ func (c *JiraConfig) Get(env Environment) error {
*c = JiraConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -68,12 +68,12 @@ func (c *JiraConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *JiraConfig) ValidateAndDefault() error {
if (c.Host != "") && (c.BasicAuthConfig.Username != "") == (c.OAuth1Config.AccessToken != "") {
- return errors.New("must specify exactly 1 jira auth method")
+ return errors.New("must specify exactly 1 Jira auth method")
}
return nil
}
diff --git a/config_jira_notifications.go b/config_jira_notifications.go
index 1e9d5b058fc..f527d244e9a 100644
--- a/config_jira_notifications.go
+++ b/config_jira_notifications.go
@@ -39,11 +39,11 @@ func (c *JIRANotificationsConfig) Get(env Environment) error {
*c = JIRANotificationsConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -56,7 +56,7 @@ func (c *JIRANotificationsConfig) Set() error {
coll := env.DB().Collection(ConfigCollection)
_, err := coll.ReplaceOne(ctx, byId(c.SectionId()), c, options.Replace().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *JIRANotificationsConfig) ValidateAndDefault() error {
@@ -64,7 +64,7 @@ func (c *JIRANotificationsConfig) ValidateAndDefault() error {
projectSet := make(map[string]bool)
for _, project := range c.CustomFields {
if projectSet[project.Project] {
- catcher.Add(errors.Errorf("duplicate project key '%s'", project.Project))
+ catcher.Errorf("duplicate project key '%s'", project.Project)
continue
}
projectSet[project.Project] = true
@@ -72,7 +72,7 @@ func (c *JIRANotificationsConfig) ValidateAndDefault() error {
fieldSet := make(map[string]bool)
for _, field := range project.Fields {
if fieldSet[field.Field] {
- catcher.Add(errors.Errorf("duplicate field key '%s' in project '%s'", field.Field, project.Project))
+ catcher.Errorf("duplicate field key '%s' in project '%s'", field.Field, project.Project)
continue
}
fieldSet[field.Field] = true
diff --git a/config_logger.go b/config_logger.go
index 88572594b26..3d64452115b 100644
--- a/config_logger.go
+++ b/config_logger.go
@@ -38,11 +38,11 @@ func (c *LoggerConfig) Get(env Environment) error {
*c = LoggerConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -64,7 +64,7 @@ func (c *LoggerConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *LoggerConfig) ValidateAndDefault() error {
diff --git a/config_newrelic.go b/config_newrelic.go
index cfb7b396239..2665a079092 100644
--- a/config_newrelic.go
+++ b/config_newrelic.go
@@ -28,11 +28,11 @@ func (c *NewRelicConfig) Get(env Environment) error {
*c = NewRelicConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -54,7 +54,7 @@ func (c *NewRelicConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *NewRelicConfig) ValidateAndDefault() error {
@@ -62,7 +62,7 @@ func (c *NewRelicConfig) ValidateAndDefault() error {
allFieldsAreFilledOut := len(c.AccountID) > 0 && len(c.TrustKey) > 0 && len(c.AgentID) > 0 && len(c.LicenseKey) > 0 && len(c.ApplicationID) > 0
if !allFieldsAreEmpty && !allFieldsAreFilledOut {
- return errors.New("Must provide all fields or no fields for New Relic settings")
+ return errors.New("must provide all fields or no fields for New Relic settings")
}
return nil
}
diff --git a/config_pod_lifecycle.go b/config_pod_lifecycle.go
new file mode 100644
index 00000000000..96ea8a6d049
--- /dev/null
+++ b/config_pod_lifecycle.go
@@ -0,0 +1,66 @@
+package evergreen
+
+import (
+ "github.com/mongodb/anser/bsonutil"
+ "github.com/mongodb/grip"
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+ "go.mongodb.org/mongo-driver/mongo"
+ "go.mongodb.org/mongo-driver/mongo/options"
+)
+
+var podLifecycleConfigKey = bsonutil.MustHaveTag(Settings{}, "PodLifecycle") //nolint:unused
+
+// PodLifecycleConfig holds logging settings for the pod init process.
+type PodLifecycleConfig struct {
+ S3BaseURL string `bson:"s3_base_url" json:"s3_base_url" yaml:"s3_base_url"`
+ MaxParallelPodRequests int `bson:"max_parallel_pod_requests" json:"max_parallel_pod_requests" yaml:"max_parallel_pod_requests"`
+ MaxPodDefinitionCleanupRate int `bson:"max_pod_definition_cleanup_rate" json:"max_pod_definition_cleanup_rate" yam:"max_pod_definition_cleanup_rate"`
+ MaxSecretCleanupRate int `bson:"max_secret_cleanup_rate" json:"max_secret_cleanup_rate" yaml:"max_secret_cleanup_rate"`
+}
+
+func (c *PodLifecycleConfig) SectionId() string { return "pod_lifecycle" }
+
+func (c *PodLifecycleConfig) Get(env Environment) error {
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ res := coll.FindOne(ctx, byId(c.SectionId()))
+ if err := res.Err(); err != nil {
+ if err == mongo.ErrNoDocuments {
+ *c = PodLifecycleConfig{}
+ return nil
+ }
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
+ }
+
+ if err := res.Decode(c); err != nil {
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
+ }
+
+ return nil
+}
+
+func (c *PodLifecycleConfig) Set() error {
+ env := GetEnvironment()
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
+ "$set": c,
+ }, options.Update().SetUpsert(true))
+
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
+}
+
+func (c *PodLifecycleConfig) ValidateAndDefault() error {
+ catcher := grip.NewSimpleCatcher()
+ if c.MaxParallelPodRequests == 0 {
+ // TODO: (EVG-16217) Determine empirically if this is indeed reasonable
+ c.MaxParallelPodRequests = 2000
+ }
+ catcher.NewWhen(c.MaxParallelPodRequests < 0, "max parallel pod requests cannot be negative")
+ return catcher.Resolve()
+}
diff --git a/config_podinit.go b/config_podinit.go
deleted file mode 100644
index eec6637fd84..00000000000
--- a/config_podinit.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package evergreen
-
-import (
- "github.com/mongodb/anser/bsonutil"
- "github.com/mongodb/grip"
- "github.com/pkg/errors"
- "go.mongodb.org/mongo-driver/bson"
- "go.mongodb.org/mongo-driver/mongo"
- "go.mongodb.org/mongo-driver/mongo/options"
-)
-
-var podInitConfigKey = bsonutil.MustHaveTag(Settings{}, "PodInit") //nolint: deadcode, unused
-
-// PodInitConfig holds logging settings for the pod init process.
-type PodInitConfig struct {
- S3BaseURL string `bson:"s3_base_url" json:"s3_base_url" yaml:"s3_base_url"`
- MaxParallelPodRequests int `bson:"max_parallel_pod_requests" json:"max_parallel_pod_requests" yaml:"max_parallel_pod_requests"`
-}
-
-func (c *PodInitConfig) SectionId() string { return "pod_init" }
-
-func (c *PodInitConfig) Get(env Environment) error {
- ctx, cancel := env.Context()
- defer cancel()
- coll := env.DB().Collection(ConfigCollection)
-
- res := coll.FindOne(ctx, byId(c.SectionId()))
- if err := res.Err(); err != nil {
- if err == mongo.ErrNoDocuments {
- *c = PodInitConfig{}
- return nil
- }
- return errors.Wrapf(err, "error retrieving section '%s'", c.SectionId())
- }
-
- if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
- }
-
- return nil
-}
-
-func (c *PodInitConfig) Set() error {
- env := GetEnvironment()
- ctx, cancel := env.Context()
- defer cancel()
- coll := env.DB().Collection(ConfigCollection)
-
- _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
- "$set": bson.M{
- podInitS3BaseURLKey: c.S3BaseURL,
- podInitMaxParallelPodRequestsKey: c.MaxParallelPodRequests,
- },
- }, options.Update().SetUpsert(true))
-
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
-}
-
-func (c *PodInitConfig) ValidateAndDefault() error {
- catcher := grip.NewSimpleCatcher()
- if c.MaxParallelPodRequests == 0 {
- // TODO: (EVG-16217) Determine empirically if this is indeed reasonable
- c.MaxParallelPodRequests = 2000
- }
- catcher.NewWhen(c.MaxParallelPodRequests < 0, "MaxParallelPodRequests cannot be negative")
- return catcher.Resolve()
-}
diff --git a/config_presto.go b/config_presto.go
deleted file mode 100644
index 8ab9f80df6d..00000000000
--- a/config_presto.go
+++ /dev/null
@@ -1,131 +0,0 @@
-package evergreen
-
-import (
- "context"
- "database/sql"
- "fmt"
- "net/url"
- "time"
-
- "github.com/mongodb/anser/bsonutil"
- "github.com/mongodb/grip"
- "github.com/mongodb/grip/message"
- "github.com/pkg/errors"
- "github.com/trinodb/trino-go-client/trino"
- "go.mongodb.org/mongo-driver/bson"
- "go.mongodb.org/mongo-driver/mongo"
- "go.mongodb.org/mongo-driver/mongo/options"
-)
-
-// PrestoConfig represents configuration information for the application level
-// Presto DB connection.
-type PrestoConfig struct {
- BaseURI string `bson:"base_uri" json:"base_uri" yaml:"base_uri"`
- Port int `bson:"port" json:"port" yaml:"port"`
- TLS bool `bson:"tls" json:"tls" yaml:"tls"`
- Username string `bson:"username" json:"username" yaml:"username"`
- Password string `bson:"password" json:"password" yaml:"password"`
- Source string `bson:"source" json:"source" yaml:"source"`
- Catalog string `bson:"catalog" json:"catalog" yaml:"catalog"`
- Schema string `bson:"schema" json:"schema" yaml:"schema"`
- SessionProperties map[string]string `bson:"session_properties" json:"session_properties" yaml:"session_properties"`
-
- db *sql.DB
-}
-
-var (
- PrestoConfigBaseURIKey = bsonutil.MustHaveTag(PrestoConfig{}, "BaseURI")
- PrestoConfigPortKey = bsonutil.MustHaveTag(PrestoConfig{}, "Port")
- PrestoConfigTLSKey = bsonutil.MustHaveTag(PrestoConfig{}, "TLS")
- PrestoConfigUsernameKey = bsonutil.MustHaveTag(PrestoConfig{}, "Username")
- PrestoConfigPasswordKey = bsonutil.MustHaveTag(PrestoConfig{}, "Password")
- PrestoConfigSourceKey = bsonutil.MustHaveTag(PrestoConfig{}, "Source")
- PrestoConfigCatalogKey = bsonutil.MustHaveTag(PrestoConfig{}, "Catalog")
- PrestoConfigSchemaKey = bsonutil.MustHaveTag(PrestoConfig{}, "Schema")
- PrestoConfigSessionPropertiesKey = bsonutil.MustHaveTag(PrestoConfig{}, "SessionProperties")
-)
-
-func (*PrestoConfig) SectionId() string { return "presto" }
-
-func (c *PrestoConfig) Get(env Environment) error {
- ctx, cancel := env.Context()
- defer cancel()
- coll := env.DB().Collection(ConfigCollection)
-
- res := coll.FindOne(ctx, byId(c.SectionId()))
- if err := res.Err(); err != nil {
- if err == mongo.ErrNoDocuments {
- *c = PrestoConfig{}
- return nil
- }
- return errors.Wrapf(err, "retrieving section '%s'", c.SectionId())
- }
-
- if err := res.Decode(c); err != nil {
- return errors.Wrapf(err, "decoding section '%s'", c.SectionId())
- }
-
- if err := c.setupDB(ctx); err != nil {
- grip.Alert(message.WrapError(err, message.Fields{
- "message": "setting up Presto DB client",
- }))
- }
-
- return nil
-}
-
-func (c *PrestoConfig) Set() error {
- env := GetEnvironment()
- ctx, cancel := env.Context()
- defer cancel()
- coll := env.DB().Collection(ConfigCollection)
-
- _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{"$set": c}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "updating section '%s'", c.SectionId())
-}
-
-func (*PrestoConfig) ValidateAndDefault() error { return nil }
-
-func (c *PrestoConfig) DB() *sql.DB { return c.db }
-
-func (c *PrestoConfig) setupDB(ctx context.Context) error {
- dsnConfig := trino.Config{
- ServerURI: c.formatURI(),
- Source: c.Source,
- Catalog: c.Catalog,
- Schema: c.Schema,
- SessionProperties: c.SessionProperties,
- }
- dsn, err := dsnConfig.FormatDSN()
- if err != nil {
- return errors.Wrap(err, "formatting Presto DSN")
- }
-
- c.db, err = sql.Open("trino", dsn)
- if err != nil {
- return errors.Wrap(err, "opening Presto connection")
- }
-
- ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
- defer cancel()
- return c.db.PingContext(ctx)
-}
-
-func (c *PrestoConfig) formatURI() string {
- var scheme string
- if c.TLS {
- scheme = "https"
- } else {
- scheme = "http"
- }
-
- // URI has format `http[s]://username[:password]@host[:port]`.
- return fmt.Sprintf(
- "%s://%s:%s@%s:%d",
- scheme,
- url.PathEscape(c.Username),
- url.PathEscape(c.Password),
- c.BaseURI,
- c.Port,
- )
-}
diff --git a/config_project_creation.go b/config_project_creation.go
new file mode 100644
index 00000000000..39513dd00ad
--- /dev/null
+++ b/config_project_creation.go
@@ -0,0 +1,79 @@
+package evergreen
+
+import (
+ "github.com/mongodb/anser/bsonutil"
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+ "go.mongodb.org/mongo-driver/mongo"
+ "go.mongodb.org/mongo-driver/mongo/options"
+)
+
+type OwnerRepo struct {
+ Owner string `bson:"owner" json:"owner" yaml:"owner"`
+ Repo string `bson:"repo" json:"repo" yaml:"repo"`
+}
+
+type ProjectCreationConfig struct {
+ // TotalProjectLimit is the total number of projects that Evergreen is willing to support
+ TotalProjectLimit int `bson:"total_project_limit" json:"total_project_limit" yaml:"total_project_limit"`
+
+ // RepoProjectLimit is the number of projects that Evergreen will allow each repo to have
+ RepoProjectLimit int `bson:"repo_project_limit" json:"repo_project_limit" yaml:"repo_project_limit"`
+
+ // RepoExceptions is a list of repos that can override the default repo-project limit but not the total project limit
+ RepoExceptions []OwnerRepo `bson:"repo_exceptions,omitempty" json:"repo_exceptions" yaml:"repo_exceptions"`
+
+ // JiraProject is the project that will be used to create Jira tickets to request S3 credentials
+ JiraProject string `bson:"jira_project,omitempty" json:"jira_project" yaml:"jira_project"`
+}
+
+var (
+ ProjectCreationConfigTotalProjectLimitKey = bsonutil.MustHaveTag(ProjectCreationConfig{}, "TotalProjectLimit")
+ ProjectCreationConfigRepoProjectLimitKey = bsonutil.MustHaveTag(ProjectCreationConfig{}, "RepoProjectLimit")
+ ProjectCreationConfigRepoExceptionsKey = bsonutil.MustHaveTag(ProjectCreationConfig{}, "RepoExceptions")
+ ProjectCreationConfigJiraProjectKey = bsonutil.MustHaveTag(ProjectCreationConfig{}, "JiraProject")
+)
+
+func (*ProjectCreationConfig) SectionId() string { return "project_creation" }
+
+func (c *ProjectCreationConfig) Get(env Environment) error {
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ res := coll.FindOne(ctx, byId(c.SectionId()))
+ if err := res.Err(); err != nil {
+ if err == mongo.ErrNoDocuments {
+ *c = ProjectCreationConfig{}
+ return nil
+ }
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
+ }
+
+ if err := res.Decode(c); err != nil {
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
+ }
+
+ return nil
+}
+
+func (c *ProjectCreationConfig) Set() error {
+ env := GetEnvironment()
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+ _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{"$set": c}, options.Update().SetUpsert(true))
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
+}
+
+func (c *ProjectCreationConfig) ValidateAndDefault() error { return nil }
+
+// IsExceptionToRepoLimit returns bool if the given owner repo combination has been specified as an exception in admin settings
+func (c *ProjectCreationConfig) IsExceptionToRepoLimit(owner, repo string) bool {
+ for _, exception := range c.RepoExceptions {
+ if exception.Owner == owner && exception.Repo == repo {
+ return true
+ }
+ }
+ return false
+}
diff --git a/config_registry.go b/config_registry.go
index a9d9fa51555..f62273aaee5 100644
--- a/config_registry.go
+++ b/config_registry.go
@@ -1,10 +1,11 @@
package evergreen
import (
- "errors"
"fmt"
"sync"
+ "github.com/pkg/errors"
+
"github.com/mongodb/grip"
)
@@ -18,9 +19,8 @@ import (
var ConfigRegistry *ConfigSectionRegistry
func init() {
-
if err := resetRegistry(); err != nil {
- panic(fmt.Sprintf("error registering config sections: %s", err.Error()))
+ panic(errors.Wrap(err, "registering config sections").Error())
}
}
@@ -39,23 +39,26 @@ func resetRegistry() error {
&CloudProviders{},
&CommitQueueConfig{},
&ContainerPoolsConfig{},
+ &DataPipesConfig{},
&HostInitConfig{},
&HostJasperConfig{},
&JiraConfig{},
&LoggerConfig{},
&NewRelicConfig{},
&NotifyConfig{},
- &PodInitConfig{},
- &PrestoConfig{},
+ &PodLifecycleConfig{},
+ &ProjectCreationConfig{},
&RepoTrackerConfig{},
&SchedulerConfig{},
&ServiceFlags{},
&SlackConfig{},
+ &SplunkConfig{},
&UIConfig{},
&Settings{},
&JIRANotificationsConfig{},
&TriggerConfig{},
&SpawnHostConfig{},
+ &TracerConfig{},
}
ConfigRegistry = newConfigSectionRegistry()
@@ -82,7 +85,7 @@ func (r *ConfigSectionRegistry) registerSection(id string, section ConfigSection
return errors.New("cannot register a section with no ID")
}
if _, exists := r.sections[id]; exists {
- return fmt.Errorf("section %s is already registered", id)
+ return fmt.Errorf("section '%s' is already registered", id)
}
r.sections[id] = section
diff --git a/config_repotracker.go b/config_repotracker.go
index cbc9bb75f07..1cc3405bc4e 100644
--- a/config_repotracker.go
+++ b/config_repotracker.go
@@ -27,11 +27,11 @@ func (c *RepoTrackerConfig) Get(env Environment) error {
*c = RepoTrackerConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -51,7 +51,7 @@ func (c *RepoTrackerConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *RepoTrackerConfig) ValidateAndDefault() error { return nil }
diff --git a/config_role.go b/config_role.go
index 2b0f2f90ee2..c580dba6f26 100644
--- a/config_role.go
+++ b/config_role.go
@@ -50,7 +50,7 @@ func (m *LDAPRoleMap) Add(group, roleID string) error {
)
if err != nil || res.MatchedCount > 0 {
- return errors.Wrapf(err, "error adding %s:%s to the LDAP-role map", group, roleID)
+ return errors.Wrapf(err, "adding '%s:%s' to the LDAP-role map", group, roleID)
}
_, err = coll.UpdateOne(ctx, byId(s.SectionId()), bson.M{
@@ -62,7 +62,7 @@ func (m *LDAPRoleMap) Add(group, roleID string) error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error adding %s:%s to the LDAP-role map", group, roleID)
+ return errors.Wrapf(err, "adding '%s:%s' to the LDAP-role map", group, roleID)
}
// Remove removes a LDAP group to role mapping from the database.
@@ -81,5 +81,5 @@ func (m *LDAPRoleMap) Remove(group string) error {
},
})
- return errors.Wrapf(err, "error removing %s from the LDAP-role map", group)
+ return errors.Wrapf(err, "removing group '%s' from the LDAP-role map", group)
}
diff --git a/config_scheduler.go b/config_scheduler.go
index 0aa3d78dfc5..d0c2ada2147 100644
--- a/config_scheduler.go
+++ b/config_scheduler.go
@@ -43,11 +43,11 @@ func (c *SchedulerConfig) Get(env Environment) error {
*c = SchedulerConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -82,7 +82,7 @@ func (c *SchedulerConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *SchedulerConfig) ValidateAndDefault() error {
diff --git a/config_serviceflags.go b/config_serviceflags.go
index 95800422376..940e0ac9cc7 100644
--- a/config_serviceflags.go
+++ b/config_serviceflags.go
@@ -34,6 +34,7 @@ type ServiceFlags struct {
BackgroundCleanupDisabled bool `bson:"background_cleanup_disabled" json:"background_cleanup_disabled"`
CloudCleanupDisabled bool `bson:"cloud_cleanup_disabled" json:"cloud_cleanup_disabled"`
ContainerConfigurationsDisabled bool `bson:"container_configurations_disabled" json:"container_configurations_disabled"`
+ LegacyUIPublicAccessDisabled bool `bson:"legacy_ui_public_access_disabled" json:"legacy_ui_public_access_disabled"`
// Notification Flags
EventProcessingDisabled bool `bson:"event_processing_disabled" json:"event_processing_disabled"`
@@ -57,11 +58,11 @@ func (c *ServiceFlags) Get(env Environment) error {
*c = ServiceFlags{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
}
@@ -104,11 +105,12 @@ func (c *ServiceFlags) Set() error {
backgroundReauthDisabledKey: c.BackgroundReauthDisabled,
cloudCleanupDisabledKey: c.CloudCleanupDisabled,
containerConfigurationsDisabledKey: c.ContainerConfigurationsDisabled,
+ legacyUIPublicAccessDisabledKey: c.LegacyUIPublicAccessDisabled,
unrecognizedPodCleanupDisabledKey: c.UnrecognizedPodCleanupDisabled,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *ServiceFlags) ValidateAndDefault() error { return nil }
diff --git a/config_slack.go b/config_slack.go
index 29e20069f28..40f11995bc0 100644
--- a/config_slack.go
+++ b/config_slack.go
@@ -13,6 +13,7 @@ type SlackConfig struct {
Options *send.SlackOptions `bson:"options" json:"options" yaml:"options"`
Token string `bson:"token" json:"token" yaml:"token"`
Level string `bson:"level" json:"level" yaml:"level"`
+ Name string `bson:"name" json:"name" yaml:"name"`
}
func (c *SlackConfig) SectionId() string { return "slack" }
@@ -28,11 +29,11 @@ func (c *SlackConfig) Get(env Environment) error {
*c = SlackConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -49,10 +50,11 @@ func (c *SlackConfig) Set() error {
"options": c.Options,
"token": c.Token,
"level": c.Level,
+ "name": c.Name,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *SlackConfig) ValidateAndDefault() error {
@@ -70,7 +72,7 @@ func (c *SlackConfig) ValidateAndDefault() error {
}
if err := c.Options.Validate(); err != nil {
- return errors.Wrap(err, "with a non-empty token, you must specify a valid slack configuration")
+ return errors.Wrap(err, "with a non-empty token, you must specify a valid Slack configuration")
}
if !level.FromString(c.Level).IsValid() {
diff --git a/config_spawnhost.go b/config_spawnhost.go
index 274595dfffb..8ca03d2c7ac 100644
--- a/config_spawnhost.go
+++ b/config_spawnhost.go
@@ -26,11 +26,11 @@ func (c *SpawnHostConfig) Get(env Environment) error {
*c = SpawnHostConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -50,7 +50,7 @@ func (c *SpawnHostConfig) Set() error {
spawnhostsPerUserKey: c.SpawnHostsPerUser,
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *SpawnHostConfig) ValidateAndDefault() error {
diff --git a/config_splunk.go b/config_splunk.go
new file mode 100644
index 00000000000..7259f4ce31f
--- /dev/null
+++ b/config_splunk.go
@@ -0,0 +1,55 @@
+package evergreen
+
+import (
+ "github.com/mongodb/grip/send"
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+ "go.mongodb.org/mongo-driver/mongo"
+ "go.mongodb.org/mongo-driver/mongo/options"
+)
+
+type SplunkConfig struct {
+ SplunkConnectionInfo send.SplunkConnectionInfo `bson:",inline" json:"splunk_connection_info" yaml:"splunk_connection_info"`
+}
+
+func (c *SplunkConfig) SectionId() string { return "splunk" }
+
+func (c *SplunkConfig) Get(env Environment) error {
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ res := coll.FindOne(ctx, byId(c.SectionId()))
+ if err := res.Err(); err != nil {
+ if err != mongo.ErrNoDocuments {
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
+ }
+ *c = SplunkConfig{}
+ return nil
+ }
+
+ if err := res.Decode(c); err != nil {
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
+ }
+
+ return nil
+}
+
+func (c *SplunkConfig) Set() error {
+ env := GetEnvironment()
+ ctx, cancel := env.Context()
+ defer cancel()
+ coll := env.DB().Collection(ConfigCollection)
+
+ _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
+ "$set": bson.M{
+ "url": c.SplunkConnectionInfo.ServerURL,
+ "token": c.SplunkConnectionInfo.Token,
+ "channel": c.SplunkConnectionInfo.Channel,
+ },
+ }, options.Update().SetUpsert(true))
+
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
+}
+
+func (c *SplunkConfig) ValidateAndDefault() error { return nil }
diff --git a/config_test.go b/config_test.go
index 7c0f09a441b..7513566b7ed 100644
--- a/config_test.go
+++ b/config_test.go
@@ -17,7 +17,9 @@ import (
)
const (
- testDir = "config_test"
+ testDir = "config_test"
+ // testSettings contains the default admin settings suitable for testing
+ // that depends on the global environment.
testSettings = "evg_settings.yml"
)
@@ -39,8 +41,8 @@ func testConfig() *Settings {
return settings
}
-//Checks that the test settings file can be parsed
-//and returns a settings object.
+// Checks that the test settings file can be parsed
+// and returns a settings object.
func TestInitSettings(t *testing.T) {
assert := assert.New(t)
@@ -50,7 +52,7 @@ func TestInitSettings(t *testing.T) {
assert.NotNil(settings)
}
-//Checks that trying to parse a non existent file returns non-nil err
+// Checks that trying to parse a non existent file returns non-nil err
func TestBadInit(t *testing.T) {
assert := assert.New(t)
@@ -93,7 +95,9 @@ func TestGetGithubSettings(t *testing.T) {
}
type AdminSuite struct {
- env Environment
+ env Environment
+ originalEnv Environment
+ originalSettings *Settings
suite.Suite
}
@@ -105,23 +109,33 @@ func TestAdminSuite(t *testing.T) {
if configFile == "" {
configFile = testConfigFile()
}
+
originalEnv := GetEnvironment()
+ originalSettings, err := GetConfig()
+ require.NoError(t, err)
+
env, err := NewEnvironment(ctx, configFile, nil)
require.NoError(t, err)
- SetEnvironment(env)
- defer func() {
- SetEnvironment(originalEnv)
- }()
s := new(AdminSuite)
s.env = env
+ s.originalEnv = originalEnv
+ s.originalSettings = originalSettings
suite.Run(t, s)
}
func (s *AdminSuite) SetupTest() {
+ SetEnvironment(s.env)
s.NoError(resetRegistry())
}
+func (s *AdminSuite) TearDownTest() {
+ // Reset the global env and admin settings after modifications to avoid
+ // affecting other tests that depend on the global test env.
+ SetEnvironment(s.originalEnv)
+ s.NoError(UpdateConfig(s.originalSettings))
+}
+
func (s *AdminSuite) TestBanner() {
const bannerText = "hello evergreen users!"
@@ -142,27 +156,23 @@ func (s *AdminSuite) TestBanner() {
func (s *AdminSuite) TestBaseConfig() {
config := Settings{
- ApiUrl: "api",
- Banner: "banner",
- BannerTheme: Important,
- ClientBinariesDir: "bin_dir",
- ConfigDir: "cfg_dir",
- Credentials: map[string]string{"k1": "v1"},
- DomainName: "example.com",
- Expansions: map[string]string{"k2": "v2"},
- GithubPRCreatorOrg: "org",
- GithubOrgs: []string{"evergreen-ci"},
- Keys: map[string]string{"k3": "v3"},
- LogPath: "logpath",
- Plugins: map[string]map[string]interface{}{"k4": {"k5": "v5"}},
- PprofPort: "port",
- SSHKeyDirectory: "/ssh_key_directory",
- SSHKeyPairs: []SSHKeyPair{{Name: "key", Public: "public", Private: "private"}},
- Splunk: send.SplunkConnectionInfo{
- ServerURL: "server",
- Token: "token",
- Channel: "channel",
- },
+ ApiUrl: "api",
+ AWSInstanceRole: "role",
+ Banner: "banner",
+ BannerTheme: Important,
+ ClientBinariesDir: "bin_dir",
+ ConfigDir: "cfg_dir",
+ Credentials: map[string]string{"k1": "v1"},
+ DomainName: "example.com",
+ Expansions: map[string]string{"k2": "v2"},
+ GithubPRCreatorOrg: "org",
+ GithubOrgs: []string{"evergreen-ci"},
+ Keys: map[string]string{"k3": "v3"},
+ LogPath: "logpath",
+ Plugins: map[string]map[string]interface{}{"k4": {"k5": "v5"}},
+ PprofPort: "port",
+ SSHKeyDirectory: "/ssh_key_directory",
+ SSHKeyPairs: []SSHKeyPair{{Name: "key", Public: "public", Private: "private"}},
ShutdownWaitSeconds: 15,
}
@@ -172,6 +182,7 @@ func (s *AdminSuite) TestBaseConfig() {
s.NoError(err)
s.NotNil(settings)
s.Equal(config.ApiUrl, settings.ApiUrl)
+ s.Equal(config.AWSInstanceRole, settings.AWSInstanceRole)
s.Equal(config.Banner, settings.Banner)
s.Equal(config.BannerTheme, settings.BannerTheme)
s.Equal(config.ClientBinariesDir, settings.ClientBinariesDir)
@@ -204,7 +215,7 @@ func (s *AdminSuite) TestServiceFlags() {
f := v.Field(i)
f.SetBool(true)
}
- }, "error setting all fields to true")
+ })
err := testFlags.Set()
s.NoError(err)
@@ -246,9 +257,14 @@ func (s *AdminSuite) TestAlertsConfig() {
func (s *AdminSuite) TestAmboyConfig() {
config := AmboyConfig{
- Name: "amboy",
- SingleName: "single",
- DB: "db",
+ Name: "amboy",
+ SingleName: "single",
+ DBConnection: AmboyDBConfig{
+ URL: "mongodb://localhost:27017",
+ Database: "db",
+ Username: "user",
+ Password: "password",
+ },
PoolSizeLocal: 10,
PoolSizeRemote: 20,
LocalStorage: 30,
@@ -363,9 +379,12 @@ func (s *AdminSuite) TestJiraConfig() {
s.Equal(config, settings.Jira)
}
-func (s *AdminSuite) TestPodinitConfig() {
- config := PodInitConfig{
- S3BaseURL: "s3_base_url",
+func (s *AdminSuite) TestPodLifecycleConfig() {
+ config := PodLifecycleConfig{
+ S3BaseURL: "s3_base_url",
+ MaxParallelPodRequests: 1000,
+ MaxPodDefinitionCleanupRate: 100,
+ MaxSecretCleanupRate: 100,
}
err := config.Set()
@@ -373,7 +392,7 @@ func (s *AdminSuite) TestPodinitConfig() {
settings, err := GetConfig()
s.Require().NoError(err)
s.Require().NotNil(settings)
- s.Equal(config, settings.PodInit)
+ s.Equal(config, settings.PodLifecycle)
}
func (s *AdminSuite) TestProvidersConfig() {
@@ -466,6 +485,23 @@ func (s *AdminSuite) TestSlackConfig() {
s.Equal(config, settings.Slack)
}
+func (s *AdminSuite) TestSplunkConfig() {
+ config := SplunkConfig{
+ SplunkConnectionInfo: send.SplunkConnectionInfo{
+ ServerURL: "splunk_url",
+ Token: "splunk_token",
+ Channel: "splunk_channel",
+ },
+ }
+
+ err := config.Set()
+ s.NoError(err)
+ settings, err := GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.Splunk)
+}
+
func (s *AdminSuite) TestUiConfig() {
config := UIConfig{
Url: "url",
@@ -600,7 +636,7 @@ func (s *AdminSuite) TestContainerPoolsConfig() {
}
err := invalidConfig.ValidateAndDefault()
- s.EqualError(err, "container pool field max_containers must be positive integer")
+ s.EqualError(err, "container pool max containers must be positive integer")
validConfig := ContainerPoolsConfig{
Pools: []ContainerPool{
@@ -698,7 +734,7 @@ func (s *AdminSuite) TestJIRANotificationsConfig() {
},
},
}
- s.EqualError(c.ValidateAndDefault(), "template: this-is:1: unexpected \"}\" in operand")
+ s.EqualError(c.ValidateAndDefault(), "template: this-is:1: bad character U+007D '}'")
}
func (s *AdminSuite) TestCommitQueueConfig() {
@@ -861,3 +897,74 @@ func (s *AdminSuite) TestSSHKeysAppendOnly() {
}}
s.NoError(newSettings.Validate(), "should be able to append new key pair")
}
+
+func (s *AdminSuite) TestCedarConfig() {
+ config := CedarConfig{
+ BaseURL: "url.com",
+ RPCPort: "9090",
+ User: "username",
+ APIKey: "key",
+ }
+
+ err := config.Set()
+ s.NoError(err)
+ settings, err := GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.Cedar)
+
+ config.RPCPort = "7070"
+ s.NoError(config.Set())
+
+ settings, err = GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.Cedar)
+}
+
+func (s *AdminSuite) TestTracerConfig() {
+ config := TracerConfig{
+ Enabled: true,
+ CollectorEndpoint: "localhost:4316",
+ }
+
+ err := config.Set()
+ s.NoError(err)
+ settings, err := GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.Tracer)
+
+ config.Enabled = false
+ s.NoError(config.Set())
+
+ settings, err = GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.Tracer)
+}
+
+func (s *AdminSuite) TestDataPipesConfig() {
+ config := DataPipesConfig{
+ Host: "https://url.com",
+ Region: "us-east-1",
+ AWSAccessKey: "access",
+ AWSSecretKey: "secret",
+ AWSToken: "token",
+ }
+
+ err := config.Set()
+ s.NoError(err)
+ settings, err := GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.DataPipes)
+
+ config.Region = "us-west-1"
+ s.NoError(config.Set())
+
+ settings, err = GetConfig()
+ s.NoError(err)
+ s.NotNil(settings)
+ s.Equal(config, settings.DataPipes)
+}
diff --git a/config_test/evg_settings.yml b/config_test/evg_settings.yml
index e0cbd022763..a37ef0c49a3 100644
--- a/config_test/evg_settings.yml
+++ b/config_test/evg_settings.yml
@@ -1,148 +1,163 @@
+# This file contains the default initial admin settings used for tests.
database:
- url: "mongodb://localhost:27017"
- db: "mci_test"
- write_concern:
- wmode: "majority"
+ url: "mongodb://localhost:27017"
+ db: "mci_test"
+ write_concern:
+ wmode: "majority"
domain_name: "evergreen.localhost"
configdir: "config_test"
-credentials: {
- github: "token xxx",
-}
+credentials: { github: "token xxx" }
amboy:
name: test_queue
- database: amboy_test
+ db_connection:
+ database: amboy_test
+ url: "mongodb://localhost:27017"
pool_size_local: 2
pool_size_remote: 2
local_storage_size: 2048
+ # Ensure that tests depending on the global environment don't depend on indexes to exist in a testing DB.
+ skip_preferred_indexes: true
api_url: "https://localhost:8443"
providers:
- aws:
- ec2_keys:
- - name: "test_region"
- key: "aws id"
- secret: "aws secret"
- allowed_instance_types:
- - "test_instance_type"
- docker:
- api_version: 1.32
+ aws:
+ ec2_keys:
+ - name: "test_region"
+ key: "aws id"
+ secret: "aws secret"
+ allowed_instance_types:
+ - "test_instance_type"
+ # Ensure that tests depending on global settings use the mock AWS clients by default instead of actually
+ # connecting to AWS.
+ pod:
+ ecs:
+ client_type: "mock"
+ secrets_manager:
+ client_type: "mock"
+ docker:
+ api_version: 1.32
auth:
- naive:
- users:
+ naive:
+ users:
- username: "mci-nonprod"
password: "change me"
display_name: "MCI Nonprod"
keys:
- mci: "/data/home/etc/mci.pem"
+ mci: "/data/home/etc/mci.pem"
repotracker:
- logfile: "/tmp/repotracker_test.log"
+ logfile: "/tmp/repotracker_test.log"
api:
- github_webhook_secret: "test"
- logfile: "/tmp/api_test.log"
- httplistenaddr: ":9090"
- httpslistenaddr: ":8443"
- httpskey: |
- -----BEGIN RSA PRIVATE KEY-----
- MIIEpAIBAAKCAQEA2SBDCXd1kTytRA6tVn/RFIVBl9D54FdTEslq/jxRL5lHOoU1
- TwaMmQh3pjNPxqvzWsFNXdKoypLlmp8f9o9EDlBteSH6P4JSSbIcyx9PKjgitRKo
- lgJK20d/NkWHf8PYOrsMwK3FNF27gyL2edODtqATX0P2Ksxjt1M4coOdLDr9rpAJ
- rB5NKezHa2CDSgiJRL0Gm71dHNW0YOClbpfMs56MEPj5v74uAcsAzvqDmwy7LyRR
- Wv/j5ftxhBVgqTMErsHLmpF1iS2weEKZJ7qsWproJPw+DgwV6xhLHkriiPmXURm7
- PshEgjmQI6gkyvXutPRebTjogTQUmuekZElF9QIDAQABAoIBAFrQPpmwCFFl0oZ7
- qQ5byYROs/+enVSy0YEzE3ggnEhPUNZuLrzN3XKIcxrlrUFIXDGiVgye9pA73qLM
- WV8TzwA5rYATsQptJKPERnzCrKbY8dNQaYjMjqimf9OgQysyK7ds0smoJKphZfNU
- ZUjRKe7xhwi6cTS3ZiGgQiTLXarIgF1Poku4eoaIsrQRvGrfAYR4UYKsnK10Fp/X
- i/8eSiubqYyBpnIw+P6/lA62COTNrsk+B0098rrmP2ATk/+RbwtKET+nbKi60lZO
- UF5T5H3ZyFk3ySPWZEwxez+NicAp32KIqNcV0o504zTNIlu9FT32V5nXSWxR2Kqy
- GeFL3mUCgYEA8Kjhujwo4IvwGHRu5FuMQIJkKsXVjKfowrX8PTk8LdQAEZHzsfpj
- WKGIv1D9PDuPOYAP4re2CciFzzlPXPFpO9++spc5q69nIQGMpn/nAT61NKJwCTNS
- DxWzXzMTcstN1c9KfzUYubc9FCwKlu5sEGAH4RJLSqrAhElOWpvnIjcCgYEA5vda
- uiK+SsCuNll6ljGTPveVLnqv8XYV+I0gT5o6qzYyMm6z9p+CDCwhd6EkRi3YrkoH
- t16yvfyJ42vkIhQkA+HlKQErf57P4WMSywXaReHs8lhJOLcOCrtgf/vobEwnsV1s
- UX4c3x1wXqBC+t8EyI1RhsbfgJv8GswMeVW3szMCgYBKRbS0h1COTGHjCjwXGfHl
- DtjfIoNPj5qUTRn1wy5BboY+5e5x5Ta36dKMSPB+oFsJge5lKBF0X4B8fdFye8bg
- haMS9v0DcXTAiPvhfuPKTJIcFm3BSSdwJGBhZx//c6Mn83uoWriwyE5/ZUA3aInN
- W/XSjpTSDHSx3vXhnO/ubQKBgQCe6tE1Q5SVULBN2xFa6G99ItM1sNsAlBSX+Vqj
- CuaVSWwOgVc4ORY9E9xPOMQBuafefDeE9xabXHjvzxugSyVgunx300M/w2EbnpSe
- tr8x2Dq1oQN4j5OM1NKYHRcV9OxWwIY4KELrTZE0uqZ7gRoEeCABUTMVhb5YHc/z
- aIRGOwKBgQDXJmmVP9gkajOnkSwnIrha6OSNUrrFJciTPGzaT/wfH7eaO5t9ycTq
- 2SknqdTIM1yj3hy6vCGbY1uPcWdKzvcRiREC9Loix4bKt185QarmLR2tvQ18E6q8
- 8XLHVbSHOFGOI5U7lZl9Xv6C6OXWEfowHkk874CK634sT9DkWtAVLg==
- -----END RSA PRIVATE KEY-----
- httpscert: |
- -----BEGIN CERTIFICATE-----
- MIID0DCCArigAwIBAgIJALziNSK2Y3WFMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNV
- BAYTAlVTMQswCQYDVQQIEwJOWTEMMAoGA1UEBxMDTllDMRAwDgYDVQQKEwdNb25n
- b0RCMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTUwNTE0MTE1NjU4WhcNNDIwOTI5
- MTE1NjU4WjBOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCTlkxDDAKBgNVBAcTA05Z
- QzEQMA4GA1UEChMHTW9uZ29EQjESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkq
- hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2SBDCXd1kTytRA6tVn/RFIVBl9D54FdT
- Eslq/jxRL5lHOoU1TwaMmQh3pjNPxqvzWsFNXdKoypLlmp8f9o9EDlBteSH6P4JS
- SbIcyx9PKjgitRKolgJK20d/NkWHf8PYOrsMwK3FNF27gyL2edODtqATX0P2Ksxj
- t1M4coOdLDr9rpAJrB5NKezHa2CDSgiJRL0Gm71dHNW0YOClbpfMs56MEPj5v74u
- AcsAzvqDmwy7LyRRWv/j5ftxhBVgqTMErsHLmpF1iS2weEKZJ7qsWproJPw+DgwV
- 6xhLHkriiPmXURm7PshEgjmQI6gkyvXutPRebTjogTQUmuekZElF9QIDAQABo4Gw
- MIGtMB0GA1UdDgQWBBSan1gKjf8CwHfrem9lVCyH8ZWZSzB+BgNVHSMEdzB1gBSa
- n1gKjf8CwHfrem9lVCyH8ZWZS6FSpFAwTjELMAkGA1UEBhMCVVMxCzAJBgNVBAgT
- Ak5ZMQwwCgYDVQQHEwNOWUMxEDAOBgNVBAoTB01vbmdvREIxEjAQBgNVBAMTCWxv
- Y2FsaG9zdIIJALziNSK2Y3WFMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
- ggEBAIdu3Tpe/6HszdsBmI9lPHZmpuB4ntmPexJKhYCSkk214Rz8ljjbdRCpoTfb
- 03wwzLr56ZpUUZCp6tDe+3rJ1aakMNxxPJ+16KVXKCrih5bAMIapqan74yezeaEM
- fGorLC0DdUg6NLoAPayJFezrSGEJXjrOMRDGJiC0RPooM+eml02O2g8F9bxYkITx
- 7tCAaPyd68NC4o71GJgTfMqM8cioqhha9NYhDm57XU6D18rKj7UXgOuvgDO4P7HK
- 9XchfjSLxTBcPhzkTbqvDzPHosVdfxwSqnCtUaNlR5FetadloEark9oyiqQKO2d2
- QTCMAQiibc5urfUsXCSy8klj6w4=
- -----END CERTIFICATE-----
+ github_webhook_secret: "test"
+ logfile: "/tmp/api_test.log"
+ httplistenaddr: ":9090"
+ httpslistenaddr: ":8443"
+ httpskey: |
+ -----BEGIN RSA PRIVATE KEY-----
+ MIIEpAIBAAKCAQEA2SBDCXd1kTytRA6tVn/RFIVBl9D54FdTEslq/jxRL5lHOoU1
+ TwaMmQh3pjNPxqvzWsFNXdKoypLlmp8f9o9EDlBteSH6P4JSSbIcyx9PKjgitRKo
+ lgJK20d/NkWHf8PYOrsMwK3FNF27gyL2edODtqATX0P2Ksxjt1M4coOdLDr9rpAJ
+ rB5NKezHa2CDSgiJRL0Gm71dHNW0YOClbpfMs56MEPj5v74uAcsAzvqDmwy7LyRR
+ Wv/j5ftxhBVgqTMErsHLmpF1iS2weEKZJ7qsWproJPw+DgwV6xhLHkriiPmXURm7
+ PshEgjmQI6gkyvXutPRebTjogTQUmuekZElF9QIDAQABAoIBAFrQPpmwCFFl0oZ7
+ qQ5byYROs/+enVSy0YEzE3ggnEhPUNZuLrzN3XKIcxrlrUFIXDGiVgye9pA73qLM
+ WV8TzwA5rYATsQptJKPERnzCrKbY8dNQaYjMjqimf9OgQysyK7ds0smoJKphZfNU
+ ZUjRKe7xhwi6cTS3ZiGgQiTLXarIgF1Poku4eoaIsrQRvGrfAYR4UYKsnK10Fp/X
+ i/8eSiubqYyBpnIw+P6/lA62COTNrsk+B0098rrmP2ATk/+RbwtKET+nbKi60lZO
+ UF5T5H3ZyFk3ySPWZEwxez+NicAp32KIqNcV0o504zTNIlu9FT32V5nXSWxR2Kqy
+ GeFL3mUCgYEA8Kjhujwo4IvwGHRu5FuMQIJkKsXVjKfowrX8PTk8LdQAEZHzsfpj
+ WKGIv1D9PDuPOYAP4re2CciFzzlPXPFpO9++spc5q69nIQGMpn/nAT61NKJwCTNS
+ DxWzXzMTcstN1c9KfzUYubc9FCwKlu5sEGAH4RJLSqrAhElOWpvnIjcCgYEA5vda
+ uiK+SsCuNll6ljGTPveVLnqv8XYV+I0gT5o6qzYyMm6z9p+CDCwhd6EkRi3YrkoH
+ t16yvfyJ42vkIhQkA+HlKQErf57P4WMSywXaReHs8lhJOLcOCrtgf/vobEwnsV1s
+ UX4c3x1wXqBC+t8EyI1RhsbfgJv8GswMeVW3szMCgYBKRbS0h1COTGHjCjwXGfHl
+ DtjfIoNPj5qUTRn1wy5BboY+5e5x5Ta36dKMSPB+oFsJge5lKBF0X4B8fdFye8bg
+ haMS9v0DcXTAiPvhfuPKTJIcFm3BSSdwJGBhZx//c6Mn83uoWriwyE5/ZUA3aInN
+ W/XSjpTSDHSx3vXhnO/ubQKBgQCe6tE1Q5SVULBN2xFa6G99ItM1sNsAlBSX+Vqj
+ CuaVSWwOgVc4ORY9E9xPOMQBuafefDeE9xabXHjvzxugSyVgunx300M/w2EbnpSe
+ tr8x2Dq1oQN4j5OM1NKYHRcV9OxWwIY4KELrTZE0uqZ7gRoEeCABUTMVhb5YHc/z
+ aIRGOwKBgQDXJmmVP9gkajOnkSwnIrha6OSNUrrFJciTPGzaT/wfH7eaO5t9ycTq
+ 2SknqdTIM1yj3hy6vCGbY1uPcWdKzvcRiREC9Loix4bKt185QarmLR2tvQ18E6q8
+ 8XLHVbSHOFGOI5U7lZl9Xv6C6OXWEfowHkk874CK634sT9DkWtAVLg==
+ -----END RSA PRIVATE KEY-----
+ httpscert: |
+ -----BEGIN CERTIFICATE-----
+ MIID0DCCArigAwIBAgIJALziNSK2Y3WFMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNV
+ BAYTAlVTMQswCQYDVQQIEwJOWTEMMAoGA1UEBxMDTllDMRAwDgYDVQQKEwdNb25n
+ b0RCMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTUwNTE0MTE1NjU4WhcNNDIwOTI5
+ MTE1NjU4WjBOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCTlkxDDAKBgNVBAcTA05Z
+ QzEQMA4GA1UEChMHTW9uZ29EQjESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkq
+ hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2SBDCXd1kTytRA6tVn/RFIVBl9D54FdT
+ Eslq/jxRL5lHOoU1TwaMmQh3pjNPxqvzWsFNXdKoypLlmp8f9o9EDlBteSH6P4JS
+ SbIcyx9PKjgitRKolgJK20d/NkWHf8PYOrsMwK3FNF27gyL2edODtqATX0P2Ksxj
+ t1M4coOdLDr9rpAJrB5NKezHa2CDSgiJRL0Gm71dHNW0YOClbpfMs56MEPj5v74u
+ AcsAzvqDmwy7LyRRWv/j5ftxhBVgqTMErsHLmpF1iS2weEKZJ7qsWproJPw+DgwV
+ 6xhLHkriiPmXURm7PshEgjmQI6gkyvXutPRebTjogTQUmuekZElF9QIDAQABo4Gw
+ MIGtMB0GA1UdDgQWBBSan1gKjf8CwHfrem9lVCyH8ZWZSzB+BgNVHSMEdzB1gBSa
+ n1gKjf8CwHfrem9lVCyH8ZWZS6FSpFAwTjELMAkGA1UEBhMCVVMxCzAJBgNVBAgT
+ Ak5ZMQwwCgYDVQQHEwNOWUMxEDAOBgNVBAoTB01vbmdvREIxEjAQBgNVBAMTCWxv
+ Y2FsaG9zdIIJALziNSK2Y3WFMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
+ ggEBAIdu3Tpe/6HszdsBmI9lPHZmpuB4ntmPexJKhYCSkk214Rz8ljjbdRCpoTfb
+ 03wwzLr56ZpUUZCp6tDe+3rJ1aakMNxxPJ+16KVXKCrih5bAMIapqan74yezeaEM
+ fGorLC0DdUg6NLoAPayJFezrSGEJXjrOMRDGJiC0RPooM+eml02O2g8F9bxYkITx
+ 7tCAaPyd68NC4o71GJgTfMqM8cioqhha9NYhDm57XU6D18rKj7UXgOuvgDO4P7HK
+ 9XchfjSLxTBcPhzkTbqvDzPHosVdfxwSqnCtUaNlR5FetadloEark9oyiqQKO2d2
+ QTCMAQiibc5urfUsXCSy8klj6w4=
+ -----END CERTIFICATE-----
ui:
- secret: "this is a secret"
- defaultproject: "mongodb-mongo-master"
- logfile: "/tmp/ui_test.log"
- url: "http://localhost"
- httplistenaddr: ":9090"
+ parsley_url: "https://localhost:4173"
+ secret: "this is a secret"
+ defaultproject: "mongodb-mongo-master"
+ logfile: "/tmp/ui_test.log"
+ url: "http://localhost"
+ httplistenaddr: ":9090"
monitor:
- logfile: ""
+ logfile: ""
hostinit:
- logfile: "/tmp/hostinit_test.log"
+ logfile: "/tmp/hostinit_test.log"
notify:
- logfile: "/tmp/notify_test.log"
+ logfile: "/tmp/notify_test.log"
arranger:
- logfile: "/tmp/arranger_test.log"
- mockexecution: true
+ logfile: "/tmp/arranger_test.log"
+ mockexecution: true
scheduler:
- logfile: "/tmp/scheduler_test.log"
+ logfile: "/tmp/scheduler_test.log"
taskrunner:
- logfile: "/tmp/taskrunner_test.log"
+ logfile: "/tmp/taskrunner_test.log"
expansions:
- buildlogger_creds: "mci.buildlogger"
- github_private_key: |-
- -----BEGIN RSA PRIVATE KEY-----
- GH PRIVATE KEY
- -----END RSA PRIVATE KEY-----
- github_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOKHeJ/AfWWTnwhiZYSPQ4HRSe84sf4qUgyAGGU+rJkq6Pwuk064/wh+D2vx1dOMQMETAcV4xB3AYw3S04ZHKwz61SLJSyjvJ3NItU7SKa8dNxr1EJywfk63tTAudleH4DjAFzHdRMqZT1penOhEJtKruyzxVuSpwFjkjJY/3vhawu9oNiolGhGvm/QzbxF8CjhWsLk/oAT8poWCsbvz5WlU6ttSMc6dkPLIB4kj0nlq8QDHdK6GnB9DRIGActa6fJaDRxGqgmnYIk5W44nFTGqIcfvqBC7LM83rnVeaseVWytSlbAQL11b+ZDw+UaQeT4CZ9Ft9Wi2MNuqU+NHu4f builder@10gen.com
- api_httpscert_path: "/data/api_httpscert_path.pem"
+ buildlogger_creds: "mci.buildlogger"
+ github_private_key: |-
+ -----BEGIN RSA PRIVATE KEY-----
+ GH PRIVATE KEY
+ -----END RSA PRIVATE KEY-----
+ github_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOKHeJ/AfWWTnwhiZYSPQ4HRSe84sf4qUgyAGGU+rJkq6Pwuk064/wh+D2vx1dOMQMETAcV4xB3AYw3S04ZHKwz61SLJSyjvJ3NItU7SKa8dNxr1EJywfk63tTAudleH4DjAFzHdRMqZT1penOhEJtKruyzxVuSpwFjkjJY/3vhawu9oNiolGhGvm/QzbxF8CjhWsLk/oAT8poWCsbvz5WlU6ttSMc6dkPLIB4kj0nlq8QDHdK6GnB9DRIGActa6fJaDRxGqgmnYIk5W44nFTGqIcfvqBC7LM83rnVeaseVWytSlbAQL11b+ZDw+UaQeT4CZ9Ft9Wi2MNuqU+NHu4f builder@10gen.com
+ api_httpscert_path: "/data/api_httpscert_path.pem"
github_orgs: ["evergreen-ci", "newOwner"]
github_pr_creator_org: "10gen"
spawnhost:
- unexpirable_hosts_per_user: 2
- unexpirable_volumes_per_user: 2
- spawn_hosts_per_user: 6
+ unexpirable_hosts_per_user: 2
+ unexpirable_volumes_per_user: 2
+ spawn_hosts_per_user: 6
shutdown_wait_seconds: 10
+
+project_creation:
+ total_project_limit: 20
+ repo_project_limit: 5
diff --git a/config_test/evg_settings_with_3rd_party_defaults.yml b/config_test/evg_settings_with_3rd_party_defaults.yml
index 4faf1aa9546..4f8f350a7b8 100644
--- a/config_test/evg_settings_with_3rd_party_defaults.yml
+++ b/config_test/evg_settings_with_3rd_party_defaults.yml
@@ -9,7 +9,9 @@ credentials: { github: "token xxx" }
amboy:
name: test_queue
- database: amboy_test
+ db_connection:
+ database: amboy_test
+ url: "mongodb://localhost:27017"
pool_size_local: 2
pool_size_remote: 2
local_storage_size: 2048
diff --git a/config_tracer.go b/config_tracer.go
new file mode 100644
index 00000000000..ec129fe3e16
--- /dev/null
+++ b/config_tracer.go
@@ -0,0 +1,64 @@
+package evergreen
+
+import (
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+ "go.mongodb.org/mongo-driver/mongo"
+ "go.mongodb.org/mongo-driver/mongo/options"
+)
+
+// TracerConfig configures the OpenTelemetry tracer provider. If not enabled traces will not be sent.
+type TracerConfig struct {
+ Enabled bool `yaml:"enabled" bson:"enabled" json:"enabled"`
+ CollectorEndpoint string `yaml:"collector_endpoint" bson:"collector_endpoint" json:"collector_endpoint"`
+}
+
+// SectionId returns the ID of this config section.
+func (c *TracerConfig) SectionId() string { return "tracer" }
+
+// Get populates the config from the database.
+func (c *TracerConfig) Get(env Environment) error {
+ ctx, cancel := env.Context()
+ defer cancel()
+
+ coll := env.DB().Collection(ConfigCollection)
+ res := coll.FindOne(ctx, byId(c.SectionId()))
+ if err := res.Err(); err != nil {
+ if err == mongo.ErrNoDocuments {
+ *c = TracerConfig{}
+ return nil
+ }
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
+ }
+
+ if err := res.Decode(c); err != nil {
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
+ }
+
+ return nil
+}
+
+// Set sets the document in the database to match the in-memory config struct.
+func (c *TracerConfig) Set() error {
+ env := GetEnvironment()
+ ctx, cancel := env.Context()
+ defer cancel()
+
+ coll := env.DB().Collection(ConfigCollection)
+
+ _, err := coll.UpdateOne(ctx, byId(c.SectionId()), bson.M{
+ "$set": bson.M{
+ tracerEnabledKey: c.Enabled,
+ tracerCollectorEndpoint: c.CollectorEndpoint,
+ },
+ }, options.Update().SetUpsert(true))
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
+}
+
+// ValidateAndDefault validates the tracer configuration.
+func (c *TracerConfig) ValidateAndDefault() error {
+ if c.Enabled && c.CollectorEndpoint == "" {
+ return errors.New("tracer can't be enabled without a collector endpoint")
+ }
+ return nil
+}
diff --git a/config_triggers.go b/config_triggers.go
index 7d1ae40bcca..d7a3691a482 100644
--- a/config_triggers.go
+++ b/config_triggers.go
@@ -23,11 +23,11 @@ func (c *TriggerConfig) Get(env Environment) error {
*c = TriggerConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
@@ -45,7 +45,7 @@ func (c *TriggerConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *TriggerConfig) ValidateAndDefault() error {
return nil
diff --git a/config_ui.go b/config_ui.go
index d0fc8aa5673..f130aca0870 100644
--- a/config_ui.go
+++ b/config_ui.go
@@ -15,6 +15,7 @@ type UIConfig struct {
Url string `bson:"url" json:"url" yaml:"url"`
HelpUrl string `bson:"help_url" json:"help_url" yaml:"helpurl"`
UIv2Url string `bson:"uiv2_url" json:"uiv2_url" yaml:"uiv2_url"`
+ ParsleyUrl string `bson:"parsley_url" json:"parsley_url" yaml:"parsley_url"`
HttpListenAddr string `bson:"http_listen_addr" json:"http_listen_addr" yaml:"httplistenaddr"`
Secret string `bson:"secret" json:"secret" yaml:"secret"` // Secret to encrypt session storage
DefaultProject string `bson:"default_project" json:"default_project" yaml:"defaultproject"` // Default project to assume when none specified
@@ -38,11 +39,11 @@ func (c *UIConfig) Get(env Environment) error {
*c = UIConfig{}
return nil
}
- return errors.Wrapf(err, "error retrieving section %s", c.SectionId())
+ return errors.Wrapf(err, "getting config section '%s'", c.SectionId())
}
if err := res.Decode(c); err != nil {
- return errors.Wrap(err, "problem decoding result")
+ return errors.Wrapf(err, "decoding config section '%s'", c.SectionId())
}
return nil
}
@@ -58,6 +59,7 @@ func (c *UIConfig) Set() error {
"url": c.Url,
"help_url": c.HelpUrl,
"uiv2_url": c.UIv2Url,
+ "parsley_url": c.ParsleyUrl,
"http_listen_addr": c.HttpListenAddr,
"secret": c.Secret,
"default_project": c.DefaultProject,
@@ -69,19 +71,19 @@ func (c *UIConfig) Set() error {
},
}, options.Update().SetUpsert(true))
- return errors.Wrapf(err, "error updating section %s", c.SectionId())
+ return errors.Wrapf(err, "updating config section '%s'", c.SectionId())
}
func (c *UIConfig) ValidateAndDefault() error {
catcher := grip.NewSimpleCatcher()
if c.Secret == "" {
- catcher.Add(errors.New("UI Secret must not be empty"))
+ catcher.Add(errors.New("UI secret must not be empty"))
}
if c.DefaultProject == "" {
- catcher.Add(errors.New("You must specify a default project in UI"))
+ catcher.Add(errors.New("must specify a default project in UI"))
}
if c.Url == "" {
- catcher.Add(errors.New("You must specify a default UI url"))
+ catcher.Add(errors.New("must specify a default UI url"))
}
if c.CsrfKey != "" && len(c.CsrfKey) != 32 {
catcher.Add(errors.New("CSRF key must be 32 characters long"))
diff --git a/db/db_utils.go b/db/db_utils.go
index 3087d3703b0..a69abb6645e 100644
--- a/db/db_utils.go
+++ b/db/db_utils.go
@@ -413,19 +413,16 @@ func AggregateWithHint(collection string, pipeline interface{}, hint interface{}
return errors.WithStack(pipe.All(out))
}
-// AggregateWithMaxTime runs aggregate and specifies a max query time which ensures the query won't go on indefinitely when the request is cancelled.
-// A db.Aggregation is returned because in some usages the same db.Aggregation needs to be reused after the pipeline results have been retrieved.
-func AggregateWithMaxTime(collection string, pipeline interface{}, out interface{}, maxTime time.Duration) (db.Aggregation, error) {
+// AggregateWithMaxTime runs aggregate and specifies a max query time which
+// ensures the query won't go on indefinitely when the request is cancelled.
+func AggregateWithMaxTime(collection string, pipeline interface{}, out interface{}, maxTime time.Duration) error {
session, database, err := GetGlobalSessionFactory().GetSession()
if err != nil {
- err = errors.Wrap(err, "establishing db connection")
+ err = errors.Wrap(err, "establishing DB connection")
grip.Error(err)
- return nil, err
+ return err
}
defer session.Close()
- pipe := database.C(collection).Pipe(pipeline).MaxTime(maxTime)
-
- err = errors.WithStack(pipe.All(out))
- return pipe, err
+ return database.C(collection).Pipe(pipeline).MaxTime(maxTime).All(out)
}
diff --git a/db/db_utils_test.go b/db/db_utils_test.go
index f1323720b77..becc425bd3f 100644
--- a/db/db_utils_test.go
+++ b/db/db_utils_test.go
@@ -1,7 +1,7 @@
package db
import (
- "io/ioutil"
+ "io"
"strings"
"testing"
@@ -85,7 +85,7 @@ func TestDBUtils(t *testing.T) {
So(WriteGridFile("testfiles", id, strings.NewReader(id)), ShouldBeNil)
file, err := GetGridFile("testfiles", id)
So(err, ShouldBeNil)
- raw, err := ioutil.ReadAll(file)
+ raw, err := io.ReadAll(file)
So(err, ShouldBeNil)
So(string(raw), ShouldEqual, id)
})
@@ -462,7 +462,7 @@ func TestClearGridFSCollections(t *testing.T) {
defer reader.Close()
var bytes []byte
- bytes, err = ioutil.ReadAll(reader)
+ bytes, err = io.ReadAll(reader)
assert.NoError(err)
assert.Equal("lorem ipsum", string(bytes))
diff --git a/db/mgo/bson/bson.go b/db/mgo/bson/bson.go
index bfb6bc6448e..2daf4dbdac9 100644
--- a/db/mgo/bson/bson.go
+++ b/db/mgo/bson/bson.go
@@ -26,7 +26,7 @@
// Package bson is an implementation of the BSON specification for Go:
//
-// http://bsonspec.org
+// http://bsonspec.org
//
// It was created as part of the mgo MongoDB driver for Go, but is standalone
// and may be used on its own without the driver.
@@ -88,12 +88,11 @@ type Getter interface {
//
// For example:
//
-// type MyString string
-//
-// func (s *MyString) SetBSON(raw bson.Raw) error {
-// return raw.Unmarshal(s)
-// }
+// type MyString string
//
+// func (s *MyString) SetBSON(raw bson.Raw) error {
+// return raw.Unmarshal(s)
+// }
type Setter interface {
SetBSON(raw Raw) error
}
@@ -106,7 +105,7 @@ var SetZero = errors.New("set to zero")
// M is a convenient alias for a map[string]interface{} map, useful for
// dealing with BSON in a native way. For instance:
//
-// bson.M{"a": 1, "b": true}
+// bson.M{"a": 1, "b": true}
//
// There's no special handling for this type in addition to what's done anyway
// for an equivalent map type. Elements in the map will be dumped in an
@@ -115,7 +114,7 @@ type M map[string]interface{}
// D represents a BSON document containing ordered elements. For example:
//
-// bson.D{{"a", 1}, {"b", true}}
+// bson.D{{"a", 1}, {"b", true}}
//
// In some situations, such as when creating indexes for MongoDB, the order in
// which the elements are defined is important. If the order is not important,
@@ -144,8 +143,7 @@ func (d D) Map() (m M) {
//
// Relevant documentation:
//
-// http://bsonspec.org/#/specification
-//
+// http://bsonspec.org/#/specification
type Raw struct {
Kind byte
Data []byte
@@ -202,7 +200,7 @@ func readRandomUint32() uint32 {
if err != nil {
panic(fmt.Errorf("cannot read random object id: %v", err))
}
- //nolint
+ //nolint:all
return uint32((uint32(b[0]) << 0) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24))
}
@@ -413,13 +411,12 @@ var Undefined undefined
// Binary is a representation for non-standard binary values. Any kind should
// work, but the following are known as of this writing:
//
-// 0x00 - Generic. This is decoded as []byte(data), not Binary{0x00, data}.
-// 0x01 - Function (!?)
-// 0x02 - Obsolete generic.
-// 0x03 - UUID
-// 0x05 - MD5
-// 0x80 - User defined.
-//
+// 0x00 - Generic. This is decoded as []byte(data), not Binary{0x00, data}.
+// 0x01 - Function (!?)
+// 0x02 - Obsolete generic.
+// 0x03 - UUID
+// 0x05 - MD5
+// 0x80 - User defined.
type Binary struct {
Kind byte
Data []byte
@@ -481,34 +478,33 @@ func handleErr(err *error) {
// The tag may also contain flags to tweak the marshalling behavior for
// the field. The tag formats accepted are:
//
-// "[][,[,]]"
+// "[][,[,]]"
//
-// `(...) bson:"[][,[,]]" (...)`
+// `(...) bson:"[][,[,]]" (...)`
//
// The following flags are currently supported:
//
-// omitempty Only include the field if it's not set to the zero
-// value for the type or to empty slices or maps.
+// omitempty Only include the field if it's not set to the zero
+// value for the type or to empty slices or maps.
//
-// minsize Marshal an int64 value as an int32, if that's feasible
-// while preserving the numeric value.
+// minsize Marshal an int64 value as an int32, if that's feasible
+// while preserving the numeric value.
//
-// inline Inline the field, which must be a struct or a map,
-// causing all of its fields or keys to be processed as if
-// they were part of the outer struct. For maps, keys must
-// not conflict with the bson keys of other struct fields.
+// inline Inline the field, which must be a struct or a map,
+// causing all of its fields or keys to be processed as if
+// they were part of the outer struct. For maps, keys must
+// not conflict with the bson keys of other struct fields.
//
// Some examples:
//
-// type T struct {
-// A bool
-// B int "myb"
-// C string "myc,omitempty"
-// D string `bson:",omitempty" json:"jsonkey"`
-// E int64 ",minsize"
-// F int64 "myf,omitempty,minsize"
-// }
-//
+// type T struct {
+// A bool
+// B int "myb"
+// C string "myc,omitempty"
+// D string `bson:",omitempty" json:"jsonkey"`
+// E int64 ",minsize"
+// F int64 "myf,omitempty,minsize"
+// }
func Marshal(in interface{}) (out []byte, err error) {
defer handleErr(&err)
e := &encoder{make([]byte, 0, initialBufferSize)}
@@ -524,28 +520,28 @@ func Marshal(in interface{}) (out []byte, err error) {
// The tag may also contain flags to tweak the marshalling behavior for
// the field. The tag formats accepted are:
//
-// "[][,[,]]"
+// "[][,[,]]"
//
-// `(...) bson:"[][,[,]]" (...)`
+// `(...) bson:"[][,[,]]" (...)`
//
// The following flags are currently supported during unmarshal (see the
// Marshal method for other flags):
//
-// inline Inline the field, which must be a struct or a map.
-// Inlined structs are handled as if its fields were part
-// of the outer struct. An inlined map causes keys that do
-// not match any other struct field to be inserted in the
-// map rather than being discarded as usual.
+// inline Inline the field, which must be a struct or a map.
+// Inlined structs are handled as if its fields were part
+// of the outer struct. An inlined map causes keys that do
+// not match any other struct field to be inserted in the
+// map rather than being discarded as usual.
//
// The target field or element types of out may not necessarily match
// the BSON values of the provided data. The following conversions are
// made automatically:
//
-// - Numeric types are converted if at least the integer part of the
-// value would be preserved correctly
-// - Bools are converted to numeric types as 1 or 0
-// - Numeric types are converted to bools as true if not 0 or false otherwise
-// - Binary and string BSON data is converted to a string, array or byte slice
+// - Numeric types are converted if at least the integer part of the
+// value would be preserved correctly
+// - Bools are converted to numeric types as 1 or 0
+// - Numeric types are converted to bools as true if not 0 or false otherwise
+// - Binary and string BSON data is converted to a string, array or byte slice
//
// If the value would not fit the type and cannot be converted, it's
// silently skipped.
diff --git a/db/mgo/bson/bson_corpus_spec_test_generator.go b/db/mgo/bson/bson_corpus_spec_test_generator.go
index 29638a84455..d71dcfe9618 100644
--- a/db/mgo/bson/bson_corpus_spec_test_generator.go
+++ b/db/mgo/bson/bson_corpus_spec_test_generator.go
@@ -1,4 +1,4 @@
-// +build ignore
+//go:build ignore
package main
@@ -7,8 +7,8 @@ import (
"fmt"
"go/format"
"html/template"
- "io/ioutil"
"log"
+ "os"
"path/filepath"
"strings"
@@ -25,7 +25,7 @@ func main() {
src := g.generate()
- err := ioutil.WriteFile(fmt.Sprintf("%s.go", strings.TrimSuffix(name, "_generator")), src, 0644)
+ err := os.WriteFile(fmt.Sprintf("%s.go", strings.TrimSuffix(name, "_generator")), src, 0644)
if err != nil {
log.Fatalf("writing output: %s", err)
}
@@ -91,7 +91,7 @@ func (g *Generator) loadTests(filenames []string) ([]*testDef, error) {
}
func (g *Generator) loadTest(filename string) (*testDef, error) {
- content, err := ioutil.ReadFile(filename)
+ content, err := os.ReadFile(filename)
if err != nil {
return nil, err
}
diff --git a/db/mgo/bson/extensions.go b/db/mgo/bson/extensions.go
index b2ae7a10091..1b6980180b5 100644
--- a/db/mgo/bson/extensions.go
+++ b/db/mgo/bson/extensions.go
@@ -9,7 +9,6 @@ func (d D) UnmarshalBSON(in []byte) error { return Unmarshal(in, &d) }
func (r RawD) MarshalBSON() ([]byte, error) { return Marshal(r) }
func (r RawD) UnmarshalBSON(in []byte) error { return Unmarshal(in, &r) }
-//nolint
func (o *ObjectId) UnmarshalBSONValue(t bsontype.Type, in []byte) error {
*o = ObjectId(in)
return nil
diff --git a/db/mgo/internal/json/decode.go b/db/mgo/internal/json/decode.go
index aca1847372e..22644930552 100644
--- a/db/mgo/internal/json/decode.go
+++ b/db/mgo/internal/json/decode.go
@@ -75,14 +75,13 @@ import (
//
// The JSON null value unmarshals into an interface, map, pointer, or slice
// by setting that Go value to nil. Because null is often used in JSON to mean
-// ``not present,'' unmarshaling a JSON null into any other Go type has no effect
+// ânot present,â unmarshaling a JSON null into any other Go type has no effect
// on the value and produces no error.
//
// When unmarshaling quoted strings, invalid UTF-8 or
// invalid UTF-16 surrogate pairs are not treated as an error.
// Instead, they are replaced by the Unicode replacement
// character U+FFFD.
-//
func Unmarshal(data []byte, v interface{}) error {
// Check for well-formedness.
// Avoids filling out half a data structure
@@ -899,7 +898,7 @@ func (d *decodeState) name(v reflect.Value) {
}
// Check for unmarshaler on func field itself.
- //nolint
+ //nolint:all
u, ut, pv = d.indirect(v, false)
if u != nil {
d.off = nameStart
@@ -1062,7 +1061,7 @@ func (d *decodeState) keyed() (interface{}, bool) {
d.off--
out, err := decode(d.next())
if err != nil {
- //nolint
+ //nolint:all
d.error(err)
}
return out, true
diff --git a/db/mgo/internal/json/encode.go b/db/mgo/internal/json/encode.go
index 66d836fb65b..78fecab0937 100644
--- a/db/mgo/internal/json/encode.go
+++ b/db/mgo/internal/json/encode.go
@@ -59,6 +59,7 @@ import (
// becomes a member of the object unless
// - the field's tag is "-", or
// - the field is empty and its tag specifies the "omitempty" option.
+//
// The empty values are false, 0, any
// nil pointer or interface value, and any array, slice, map, or string of
// length zero. The object's default key string is the struct field name
@@ -66,28 +67,28 @@ import (
// the struct field's tag value is the key name, followed by an optional comma
// and options. Examples:
//
-// // Field is ignored by this package.
-// Field int `json:"-"`
+// // Field is ignored by this package.
+// Field int `json:"-"`
//
-// // Field appears in JSON as key "myName".
-// Field int `json:"myName"`
+// // Field appears in JSON as key "myName".
+// Field int `json:"myName"`
//
-// // Field appears in JSON as key "myName" and
-// // the field is omitted from the object if its value is empty,
-// // as defined above.
-// Field int `json:"myName,omitempty"`
+// // Field appears in JSON as key "myName" and
+// // the field is omitted from the object if its value is empty,
+// // as defined above.
+// Field int `json:"myName,omitempty"`
//
-// // Field appears in JSON as key "Field" (the default), but
-// // the field is skipped if empty.
-// // Note the leading comma.
-// Field int `json:",omitempty"`
+// // Field appears in JSON as key "Field" (the default), but
+// // the field is skipped if empty.
+// // Note the leading comma.
+// Field int `json:",omitempty"`
//
// The "string" option signals that a field is stored as JSON inside a
// JSON-encoded string. It applies only to fields of string, floating point,
// integer, or boolean types. This extra level of encoding is sometimes used
// when communicating with JavaScript programs:
//
-// Int64String int64 `json:",string"`
+// Int64String int64 `json:",string"`
//
// The key name will be used if it's a non-empty string consisting of
// only Unicode letters, digits, dollar signs, percent signs, hyphens,
@@ -134,7 +135,6 @@ import (
// JSON cannot represent cyclic data structures and Marshal does not
// handle them. Passing cyclic structures to Marshal will result in
// an infinite recursion.
-//
func Marshal(v interface{}) ([]byte, error) {
e := &encodeState{}
err := e.marshal(v, encOpts{escapeHTML: true})
@@ -684,7 +684,7 @@ func encodeByteSlice(e *encodeState, v reflect.Value, _ encOpts) {
// for large buffers, avoid unnecessary extra temporary
// buffer space.
enc := base64.NewEncoder(base64.StdEncoding, e)
- //nolint
+ //nolint:all
enc.Write(s)
enc.Close()
}
@@ -1063,7 +1063,7 @@ func typeFields(t reflect.Type) []field {
next := []field{{typ: t}}
// Count of queued names for current level and the next.
- //nolint
+ //nolint:all
count := map[reflect.Type]int{}
nextCount := map[reflect.Type]int{}
diff --git a/db/mgo/internal/json/fold.go b/db/mgo/internal/json/fold.go
index daaaf28959e..7ff079e33fe 100644
--- a/db/mgo/internal/json/fold.go
+++ b/db/mgo/internal/json/fold.go
@@ -24,8 +24,9 @@ const (
// 4) simpleLetterEqualFold, no specials, no non-letters.
//
// The letters S and K are special because they map to 3 runes, not just 2:
-// * S maps to s and to U+017F 'Åŋ' Latin small letter long s
-// * k maps to K and to U+212A 'âĒ' Kelvin sign
+// - S maps to s and to U+017F 'Åŋ' Latin small letter long s
+// - k maps to K and to U+212A 'âĒ' Kelvin sign
+//
// See https://play.golang.org/p/tTxjOc0OGo
//
// The returned function is specialized for matching against s and
diff --git a/db/mgo/internal/json/stream.go b/db/mgo/internal/json/stream.go
index e023702b571..0dd262f056e 100644
--- a/db/mgo/internal/json/stream.go
+++ b/db/mgo/internal/json/stream.go
@@ -265,7 +265,6 @@ var _ Unmarshaler = (*RawMessage)(nil)
// Number, for JSON numbers
// string, for JSON string literals
// nil, for JSON null
-//
type Token interface{}
const (
diff --git a/db/mgo/session.go b/db/mgo/session.go
index 56153147bfc..fc02d945212 100644
--- a/db/mgo/session.go
+++ b/db/mgo/session.go
@@ -43,13 +43,12 @@ func (err *LastError) Error() string {
return err.Err
}
-type queryError struct { //nolint
- //nolint
- Err string "$err"
- ErrMsg string
- Assertion string
- Code int
- //nolint
+//nolint:all
+type queryError struct {
+ Err string "$err"
+ ErrMsg string
+ Assertion string
+ Code int
AssertionCode int "assertionCode"
}
diff --git a/db/query.go b/db/query.go
index 504a2ed6f4a..496204a5a19 100644
--- a/db/query.go
+++ b/db/query.go
@@ -123,7 +123,7 @@ func CountQ(collection string, q Q) (int, error) {
return Count(collection, q.filter)
}
-//RemoveAllQ removes all docs that satisfy the query
+// RemoveAllQ removes all docs that satisfy the query
func RemoveAllQ(collection string, q Q) error {
return Remove(collection, q.filter)
}
diff --git a/docs/Configure-a-Project/Evergreen-Best-Practices.md b/docs/Configure-a-Project/Evergreen-Best-Practices.md
new file mode 100644
index 00000000000..b01b5231d27
--- /dev/null
+++ b/docs/Configure-a-Project/Evergreen-Best-Practices.md
@@ -0,0 +1,40 @@
+# Learn Best Practices
+
+## Task Directory
+
+Evergreen creates a temporary task directory for each task. Commands by default execute in that directory. Evergreen will clean up that directory in between tasks unless explicit configured not to. Please don't write outside this directory, as Evergreen won't be able to delete the data your task has written.
+
+## subprocess.exec
+
+In general, use [subprocess.exec](Project-Commands.md#subprocess-exec) instead of shell.exec.
+
+The reasons to prefer subprocess.exec include:
+1. Evergreen uses expansions with the same syntax as shell expansions.
+2. The shell isn't always bash. Debian/Ubuntu sh is dash.
+3. Debugging inline shell scripts is hard.
+4. When they're inline, it becomes hard for people to execute them themselves, which makes it difficult to reproduce what Evergreen has done locally.
+
+You can pass environment variables to subprocess.exec if you'd like to pass expansions. It's a good idea to avoid shell.exec as much as possible.
+
+## Task Tags
+
+Use [task tags](Project-Configuration-Files.md#task-and-variant-tags) to reduce repetition in your Evergreen configuration file.
+
+## Expansions
+
+Be cautious about Evergreen's expansion syntax.
+
+Evergreen chose an expansion syntax that unfortunately conflicts with bash. This means that you cannot do something like this.
+
+```bash
+# WRONG
+export foo=bar
+echo ${foo}
+```
+
+Evergreen will first look for an expansion called `foo` and will substitute that expansion, or, if it doesn't exist, the empty string. You must drop the curly braces if you would like to use a bash variable.
+
+```bash
+export foo=bar
+echo $foo
+```
diff --git a/docs/Configure-a-Project/How-To-Create-Evergreen-Projects.md b/docs/Configure-a-Project/How-To-Create-Evergreen-Projects.md
new file mode 100644
index 00000000000..d21a508016c
--- /dev/null
+++ b/docs/Configure-a-Project/How-To-Create-Evergreen-Projects.md
@@ -0,0 +1,28 @@
+# Create Evergreen Projects
+
+This guide is meant to help users create their own projects on Evergreen.
+
+## Authorization
+
+To have access to create a project you must be either a super user or the admin of an existing project.
+If you do not see the `New Project` button on the [project settings page](https://spruce.mongodb.com/project/YourProject/settings/general), or do not have access to the project settings page, create a JIRA ticket with the necessary information from the steps below.
+
+Note that that projects can only be created in spruce as it has been deprecated from the legacy UI.
+
+## Steps to Create
+
+![create_project_modal.png](../images/create_project_modal.png)
+1. Visit the projects page in the new UI https://spruce.mongodb.com/projects/.
+2. Click New Project. If you want to copy the current project, click Duplicate Current Project. Otherwise, click Create New Project.
+3. Enter the project name, repo org ("Owner"), and repo name ("Repo").
+4. **Do not set a Project ID unless you want to use the performance plugin.**
+5. If this project needs AWS credentials for S3 bucket access, click the check mark to open a JIRA ticket. (You should see the JIRA ticket under "reported by me.")
+6. Click "Create New Project".
+
+## Limitations
+
+Because Evergreen can only support so many projects, there are limitations to the number of projects that could be enabled.
+There is a total project limit, the total number of projects that Evergreen is currently willing to support,
+and a project per repo limit, a limit to the number of enabled projects that share the same GitHub owner and repo.
+
+If your GitHub owner and repo needs more than the allotted number of projects, create a JIRA ticket and request to override the repo limit.
\ No newline at end of file
diff --git a/docs/Configure-a-Project/Parameterized-Builds.md b/docs/Configure-a-Project/Parameterized-Builds.md
new file mode 100644
index 00000000000..7b1065f8f00
--- /dev/null
+++ b/docs/Configure-a-Project/Parameterized-Builds.md
@@ -0,0 +1,92 @@
+# Define Parameterized Builds
+
+Users are now able to pass parameters during patch creation and configuration, which are then made available as expansions (i.e. a parameter `foo` with value `bar` will replace instances of `${foo}` with `bar` in the project configuration).
+
+This allows projects to maintain non-secret project variables in their project config, rather than the project page, for wider edit/view access. Tests can be written to have different behavior for different parameter values, allowing patches to be more configurable. Parameters can also be used in dynamic variants.
+
+## Hierarchy
+
+Parameters can be defined in multiple different places, and can overwrite existing project variables. This leads to a specific hierarchy (listed from highest priority to lowest):
+
+* Function/command variables.
+
+* Parameters specified from the patch submission page.
+
+* Parameters passed in from the command-line.
+
+* Project-specific default parameters defined in the userâs local configuration.
+
+* Default parameters defined in the project YAML.
+
+* Project variables defined for the project (Only project admins have access to these).
+
+* Evergreen default expansions and build variant expansions.
+
+## Usage
+
+#### Project Config
+
+To define default values for parameters, as well as descriptions, parameters can now be added to the project YAML:
+```
+parameters:
+ - key: foo
+ value: bar
+ description: this is a demonstration
+```
+
+Note that value and description are not required. If value is not provided, the default value is the empty string.
+
+If the project configuration is modified, patches will use this value unless overridden through a higher-priority method. For **Pull Requests** and the **Commit Queue**, no higher-priority method is available, so modified parameters will be used.
+
+#### Command Line Usage
+
+When creating a patch, use `--param KEY=VALUE` to define each parameter. These will override parameter defaults and project variables, if they exist for the key. Note that the `=` character is not acceptable in a parameter key or value.
+
+If the user doesn't currently have parameter defaults (and hasn't included `--yes` to skip prompts), they will receive a prompt to add defaults to their local configuration. Defaults are added to the local configuration as a mapping:
+
+```
+project:
+- name: evergreen
+ parameters:
+ foo: bar
+```
+
+If defaults are defined here, they will overwrite defaults in the project YAML.
+
+#### List Parameters
+
+This is the only place where description is used by Evergreen.
+
+```
+evergreen list --parameters --project
+```
+This returns the parameters defined in the project's config.
+```
+Name Default Description
+---- ------- -----------
+foo bar this is a demonstration
+```
+If testing local changes, you can use ``--path `` instead of ``--project``.
+
+Parameters can also be retrieved with rest route [/projects//parameters](../Use-the-API/REST-V2-Usage.md#get-current-parameters-for-a-project), although descriptions are not returned here.
+
+#### Get Parameters for a Specific Patch
+
+If parameters are defined, they can be seen in the Patch Parameters modal in the patch metadata section. Note that this will only include **user-defined** parameters, i.e. parameters defined in the project configuration will not be displayed (even if parameter defaults have been modified in the project YAML for this patch). They can also be viewed from the Reconfigure Tasks/Variants Parameters tab (although they will not be modifiable once the patch is scheduled).
+
+If using rest routes to view your patch, parameters will now be included in this document.
+
+### Q&A
+
+
+If parameters override a private/restricted project variable, are they still private?
+
+* Because parameters are defined in the project configuration or by the user, **parameters are not private**. This means that if a parameter is overriding a private or restricted project variable, this parameter value will not be private/restricted.
+
+Can parameters be changed after a patch is finalized?
+
+* No, parameters are **not configurable** after the patch is finalized (i.e. after Schedule Patch is pressed, or `--finalize` is used when creating the patch from the CLI). Dynamically modifying parameters in a patch could affect task runtime and result in difficulty reproducing task behavior.
+
+There's another feature I'd like for parameters that don't exist. What should I do?
+
+* File a ticket for the Evergreen project! There's room to make parameters even more configurable; if you have a use case that isn't covered let us know!
diff --git a/docs/Configure-a-Project/Project-Commands.md b/docs/Configure-a-Project/Project-Commands.md
new file mode 100644
index 00000000000..2760e1136ad
--- /dev/null
+++ b/docs/Configure-a-Project/Project-Commands.md
@@ -0,0 +1,1163 @@
+# Select Project Commands
+
+Project Commands are the fundamental units of functionality in an Evergreen task.
+
+## archive.targz_extract
+
+`archive.targz_extract` extracts files from a gzipped tarball.
+
+``` yaml
+- command: archive.targz_extract
+ params:
+ path: "jstests.tgz"
+ destination: "src/jstestfuzz"
+```
+
+Parameters:
+
+- `path`: the path to the tarball
+- `destination`: the target directory
+- `exclude_files`: a list of filename
+ [blobs](https://golang.org/pkg/path/filepath/#Match) to exclude
+
+## archive.targz_pack
+
+`archive.targz_pack` creates a gzipped tarball.
+
+``` yaml
+- command: archive.targz_pack
+ params:
+ target: "jstests.tgz"
+ source_dir: "src/jstestfuzz"
+ include:
+ - "out/*.js"
+```
+
+Parameters:
+
+- `target`: the tgz file that will be created
+- `source_dir`: the directory to compress
+- `include`: a list of filename
+ [blobs](https://golang.org/pkg/path/filepath/#Match) to include
+- `exclude_files`: a list of filename
+ [blobs](https://golang.org/pkg/path/filepath/#Match) to exclude
+
+In addition to the
+[filepath.Match](https://golang.org/pkg/path/filepath/#Match) syntax,
+`archive.targz_pack` supports using \*\* to indicate that
+it should recurse into subdirectories. With only \*, it
+will not recurse.
+
+## attach.artifacts
+
+This command allows users to add files to the "Files" section of the
+task page without using the `s3.put` command. Suppose you uploaded a
+file to in your task. For
+instance, you might be using boto in a Python script. You can then add a
+link to the Files element on the task page by:
+
+``` yaml
+- command: attach.artifacts
+ params:
+ files:
+ - example.json
+```
+
+``` json
+[
+ {
+ "name": "my-file",
+ "link": "https://example.com/this-is-my-file",
+ "visibility": "public"
+ }
+]
+```
+
+An additional "ignore_for_fetch" parameter controls whether the file
+will be downloaded when spawning a host from the spawn link on a test
+page.
+
+- `files`: an array of gitignore file globs. All files that are
+ matched - ones that would be ignored by gitignore - are included.
+- `prefix`: an optional path to start processing the files, relative
+ to the working directory.
+
+## attach.results
+
+This command parses results in Evergreen's JSON test result format and
+posts them to the API server. The use case for this command is when you
+wish to store test logs yourself elsewhere. Evergreen's JSON format
+allows you to send test metadata and a link to the test logs to
+Evergreen, which Evergreen will then link from the UI and API.
+
+The format is as follows:
+
+``` json
+{
+ "results":[
+ {
+ "status":"pass",
+ "test_file":"test_1",
+ "exit_code":0,
+ "elapsed":0.32200002670288086, //end-start
+ "start":1398782500.359, //epoch_time
+ "end":1398782500.681 //epoch_time
+ },
+ {
+ "etc":"..."
+ },
+ ]
+}
+```
+
+The available fields for each json object in the "results" array above
+are the following. Note that all fields are optional and there is very
+little validation on the data, so the server may accept inputs that are
+logically nonsensical.
+
+| Name | Type | Description |
+|--------------------|---------|-------------------------------------------|
+| `status` | string (enum) | The final status of the test. Should be one of: "fail", "pass", "silentfail", "skip". |
+| `test_file` | string | The name of the test. This is what will be displayed in the test results section of the UI as the test identifier. |
+| `group_id` | string | The group ID if the test is associated with a group. This is mostly used for tests logging directly to cedar. |
+| `url` | string | The URL containing the rich-text view of the test logs. |
+| `url_raw` | string | The URL containing the plain-text view of the test logs. |
+| `line_num` | int | The line number of the test within the "url" parameter, if the URL actually contains the logs for multiple tests. |
+| `exit_code` | int | The status with which the test command exited. For the most part this does nothing. |
+| `task_id` | string | The ID of the task with which this test should be associated. The test will appear on the page for the specified task. |
+| `execution` | int | The execution of the task above with which this test should be associated. |
+
+``` yaml
+- command: attach.results
+ params:
+ file_location: src/report.json
+```
+
+Parameters:
+
+- `file_location`: a .json file to parse and upload
+
+## attach.xunit_results
+
+This command parses results in the XUnit format and posts them to the
+API server. Use this when you use a library in your programming language
+to generate XUnit results from tests. Evergreen will parse these XML
+files, creating links to individual tests in the test logs in the UI and
+API.
+
+This command will not error if there are no test results, as XML files can still
+be valid. We will error if no file paths given are valid XML files.
+
+``` yaml
+- command: attach.xunit_results
+ params:
+ file: src/results.xml
+```
+
+Parameters:
+
+- `file`: a .xml file to parse and upload. A filepath glob can also be
+ supplied to collect results from multiple files.
+- `files`: a list .xml files to parse and upload. Filepath globs can
+ also be supplied to collect results from multiple files.
+
+## ec2.assume_role
+
+This command calls the aws assumeRole API and returns credentials as
+these expansions:
+
+- `AWS_ACCESS_KEY_ID` (not accessible by expansion.write)
+- `AWS_SECRET_ACCESS_KEY` (not accessible by expansion.write)
+- `AWS_SESSION_TOKEN` (not accessible by expansion.write)
+- `AWS_ROLE_EXPIRATION`
+
+See
+[here](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html)
+for more details on the assume role API.
+
+``` yaml
+- command: ec2.assume_role
+ params:
+ role_arn: "aws_arn_123"
+```
+
+Parameters:
+
+- `role_arn`: string ARN of the role you want to assume. (required)
+- `external_id`: string of external ID that can be specified in the
+ role.
+- `policy`: string in JSON format that you want to use as an inline
+ session policy.
+- `duration_seconds`: int in seconds of how long the returned
+ credentials will be valid. (default 900)
+
+## expansions.update
+
+`expansions.update` updates the task's expansions at runtime.
+
+``` yaml
+- command: expansions.update
+ params:
+ ignore_missing_file: true
+ file: src/ec2_artifacts.yml
+
+- command: expansions.update
+ params:
+ updates:
+ - key: artifact_url
+ value: http://s3/static-artifacts.tgz
+```
+
+Parameters:
+
+- `updates`: key-value pairs for updating the task's parameters
+- `file`: filename for a yaml file containing expansion updates
+- `ignore_missing_file`: do not error if the file is missing
+
+## expansions.write
+
+`expansions.write` writes the task's expansions to a file
+
+`global_github_oauth_token`, `AWS_ACCESS_KEY_ID`,
+`AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN` are always redacted for
+security reasons
+
+``` yaml
+- command: expansions.write
+ params:
+ file: expansions.yaml
+```
+
+Parameters:
+
+- `file`: filename to write expansions to
+- `redacted`: include redacted project variables, defaults to false
+
+## generate.tasks
+
+This command creates functions, tasks, and variants from a user-provided
+JSON file. Consider using one of the following tools to create the JSON
+file:
+
+- (Go, officially maintained)
+- (Python, community maintained)
+
+Notes:
+
+- generate.tasks can only be used to append new functions, tasks, and variants,
+ or append tasks (new or existing) to an existing variant. generate.tasks cannot
+ redefine or modify existing functions, tasks, or variants (except for appending
+ tasks to the variant). It is a validation error to define a function, task,
+ or variant more than once in the JSON document passed to the command _except_
+ to specify a variant multiple times in order to append additional tasks to the variant.
+- The calls to generate.tasks may not in aggregate in a single version
+ generate more than 100 variants or more than 1000 tasks.
+- Because generate.tasks retries on errors that aren't known to us,
+ it may appear that your generate.tasks is hanging until timeout.
+ There may be details of this in the task logs; please ask in
+ #evergreen-users if you aren't sure what to do with a hanging
+ generate.tasks.
+
+``` yaml
+- command: generate.tasks
+ params:
+ files:
+ - example.json
+```
+
+Parameters:
+
+- `files`: the JSON file(s) to generate tasks from
+- `optional`: default false; if set to true, will not error if the
+ file(s) specified are not found
+
+``` json
+{
+ "functions": {
+ "echo-hi": {
+ "command": "shell.exec",
+ "params": {
+ "script": "echo hi"
+ }
+ }
+ },
+ "tasks": [
+ {
+ "commands": [
+ {
+ "command": "git.get_project",
+ "params": {
+ "directory": "src"
+ }
+ },
+ {
+ "func": "echo-hi"
+ }
+ ],
+ "name": "test"
+ }
+ ],
+ "buildvariants": [
+ {
+ "tasks": [
+ {
+ "name": "test"
+ }
+ ],
+ "display_name": "Ubuntu 16.04",
+ "run_on": [
+ "ubuntu1604-test"
+ ],
+ "name": "ubuntu1604"
+ }
+ ]
+}
+```
+
+## git.get_project
+
+This command clones the tracked project repository into a given
+directory, and checks out the revision associated with the task. Also
+applies patches to the source after cloning it, if the task was created
+by a patch submission.
+
+**Note**: You likely want to call manifest.load prior to
+git.get_project. If you don't, you will always use the branch specified
+in the module section even if the module is pinned at a different commit
+for your version.
+
+``` yaml
+- command: git.get_project
+ params:
+ directory: src
+ revisions:
+ example: ${example_rev} ## or
+```
+
+``` yaml
+- modules:
+ - name: example
+ repo: git@github.com:10gen/mongo-example-modules.git
+ prefix: src/mongo/db/modules
+ ref: 12341a65256ff78b6d15ab79a1c7088443b9abcd
+ branch: master
+```
+
+Parameters:
+
+- `dir`: the directory to clone into
+- `revisions`: For commit builds, each module should be passed as
+ ` : ${_rev}`. For patch builds, the hash
+ must be passed directly as ` : `. Note that this
+ means that for patch builds, editing the
+ ["modules"](Project-Configuration-Files.md#modules)
+ section of the project config will not change the checked out hash.
+- `token`: Use a token to clone instead of the ssh key on the host.
+ Since this is a secret, it should be provided as a project
+ expansion. For example, you could provide an expansion called
+ "github_token" and then set this field to \${github_token}.
+ Evergreen will populate the expansion when it parses the project
+ yaml.
+- `clone_depth`: Clone with `git clone --depth `. For
+ patch builds, Evergreen will `git fetch --unshallow` if the base
+ commit is older than `` commits.
+- `shallow_clone`: Sets `clone_depth` to 100.
+- `recurse_submodules`: automatically initialize and update each
+ submodule in the repository, including any nested submodules.
+
+The parameters for each module are:
+
+- `name`: the name of the module
+- `repo`: the repo of the module
+- `prefix`: the subdirectory to clone the repository in. It will be
+ the repository name as a top-level directory in `dir` if omitted
+- `ref`: must be a commit hash, takes precedence over the `branch`
+ parameter if both specified
+- `branch`: must be the name of branch, commit hashes _are not
+ accepted_.
+
+## gotest.parse_files
+
+This command parses Go test results and sends them to the API server. It
+accepts files generated by saving the output of the `go test -v` command
+to a file.
+
+E.g. In a preceding shell.exec command, run `go test -v > result.suite`
+
+``` yaml
+- command: gotest.parse_files
+ params:
+ files: ["src/*.suite"]
+```
+
+Parameters:
+
+- `files`: a list of files (or blobs) to parse and upload
+- `optional_output`: boolean to indicate if having no files found will
+ result in a task failure.
+
+## host.create
+
+`host.create` starts a host from a task.
+
+``` yaml
+- command: host.create
+ params:
+ provider: ec2
+ distro: rhel70-small
+```
+
+Parse From A File:
+
+- `file` - The name of a file containing all the parameters.
+
+``` yaml
+- command: host.create
+ params:
+ file: src/host_params.yml
+```
+
+Agent Parameters:
+
+- `num_hosts` - Number of hosts to start, 1 \<= `num_hosts` \<= 10.
+ Defaults to 1 (must be 1 if provider is Docker).
+- `provider` - Cloud provider. Must set `ec2` or `docker`. We intend
+ to support other providers as future work.
+- `retries` - How many times Evergreen should try to create this host
+ in EC2 before giving up. Evergreen will wait 1 minute between
+ retries.
+- `scope` - When Evergreen will tear down the host, i.e., when either
+ the task or build is finished. Must be either `task` or `build`.
+ Defaults to `task` if not set.
+- `timeout_setup_secs` - Stop waiting for hosts to be ready when
+ spawning. Must be 60 \<= `timeout_setup_secs` \<= 3600 (1 hour).
+ Default to 600 (10 minutes).
+- `timeout_teardown_secs` - Even if the task or build has not
+ finished, tear down this host after this many seconds. Must be 60
+ \<= `timeout_teardown_secs` \<= 604800 (7 days). Default to 21600 (6
+ hours).
+
+EC2 Parameters:
+
+- `ami` - EC2 AMI to start. Must set `ami` or `distro` but must not
+ set both.
+- `aws_access_key_id` - AWS access key ID. May set to use a
+ non-default account. Must set if `aws_secret_access_key` is set.
+- `aws_secret_access_key` - AWS secret key. May set to use a
+ non-default account. Must set if `aws_access_key_id` is set.
+- `device_name` - name of EBS device
+- `distro` - Evergreen distro to start. Must set `ami` or `distro` but
+ must not set both.
+- `ebs_block_device` - list of the following parameters:
+- `ebs_iops` - EBS provisioned IOPS.
+- `ebs_size` - Size of EBS volume in GB.
+- `ebs_snapshot_id` - EBS snapshot ID to mount.
+- `instance_type` - EC2 instance type. Must set if `ami` is set. May
+ set if `distro` is set, which will override the value from the
+ distro configuration.
+- `ipv6`- Set to true if instance should have _only_ an
+ IPv6 address, rather than a public IPv4 address.
+- `key_name` - EC2 Key name. Must set if `aws_access_key_id` or
+ `aws_secret_access_key` is set. Must not set otherwise.
+- `region` - EC2 region. Default is the same as Evergreen's default.
+- `security_group_ids` - List of security groups. Must set if `ami` is
+ set. May set if `distro` is set, which will override the value from
+ the distro configuration.
+- `spot` - Spawn a spot instance if `true.` Defaults to `false`.
+- `subnet_id` - Subnet ID for the VPC. Must be set if `ami` is set.
+- `userdata_file` - Path to file to load as EC2 user data on boot. May
+ set if `distro` is set, which will override the value from the
+ distro configuration. May set if distro is not set.
+- `vpc_id` - EC2 VPC. Must set if `ami` is set. May set if `distro` is
+ set, which will override the value from the distro configuration.
+
+Docker Parameters:
+
+- `background` - Set to wait for logs in the background, rather than
+ blocking. Default is true.
+- `container_wait_timeout_secs` - Time to wait for the container to
+ finish running the given command. Must be \<= 3600 (1 hour). Default
+ to 600 (10 minutes).
+- `command` - The command to run on the container. Does not not
+ support shell interpolation. If not specified, will use the default
+ entrypoint.
+- `distro` - Required. The distro's container pool is used to
+ find/create parents for the container.
+- `image` - Required. The image to use for the container. If image is
+ a URL, then the image is imported, otherwise it is pulled.
+- `poll_frequency_secs` - Check for running container and logs at this
+ interval. Must be \<= 60 (1 second). Default to 30.
+- `publish_ports` - Set to make ports available by mapping container
+ ports to ports on the Docker host. Default is false.
+- `extra_hosts` - Optional. This is a list of hosts to be added to
+ /etc/hosts on the container (each should be of the form
+ hostname:IP).
+- `registry_name` - The registry from which to pull/import the image.
+ Defaults to Dockerhub.
+- `registry_username` - Username for the `registry_name` if it
+ requires authentication. Must set if `registry_password` is set.
+- `registry_password` - Password for the `registry_name` if it
+ requires authentication. Must set if `registry_username` is set.
+- `stdout_file_name` - The file path to write stdout logs from the
+ container. Default is \.out.log.
+- `stderr_file_name` - The file path to write stderr logs from the
+ container. Default is \.err.log.
+
+### Required IAM Policies for `host.create`
+
+To create an on-demand host, the user must have the following
+permissions:
+
+- `ec2:CreateTags`
+- `ec2:DescribeInstances`
+- `ec2:RunInstances`
+- `ec2:TerminateInstances`
+- `pricing:GetProducts`
+
+### Checking SSH Availability for Spawn Hosts
+
+Certain instances require more time for SSH access to become available.
+If the user plans to execute commands on the remote host, then waiting
+for SSH access to become available is mandatory. Below is an Evergreen
+function that probes for SSH connectivity:
+
+``` yaml
+functions:
+ ## Check SSH availability
+ ssh-ready:
+ command: shell.exec
+ params:
+ script: |
+ user=${admin_user_name}
+ hostname=$(tr -d '"[]{}' < buildhost-configuration/hosts.yml | cut -d , -f 1 | awk -F : '{print $2}')
+ identity_file=~/.ssh/mcipacker.pem
+
+ attempts=0
+ connection_attempts=${connection_attempts|25}
+
+ ## Check for remote connectivity
+ while ! ssh \
+ -i "$identity_file" \
+ -o ConnectTimeout=10 \
+ -o ForwardAgent=yes \
+ -o IdentitiesOnly=yes \
+ -o StrictHostKeyChecking=no \
+ "$(printf "%s@%s" "$user" "$hostname")" \
+ exit 2> /dev/null
+ do
+ [ "$attempts" -ge "$connection_attempts" ] && exit 1
+ ((attempts++))
+ printf "SSH connection attempt %d/%d failed. Retrying...\n" "$attempts" "$connection_attempts"
+ ## sleep for Permission denied (publickey) errors
+ sleep 10
+ done
+ shell: bash
+
+tasks:
+ - name: test
+ commands:
+ - command: host.create
+ params:
+ ami: ${ami}
+ aws_access_key_id: ${aws_access_key_id}
+ aws_secret_access_key: ${aws_secret_access_key}
+ instance_type: ${instance_type|m3.medium}
+ key_name: ${key_name}
+ provider: ec2
+ security_group_ids:
+ - ${security_group_id}
+ subnet_id: ${subnet_id}
+ vpc_id: ${vpc_id}
+ - command: host.list
+ params:
+ num_hosts: 1
+ path: buildhost-configuration/hosts.yml
+ timeout_seconds: 600
+ wait: true
+ - func: ssh-ready
+ - func: other-tasks
+```
+
+The mcipacker.pem key file was created by echoing the value of the
+\${\_\_project_aws_ssh_key_value} expansion into the file. This
+expansion is automatically set by Evergreen when the host is spawned.
+
+## host.list
+
+`host.list` gets information about hosts created by `host.create`.
+
+``` yaml
+- command: host.list
+ params:
+ wait: true
+ timeout_seconds: 300
+ num_hosts: 1
+```
+
+Parameters:
+
+- `num_hosts` - if `wait` is set, the number of hosts to wait to be
+ running before the command returns
+- `path` - path to file to write host info to
+- `silent` - if true, do not log host info to the task logs
+- `timeout_seconds` - time to wait for `num_hosts` to be running
+- `wait` - if set, wait `timeout_seconds` for `num_hosts` to be
+ running
+
+If the `path` directive is specified, then the contents of the file
+contain a JSON formatted list of objects. Each object contains the
+following keys:
+
+For EC2, these keys represent the instance. For Docker, they represent
+the Docker host that the container is running on.
+
+- `dns_name`: The FQDN of the EC2 instance (if IPv6 instance, this
+ will not be populated).
+- `ip_address`: the IP address of the EC2 instance (currently
+ implemented for IPv6).
+
+EC2 Only:
+
+- `instance_id`: The unique identifier of the EC2 instance.
+
+Docker Only:
+
+- `host_id`: The unique identifier of the container.
+- `parent_id`: The unique identifier of the parent of the container
+ (may be given as the parent host's tag, i.e. evergreen-assigned
+ ID).
+- `image`: The image used for the container.
+- `command`: The command run on the container.
+- `port_bindings`: The map of docker ports (formatted
+ `/`) to ports on the container host. Only available
+ if `publish_ports` was set for `host.create`.
+
+If there's an error in host.create, these will be available from
+host.list in this form:
+
+- `host_id`: The ID of the intent host we were trying to create
+ (likely only useful for Evergreen team investigations)
+- `error`: The error returned from host.create for this host
+
+``` json
+[
+ {
+ "dns_name": "ec2-52-91-50-29.compute-1.amazonaws.com",
+ "instance_id": "i-096d6766961314cd5"
+ },
+ {
+ "ip_address": "abcd:1234:459c:2d00:cfe4:843b:1d60:8e47",
+ "instance_id": "i-106d6766961312a14"
+ }
+ {
+ "dns_name": "ec2-55-123-99-55.compute-1.amazonaws.com",
+ "host_id": "container-7919139205343971456",
+ "parent_id": "evg-archlinux-parent-20190513171239-2182711601109995555",
+ "image": "hello-world",
+ "command": "/hello",
+ "port_bindings": {
+ "4444/tcp": [
+ "32769"
+ ],
+ "5900/tcp": [
+ "32768"
+ ]
+ }
+ }
+]
+```
+
+## json.send
+
+This command saves JSON-formatted task data, typically used with the
+performance plugin.
+
+Parameters:
+
+- `file`: the JSON file to save to Evergreen's DB
+- `name`: name of the file you're saving, typically a test name
+
+There is no schema enforced for the file itself - it is simply parsed as
+JSON and then saved as BSON.
+
+## keyval.inc
+
+This command is deprecated. It exists to support legacy access to
+logkeeper and could be removed at any time.
+
+The keyval.inc command assigns a strictly monotonically increasing value
+into the destination parameter name. The value is only strictly
+monotonically increasing for the same key but will be strictly
+monotonically increasing across concurrent tasks running the command at
+the same time. From an implementation perspective, you can thinking of
+it as Evergreen running a {findAndModify, query: {key: key}, update:
+{\$inc: {counter: 1}}} on its application database.
+
+Parameters:
+
+- `key`: name of the value to increment. Evergreen tracks these
+ internally.
+- `destination`: expansion name to save the value to.
+
+## mac.sign
+
+`mac.sign` signs and/or notarizes the mac OS artifacts. It calls
+internal macOS signing and notarization service.
+
+**Note**: This command is maintained by the BUILD team.
+
+``` yaml
+- command: mac.sign
+ params:
+ key_id: ${key_id}
+ secret: ${secret}
+ service_url: ${service_url}
+ client_binary: /local/path/to/client_binary
+ local_zip_file: /local/path/to/file_to_be_singed
+ output_zip_file: /local/path/to/output_file
+ artifact_type: binary
+ entitlements_file: /local/path/to/entitlements_file
+ verify: false
+ notarize: true
+ bundle_id: bundle_id_for_notarization
+ working_directory: /local/path/to/working_directory
+```
+
+Parameters:
+
+- `key_id`: the id of the key needs to be used for signing
+- `secret`: secret associated with the key
+- `service_url`: url of the signing and notarization service
+- `client_binary`: path to the client binary, if not given this value
+ is used - `/usr/local/bin/macnotary`
+- `local_zip_file`: path to the local zip file contains the list of
+ artifacts for signing
+- `output_zip_file`: local path to the file returned by service
+- `artifact_type`: type of the artifact. Either `binary` or `app`. If
+ not given `binary` is taken as a value
+- `entitlements_file`: path to the local entitlements file to be used
+ during signing. This can be omitted for default entitlements
+- `verify`: boolean param defines whether the signing/notarization
+ should be verified. Only supported on macOS. If not given or OS is
+ none mac OS, the `false` value will be taken
+- `notarize`: boolean param defines whether notarization should be
+ performed after signing. The default value is `false`
+- `bundle_id`: bundle id used during notarization. Must be given if
+ notarization requested
+- `build_variants`: list of buildvariants to run the command for, if
+ missing/empty will run for all
+- `working_directory`: local path to the working directory
+
+## manifest.load
+
+`manifest.load` updates the project's expansions with the manifest, if
+it exists.
+
+``` yaml
+- command: manifest.load
+```
+
+## perf.send
+
+This command sends performance test data, as either JSON or YAML, to
+Cedar. Note that if the tests do not contain artifacts, the AWS
+information is not necessary.
+
+``` yaml
+- command: perf.send
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+ bucket: mciuploads
+ prefix: perf_reports
+ file: cedar_report.json
+```
+
+Parameters:
+
+- `file`: the JSON or YAML file containing the test results, see
+ for more info.
+- `aws_key`: your AWS key (use expansions to keep this a secret)
+- `aws_secret`: your AWS secret (use expansions to keep this a secret)
+- `region`: AWS region of the bucket, defaults to us-east-1.
+- `bucket`: the S3 bucket to use.
+- `prefix`: prefix, if any, within the s3 bucket.
+
+## downstream_expansions.set
+
+downstream_expansions.set is used by parent patches to pass key-value
+pairs to child patches. The command takes the key-value pairs written in
+the file and makes them available to the child patches. Note: these
+parameters will be public and viewable on the patch page.
+
+``` yaml
+- command: downstream_expansions.set
+ params:
+ file: downstream_expansions.yaml
+```
+
+Parameters:
+
+- `file`: filename to read the expansions from
+
+## s3.get
+
+`s3.get` downloads a file from Amazon s3.
+
+``` yaml
+- command: s3.get
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+ remote_file: ${mongo_binaries}
+ bucket: mciuploads
+ local_file: src/mongo-binaries.tgz
+```
+
+Parameters:
+
+- `aws_key`: your AWS key (use expansions to keep this a secret)
+- `aws_secret`: your AWS secret (use expansions to keep this a secret)
+- `local_file`: the local file to save, do not use with `extract_to`
+- `extract_to`: the local directory to extract to, do not use with
+ `local_file`
+- `remote_file`: the S3 path to get the file from
+- `bucket`: the S3 bucket to use.
+- `build_variants`: list of buildvariants to run the command for, if
+ missing/empty will run for all
+
+## s3.put
+
+This command uploads a file to Amazon s3, for use in later tasks or
+distribution.
+
+``` yaml
+- command: s3.put
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+ local_file: src/mongodb-binaries.tgz
+ remote_file: mongodb-mongo-master/${build_variant}/${revision}/binaries/mongo-${build_id}.${ext|tgz}
+ bucket: mciuploads
+ permissions: public-read
+ content_type: ${content_type|application/x-gzip}
+ display_name: Binaries
+```
+
+Parameters:
+
+- `aws_key`: your AWS key (use expansions to keep this a secret)
+- `aws_secret`: your AWS secret (use expansions to keep this a secret)
+- `local_file`: the local file to post
+- `remote_file`: the S3 path to post the file to
+- `bucket`: the S3 bucket to use. Note: buckets created after Sept.
+ 30, 2020 containing dots (".") are not supported.
+- `permissions`: the permissions string to upload with
+- `content_type`: the MIME type of the file
+- `optional`: boolean to indicate if failure to find or upload this
+ file will result in a task failure. Not compatible with
+ local_files_include_filter.
+- `skip_existing`: boolean to indicate that files that already exist
+ in s3 should be skipped.
+- `display_name`: the display string for the file in the Evergreen UI
+- `local_files_include_filter`: used in place of local_file, an array
+ of gitignore file globs. All files that are matched - ones that
+ would be ignored by gitignore - are included in the put.
+- `local_files_include_filter_prefix`: an optional path to start
+ processing the LocalFilesIncludeFilter, relative to the working
+ directory.
+- `region`: AWS region for the bucket. We suggest us-east-1, since
+ that is where ec2 hosts are located. If you would like to override,
+ you can use this parameter.
+- `visibility`: one of "private", which allows logged-in users to
+ see the file; "public" (the default), which allows anyone to see
+ the file; "none", which hides the file from the UI for everybody;
+ or "signed", which creates a pre signed url, allowing logged-in
+ users to see the file (even if it's private on s3). Visibility:
+ signed should not be combined with permissions: public-read or
+ permissions: public-read-write.
+- `patchable`: defaults to true. If set to false, the command will
+ no-op for patches (i.e. continue without performing the s3 put).
+- `patch_only`: defaults to false. If set to true, the command will
+ no-op for non-patches (i.e. continue without performing the s3 put).
+
+## s3.put with multiple files
+
+Using the s3.put command in this uploads multiple files to an s3 bucket.
+
+``` yaml
+- command: s3.put
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+ local_files_include_filter:
+ - slow_tests/coverage/*.tgz
+ - fast_tests/coverage/*.tgz
+ remote_file: mongodb-mongo-master/test_coverage-
+ preserve_path: true
+ bucket: mciuploads
+ permissions: public-read
+ content_type: ${content_type|application/x-gzip}
+ display_name: coverage-
+```
+
+Each file is displayed in evergreen as the file's name prefixed with the
+`display_name` field. Each file is uploaded to a path made of the local
+file's name, in this case whatever matches the `*.tgz`, prefixed with
+what is set as the `remote_file` field (or, to preserve the original folder
+structure, use the `preserve_path` field). The filter uses the same
+specification as gitignore when matching files. In this way, all files
+that would be marked to be ignored in a gitignore containing the lines
+`slow_tests/coverage/*.tgz` and `fast_tests/coverage/*.tgz` are uploaded
+to the s3 bucket.
+
+## s3.push
+
+This command supports the task sync feature, which allows users to
+upload and download their task directory to and from Amazon S3. It must
+be enabled in the project settings before it can be used.
+
+This command uploads the task directory to S3. This can later be used in
+dependent tasks using the [s3.pull](#s3pull) command. There is only one
+latest copy of the task sync in S3 per task - if the task containing
+s3.push is restarted, it will replace the existing one.
+
+Users also have the option to inspect the task working directory after
+it has finished pushing (e.g. for debugging a failed task). This can be
+achieved by either pulling the task working directory from S3 onto a
+spawn host (from the UI) or their local machines (using [evergreen pull](../Using-the-Command-Line-Tool.md#pull)).
+
+The working directory is put in a private S3 bucket shared between all
+projects. Any other logged in user can pull and view the directory
+contents of an s3.push command once it has been uploaded.
+
+``` yaml
+- command: s3.push
+ params:
+ exclude: path/to/directory/to/ignore
+ max_retries: 50
+```
+
+Parameters:
+
+- `max_retries`: Optional. The maximum number of times it will attempt
+ to push a file to S3.
+- `exclude`: Optional. Specify files to exclude within the working
+ directory in [Google RE2
+ syntax](https://github.com/google/re2/wiki/Syntax).
+
+## s3.pull
+
+This command helps support the task sync feature, which allows users to
+upload and download their task directory to and from Amazon S3. It must
+be enabled in the project settings before it can be used.
+
+This command downloads the task directory from S3 that was uploaded by
+[s3.push](#s3push). It can only be used in a task which depends on a
+task that runs s3.push first and must explicitly specify the dependency
+using `depends_on`.
+
+``` yaml
+- command: s3.pull
+ params:
+ task: my_s3_push_task
+ from_build_variant: some_other_build_variant
+ working_directory: path/to/working/directory
+ delete_on_sync: false
+ exclude: path/to/directory/to/ignore
+ max_retries: 50
+```
+
+Parameters:
+
+- `working_directory`: Required. Specify the location where the task
+ directory should be pulled to.
+- `task`: Required. The name of the task to be pulled from. Does not
+ accept expansions.
+- `from_build_variant`: Optional. Specify the build variant to pull
+ from. If none is provided, it defaults to the build variant on which
+ s3.pull runs. Does not accept expansions.
+- `delete_on_sync`: Optional. If set, anything already in the working
+ directory that is not in the remote task sync directory will be
+ deleted. Defaults to false.
+- `exclude`: Optional. Specify files to exclude from the synced task
+ directory in [Google RE2
+ syntax](https://github.com/google/re2/wiki/Syntax).
+- `max_retries`: Optional. The maximum number of times it will attempt
+ to pull a file from S3.
+
+## s3Copy.copy
+
+`s3Copy.copy` copies files from one s3 location to another
+
+``` yaml
+- command: s3Copy.copy
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+ s3_copy_files:
+ - {'optional': true, 'source': {'path': '${push_path}-STAGE/${push_name}/mongodb-${push_name}-${push_arch}-${suffix}-${task_id}.${ext|tgz}', 'bucket': 'build-push-testing'},
+ 'destination': {'path': '${push_path}/mongodb-${push_name}-${push_arch}-${suffix}.${ext|tgz}', 'bucket': '${push_bucket}'}}
+```
+
+Parameters:
+
+- `aws_key`: your AWS key (use expansions to keep this a secret)
+- `aws_secret`: your AWS secret (use expansions to keep this a secret)
+- `s3_copy_files`: a map of `source` (`bucket` and `path`),
+ `destination`, `build_variants` (a list of strings), `display_name`,
+ and `optional` (suppresses errors). Note: destination buckets
+ created after Sept. 30, 2020 containing dots (".") are not
+ supported.
+
+## shell.exec
+
+This command runs a shell script.
+
+``` yaml
+- command: shell.exec
+ params:
+ working_dir: src
+ script: |
+ echo "this is a 2nd command in the function!"
+ ls
+```
+
+Parameters:
+
+- `script`: the script to run
+- `working_dir`: the directory to execute the shell script in
+- `env`: a map of environment variables and their values. In case of
+ conflicting environment variables defined by `add_expansions_to_env` or
+ `include_expansions_in_env`, this has the lowest priority. Unless
+ overridden, the following environment variables will be set by default:
+ - "CI" will be set to "true".
+ - "GOCACHE" will be set to `${workdir}/.gocache`.
+ - "EVR_TASK_ID" will be set to the running task's ID.
+ - "TMP", "TMPDIR", and "TEMP" will be set to `${workdir}/tmp`.
+- `add_expansions_to_env`: when true, add all expansions to the
+ command's environment. In case of conflicting environment variables
+ defined by `env` or `include_expansions_in_env`, this has higher
+ priority than `env` and lower priority than `include_expansions_in_env`.
+- `include_expansions_in_env`: specify one or more expansions to
+ include in the environment. If you specify an expansion that does
+ not exist, it is ignored. In case of conflicting environment
+ variables defined by `env` or `add_expansions_to_env`, this has
+ highest priority.
+- `background`: if set to true, the script runs in the background
+ instead of the foreground. `shell.exec` starts the script but
+ does not wait for the script to exit before running the next command.
+ If the background script exits with an error while the
+ task is still running, the task will continue running.
+- `silent`: if set to true, does not log any shell output during
+ execution; useful to avoid leaking sensitive info
+- `continue_on_err`: by default, a task will fail if the script returns
+ a non-zero exit code; for scripts that set `background`, the task will
+ fail only if the script fails to start. If `continue_on_err`
+ is true and the script fails, it will be ignored and task
+ execution will continue.
+- `system_log`: if set to true, the script's output will be written to
+ the task's system logs, instead of inline with logs from the test
+ execution.
+- `shell`: shell to use. Defaults to sh if not set. Note that this is
+ usually bash but is dash on Debian, so it's good to explicitly pass
+ this parameter
+- `ignore_standard_out`: if true, discards output sent to stdout
+- `ignore_standard_error`: if true, discards output sent to stderr
+- `redirect_standard_error_to_output`: if true, sends stderr to
+ stdout. Can be used to synchronize these 2 streams
+- `exec_as_string`: if true, executes as "sh -c 'your script
+ here'". By default, shell.exec runs sh then pipes your script to
+ its stdin. Use this parameter if your script will be doing something
+ that may change stdin, such as sshing
+
+## subprocess.exec
+
+The subprocess.exec command executes a binary file. On a Unix-like OS,
+you can also run a `#!` script as if it were a binary. To
+get similar behavior on Windows, try `bash.exe -c
+yourScript.sh`.
+
+``` yaml
+- command: subprocess.exec
+ params:
+ working_dir: "src"
+ env:
+ FOO: bar
+ BAZ: qux
+ binary: "command"
+ args:
+ - "arg1"
+ - "arg2"
+```
+
+Parameters:
+
+- `binary`: a binary to run
+- `args`: a list of arguments to the binary
+- `env`: a map of environment variables and their values. In case of
+ conflicting environment variables defined by `add_expansions_to_env` or
+ `include_expansions_in_env`, this has the lowest priority. Unless
+ overridden, the following environment variables will be set by default:
+ - "CI" will be set to "true".
+ - "GOCACHE" will be set to `${workdir}/.gocache`.
+ - "EVR_TASK_ID" will be set to the running task's ID.
+ - "TMP", "TMPDIR", and "TEMP" will be set to `${workdir}/tmp`.
+- `command`: a command string (cannot use with `binary` or `args`),
+ split on spaces for use as arguments\--note that expansions will
+ *not* be split on spaces; each expansion represents its own
+ argument.
+- `background`: if set to true, the process runs in the background
+ instead of the foreground. `subprocess.exec` starts the process but
+ does not wait for the process to exit before running the next command.
+ If the background process exits with an error while the
+ task is still running, the task will continue running.
+- `silent`: do not log output of command
+- `system_log`: write output to system logs instead of task logs
+- `working_dir`: working directory to start shell in
+- `ignore_standard_out`: if true, do not log standard output
+- `ignore_standard_error`: if true, do not log standard error
+- `redirect_standard_error_to_output`: if true, redirect standard
+ error to standard output
+- `continue_on_err`: by default, a task will fail if the command returns
+ a non-zero exit code; for command that set `background`, the task will
+ fail only if the command fails to start. If `continue_on_err`
+ is true and the command fails, it will be ignored and task
+ execution will continue.
+- `add_expansions_to_env`: when true, add all expansions to the
+ command's environment. In case of conflicting environment variables
+ defined by `env` or `include_expansions_in_env`, this has higher
+ priority than `env` and lower priority than `include_expansions_in_env`.
+- `include_expansions_in_env`: specify one or more expansions to
+ include in the environment. If you specify an expansion that does
+ not exist, it is ignored. In case of conflicting environment variables
+ defined by `env` or `add_expansions_to_env`, this has highest
+ priority.
+- `add_to_path`: specify one or more paths which are prepended to the
+ `PATH` environment variable.
+
+## timeout.update
+
+This command sets `exec_timeout_secs` or `timeout_secs` of a task from
+within that task.
+
+``` yaml
+- command: timeout.update
+ params:
+ exec_timeout_secs: ${my_exec_timeout_secs}
+ timeout_secs: ${my_timeout_secs}
+```
+
+Parameters:
+
+- `exec_timeout_secs`: set `exec_timeout_secs` for the task, which is
+ the maximum amount of time the task may run. May be int, string, or
+ expansion
+- `timeout_secs`: set `timeout_secs` for the task, which is the
+ maximum amount of time that can elapse without any output on stdout.
+ May be int, string, or expansion
+
+Both parameters are optional. If not set, the task will use the
+definition from the project config.
+
+Commands can also be configured to run if timeout occurs, as documented [here](Project-Configuration-Files.md#pre-post-and-timeout).
diff --git a/docs/Configure-a-Project/Project-Configuration-Files.md b/docs/Configure-a-Project/Project-Configuration-Files.md
new file mode 100644
index 00000000000..3c90b017cd3
--- /dev/null
+++ b/docs/Configure-a-Project/Project-Configuration-Files.md
@@ -0,0 +1,1556 @@
+# Set Up a Project Configuration File
+Project configurations are how you tell Evergreen what to do. They
+contain a set of tasks and variants to run those tasks on, and are
+stored within the repository they test. Project files are written in a
+simple YAML config language.
+
+## Examples
+
+Before reading onward, you should check out some example project files:
+
+1. [Sample tutorial project file](https://github.com/evergreen-ci/sample.git)
+2. [Evergreen's own project file](https://github.com/evergreen-ci/evergreen/blob/master/self-tests.yml)
+3. [The MongoDB Tools project file](https://github.com/mongodb/mongo-tools/blob/master/common.yml)
+4. [The MongoDB Server project file](https://github.com/mongodb/mongo/blob/master/etc/evergreen.yml)
+
+Though some of them are quite large, the pieces that make them up are
+very simple.
+
+## Basic Features
+
+### Tasks
+
+A task is any discrete job you want Evergreen to run, typically a build,
+test suite, or deployment of some kind. They are the smallest unit of
+parallelization within Evergreen. Each task is made up of a list of
+commands/functions. Currently we include commands for interacting with
+git, running shell scripts, parsing test results, and manipulating
+Amazon s3.
+
+For example, a couple of tasks might look like:
+
+``` yaml
+tasks:
+- name: compile
+ commands:
+ - command: git.get_project
+ params:
+ directory: src
+ - func: "compile and upload to s3"
+- name: passing_test
+ run_on: my_other_distro
+ depends_on:
+ - name: compile
+ commands:
+ - func: "download compiled artifacts"
+ - func: "run a task that passes"
+```
+
+Notice that tasks contain:
+
+1. A name
+2. A set of dependencies on other tasks
+3. A distro or list of distros to run on (documented more under
+ ["Build
+ Variants"](#build-variants)).
+ If run_on is set at the task level, it takes precedent over the
+ default set for the buildvariant (unless run_on is explicitly
+ defined for this task under a specific build variant).
+4. A list of commands and/or functions that tell Evergreen how to run
+ it.
+
+Another useful feature is [task tags](#task-and-variant-tags),
+which allows grouping tasks to limit whether [those tasks should run on
+patches/git
+tags/etc.](#limiting-when-a-task-will-run)
+
+#### Commands
+
+Commands are the building blocks of tasks. They do things like clone a
+project, download artifacts, and execute arbitrary shell scripts. Each
+command has a set of parameters that it can take. A full list of
+commands and their parameters is accessible [here](Project-Commands).
+
+#### Functions
+
+Functions are a simple way to group a set of commands together for
+reuse. They are defined within the file as
+
+``` yaml
+functions:
+ "function name":
+ - command: "command.name"
+ - command: "command.name2"
+ ## ...and so on
+
+
+ ## a real example from Evergreen's tests:
+ "start mongod":
+ - command: shell.exec
+ params:
+ background: true
+ script: |
+ set -o verbose
+ cd mongodb
+ echo "starting mongod..."
+ ./mongod${extension} --dbpath ./db_files &
+ echo "waiting for mongod to start up"
+ - command: shell.exec
+ params:
+ script: |
+ cd mongodb
+ ./mongo${extension} --nodb --eval 'assert.soon(function(x){try{var d = new Mongo("localhost:27017"); return true}catch(e){return false}}, "timed out connecting")'
+ echo "mongod is up."
+```
+
+and they are referenced within a task definition by
+
+``` yaml
+- name: taskName
+ commands:
+ - func: "run tests"
+ - func: "example with multiple args"
+
+
+ - func: "run tests" ## real example from the MongoDB server
+ vars:
+ resmoke_args: --help
+ run_multiple_jobs: false
+ - func: "example with multiple args"
+ vars:
+ resmoke_args: >- ## syntax needed to allow multiple arguments.
+ --hello=world
+ --its=me
+
+```
+
+Notice that the function reference can define a set of `vars` which are
+treated as expansions within the configuration of the commands in the
+function.
+
+A function cannot be called within another function. However, it is still
+possible to reuse commands using YAML aliases and anchors. For example:
+
+```yaml
+variables:
+ - &download_something
+ command: shell.exec
+ params:
+ script: |
+ curl -LO https://example.com/something
+ - &download_something_else
+ command: shell.exec
+ params:
+ script: |
+ curl -LO https://example.com/something-else
+
+tasks:
+ - name: my-first-task
+ commands:
+ - *download_something
+ - name: my-second-task
+ commands:
+ - *download_something
+ - *download_something_else
+```
+
+### Tests
+
+As you've read above, a task is a single unit of work in Evergreen. A
+task may contain any number of logical tests. A test has a name, status,
+time taken, and associated logs, and each test displays in a table in
+the Evergreen UI. If your task runs tests, note that Evergreen does not
+automatically parse the results of the tests to display in the UI - you
+have to do a bit more configuration to tell it how to parse/attach the
+results.
+
+In order to tell Evergreen how to handle tests, you'll need to add a
+command at the end of your task which attaches test results. The Project
+Commands section of this wiki has a list of the commands available, each
+supporting a different format, with specific ones to accommodate common
+formats. For example, if your task runs some golang tests, adding the
+following command at the end of your task will parse and attach those
+test results:
+
+``` yaml
+- command: gotest.parse_files
+ type: system
+ params:
+ files:
+ - "gopath/src/github.com/evergreen-ci/evergreen/bin/output.*"
+```
+
+If you specify one of these commands and there are no results to attach,
+the command will no-op by default. If you'd like the task to instead
+fail in this scenario, you can specify `must_have_test_results: true` in
+your task
+
+### Build Variants
+
+Build variants are a set of tasks run on a given platform. Each build
+variant has control over which tasks it runs, what distro it runs on,
+and what expansions it uses.
+
+``` yaml
+buildvariants:
+- name: osx-108
+ display_name: OSX
+ run_on:
+ - localtestdistro
+ expansions:
+ test_flags: "blah blah"
+ tasks:
+ - name: compile
+ - name: passing_test
+ - name: failing_test
+ - name: timeout_test
+- name: ubuntu
+ display_name: Ubuntu
+ batchtime: 60
+ patch_only: true
+ run_on:
+ - ubuntu1404-test
+ expansions:
+ test_flags: "blah blah"
+ tasks:
+ - name: compile
+ - name: passing_test
+ depends_on:
+ - name: compile
+ - name: passing_test
+ variant: osx-108
+ exec_timeout_secs: 20
+ priority: 10
+ batchtime: 20 // overrides build variant batchtime of 60
+ - name: failing_test
+ activate: false
+ tags: ["special"]
+ - name: timeout_test
+ cron: @daily
+ patchable: false
+ - name: git_tag_release
+ git_tag_only: true
+ - name: inline_task_group_1
+ task_group:
+ <<: *example_task_group
+ tasks:
+ - example_task_1
+ - name: inline_task_group_2
+ task_group:
+ share_processes: true
+ max_hosts: 3
+ teardown_group:
+ - command: attach.results
+ tasks:
+ - example_task_2
+ - example_task_3
+```
+
+Fields:
+
+- `name`: an identification string for the variant
+- `display_name`: how the variant is displayed in the Evergreen UI
+- `run_on`: a list of acceptable distros to run tasks for that variant
+ a. The first distro in the list is the primary distro. The others
+ are secondary distros. Each distro has a primary queue, a queue of
+ all tasks that have specified it as their primary distro; and a
+ secondary queue, a queue of tasks that have specified it as a
+ secondary distro. If the primary queue is not empty, the distro will
+ process that queue and ignore the secondary queue. If the primary
+ queue is empty, the distro will process the secondary queue. If both
+ queues are empty, idle hosts will eventually be terminated.
+- `expansions`: a set of key-value expansion pairs
+- `tasks`: a list of tasks to run, using `name`. This can also include
+ batchtime/cron/activate (defined below), which will overwrite all
+ other defaults. We can also [define when a task will
+ run](#limiting-when-a-task-will-run)
+ under this list or [add dependencies](#task-dependencies), also demonstrated in the example above.
+- `batchtime`: interval of time in minutes that Evergreen should wait
+ before activating this variant. The default is set on the project
+ settings page. This can also be set for individual tasks. Only applies to tasks from mainline commits.
+- `activate`: by default, we'll activate if the whole version is
+ being activated or if batchtime specifies it should be activated. If
+ we instead want to activate immediately, then set activate to true.
+ If this should only activate when manually scheduled or by
+ stepback/dependencies, set activate to false.
+- `cron`: define with [cron syntax](https://crontab.guru/) (i.e. Min \| Hour \| DayOfMonth \|
+ Month \| DayOfWeekOptional) when (in UTC) a variant should be activated
+ (Cannot be combined with batchtime). This also accepts descriptors
+ such as `@daily` (reference
+ [cron](https://godoc.org/github.com/robfig/cron) for more example),
+ but does not accept intervals. (i.e.
+ `@every `). Only applies to tasks from mainline commits.
+- `task_group`: a [task
+ group](#task-groups)
+ may be defined directly inline or using YAML aliases on a build
+ variant task. This is an alternative to referencing a task group
+ defined in `task_groups` under the tasks of a given build variant.
+- `tags`: optional list of tags to group the build variant for alias definitions (explained [here](#task-and-variant-tags))
+- Build variants support [all options that limit when a task will run](#limiting-when-a-task-will-run). If set for the
+ build variant, it will apply to all tasks under the build variant.
+
+Additionally, an item in the `tasks` list can be of the form
+
+``` yaml
+tasks:
+- name: compile
+ run_on:
+ - ubuntu1404-build
+```
+
+allowing tasks within a build variant to be run on different distros.
+This is useful for optimizing tasks like compilations, that can benefit
+from larger, more powerful machines.
+
+### Version Controlled Project Settings
+Project configurations can version control some select project settings (e.g. aliases, plugins) directly within the yaml
+rather than on the project page UI, for better accessibility and maintainability. Read more
+[here](Project-and-Distro-Settings.md#version-control).
+
+## Advanced Features
+
+These features will help you do more complicated workloads with
+Evergreen.
+
+### Include
+
+Configuration files listed in `include` will be merged with the main
+project configuration file. All top-level configuration files can define
+includes. This will accept a list of filenames and module names. If the
+include isn't given, we will only use the main project configuration
+file.
+
+Note: included files do not support [version-controlled project settings configuration](Project-and-Distro-Settings.md#version-control)
+
+``` yaml
+include:
+ - filename: other.yml
+ - filename: small.yml ## path to file inside the module's repo
+ module: module_name
+```
+
+Warning: YAML anchors currently not supported
+
+#### Merging Rules
+
+We will maintain the following merge rules:
+
+- Lists where order doesn't matter can be defined across different
+ yamls, but there cannot be duplicate keys within the merged lists
+ (i.e. "naming conflicts"); this maintains our existing validation.
+ Examples: tasks and task group names, parameter keys, module names,
+ function names.
+- Unordered lists that don't need to consider naming conflicts.
+ Examples: ignore and loggers.
+- Lists where order does matter cannot be defined for more than one
+ yaml. Examples: pre, post, timeout, early termination.
+- Non-list values cannot be defined for more than one yaml. Examples:
+ stepback, batchtime, pre error fails task, OOM tracker, display
+ name, command type, and callback/exec timeout.
+- It is illegal to define a build variant multiple times except to add
+ additional tasks to it. That is, a build variant should only be
+ defined once, but other files can include this build variant's
+ definition in order to add more tasks to it. This is also how we
+ merge generated variants.
+- Matrix definitions or axes cannot be defined for more than one yaml.
+
+#### Validating changes to config files
+
+When editing yaml project files, you can verify that the file will work
+correctly after committing by checking it with the "validate" command.
+To validate local changes within modules, use the `local_modules` flag
+to list out module name and path pairs.
+
+Note: Must include a local path for includes that use a module.
+
+``` evergreen validate -lm = ```
+
+The validation step will check for:
+
+- valid yaml syntax
+- correct names for all commands used in the file
+- logical errors, like duplicated variant or task names
+- invalid sets of parameters to commands
+- warning conditions such as referencing a distro pool that does
+ not exist
+- merging errors from include files
+
+### Modules
+
+For patches that run tests based off of changes across multiple
+projects, the modules field may be defined to specify other git projects
+with configurations specifying the way that changes across them are
+applied within the patch at runtime. If configured correctly, the left
+hand side of the Spruce UI under "Version Manifest" will contain
+details on how the modules were parsed from YAML and which git revisions
+are being used.
+
+For manual patches and GitHub PRs, by default, the git revisions in the
+version manifest will be inherited from its base version. You can change
+the git revision for modules by setting a module manually with
+[evergreen set-module](../Using-the-Command-Line-Tool.md#operating-on-existing-patches) or
+by specifying the `auto_update` option (as described below) to use the
+latest revision available for a module.
+
+``` yaml
+modules:
+- name: evergreen
+ repo: https://github.com/deafgoat/mci_test.git
+ prefix: src/mongo/db/modules
+ branch: master
+- name: sandbox
+ repo: https://github.com/deafgoat/sandbox.git
+ branch: main
+ ref:
+- name: mci
+ repo: https://github.com/deafgoat/mci.git
+ branch: main
+ auto_update: true
+```
+
+Fields:
+
+- `name`: alias to refer to the module
+- `branch`: the branch of the module to use in the project
+- `repo`: the git repository of the module
+- `prefix`: the path prefix to use for the module
+- `ref`: the git commit hash to use for the module in the project (if
+ not specified, defaults to the latest revision that existed at the
+ time of the Evergreen version creation)
+- `auto_update`: if true, the latest revision for the module will be
+ dynamically retrieved for each Github PR and CLI patch submission
+
+### Pre, Post, and Timeout
+
+All projects can have a `pre` and `post` field which define a list of
+command to run at the start and end of every task that isn't in a task
+group. For task groups, setup_task and teardown_task will run instead.
+These are incredibly useful as a place for results commands or for
+cleanup and setup tasks.
+
+**NOTE:** failures in `pre` and `post` commands will be ignored by
+default, so only use commands you know will succeed. See
+`pre_error_fails_task` and `post_error_fails_task` below. By default,
+commands in pre and post will time out after 15 minutes. You can
+override this timeout by setting `callback_timeout_secs` at the root
+level of the yaml config.
+
+``` yaml
+pre:
+ - command: shell.exec
+ params:
+ working_dir: src
+ script: |
+ ## do setup
+
+post:
+ - command: attach.results
+ params:
+ file_location: src/report.json
+```
+
+Additionally, project configs offer a hook for running command when a
+task times out, allowing you to automatically run a debug script when
+something is stuck.
+
+``` yaml
+timeout:
+ - command: shell.exec
+ params:
+ working_dir: src
+ script: |
+ echo "Calling the hang analyzer..."
+ python buildscripts/hang_analyzer.py
+```
+
+You can customize the points at which the "timeout" conditions are
+triggered. To cause a task to stop (and fail) if it doesn't complete
+within an allotted time, set the key `exec_timeout_secs` on the project
+or task to the maximum allowed length of execution time. This timeout
+defaults to 6 hours. `exec_timeout_secs` can only be set on the project
+or on a task. It cannot be set on functions.
+
+You can also set exec_timeout_secs using [timeout.update](Project-Commands.md#timeoutupdate).
+
+You may also force a specific command to trigger a failure if it does
+not appear to generate any output on `stdout`/`stderr` for more than a
+certain threshold, using the `timeout_secs` setting on the command. As
+long as the command does not appear to be idle it will be allowed to
+continue, but if it does not write any output for longer than
+`timeout_secs` then the timeout handler will be triggered. This timeout
+defaults to 2 hours.
+
+Example:
+
+``` yaml
+exec_timeout_secs: 60 ## automatically fail any task if it takes longer than a minute to finish.
+buildvariants:
+- name: osx-108
+ display_name: OSX
+ run_on:
+ - localtestdistro
+ tasks:
+ - name: compile
+
+tasks:
+ name: compile
+ commands:
+ - command: shell.exec
+ timeout_secs: 10 ## force this command to fail if it stays "idle" for 10 seconds or more
+ params:
+ script: |
+ sleep 1000
+```
+
+By default, a command failing during the `pre` step will not cause the
+entire task to fail. If you want to enforce that failures during `pre`
+cause the task to fail, set the field `pre_error_fails_task` to true.
+Likewise, setting the field `post_error_fails_task` to true will enforce
+that failures in `post` cause the task to fail.
+
+``` yaml
+exec_timeout_secs: 60
+pre_error_fails_task: true
+pre:
+ - ...
+```
+
+### Early Host Termination
+
+You can specify commands to be run in case that the host needs to be
+unexpectedly terminated. Currently, these commands are only called when
+AWS informs evergreen that a specific spot instance will be reclaimed.
+Commands specified here are not guaranteed to be run, and should
+complete well under 2 minutes.
+
+``` yaml
+early_termination:
+- command: shell.exec
+ params:
+ script: "echo 'spot instance is being taken away'"
+```
+
+### Limiting When a Task Will Run
+
+To limit the conditions when a task will run, the following settings can be
+added to a task definition, to a build variant definition, or to a specific task
+listed under a build variant (so that it will only affect that variant's task).
+
+To cause a task to only run in commit builds, set `patchable: false`.
+
+To cause a task to only run in patches, set `patch_only: true`.
+
+To cause a task to only run in versions NOT triggered from git tags, set
+`allow_for_git_tag: false`.
+
+To cause a task to only run in versions triggered from git tags, set
+`git_tag_only: true`.
+
+To cause a task to not run at all, set `disable: true`.
+
+- This behaves similarly to commenting out the task but will not
+ trigger any validation errors.
+- If a task is disabled and is depended on by another task, the
+ dependent task will simply exclude the disabled task from its
+ dependencies.
+
+Can also set batchtime or cron on tasks or build variants, detailed
+[here](#build-variants).
+
+If there are conflicting settings defined at different levels, the order of
+priority (from highest to lowest) is:
+
+- Tasks listed under a build variant.
+- The task definition.
+- The build variant definition.
+
+For example, if we have this configuration:
+```yaml
+buildvariants:
+- name: some-build-variant
+ patchable: false
+ tasks:
+ - name: unpatchable-task
+ - name: patchable-task
+ patchable: true
+```
+In this case, `unpatchable-task` cannot run in patches, but `patchable-task`
+can.
+
+### Expansions
+
+Expansions are variables within your config file. They take the form
+`${key_name}` within your project, and are defined on a project-wide
+level on the project configuration page or on a build variant level
+within the project. They can be used **as inputs to commands**,
+including shell scripts.
+
+``` yaml
+command: s3.get
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+```
+
+Expansions can also take default arguments, in the form of
+`${key_name|default}`.
+
+``` yaml
+command: shell.exec
+ params:
+ working_dir: src
+ script: |
+ if [ ${has_pyyaml_installed|false} = false ]; then
+ ...
+```
+
+Likewise, the default argument of an expansion can be an expansion
+itself. Prepending an asterisk to the default value will lookup the
+expansion value of the default value, rather than the hard coded string.
+
+``` yaml
+command: shell.exec
+ params:
+ script: |
+ VERSION=${use_version|*use_version_default} ./foo.sh
+```
+
+If an expansion is used in your project file, but is unset, it will be
+replaced with its default value. If there is no default value, the empty
+string will be used. If the default value is prepended with an asterisk
+and that expansion also does not exist, the empty string will also be
+used.
+
+#### Usage
+
+Expansions can be used as input to any yaml command field that expects a
+string. The flip-side of this is that expansions are not currently
+supported for fields that expect boolean or integer inputs, including
+`timeout_secs`.
+
+If you find **a command** that does not accept string expansions, please
+file a ticket or issues. That's a bug.
+
+#### Default Expansions
+
+Every task has some expansions available by default:
+
+- `${is_patch}` is "true" if the running task is in a patch build and
+ undefined if it is not.
+- `${is_stepback}` is "true" if the running task was stepped back.
+- `${author}` is the patch author's username for patch tasks or the
+ git commit author for git tasks
+- `${author_email}` is the patch or the git commit authors email
+- `${task_id}` is the task's unique id
+- `${task_name}` is the name of the task
+- `${execution}` is the execution number of the task (how many times
+ it has been reset)
+- `${build_id}` is the id of the build the task belongs to
+- `${build_variant}` is the name of the build variant the task belongs
+ to
+- `${version_id}` is the id of the task's version
+- `${workdir}` is the task's working directory
+- `${revision}` is the commit hash of the base commit of a patch or of
+ the commit for a mainline build
+- `${github_commit}` is the commit hash of the commit that triggered
+ the patch run
+- `${project}` is the project identifier the task belongs to
+- `${project_identifier}` is the project identifier the task belongs
+ to // we will be deprecating this, please use `${project}`
+- `${project_id}` is the project ID the task belongs to (note that for
+ later projects, this is the unique hash, whereas for earlier
+ projects this is the same as `${project}`. If you aren't sure which
+ you are, you can check using this API route:
+ `https://evergreen.mongodb.com/rest/v2/`)
+- `${branch_name}` is the name of the branch being tested by the
+ project
+- `${distro_id}` is name of the distro the task is running on
+- `${created_at}` is the time the version was created
+- `${revision_order_id}` is Evergreen's internal revision order
+ number, which increments on each commit, and includes the patch
+ author name in patches
+- `${github_pr_number}` is the Github PR number associated with PR
+ patches and PR triggered commit queue items
+- `${github_org}` is the GitHub organization for the repo in which
+ a PR or PR triggered commit queue item appears
+- `${github_repo}` is the GitHub repo in which a PR or PR triggered
+ commit queue item appears
+- `${github_author}` is the GitHub username of the creator of a PR
+ or PR triggered commit queue item
+- `${triggered_by_git_tag}` is the name of the tag that triggered this
+ version, if applicable
+- `${is_commit_queue}` is the string "true" if this is a commit
+ queue task
+- `${commit_message}` is the commit message if this is a commit queue
+ task
+- `${requester}` is what triggered the task: patch, `github_pr`,
+ `github_tag`, `commit`, `trigger`, `commit_queue`, or `ad_hoc`
+
+The following expansions are available if a task was triggered by an
+inter-project dependency:
+
+- `${trigger_event_identifier}` is the ID of the task or build that
+ initiated this trigger
+- `${trigger_event_type}` will be "task" or "build," identifying
+ what type of ID `${trigger_event_identifier}` is
+- `${trigger_status}` is the task or build status of whatever
+ initiated this trigger
+- `${trigger_revision}` is the githash of whatever commit initiated
+ this trigger
+- `${trigger_repo_owner}` is Github repo owner for the project that
+ initiated this trigger
+- `${trigger_repo_name}` is Github repo name for the project that
+ initiated this trigger
+- `${trigger_branch}` is git branch for the project that initiated
+ this trigger
+
+The following expansions are available if a task has modules:
+
+`` represents the name defined in the project yaml for a
+given module
+
+- `${_rev}` is the revision of the evergreen module
+ associated with this task
+- `${_branch}` is the branch of the evergreen module
+ associated with this task
+- `${_repo}` is the Github repo for the evergreen module
+ associated with this task
+- `${_owner}` is the Github repo owner for the evergreen
+ module associated with this task
+
+### Task and Variant Tags
+
+Most projects have some implicit grouping at every layer. Some tests are
+integration tests, others unit tests; features can be related even if
+their tests are stored in different places. Evergreen provides an
+interface for manipulating tasks using this kind of reasoning through
+*tag selectors.*
+
+Tags are defined as an array as part of a task or variant definition. Tags should
+be self-explanatory and human-readable. Variant tags are used for grouping alias definitions.
+
+``` yaml
+tasks:
+ ## this task is an integration test of backend systems; it requires a running database
+- name: db
+ tags: ["integration", "backend", "db_required"]
+ commands:
+ - func: "do test"
+
+ ## this task is an integration test of frontend systems using javascript
+- name: web_admin_page
+ tags: ["integration", "frontend", "js"]
+ commands:
+ - func: "do test"
+
+ ## this task is an integration test of frontend systems using javascript
+- name: web_user_settings
+ tags: ["integration", "frontend", "js"]
+ commands:
+ - func: "do test"
+
+buildvariants:
+ ## this variant has a tag to be used for alias definitions
+- name: my_variant
+ tags: ["pr_testing"]
+```
+
+Tags can be referenced in variant definitions to quickly include groups
+of tasks.
+
+``` yaml
+buildvariants:
+ ## this project only does browser tests on OSX
+- name: osx
+ display_name: OSX
+ run_on:
+ - osx-distro
+ tasks:
+ - name: ".frontend"
+ run_on:
+ - osx-distro-test
+ - name: ".js"
+
+ ## this variant does everything
+- name: ubuntu
+ display_name: Ubuntu
+ run_on:
+ - ubuntu-1440
+ tasks:
+ - name: "*"
+
+ ## this experimental variant runs on a tiny computer and can't use a database or run browser tests
+- name: ubuntu_pi
+ display_name: Ubuntu Raspberry Pi
+ run_on:
+ - ubuntu-1440
+ tasks:
+ - name: "!.db_required !.frontend"
+```
+
+Tags can also be referenced in dependency definitions.
+
+``` yaml
+tasks:
+ ## this project only does long-running performance tests on builds with passing unit tests
+- name: performance
+ depends_on:
+ - ".unit"
+ commands:
+ - func: "do test"
+
+ ## this task runs once performance and integration tests finish, regardless of the result
+- name: publish_binaries
+ depends_on:
+ - name: performance
+ status: *
+ - name: ".integration"
+ status: *
+```
+
+Tag selectors are used to define complex select groups of tasks based on
+user-defined tags. Selection syntax is currently defined as a
+whitespace-delimited set of criteria, where each criterion is a
+different name or tag with optional modifiers. Formally, we define the
+syntax as:
+
+ Selector := [whitespace-delimited list of Criterion]
+ Criterion := (optional ! rune)(optional . rune) or "*" // where "!" specifies a negation of the criteria and "." specifies a tag as opposed to a name
+ Name := // excluding whitespace, '.', and '!'
+
+Selectors return all items that satisfy all of the criteria. That is,
+they return the *set intersection* of each individual criterion.
+
+For Example:
+
+- `red` would return the item named "red"
+- `.primary` would return all items with the tag "primary"
+- `!.primary` would return all items that are NOT tagged "primary"
+- `.cool !blue` would return all items that are tagged "cool" and
+ NOT named "blue"
+- `.cool !.primary` would return all items that are tagged "cool" and
+ NOT tagged "primary"
+- `*` would return all items
+
+### Display Tasks
+
+Evergreen provides a way of grouping tasks into a single logical unit
+called a display task. These units are displayed in the UI as a single
+task. Only display tasks, not their execution tasks, are available to
+schedule patches against. Individual tasks in a display task are visible
+on the task page. Display task pages do not include any logs, though
+execution tasks' test results render on the display task's page. Users
+can restart the entire display task or only its failed execution tasks, but not individual execution
+tasks.
+
+To create a display task, list its name and its execution tasks in a
+`display_tasks` array in the variant definition. The execution tasks
+must be present in the `tasks` array.
+
+``` yaml
+- name: lint-variant
+ display_name: Lint
+ run_on:
+ - archlinux
+ tasks:
+ - name: ".lint"
+ display_tasks:
+ - name: lint
+ execution_tasks:
+ - ".lint"
+```
+
+### Stepback
+
+Stepback is set to true if you want to stepback and test earlier commits
+in the case of a failing task. This can be set or unset at the
+top-level, at the build variant level, and for individual tasks (in the task definition or for the
+task within a specific build variant).
+
+### OOM Tracker
+
+This is set to true at the top level if you'd like to enable the OOM Tracker for your project.
+
+### Matrix Variant Definition
+
+The matrix syntax is deprecated in favor of the
+[generate.tasks](Project-Commands.md#generate-tasks)
+command. **Evergreen is unlikely to do further development on matrix
+variant definitions.** The documentation is here for completeness, but
+please do not add new matrix variant definitions. It is typically
+incorrect to test a matrix, as a subset of the tasks is usually
+sufficient, e.g., all tasks one one variant, and a small subset of tasks
+on other variants.
+
+Evergreen provides a format for defining a wide range of variants based
+on a combination of matrix axes. This is similar to configuration
+definitions in systems like Jenkins and Travis.
+
+Take, for example, a case where a program may want to test on
+combinations of operating system, python version, and compile flags. We
+could build a matrix like:
+
+``` yaml
+## This is a simple matrix definition for a fake MongoDB python driver, "Mongython".
+## We have several test suites (not defined in this example) we would like to run
+## on combinations of operating system, python interpreter, and the inclusion of
+## python C extensions.
+
+axes:
+ ## we test our fake python driver on Linux and Windows
+- id: os
+ display_name: "OS"
+ values:
+
+ - id: linux
+ display_name: "Linux"
+ run_on: centos6-perf
+
+ - id: windows
+ display_name: "Windows 95"
+ run_on: windows95-test
+
+ ## we run our tests against python 2.6 and 3.0, along with
+ ## external implementations pypy and jython
+- id: python
+ display_name: "Python Implementation"
+ values:
+
+ - id: "python26"
+ display_name: "2.6"
+ variables:
+ ## this variable will be used to tell the tasks what executable to run
+ pybin: "/path/to/26"
+
+ - id: "python3"
+ display_name: "3.0"
+ variables:
+ pybin: "/path/to/3"
+
+ - id: "pypy"
+ display_name: "PyPy"
+ variables:
+ pybin: "/path/to/pypy"
+
+ - id: "jython"
+ display_name: "Jython"
+ variables:
+ pybin: "/path/to/jython"
+
+ ## we must test our code both with and without C libraries
+- id: c-extensions
+ display_name: "C Extensions"
+ values:
+
+ - id: "with-c"
+ display_name: "With C Extensions"
+ variables:
+ ## this variable tells a test whether or not to link against C code
+ use_c: true
+
+ - id: "without-c"
+ display_name: "Without C Extensions"
+ variables:
+ use_c: false
+
+buildvariants:
+- matrix_name: "tests"
+ matrix_spec: {os: "*", python: "*", c-extensions: "*"}
+ exclude_spec:
+ ## pypy and jython do not support C extensions, so we disable those variants
+ python: ["pypy", "jython"]
+ c-extensions: with-c
+ display_name: "${os} ${python} ${c-extensions}"
+ tasks : "*"
+ rules:
+ ## let's say we have an LDAP auth task that requires a C library to work on Windows,
+ ## here we can remove that task for all windows variants without c extensions
+ - if:
+ os: windows
+ c-extensions: false
+ python: "*"
+ then:
+ remove_task: ["ldap_auth"]
+```
+
+In the above example, notice how we define a set of axes and then
+combine them in a matrix definition. The equivalent set of matrix
+definitions would be much longer and harder to maintain if built out
+individually.
+
+#### Axis Definitions
+
+Axes and axis values are the building block of a matrix. Conceptually,
+you can imagine an axis to be a variable, and its axis values are
+different values for that variable. For example the YAML above includes
+an axis called "python_version", and its values enumerate different
+python interpreters to use.
+
+Axes are defined in their own root section of a project file:
+
+``` yaml
+axes:
+- id: "axis_1" ## unique identifier
+ display_name: "Axis 1" ## OPTIONAL human-readable identifier
+ values:
+ - id: "v1" ## unique identifier
+ display_name: "Value 1" ## OPTIONAL string for substitution into a variant display name (more on that later)
+ variables: ## OPTIONAL set of key-value pairs to update expansions
+ key1: "1"
+ key2: "two"
+ run_on: "ec2_large" ## OPTIONAL string or array of strings defining which distro(s) to use
+ tags: ["1", "taggy"] ## OPTIONAL string or array of strings to tag the axis value
+ batchtime: 3600 ## OPTIONAL how many minutes to wait before scheduling new tasks of this variant
+ modules: "enterprise" ## OPTIONAL string or array of strings for modules to include in the variant
+ stepback: false ## OPTIONAL whether to run previous commits to pinpoint a failure's origin (off by default)
+ - id: "v2"
+ ## and so on...
+```
+
+During evaluation, axes are evaluated from *top to bottom*, so earlier
+axis values can have their fields overwritten by values in later-defined
+axes. There are some important things to note here:
+
+*ONE:* The `variables` and `tags` fields are *not* overwritten by later
+values. Instead, when a later axis value adds new tags or variables,
+those values are *merged* into the previous defintions. If axis 1
+defines tag "windows" and axis 2 defines tag "64-bit", the resulting
+variant would have both "windows" and "64-bit" as tags.
+
+*TWO:* Axis values can reference variables defined in previous axes. Say
+we have four distros: windows_small, windows_big, linux_small,
+linux_big. We could define axes to create variants the utilize those
+distros by doing:
+
+``` yaml
+axes:
+-id: size
+ values:
+ - id: small
+ variables:
+ distro_size: small
+ - id: big
+ variables:
+ distro_size: big
+-id: os
+ values:
+ - id: win
+ run_on: "windows_${distro_size}"
+
+ - id: linux
+ run_on: "linux_${distro_size}"
+ variables:
+```
+
+Where the run_on fields will be evaluated when the matrix is parsed.
+
+#### Matrix Variants
+
+You glue those axis values together inside a variant matrix definition.
+In the example python driver configuration, we defined a matrix called
+"test" that combined all of our axes and excluded some combinations we
+wanted to avoid testing. Formally, a matrix is defined like:
+
+``` yaml
+buildvariants:
+- matrix_name: "matrix_1" ## unique identifier
+ matrix_spec: ## a set of axis ids and axis value selectors to combine into a matrix
+ axis_1: value
+ axis_2:
+ - v1
+ - v2
+ axis_3: .tagged_values
+ exclude_spec: ## OPTIONAL one or an array of "matrix_spec" selectors for excluding combinations
+ axis_2: v2
+ axis_3: ["v5", "v6"]
+ display_name: "${os} and ${size}" ## string expanded with axis display_names (see below)
+ run_on: "ec2_large" ## OPTIONAL string or array of strings defining which distro(s) to use
+ tags: ["1", "taggy"] ## OPTIONAL string or array of strings to tag the resulting variants
+ batchtime: 3600 ## OPTIONAL how many minutes to wait before scheduling new tasks
+ modules: "enterprise" ## OPTIONAL string or array of strings for modules to include in the variants
+ stepback: false ## OPTIONAL whether to run previous commits to pinpoint a failure's origin (off by default)
+ tasks: ["t1", "t2"] ## task selector or array of selectors defining which tasks to run, same as any variant definition
+ rules: [] ## OPTIONAL special cases to handle for certain axis value combinations (see below)
+```
+
+Note that fields like "modules" and "stepback" that can be defined by
+axis values will be overwritten by their axis value settings.
+
+The `matrix_spec` and `exclude_spec` fields both take maps of
+`axis: axis_values` as their inputs. These axis values are combined to
+generate variants. The format itself is relatively flexible, and each
+axis can be defined as either `axis_id: single_axis_value`,
+`axis_id: ["value1", "value2"]`, or `axis_id: ".tag .selector"`. That
+is, each axis can define a single value, array of values, or axis value
+tag selectors to show which values to contribute to the generated
+variants. The most common selector, however, will usually be
+`axis_id: "*"`, which selects all values for an axis.
+
+Keep in mind that YAML is a superset of JSON, so
+
+``` yaml
+matrix_spec: {"a1":"*", "a2":["v1", "v2"]}
+```
+
+is the same as
+
+``` yaml
+matrix_spec:
+ a1: "*"
+ a2:
+ - v1
+ - v2
+```
+
+Also keep in mind that the exclude_spec field can optionally take
+multiple matrix specs, e.g.
+
+``` yaml
+exclude_spec:
+- a1: v1
+ a2: v1
+- a1: v3
+ a4: .tagged_vals
+```
+
+#### The Rules Field
+
+Sometimes certain combinations of axis values may require special
+casing. The matrix syntax handles this using the `rules` field.
+
+Rules is a list of simple if-then clauses that allow you to change
+variant settings, add tasks, or remove them. For example, in the python
+driver YAML from earlier:
+
+``` yaml
+rules:
+- if:
+ os: windows
+ c-extensions: false
+ python: "*"
+ then:
+ remove_task: ["ldap_auth"]
+```
+
+tells the matrix parser to exclude the "ldap_auth" test from windows
+variants that build without C extensions.
+
+The `if` field of a rule takes a matrix selector, similar to the matrix
+`exclude_spec` field. Any matrix variants that are contained by the
+selector will have the rules applied. In the example above, the variant
+`{"os":"windows", "c-extensions": "false", "python": "2.6"}` will match
+the rule, but `{"os":"linux", "c-extensions": "false", "python": "2.6"}`
+will not, since its `os` is not "windows."
+
+The `then` field describes what to do with matching variants. It takes
+the form
+
+``` yaml
+then:
+ add_tasks: ## OPTIONAL a single task selector or list of task selectors
+ - task_id
+ - .tag
+ - name: full_variant_task
+ depends_on: etc
+ remove_tasks: ## OPTIONAL a single task selector or list of task selectors
+ - task_id
+ - .tag
+ set: ## OPTIONAL any axis_value fields (except for id and display_name)
+ tags: tagname
+ run_on: special_snowflake_distro
+```
+
+#### Referencing Matrix Variants
+
+Because generated matrix variant ids are not meant to be easily
+readable, the normal way of referencing them (e.g. in a `depends_on`
+field) does not work. Fortunately there are other ways to reference
+matrix variants using variant selectors.
+
+The most succinct way is with tag selectors. If an axis value defines a
+`tags` field, then you can reference the resulting variants by
+referencing the tag.
+
+``` yaml
+variant: ".tagname"
+```
+
+More complicated selector strings are possible as well
+
+``` yaml
+variant: ".windows !.debug !special_variant"
+```
+
+You can also reference matrix variants with matrix definitions, just
+like `matrix_spec`. A single set of axis/axis value pairs will select
+one variant
+
+``` yaml
+variant:
+ os: windows
+ size: large
+```
+
+Multiple axis values will select multiple variants
+
+``` yaml
+variant:
+ os: ".unix" ## tag selector
+ size: ["large", "small"]
+```
+
+Note that the `rules` `if` field can only take these matrix-spec-style
+selectors, not tags, since rules can modify a variant's tags.
+
+#### Matrix Tips and Tricks
+
+For more examples of matrix project files, check out \* [Test Matrix
+1](https://github.com/evergreen-ci/evergreen/blob/master/model/testdata/matrix_simple.yml)
+\* [Test Matrix
+2](https://github.com/evergreen-ci/evergreen/blob/master/model/testdata/matrix_python.yml)
+\* [Test Matrix
+3](https://github.com/evergreen-ci/evergreen/blob/master/model/testdata/matrix_deps.yml)
+
+When developing a matrix project file, the Evergreen command line tool
+offers an `evaluate` command capable of expanding matrix definitions
+into their resulting variants client-side. Run
+`evergreen evaluate --variant my_project_file.yml` to print out an
+evaluated version of the project.
+
+### Task Groups
+
+Task groups pin groups of tasks to sets of hosts. When tasks run in a
+task group, the task directory is not removed between tasks, which
+allows tasks in the same task group to share state, which can be useful
+for purposes such as reducing the amount of time running expensive
+setup and teardown for every single task.
+
+A task group contains arguments to set up and tear down both the entire
+group and each individual task. Tasks in a task group will not run the `pre`
+and `post` blocks in the YAML file; instead, the tasks will run the task group's
+setup and teardown blocks.
+
+Task groups have additional options available that can be configured
+directly inline inside the config's [build
+variants](#build-variants).
+
+``` yaml
+task_groups:
+ - name: example_task_group
+ max_hosts: 2
+ setup_group_can_fail_task: true
+ setup_group_timeout_secs: 1200
+ setup_group:
+ - command: shell.exec
+ params:
+ script: |
+ "echo setup_group"
+ teardown_group:
+ - command: shell.exec
+ params:
+ script:
+ "echo teardown_group"
+ setup_task:
+ - command: shell.exec
+ params:
+ script: |
+ "echo setup_task"
+ teardown_task:
+ - command: shell.exec
+ params:
+ script: |
+ "echo teardown_task"
+ tasks:
+ - example_task_1
+ - example_task_2
+ - .example_tag
+
+buildvariants:
+ - name: ubuntu1604
+ display_name: Ubuntu 16.04
+ run_on:
+ - ubuntu1604-test
+ tasks:
+ - name: "example_task_group"
+```
+
+Parameters:
+
+- `setup_group`: commands to run prior to running this task group.
+ Note that pre does not run for task group tasks.
+- `teardown_group`: commands to run after running this task group.
+ Note that post does not run for task group tasks.
+- `setup_task`: commands to run prior to running each task. Note that
+ pre does not run for task group tasks.
+- `teardown_task`: commands to run after running each task. Note that
+ post does not run for task group tasks.
+- `max_hosts`: number of hosts across which to distribute the tasks in
+ this group. This defaults to 1. There will be a validation warning
+ if max hosts is less than 1 or greater than the number of tasks in
+ task group. When max hosts is 1, this is a special case where the tasks
+ will run serially on a single host. If any task fails, the task group
+ will stop, so the remaining tasks after the failed one will not run.
+- `timeout`: timeout handler which will be called instead of the
+ top-level timeout handler. If it is not present, the top-level
+ timeout handler will run if a top-level timeout handler exists.
+- `setup_group_can_fail_task`: if true, task will fail if setup group
+ fails. Defaults to false.
+- `setup_group_timeout_secs`: override default timeout for setup
+ group. (This only fails task if `setup_group_can_fail_task` is also
+ set.)
+- `share_processes`: by default, processes and Docker state changes
+ (e.g. containers, images, volumes) are cleaned up between each
+ task's execution. If this is set to true, cleanup will be deferred
+ until the task group is finished. Defaults to false.
+
+The following constraints apply:
+
+- Tasks can appear in multiple task groups. However, no task can be
+ assigned to a build variant more than once.
+- Task groups are specified on variants by name. It is an error to
+ define a task group with the same name as a task.
+- Some operations may not be permitted within the "teardown_group"
+ phase, such as "attach.results" or "attach.artifacts".
+- Tasks within a task group will be dispatched in order declared.
+- Any task (including members of task groups), can depend on specific
+ tasks within a task group using the existing dependency system.
+- `patchable`, `patch_only`, `disable`, and `allow_for_git_tag` from the project
+ task will overwrite the task group parameters (Note: these settings currently do not work when defined on the task
+ group due to [EVG-19706](https://jira.mongodb.org/browse/EVG-19706)).
+
+Tasks in a group will be displayed as
+separate tasks. Users can use display tasks if they wish to group the
+task group tasks.
+
+### Task Dependencies
+
+A task can be made to depend on other tasks by adding the depended on
+tasks to the task's depends_on field. The following additional
+parameters are available:
+
+- `status` - string (default: "success"). One of ["success",
+ "failed", or "`*`"]. "`*`" includes any finished status as well
+ as when the task is blocked.
+- `variant` - string (by default, uses existing variant). Can specify a
+ variant for the dependency to exist in, or "`*`" will depend on the task
+ for all matching variants.
+- `patch_optional` - boolean (default: false). If true the dependency
+ will only exist when the depended on task is present in the version
+ at the time the dependent task is created. The depended on task will
+ not be automatically pulled in to the version.
+- `omit_generated_tasks` - boolean (default: false). If true and the
+ dependency is a generator task (i.e. it generates tasks via the
+ [`generate.tasks`](Project-Commands.md#generate-tasks) command), then generated tasks will not be included
+ as dependencies.
+
+So, for example:
+
+``` yaml
+- name: my_dependent_task
+ depends_on:
+ - name: "must_succeed_first"
+ variant: "bv0"
+ - name: "must_run_or_block_first"
+ variant: "bv0"
+ status: "*"
+ - name: "must_succeed_first_if_present"
+ variant: "bv0"
+ patch_optional: true
+ - name: "generator_task_one"
+ variant: "bv0"
+ - name: "generator_task_two"
+ variant: "bv0"
+ omit_generated_tasks: true
+```
+
+You can specify NOT with `!` and ALL with `*`. Multiple arguments are
+supported as a space-separated list. For example,
+
+``` yaml
+- name: push
+ depends_on:
+ - name: test
+ variant: "* !E"
+
+- name: push
+ depends_on:
+ - name: test
+ variant: "A B C D"
+```
+
+### Ignoring Changes to Certain Files
+
+Some commits to your repository don't need to be tested. The obvious
+examples here would be documentation or configuration files for other
+Evergreen projects---changes to README.md don't need to trigger your
+builds.
+
+To address this, project files can define a top-level `ignore`
+list of gitignore-style globs which tell Evergreen to not automatically
+run tasks for commits that only change ignored files, and we will not
+create PR patches but instead send a successful status.
+
+``` yaml
+ignore:
+ - "version.json" ## don't schedule tests for changes to this specific file
+ - "*.md" ## don't schedule tests for changes to any markdown files
+ - "*.txt" ## don't schedule tests for changes to any txt files
+ - "!testdata/sample.txt" ## EXCEPT for changes to this txt file that's part of a test suite
+```
+
+In the above example, a commit that only changes `README.md` would not
+be automatically scheduled, since `*.md` is ignored. A commit that
+changes both `README.md` and `important_file.cpp` *would* schedule
+tasks, since only some of the commit's changed files are ignored.
+
+Full gitignore syntax is explained
+[here](https://git-scm.com/docs/gitignore). Ignored versions may still
+be scheduled manually, and their tasks will still be scheduled on
+failure stepback.
+
+### Customizing Logging
+
+By default, tasks will log all output to Cedar buildlogger. You can
+override this behavior at the project or command level by log type
+(task, agent, system). The available loggers are:
+
+- `file` - Output is sent to a local file on the agent, which will be
+ uploaded to S3 at the end of the task. Links to the files will be
+ available on the task page. This option is not available to system
+ logs for security reasons. The `log_directory` parameter may be
+ specified to override the default storage directory for log files.
+- `logkeeper` - Output is sent to a Logkeeper instance. Links to the
+ logs will be available on the task page.
+- `splunk` - Output is sent to Splunk. No links will be provided on
+ the task page, but the logs can be searched using
+ `metadata.context.task_id=` as a Splunk query. Choosing
+ this logger requires that the `splunk_server` parameter be set to
+ the Splunk server URL and the `splunk_token` set to the API token
+ used to authenticate.
+
+Multiple loggers can be specified. An example config file that wants to
+send task logs to S3 in addition to the Cedar buildlogger is:
+
+``` yaml
+command_type: test
+loggers:
+ task:
+ - type: buildlogger
+ - type: file
+ agent:
+ - type: buildlogger
+ system:
+ - type: buildlogger
+tasks:
+ [...]
+```
+
+All of this can be specified for a specific command as well, which will
+only apply the settings to that command. An example is:
+
+``` yaml
+- command: subprocess.exec
+ type: setup
+ loggers:
+ task:
+ - type: splunk
+ splunk_server: ${splunk_server}
+ splunk_token: ${splunk_token}
+ agent:
+ - type: buildlogger
+ system:
+ - type: buildlogger
+ params:
+ [...]
+```
+
+### The Power of YAML
+
+YAML as a format has some built-in support for defining variables and
+using them. You might notice the use of node anchors and references in
+some of our project code. For a quick example, see:
+
+
+### Command Failure Colors
+
+Evergreen tasks can fail with different colors. By default failing tasks
+turn red, but there are 3 different modes.
+
+- `test`: red
+- `system`: purple
+- `setup`: lavender
+
+In general you should use purple to indicate that something has gone
+wrong with the host running the task, since Evergreen will also use this
+color. You can use lavender to indicate something has gone wrong with
+test setup, or with some external service that the task depends on.
+
+You can set the default at the top of the config file.
+
+``` yaml
+command_type: system
+```
+
+You can set the failure mode of individual commands.
+
+``` yaml
+- command: shell.exec
+ type: test
+```
+
+Note that although you cannot conditionally make a command fail
+different colors, you can hack this by having a command write to a file
+based on its exit status, and then subsequent commands with different
+types can exit non-zero conditionally based on the contents of that
+file.
+
+### Set Task Status within Task
+
+The following endpoint was created to give tasks the ability to define
+their task end status, rather than relying on hacky YAML tricks to use
+different failure types for the same command. This will not kill the
+current command, but will set the task status when the current command
+is complete (or when the task is complete, if `should_continue` is set).
+
+ POST localhost:2285/task_status
+
+| Name | Type | Description |
+|-----------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------|
+| status | string | Required. The overall task status. This can be "success" or "failed". If this is configured incorrectly, the task will system fail. |
+| type | string | The failure type. This can be "setup", "system", or "test" (see above section for corresponding colors). Will default to the command's failure type. |
+| desc | string | Provide details on the task failure. This is limited to 500 characters. Will default to the command's display name. |
+| should_continue | boolean | Defaults to false. If set, will finish running the task before setting the status. |
+
+Example in a command:
+
+``` yaml
+- command: shell.exec
+ params:
+ shell: bash
+ script: |
+ curl -d '{"status":"failed", "type":"setup", "desc":"this should be set"}' -H "Content-Type: application/json" -X POST localhost:2285/task_status
+```
+
+### Task Fields Override Hierarchy
+
+The task's specific fields will be taken into priority in the following
+order:
+
+- The fields in the build variant definition
+- The fields in the task definition
+- The fields in the variant task definition
+
+Example:
+
+``` yaml
+buildvariants:
+- name: build_variant_definition
+ run_on:
+ - lowest_priority
+ tasks:
+ - name: task_definition
+ run_on: highest_priority
+tasks:
+- name: task_definiton
+ run_on: mid_priority
+```
diff --git a/docs/Configure-a-Project/Project-and-Distro-Settings.md b/docs/Configure-a-Project/Project-and-Distro-Settings.md
new file mode 100644
index 00000000000..7e1773ee8bb
--- /dev/null
+++ b/docs/Configure-a-Project/Project-and-Distro-Settings.md
@@ -0,0 +1,566 @@
+# Define Project and Distro Settings
+
+The Project and Distro settings pages can be found at the right side
+dropdown on the navigation menu. All users can access the distro
+settings page and Project Admins and Superusers can access the project
+settings page. All users can access basic project information via the /projects route
+(this omits project variables, task annotation and workstation settings, and container secrets).
+
+## Types of Special Users
+
+### Superusers
+
+Superusers can be set in the Evergreen settings file and have access to
+all Evergreen projects and Evergreen distro settings.
+
+### Project Administrators
+
+Project Administrators have access to specific projects that they
+maintain and can be set by an Evergreen Superuser in the Project
+Settings page for that specific project. After adding the user's
+Evergreen username to the list of Administrators, that user will be able
+to access the Project Settings page for that project only and modify
+repository information, access settings, alerts, and keys.
+
+### Permissions Requested with Mana
+
+Functionality has been added to Mana to make permission requests more
+granular. Mana Entitlements can specify whether the user should have
+read or write (or no) access to project settings, logs, task
+annotations, and more. These can be requested for specific members or
+for entire guilds. The project admins (or Evergreen admins, if no
+project admins exist) are then able to approve/reject requested access
+for their project.
+
+If you'd like to use Entitlements for entire teams, then the team
+should be part of a Guild, as this is refreshed every day and better
+supports employees moving teams. Guilds can also dynamically add users
+who match certain characteristics.
+
+## Project Settings
+
+The Project Settings file displays information about the Project itself,
+as well as configurable fields for managing your project
+
+There are two types of users that can view and edit these settings:
+Superusers and Project Admins.
+
+### General Project Settings
+
+If a Project Administrator wants Evergreen to discontinue or start
+tracking a project, it can be changed via the Enabled and Disabled radio
+buttons. The display name field corresponds to what users will see in
+the project dropdown on the navigation bar. Admins can change the
+location or name of the config file in the repository if they would like
+to have Evergreen run tests using a different project file located
+elsewhere, or if they move the config file. The batch time corresponds
+to the interval of time (in minutes) that Evergreen should wait in
+between activating the latest version.
+
+Admins can modify which GitHub repository the project points to and
+change the owner, repository name, or branch that is to be tracked by
+Evergreen.
+
+Admins can also set the branch project to inherit values from a
+repo-level project settings configuration. This can be learned about at
+['Using Repo Level Settings'](Using-Repo-Level-Settings.md).
+
+### Access and Admin Settings
+
+Admins can set a project as private or public. A private project can
+only be seen by logged in users. A public project is viewable to those
+who are not logged in as well. To set a Project Administrator edit the
+Admin list (which can only be viewable by Superusers or Project Admins
+for the project) for the project by adding the Evergreen username to the
+list and saving the project settings.
+
+Not pictured, the Restricted Project checkbox controls whether logged-in
+users have basic access to the project (able to view tasks and logs,
+able to submit patches). If checked, users will by default not have any
+access, and access must be manually granted through an external system
+via the REST API. The default for this setting is to allow logged-in
+users basic access to this project. Note this is different from the
+Private/Public setting above, which restricts access for users that are
+not logged in.
+
+### Scheduling Settings
+
+Admins can enable the ability to unschedule old tasks if a more recent
+commit passes.
+
+### Variables
+
+Admins can store project variables that can be referenced in the config
+file via an expansion.
+
+Options:
+
+- Checking **private** makes the variable redacted so the value won't
+ be visible on the projects page or by API routes.
+- Checking **admin only** ensures that the variable can only be used
+ by admins and mainline commits.
+
+### Aliases
+
+Aliases can be used for patch testing, commit queue testing, Github PRs,
+github checks, git tag triggers, project triggers, and patch triggers.
+
+For most aliases, you must define a variant regex or tags, and a task
+regex or tags. The matching variants/tasks will be included for the
+alias. Tags should be listed as they are defined under the task
+definition (i.e. without the ".") and tag negation is also supported
+(by prefixing the tag name with "!"). Multiple tags should be
+comma-delimited.
+
+Aliases can also be defined locally as shown
+[here](../Using-the-Command-Line-Tool.md#local-aliases).
+
+### GitHub Pull Request Testing
+
+Enabling "Automated Testing" will have Evergreen automatically create a patch for
+each pull request opened in the repository as well as each subsequent
+push to each pull request. In order for this to work, you must fill out
+at least 1 row in the section titled "GitHub Patch Definitions," as
+those define what tasks will be run in this patch.
+
+If you'd like the option of creating patches but wouldn't like it to happen automatically,
+you can enable "Manual Testing".
+
+![github_settings.png](../images/github_settings.png)
+
+You can also have tasks run for a *different* project for
+each pull request opened in the repository as well as each subsequent
+push to each pull request. To do that, add a trigger aliases to the
+"Github Trigger Alias" section. Before an alias can be added, it needs
+to be defined in the "Patch Trigger Aliases" section.
+
+![github_trigger_alias.png](../images/github_trigger_alias.png)
+
+For security reasons, commits by users outside of your organization will
+not automatically be run. A patch will still be created and must be
+manually authorized to run by a logged-in user.
+
+### Github Checks
+
+This supports Github checks on commits (i.e. to be visible at
+\/\/commits). Task/variant
+regexes/tags are required, and Github statuses will be sent with only
+the status of those tasks on the mainline commit version.
+
+### Trigger Versions With Git Tags
+
+This allows for versions to be created from pushed git tags.
+
+- The tag must be pushed after the commit has been merged to ensure
+ that the waterfall version has already been created for the
+ revision.
+ - It is possible to push the tag on the same line as the commit
+ using `&&` but this is recommended for low-risk commits only.
+- Versions are displayed on the waterfall page.
+- The author of the version matches the author from the original
+ waterfall version.
+- The version is titled "Triggered From Git Tag '\':
+ \"
+- The expansion `${triggered_by_git_tag}` is set to the git tag that
+ was pushed.
+- If the revision exists for multiple projects, it will check if a
+ version should be created for each project.
+
+1. **Configure what users/teams are authorized to trigger versions with
+ git tags for the project.**
+
+You can define this in a list on the project settings page. For users,
+these should be Github users or bot names. For teams, this should be the
+slug for the team (for example, the team Evergreen Users would be
+evergreen-users), and any member in the team is authorized. Both teams
+and individual users can be configured.
+
+Alternatively, you can use Mana to give users permission to trigger git
+tag versions for the project; however the user will need to add their
+Github username to their [settings
+page](https://evergreen.mongodb.com/settings) in order for us to connect
+the Github user to an Evergreen user.
+
+If the person who pushed the tag is not authorized, then the tag will
+still be added to the existing version but no new version will be
+triggered.
+
+2. **Add aliases to determine what tasks will run.**
+
+There are two options for aliases:
+
+- **Define a new config file.** With this option, all tasks/variants
+ in the config file will be used, so regexes/tags are not accepted.
+ This is useful if you want to keep git-tag tasks and variants
+ entirely separate from the main project config.
+- Use the default config file, and **define task/variant regexes or
+ tags** to use with the existing project configuration (as you would
+ for other aliases).
+
+If you choose to use the project's existing project config file, you
+can set `git_tag_only` to true for tasks you only want running on
+git-tag-triggered versions, or `allow_for_git_tags` to false for tasks
+you don't want to run on git-tag-triggered versions).
+
+Ambiguous behavior is outlined here:
+
+- If the git tag that is pushed matches no git tag regexes, then no
+ version will be created.
+- If the tag matches only one alias, then it will either use the file
+ or use the task/variants defined.
+- If the git tag that is pushed matches multiple git tag regexes,
+ then:
+ - If one or more have a file defined, then this is ambiguous and
+ no version will be created.
+ - If all have variant/tasks configured, the union of these will
+ determine what variants/tasks are created.
+
+### Project Triggers
+
+Users can specify that commits to another project (the "upstream"
+project) will trigger builds in their project (the "downstream"
+project). Configure triggers in the downstream project from the project
+configuration page. Click "NEW TRIGGER".
+
+Options:
+
+- Project: The upstream project.
+- Date cutoff: Do not trigger a downstream build if a user manually
+ schedules a build older than this number of days.
+- Level: Trigger based on either a task or a build completing.
+- Variant and task regexes: Trigger based on these variants (if
+ build-level) or variants and tasks (if task-level) completing.
+- Definition file: The path to the downstream project's config file.
+ This may be the same as the main project configuration file but does
+ not have to be.
+- Alias: Run a subset of tasks by specifying an alias. Otherwise, all
+ tasks run.
+
+### Patch Trigger Aliases
+
+Users can create aliases that can be used in patch builds (in the
+"upstream" project) to kick off a child patch (in the "downstream"
+project). Create aliases in the upstream project in the Patch Trigger
+Aliases section of the project configuration page. Click "NEW ALIAS".
+
+Options:
+
+- Alias: The name of the alias.
+- Project: The downstream project.
+- Module: Optionally specify a module to apply changes to.
+- Wait on: You can have the child patch wait on a complete(success or
+ failed), success, or failed status from the parent. Otherwise the
+ child patch will run immediately. If the patch depends on parent
+ status, at least one parent task must be scheduled.
+- Patch alias, variant and task regexes: Run a subset of tasks in the
+ downstream project by specifying an alias or by specifying task and
+ variant regexes.
+
+Once the Patch alias is created, you can use it when creating a patch
+build, either by appending `--trigger-alias my_alias` to the evergreen
+patch command when creating a patch via the CLI, or by selecting that
+alias on the patch configure page on the new UI. The alias can also be
+added as a Github Trigger Alias in the GitHub Pull Request Testing
+section to kick off a child patch for each pull request opened in the
+repository as well as each subsequent push to each pull request.
+
+To pass information from the upstream patch to the downstream patch use
+[downstream_expansions.set](Project-Commands.md#downstream_expansionsset)
+
+### Periodic Builds
+
+Evergreen has the capability to periodically run a set of tasks in the
+project. This section holds settings allowing you to specify
+what should be run periodically, and how often. **This is different than build variant crons** because
+a build variant cron activates build variants on _existing waterfall commits_ based on the cron you specify
+(so if you want it to run daily, itâll activate the most recent build variant at that time daily),
+whereas a new periodic build will be created each interval regardless of whether there are new commits.
+
+Options:
+
+- Interval: (Interval or cron required) Evergreen will create a version and run the specified tasks every X hours, with
+ X being specified by this field. Unless set to a future time, the first run will happen immediately after the settings are saved.
+- Cron: (Interval or cron required) Evergreen will create a version on the specified cron schedule.
+- Config File: The .yml file that defines tasks to run. This can be
+ the same one that defines tasks for commits in the project, or a
+ different one.
+- Patch Alias: Optional, you can specify an already-defined patch
+ alias here to limit the tasks or variants that are run.
+- Message: Optional, this will be saved as the description of the
+ version that ends up being created when the tasks are run.
+
+
+Periodic builds can be viewed on the project waterfall page, and can be
+filtered on Spruce. You can also find out about the results of
+periodic builds by adding a notification subscription on the project
+settings page. In the notification popup, select "when any version
+finishes" with Build Initiator = Periodic Build.
+
+Also note that periodic builds cannot currently be used to schedule
+tasks for which you hope to use performance tooling, like performance
+monitoring charts. Use a cron to schedule your tasks if you'd like to
+use performance tooling.
+
+### Task Sync
+
+Enabling this feature allows users to push and pull their task working
+directory to and from a remote store (S3). This can be done either using
+the
+[s3.push](Project-Commands.md#s3-push)
+or
+[s3.pull](Project-Commands.md#s3pull)
+project commands, or using it from [the CLI](../Using-the-Command-Line-Tool.md#task-sync).
+
+Options:
+
+- Enable for Project Config Commands: Users can use task sync commands
+ in their Evergreen project config.
+- Enable for Tasks in Patches: Users can use task sync in their
+ patches.
+
+### Virtual Workstation Commands
+
+Users can specify custom commands to be run when setting up their
+virtual workstation.
+
+Options:
+
+- Enable Git Clone: A git clone will automatically be run on the
+ defined project, i.e. "git clone -b v20210623
+ :10gen/mms.git"
+- Commands: Specify commands to be run on the project in order using
+ the setup CLI command from the workstation, allowing for an optional
+ working subdirectory to be passed in.
+
+### Performance Plugin
+
+Users can enable the performance plugin for tracking historical
+performance of tasks and tests.
+
+### Build Baron
+
+Configure the build baron to create build failure tickets under a
+specific project from a list of projects to search for failures.
+
+Options:
+
+- Ticket Create Project: The JIRA project to create build failure
+ tickets in.
+- Ticket Search Projects: JIRA projects for the build baron to search
+ in when looking for failures.
+
+### Task Annotation Settings
+
+Configure custom API integrations when generating build failure tickets.
+
+Options:
+
+- Webhook: A custom setup for creating build failure tickets,
+ specifying an endpoint an optional secret.
+- JIRA custom fields: Custom field and display test allowing for the
+ creation of a specific field when displaying jira links.
+
+## Distro Settings
+
+The Distros page allows all users to see all available distros a project
+can run tasks on. As a superuser or admin, one can also add new distro
+configurations to be used by other users.
+
+Distros describe machine configuration that run tasks as well as the
+worker pools were tasks execute. As a result much of the available
+configuration that controls how tasks execute occurs at the distro
+level.
+
+### Scheduler Options
+
+The process of scheduling tasks contains a number of distinct phases
+that all execute independently:
+
+1. *Task Finding* identifies all runable undispatched runnable tasks
+ for a distro. You can choose to include tasks which have unsatisfied
+ dependencies, if the task dispatcher supports having these tasks in
+ the queue. There are multiple implementations of the task finder in
+ evergreen, which use different approaches to returning these
+ queries. Evergreen typically uses the "Legacy" implementation in
+ production because it is the most stable, but the other
+ implementations are equivalent.
+
+2. *Task Planning* manages how tasks are ordered in the queue. There
+ are two implementations, Evergreen's Legacy implementation which
+ orders tasks using a short circuiting list of comparison operation,
+ and the "Tunable" implementation which uses a point-based
+ algorithim that makes it possible to tune the factors that impact
+ the ordering of a task. The tunable factors are:
+
+ - Target time for the queue, or the number of minutes that the
+ queue should take. (This will move to the host allocator
+ settings after
+ [EVG-703](https://jira.mongodb.org/browse/EVG-703)).
+ - *Patch Factor* how much to weight patches over non-patch builds.
+ For most workloads, privileging patches over mainline builds
+ will improve the throughput of your team to complete requests,
+ if patch builds are a prerequisite to committing.
+ - *Time in Queue* how much to weight tasks that have been waiting
+ for a long period of time over tasks that have entered the queue
+ more recently. This factor privileges older patches and newer
+ mainline tasks. Modifying this value may make it easier to meet
+ SLAs for task latency.
+ - *Expected Runtime* how to weight longer tasks over shorter
+ tasks. Generally running longer tasks first will lead to higher
+ overall throughput, at the cost of increasing the latency for
+ first responses.
+ - *Task Ordering* provides the operation to interleave patches and
+ mainline builds; however, you can opt prefer patches over
+ mainline tasks, at the risk of starving one or the other.
+ - *Group Versions* typically evergreen will sort individual tasks
+ which allows tasks from different versions to run in parallel;
+ however, you can tell evergreen to group all tasks from a single
+ version in the queue together.
+
+ If dependencies are included in the queue, the tunable planner is
+ the only implementation that can properly manage these dependencies.
+
+3. *Host Allocation* controls the how Evergreen starts new machines to
+ run hosts. The utilization-based implementation is aware of task
+ groups, is the most recent implementation, and works well. All
+ implementations have a slight over-allocation bias.
+
+4. *Task Dispatching* controls how Evergreen dispatches tasks to hosts.
+ There are three implementations:
+
+ - legacy, is no longer used in production, and is deprecated.
+ - revised, is the most stable implementation and has first-class
+ support for task groups, but does not support
+ - revised-with-dependencies, is a new scheduling system developed
+ with the tunable planner and is the only dispatcher that can
+ handle dependencies have not yet been satisfied.
+
+## Version Control
+
+Enabling version control for configurations on the project page will
+allow a number of the settings detailed above to also be specified in
+the project YAML alongside the settings that are specified in ['Project Configuration Files'](Project-Configuration-Files.md).
+Evergreen will merge the settings in the project page, repo page, then the YAML, in that order. In case of duplicates, like aliases with the same names, the ones defined on the project page will take precedence over those
+defined in the YAML.
+
+Note: [included files](Project-Configuration-Files.md#include) do not currently support version-controlled configurations. Version-controlled configuration must
+be defined in the main YAML file for it to take effect.
+
+Below shows example configurations for these settings that can be
+included within the project YAML and the configuration structure
+associated with each setting.
+
+## Aliases
+
+[View setting
+definition](#aliases)
+
+### Patch Aliases
+
+``` yaml
+patch_aliases:
+ - alias: "patch_alias_1"
+ variant_tags: ["pr_check", "pr_check_all"]
+ task_tags: ["pr_check"]
+
+ - alias: "patch_alias_2"
+ variant: "^ubuntu1604$"
+ task: "^test.*$"
+ parameters:
+ - key: "myParam"
+ - value: "defaultValue"
+```
+
+### Commit Queue Aliases
+
+``` yaml
+commit_queue_aliases:
+ - variant: "^ubuntu1604$"
+ task: "^smoke-test$"
+```
+
+### PR Aliases
+
+``` yaml
+github_pr_aliases:
+ - variant: "^lint$"
+ task: "^generate-lint$"
+```
+
+### Git Tag Aliases
+
+``` yaml
+git_tag_aliases:
+ git_tag: "v*"
+ remote_path: ""
+ variant_tags: ["pr_check_all"]
+ task_tags: ["pr_check"]
+```
+
+### GitHub Checks Aliases
+
+``` yaml
+github_checks_aliases:
+ - variant: "^ubuntu1604$"
+ task: "^test.*$"
+```
+
+### Scheduling Settings
+
+[View setting
+definition](#scheduling-settings)
+
+``` yaml
+deactivate_previous: true
+```
+
+### Virtual Workstation Commands
+
+[View setting
+definition](#virtual-workstation-commands)
+
+``` yaml
+git_clone: true
+setup_commands:
+- command: "./run-test.sh"
+ directory: "/etc"
+```
+
+### Task Sync
+
+[View setting
+definition](#task-sync)
+
+``` yaml
+task_sync:
+ config_enabled: true
+ patch_enabled: false
+```
+
+### Build Baron
+
+[View setting
+definition](#build-baron)
+
+``` yaml
+build_baron_settings:
+ ticket_create_project: EVG
+ ticket_search_projects:
+ - SERVER
+ - EVG
+```
+
+### Task Annotation Settings
+
+[View setting
+definition](#task-annotation-settings)
+
+``` yaml
+task_annotation_settings:
+ web_hook:
+ endpoint: "/api/route"
+ secret: ""
+ jira_custom_fields:
+ - field: "created_by"
+ display_text: "owner"
+```
diff --git a/docs/Configure-a-Project/README.md b/docs/Configure-a-Project/README.md
new file mode 100644
index 00000000000..dba2e1758bb
--- /dev/null
+++ b/docs/Configure-a-Project/README.md
@@ -0,0 +1 @@
+# Configure a Project
\ No newline at end of file
diff --git a/docs/Configure-a-Project/Using-Repo-Level-Settings.md b/docs/Configure-a-Project/Using-Repo-Level-Settings.md
new file mode 100644
index 00000000000..8147893dfac
--- /dev/null
+++ b/docs/Configure-a-Project/Using-Repo-Level-Settings.md
@@ -0,0 +1,48 @@
+# Define Repo-Level Settings
+
+With the completion of [PM-610](https://jira.mongodb.org/browse/PM-610), itâs now possible to share settings across multiple different branches by âattachingâ projects to the parent repo.
+
+![attach_to_repo.png](../images/attach_to_repo.png)
+
+Once a project is attached, any undefined fields will default to the repo's fields. Attached projects will be grouped under the owner/repo that they're attached to in the sidebar.
+
+![repo_sidebar.png](../images/repo_sidebar.png)
+
+An attached branch project is only read-only on the legacy UI, since this UI hasn't been extended to handle values inherited from the repo project, so to use the legacy UI or opt back out of the feature, the project will need to be detached. Additionally, changing owner or repo for a branch project will result in it inheriting values from a different repo value, so there is a new operation "Move to New Repo".
+
+![detach_from_repo.png](../images/detach_from_repo.png)
+
+
+## How It Works
+Branch projects can either have settings defined individually, or they can be set to default to the repo-level setting (repo-level settings can be defined on the repo project page itself). Entire sections of the project settings can be defaulted by clicking Default to Repo on Page at the top corner.
+
+![default_to_repo.png](../images/default_to_repo.png)
+
+For example, the below setting indicates that is defaulting to the repo-level setting, which we can see here is true.
+
+![boolean_default.png](../images/boolean_default.png)
+
+Similarly, lists can either be defined explicitly for the branch project ("Override") or can be set to default, in which case the repo settings will be available as read-only for convenience. For example, the following patch alias has been set at the repo-level, so it's visible from it's branch pages but cannot be modified.
+
+![repo_alias.png](../images/repo_alias.png)
+
+Text box fields can be defaulted simply by leaving them empty, and the default value will be displayed.
+
+![repo_string_default.png](../images/repo_string_default.png)
+
+Exceptions to this behavior:
+
+- **Admins**: Branch admins and repo admins have slightly different permissions. Repo admins are admins over the whole repo, meaning that they can edit repo settings and branch settings for any attached branch project. Branch admins are only admins over the branches they are listed for, and can _view_ repo settings, but cannot make edits, making their permissions a subset of the repo admin's permissions.
+
+- **Variables**: It's expected that branches may have many variables in common, with a few variables that are branch specific. Because of this, branches will use both repo-level variables and branch-level variables, however if there's a conflict between variable names then the branch-level definition will take precedent. For example, the following project has ``jiraserver`` defined in both the repo and branch settings, so the branch setting value ``different-jira.mongodb.org`` will be used, as well as the branch-defined ``var1`` and the repo-defined ``num_hosts``.
+
+![shared_variables.png](../images/shared_variables.png)
+
+## How to Use PR Testing for Untracked Branches
+
+A highly requested feature is to allow PR testing to be possible for untracked branches (i.e. branches without an explicit project, waterfall, etc). To create PR patches for any Github PR for a repo, simply define PR aliases on the repo project page and set PR testing to Enabled.
+
+![repo_pr_testing.png](../images/repo_pr_testing.png)
+
+To explicitly disallow this behavior for any individual branch, either override the PR aliases on the branch project page or set PR testing to Disabled for that branch.
+
diff --git a/docs/Get-Results/Event-Driven-Notifications.md b/docs/Get-Results/Event-Driven-Notifications.md
new file mode 100644
index 00000000000..716bbd93efc
--- /dev/null
+++ b/docs/Get-Results/Event-Driven-Notifications.md
@@ -0,0 +1,52 @@
+# Set Up Notifications
+
+Evergreen has the ability to issue notifications based on events that happen in the system.
+
+## Notifications Setup
+Evergreen can notify you based on the outcome of your patches. To enable these, go to your [user profile](https://evergreen.mongodb.com/settings) and:
+1. Enter your Github Username (so we can identify which commits you make)
+2. Optionally, enter your Slack username (if you want to be notified on Slack). Your Slack username is available from https://YOUR_ORGANIZATION.slack.com/account/settings#username (This is NOT your slack display name.)
+3. Under Notification Settings, select the Slack or Email next to the notifications you'd like.
+4. Click save!
+
+## Options for Notifications
+
+### Patch Finish
+For all new patches you create in the future (including Github Pull Requests), you'll receive an email or slack message when the patch has completed.
+
+### Tasks
+For new tasks that fit the desired requester and finish type, you'll receive a notification. Note that for system unresponsive tasks, we only send a notification on the last execution, since we auto-retry these.
+
+### Spawn Host Outcome
+For your spawn hosts, you will receive notifications when a host is started, stopped, modified, or terminated.
+
+### Spawn Host Expiration
+Receive notifications that your spawn host is going to expire soon, so you can update expiration accordingly if you don't want to lose the host.
+
+### Commit Queue
+Receive notifications on the status of your commit queue items.
+
+### Build Break Notifications
+Project Admins may enable this at the project level.
+
+When a task that was previously green (or is a new), becomes red or purple, a build-break notification will be issued. If the original committer can be identified, Evergreen will lookup their build-break notification settings, and follow that.
+
+If we can't identify the original committer, Evergreen will notify project admins.
+
+### Filtering Emails and Webhooks
+Evergreen sets a handful of headers which can be used to filter emails or webhook posts.
+
+| Header | Meaning |
+| --------------------------- | --- |
+| `X-Evergreen-id` | a unique ID for every notification. It is safe to use this value for deduplication. |
+| `X-Evergreen-object` | The object that generated this notification. Valid values are: `patch`, `version`, `build`, `task`, `host` |
+| `X-Evergreen-project` | The Evergreen project that created this notification. For example, a notification created by MongoDB's master branch would have the value of `mongodb-mongo-master` |
+| `X-Evergreen-owner` | The id of the Evergreen user that created the object. For events created by repotracker, if the object can be attributed to an Evergreen user, the Owner will be that user. |
+
+### Warning to GMail Users
+If you're using GMail through the browser UI, you won't be able to filter notifications because GMail does not support filtering on custom headers. Instead, we inject the custom Evergreen headers into the body of the email and hide it from view. You can create a filter in GMail using the "Has the words" field.
+
+For example, if you want to create a filter that captures all email notifications in the `mci` project, add `X-Evergreen-project:mci` into this field. Do not put spaces before or after the colon.
+
+To add more than one filter, separate the terms with a space, e.g: `X-Evergreen-project:mci X-Evergreen-object:patch` would capture patch notifications in the "mci" project. Order does not matter.
+
diff --git a/docs/Get-Results/How-To-Read-Evergreen.md b/docs/Get-Results/How-To-Read-Evergreen.md
new file mode 100644
index 00000000000..2b7a9d5a4cb
--- /dev/null
+++ b/docs/Get-Results/How-To-Read-Evergreen.md
@@ -0,0 +1,120 @@
+# Read Evergreen Results
+
+This guide is meant as a quick reference for familiarizing yourself with reading results generated by the Evergreen continuous integration system.
+The first time you saw Evergreen, you may have thought something like "well green is probably good and red is probably bad but I have no idea what I'm looking at."
+Don't worry, though!
+You'll find navigating Evergreen to be simple (and fun) once you have some direction.
+
+## Models
+In order to understand how Evergreen is laid out, it is essential to grasp its hierarchy of organization.
+There are only a few main entities in Evergreen:
+
+1. Project -- a given git branch being tracked
+2. Version -- a single commit in a project
+3. Variant -- an environment for running tests in; each version in a project can be run on multiple variants (e.g. Windows/Linux/OSX/Solaris, Enterprise, SSL-enabled, etc.)
+4. Task -- a unit of work (usually a suite of tests or a compile); tasks are run in the environment established by the variant
+
+In short, each commit to a git branch results in a new version, which runs multiple variants that each run a set of tasks.
+
+## Project Visualizations
+
+There are three ways to get a view of the state of a project:
+
+## Waterfall
+![waterfall.png](../images/waterfall.png)
+This is Evergreen's default view.
+It displays a set of columns, each represents a version (commit) to the current project, the most recent commit being on the left (unlike it's namesake geographic formation, Evergreen's waterfall moves from left to right).
+Each row in the column is a build variant, and each bar in a row is a task.
+The tasks are colored green for success, yellow for in-progress, and red for failure.
+Blank bars are not scheduled to run and gray bars are scheduled but waiting for execution.
+You can click on any task in order to see its task page, which contains detailed information and logs.
+
+## Timeline
+![timeline.png](../images/timeline.png)
+This view displays each version in a more verbose way than the waterfall page.
+Each version is presented in its own section of the page, with each variant given its own box within that section.
+The variant headers or tasks can be clicked on for more information.
+
+## Grid
+![grid.png](../images/grid.png)
+This view shows the state of a single version.
+It displays each task as a square in a grid of build variants plotted against tasks.
+Clicking on a square will open a pop-up with task history information.
+This view should be more familiar to users of other continuous integration tools, like Jenkins.
+
+## Version, Build, and Task Visualizations
+
+## Versions
+![version.png](../images/version.png)
+The version page is mostly here to get you to other pages.
+The page contains links to each build variant and task created for the given version.
+A panel on the right displays a condensed history of the versions for the commits surrounding it.
+
+## Builds
+![build.png](../images/build.png)
+The build page shows the status of one of a version's variants (e.g. Windows32 on commit 0bed4262da).
+This page shows the status and time taken by each of the variant's tasks.
+The most recent completely-passing version for a build is given in the lower-left.
+
+## Tasks
+![task.png](../images/task.png)
+This is probably the page you'll be spending the most time with.
+Versions and build variants are the skeleton holding up Evergreen; tasks are the organs and muscles.
+
+The task page contains execution information of one task for one variant in a version.
+It offers the results and logs of the tests executed as part of the tasks (right panel) and general logs from the task's execution (bottom panel).
+On the left side of the screen, you can see the history for that task across version, along with test failure information.
+This sidebar is your best friend when it comes to diagnosing test failures.
+
+## Task Statuses
+
+Evergreen's New UI has the following task statuses. These statuses are described below.
+> ![image](https://user-images.githubusercontent.com/94386332/176959251-0f71c73a-9c79-4c7b-909a-6869558142ac.png)
+
+* Succeeded - Task completed successfully
+* Failed - Task has failed. A task can fail either because a test failed or because a task command exited non-zero.
+* Known Issue - This is a subset of Failed, and it means that a failed task contains a task annotation with a non-empty issues list. Task annotations can be created by external services such as the Build Baron teamâs failure triage tool, or can be added manually. Task annotation permissions are managed through MANA.
+* Setup Failed - Users can set a default failure type of "test", "system", or "setup". They can also set that type for individual commands. These cause a failing command to turn the task into a test (red), system (purple), or setup (lavender) failure.
+* Task Timed Out - A task timed out, whether due to a large cumulative time taken or a large amount of time for one single command. Evergreen tasks have a default timeout duration of 6 hours, and Evergreen commands have a default timeout duration of 2 hours. [There](../Configure-a-Project/Project-Configuration-Files#pre-post-and-timeout.) are two types of timeouts in Evergreen, exec_timeout_secs and timeout_secs, and they are further documented here.
+* Dispatched - Evergreen has started to dispatch a task to a host, but the task is not yet being executed.
+* Running - Task is currently running.
+* Will Run - Task is in the task queue and will run in the future. Hasnât been dispatched.
+* Pending - Pending tasks have unmet dependencies, but they will be queued to run.
+
+* System Unresponsive - System unresponsive means that the task has failed because Evergreen has not heard from the agent on that host in a while.
+
+* System Timed Out - System timed out means that there was a timeout (exec_timeout_secs or timeout_secs was reached) and the running command was labeled "system" (as opposed to "test" or "setup").
+
+* System Failed - Either a host was reaped or the host was terminated by AWS for some reason or the task has failed and the failing command was labeled âsystemâ on the projectâs YAML, as opposed to âtestâ or âsetupâ.
+* Aborted - Task was aborted, either by the user or by Evergreen. There are several ways to abort a running task. For example, users can manually abort a task from the task page, and they can abort all running tasks from the UI or CLI when restarting a patch. Additionally, tasks can be aborted by Evergreen in scenarios where doing so would conserve execution resources. For example, Evergreen can abort tasks in a given commit queue build, if any one task fails in that commit queue build, since there's no need to continue executing the build in that case. For PR-based workflows, a patch is created when you open a PR, and a new commit aborts all running tasks associated with the patch and creates a new patch.
+* Blocked - Task is blocked on a dependency, and the dependency has finished with a status other than the one the task depends on. If the task is configured to override dependencies the task will be set to run instead.
+* Unscheduled - Unscheduled tasks are not scheduled to run, and require action from the user in order to be executed by Evergreen.
+
+### Task Lifecycle
+Broadly, the state of any given task can be described by one of 3 fundamental stages: **scheduled, in-progress, and finished.** The stage that a task is in dictates what operations are permitted on it by the user.
+#### Scheduled
+Statuses that correspond here are:
+* Pending
+* Will Run
+* Dispatched
+
+This indicates that the task has yet to begin executing, but Evergreen has the intention of executing the task in the near-future. Since these tasks have not yet begun executing, they cannot be restarted nor can they be aborted. If you wish to prevent a scheduled task from being executed, you may unschedule it and Evergreen will ignore it until it is re-scheduled. For tasks that are not yet in the dispatched category, the priority for a task may also be modified, where a higher priority (up to 100) will prioritize the task running relative to other scheduled tasks, and the minimum priority that can be se is -1, which is akin to manually unscheduling a task.
+#### In-progress
+Statuses that correspond here are:
+* Running
+
+A running task cannot be re-scheduled, and it cannot be restarted directly. We must either wait for it to complete, or we may prematurely abort the task, causing it to fail, at which point we may restart the task. Note that the task will likely not be able for restart immediately after it is aborted because clicking abort simply marks the task to get aborted, and it usually takes Evergreen a few seconds to notice this and stop the task's execution.
+#### Finished
+Statuses that correspond here are:
+* Succeeded
+* Failed
+* Known Issue
+* Setup Failed
+* Task Timed Out
+* System Unresponsive
+* System Timed Out
+* Aborted
+* Blocked
+
+These tasks may be immediately restarted, but they cannot be aborted or scheduled since they have already completed.
+
diff --git a/docs/Get-Results/Materialized-Intelligence.md b/docs/Get-Results/Materialized-Intelligence.md
new file mode 100644
index 00000000000..6e3535ff0a6
--- /dev/null
+++ b/docs/Get-Results/Materialized-Intelligence.md
@@ -0,0 +1,37 @@
+# Analyze Data with Materialized Intelligence
+
+Materialized Intelligence is R&D Developer Productivity's data offering for downstream analytics and business intelligence. We aim to provide a self-service platform for users to access and analyze data from Evergreen and other Dev Prod projects. This platform leverages [Mongo Trino](https://docs.dataplatform.prod.corp.mongodb.com/docs/Trino/Introduction) and [Mongo Automated Reporting System](https://docs.dataplatform.prod.corp.mongodb.com/docs/MARS/Introduction) (MARS) so that users can access any quantity of data without waiting on Dev Prod teams and without impacting production Dev Prod systems.
+
+## Getting Started
+
+### Mongo Trino Access
+All Mongo engineers are automatically granted basic read access to Trino, see the [Internal Data Platform Security](https://wiki.corp.mongodb.com/display/DW/Internal+Data+Platform+Security) documentation for more information. Access to the R&D Dev Prod data in Trino is governed through the [Internal Data Platform - Dev Prod Read](https://mana.corp.mongodbgov.com/guilds/61a43c5a210c1301d0b81297) MANA guild. Most engineering teams should have already been granted membership to this guildâif you or your team does not have access, please request membership via MANA.
+
+### Connecting to the Database
+Check out the [Mongo Trino](https://docs.dataplatform.prod.corp.mongodb.com/docs/Trino/Introduction) documentation and, more specifically, the [DBeaver Connection](https://docs.dataplatform.prod.corp.mongodb.com/docs/Trino/DBeaver%20Connection) page to get started! Users are free to choose another database tool of their liking to connect and interact with Mongo Trino. See the [Data Dictionary](https://docs.google.com/document/d/1rSB9Xc7c7yrF7q4V_kWrJLw-8N4X5BNlT6S0xf-NdsY/edit?pli=1#heading=h.meqwpfqi1sn4) section for an exhaustive list of our data in Trino and example queries to get started!
+
+## Data Dictionary
+This section provides the most up-to-date description of our data sets in Trino, see the [Trino concepts documentation](https://trino.io/docs/current/overview/concepts.html#schema) for more information on the terminology used. Data is exposed via well-designed views, see our [Data Policies](https://github.com/10gen/dev-prod-etls/blob/main/docs/policies.md) for more information. **Only the data sets exposed via a view and documented here are considered "production-ready", all others are considered "raw" and may be accessed at the peril of the user**.
+
+### Evergreen Test Statistics
+Daily aggregated statistics for test executions run in Evergreen. Test stats are aggregated by project, variant, task name, test name, request type, and the UTC date on which the test ran and partitioned by the project and date (in ISO format). For example, the partition `mongodb-mongo-master/2022-12-05` would contain the daily aggregated test stats for all tests run on `2022-12-05` in the `mongodb-mongo-master` project. When running queries against this view, it is highly recommended to always filter by project and date. Stats are aggregated by project, variant, task name, test name, request type, and the UTC date the test ran.
+
+#### Table
+| Catalog | Schema | View |
+| ---------------|-----------------|------------------------------------------|
+| awsdatacatalog | dev\_prod\_live | v\_\_results\_\_daily\_test\_stats\_\_v1 |
+
+#### Columns
+| Name | Type | Description |
+|---------------------------|---------|-------------|
+| project | VARCHAR | Unique project identifier.
+| variant | VARCHAR | Name of the build variant the test ran on.
+| task\_name | VARCHAR | Name of the task that the test ran under. This is the display task name for tasks that are part of a display task.
+| test\_name | VARCHAR | Name of the test.
+| request\_type | VARCHAR | Name of the trigger that requested the test execution. Will always be one of: `patch_request`, `github_pull_request`, `gitter_request` (mainline), `trigger_request`, `merge_test` (commit queue), or `ad_hoc` (periodic build).
+| num\_pass | BIGINT | The number of times the test grouping passed that day.
+| num\_fail | BIGINT | The number of times the test grouping failed that day.
+| total\_pass\_duration\_ns | DOUBLE | The average duration, in nanoseconds, of tests that passed that day.
+| task\_create\_iso | VARCHAR | The date, in ISO format `YYYY-MM-DD`, the test ran.
+
+
diff --git a/docs/Get-Results/README.md b/docs/Get-Results/README.md
new file mode 100644
index 00000000000..a43813621b2
--- /dev/null
+++ b/docs/Get-Results/README.md
@@ -0,0 +1 @@
+# Get Results
\ No newline at end of file
diff --git a/docs/Get-Results/Webhooks.md b/docs/Get-Results/Webhooks.md
new file mode 100644
index 00000000000..7d2b04c78c1
--- /dev/null
+++ b/docs/Get-Results/Webhooks.md
@@ -0,0 +1,29 @@
+# File Tickets with Webhooks
+
+## Overview
+The file ticket button in the Task Annotations tab can be configured to call a custom webhook when clicked.
+
+
+![image](https://user-images.githubusercontent.com/13104717/108771400-98a52200-7529-11eb-880b-18fb31b3218b.png)
+
+
+## Settings Configuration
+
+To configure the file ticket webhook, add an endpoint and secret to the build baron plug section of your project settings page.
+
+![image](https://user-images.githubusercontent.com/13104717/146819319-d45a58af-04da-4532-90b1-bae04307d76a.png)
+
+## Data Format
+
+Once a webhook is configured, the following data will be sent to the webhook when the button is clicked:
+```json
+{
+ "task_id": ,
+ "execution":
+}
+```
+
+## How to Update Created Tickets
+After a ticket is filed using the webhook, evergreen needs to be notified of the newly filed ticket's key and url so that the ticket can be stored and displayed to the user under **Tickets Created From This Task**. To do that, please use the [created_tickets endpoint](https://github.com/evergreen-ci/evergreen/wiki/REST-V2-Usage#send-a-newly-created-ticket-for-a-task).
+![image](https://user-images.githubusercontent.com/13104717/108778354-3f41f080-7533-11eb-8ae5-bcd9ac708724.png)
+
diff --git a/docs/Home.md b/docs/Home.md
new file mode 100644
index 00000000000..ab9d1a142c2
--- /dev/null
+++ b/docs/Home.md
@@ -0,0 +1,60 @@
+# What is Evergreen?
+
+## Evergreen
+Evergreen is a continuous integration system built by MongoDB.
+
+It utilizes multi-platform cloud computing to run tests as quickly as possible on as many platforms as possible.
+
+### Features
+##### Elastic Computing
+Evergreen was built to scale with load and provide optimal test parallelism.
+
+When there are lots of commits coming in, Evergreen can spin up new hosts to run them; when the hosts are no longer needed, Evergreen shuts them down.
+
+Use only what you need.
+
+##### Multiplatform Support
+Evergreen is built in Go.
+Your tests can run on any machine that Evergreen can cross-compile its agent for, so it can run on all of Go's myriad supported operating systems and architectures, including
+ 1. Linux
+ 2. OSX
+ 3. Windows
+ 4. FreeBSD
+
+on x86, amd64, and arm architectures.
+
+##### Precise, Actionable Feedback
+No more guessing about who broke what.
+By Default, Evergreen does not run every commit; however, in the event that something breaks, Evergreen will run failing tasks on previous commits to find the commit that caused the failure.
+Think of it like a built-in `git bisect`.
+
+Additionally, Evergreen provides multiple views of state of a build, so you can quickly determine what's breaking and when it started.
+
+##### Patch Builds
+You shouldn't have to wait until after you've committed to find out your changes break your tests.
+Evergreen comes with the powerful feature of pre-commit patch builds, which allow you to submit uncommitted changes and run them against the variants and test suites you need.
+These patch builds help alleviate the stress of multi-platform development and long-running tests by putting Evergreen's elastic, multi-platform computing right at your team's fingertips.
+
+##### Easy Configuration
+Evergreen is flexible.
+If you can do it in a shell script, you can run it with Evergreen.
+Internally, MongoDB uses Evergreen for everything from testing the main server, to compiling our documentation, creating Amazon AMIs, and even testing Evergreen itself.
+Projects are defined with simple yaml config files, see [here](https://github.com/evergreen-ci/sample/blob/master/evergreen.yml) for an example.
+
+### How It Works
+Evergreen monitors a set of github repositories, waiting for new commits.
+When a new commit comes in or enough time has passed, Evergreen schedules builds for different variants (different OSes, compile flags, etc).
+Once builds are scheduled, an internal heuristic decides how many cloud machines to allocate in order to get tests done as quickly and cheaply as possible.
+
+Evergreen sends an executable agent binary to each test machine, which begins running its given task.
+Logs are streamed back to the main server, along with system statistics and formatted test results.
+
+## Spruce: The New Evergreen UI
+
+Evergreen's UI has a few different levels of information for a given patch build. The level of hierarchy determines which information gets surfaced on the page. Although this is true to some extent in both the legacy UI and the new UI, the new UI strives to keep only information relevant to the current level on the page.
+
+The top-most level for a given patch build is the [patch details page](https://spruce.mongodb.com/version/60b68d7da4cf47179e15accf/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC). This page contains information about the patch overall, e.g., patch title, which files are changed as of the patch, and which tasks are included in the patch.
+
+The next level is the [task details page](https://spruce.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_all_feature_flags_required_jsCore_patch_0ec70f6ac70716d9296a014d52e4cc99bf4e5695_60b68d7da4cf47179e15accf_21_06_01_19_43_26/logs?execution=0), which contains information relevant to that specific task. This includes ETA if the task is running, estimated time to start and position in the task queue if the task is scheduled to run, as well as any results of the task if it has already run. Notably, the information about which files were changed in the patch are not included on this page, although they are included on the corresponding page in the legacy UI.
+
+Here are some resources to get started with Evergreen's Project health page: Here are some resources that demonstrate the new UI: [Project Health](https://app.tango.us/app/workflow/Evergreen--Onboarding-guide-for-the-new-project-health-page--7b74b28c80f448869a01730a450bc246) (Waterfall), [Filtering by status](https://app.tango.us/app/workflow/Status-icon-behavior--1db9909b454f4800b05774fa408f2924), [Variant history page](https://app.tango.us/app/workflow/Variant-History-fa73d48662f24e48842fc315130c483f), and [Task history page](https://app.tango.us/app/workflow/Task-History--23e6b3f043234a19988d6ab0a0729598).
diff --git a/docs/Modify-Evergreen/README.md b/docs/Modify-Evergreen/README.md
new file mode 100644
index 00000000000..16c67fa3347
--- /dev/null
+++ b/docs/Modify-Evergreen/README.md
@@ -0,0 +1 @@
+# Modify Evergreen
\ No newline at end of file
diff --git a/docs/Modify-Evergreen/Using-Degrade-Mode.md b/docs/Modify-Evergreen/Using-Degrade-Mode.md
new file mode 100644
index 00000000000..4606414e5b9
--- /dev/null
+++ b/docs/Modify-Evergreen/Using-Degrade-Mode.md
@@ -0,0 +1,154 @@
+# Degrade a Service
+
+## Overview
+
+This document details the decisions to be made when deciding to degrade
+(ie. disable) certain functions of Evergreen. The intended audience is
+any superuser of Evergreen.
+
+In general, you should degrade a specific service of Evergreen when
+continuing to run that service would do more harm than good, or would
+create a mess that needs to be cleaned up afterwards. Degrading any one
+service has very few direct effects on other components in the system,
+so you should feel confident that choosing to degrade a service would
+not cause unpredictable side effects. Any superuser of the system should
+feel empowered to make these changes if they think that it is
+appropriate.
+
+The interface to enable/disable each Evergreen service is available in
+the Evergreen UI from the Admin Settings page of the dropdown in the top
+right, and is also available from the "evergreen admin" CLI commands.
+Any changes to the service flags should be communicated to other
+superusers. If making a change that will be noticed by end-users (such
+as disabling task dispatch), the banner message should be set as well.
+
+## Services
+
+The following are considerations for turning off specific services:
+
+### Task Dispatch
+
+Disabling task dispatch will prevent agents from getting new tasks and
+getting new agent binaries.
+
+Disable task dispatch in scenarios where there are widespread problems
+with the agents such that tasks would either not execute correctly or
+report incorrect results. If the problem is something that can be
+quickly and safely fixed, consider instead deploying the fix and forcing
+agents to roll over to the new revision. One thing to keep in mind is
+that disabling task dispatch for over 15 minutes will cause the monitor
+to start terminating hosts for being idle, because idle is defined as
+"not processing tasks for 15 minutes."
+
+Enable task dispatch when the problem is fixed or will be fixed by
+getting a new agent revision.
+
+### Host Initialization
+
+Disabling hostinit will prevent dynamic hosts from starting and will
+prevent started hosts from running their setup script. Static hosts and
+dynamic hosts that are already running will be unaffected.
+
+Disable hostinit if:
+
+- The cloud provider for dynamic hosts is experiencing a downtime.
+- Requests to the provider cannot be sent correctly.
+- There is a problem such that Evergreen is starting more hosts than
+ needed, or more hosts than can be provisioned before the monitor
+ kills them.
+- The runner is not able to ssh into dynamic hosts
+
+Enable hostinit when the system and the cloud provider are stable enough
+such that hosts can start and be set up correctly.
+
+### Monitoring
+
+Disabling the monitor will stop it from automatically cleaning up
+stranded tasks and stop it from terminating hosts.
+
+Disable the monitor if:
+
+- Task heartbeats aren't being correctly tracked in the database.
+- The runner is not able to ssh into dynamic hosts.
+- It is too aggressively terminating hosts. Keep in mind that
+ disabling the monitor entirely to try and keep hosts up longer will
+ also disable desirable host termination policies, such as
+ terminating hosts that are idle.
+
+Enable the monitor when tasks and hosts are sufficiently stable. In
+general, the monitor should stay enabled.
+
+### Notifications
+
+Disabling notifications will stop users from receiving emails about
+build and task status changes.
+
+Disable notifications if:
+
+- The SMTP server is experiencing downtime
+- There is a problem in the system causing users to get an excessive
+ amount of notifications
+
+Enable notifications once emails can be delivered and are being sent in
+the correct quantities.
+
+### Alerts
+
+Disabling alerts will stop admins from receiving emails about potential
+system issues.
+
+Disable alerts if:
+
+- The SMTP server is experiencing downtime.
+- There are issues creating jira alerts.
+- There is a problem in the system causing admins to get an excessive
+ amount of notifications.
+
+Enable alerts once emails can be delivered and are being sent in the
+correct quantities.
+
+### Task Runner
+
+Disabling the taskrunner will prevent new hosts from getting agents
+started on them.
+
+Disable the taskrunner if:
+
+- The current agent revision has a critical bug that will not be fixed
+ soon.
+- The runner is not able to ssh into hosts.
+
+Enable the taskrunner once hosts are reachable and the current agent
+revision is the correct one to put on hosts.
+
+### Repo Tracker
+
+Disabling the repotracker will prevent Evergreen from getting recent
+commits from Github.
+
+Disable the repotracker if:
+
+- Github is experiencing downtime.
+- Github APIs are not functioning correctly.
+- There is a problem in the system causing the system to create bad
+ versions.
+
+Enable the repotracker once Github and the system are both stable and
+versions should be created again.
+
+### Scheduler
+
+Disabling the scheduler will prevent new tasks from being added to the
+task queues and will also prevent new hosts from starting.
+
+Disable the scheduler if:
+
+- There is a problem that is causing the users to create too many host
+ intent documents.
+- Agents should complete the existing tasks in the queues but not
+ receive any tasks not already in queues. Note that this is different
+ from disabling task dispatch because agents will still get new tasks
+ until the queues are empty.
+
+Enable the scheduler once task queue behavior is back to normal and the
+correct number of hosts are being requested.
diff --git a/docs/Reference/Evergreen-Ecosystem.md b/docs/Reference/Evergreen-Ecosystem.md
new file mode 100644
index 00000000000..c5e29e69b17
--- /dev/null
+++ b/docs/Reference/Evergreen-Ecosystem.md
@@ -0,0 +1,88 @@
+# Evergreen Ecosystem
+
+This is a list of libraries which Evergreen depends on and other tools and services
+which Evergreen tasks may use or interact with.
+
+## From Other CI Systems
+You can start an Evergreen patch from other CI systems.
+* [evergreen-ci/action](https://github.com/evergreen-ci/action) for GitHub Actions
+* [evergreen-ci/drone](https://github.com/evergreen-ci/drone/) for Drone.
+
+## Applications (Go)
+* [barque](https://github.com/evergreen-ci/barque) is a service that supports release
+ focusing initially on linux repository publishing, and eventually package signing,
+ release metadata and process automation.
+* [cedar](https://github.com/evergreen-ci/cedar) is collection of data-focused
+ tools for the data generated by Evergreen builds. Its focus is offline data
+ processing and providing access for tools like CLIs and visualization. Cedar,
+ like evergreen, is a web service, and shares many of the same underlying
+ libraries and architectures.
+* [curator](https://github.com/mongodb/curator) is a command-line tool we use to
+ generate package repositories and build packages. It hosts command-line tools
+ versioned independently of Evergreen, including poplar (sending and collecting
+ performance data), and jasper (managing processes), and grip (sending logs to
+ logkeeper, splunk, or cedar).
+* [evergreen](https://github.com/evergreen-ci/evergreen) is the continuous
+ integration system at the center of this ecosystem.
+* [logkeeper](https://github.com/evergreen-ci/logkeeper) is a service for
+ storing test logs in a MongoDB database.
+
+## Libraries (Go)
+* [amboy](https://github.com/mongodb/amboy) provides distributed worker queues.
+ In Evergreen the unit work on runs in these queues is called a job in order to
+ distinguish it from a task, which is a unit of work in an Evergreen project.
+ Jobs are not visible to users, but they accomplish most of the work necessary
+ for Evergreen to run, e.g., starting and provisioning hosts.
+* [anser](https://github.com/mongodb/anser) is a data migration tool for managing
+ schema evolution in MongoDB databases and Go applications. Relies on amboy
+ for orchestration and ftdc/bsonx for bson manipulation. Additionally provides a
+ compatibility layer for translating from the legacy mgo API to the new Go
+ Driver interface.
+* [aviation](https://github.com/evergreen-ci/aviation) is middleware for gRPC.
+ It is similar to gimlet, Evergreen's HTTP middleware.
+* [birch](https://github.com/evergreen-ci/bich) is a library for building and manipulating bson documents.
+* [bond](https://github.com/evergreen-ci/bond) is a library to interact with MongoDB
+ release feeds.
+* [certdepot](https://github.com/evergreen-ci/certdepot) is a set of tools for
+ creating and storing TLS certificates.
+* [ftdc](https://github.com/mongodb/ftdc) is a library that provides a Go
+ implementation for reading and generating compressed timeseries bson data
+ in the same format as MongoDB's diagnostic data package. This library
+ is used to capture and interact with performance data in Cedar and poplar.
+* [gimlet](https://github.com/evergreen-ci/gimlet) is a library for creating
+ HTTP APIs. This is Evergreen's HTTP middleware.
+* [grip](https://github.com/mongodb/grip) is a library for logging and error
+ handling. In addition to the things you would expect, it also implements
+ senders to third-party services, like Splunk, which allows Evergreen to have
+ pluggable logging to these services. Other logging/messaging back-ends
+ include: logkeeper, sumologic, splunk, email, jira tickets, github comments.
+* [jasper](https://github.com/mongodb/jasper) is a library for managing processes.
+ This is used for executing processes on app servers as well as on hosts.
+* [juniper](https://github.com/evergreen-ci/juniper) is a library that contains
+ gRPC protobuf files for Cedar.
+* [lobster](https://github.com/evergreen-ci/lobster) is React-based log viewer.
+* [mrpc](https://github.com/evergreen-ci/mrpc) a mongodb rpc protocol implementation
+ for producing arbitrary services that mongodb clients can use.
+* [pail](https://github.com/evergreen-ci/pail) is a library for interacting
+ with blob-storage systems like s3. Includes a common abstraction with
+ implementations for GridFS and local file systems.
+* [poplar](https://github.com/evergreen-ci/poplar) is a set of tools for
+ recording performance results from an Evergreen task, and provides a common
+ default implementation of a client for the performance data management
+ service in Cedar.
+* [shrub](https://github.com/evergreen-ci/shrub) is Go library for generating
+ Evergreen configuration files.
+* [spruce](https://github.com/evergreen-ci/spruce) is Evergreen's new
+ React-based UI.
+* [timber](https://github.com/evergreen-ci/timber) is the client library for
+ cedar. It gives agents the ability to send task data somewhere for processing.
+
+## Libraries (Python, JS, Emacs)
+* [evergreen.el](https://github.com/mongodb/evergreen.el) is an Emacs package for
+ interacting with the Evergreen CLI.
+* [evergreen.js](https://github.com/evergreen-ci/evergreen.js) is a JavaScript
+ client library for Evergreen's API.
+* [evergreen.py](https://github.com/evergreen-ci/evergreen.py) is a Python
+ client library for Evergreen's API.
+* [shrub.py](https://github.com/evergreen-ci/shrub.py) is a Python library for
+ generating Evergreen configuration files.
diff --git a/docs/Reference/Glossary.md b/docs/Reference/Glossary.md
new file mode 100644
index 00000000000..a581a5d2ea6
--- /dev/null
+++ b/docs/Reference/Glossary.md
@@ -0,0 +1,18 @@
+# Glossary
+
+* **build**: A build is a set of tasks in a single build variant in a single version.
+* **build variant**: A build variant is a distro configured in a project. It contains a distro name and some metadata.
+* **command**: A tasks runs one or more commands. There are separate commands to do things like run a program or upload a file to s3.
+* **display task**: A display task is a set of tasks grouped together in the UI by the project configuration. Display tasks have no set distro.
+* **distro**: A distro is a set of hosts that runs tasks. A static distro is configured with a list of IP addresses, while a dynamic distro scales with demand.
+* **expansions**: Expansions are Evergreen- and user-specified variables that can be used in the project configuration file. They can be set by the `expansions.update` command, in the variant, on the project page, and on the distro page.
+* **function**: Commands may be grouped together in functions.
+* **patch build**: A patch build is a version not triggered by a commit to a repository. It either runs tasks on a base commit plus some diff if submitted by the CLI or on a git branch if created by a GitHub pull request.
+* **project configuration file**: The project configuration file is a file parsed by Evergreen that defines commands, functions, build variants, and tasks.
+* **stepback**: When a task fails and the same task has not run in previous versions, we will incrementally run the same task in previous versions until we get to a version where the test passes, in order to find which commit introduced the failure.
+* **task group**: A task group is a set of tasks which run with project-specified setup and teardown code without cleaning up the task directory before or after each task and without any tasks running in between tasks in the group.
+* **task**: The fundamental unit of execution is the task. A task corresponds to a box on the waterfall page.
+* **test**: A test is sent to Evergreen in a known format by a command during a task, parsed by Evergreen, and displayed on the task page.
+* **user configuration file**: The user configuration file is a file parsed by the Evergreen CLI. It contains the userâs API key and various settings.
+* **version**: A version, which corresponds to a vertical slice of tasks on the waterfall, is all tasks for a given commit or patch build.
+* **working directory**: The working directory is the temporary directory which Evergreen creates to run a task. It is available as an expansion.
diff --git a/docs/Reference/README.md b/docs/Reference/README.md
new file mode 100644
index 00000000000..4a938e09d06
--- /dev/null
+++ b/docs/Reference/README.md
@@ -0,0 +1 @@
+# Reference
\ No newline at end of file
diff --git a/docs/Run-Tasks/Commit-Queue.md b/docs/Run-Tasks/Commit-Queue.md
new file mode 100644
index 00000000000..a73e8cffa91
--- /dev/null
+++ b/docs/Run-Tasks/Commit-Queue.md
@@ -0,0 +1,198 @@
+# Add Your PR or Patch to the Commit Queue
+
+Evergreen's commit queue merges changes after the code has passed a set of tests.
+
+## Rationale
+Gating every merge on a green build means every commit on the tracked branch had a green build. This way:
+* No one bases their work on broken code.
+* Every commit on the mainline branch is potentially releasable/deployable.
+
+## Workflow
+The following is what logically happens, though Evergreen will parallelize tests for speed.
+1. Changes are ready to be introduced to the repo.
+
+![repo_tree.png](../images/repo_tree.png)
+
+2. The changes are added to the end of the commit queue.
+
+![queue.png](../images/queue.png)
+
+3. When the changes come to the front of the queue, a set of tests are run on the changes.
+
+![merge_test.png](../images/merge_test.png)
+
+4. If the tests pass, the merge commit is pushed to GitHub.
+
+## Modes of Operation
+Changes can be added to the commit queue from pull requests, the CLI, or the UI.
+### PR
+For projects that use GitHub pull requests for code review, the commit queue integrates with the PR workflow. When the PR is approved and ready to be merged, changes are added to the queue through the PR and commit queue feedback is provided in status checks on the PR.
+#### Trigger
+Add a PR to the commit queue by adding a comment on the PR: `evergreen merge`
+
+![comment.png](../images/comment.png)
+
+If successful, the PR will be merged with the PR title as the commit title. Any text after a newline in the "evergreen merge" comment will be added as the commit message.
+
+#### Feedback
+Evergreen sends a status to the PR when the changes are enqueued, when the merge test has begun, and when the merge test is complete. Once the merge test has begun, the status links to the version. Note that because the commit queue merge is itself a Github check, you should omit the "evergreen/commitqueue" check from branch protection settings, if you require that checks pass before a PR can merge.
+
+![github_status.png](../images/github_status.png)
+![github_status_fail.png](../images/github_status_fail.png)
+
+#### Set-Module
+NOTE: this feature isn't currently working as expected. Fix is being tracked in [EVG-18256](https://jira.mongodb.org/browse/EVG-18256).
+Add other PRs for repos defined as modules in the project's configuration file with the `--module MODULE:PR` option to the `evergreen merge` comment, where MODULE is the name of a module defined in the evergreen.yml project configuration file and PR is the PR number in the module's repo. When the test passes all the PRs will be merged. The option can be repeated for multiple modules. For instance:
+
+![set-module_comment.png](../images/set-module_comment.png)
+
+The module can only be set when initially adding the main PR to the commit queue since the test is immediately finalized.
+
+### CLI
+For projects using other code review tools, changes can be uploaded to Evergreen using the `evergreen commit-queue` subcommands in the Evergreen CLI.
+#### Trigger
+`evergreen commit-queue merge --project `
+
+Enqueue the branch checked out in Git on the project's commit queue to be merged into the project's tracked branch.
+
+##### Options
+* `--pause`
+
+Upload the changes, but don't begin to test the changes. Used in conjunction with `evergreen commit-queue set-module` when the changes include corresponding changes to a module.
+
+* `--resume [ID]`
+
+Enqueue changes previously uploaded and paused. [ID] is the patch ID printed to the console when uploading the paused (unfinalized) patch.
+
+* `--commits [value], -c [value]`
+
+Pass in either a single commit hash, or a range `..` where `` is excluded from the range, and hash1 is an ancestor of hash2.
+
+* `--force`
+
+This flag forces the patch to the front of the queue. Use this sparingly and only for urgent scenarios, such as an urgent revert.
+
+#### Feedback
+The merge is performed by a "Commit Queue Merge" task added to the patch when the changes reach the head of the queue.
+
+![merge_task.png](../images/merge_task.png)
+
+#### Set-Module
+`evergreen commit-queue set-module --patch --module `
+
+Add changes to a project module.
+
+##### Options
+* `--patch [ID], --id [ID], -i [ID]`
+
+Add to patch ID created with `evergreen commit-queue merge --pause`
+
+* `--module [module], -m [module]`
+
+Module name as defined in the project configuration file.
+
+##### CLI Set-Module Workflow
+1. Upload the main changes to Evergreen. Retain the patch ID printed to the console.
+
+`evergreen commit-queue merge --pause ...`
+
+2. For each module to be merged, add the module to the patch
+
+`evergreen commit-queue set-module --id ...`
+
+3. Enqueue the changes on the commit queue
+
+`evergreen commit-queue merge --resume ...`
+
+### UI
+
+You can enqueue a **successful** patch to the commit queue using the Add to Commit Queue button (assuming that you own the patch or are a project administrator).
+
+![add_to_queue.png](../images/add_to_queue.png)
+
+All commits in the patch will be squashed, unless the patch was created using `--preserve-commits`. In this case, the commits will be tested together but merged separately. The title of the testing patch will be "Commit Queue Merge: <- " and if merged successfully, each commit will be merged with the commit title ( in the testing patch).
+
+![enqueue_patch.png](../images/enqueue_patch.png)
+
+## Notifications
+Adjust your notifications on commit queue milestones on the [Notifications page](https://evergreen.mongodb.com/notifications).
+
+![notifications.png](../images/notifications.png)
+
+Milestones include:
+* Changes reached the head of the queue and merge test has begun.
+* Merge test passed/failed
+
+## Configuration
+Project admins configure the commit queue through the [Projects page](https://spruce.mongodb.com/projects) in the Evergreen UI. Some settings are only available on spruce, so using the legacy UI for project settings is not recommend. On a per project basis, admin can
+* Enable and disabled the commit queue
+* Add a message to the commit queue
+* Choose the [GitHub merge method](https://help.github.com/en/articles/about-merge-methods-on-github) (squash, merge, or rebase)
+* Chose if signed commits are required
+* Chose how many approvals are required on pull requests before they can be enqueued
+* Add/remove patch definitions for tests to be run against PRs (tags or variant and task regexes)
+
+
+## Queue Monitoring
+The commit queue for a specified project can be viewed in the [web UI](https://spruce.mongodb.com/commit-queue/mongodb-mongo-master)
+Additionally, the Evergreen CLI exposes two subcommands under `evergreen commit-queue` to monitor the commit queue
+
+### List
+`evergreen commit-queue list --project `
+
+List the patches on the project's queue.
+
+#### Options
+* `--project PROJECT, -p PROJECT` list the queue of PROJECT
+
+### Delete
+`evergreen commit-queue delete --item - `
+
+Delete a patch from a queue. Must be the user who uploaded the patch or a project admin.
+If the patch is already picked up by the commit queue it will not be allowed to merge.
+
+#### Options
+
+* `--item ITEM, -i ITEM`
+
+Specify the patch ID to delete or PR number (if applicable) to delete.
+
+## Backport
+Trivial backports can be automated with the commit queue. Create a backport patch to test the changes on the target branch, choosing the tasks necessary to validate the changes on the target branch. When the backport patch passes the changes are automatically added to the target branch's commit queue. **The backport patch is not added to the commit queue until tasks chosen have passed.**
+
+![backport.png](../images/backport.png)
+
+### Creating a backport patch
+`evergreen commit-queue backport`
+
+#### Options
+* `--backport-project, -b`
+
+Select the project corresponding to the target branch to backport onto.
+
+* `--alias, -a`, `--variants, -v`, `--tasks, -t`
+
+Specify the tasks to run in the backport patch.
+
+* `--commit-sha, -s`, `--existing-patch, -e` (mutually exclusive)
+
+Specify changes to backport. `--commit-sha` specifies a single commit to cherry-pick on top of the target project's tracked branch. `--existing-patch` is the id of an existing commit queue patch in another project to pull changes from.
+
+## FAQ
+> The merge test for a PR failed. How do I resubmit?
+
+Fix the PR and type another triggering comment. Do not restart the failing task.
+
+> The commit queue hasn't picked up my changes for a while.
+
+Check your position in the queue with the CLI. Evergreen checks the head of each queue about once a minute.
+
+> My project's branch is protected and only signed commits can be merged. Can I use the commit queue?
+
+Yes, but only if you add to the commit queue from pull requests.
+
+> What will the commit message be?
+
+For PRs, the commit message will be any text you type after the "evergreen merge" comment, separated by a newline. The commit title will always be the same as the PR title.
+
+If submitted by the CLI, the commits are recreated from the commits in your local repo and will retain their messages.
diff --git a/docs/Run-Tasks/Github-Integrations.md b/docs/Run-Tasks/Github-Integrations.md
new file mode 100644
index 00000000000..89adadd9dd9
--- /dev/null
+++ b/docs/Run-Tasks/Github-Integrations.md
@@ -0,0 +1,62 @@
+# Run Tests with Github
+
+Specific Github pull request behavior can trigger behavior in Evergreen.
+
+## Help Text
+
+```
+evergreen help
+```
+
+We have documentation here but we also provide it on the PR itself. It will display commands that are available for your project, with some context about when to use them. If the commit queue is disabled but there is an available message, we will still display the message. If PR testing isn't enabled for the branch but [PR testing is set up for untracked branches](../Configure-a-Project/Using-Repo-Level-Settings#how-to-use-pr-testing-for-untracked-branches) then we will also still show the related Github Pull request commands (detailed below).
+
+
+## Github Pull Request Testing
+
+Evergreen has an option to create patches for pull requests and this can be defined on the project page.
+
+If "Automated Testing" is enabled, Evergreen will automatically create a patch for each pull request opened in the repository as well as each subsequent push to each pull request.
+
+If you'd like the option of creating patches but wouldn't like it to happen automatically, you can enable "Manual Testing".
+
+You can read more about these options [here](../Configure-a-Project/Project-and-Distro-Settings.md#github-pull-request-testing).
+
+#### Retry a patch
+
+```
+evergreen retry
+```
+Sometimes Evergreen has trouble creating a PR patch, due to internal server errors or Github flakiness. Commenting `evergreen retry` will attempt to recreate this patch.
+
+Note that this is specific to Github PR checks; it won't retry a commit queue patch. For that, re-type `evergreen merge` (detailed below).
+
+#### Create a patch for manual testing
+
+```
+evergreen patch
+```
+If your project is configured for manual testing, then Evergreen will only add Github checks to the PR when prompted, as opposed to for every commit. Commenting `evergreen patch` will trigger this.
+
+#### Refresh Github checks
+
+```
+evergreen refresh
+```
+Sometimes Evergreen has trouble sending updated Github statuses, so the checks on the PR may not accurately reflect the state of patch on Evergreen. This is especially troublesome when the repository requires passing checks. To re-sync the Github checks with Evergreen, comment `evergreen refresh` on the PR.
+
+## Commit Queue
+
+Evergreen's commit queue merges changes after the code has passed a set of tests. You can read more about this [here](Commit-Queue#commit-queue).
+
+#### Add a PR to the commit queue
+
+```
+evergreen merge
+
+```
+
+To add a PR to the commit queue, comment `evergreen merge`. Any text after the newline will be added as the commit message.
+
+
+
+
diff --git a/docs/Run-Tasks/README.md b/docs/Run-Tasks/README.md
new file mode 100644
index 00000000000..69a739511f4
--- /dev/null
+++ b/docs/Run-Tasks/README.md
@@ -0,0 +1 @@
+# Run Tasks
\ No newline at end of file
diff --git a/docs/Start-Hosts/Developer-Workstations.md b/docs/Start-Hosts/Developer-Workstations.md
new file mode 100644
index 00000000000..e855b7e1f01
--- /dev/null
+++ b/docs/Start-Hosts/Developer-Workstations.md
@@ -0,0 +1,97 @@
+# Spawn a Workstation
+
+## Overview
+
+Evergreen provides a special class and configuration of spawn hosts for
+use as _virtual workstations_ to provide a cloud-managed developer
+environment similar to Evergreen's execution environment. These
+workstations can use the same configuration as build hosts, but also have:
+
+- a persistent volume attached to each image (mounted at
+ `~`) that moves between
+ instances, so users can upgrade by terminating their instance and
+ starting a new one.
+
+- a web-based IDE based on [Code Server](https://github.com/cdr/code-server),
+ which is a distribution of the open source components of
+ VSCode. This runs remotely on the workstation and proxies through
+ the Evergreen application layer for a fully featured remote editing
+ experience.
+
+- Evergreen supports an "unexpirable" spawn host which isn't
+ subjected to the termination deadline of most spawn hosts. While
+ there is a global per-user limit for unexpirable hosts,
+ workstations will, by default.
+
+- Evergreen supports a start/stop mode for spawn hosts. This makes it
+ possible for users to change to another instance type, though
+ administrators must configure the allowable instance types. Users
+ can also opt to stop hosts during vacations and other periods of
+ known inactivity.
+
+Administrators need to configure workstation instances to include the
+[IDE](https://github.com/evergreen-ci/ide), and any other software
+required for development. There is no limit to the number of distinct
+workstation images available in the system.
+
+Evergreen site and project administrators should provide specific
+documentation for using these workstations in the course of normal
+development.
+
+## Project Setup
+
+To support easier workstation setup, project configurations and the
+Evergreen CLI tool have a "project setup" command to help get projects
+checked out and running on workstations, though this feature is not
+necessarily dependent on workstations, and could be used on local
+systems.
+
+Project configuration include a "Workstation Setup" section where
+administrators declare a number of simple commands (and directory
+contexts) that will run a project's setup. These commands are *not*
+shell interpolated, and are *not* meant to provision the development
+environment (e.g. install system packages or modify configuration
+files in `~/`). Use these commands to clone a repository, generate
+index files, and/or run a test build.
+
+As a prerequisite, users of the project setup *must* have configured
+their SSH keys with Github, with access to the Github repositories
+required for their project. The commands will assemble a clone
+operation for the project's core repository when selected, but
+required modules or other repositories would need to be cloned
+directly in another command.
+
+The Evergreen CLI would resemble:
+
+ evergreen host configure --project=evergreen --distro=ubuntu1804-workstation
+
+This will run the clone (if configured) and setup commands in the
+workstation distro's mounted volume directory
+`~/user_home/evergreen`. Directories will be created prior to execution.
+
+Commands that specify a directory will run as a sub-directory of the
+project directory. This allows a user to have multiple projects
+checked out in their persistent workspace. While this doesn't allow
+interaction between the setups of potentially similar projects, it
+greatly reduces the internal complexity of running setup.
+
+To test workstation setup commands locally, the `--dry-run` argument
+causes all commands to noop, printing the commands that would have
+run.
+
+You may also omit the `--distro` argument to use locally. This makes
+it possible to set your own `--directory` and setup a project at the
+location of your choice. The project directory and intermediate
+required directories will be created as normally. The `-distro`
+argument only modifies the path of the directory *if* the distro
+specified workstation. If you specify
+`--distro` and `--directory` the `--directory` creates a prefix
+within the workstation distro's persistent home directory.
+
+## Migrate a volume to a new workstation
+
+To facilitate upgrading your virtual workstations, home volumes can be migrated to a new workstation using the âMigrateâ button on the [My Volumes](https://spruce.mongodb.com/spawn/volume) page:
+
+
+
+This feature will allow you to configure the parameters of a new host. It will then move the volume over to the new workstation and set the old host to expire in 24 hours.
diff --git a/docs/Start-Hosts/README.md b/docs/Start-Hosts/README.md
new file mode 100644
index 00000000000..e8446999479
--- /dev/null
+++ b/docs/Start-Hosts/README.md
@@ -0,0 +1 @@
+# Start Hosts
\ No newline at end of file
diff --git a/docs/Start-Hosts/Spawn-Hosts.md b/docs/Start-Hosts/Spawn-Hosts.md
new file mode 100644
index 00000000000..2af9effdc43
--- /dev/null
+++ b/docs/Start-Hosts/Spawn-Hosts.md
@@ -0,0 +1,33 @@
+# Spawn a Host
+
+If a test fails on a platform other than the one you develop on locally, you'll likely want to get access to a machine of that type in order to investigate the source of the failure. You can accomplish this using the spawn hosts feature of evergreen.
+
+## Making a distro "spawnable"
+
+Evergreen administrators can choose to make a distro available to users for spawning by checking the box on the distro configuration panel labeled *"Allow users to spawn these hosts for personal use"*
+
+Only distros backed by a provider that supports dynamically spinning up new hosts (static hosts, of course, do not) allow this option.
+
+## Spawning a Host
+
+Visit `/spawn` to view the spawn hosts control panel. Click on "Spawn Host" and choose the distro you want to spawn, and choose the key you'd like to use (or provide a new one).
+
+## Spawning a Host From a Task
+
+Alternately, for a task that ran on a distro where spawning is enabled, you will see a "Spawn..." or "Spawn Host" link on its task page.
+
+![task_page_spawn_host.png](../images/task_page_spawn_host.png)
+
+Clicking it will pre-populate the spawn host page with a request to spawn a host of that distro, along with the option to fetch binaries and artifacts associated with the task and any tasks that it depended on.
+
+![spawn_host_modal.png](../images/spawn_host_modal.png)
+
+Fetching artifacts can also be performed manually; see [fetch](../Using-the-Command-Line-Tool.md#fetch) in the Evergreen command line tool documentation.
+
+Artifacts are placed in /data/mci. Note that you will likely be able to ssh into the host before the artifacts are finished fetching.
+
+
+If your project has a project setup script defined at the admin level, you can also check "Use project-specific setup script defined at ..." before creating the spawn host. You can check if there are errors fetching artifacts or running this script on the host page: ``https://spruce.mongodb.com/host/``.
+
+
+EC2 spawn hosts can be stopped/started and modified from the Spawn Host page, or via the command line, which is documented in [Basic Host Usage](../Using-the-Command-Line-Tool.md#basic-host-usage) in the Evergreen command line tool documentation.
diff --git a/docs/Use-the-API/Evergreen-GraphQL-API.md b/docs/Use-the-API/Evergreen-GraphQL-API.md
new file mode 100644
index 00000000000..fe8e022a0b9
--- /dev/null
+++ b/docs/Use-the-API/Evergreen-GraphQL-API.md
@@ -0,0 +1,155 @@
+# Evergreen GraphQL API
+
+Welcome to the beta version of the Evergreen GraphQL API! This API provides read
+and write access to various pieces of data found in Evergreen. You can use the
+GraphQL Playground, which can be found at https://evergreen.mongodb.com/graphql,
+to experiment with and explore the available data.
+
+If you intend to use this API for production-level code, we ask that you get in
+touch with us to ensure proper support. However, if you wish to perform
+exploratory operations, there is no need to seek prior authorization.
+
+## Authentication
+
+To access any GraphQL endpoint, ensure you pass the mci-token cookie along with
+your request to authenticate your session with the Evergreen API, providing read
+and/or write access as required.
+
+## Directives
+
+Evergreen's GraphQL API includes directives that manage permissions for specific
+pieces of data. These directives add additional functionality to fields and
+types. A common directive used in Evergreen's GraphQL API is
+`@requireProjectAccess`. Before calling a query that has this directive, ensure
+the caller has permissions to view a project. You can find the other directives
+[here](https://github.com/evergreen-ci/evergreen/blob/d96942bcf0c26b158b8b1313bd27786f7a7c31a7/graphql/schema/directives.graphql).
+
+## Limitations and Future Improvements
+
+The Evergreen GraphQL API is currently in beta and not intended for public use,
+so we cannot guarantee field consistency between releases. However, when we
+deprecate a field, we mark it with the @deprecated directive. You can configure
+your GraphQL client to issue warnings when using these fields. Additionally,
+GraphQL's type safety ensures that you will be notified if fields change. We
+recommend staying up to date with our API changes to ensure application
+compatibility with Evergreen.
+
+## Documentation
+
+The Evergreen GraphQL API is self-documenting, meaning that you can use the
+GraphQL Playground to explore the available data and fields. More comprehensive
+documentation is currently being created to help fully utilize the API.
+
+## Examples
+
+GraphQL queries offer efficient ways to retrieve information in single requests,
+compared to its REST counterpart. Below are a couple of examples:
+
+This query retrieves the latest 5 mainline commits and filters the tasks to only
+include those with a successful `e2e_test` task. Additionally, it fetches the
+log links for each test associated with these tasks. Previously, achieving this
+functionality would require multiple synchronous API calls and application-level
+logic utilizing the traditional REST API. However, with our GraphQL API, it can
+be accomplished in a single declarative request.
+
+```graphql
+# Query with variables defined
+query ($options: MainlineCommitsOptions!, $buildVariantOptions: BuildVariantOptions!) {
+ # Pass in the options to the mainlineCommits query
+ mainlineCommits(options: $options, buildVariantOptions: $buildVariantOptions) {
+ versions {
+ version {
+ id
+ # Pass in the options to the buildVariants query
+ buildVariants(options: $buildVariantOptions) {
+ tasks {
+ displayName
+ execution
+ tests {
+ testResults {
+ testFile
+ status
+ logs {
+ urlParsley
+ urlRaw
+ }
+ }
+ totalTestCount
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+```json
+// Query Variables
+{
+ "options": {
+ "projectIdentifier": "spruce",
+ "limit": 5
+ },
+ "buildVariantOptions": {
+ "tasks": ["e2e_test"],
+ "statuses": ["success"]
+ }
+}
+```
+
+Take the below query which fetches both a task and its base task. Traditionally, fetching the desired data would have required a minimum of two requests for a given task using the REST API. With GraphQL, however, it can be achieved in just one request. Additionally, we only return the data that is required by the application requesting the data.
+
+```graphql
+{
+ task(taskId:"", execution:0){
+ id
+ status
+ execution
+ displayName
+ baseTask {
+ id
+ execution
+ status
+ displayName
+ }
+ }
+}
+```
+
+## Type Safety and Code Generation
+
+One of the key benefits of using GraphQL is its strong type safety. GraphQL uses
+a type system to define the shape of the data available in the API. This means
+you can catch errors related to missing or incorrect data at compile time. To
+utilize this type safety, you can generate client-side code in your preferred
+programming language.
+
+Code generation tools are available in the GraphQL ecosystem, including
+[graphql-codegen](https://the-guild.dev/graphql/codegen/docs/getting-started),
+which generate strongly typed APIs based on our GraphQL schema. This means you
+can write code that directly interacts with the API without manually parsing the
+response data or worrying about type mismatches.
+
+## SLA's and SLO's
+
+As queries are determined by the client, we cannot guarantee the performance of
+our GraphQL API. We aim for a response time of less than 2 seconds for most
+requests, complex or resource-intensive queries may take longer. Although we
+currently monitor query performance, we plan to introduce field-level monitoring
+for targeted performance improvements. Optimizing queries to minimize
+performance impact and caching (if appropriate) is advisable.
+
+Due to tracing parameters included in almost all queries, exposing field-level
+performance data for each requested resolver using the
+[apollo-tracing format](https://github.com/apollographql/apollo-tracing), you
+can utilize a Chrome extension tool called
+[Apollo Tracing](https://chrome.google.com/webstore/detail/apollo-tracing/cekcgnaofolhdeamjcghebalfmjodgeh?hl=en-US)
+to better design queries, providing a helpful visual representation of
+field-level performance characteristics.
+
+## Feedback and Support
+
+We welcome your feedback and support during Evergreen GraphQL API development.
+If an issue arises or you have any suggestions or feedback, please contact the
+Evergreen team.
\ No newline at end of file
diff --git a/docs/Use-the-API/README.md b/docs/Use-the-API/README.md
new file mode 100644
index 00000000000..6cfb5bcc565
--- /dev/null
+++ b/docs/Use-the-API/README.md
@@ -0,0 +1 @@
+# Use the API
\ No newline at end of file
diff --git a/docs/Use-the-API/REST-V1-Usage.md b/docs/Use-the-API/REST-V1-Usage.md
new file mode 100644
index 00000000000..7ea1b160675
--- /dev/null
+++ b/docs/Use-the-API/REST-V1-Usage.md
@@ -0,0 +1,526 @@
+# Legacy API v1
+----------
+
+*Note*: For the REST v2 API documentation, please see [REST V2 Usage](REST-V2-Usage).
+
+## A note on authentication
+
+Most of the these REST endpoints do not require authentication to access.
+However, if the task, build, version, etc. that you are attempting to access is part of a private project, auth information is required to access.
+Attempts to load private pages with a public REST call receive a 302 FOUND response. The V2 REST routes will return a 404 if no authentication headers are sent, or if the user is invalid.
+
+The simplest way to do this is to use your `user` and `api_key` fields from the Settings page.
+Authenticated REST access requires setting two headers, `Api-User` and `Api-Key`.
+
+### Example
+
+```bash
+ curl -H Api-User:my.name -H Api-Key:21312mykey12312 https://evergreen.example.com/rest/v1/projects/my_private_project
+```
+## Retrieve a list of active project IDs
+
+ GET /rest/v1/projects
+
+_Note that you must use API credentials to see private projects._
+
+### Request
+
+ curl https://localhost:9090/rest/v1/projects
+
+### Response
+
+```json
+{
+ "projects": [
+ "mci",
+ "mongodb-mongo-master-sanitize",
+ "mongo-c-driver"
+ ]
+}
+```
+
+## Retrieve info on a particular project
+
+ GET /rest/v1/projects/{project_id}
+
+_Note that you must use API credentials to see private projects._
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/projects/mci
+
+### Response
+
+```json
+{
+ "owner_name": "evergreen-ci",
+ "repo_name": "evergreen",
+ "branch_name": "master",
+ "repo_kind": "github",
+ "enabled": true,
+ "private": false,
+ "batch_time": 1200,
+ "remote_path": "self-tests.yml",
+ "identifier": "mci",
+ "display_name": "Evergreen Self-Tests",
+ "local_config": "",
+ "deactivate_previous": true,
+ "tracked": true,
+ "repotracker_error": null
+}
+```
+
+## Retrieve the most recent revisions for a particular project
+
+ GET /rest/v1/projects/{project_id}/versions
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/projects/mongodb-mongo-master/versions
+
+### Response
+
+```json
+{
+ "project": "mongodb-mongo-master",
+ "versions": [
+ {
+ "version_id": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "author": "Eric Milkie",
+ "revision": "d477da53e119b207de45880434ccef1e47084652",
+ "message": "SERVER-14613 corrections for gcc",
+ "builds": {
+ "amazon": {
+ "build_id": "mongodb_mongo_master_amazon_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ "name": "Amazon 64-bit",
+ "tasks": {
+ "aggregation": {
+ "task_id": "mongodb_mongo_master_amazon_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09_aggregation_amazon",
+ "status": "undispatched",
+ "time_taken": 0
+ },
+ "aggregation_auth": { ... },
+ ...
+ }
+ },
+ "debian71": { ... },
+ }
+ },
+ {
+ "version_id": "mongodb_mongo_master_d30aac993ecc88052f11946e4486050ff57ba89c",
+ ...
+ },
+ ...
+ ]
+}
+```
+
+## Retrieve a version with passing builds
+
+ GET /rest/v1/projects/{project_id}/last_green?{variants}
+
+### Parameters
+
+This endpoint requires a query string listing the variants the user would like to ensure are passing.
+Each variant is provided as a separate field (field values are not required: `?rhel55&osx-1010` is equivalent to `?rhel55=1&osx-1010=1`).
+
+At least one variant is required.
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/projects/mongodb-mongo-master/last_green?rhel55=1&rhel62=1
+
+### Response
+
+The project's most recent version for which the variants provided in the query string are completely successful (i.e. "green").
+The response contains the [entire version document](#retrieve-info-on-a-particular-version).
+
+
+
+
+## Retrieve info on a particular version by its revision
+
+ GET /rest/v1/projects/{project_id}/revisions/{revision}
+
+ or
+
+ GET /rest/v1/projects/{project_id}/revisions/{revision}
+
+_Note that the revision is equivalent to the git hash._
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/projects/mongodb-mongo-master/revisions/d477da53e119b207de45880434ccef1e47084652
+
+### Response
+
+```json
+{
+ "id": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "create_time": "2014-07-22T13:02:09.162-04:00",
+ "start_time": "2014-07-22T13:03:18.151-04:00",
+ "finish_time": "0001-01-01T00:00:00Z",
+ "project": "mongodb-mongo-master",
+ "revision": "d477da53e119b207de45880434ccef1e47084652",
+ "author": "Eric Milkie",
+ "author_email": "milkie@10gen.com",
+ "message": "SERVER-14613 corrections for gcc",
+ "status": "started",
+ "activated": true,
+ "builds": [
+ "mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ "mongodb_mongo_master_linux_64_debug_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ ...
+ ],
+ "build_variants": [
+ "Linux 64-bit",
+ "Linux 64-bit DEBUG",
+ ...
+ ],
+ "order": 4205,
+ "owner_name": "mongodb",
+ "repo_name": "mongo",
+ "branch_name": "master",
+ "repo_kind": "github",
+ "batch_time": 0,
+ "identifier": "mongodb-mongo-master",
+ "remote": false,
+ "remote_path": "",
+ "requester": "gitter_request"
+}
+```
+
+## Retrieve info on a particular version
+
+ GET /rest/v1/versions/{version_id}
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/versions/mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652
+
+### Response
+
+```json
+{
+ "id": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "create_time": "2014-07-22T13:02:09.162-04:00",
+ "start_time": "2014-07-22T13:03:18.151-04:00",
+ "finish_time": "0001-01-01T00:00:00Z",
+ "project": "mongodb-mongo-master",
+ "revision": "d477da53e119b207de45880434ccef1e47084652",
+ "author": "Eric Milkie",
+ "author_email": "milkie@10gen.com",
+ "message": "SERVER-14613 corrections for gcc",
+ "status": "started",
+ "activated": true,
+ "builds": [
+ "mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ "mongodb_mongo_master_linux_64_debug_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ ...
+ ],
+ "build_variants": [
+ "Linux 64-bit",
+ "Linux 64-bit DEBUG",
+ ...
+ ],
+ "order": 4205,
+ "owner_name": "mongodb",
+ "repo_name": "mongo",
+ "branch_name": "master",
+ "repo_kind": "github",
+ "batch_time": 0,
+ "identifier": "mongodb-mongo-master",
+ "remote": false,
+ "remote_path": "",
+ "requester": "gitter_request"
+}
+```
+
+## Retrieve the YAML configuration for a specific version
+
+ GET /rest/v1/versions/{version_id}/config
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/versions/mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652/config
+
+### Response
+
+The contents of the YAML config for the specified version will be sent back in the body of the request, using
+the header `Content-Type: application/x-yaml`.
+
+
+## Activate a particular version
+
+ PATCH /rest/v1/versions/{version_id}
+
+### Input
+
+Name | Type | Description
+--------- | ---- | -----------
+activated | bool | **Optional**. Activates the version when `true`, and deactivates the version when `false`. Does nothing if the field is omitted.
+
+### Request
+
+ curl -X PATCH https://evergreen.example.com/rest/v1/versions/mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652 -d '{"activated": false}' -H Api-User:my.name -H Api-Key:21312mykey12312
+
+### Response
+
+```json
+{
+ "id": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "create_time": "2014-07-22T13:02:09.162-04:00",
+ "start_time": "2014-07-22T13:03:18.151-04:00",
+ "finish_time": "0001-01-01T00:00:00Z",
+ "project": "mongodb-mongo-master",
+ "revision": "d477da53e119b207de45880434ccef1e47084652",
+ "author": "Eric Milkie",
+ "author_email": "milkie@10gen.com",
+ "message": "SERVER-14613 corrections for gcc",
+ "status": "started",
+ "activated": false,
+ "builds": [
+ "mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ "mongodb_mongo_master_linux_64_debug_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ ...
+ ],
+ "build_variants": [
+ "Linux 64-bit",
+ "Linux 64-bit DEBUG",
+ ...
+ ],
+ "order": 4205,
+ "owner_name": "mongodb",
+ "repo_name": "mongo",
+ "branch_name": "master",
+ "repo_kind": "github",
+ "batch_time": 0,
+ "identifier": "mongodb-mongo-master",
+ "remote": false,
+ "remote_path": "",
+ "requester": "gitter_request"
+}
+```
+
+## Retrieve the status of a particular version
+
+ GET /rest/v1/versions/{version_id}/status
+
+### Parameters
+
+Name | Type | Default | Description
+------- | ------ | ------- | -----------
+groupby | string | tasks | Determines how to key into the task status. For `tasks` use `task_name.build_variant`, and for `builds` use `build_variant.task_name`.
+
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/versions/mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652/status
+
+### Response
+
+```json
+{
+ "version_id": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "tasks": {
+ "aggregation": {
+ "amazon": {
+ "task_id": "mongodb_mongo_master_amazon_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09_aggregation_amazon",
+ "status": "undispatched",
+ "time_taken": 0
+ },
+ "debian71": { ... },
+ ...
+ },
+ "aggregation_auth": { ... },
+ ...
+ }
+}
+```
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/versions/mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652/status?groupby=builds
+
+### Response
+
+```json
+{
+ "version_id": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "builds": {
+ "amazon": {
+ "aggregation": {
+ "task_id": "mongodb_mongo_master_amazon_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09_aggregation_amazon",
+ "status": "undispatched",
+ "time_taken": 0
+ },
+ "aggregation_auth": { ... },
+ ...
+ },
+ "debian71": { ... },
+ ...
+ }
+}
+```
+
+## Retrieve info on a particular build
+
+ GET /rest/v1/builds/{build_id}
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/builds/mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09
+
+### Response
+
+```json
+{
+ "id": "mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ "create_time": "2014-07-22T13:02:09.162-04:00",
+ "start_time": "2014-07-22T13:03:18.151-04:00",
+ "finish_time": "0001-01-01T00:00:00Z",
+ "push_time": "2014-07-22T13:02:09.162-04:00",
+ "version": "mongodb_mongo_master_d477da53e119b207de45880434ccef1e47084652",
+ "project": "mongodb-mongo-master",
+ "revision": "d477da53e119b207de45880434ccef1e47084652",
+ "variant": "linux-64",
+ "number": "7960",
+ "status": "started",
+ "activated": true,
+ "activated_time": "2014-07-22T13:03:07.556-04:00",
+ "order": 4205,
+ "tasks": {
+ "aggregation": {
+ "task_id": "mongodb_mongo_master_amazon_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09_aggregation_amazon",
+ "status": "undispatched",
+ "time_taken": 0
+ },
+ "aggregation_auth": { ... },
+ ...
+ },
+ "time_taken": 0,
+ "name": "Linux 64-bit",
+ "requested": "gitter_request"
+}
+```
+
+## Retrieve the status of a particular build
+
+ GET /rest/v1/builds/{build_id}/status
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/builds/mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09/status
+
+### Response
+
+```json
+{
+ "build_id": "mongodb_mongo_master_linux_64_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09",
+ "build_variant": "linux-64",
+ "tasks": {
+ "aggregation": {
+ "task_id": "mongodb_mongo_master_amazon_d477da53e119b207de45880434ccef1e47084652_14_07_22_17_02_09_aggregation_amazon",
+ "status": "undispatched",
+ "time_taken": 0
+ },
+ "aggregation_auth": { ... },
+ ...
+}
+}
+```
+
+## Retrieve info on a particular task
+
+ GET /rest/v1/tasks/{task_id}
+
+### Request
+
+ curl https://evergreen.example.com/rest/v1/tasks/mongodb_mongo_master_linux_64_7ffac7f351b80f84589349e44693a94d5cc5e14c_14_07_22_13_27_06_aggregation_linux_64
+
+### Response
+
+```json
+{
+ "id": "mongodb_mongo_master_linux_64_7ffac7f351b80f84589349e44693a94d5cc5e14c_14_07_22_13_27_06_aggregation_linux_64",
+ "create_time": "2014-07-22T09:27:06.913-04:00",
+ "scheduled_time": "2014-07-22T10:40:09.485-04:00",
+ "dispatch_time": "2014-07-22T10:44:12.095-04:00",
+ "start_time": "2014-07-22T10:44:15.783-04:00",
+ "finish_time": "2014-07-22T10:49:02.796-04:00",
+ "push_time": "2014-07-22T09:27:06.913-04:00",
+ "version": "mongodb_mongo_master_7ffac7f351b80f84589349e44693a94d5cc5e14c",
+ "project": "mongodb-mongo-master",
+ "revision": "7ffac7f351b80f84589349e44693a94d5cc5e14c",
+ "priority": 0,
+ "last_heartbeat": "2014-07-22T10:48:43.761-04:00",
+ "activated": true,
+ "build_id": "mongodb_mongo_master_linux_64_7ffac7f351b80f84589349e44693a94d5cc5e14c_14_07_22_13_27_06",
+ "distro": "rhel55-test",
+ "build_variant": "linux-64",
+ "depends_on": [
+ "mongodb_mongo_master_linux_64_7ffac7f351b80f84589349e44693a94d5cc5e14c_14_07_22_13_27_06_compile_linux_64"
+ ],
+ "display_name": "aggregation",
+ "host_id": "i-58e6e573",
+ "restarts": 0,
+ "execution": 0,
+ "archived": false,
+ "order": 4196,
+ "requester": "gitter_request",
+ "status": "success",
+ "status_details": {
+ "timed_out": false,
+ "timeout_stage": ""
+ },
+ "aborted": false,
+ "time_taken": 287013061125,
+ "expected_duration": 0,
+ "test_results": {
+ "jstests/aggregation/mongos_slaveok.js": {
+ "status": "pass",
+ "time_taken": 25482633113,
+ "logs": {
+ "url": "http://buildlogs.mongodb.org/build/53ce78d7d2a60f5fac000970/test/53ce78d9d2a60f5f72000a23/"
+ }
+ },
+ "jstests/aggregation/testSlave.js": { ... },
+ ...
+ },
+ "min_queue_pos": 0,
+ "files": []
+}
+```
+
+## Retrieve the status of a particular task
+
+ GET /rest/v1/tasks/{task_id}/status
+
+### Request
+
+ curl https://evergreen.example.com//rest/v1/tasks/mongodb_mongo_master_linux_64_7ffac7f351b80f84589349e44693a94d5cc5e14c_14_07_22_13_27_06_aggregation_linux_64/status
+
+### Response
+
+```json
+{
+ "task_id": "mongodb_mongo_master_linux_64_7ffac7f351b80f84589349e44693a94d5cc5e14c_14_07_22_13_27_06_aggregation_linux_64",
+ "task_name": "aggregation",
+ "status": "success",
+ "status_details": {
+ "timed_out": false,
+ "timeout_stage": ""
+ },
+ "tests": {
+ "jstests/aggregation/mongos_slaveok.js": {
+ "status": "pass",
+ "time_taken": 25482633113,
+ "logs": {
+ "url": "http://buildlogs.mongodb.org/build/53ce78d7d2a60f5fac000970/test/53ce78d9d2a60f5f72000a23/"
+ }
+ },
+ "jstests/aggregation/testSlave.js": { ... },
+ ...
+ }
+}
+```
diff --git a/docs/Use-the-API/REST-V2-Usage.md b/docs/Use-the-API/REST-V2-Usage.md
new file mode 100644
index 00000000000..ec34de68dfa
--- /dev/null
+++ b/docs/Use-the-API/REST-V2-Usage.md
@@ -0,0 +1,2057 @@
+# REST API v2
+
+## General Functionality
+
+### A note on authentication
+
+Many of the these REST endpoints do not require authentication to
+access, but some do. These will return a 404 if no authentication
+headers are sent, if the username is invalid, or if the API key is
+incorrect. Use the `user` and `api_key` fields from the
+[settings](https://spruce.mongodb.com/preferences/cli) page to set two headers,
+`Api-User` and `Api-Key`.
+
+### Content Type and Communication
+
+The API accepts and returns all results in JSON. Some resources also
+allow URL parameters to provide additional specificity to a request.
+
+### Errors
+
+When an error is encountered during a request, the API returns a JSON
+object with the HTTP status code and a message describing the error of
+the form:
+
+ {
+ "status": ,
+ "error":
+ }
+
+### Pagination
+
+API Routes that fetch many objects return them in a JSON array and
+support paging through subsets of the total result set. When there are
+additional results for the query, access to them is populated in a [Link
+HTTP header](https://www.w3.org/wiki/LinkHeader). This header has the
+form:
+
+ "Link" : /rest/v2/path/to/resource?start_at=&limit=; rel="next"
+
+ /rest/v2/path/to/resource?start_at=&limit=; rel="prev"
+
+### Dates
+
+Date fields are returned and accepted in ISO-8601 UTC extended format.
+They contain 3 fractional seconds with a 'dot' separator.
+
+### Empty Fields
+
+A returned object will always contain its complete list of fields. Any
+field that does not have an associated value will be filled with JSON's
+null value.
+
+## Resources
+
+The API has a series of implemented objects that it returns depending on
+the queried endpoint.
+
+### Task
+
+The task is a basic unit of work understood by Evergreen. They usually
+comprise a suite of tests or generation of a set of artifacts.
+
+#### Objects
+
+**Task**
+
+| Name | Type | Description |
+|------------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `task_id` | string | Unique identifier of this task |
+| `create_time` | time | Time that this task was first created |
+| `dispatch_time` | time | Time that this time was dispatched |
+| `scheduled_time` | time | Time that this task is scheduled to begin |
+| `start_time` | time | Time that this task began execution |
+| `finish_time` | time | Time that this task finished execution |
+| `version_id` | string | An identifier of this task by its project and commit hash |
+| `branch` | string | The version control branch that this task is associated with |
+| `revision` | string | The version control identifier associated with this task |
+| `requester` | string | Version created by one of patch_request", "github_pull_request", "gitter_request" (caused by git commit, aka the repotracker requester), "trigger_request" (Project Trigger versions) , "merge_test" (commit queue patches), "ad_hoc" (periodic builds) |
+| `priority` | int | The priority of this task to be run |
+| `activated` | boolean | Whether the task is currently active |
+| `activated_by` | string | Identifier of the process or user that activated this task |
+| `build_id` | string | Identifier of the build that this task is part of |
+| `distro_id` | string | Identifier of the distro that this task runs on |
+| `build_variant` | string | Name of the buildvariant that this task runs on |
+| `depends_on` | array | List of task_ids of task that this task depends on before beginning |
+| `display_name` | string | Name of this task displayed in the UI |
+| `host_id` | string | The ID of the host this task ran or is running on |
+| `tags` | []string | List of tags defined for the task, if any |
+| `execution` | int | The number of the execution of this particular task |
+| `order` | int | For mainline commits, represents the position in the commit history of commit this task is associated with. For patches, this represents the number of total patches submitted by the user. |
+| `status` | string | The current status of this task |
+| `display_status` | string | The status of this task that is displayed in the UI |
+| `status_details` | status_object | Object containing additional information about the status |
+| `logs` | logs_object | Object containing raw and event logs for this task |
+| `parsley_logs` | logs_object | Object containing parsley logs for this task |
+| `time_taken_ms` | int | Number of milliseconds this task took during execution |
+| `expected_duration_ms` | int | Number of milliseconds expected for this task to execute |
+| `previous_executions` | []Task | Contains previous executions of the task if they were requested, and available. May be empty. |
+| `parent_task_id` | string | The ID of the task's parent display task, if requested and available |
+| `artifacts` | []File | The list of artifacts associated with the task. |
+
+**Logs**
+
+| Name | Type | Description |
+|--------------------|---------|----------------------------------------------|
+| agent_log | string | Link to logs created by the agent process |
+| task_log | string | Link to logs created by the task execution |
+| system_log | string | Link to logs created by the machine running the task |
+| all_log | string | Link to logs containing merged copy of all other logs |
+
+**Status**
+
+| Name | Type | Description |
+|-----------|---------|----------------------------------------------|
+| status | string | The status of the completed task |
+| type | string | The method by which the task failed |
+| desc | string | Description of the final status of this task |
+| timed_out | boolean | Whether this task ended in a timeout |
+
+**File**
+| Name | Type | Description |
+|------------------|---------|-----------------------------------------------------------|
+| name | string | Human-readable name of the file |
+| link | string | Link to the file |
+| visibility | string | Determines who can see the file in the UI |
+| ignore_for_fetch | boolean | When true, these artifacts are excluded from reproduction |
+
+#### Endpoints
+
+##### List Tasks By Build
+
+ GET /builds//tasks
+
+List all tasks within a specific build.
+
+| Name | Type | Description |
+|----------------------|---------|--------------------------------------------------------------------------------------|
+| start_at | string | Optional. The identifier of the task to start at in the pagination |
+| limit | int | Optional. The number of tasks to be returned per page of pagination. Defaults to 100 |
+| fetch_all_executions | boolean | Optional. Fetches previous executions of tasks if they are available |
+| fetch_parent_ids | boolean | Optional. Fetches the parent display task ID for each returned execution task |
+
+##### List Tasks By Project And Commit
+
+ GET /projects//revisions//tasks
+
+List all tasks within a mainline commit of a given project (excludes
+patch tasks)
+
+| Name | Type | Description |
+|---------------|--------|--------------------------------------------------------------------------------------|
+| start_at | string | Optional. The identifier of the task to start at in the pagination |
+| limit | int | Optional. The number of tasks to be returned per page of pagination. Defaults to 100 |
+| variant | string | Optional. Only return tasks within this variant |
+| variant_regex | string | Optional. Only return tasks within variants that match this regex |
+| task_name | string | Optional. Only return tasks with this display name |
+| status | string | Optional. Only return tasks with this status |
+
+##### Get A Single Task
+
+ GET /tasks/
+
+Fetch a single task using its ID
+
+| Name | Type | Description |
+|----------------------|------|-------------------------------------------------------------------------|
+| fetch_all_executions | any | Optional. Fetches previous executions of the task if they are available |
+
+##### Restart A Task
+
+ POST /tasks//restart
+
+Restarts the task of the given ID. Can only be performed if the task is
+finished.
+
+| Name | Type | Description |
+|-------------|---------|--------------------------------------------------------------------------------------------------------------------------------------|
+| failed_only | boolean | Optional. For a display task, restarts only failed execution tasks. When used with a non-display task, this parameter has no effect. |
+
+##### Abort A Task
+
+ POST /tasks//abort
+
+Abort the task of the given ID. Can only be performed if the task is in
+progress.
+
+##### Change A Task's Execution Status
+
+ PATCH /tasks/
+
+ Change the current execution status of a task. Accepts a JSON body with the new task status to be set.
+
+**Accepted Parameters**
+
+| Name | Type | Description |
+|-----------|---------|--------------------------------------------------------------------------|
+| activated | boolean | The activation status of the task to be set to |
+| priority | int | The priority of this task's execution. Limited to 100 for non-superusers |
+
+For example, to set activate the task and set its status priority to
+100, add the following JSON to the request body:
+
+ {
+ "activated": true,
+ "priority": 100
+ }
+
+### Task Annotations
+
+Task Annotations give users more context about task failures.
+
+#### Objects
+
+**Annotation**
+
+| Name | Type | Description |
+|------------------|------------------------|------------------------------------------------------------------------------------------------------------------|
+| task_id | string | Identifier of the task that this annotation is for |
+| task_execution | int | The number of the execution of the task that the annotation is for |
+| metadata | map[string]interface{} | Structured data about the task. Since this is user-given json data, the structure can differ between annotations |
+| note | note_object | Comment about the task failure |
+| issues | []issue_link | Links to tickets definitely related |
+| suspected_issues | []issue_link | Links to tickets possibly related |
+| metadata_links | []metadata_link | List of links associated with a task, to be displayed in the task metadata sidebar, currently limited to 1 |
+
+
+**Note**
+
+| Name | Type | Description |
+|---------|---------------|--------------------------------|
+| message | string | Comment about the task failure |
+| source | source_object | The source of the note |
+
+**Source**
+
+| Name | Type | Description |
+|-----------|--------|---------------------------------------|
+| author | string | The author of the edit |
+| time | time | The time of the edit |
+| requester | string | The source of the request (api or ui) |
+
+**Issue Link**
+
+| Name | Type | Description |
+|------------------|---------------|-----------------------------------|
+| url | string | The url of the ticket |
+| issue_key | string | Text to be displayed |
+| source | source_object | The source of the edit |
+| confidence_score | float32 | The confidence score of the issue |
+
+**Metadata Link**
+
+| Name | Type | Description |
+|------------------|---------------|------------------------|
+| url | string | The url of the link |
+| text | string | Text to be displayed |
+| source | source_object | The source of the edit |
+
+#### Endpoints
+
+##### Fetch Task Annotations
+ GET /tasks//annotations
+
+ Returns a list containing the latest annotation for the given task, or null if there are no annotations.
+
+| Name | Type | Description |
+|----------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------|
+| fetch_all_executions | boolean | Optional. Fetches annotations for all executions of the task if they are available |
+| execution | int | Optional. The 0-based number corresponding to the execution of the task the annotation is associated with. Defaults to the latest execution. |
+
+Create or Update a New Task Annotation
+
+ PUT tasks/{task_id}/annotation
+
+Creates a task annotation, or updates an existing task annotation,
+overwriting any existing fields that are included in the update. The
+annotation is created based on the annotation specified in the request
+body. Task execution must be provided for this endpoint, either in the
+request body or set as a url parameter. If no task_execution is
+specified in the request body or in the url, a bad status error will be
+returned. Note that usage of this endpoint requires that the requesting
+user have security to modify task annotations. The user does not need to
+specify the source, it will be added automatically. Example request
+body:
+
+**Parameters**
+
+| Name | Type | Description |
+|-----------|------|--------------------------------------------------------------------------------|
+| execution | int | Optional. Can be set in lieu of specifying task_execution in the request body. |
+
+ {
+ "task_id": "my_task_id",
+ "task_execution": 4321,
+ "note": {
+ "message": "this is a note about my_task_id's failure",
+ },
+ "issues":[
+ {
+ "url": "https://link.com",
+ "issue_key": "link-1234"
+ },
+ ]
+ }
+
+Create or Update a New Task Annotation By Appending
+
+ PATCH tasks/{task_id}/annotation
+
+Creates a task annotation, or updates an existing task annotation, appending issues and suspected issues that are included in the update. A new annotation is created based if the annotation exists and if upsert is true. Task execution must be provided for this endpoint, either in the request body or set as a url parameter. If no task_execution is specified in the request body or in the url, a bad status error will be returned. Note that usage of this endpoint requires that the requesting user have security to modify task annotations. The user does not need to specify the source, it will be added automatically. Example request body:
+
+| Name | Type | Description |
+|-----------|------|-------------------------------------------------------------------------------------------|
+| execution | int | Optional. Can be set in lieu of specifying task_execution in the request body. |
+| upsert | bool | Optional. Will create a new annotation if task annotation isn't found and upsert is true. |
+
+ {
+ "task_id": "my_task_id",
+ "task_execution": 4321,
+ "upsert": false,
+ "issues":[
+ {
+ "url": "https://link.com",
+ "issue_key": "link-1234"
+
+ }
+ ]
+ }
+
+
+Bulk Create or Update Many Task Annotations
+
+ PATCH tasks/annotations
+
+Creates many new task annotations, or updates the annotation if it
+already exists. A list of updates to a task annotation is provided in
+the request body, where each list item specifies a set of task id /
+execution pairs, and an annotation update to apply to all tasks matching
+that criteria. Note that usage of this endpoint requires that the
+requesting user have security to modify task annotations. Example
+request body:
+
+ {
+ "tasks_updates": [
+ {
+ "task_data": [{"task_id": "t1", "execution":3}],
+ "annotation": {
+ "note": {
+ "message": "this is a note about my_task_id's failure"
+ },
+ "issues":[
+ {
+ "url": "https://link.com",
+ "issue_key": "link-1234"
+ }
+ ]
+ }
+ },
+ {
+ "task_data": [{"task_id": "t2", "execution":0}, {"task_id": "t2", "execution":1}],
+ "annotation": {
+ "note": {
+ "message": "this is a note about my_task_id's failure"
+ },
+ "issues":[
+ {
+ "url": "https://other-link.com",
+ "issue_key": "link-4567"
+ }
+ ]
+ }
+ }]
+ }
+
+List Task Annotations By Build
+
+ GET /builds//annotations
+
+Fetches the annotations for all the tasks in a build.
+
+**Parameters**
+
+| Name | Type | Description |
+|----------------------|---------|------------------------------------------------------------------------------------|
+| fetch_all_executions | boolean | Optional. Fetches annotations for all executions of the task if they are available |
+
+
+List Task Annotations By Version
+
+ GET /versions//annotations
+
+Fetches the annotations for all the tasks in a version.
+
+**Parameters**
+
+| Name | Type | Description |
+|----------------------|---------|------------------------------------------------------------------------------------|
+| fetch_all_executions | boolean | Optional. Fetches annotations for all executions of the task if they are available |
+
+
+Send a Newly Created Ticket For a Task
+
+ PUT /tasks//created_ticket
+
+If a [file ticket webhook](../Apply-and-Analyze-Evergreen-Data/Webhooks.md#task-annotations-file-ticket-webhook)
+is configured for a project, this endpoint should be used to let
+evergreen know when a ticket was filed for a task so that it can be
+stored and displayed to the user. The request body should include the
+ticket url and issue_key. Note that usage of this endpoint requires that
+the requesting user have security to modify task annotations. The user
+does not need to specify the source of the ticket, it will be added
+automatically. Example request body:
+
+ {
+ "url": "https://link.com",
+ "issue_key": "link-1234"
+ }
+
+### Test
+
+A test is a sub-operation of a task performed by Evergreen.
+
+#### Objects
+
+**Test**
+
+| Name | Type | Description |
+|------------|----------|------------------------------------------------------------|
+| task_id | string | Identifier of the task this test is a part of |
+| Status | string | Execution status of the test |
+| test_file | string | Name of the test file that this test was run in |
+| logs | test_log | Object containing information about the logs for this test |
+| exit_code | int | The exit code of the process that ran this test |
+| start_time | time | Time that this test began execution |
+| end_time | time | Time that this test stopped execution |
+
+**Test Logs**
+
+| Name | Type | Description |
+|----------|--------|--------------------------------------------------------------------------|
+| url | string | URL where the log can be fetched |
+| line_num | int | Line number in the log file corresponding to information about this test |
+| url_raw | string | URL of the unprocessed version of the logs file for this test |
+| log_id | string | Identifier of the logs corresponding to this test |
+
+#### Endpoints
+
+##### Get Tests From A Task
+
+ GET /tasks//tests
+
+Fetches a paginated list of tests that ran as part of the given task. To
+filter the tasks, add the following parameters into the query string
+(reference [Pagination](REST-V2-Usage.md#pagination)
+to see this format).
+
+**Parameters**
+
+| Name | Type | Description |
+|-----------|--------|----------------------------------------------------------------------------------------------------------------------------------|
+| start_at | string | Optional. The identifier of the test to start at in the pagination |
+| limit | int | Optional. The number of tests to be returned per page of pagination. Defaults to 100 |
+| status | string | Optional. A status of test to limit the results to. |
+| execution | int | Optional. The 0-based number corresponding to the execution of the task. Defaults to 0, meaning the first time the task was run. |
+| test_name | string | Optional. Only return the test matching the name. |
+| latest | bool | Optional. Return tests from the latest execution. Cannot be used with execution. |
+
+
+##### Get The Test Count From A Task
+
+ GET /tasks//tests/count
+
+Returns an integer representing the number of tests that ran as part of
+the given task.
+
+**Parameters**
+
+| Name | Type | Description |
+|-----------|------|----------------------------------------------------------------------------------------------------------------------------------|
+| execution | int | Optional. The 0-based number corresponding to the execution of the task. Defaults to 0, meaning the first time the task was run. |
+
+
+### Manifest
+
+A manifest is a representation of the modules associated with a version.
+
+#### Objects
+
+**Manifest**
+
+| Name | Type | Description |
+|----------|---------------------|------------------------------------------------------------------|
+| \_id | string | Identifier for the version. |
+| revision | string | The revision of the version. |
+| project | string | The project identifier for the version. |
+| branch | string | The branch of the repository. |
+| modules | map[string]\*Module | Map from the Github repository name to the module's information. |
+| is_base | bool | True if the version is a mainline build. |
+
+**Module**
+
+| Name | Type | Description |
+|----------|--------|---------------------------------------------------------|
+| repo | string | The name of the repository. |
+| branch | string | The branch of the repository. |
+| revision | string | The revision of the head of the branch. |
+| owner | string | The owner of the repository. |
+| url | string | The url to the GitHub API call to that specific commit. |
+
+
+#### Endpoints
+
+##### Get Manifest for Task
+
+ GET /tasks//manifest
+
+Fetch the manifest for a task using the task ID.
+
+### Host
+
+The hosts resource defines a running machine instance in Evergreen.
+
+#### Objects
+
+**Host**
+
+| Name | Type | Description |
+|--------------|-------------|--------------------------------------------------------------------------------------|
+| host_id | string | Unique identifier of a specific host |
+| distro | distro_info | Object containing information about the distro type of this host |
+| started_by | string | Name of the process or user that started this host |
+| host_type | string | The instance type requested for the provider, primarily used for ec2 dynamic hosts |
+| user | string | The user associated with this host. Set if this host was spawned for a specific user |
+| status | string | The current state of the host |
+| running_task | task_info | Object containing information about the task the host is currently running |
+
+**Distro Info**
+
+| Name | Type | Description |
+|-----------|--------|-------------------------------------------------------------------------------------------|
+| distro_id | string | Unique Identifier of this distro. Can be used to fetch more informaiton about this distro |
+| provider | string | The service which provides this type of machine |
+
+**Task Info**
+
+| Name | Type | Description |
+|---------------|--------|---------------------------------------------------------------------------------------|
+| task_id | string | Unique Identifier of this task. Can be used to fetch more informaiton about this task |
+| name | string | The name of this task |
+| dispatch_time | time | Time that this task was dispatched to this host |
+| version_id | string | Unique identifier for the version of the project that this task is run as part of |
+| build_id | string | Unique identifier for the build of the project that this task is run as part of |
+
+
+#### Endpoints
+
+##### Fetch All Hosts
+
+ GET /hosts
+
+Returns a paginated list of all hosts in Evergreen
+
+**Parameters**
+
+| Name | Type | Description |
+|----------|--------|--------------------------------------------------------------------------------------|
+| start_at | string | Optional. The identifier of the host to start at in the pagination |
+| limit | int | Optional. The number of hosts to be returned per page of pagination. Defaults to 100 |
+| status | string | Optional. A status of host to limit the results to |
+
+
+##### Fetch Hosts Spawned By User
+
+ GET /users//hosts
+
+Returns a list of hosts spawned by the given user.
+
+**Parameters**
+
+| Name | Type | Description |
+|----------|--------|--------------------------------------------------------------------------------------|
+| start_at | string | Optional. The identifier of the host to start at in the pagination |
+| limit | int | Optional. The number of hosts to be returned per page of pagination. Defaults to 100 |
+| status | string | Optional. A status of host to limit the results to |
+
+
+##### Fetch Host By ID
+
+ GET /hosts/
+
+Fetches a single host using its ID
+
+##### Spawn a Host
+
+ POST /hosts
+
+Spawns a host. The host must be of a distro which is spawnable by users
+(see [Distro](#distro)).
+
+**Parameters**
+
+| Name | Type | Description |
+|-----------|--------|---------------------------------|
+| `distro` | string | [Distro](#distro) name to spawn |
+| `keyname` | string | [Key](#key) name to use |
+
+
+##### Terminate Host with Given Host ID
+
+ POST /hosts//terminate
+
+Immediately terminate a single host with given ID. Users may only
+terminate hosts which were created by them, unless the user is a
+super-user.
+
+Hosts which have not been initialised yet will be marked as Terminated.
+
+Trying to terminate a host which has already been terminated will result
+in an error.
+
+All other host statuses will result in an attempt to terminate using the
+provider's API
+
+A response code of 200 OK indicates that the host was successfully
+terminated
+
+All other response codes indicate errors; the response body can be
+parsed as a rest.APIError
+
+##### Change RDP Password of Host with Given Host ID
+
+ POST /hosts//change_password
+
+Immediately changes the RDP password of a Windows host with a given ID.
+Users may only change passwords for hosts which were created by them,
+unless the user is a super-user.
+
+A response code of 200 OK indicates that the host's password was
+successfully terminated
+
+Attempting to set the RDP password of a host that is not a Windows host
+or host that is not running will result in an error.
+
+All other response codes indicate errors; the response body can be
+parsed as a rest.APIError
+
+**Change Password**
+
+| Name | Type | Description |
+|---------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| rdp_pwd | string | New RDP password; must meet RDP password criteria as provided by Microsoft at: ).aspx and be between 6 and 255 characters long |
+
+##### Extend the Expiration of Host with Given Host ID
+
+ POST /hosts//extend_expiration
+
+Extend the expiration time of a host with a given ID. Users may only
+extend expirations for hosts which were created by them, unless the user
+is a super-user
+
+The expiration date of a host may not be more than 1 week in the future.
+
+A response code of 200 OK indicates that the host's expiration was
+successfully extended.
+
+Attempt to extend the expiration time of a terminated host will result
+in an error
+
+All other response codes indicate errors; the response body can be
+parsed as a rest.APIError
+
+**Extend Expiration**
+
+| Name | Type | Description |
+|-----------|------|---------------------------------------------------------|
+| add_hours | int | Number of hours to extend expiration; not to exceed 168 |
+
+
+### Patch
+
+A patch is a manually initiated version submitted to test local changes.
+
+#### Objects
+
+**Patch**
+
+| Name | Type | Description |
+|-----------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
+| patch_id | string | Unique identifier of a specific patch |
+| description | string | Description of the patch |
+| project_id | string | Name of the project |
+| branch | string | The branch on which the patch was initiated |
+| git_hash | string | Hash of commit off which the patch was initiated |
+| patch_number | int | Incrementing counter of user's patches |
+| author | string | Author of the patch |
+| status | string | Status of patch |
+| commit_queue_position | int | Only populated for commit queue patches: returns the 0-indexed position of the patch on the queue, or -1 if not on the queue anymore |
+| create_time | time | Time patch was created |
+| start_time | time | Time patch started to run |
+| finish_time | time | Time at patch completion |
+| build_variants | string[] | List of identifiers of builds to run for this patch |
+| tasks | string[] | List of identifiers of tasks used in this patch |
+| variants_tasks | variant_task[] | List of documents of available tasks and associated build variant |
+| activated | bool | Whether the patch has been finalized and activated |
+
+**Variant Task**
+
+| Name | Type | Description |
+|-------|------------|--------------------------------------------------|
+| name | string | Name of build variant |
+| tasks | string[] | All tasks available to run on this build variant |
+
+
+#### Endpoints
+
+##### Fetch Patches By Project
+
+ GET /projects//patches
+
+Returns a paginated list of all patches associated with a specific
+project
+
+**Parameters**
+
+| Name | Type | Description |
+|----------|--------|----------------------------------------------------------------------------------------|
+| start_at | string | Optional. The create_time of the patch to start at in the pagination. Defaults to now |
+| limit | int | Optional. The number of patches to be returned per page of pagination. Defaults to 100 |
+
+
+##### Fetch Patches By User
+
+ GET /users//patches
+
+Returns a paginated list of all patches associated with a specific user
+
+**Parameters**
+
+| Name | Type | Description |
+|----------|--------|----------------------------------------------------------------------------------------|
+| start_at | string | Optional. The create_time of the patch to start at in the pagination. Defaults to now |
+| limit | int | Optional. The number of patches to be returned per page of pagination. Defaults to 100 |
+
+
+##### Fetch Patch By Id
+
+ GET /projects//patches
+
+Fetch a single patch using its ID
+
+##### Get Patch Diff
+
+ GET /patches//raw
+
+Fetch the raw diff for a patch
+
+**Parameters**
+
+| Name | Type | Description |
+|--------|--------|-------------------------------------------------------------------------------------------------------|
+| module | string | Optional. A module to get the diff for. Returns the empty string when no patch exists for the module. |
+
+##### Abort a Patch
+
+ POST /patches//abort
+
+Aborts a single patch using its ID and returns the patch
+
+##### Configure/Schedule a Patch
+
+ POST /patches//configure
+
+Update the list of tasks that the specified patch will run. This works both for initially specifying a patch's tasks, as well as for adding additional tasks to an already-scheduled patch. The request body should be in the following format:
+
+ {
+ "description": "this is my patch",
+ "variants": [
+ {
+ "id": "variant-1",
+ "tasks": ["task1", task2"]
+ },
+ {
+ "id": "variant-2",
+ "tasks": ["task2", task3"]
+ }
+ ]
+ }"]
+ }"]
+ }
+ ]
+ }
+
+| Name | Type | Description |
+|-------------|--------------------------|-----------------------------------------------------------------------|
+| description | string | Optional, if sent will update the patch's description |
+| variants | array of variant objects | Required, these are the variants and tasks that the patch should run. |
+
+Each variant object is of the format { "variant": "\", "tasks": ["task name"] }. This field is analogous in syntax and usage to the "buildvariants" field in the project's evergreen.yml file. Names of display tasks can be specified in the tasks array and will work as one would expect. For an already-scheduled patch, any new tasks in this array will be created, and any existing tasks not in this array will be unscheduled.
+
+##### Restart a Patch
+
+ POST /patches//restart
+
+Restarts a single patch using its ID then returns the patch
+
+##### Change Patch Status
+
+ PATCH /patches/
+
+Sets the priority and activation status of a single patch to the input
+values
+
+**Parameters**
+
+| Name | Type | Description |
+|-----------|------|-----------------------------------------------------|
+| priority | int | Optional. The priority to set the patch to |
+| activated | bool | Optional. The activation status to set the patch to |
+
+
+### Build
+
+The build resource represents the combination of a version and a
+buildvariant.
+
+#### Objects
+
+**Build**
+
+| Name | Type | Description |
+|-------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `project_id` | string | The identifier of the project this build represents |
+| `create_time` | time | Time at which build was created |
+| `start_time` | time | Time at which build started running tasks |
+| `finish_time` | time | Time at which build finished running all tasks |
+| `version` | string | The version this build is running tasks for |
+| `branch` | string | The branch of project the build is running |
+| `gitspec` | string | Hash of the revision on which this build is running |
+| `build_variant` | string | Build distro and architecture information |
+| `status` | string | The status of the build |
+| `tags` | []string | List of tags defined for the build variant, if any |
+| `activated` | bool | Whether this build was manually initiated |
+| `activated_by` | string | Who initiated the build |
+| `activated_time` | time | When the build was initiated |
+| `order` | int | Incrementing counter of project's builds |
+| `tasks` | []string | The tasks to be run on this build |
+| `time_taken_ms` | int | How long the build took to complete all tasks |
+| `display_name` | string | Displayed title of the build showing version and variant running |
+| `predicted_makespan_ms` | int | Predicted makespan by the scheduler prior to execution |
+| `actual_makespan_ms` | int | Actual makespan measured during execution |
+| `origin` | string | The source of the patch, a commit or a patch |
+| `status_counts` | Object | Contains aggregated data about the statuses of tasks in this build. The keys of this object are statuses and the values are the number of tasks within this build in that status. Note that this field provides data that you can get yourself by querying tasks for this build. |
+| `task_cache` | Object | Contains a subset of information about tasks for the build; this is not provided/accurate for most routes ([get versions for project](REST-V2-Usage.md#get-versions-for-a-project) is an exception). |
+| `definition_info` | Object | Some routes will return information about the variant as defined in the project. Does not expand expansions; they will be returned as written in the project yaml (i.e. `${syntax}`) |
+
+
+**Definition Info**
+
+| Name | Type | Description |
+|-----------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| cron | string | The cron defined for the variant, if provided, as defined [here](../Configure-a-Project/Project-Configuration-Files.md#build-variants) |
+| batchtime | int | The batchtime defined for the variant, if provided, as defined [here](../Configure-a-Project/Project-Configuration-Files.md#build-variants) |
+
+
+#### Endpoints
+
+##### Fetch Build By Id
+
+ GET /builds/
+
+Fetches a single build using its ID
+
+##### Abort a Build
+
+ POST /builds//abort
+
+Aborts a single build using its ID then returns the build
+
+##### Restart a Build
+
+ POST /builds//restart
+
+Restarts a single build using its ID then returns the build
+
+##### Change Build Status
+
+ PATCH /builds/
+
+Sets the priority and activation status of a single build to the input
+values
+
+**Parameters**
+
+| Name | Type | Description |
+|-----------|------|-----------------------------------------------------------------------|
+| priority | int | Optional. The priority to set the build to |
+| activated | bool | Optional. Set to true to activate, and false to deactivate the build. |
+
+
+### Version
+
+A version is a commit in a project.
+
+#### Objects
+
+**Version**
+
+| Name | Type | Description |
+|-------------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `create_time` | time | Time that the version was first created |
+| `start_time` | time | Time at which tasks associated with this version started running |
+| `finish_time` | time | Time at which tasks associated with this version finished running |
+| `revision` | string | The version control identifier |
+| `author` | string | Author of the version |
+| `author_email` | string | Email of the author of the version |
+| `message` | string | Message left with the commit |
+| `status` | string | The status of the version |
+| `repo` | string | The github repository where the commit was made |
+| `branch` | string | The version control branch where the commit was made |
+| `build_variants_status` | []buildDetail | List of documents of the associated build variant and the build id |
+| `requester` | string | Version created by one of "patch_request", "github_pull_request", "gitter_request" (caused by git commit, aka the repotracker requester), "trigger_request" (Project Trigger versions) , "merge_test" (commit queue patches), "ad_hoc" (periodic builds) |
+| `activated` | boolean or null | Will be null for versions created before this field was added. |
+
+
+#### Endpoints
+
+##### Fetch Version By Id
+
+ GET /versions/
+
+Fetches a single version using its ID
+
+##### Abort a Version
+
+ POST /versions//abort
+
+Aborts a single version using its ID then returns the version
+
+##### Restart a Version
+
+ POST /versions//restart
+
+Restarts a single version using its ID then returns the version
+
+##### Activate or Deactivate a Version
+
+ PATCH /versions/
+
+Activate or deactivates a given version. Does not return the version.
+
+**Parameters**
+
+| Name | Type | Description |
+|--------------------|---------|-------------------------------------------|
+| activated | bool | Required. Will activate the version if true and deactivate if false. |
+
+
+##### Get Builds From A Version
+
+ GET /versions//builds
+
+Fetches a list of builds associated with a version
+
+**Parameters**
+
+| Name | Type | Description |
+|---------|--------|------------------------------------------------------------------------------|
+| variant | string | Optional. Only return the build with this variant (using Distro identifier). |
+
+
+Returns a list of
+[Builds](REST-V2-Usage.md#build).
+
+##### Create a New Version
+
+ PUT /versions
+
+Creates a version and optionally runs it, conceptually similar to a
+patch. The main difference is that the config yml file is provided in
+the request, rather than retrieved from the repo.
+
+**Parameters**
+
+| Name | Type | Description |
+|------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| project_id | string | Required. This is the project with which the version will be associated, and the code to test will be checked out from the project's branch. |
+| message | string | Optional. A description of the version which will be displayed in the UI |
+| activate | boolean | Optional. If true, the defined tasks will run immediately. Otherwise, the version will be created and can be activated in the UI |
+| is_adhoc | boolean | Optional. If true, the version will be indicated as coming from an ad hoc source and will not display as if it were a patch or commit. If false, it will be assumed to be a commit. |
+| config | string (yml) | Required. This is the yml config that will be used for defining tasks, variants, and functions. |
+
+
+Returns the version object that was created
+
+### Project
+
+A project corresponds to a single repository.
+Most of these project fields are accessible to all users via the /projects route, with the
+exception of project variables, task annotation settings, workstation settings, and container secrets.
+
+#### Objects
+
+**Project**
+
+| Name | Type | Description |
+|----------------------|---------------------|--------------------------------------------------------------------------------------------------------------------|
+| admins | []string or null | Usernames of project admins. Can be null for some projects ([EVG-6598](https://jira.mongodb.org/browse/EVG-6598)). |
+| delete_admins | []string | Usernames of project admins to remove |
+| batch_time | int | Unique identifier of a specific patch |
+| branch_name | string | Name of branch |
+| commit_queue | CommitQueueParams | Options for commit queue |
+| deactivate_previous | bool | List of identifiers of tasks used in this patch |
+| display_name | string | Project name displayed to users |
+| enabled | bool | Whether evergreen is enabled for this project |
+| identifier | string | Internal evergreen identifier for project |
+| notify_on_failure | bool | Notify original committer (or admins) when build fails |
+| owner_name | string | Owner of project repository |
+| patching_disabled | bool | Disable patching |
+| pr_testing_enabled | bool | Enable github pull request testing |
+| private | bool | A user must be logged in to view private projects |
+| remote_path | string | Path to config file in repo |
+| repo_name | string | Repository name |
+| tracks_push_events | bool | If true, repotracker is run on github push events. If false, repotracker is run periodically every few minutes. |
+| revision | string | Only used when modifying projects to change the base revision and run the repotracker. |
+| triggers | []TriggerDefinition | a list of triggers for the project |
+| aliases | []APIProjectAlias | a list of aliases for the project |
+| variables | ProjectVars | project variables information |
+| subscriptions | []Subscription | a list of subscriptions for the project |
+| delete_subscriptions | []string | subscription IDs. Will delete these subscriptions when given. |
+
+
+**CommitQueueParams**
+
+| Name | Type | Description |
+|--------------|--------|-------------------------------------------|
+| enabled | bool | Enable/disable the commit queue |
+| merge_method | string | method of merging (squash, merge, rebase) |
+| patch_type | string | type of patch (PR, CLI) |
+
+
+**TriggersDefinition**
+
+| Name | Type | Description |
+|---------------|--------|-------------------------------------------|
+| definition_id | string | unique ID |
+| project | string | project ID |
+| level | string | build or task |
+| variant_regex | string | matching variants will trigger a build |
+| task_regex | string | matching tasks will trigger a build |
+| status | string | status to trigger for (or "\*") |
+| config_file | string | definition file |
+| command | string | shell command that creates task json file |
+
+
+**ProjectAlias**
+
+| Name | Type | Description |
+|---------|----------|------------------------------------------------------------------------------------------|
+| \_id | string | The id for the alias. If the alias should be deleted, this must be given. |
+| alias | string | Required. Alias to use with the CLI. May be specified multiple times. |
+| variant | string | Required. Variant regex for alias. |
+| task | string | Task regex for alias. Will use the union of task and tags. Either task or tags required. |
+| tags | []string | Tags for alias. Will use the union of task and tags. Either task or tags required. |
+| delete | bool | If the given alias for the project should be deleted, set this to true. |
+
+
+**ProjectVars**
+
+| Name | Type | Description |
+|-----------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
+| vars | map[string]string | Map of the variable to its value (if private, value is not shown) |
+| private_vars | map[string]bool | Indicates whether that variable should be private, i.e. the value will not be shown (NOTE: once a variable has been set to private this cannot be undone) |
+| restricted_vars | map[string]bool | Indicates whether that variable should be restricted, i.e. only used by commands that are guaranteed to not leak the values (currently s3.put and s3.get) |
+| vars_to_delete | []string | Only used to remove existing variables. |
+
+
+**Subscription**
+
+| Name | Type | Description |
+|----------------|-------------------|---------------------------------------------|
+| id | string | |
+| resource_type | string | |
+| trigger | string | |
+| selectors | []Selector | |
+| regex_selector | []Selector | |
+| subscriber | Subscriber | |
+| owner_type | string | For projects, this will always be "project" |
+| owner | string | The project ID |
+| trigger_data | map[string]string | |
+
+
+**Selector**
+
+| Name | Type |
+|------|--------|
+| type | string |
+| data | string |
+
+
+**Subscriber**
+
+| Name | Type |
+|--------|-------------|
+| type | string |
+| target | interface{} |
+
+
+#### Endpoints
+
+##### Fetch all Projects
+
+ GET /projects
+
+Returns a paginated list of all projects. Any authenticated user can
+access this endpoint, so potentially sensitive information (variables, task
+annotation settings, workstation settings, and container secrets) is omitted.
+
+**Parameters**
+
+| Name | Type | Description |
+|----------|--------|-----------------------------------------------------------------------------------------|
+| start_at | string | Optional. The id of the project to start at in the pagination. Defaults to empty string |
+| limit | int | Optional. The number of projects to be returned per page of pagination. Defaults to 100 |
+
+
+##### Get A Project
+
+ GET /projects/
+
+Returns the project (restricted to project admins). Includes public
+variables, aliases, and subscriptions. Note that private variables are
+*always redacted.* If you want to use this to copy project variables,
+see instead the "Copy Project Variables" route.
+
+**Parameters**
+
+| Name | Type | Description |
+|----------------------|------|---------------------------------------------------------------------------------------------------------------------------------------------|
+| includeRepo | bool | Optional. Setting to true will return the merged result of project and repo level settings. Defaults to false |
+| includeProjectConfig | bool | Optional. Setting to true will return the merged result of the project and the config properties set in the project YAML. Defaults to false |
+
+
+##### Modify A Project
+
+ PATCH /projects/
+
+Modify an existing project (restricted to project admins). Will enable webhooks
+if an enabled project, and enable PR testing and the commit queue if specified.
+
+For lists, if there is a complementary
+"delete" field, then the former field indicates items to be added,
+while the "delete" field indicates items to be deleted. Otherwise, the
+given list will overwrite the original list (the only exception is for project
+variables -- we will ignore any empty project variables to avoid accidentally
+overwriting private variables).
+
+##### Copy a Project
+
+ POST /projects//copy?new_project=
+
+Restricted to admins of the original project. Create a new project that
+is identical to indicated project\--this project is initially disabled
+(PR testing and CommitQueue also initially disabled). The unique
+identifier is passed to the query parameter `new_project` and is
+required.
+
+Project variables, aliases, and subscriptions also copied. Returns the
+new project (but not variables/aliases/subscriptions).
+
+##### Copy Variables to an Existing Project
+
+ POST /projects//copy/variables
+
+Restricted to admins of the source project/repo and the destination
+project/repo. Copies variables from projectA to projectB.
+
+**CopyVariablesOptions**
+
+| Name | Type | Description |
+|-----------------|--------|-----------------------------------------------------------------------------------------------------------------------------------|
+| copy_to | string | Required. ProjectID to copy `source_project` variables to. |
+| include_private | bool | If set to true, private variables will also be copied. |
+| overwrite | bool | If set to true, will remove variables from the `copy_to` project that are not in `source_project`. |
+| dry_run | bool | If set to true, route returns the variables from `source_project` that will be copied. (If private, the values will be redacted.) |
+
+
+If `dry_run` is set, then the route does not complete the copy, but
+returns OK if no project variables in the source project will be
+overwritten (this concerns [all]{.title-ref} variables in the
+destination project, but only redacted variables in the source project).
+Otherwise, an error is given which includes the project variable keys
+that overlap.
+
+if `dry_run` is not set, the copy is completed, and variables could be
+overwritten.
+
+##### Get Versions For A Project
+
+ GET /projects//versions
+
+Returns a paginated list of recent versions for a project. Parameters
+should be passed into the JSON body (the route still accepts limit and
+start as query parameters to support legacy behavior).
+
+**Parameters**
+
+| Name | Type | Description |
+|------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| skip | int | Optional. Number of versions to skip. |
+| limit | int | Optional. The number of versions to be returned per page of pagination. Defaults to 20. |
+| revision_start | int | Optional. The version order number to start at, for pagination. |
+| revision_end | int | Optional. The version order number to end at, for pagination. |
+| start_time_str | string | Optional. Timestamp to start looking for applicable versions. |
+| end_time_str | string | Optional. Timestamp to stop looking for applicable versions. |
+| requester | string | Returns versions for this requester only. Defaults to `gitter_request` (caused by git commit, aka the repotracker requester). Can also be set to `patch_request`, `github_pull_request`, `trigger_request` (Project Trigger versions) , `merge_test` (commit queue patches), and `ad_hoc` (periodic builds). |
+| include_builds | bool | If set, will return some information for each build in the version. |
+| by_build_variant | string | If set, will only include information for this build, and only return versions with this build activated. Must have `include_builds` set. |
+| include_tasks | bool | If set, will return some information for each task in the included builds. This is only allowed if `include_builds` is set. |
+| by_task | string | If set, will only include information for this task, and will only return versions with this task activated. Must have `include_tasks` set. |
+
+
+**Response**
+
+| Name | Type | Description |
+|-------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------|
+| `create_time` | time | Time that the version was first created |
+| `start_time` | time | Time at which tasks associated with this version started running |
+| `finish_time` | time | Time at which tasks associated with this version finished running |
+| `revision` | string | The version control identifier |
+| `author` | string | Author of the version |
+| `message` | string | Message left with the commit |
+| `status` | string | The status of the version |
+| `errors` | []string | List of errors creating the version |
+| `build_variants_status` | []buildDetail | List of documents of the associated build variant and the build id (this won't be populated if include_builds is set) |
+| `builds` | []APIBuild | List of builds for the version (only populated if include_builds is set). If include_tasks is set, then the task_cache is populated. |
+
+
+##### Modify Versions For A Project
+
+ PATCH /projects//versions
+
+Modifies a group of versions for a project. Parameters
+should be passed into the JSON body. Currently supports
+setting priority for all versions that the given options apply to.
+This route is restricted to project admins.
+
+**Parameters**
+
+| Name | Type | Description |
+|------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| start_time_str | string | Timestamp to start looking for applicable versions. |
+| end_time_str | string | Optional. Timestamp to stop looking for applicable versions. |
+| revision_start | int | Optional. The version order number to start at. |
+| revision_end | int | Optional. The version order number to end at. |
+| priority | int | Priority to set for all tasks within applicable versions. |
+| limit | int | Optional. The number of versions to be returned per page of pagination. Defaults to 20. |
+| requester | string | Returns versions for this requester only. Defaults to `gitter_request` (caused by git commit, aka the repotracker requester). Can also be set to `patch_request`, `github_pull_request`, `trigger_request` (Project Trigger versions) , `merge_test` (commit queue patches), and `ad_hoc` (periodic builds). |
+| by_build_variant | string | If set, will only include information for this build, and only return versions with this build activated. Must have `include_builds` set. |
+| by_task | string | If set, will only include information for this task, and will only return versions with this task activated. Must have `include_tasks` set. |
+| skip | int | Optional. Number of versions to skip. |
+
+
+##### Get Tasks For A Project
+
+ GET /projects//tasks/
+
+Returns the last set number of completed tasks that exist for a given
+project. Parameters should be passed into the JSON body. Ensure that a
+task name rather than a task ID is passed into the URL.
+
+**Parameters**
+
+| Name | Type | Description |
+|---------------|--------|-------------------------------------------------------------------------|
+| num_versions | int | Optional. The number of latest versions to be searched. Defaults to 20. |
+| start_at | int | Optional. The version order number to start returning results after. |
+| build_variant | string | If set, will only include tasks that have run on this build variant. |
+
+##### Get Execution Info for a Task
+
+ GET /projects//task_executions
+
+Right now, this returns the number of times the given task has executed (i.e. succeeded or failed).
+Parameters should be passed into the JSON body.
+
+**Parameters**
+
+| Name | Type | Description |
+|---------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| task_name | string | Required. The task to return execution info for. |
+| build_variant | string | Required. The build variant to return task execution info for. |
+| start_time | Time | Required. Will only return execution info after this time. Format should be 2022-12-01T12:30:00.000Z |
+| end_time | Time. | Optional. If not provided, will default to the current time. |
+| requesters | []string | Optional. If not provided, will default to `gitter_request` (versions created by git commit). Can also be `github_pull_request`, `trigger_request` (Project Trigger versions) , `merge_test` (commit queue patches), or `ad_hoc` (periodic builds) |
+
+**Response**
+
+| Name | Type | Description |
+|---------------|------|-----------------------------------------------------------------------------------------|
+| num_completed | int | The number of completed executions for the task/variant pair within the given interval. |
+
+
+##### Rotate Variables
+
+ PUT /projects/variables/rotate
+
+Restricted to superusers due to the fact it modifies ALL projects.
+
+**RotateVariablesOptions**
+
+| Name | Type | Description |
+|-------------|--------|-------------------------------------------------------------------|
+| to_replace | string | Required. Variable value to search and replace. |
+| replacement | string | Required. Value to replace the variables that match `to_replace`. |
+| dry_run | bool | If set to true, we don't complete the update |
+
+
+If `dry_run` is set, the route doesn't update but returns a map of
+`projectId` to a list of keys that will be replaced.
+
+if `dry_run` is not set, route returns a map of `projectId` to a list of
+keys that were replaced.
+
+Get Recent Versions For A Project (legacy)
+
+ GET /projects//recent_versions
+
+Returns a paginated list of recent versions for a project. NOTE that
+this route is legacy, and is no longer supported.
+
+**Parameters**
+
+| Name | Type | Description |
+|--------|------|----------------------------------------------------------------------------------------|
+| offset | int | Optional. Zero-based offset to return results from. |
+| limit | int | Optional. The number of versions to be returned per page of pagination. Defaults to 10 |
+
+
+**Response**
+
+| Name | Type | Description |
+|----------------|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| rows | object | The keys of this object are build variant identifiers. The values are BuildList objects from below. These are the builds contained in the recent versions, but grouped by build variant rather than version. |
+| versions | Array of APIVersions objects | This array contains the recent versions for the requested project, in reverse chronological order. |
+| build_variants | Array of strings | The deduplicated display names for all the build variants in the rows parameter |
+
+
+#### Objects
+
+**BuildList**
+
+| Name | Type | Description |
+| -------------------- | --------- | ------------------------------------------- |
+| `build_variant` | string | the identifier of each of the build variant objects below (all are the same variant) |
+| `builds` | object | The keys of this object are build IDs. The values are the [full build objects](REST-V2-Usage.md#id12) |
+
+
+**APIVersions**
+
+| Name | Type | Description |
+|-------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `rolled_up` | boolean | if true, these are inactive versions |
+| `versions` | Array of Version objects | If rolled_up is true, this will contain multiple version objects, none of which ran any tasks. Otherwise, this will contain a single version object, of which at least 1 task ran |
+
+
+Get Current Parameters For a Project
+
+ GET /projects//parameters
+
+Returns a list of parameters for the project.
+
+**Parameter**
+
+| Name | Type | Description |
+|-------|--------|-------------------------------------|
+| key | string | The name of the parameter. |
+| value | string | The default value of the parameter. |
+
+
+##### Put A Project
+
+ PUT /projects/
+
+Create a new project with the given project ID. Restricted to super
+users.
+
+##### Check Project Alias Results
+
+ GET /projects/test_alias?version=&alias=&include_deps=
+
+Checks a specified project alias in a specified project against an Evergreen configuration, returning the tasks and variants that alias would select. Currently only supports passing in the configuration via an already-created version.
+
+**Parameters**
+
+| Name | Type | Description
+|--------------|---------|
+| version | string | Required. The ID of the version (commit or patch) from which to retrieve the configuration as well as the project ID
+| alias | string | Required. The name of the alias to test against the configuration. The special aliases \__commit_queue, \__github, and \__git_tag can be used here
+| include_deps | boolean | Optional. If true, will also select the tasks that are dependencies of the selected tasks, even if they do not match the alias definition. Defaults to false.
+
+
+#### Distro
+
+A distro is an Evergreen host type. This isn't necessarily a Linux distribution - Mac and Windows host types are other possibilities.
+
+##### Objects
+
+ GET /distros
+
+Fetches distros defined in the system.
+
+### Key
+
+#### Objects
+
+**Key**
+
+| Name | Type | Description |
+|------|--------|-----------------------------------------|
+| name | string | The unique name of the public key |
+| key | string | The public key, (e.g: 'ssh-rsa ...') |
+
+
+#### Endpoints
+
+##### Fetch Current User's SSH Public Keys
+
+ GET /keys
+
+Fetch the SSH public keys of the current user (as determined by the
+Api-User and Api-Key headers) as an array of Key objects.
+
+If the user has no public keys, expect: []
+
+##### Add a Public Key to the Current User
+
+ POST /keys
+
+Add a single public key to the current user (as determined by the
+Api-User and Api-Key headers) as a Key object. If you attempt to insert
+a key with a duplicate name, it will fail
+
+Both name and key must not be empty strings, nor strings consisting
+entirely of whitespace
+
+If the key was successfully inserted, the server will return HTTP status
+code 200 OK
+
+If the a key with the supplied name already exists, the key will not be
+added, and the route will return status code 400 Bad Request.
+
+Any other status code indicates that the key was not successfully added.
+
+##### Delete A Specified Public Key from the Current User
+
+ DELETE /keys/{key_name}
+
+Delete the SSH public key with name `{key_name}` from the current user
+(as determined by the Api-User and Api-Key headers).
+
+If a public key with name `{key_name}` was successfully deleted, HTTP
+status code 200 OK will be returned.
+
+If a public key with name `{key_name}` does not exist, HTTP status
+code 400 Bad Request will be returned.
+
+Any other code indicates that the public key was not deleted
+
+### Status
+
+Status
+
+#### Objects
+
+**APICLIUpdate**
+
+| Name | Type | Description |
+|-----------------|-----------------|--------------------------------------------------------------------------------------------------------|
+| `client_config` | APIClientConfig | Client version/URLs |
+| `ignore_update` | bool | If true, degraded mode for clients is enabled, and the client should treat their version as up-to date |
+
+
+**APIClientConfig**
+
+| Name | Type | Description |
+|-----------------|-------------------|------------------------------------------|
+| latest_revision | string | a string representing the client version |
+| client_binaries | []APIClientBinary | Array of APIClientBinary objects |
+
+
+**APIClientBinary**
+
+| Name | Type | Description |
+|------|--------|----------------------------------------------------|
+| arch | string | architecture of the binary; must be a valid GOARCH |
+| os | string | OS of the binary; must be a valid GOOS |
+| url | string | URL where the binary can be fetched |
+
+
+#### Endpoints
+
+##### Fetch CLI Client Version
+
+ GET /status/cli_version
+
+Fetch the CLI update manifest from the server
+
+If you cannot find an endpoint, it may not be documented here. Check the
+defined endpoints in evergreen source:
+
+
+### Status Message
+
+ GET /admin/banner
+
+ {
+ "banner": "Evergreen is currently unable to pick up new commits or process pull requests due to a GitHub outage",
+ "theme": "warning"
+ }
+
+### TaskStats
+
+Task stats are aggregated task execution statistics for a given project.
+The statistics can be grouped by time period and by task, variant,
+distro combinations.
+
+#### Objects
+
+**TaskStats**
+
+| Name | Type | Description |
+|------------------------|--------|-----------------------------------------------------------------------------------------------------------|
+| `task_name` | string | Name of the task the test ran under. |
+| `variant` | string | Name of the build variant the task ran on. Omitted if the grouping does not include the build variant. |
+| `distro` | string | Identifier of the distro that the task ran on. Omitted if the grouping does not include the distro. |
+| `date` | string | The start date ("YYYY-MM-DD" UTC day) of the period the statistics cover. |
+| `num_success` | int | The number of times the task was successful during the target period. |
+| `num_failed` | int | The number of times the task failed during the target period. |
+| `num_total` | int | The number of times the task ran during the target period. |
+| `num_timeout` | int | The number of times the task ended on a timeout during the target period. |
+| `num_test_failed` | int | The number of times the task failed with a failure of type [test]{.title-ref} during the target period. |
+| `num_system_failed` | int | The number of times the task failed with a failure of type [system]{.title-ref} during the target period. |
+| `num_setup_failed` | int | The number of times the task failed with a failure of type [setup]{.title-ref} during the target period. |
+| `avg_duration_success` | float | The average duration, in seconds, of the tasks that passed during the target period. |
+
+
+#### Endpoints
+
+##### Fetch the Task Stats for a project
+
+ GET /projects//task_stats
+
+Returns a paginated list of task stats associated with a specific project filtered and grouped according to the query parameters.
+
+| Name | Type | Description |
+|----------------|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| after_date | string | The start date (included) of the targeted time interval. The format is "YYYY-MM-DD". The date is UTC. |
+| before_date | string | The end date (excluded) of the targeted time interval. The format is "YYYY-MM-DD". The date is UTC. |
+| group_num_days | int | Optional. Indicates that the statistics should be aggregated by groups of`group_num_days`days. The first group will start on`after_date`, the last group will end on the day preceding`before_date`and may have less than`group_num_days`days. Defaults to 1. |
+| requesters | []string or comma separated strings | Optional. The requesters that triggered the task execution. Accepted values are`mainline`,`patch`,`trigger`, and`adhoc`. Defaults to`mainline`. |
+| tasks | []string or comma separated strings | The tasks to include in the statistics. |
+| variants | []string or comma separated strings | Optional. The build variants to include in the statistics. |
+| distros | []string or comma separated strings | Optional. The distros to include in the statistics. |
+| group_by | string | Optional. How to group the results. Accepted values are`task_variant`,`task`. By default the results are not grouped, i.e. are returned by combination of task + variant + distro. |
+| sort | string | Optional. The order in which the results are returned. Accepted values are`earliest`and`latest`. Defaults to`earliest`. |
+| start_at | string | Optional. The identifier of the task stats to start at in the pagination |
+| limit | int | Optional. The number of task stats to be returned per page of pagination. Defaults to 1000. |
+
+#### TaskReliability
+
+Task Reliability success scores are aggregated task execution statistics for a given project. Statistics can be grouped by time period (days) and by task, variant, distro combinations. The score is based on the lower bound value of a `Binomial proportion confidence interval `_. In this case, the equation is a `Wilson score interval `_: |Wilson score interval with continuity correction| In statistics, a binomial proportion confidence interval is a confidence interval for the probability of success calculated from the outcome of a series of successâfailure experiments (Bernoulli trials). In other words, a binomial proportion confidence interval is an interval estimate of a success probability p when only the number of experiments n and the number of successes nS are known. The advantage of using a confidence interval of this sort is that the computed value takes the number of test into account. The lower the number of test, the greater the margin of error. This results in a lower success rate score for the cases where there are fewer test results. During the evaluation of this algorithm, 22 consecutive test passes are required before a success score of .85 is reached (with a significance level / Îą of ``0.05`).
+
+##### Objects
+
+| Name | Type | Description |
+|----------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| task_name | string | Name of the task the test ran under. |
+| variant | string | Name of the build variant the task ran on. Omitted if the grouping does not include the build variant. |
+| distro | string | Identifier of the distro that the task ran on. Omitted if the grouping does not include the distro. |
+| date | string | The start date ("YYYY-MM-DD" UTC day) of the period the statistics cover. |
+| num_success | int | The number of times the task was successful during the target period. |
+| num_failed | int | The number of times the task failed during the target period. |
+| num_total | int | The number of times the task ran during the target period. |
+| num_timeout | int | The number of times the task ended on a timeout during the target period. |
+| num_test_failed | int | The number of times the task failed with a failure of type `test` during the target period. |
+| num_system_failed | int | The number of times the task failed with a failure of type `system` during the target period. |
+| num_setup_failed | int | The number of times the task failed with a failure of type `setup` during the target period. |
+| avg_duration_success | float | The average duration, in seconds, of the tasks that passed during the target period. |
+| success_rate | float | The success rate score calculated over the time span, grouped by time period and distro, variant or task. The value ranges from 0.0 (total failure) to 1.0 (total success). |
+
+##### Endpoints
+
+###### Fetch the Task Reliability score for a project
+
+ GET /projects//task_reliability
+
+Returns a paginated list of task reliability scores associated with a
+specific project filtered and grouped according to the query parameters.
+
+**Parameters**
+
+| Name | Type | Description |
+|------------------|-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `before_date` | string | The end date (included) of the targeted time interval. The format is "YYYY-MM-DD". The date is UTC. Defaults to today. |
+| `after_date` | string | The start date (included) of the targeted time interval. The format is "YYYY-MM-DD". The date is UTC. Defaults to `before_date`. |
+| `group_num_days` | int | Optional. Indicates that the statistics should be aggregated by groups of `group_num_days` days. The first group will start on the nearest first date greater than `after_date`, the last group will start on `before_date` - `group_num_days`\` days. Defaults to 1. |
+| `requesters` | []string or comma separated strings | Optional. The requesters that triggered the task execution. Accepted values are `mainline`, `patch`, `trigger`, and `adhoc`. Defaults to `mainline`. |
+| `tasks` | []string or comma separated strings | The tasks to include in the statistics. |
+| `variants` | []string or comma separated strings | Optional. The build variants to include in the statistics. |
+| `distros` | []string or comma separated strings | Optional. The distros to include in the statistics. |
+| `group_by` | string | Optional. How to group the results. Accepted values are `task`, `task_variant`, and `task_variant_distro`. By default the results are grouped by task. |
+| `sort` | string | Optional. The order in which the results are returned. Accepted values are `earliest` and `latest`. Defaults to `latest`. |
+| `start_at` | string | Optional. The identifier of the task stats to start at in the pagination |
+| `limit` | int | Optional. The number of task stats to be returned per page of pagination. Defaults to 1000. |
+
+
+##### Examples
+
+Get the current daily task reliability score.
+
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint
+
+Get the daily task reliability score for a specific day. ```` :
+
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&before_date=2019-06-15
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&before_date=2019-06-15&after_date=2019-06-15
+
+Get the daily task reliability score from after date to today. ```` :
+
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&after_date=2019-06-15
+
+Get the current weekly task reliability score. ```` :
+
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&group_num_days=7
+
+Get the current monthly task reliability score. ```` :
+
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&group_num_days=28
+
+Get the task reliability score trends. ````
+
+Project is mongodb-mongo-master, task is lint. Assuming today is
+2019-08-29 then 2019-03-15 is 6 months ago. :
+
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&after_date=2019-03-15
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&after_date=2019-03-15&group_num_days=7
+ GET /projects/mongodb-mongo-master/task_reliability?tasks=lint&after_date=2019-03-15&group_num_days=28
+
+### Notifications
+
+Create custom notifications for email, slack, JIRA comments, and JIRA
+issues.
+
+#### Objects
+
+**Email**
+
+| Name | Type | Description |
+|-----------------|---------------------|-------------------------------------------------------------------------------------------------------------------|
+| `from` | string | Optional. The email sender. |
+| `recipients` | []string | The email recipient. |
+| `subject` | string | Optional. The email subject. |
+| `body` | string | Optional. The email body. |
+| `is_plain_text` | string | Optional. Specifies the Content-Type of the email. If true, it will be "text/plain"; otherwise it is "text/html". |
+| `headers` | map[string][]string | Optional. Email headers. |
+
+
+**Slack**
+
+| Name | Type | Description |
+|--------------------|---------|-------------------------------------------|
+| `target` | string | Required. The name of the recipient. |
+| `msg` | string | Required. The message for the notification. |
+| `attachments` | []SlackAttachment | Optional. Array of attachments to a message. |
+
+
+**SlackAttachment**
+
+| Name | Type | Description |
+|---------------|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `title` | string | Optional. The attachment title. |
+| `title_link` | string | Optional. A URL that turns the title into a link. |
+| `text` | string | If `fallback` is empty, this is required. The main body text of the attachment as plain text, or with markdown using `mrkdwn_in`. |
+| `fallback` | string | If `text` is empty, this is required. A plain text summary of an attachment for clients that don't show formatted text (eg. IRC, mobile notifications). |
+| `mrkdwn_in` | []string | Optional. An array of fields that should be formatted with markdown. |
+| `color` | string | Optional. The message color. Can either be one of good (green), warning (yellow), danger (red), or any hex color code (eg. #439FE0). |
+| `author_name` | string | Optional. The display name of the author. |
+| `author_icon` | string | Optional. A URL that displays the author icon. Will only work if `author_name` is present. |
+| `fields` | []SlackAttachmentField | Optional. Array of SlackAttachmentFields that get displayed in a table-like format. |
+
+
+**SlackAttachmentField**
+
+| Name | Type | Description |
+|---------|--------|---------------------------------------------------------------------------------------------------------------------|
+| `title` | string | Optional. The field title. |
+| `value` | string | Optional. The field text. It can be formatted as plain text or with markdown by using `mrkdwn_in`. |
+| `short` | string | Optional. Indicates whether the field object is short enough to be displayed side-by-side with other field objects. |
+
+
+This corresponds with documentation for the [Slack API for
+attachments](https://api.slack.com/reference/messaging/attachments).
+
+**JIRA Issue**
+
+| Name | Type | Description |
+|---------------|------------------------|-------------------------------------------------|
+| `issue_key` | string | Optional. |
+| `project` | string | Optional. The project name. |
+| `summary` | string | Optional. The summary text. |
+| `description` | string | Optional. The issue description. |
+| `reporter` | string | Optional. The issue reporter. |
+| `assignee` | string | Optional. The issue assignee. |
+| `type` | string | Optional. The issue type. |
+| `components` | string | Optional. The project components. |
+| `labels` | string | Optional. The issue labels. |
+| `fields` | map[string]interface{} | Optional. Arbitrary map of custom field values. |
+
+
+This corresponds with the documentation in the [JIRA API for creating
+issues](https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-createIssue).
+
+**JIRA Comment**
+
+| Name | Type | Description |
+|------------|--------|-------------------------------------------------------------------|
+| `issue_id` | string | Optional. The ID of the issue where the comment should be posted. |
+| `body` | string | Optional. The comment text. |
+
+
+This corresponds with the documentation in the [JIRA API for adding
+comments](https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-addComment).
+
+#### Endpoints
+
+ POST /notifications/
+
+The type can be "email", "slack", "jira_issue", or
+"jira_comment".
+
+### Permissions
+
+ GET /permissions
+
+Returns a static list of project and distro permissions that can be
+granted to users. The format is :
+
+ {
+ projectPermissions: [
+ {
+ key: "permission_key",
+ name: "My Permission",
+ levels: [
+ {
+ description: "Edit this permission",
+ value: 10,
+ }
+ ]
+ }
+ ]
+ distroPermissions:[
+ {
+ key: "permission_key",
+ name: "My distro Permission",
+ levels: [
+ {
+ description: "Edit this permission",
+ value: 10,
+ }
+ ]
+ }
+ ]
+ }
+
+### Users
+
+#### Endpoints
+
+Give Permissions to User
+
+ POST /users//permissions Grants the user specified by user_id the permissions in the request body.
+
+Note that usage of this endpoint requires that the requesting user have security to modify roles. The format of the body is :
+```
+{
+ "resource_type": "project",
+ "resources": ["project1", "project2"],
+ "permissions": {
+ "project_tasks: 30,
+ "project_patches": 10
+ }
+}
+```
+
+* resource_type - the type of resources for which permission is granted. Must be one of "project", "distro", or "superuser"
+* resources - an array of strings representing what resources the access is for. For a resource_type of project, this will be a list of projects. For a resource_type of distro, this will be a list of distros.
+* permissions - an object whose keys are the permission keys returned by the /permissions endpoint above, and whose values are the levels of access to grant for that permission (also returned by the /permissions endpoint)
+
+Get User Permissions
+
+ GET /users//permissions
+
+**Parameters**
+
+| Name | Type | Description |
+|------|---------|------------------------------------------------------------------|
+| all | Boolean | Optional. If included, we will not filter out basic permissions. |
+
+
+Retrieves all permissions for the user (ignoring basic permissions that
+are given to all users, unless all=true is included). The format of the
+response is :
+```
+[ {
+ "type": "project",
+ "permissions": {
+ "project1": { "project_tasks": 30, "project_patches": 10 },
+ "project2": { "project_tasks": 10, "project_patches": 10 } }
+ }
+ {
+ "type": "distro",
+ "permissions": { "distro1": {"distro_settings": 10 } }
+ } ]
+```
+
+- type - the type of resources for which the listed permissions apply.
+ Will be "project", "distro", or "superuser"
+- permissions - an object whose keys are the resources for which the
+ user has permissions. Note that these objects will often have many
+ keys, since logged-in users have basic permissions to every project
+ and distro. The values in the keys are objects representing the
+ permissions that the user has for that resource, identical to the
+ format of the permissions field in the POST
+ /users/\/permissions API.
+
+Get All User Permissions For Resource
+
+ GET /users/permissions
+
+Retrieves all users with permissions for the resource, and their highest permissions, and returns this as a mapping. This ignores basic permissions that are given to all users.
+
+The format of the body is:
+
+ {
+ "resource_type": "project",
+ "resources": ["project1", "project2"],
+ "permissions": {
+ "project_tasks: 30,
+ "project_patches": 10
+ }
+ }"
+ }
+ }
+
+##### Delete User Permissions ``````````\`
+
+ DELETE /users//permissions
+
+Deletes all permissions of a given type for a user by deleting their
+roles of that type for that resource ID. This ignores the Basic
+Project/Distro Access that is given to all MongoDB employees.
+
+Note that usage of this endpoint requires that the requesting user have
+security to modify roles. The format of the body is: :
+
+ {
+ "resource_type": "project",
+ "resource_id": "project_id",
+ }
+
+- resource_type - the type of resources for which to delete
+ permissions. Must be one of "project", "distro", "superuser",
+ or "all". "all" will revoke all permissions for the user.
+- resource_id - the resource ID for which to delete permissions.
+ Required unless deleting all permissions.
+
+##### Get Users for Role
+
+ GET /roles//users
+
+Gets a list of users for the specified role. The format of the response
+is:
+```json
+{ "users": ["list", "of", "users"] }
+```
+
+##### Give Roles to User
+
+ POST /users//roles
+
+Adds the specified roles to the specified user. Attempting to add a
+duplicate role will result in an error. If you're unsure of what roles
+you want to add, you probably want to POST To /users/user_id/permissions
+instead. Note that usage of this endpoint requires that the requesting
+user have security to modify roles. The format of the body is: :
+
+ {
+ "roles": [ "role1", "role2" ],
+ "create_user": true,
+ }
+
+- roles - the list of roles to add for the user
+- create_user - if true, will also create a shell user document for
+ the user. By default, specifying a user that does not exist will
+ error
+
+##### Offboard User
+
+ POST /users/offboard_user
+
+Marks unexpirable volumes and hosts as expirable for the user, and
+removes the user as a project admin for any projects, if applicable.
+This returns the IDs of the hosts/volumes that were unexpirable and
+modified.
+
+This route expects to receive the user in a json body with the following
+format: :
+
+ {
+ "email": "my_user@email.com"
+ }
+
+- email - the email of the user
+
+The format of the response is: :
+
+ {
+ "terminated_hosts": [ "i-12345", "i-abcd" ],
+ "terminated_volumes": ["volume-1"],
+ }
+
+**Query Parameters**
+
+| Name | Type | Description |
+|---------|------|--------------------------------------------------------------------------------------|
+| dry_run | bool | If set to true, route returns the IDs of the hosts/volumes that *would* be modified. |
+
+## REST V2 Use Case Guide
+
+### Find all failures of a given build
+
+#### Endpoint
+
+`GET /builds//tasks`
+
+#### Description
+
+To better understand the state of a build, perhaps when attempting to
+determine the quality of a build for a release, it is helpful to be able
+to fetch information about the tasks it ran. To fetch this data, make a
+call to the `GET /builds//tasks` endpoint. Page through the
+results task data to produce meaningful statistics like the number of
+task failures or percentage of failures of a given build.
+
+## Find detailed information about the status of a particular tasks and its tests
+
+### Endpoints
+
+`GET /tasks/`
+
+`GET /tasks//tests`
+
+#### Description
+
+To better understand all aspects of a task failure, such as failure
+mode, which tests failed, and how long it took, it is helpful to fetch
+this information about a task. This can be accomplished using 2 API
+calls. Make one call to the endpoint for a specific task
+`GET /tasks/` which returns information about the task itself.
+Then, make a second cal to `GET /tasks//tests` which delivers
+specific information about the tests that ran in a certain task.
+
+### Get all hosts
+
+#### Endpoint
+
+`GET /hosts`
+
+#### Description
+
+Retrieving information on Evergreen's hosts can be helpful for system
+monitoring. To fetch this information, make a call to `GET /hosts`,
+which returns a paginated list of hosts. Page through the results to
+inspect all hosts.
+
+By default, this endpoint will only return hosts that are considered
+"up" (status is equal to running, initializing, starting,
+provisioning, or provision failed).
+
+### Restart all failures for a commit
+
+#### Endpoints
+
+`GET /project//versions//tasks`
+
+`POST /tasks//restart`
+
+#### Description
+
+Some Evergreen projects contain flaky tests or can endure spurious
+failures. To restart all of these tasks to gain better signal a user can
+fetch all of the tasks for a commit. Make a request to
+`GET /project//versions//tasks` to fetch the
+tasks that ran and then loop over all of the returned tasks, calling
+`POST /tasks//restart` on each task which has failed.
+
+### Modify an Existing Project
+
+#### Endpoint
+
+`PATCH /projects/`
+
+#### Description
+
+To modify the project, make a request to the endpoint with a JSON object
+as the body (using the project object descriptions on the REST V2 Usage
+wiki page). The result of a successful PATCH will be a 200 status. To
+see the modified project, make a request to
+`GET /projects/`.
+
+For example, to enable the commit queue the body would be:
+
+ { "commit_queue":
+ { "enabled": "true" }
+ }
+
+To add and delete admins:
+
+ { "admins": ["annie.black", "brian.samek"], // does not overwrite existing admins
+ "delete_admins": ["john.liu"] // deletes existing admin }
+
+To add/delete variables and specify which are private:
+
+ { "variables":
+ { "vars": { // add to existing variables
+ "banana": "yellow",
+ "apple": "red", },
+ "private_vars": { "apple": "true", // this cannot be undone
+ },
+ "vars_to_delete": ["watermelon"] }}
+
+### Copy an Existing Project
+
+#### Endpoint
+
+`POST /projects//copy`
+
+#### Description
+
+To copy a project to a new project, this is the route you would use. To
+define the new project's name (which is required), we would include a
+query parameter, for example:
+
+ projects/my_first_project/copy?new_project=my_second_project
+
+This route will return the new project but this will not include
+variables/aliases/subscriptions; to see this, GET the new project.
diff --git a/docs/Using-the-Command-Line-Tool.md b/docs/Using-the-Command-Line-Tool.md
new file mode 100644
index 00000000000..b71ee3c40b2
--- /dev/null
+++ b/docs/Using-the-Command-Line-Tool.md
@@ -0,0 +1,424 @@
+# Use the CLI
+
+How to set up and use the command-line tool
+==
+
+Downloading the Command Line Tool
+--
+
+Go to your [evergreen user settings page](https://spruce.mongodb.com/preferences) and follow the steps there.
+Copy and paste the text in the configuration panel on the settings page into a file in your *home directory* called `.evergreen.yml`, which will contain the authentication information needed for the client to access the server.
+
+On macOS, the evergreen binary is currently not notarized. To allow running it, go to System Preferences, then Security and Privacy. You should be able to make an exception for it in the "General" tab.
+
+Basic Patch Usage
+--
+
+To submit a patch, run this from your local copy of the mongodb/mongo repo:
+```bash
+evergreen patch -p
+```
+
+Variants and tasks for a patch can be specified with the `-v` and `-t`:
+```bash
+evergreen patch -v enterprise-suse11-64 -t compile
+```
+
+Multiple tasks and variants are specified by passing the flags multiple times:
+```bash
+evergreen patch -v enterprise-suse11-64 -v solaris-64-bit -t compile -t unittest -t jsCore
+```
+
+_Every_ task or variant can be specified by using the "all" keyword:
+```bash
+evergreen patch -v all -t all
+```
+
+Tasks and variants can also be specified using the regex variants(-rv) and regex tasks(-rt) flags:
+```bash
+evergreen patch --regex_variants "enterprise.*" --rt "test-.*"
+```
+
+To use the same tasks and variants defined for the previous patch created for this project, you can use the `--reuse` flag. If any tasks/variants were defined for the previous patch but do not exist for the new patch, they will not be added. Note also that aliases will not be re-calculated; this is so if an alias had been given to the previous patch but then the user chose to tweak the specific tasks/variants, the final configuration is the one that we reuse.
+```
+evergreen patch --reuse
+```
+Similarly, to using the `--repeat-failed` flag will perform the same behavior as the `--reuse` flag, with the only difference being that it will repeat only the failed tasks and build variants from the most recent patch (if any failures exist).
+```
+evergreen patch --repeat-failed
+```
+
+To skip all (y/n) prompts, the `-y` keyword can be given:
+```
+evergreen patch -y
+```
+
+Working Tree Changes
+---
+By default patches will include only committed changes, not changes in Git's working tree or index. To include changes from the working tree use the `--uncommitted, -u` flag or set a default by inserting `patch_uncommitted_changes: true` in the `~/.evergreen.yml` file.
+
+Defaults
+---
+The first time you run a patch, you'll be asked if you want to set the given inputs such as tasks or variants as the default for that project.
+After setting defaults, you can omit the flags and the default values will be used, so that just running `evergreen patch` will work.
+
+Defaults may be changed at any time by editing your `~/.evergreen.yml` file.
+
+Additionally, the default project for a directory is also tracked by the first successful patch or commit queue merge you perform in that directory. Symlinks are resolved to their absolute path. The defaults are maintained in the `~/.evergreen.yml` file, under the `projects_for_directory` key. The value for this key is a map, where the map keys are absolute paths, and the map values are project identifiers. The automatic defaulting can be disabled by setting disable_auto_defaulting to true.
+
+Prompts
+---
+Many prompts will ask for a y/n (i.e. yes/no) response. If you hit enter, we will default to yes if the prompt specifies Y/n, and no if the prompt specifies y/N.
+
+Advanced Patch Tips
+--
+
+##### Multiple Defaults
+While the `evergreen` program has no built-in method of saving multiple configurations of defaults for a project, you can easily mimic this functionality by using multiple local evergreen configurations.
+The command line tool allows you to pass in a specific config file with `--config`:
+```bash
+evergreen --config ~/.many_compiles.yml patch
+```
+You can use this feature along with shell aliasing to easily manage multiple default sets.
+
+For example, an enterprising server engineer might create a config file called `tests.yml` with the content
+```yaml
+api_server_host: #api
+ui_server_host: #ui
+api_key: #apikey
+user: #user
+projects:
+- name: mongodb-mongo-master
+ variants:
+ - windows-64-2k8-debug
+ - enterprise-rhel-62-64-bit
+ tasks:
+ - all
+```
+so that running `evergreen --config tests.yml patch` defaults to running all tasks for those two variants.
+
+You might also want to create a config called `compile.yml` with
+```yaml
+api_server_host: #api
+ui_server_host: #ui
+api_key: #apikey
+user: #user
+projects:
+- name: mongodb-mongo-master
+ variants:
+ - windows-64-2k8-debug
+ - enterprise-rhel-62-64-bit
+ - solaris-64-bit
+ - enterprise-osx-108 #and so on...
+ tasks:
+ - compile
+ - unittests
+```
+for running basic compile/unit tasks for a variety of platforms with `evergreen --config compile.yml patch`.
+This setup also makes it easy to do scripting for nice, automatic patch generation.
+
+##### Git Diff
+Extra args to the `git diff` command used to generate your patch may be specified by appending them after `--`. For example, to generate a patch relative to the previous commit:
+
+ evergreen patch -- HEAD~1
+
+Or to patch relative to a specific tag:
+
+ evergreen patch -- r3.0.2
+
+Though keep in mind that the merge base must still exist in the canonical GitHub repository so that Evergreen can apply the patch.
+
+
+The `--` feature can also be used to pass flags to `git diff`.
+
+
+#### Task Sync
+The task sync feature allows you to upload and download a task's working directory to and from Amazon S3 at the end of a patched task. This can be useful for debugging since it allows you to see the exact files used in the task. In order to use this for patches, it must be enabled in the project settings.
+
+To specify which tasks you wish to sync, include the `--sync_variants` and `--sync_tasks` flags. For example:
+
+ evergreen patch -p -t -t -v --sync_tasks --sync_variants
+
+There is an option to specify a task status for which the sync will run ("success" or "failed") using `--sync_statuses`. A maximum timeout can be specified for the sync before it gets canceled using `--sync_timeout`.
+
+Once the task finishes syncing, the task directory contents can be pulled into a spawn host by requesting it with the host or it can be manually pulled onto the local machine using [evergreen pull](#pull).
+
+
+#### Local Aliases
+Users can define local aliases in their `evergreen.yml` files and even override a patch alias defined by a project admin. Local aliases are defined at the project level.
+
+```yaml
+api_server_host: #api
+ui_server_host: #ui
+api_key: #apikey
+user: #user
+projects:
+- name: mongodb-mongo-master
+ variants:
+ - windows-64-2k8-debug
+ - enterprise-rhel-62-64-bit
+ - solaris-64-bit
+ - enterprise-osx-108 #and so on...
+ local_aliases:
+ - alias: "alias_name"
+ variant: ".*"
+ task: "^compile$,tests$"
+ tasks:
+ - compile
+ - unittests
+```
+Calling the command:
+
+ evergreen patch -a alias_name
+
+will use the above local alias and schedule every variant with tasks named "compile" and tasks that end with "tests".
+
+Operating on existing patches
+--
+
+To list patches you've created:
+
+ evergreen list-patches
+
+
+##### To cancel a patch:
+
+```
+evergreen cancel-patch -i
+```
+
+##### To finalize a patch:
+
+```
+evergreen finalize-patch -i
+```
+Finalizing a patch actually creates and schedules and tasks. Before this the patch only exists as a patch "intent". You can finalize a patch either by passing --finalize or -f or by clicking the "Schedule Patch" button in the UI of an un-finalized patch.
+
+##### To create a patch and add module changes in one command:
+```
+evergreen patch --include-modules
+```
+This will attempt to add changes for each module that your project supports. This flag will prompt you to provide your local absolute path to the module, and it will be stored in your evergreen.yml file. For example:
+```
+projects:
+ - name: my_favorite_project
+ module_paths:
+ my_favorite_module: /Users/first.last/go/src/github.com/my_favorite/module
+```
+
+We will then check that directory for changes, confirm them with you, and add them to the patch if confirmed. If there are modules you donât want to include you can skip them and still continue to check others, or if there are no changes weâll skip them automatically.
+(Note: we wonât set this path for you if you have disable_auto_defaulting set in your evergreen.yml, in which case you will need to add it manually, following the format above.)
+
+##### To add changes to a module on top of an existing patch:
+
+```
+cd ~/projects/module-project-directory
+evergreen set-module -i -m
+```
+Note: `set-module` must be run before finalizing the patch.
+
+##### Validating changes to config files
+
+When editing yaml project files, you can verify that the file will work correctly after committing by checking it with the "validate" command.
+To validate local changes within modules, use the ``local_modules`` flag to list out module name and path pairs.
+
+Note: Must include a local path for includes that use a module.
+
+```
+evergreen validate -lm =
+```
+
+The validation step will check for
+ * valid yaml syntax
+ * correct names for all commands used in the file
+ * logical errors, like duplicated variant or task names
+ * invalid sets of parameters to commands
+ * warning conditions such as referencing a distro pool that does not exist
+ * merging errors from include files
+
+Note: validation is server-side and requires a valid evergreen configuration file (by default located at ~/.evergreen.yml). If the configuration file exists but is not valid (malformed, references invalid hosts, invalid api key, etc.) the `evergreen validate` command [will exit with code 0, indicating success, even when the project file is invalid](https://jira.mongodb.org/browse/EVG-6417). The validation is likely not performed at all in this scenario. To check whether a project file is valid, verify that the process exited with code 0 and produced the output "\ is valid".
+
+Additionally the `evaluate` command can be used to locally expand task tags and return a fully evaluated version of a project file.
+
+```
+evergreen evaluate
+```
+
+Flags `--tasks` and `--variants` can be added to only show expanded tasks and variants, respectively.
+
+Basic Host Usage
+--
+Evergreen Spawn Hosts can now be managed from the command line, and this can be explored via the command line `--help` arguments.
+
+### Attaching an EBS Volume
+
+To create a new EBS volume:
+```
+evergreen volume create --size --type --zone
+```
+While the Availability Zone does have a default, this must be in the _same zone as the host_. If you don't know your host's availability zone, this can be found easily at `evergreen host list --mine`.
+
+To attach the volume to your host (assuming the same availability zone), use:
+```
+evergreen host attach --host --volume
+```
+If you forget your volume ID, you can find this with `evergreen volume list`. If the volume is already attached, you will see a host ID given with this volume, and a volume can only have one host.
+
+A volume can only be deleted if detached, so removing a volume would for example be:
+```
+evergreen host detach --host --volume
+evergreen volume delete --id
+```
+
+### Modify Hosts
+
+Tags can be modified for hosts using the following syntax:
+```
+evergreen host modify --tag KEY=VALUE
+evergreen --delete-tag KEY
+```
+Note these tags cannot overwrite Evergreen tags.
+
+Hosts can be set to never expire using the `--no-expire` tag (although each user has a limit for these kinds of hosts). Hosts can be set to expire again using the `--expire` tag, which will set the host to expire in 24 hours (this can be extended using `--extend `.
+
+
+### Stop/Start Host to Change Instance Type
+
+Instance type can only be changed if the host is stopped. Hosts can be stopped and started using `evergreen host start/stop --host --wait `. To change instance type, `host modify --type` (approved types can be configured from the admin settings).
+
+### Run a script on a host
+Run a bash script on a host.
+```
+evergreen host exec --host --script
+```
+This is useful to unblock a host when it can't be reached over SSH.
+
+Other Commands
+--
+
+#### Get Update
+
+The command `evergreen get-update` fetches the latest version of the Evergreen CLI binary if the current binary is out of date on a given machine.
+
+Example that downloads the binary:
+```
+evergreen get-update --auto
+```
+
+Specify the optional `--auto` argument to enable automatic CLI upgrades before each command if your current binary is out of date. Once this is done, all future commands will auto update if necessary without the need for specifying this flag.
+
+#### Fetch
+
+The command `evergreen fetch` can automate downloading of the binaries associated with a particular task, or cloning the repo for the task and setting up patches/modules appropriately.
+
+Example that downloads the artifacts for the given task ID and cloning its source:
+```
+evergreen fetch -t --source --artifacts
+```
+
+Specify the optional `--dir` argument to choose the destination path where the data is fetched to; if omitted, it defaults to the current working directory.
+
+#### Pull
+
+The command `evergreen pull` can download the task directory contents of a synced task after an [s3.push](Configure-a-Project/Project-Commands.md#s3push) command has finished or after a [patched task that has requested task sync](#task-sync) has completed.
+
+Example that downloads the artifacts for the given task ID and cloning its source:
+```
+evergreen pull --task
+```
+
+Specify the optional `--dir` argument to choose the destination path; if omitted, it defaults to the current working directory.
+
+#### List
+
+The command `evergreen list` can help you determine what projects, variants, and tasks are available for patching against.
+The commands
+```
+evergreen list --projects
+evergreen list --tasks -p
+evergreen list --variants -p
+evergreen list --patch-aliases -p
+evergreen list --trigger-aliases -p
+```
+will all print lists to stdout.
+
+The list command can take an optional `-f/--file` argument for specifying a local project configuration file to use instead of querying the Evergreen server for `-p/--project`.
+
+
+#### Last Green
+
+The command `evergreen last-green` can help you find an entirely successful commit to patch against.
+To use it, specify the project you wish to query along with the set of variants to verify as passing.
+```
+evergreen last-green -p -v -v -v
+```
+
+A run might look something like
+```
+evergreen last-green -p mci -v ubuntu
+
+ Revision : 97ac269b1e5cf0961fce5bcf985f01c263911efb
+ Message : EVG-795 no longer treat conflicting targets as system failures
+ Link : https://evergreen.mongodb.com/version/mci_97ac269b1e5cf0961fce5bcf985f01c263911efb
+
+```
+
+#### Commit Queue
+The command `evergreen commit-queue` contains subcommands for interacting with the commit queue. See [Commit Queue](Run-Tasks/Commit-Queue.md).
+
+#### Buildlogger Fetch
+
+The command `evergreen buildlogger fetch` downloads logs from cedar buildlogger.
+To use it, specify the task id and execution from which you would like to download logs.
+
+To download all logs of a task (including test logs):
+```
+evergreen buildlogger fetch --task_id --execution
+```
+
+To download task level logs:
+```
+evergreen buildlogger fetch --task_id --execution --tags agent_log,task_log,system_log
+```
+You may request any combination of agent, task, or system logs by setting the corresponding names in `--tags`. They must be comma-separated if requesting more than one.
+
+To download test logs:
+```
+evergreen buildlogger fetch --task_id --execution --test_name
+```
+Please note that test logs may not be in cedar buildlogger yet for some projects.
+
+### Server Side (for Evergreen admins)
+
+To enable auto-updating of client binaries, add a section like this to the settings file for your server:
+
+
+```yaml
+api:
+ clients:
+ latest_revision: "c0110ba937047f99c9a68470f6ec51fc6d98c5cc"
+ client_binaries:
+ - os: "darwin"
+ arch: "amd64"
+ url: "https://.evergreen"
+ - os: "linux"
+ arch: "amd64"
+ url: "https://.evergreen"
+ - os: "windows"
+ arch: "amd64"
+ url: "https://.evergreen.exe"
+```
+
+The "url" keys in each list item should contain the appropriate URL to the binary for each architecture. The "latest_revision" key should contain the githash that was used to build the binary. It should match the output of `evergreen version` for *all* the binaries at the URLs listed in order for auto-updates to be successful.
+
+### Notifications
+
+The Evergreen CLI has the ability to send slack and email notifications for scripting. These use Evergreen's account, so be cautious about rate limits or being marked as a spammer.
+
+```
+# Send a Slack message
+evergreen notify slack --target <#channel or @user> --msg
+
+# Send an email
+evergreen notify --from --recipients --subject --body
+```
diff --git a/docs/decisions/2023-03-13_shared_rest_route_logic.md b/docs/decisions/2023-03-13_shared_rest_route_logic.md
new file mode 100644
index 00000000000..ebf337d7b35
--- /dev/null
+++ b/docs/decisions/2023-03-13_shared_rest_route_logic.md
@@ -0,0 +1,22 @@
+# 2023-03-13 Shared REST Route Logic
+
+* status: accepted
+* date: 2023-03-13
+* authors: Malik Hadjri
+
+## Context and Problem Statement
+
+Ticket: EVG-16701
+
+A feature request was made for a new endpoint to perform a bulk operation on a group of versions. Since there was an existing GET endpoint to retrieve a list of versions based off of detailed request parameters, the
+PR to implement the new endpoint was made to use the existing GET endpoint's logic to retrieve the list of versions and then perform the bulk operation on the list of versions. This was done to avoid duplicating request parsing and version retrieving
+logic.
+
+However, this refactoring also included some cleanup of the existing GET endpoint, doing things such as tweaking the names of request variables and slightly changing the way that the request parameters were applied.
+The existing endpoint was a longstanding one that users' scripts were relying on, so this seemingly minor change caused a breaking change for users' scripts and a rollback was needed.
+
+
+## Decision Outcome
+Despite the potential similarities of the two routes, they ultimately serve different purposes and should be treated as such. The GET route is meant to be a general purpose route that can be used to retrieve a list of versions based off of a variety of request parameters. By contrast, the new route is meant to be a more specific route that is used to perform a priority-specific operation on a group of versions.
+
+Because of this, we should consider that refactoring existing logic to suit new feature requests isn't always the ideal solution, especially when it requires that we make significant changes to existing endpoints and their logic. If we do go forward with such a decision, we'll want to at minimum communicate this beforehand.
\ No newline at end of file
diff --git a/docs/decisions/2023-03-24_route_auth_exception.md b/docs/decisions/2023-03-24_route_auth_exception.md
new file mode 100644
index 00000000000..413e163eb43
--- /dev/null
+++ b/docs/decisions/2023-03-24_route_auth_exception.md
@@ -0,0 +1,16 @@
+# 2023-03-24 REST route authentication exception
+
+* status: accepted
+* date: 2023-03-24
+* authors: Malik Hadjri
+
+## Context and Problem Statement
+
+Ticket: EVG-19068
+
+Recently all REST endpoints in Evergreen have been changed to require authentication across the board. However, this has caused our /dockerfile endpoint to consistently return 401 codes to our docker client. Since all the route does is serve a static string, we initially thought it could be removed altogether and move the string to the docker client side of our code.
+
+However, there is some unexpected complexity here because of the way we use Docker's ImageBuild api which requires us to pass in some endpoint to retrieve the dockerfile from, which currently is our /dockerfile endpoint, and it's not straightforward to remove that logic and directly provide the dockerfile string.
+
+## Decision Outcome
+Since we are just serving a static string for this route, and given the non-trivial work needed to remove the route / give it auth, the simplest path forward was to make an exception to remove auth from only this route.
\ No newline at end of file
diff --git a/docs/decisions/2023-03-30_project_create_logic.md b/docs/decisions/2023-03-30_project_create_logic.md
new file mode 100644
index 00000000000..a970ec0c160
--- /dev/null
+++ b/docs/decisions/2023-03-30_project_create_logic.md
@@ -0,0 +1,19 @@
+# 2023-03-30 Project Create and Enable Logic
+
+* status: accepted
+* date: 2023-03-30
+* authors: Bynn Lee
+
+## Context and Problem Statement
+
+Ticket: PM-1403
+
+Because Evergreen admins can now create projects, we wanted a way to limit users from creating and enabling too many projects or else that could result in us constantly hitting our GitHub API limit.
+
+## Decision Outcome
+By running an aggregation, I found that all owner, repo combinations only own 10 projects max at the moment. We set the current repo project limit to 15.
+One exception to that was mongodb/mongo which had 23 projects and has been added to the override list.
+I also analyzed our average GitHub API usage and determined that we would be able to support around 400 projects compared to the current 315 projects right now.
+
+I also got rid of the ability to default to repo on enabled for projects.
+This feature was not being used by any project owner and was slowing our abilities to query for enabled projects and making the code overly complicated.
\ No newline at end of file
diff --git a/docs/decisions/README.md b/docs/decisions/README.md
new file mode 100644
index 00000000000..f482ef7dfb9
--- /dev/null
+++ b/docs/decisions/README.md
@@ -0,0 +1,7 @@
+# View Decisions
+
+This directory contains decision records for Evergreen.
+
+For new ADRs, please use [adr.md.template](adr.md.template) as basis.
+More information on MADR is available at .
+General information about architectural decision records is available at .
\ No newline at end of file
diff --git a/docs/decisions/adr.md.template b/docs/decisions/adr.md.template
new file mode 100644
index 00000000000..187e25bbf76
--- /dev/null
+++ b/docs/decisions/adr.md.template
@@ -0,0 +1,18 @@
+# {YYYY-MM-DD} {short title of solved problem and solution}
+
+* status: {proposed | accepted | deprecated | superseded by [ADR-0005](0005-example.md)}
+* date: {YYYY-MM-DD}
+* authors: {list everyone involved in the decision}
+
+## Context and Problem Statement
+
+{Describe the context and problem statement, e.g., in free form using two to three sentences or in the form of an illustrative story.
+ You may want to articulate the problem in form of a question and add links to collaboration boards or issue management systems.}
+
+
+## Considered Options
+
+## Decision Outcome
+
+
+## More Information
\ No newline at end of file
diff --git a/docs/images/add_to_queue.png b/docs/images/add_to_queue.png
new file mode 100644
index 00000000000..39310b9043f
Binary files /dev/null and b/docs/images/add_to_queue.png differ
diff --git a/docs/images/admins.png b/docs/images/admins.png
new file mode 100644
index 00000000000..36d70150d62
Binary files /dev/null and b/docs/images/admins.png differ
diff --git a/docs/images/alerts.png b/docs/images/alerts.png
new file mode 100644
index 00000000000..553077c77d4
Binary files /dev/null and b/docs/images/alerts.png differ
diff --git a/docs/images/alias.png b/docs/images/alias.png
new file mode 100644
index 00000000000..3c863219de2
Binary files /dev/null and b/docs/images/alias.png differ
diff --git a/docs/images/attach_to_repo.png b/docs/images/attach_to_repo.png
new file mode 100644
index 00000000000..2b5ca6596d4
Binary files /dev/null and b/docs/images/attach_to_repo.png differ
diff --git a/docs/images/backport.png b/docs/images/backport.png
new file mode 100644
index 00000000000..dd720c8428b
Binary files /dev/null and b/docs/images/backport.png differ
diff --git a/docs/images/boolean_default.png b/docs/images/boolean_default.png
new file mode 100644
index 00000000000..8d192b468fb
Binary files /dev/null and b/docs/images/boolean_default.png differ
diff --git a/docs/images/build.png b/docs/images/build.png
new file mode 100644
index 00000000000..68fff3265e2
Binary files /dev/null and b/docs/images/build.png differ
diff --git a/docs/images/comment.png b/docs/images/comment.png
new file mode 100644
index 00000000000..d75173bb8a6
Binary files /dev/null and b/docs/images/comment.png differ
diff --git a/docs/images/create_project_modal.png b/docs/images/create_project_modal.png
new file mode 100644
index 00000000000..c41e1eaf5e3
Binary files /dev/null and b/docs/images/create_project_modal.png differ
diff --git a/docs/images/default_to_repo.png b/docs/images/default_to_repo.png
new file mode 100644
index 00000000000..c8452a7abb0
Binary files /dev/null and b/docs/images/default_to_repo.png differ
diff --git a/docs/images/detach_from_repo.png b/docs/images/detach_from_repo.png
new file mode 100644
index 00000000000..d377daa9b66
Binary files /dev/null and b/docs/images/detach_from_repo.png differ
diff --git a/docs/images/distros.png b/docs/images/distros.png
new file mode 100644
index 00000000000..0fa8027c107
Binary files /dev/null and b/docs/images/distros.png differ
diff --git a/docs/images/enqueue_patch.png b/docs/images/enqueue_patch.png
new file mode 100644
index 00000000000..84d8aeea204
Binary files /dev/null and b/docs/images/enqueue_patch.png differ
diff --git a/docs/images/github_settings.png b/docs/images/github_settings.png
new file mode 100644
index 00000000000..7fe26c47ba7
Binary files /dev/null and b/docs/images/github_settings.png differ
diff --git a/docs/images/github_status.png b/docs/images/github_status.png
new file mode 100644
index 00000000000..1dc98518b6f
Binary files /dev/null and b/docs/images/github_status.png differ
diff --git a/docs/images/github_status_fail.png b/docs/images/github_status_fail.png
new file mode 100644
index 00000000000..9136f1097df
Binary files /dev/null and b/docs/images/github_status_fail.png differ
diff --git a/docs/images/github_trigger_alias.png b/docs/images/github_trigger_alias.png
new file mode 100644
index 00000000000..9b77fa6de94
Binary files /dev/null and b/docs/images/github_trigger_alias.png differ
diff --git a/docs/images/grid.png b/docs/images/grid.png
new file mode 100644
index 00000000000..4bf7f68ef98
Binary files /dev/null and b/docs/images/grid.png differ
diff --git a/docs/images/merge_task.png b/docs/images/merge_task.png
new file mode 100644
index 00000000000..ec7f889a91f
Binary files /dev/null and b/docs/images/merge_task.png differ
diff --git a/docs/images/merge_test.png b/docs/images/merge_test.png
new file mode 100644
index 00000000000..da6f00ebd40
Binary files /dev/null and b/docs/images/merge_test.png differ
diff --git a/docs/images/new_distro.png b/docs/images/new_distro.png
new file mode 100644
index 00000000000..0df5c727bd7
Binary files /dev/null and b/docs/images/new_distro.png differ
diff --git a/docs/images/notifications.png b/docs/images/notifications.png
new file mode 100644
index 00000000000..2e6afd7b43f
Binary files /dev/null and b/docs/images/notifications.png differ
diff --git a/docs/images/pr_testing.png b/docs/images/pr_testing.png
new file mode 100644
index 00000000000..e7a64c96d9c
Binary files /dev/null and b/docs/images/pr_testing.png differ
diff --git a/docs/images/project_setup.png b/docs/images/project_setup.png
new file mode 100644
index 00000000000..98d7bd9c444
Binary files /dev/null and b/docs/images/project_setup.png differ
diff --git a/docs/images/queue.png b/docs/images/queue.png
new file mode 100644
index 00000000000..4eb5faab42b
Binary files /dev/null and b/docs/images/queue.png differ
diff --git a/docs/images/queue2.png b/docs/images/queue2.png
new file mode 100644
index 00000000000..8e2ee933bc3
Binary files /dev/null and b/docs/images/queue2.png differ
diff --git a/docs/images/repo_alias.png b/docs/images/repo_alias.png
new file mode 100644
index 00000000000..28a50afb15d
Binary files /dev/null and b/docs/images/repo_alias.png differ
diff --git a/docs/images/repo_pr_testing.png b/docs/images/repo_pr_testing.png
new file mode 100644
index 00000000000..c4667274faf
Binary files /dev/null and b/docs/images/repo_pr_testing.png differ
diff --git a/docs/images/repo_sidebar.png b/docs/images/repo_sidebar.png
new file mode 100644
index 00000000000..e2dc668dcdc
Binary files /dev/null and b/docs/images/repo_sidebar.png differ
diff --git a/docs/images/repo_string_default.png b/docs/images/repo_string_default.png
new file mode 100644
index 00000000000..7c2a0a4006b
Binary files /dev/null and b/docs/images/repo_string_default.png differ
diff --git a/docs/images/repo_tree.png b/docs/images/repo_tree.png
new file mode 100644
index 00000000000..505cca87c17
Binary files /dev/null and b/docs/images/repo_tree.png differ
diff --git a/docs/images/schedule.png b/docs/images/schedule.png
new file mode 100644
index 00000000000..3485b118f91
Binary files /dev/null and b/docs/images/schedule.png differ
diff --git a/docs/images/set-module_comment.png b/docs/images/set-module_comment.png
new file mode 100644
index 00000000000..4d6c37d18ad
Binary files /dev/null and b/docs/images/set-module_comment.png differ
diff --git a/docs/images/settings.png b/docs/images/settings.png
new file mode 100644
index 00000000000..7a0908e33b0
Binary files /dev/null and b/docs/images/settings.png differ
diff --git a/docs/images/shared_variables.png b/docs/images/shared_variables.png
new file mode 100644
index 00000000000..fa253d839df
Binary files /dev/null and b/docs/images/shared_variables.png differ
diff --git a/docs/images/sidebar.png b/docs/images/sidebar.png
new file mode 100644
index 00000000000..38939e097b1
Binary files /dev/null and b/docs/images/sidebar.png differ
diff --git a/docs/images/spawn_host_modal.png b/docs/images/spawn_host_modal.png
new file mode 100644
index 00000000000..9a9ffb6a00b
Binary files /dev/null and b/docs/images/spawn_host_modal.png differ
diff --git a/docs/images/static_agent.png b/docs/images/static_agent.png
new file mode 100644
index 00000000000..e2eaaa3c577
Binary files /dev/null and b/docs/images/static_agent.png differ
diff --git a/docs/images/static_id.png b/docs/images/static_id.png
new file mode 100644
index 00000000000..63e1b32ea5c
Binary files /dev/null and b/docs/images/static_id.png differ
diff --git a/docs/images/static_provider.png b/docs/images/static_provider.png
new file mode 100644
index 00000000000..0872a011fd1
Binary files /dev/null and b/docs/images/static_provider.png differ
diff --git a/docs/images/static_user.png b/docs/images/static_user.png
new file mode 100644
index 00000000000..8f491d3b95d
Binary files /dev/null and b/docs/images/static_user.png differ
diff --git a/docs/images/task.png b/docs/images/task.png
new file mode 100644
index 00000000000..ebbe45de127
Binary files /dev/null and b/docs/images/task.png differ
diff --git a/docs/images/task_page_spawn_host.png b/docs/images/task_page_spawn_host.png
new file mode 100644
index 00000000000..2493db6e9d3
Binary files /dev/null and b/docs/images/task_page_spawn_host.png differ
diff --git a/docs/images/timeline.png b/docs/images/timeline.png
new file mode 100644
index 00000000000..7e54ed9d75d
Binary files /dev/null and b/docs/images/timeline.png differ
diff --git a/docs/images/vars.png b/docs/images/vars.png
new file mode 100644
index 00000000000..203c18dbe05
Binary files /dev/null and b/docs/images/vars.png differ
diff --git a/docs/images/version.png b/docs/images/version.png
new file mode 100644
index 00000000000..2bd90b2609a
Binary files /dev/null and b/docs/images/version.png differ
diff --git a/docs/images/waterfall.png b/docs/images/waterfall.png
new file mode 100644
index 00000000000..fd4ed74b19d
Binary files /dev/null and b/docs/images/waterfall.png differ
diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md
deleted file mode 100644
index f1b03b854ab..00000000000
--- a/docs/pull_request_template.md
+++ /dev/null
@@ -1,7 +0,0 @@
-[EVG-](https://jira.mongodb.org/browse/EVG-)
-
-### Description
-< add description, context, thought process, etc >
-
-### Testing
- < add a description of how you tested it >
diff --git a/environment.go b/environment.go
index cdac7864622..a419c72fb70 100644
--- a/environment.go
+++ b/environment.go
@@ -7,6 +7,7 @@ import (
"math"
"os"
"path/filepath"
+ "regexp"
"strings"
"sync"
"time"
@@ -29,8 +30,17 @@ import (
"github.com/mongodb/grip/send"
"github.com/mongodb/jasper"
"github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+ "go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
+ "go.mongodb.org/mongo-driver/mongo/readpref"
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+ "go.opentelemetry.io/otel/sdk/resource"
+ "go.opentelemetry.io/otel/sdk/trace"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)
var (
@@ -179,7 +189,7 @@ func NewEnvironment(ctx context.Context, confPath string, db *DBSettings) (Envir
if db != nil && confPath == "" {
if err := e.initDB(ctx, *db); err != nil {
- return nil, errors.Wrap(err, "error configuring db")
+ return nil, errors.Wrap(err, "initializing DB")
}
e.dbName = db.DB
}
@@ -203,10 +213,10 @@ func NewEnvironment(ctx context.Context, confPath string, db *DBSettings) (Envir
catcher.Add(e.initDepot(ctx))
catcher.Add(e.initSenders(ctx))
catcher.Add(e.createLocalQueue(ctx))
- catcher.Add(e.createApplicationQueue(ctx))
+ catcher.Add(e.createRemoteQueues(ctx))
catcher.Add(e.createNotificationQueue(ctx))
- catcher.Add(e.createRemoteQueueGroup(ctx))
catcher.Add(e.setupRoleManager())
+ catcher.Add(e.initTracer(ctx))
catcher.Extend(e.initQueues(ctx))
if catcher.HasErrors() {
@@ -263,35 +273,68 @@ func (e *envState) initSettings(path string) error {
if path != "" {
e.settings, err = NewSettings(path)
if err != nil {
- return errors.Wrap(err, "problem getting settings from file")
+ return errors.Wrap(err, "getting config settings from file")
}
} else {
e.settings, err = BootstrapConfig(e)
if err != nil {
- return errors.Wrap(err, "problem getting settings from DB")
+ return errors.Wrap(err, "getting config settings from DB")
}
}
}
if e.settings == nil {
- return errors.New("unable to get settings from file and DB")
+ return errors.New("unable to get settings from file or DB")
}
if err = e.settings.Validate(); err != nil {
- return errors.Wrap(err, "problem validating settings")
+ return errors.Wrap(err, "validating settings")
}
return nil
}
+// getCollectionName extracts the collection name from a command.
+// Returns an error if the command is deformed or is not a CRUD command.
+func getCollectionName(command bson.Raw) (string, error) {
+ element, err := command.IndexErr(0)
+ if err != nil {
+ return "", errors.Wrap(err, "command has no first element")
+ }
+ v, err := element.ValueErr()
+ if err != nil {
+ return "", errors.Wrap(err, "getting element value")
+ }
+ if v.Type != bsontype.String {
+ return "", errors.Errorf("element value was of unexpected type '%s'", v.Type)
+ }
+ return v.StringValue(), nil
+}
+
+// redactSensitiveCollections satisfies the apm.CommandTransformer interface.
+// Returns an empty string when the command is a CRUD command on a sensitive collection
+// or if we can't determine the collection the command is on.
+func redactSensitiveCollections(command bson.Raw) string {
+ collectionName, err := getCollectionName(command)
+ if err != nil || utility.StringSliceContains(sensitiveCollections, collectionName) {
+ return ""
+ }
+
+ b, _ := bson.MarshalExtJSON(command, false, false)
+ return string(b)
+}
+
func (e *envState) initDB(ctx context.Context, settings DBSettings) error {
opts := options.Client().ApplyURI(settings.Url).SetWriteConcern(settings.WriteConcernSettings.Resolve()).
SetReadConcern(settings.ReadConcernSettings.Resolve()).
- SetConnectTimeout(5 * time.Second).SetMonitor(apm.NewLoggingMonitor(ctx, time.Minute, apm.NewBasicMonitor(nil)).DriverAPM())
+ SetConnectTimeout(5 * time.Second).
+ SetMonitor(apm.NewMonitor(apm.WithCommandAttributeDisabled(false), apm.WithCommandAttributeTransformer(redactSensitiveCollections)))
if settings.HasAuth() {
ymlUser, ymlPwd, err := settings.GetAuth()
if err != nil {
- grip.Error(errors.Wrap(err, "problem getting auth from yaml authfile, attempting to connect without auth"))
+ grip.Error(message.WrapError(err, message.Fields{
+ "message": "problem getting auth settings from YAML file, attempting to connect without auth",
+ }))
}
if err == nil && ymlUser != "" {
credential := options.Credential{
@@ -304,16 +347,44 @@ func (e *envState) initDB(ctx context.Context, settings DBSettings) error {
}
var err error
- e.client, err = mongo.NewClient(opts)
+ e.client, err = mongo.Connect(ctx, opts)
if err != nil {
- return errors.Wrap(err, "problem constructing database")
+ return errors.Wrap(err, "connecting to the Evergreen DB")
+ }
+
+ return nil
+}
+
+func (e *envState) createRemoteQueues(ctx context.Context) error {
+ url := e.settings.Amboy.DBConnection.URL
+ if url == "" {
+ url = DefaultAmboyDatabaseURL
}
- if err = e.client.Connect(ctx); err != nil {
- return errors.Wrap(err, "problem connecting to the database")
+ opts := options.Client().
+ ApplyURI(url).
+ SetConnectTimeout(5 * time.Second).
+ SetReadPreference(readpref.Primary()).
+ SetReadConcern(e.settings.Database.ReadConcernSettings.Resolve()).
+ SetWriteConcern(e.settings.Database.WriteConcernSettings.Resolve()).
+ SetMonitor(apm.NewLoggingMonitor(ctx, time.Minute, apm.NewBasicMonitor(nil)).DriverAPM())
+
+ if e.settings.Amboy.DBConnection.Username != "" && e.settings.Amboy.DBConnection.Password != "" {
+ opts.SetAuth(options.Credential{
+ Username: e.settings.Amboy.DBConnection.Username,
+ Password: e.settings.Amboy.DBConnection.Password,
+ })
}
- return nil
+ client, err := mongo.Connect(ctx, opts)
+ if err != nil {
+ return errors.Wrap(err, "connecting to the Amboy database")
+ }
+
+ catcher := grip.NewBasicCatcher()
+ catcher.Add(e.createApplicationQueue(ctx, client))
+ catcher.Add(e.createRemoteQueueGroup(ctx, client))
+ return catcher.Resolve()
}
func (e *envState) Context() (context.Context, context.CancelFunc) {
@@ -353,7 +424,7 @@ func (e *envState) createLocalQueue(ctx context.Context) error {
// configure the local-only (memory-backed) queue.
e.localQueue = queue.NewLocalLimitedSize(e.settings.Amboy.PoolSizeLocal, e.settings.Amboy.LocalStorage)
if err := e.localQueue.SetRunner(pool.NewAbortablePool(e.settings.Amboy.PoolSizeLocal, e.localQueue)); err != nil {
- return errors.Wrap(err, "problem configuring worker pool for local queue")
+ return errors.Wrap(err, "setting local queue worker pool")
}
e.RegisterCloser("background-local-queue", true, func(ctx context.Context) error {
@@ -364,36 +435,35 @@ func (e *envState) createLocalQueue(ctx context.Context) error {
return nil
}
-func (e *envState) createApplicationQueue(ctx context.Context) error {
+func (e *envState) createApplicationQueue(ctx context.Context, client *mongo.Client) error {
// configure the remote mongodb-backed amboy
// queue.
opts := queue.DefaultMongoDBOptions()
- opts.URI = e.settings.Database.Url
- opts.DB = e.settings.Amboy.DB
+ opts.Client = client
+ opts.DB = e.settings.Amboy.DBConnection.Database
opts.Collection = e.settings.Amboy.Name
opts.Priority = e.settings.Amboy.RequireRemotePriority
opts.SkipQueueIndexBuilds = true
opts.SkipReportingIndexBuilds = true
+ opts.PreferredIndexes = e.getPreferredRemoteQueueIndexes()
opts.UseGroups = false
opts.LockTimeout = time.Duration(e.settings.Amboy.LockTimeoutMinutes) * time.Minute
opts.SampleSize = e.settings.Amboy.SampleSize
- opts.Client = e.client
retryOpts := e.settings.Amboy.Retry.RetryableQueueOptions()
queueOpts := queue.MongoDBQueueOptions{
NumWorkers: utility.ToIntPtr(e.settings.Amboy.PoolSizeRemote),
- Ordered: utility.FalsePtr(),
DB: &opts,
Retryable: &retryOpts,
}
rq, err := queue.NewMongoDBQueue(ctx, queueOpts)
if err != nil {
- return errors.Wrap(err, "problem setting main queue backend")
+ return errors.Wrap(err, "creating main remote queue")
}
if err = rq.SetRunner(pool.NewAbortablePool(e.settings.Amboy.PoolSizeRemote, rq)); err != nil {
- return errors.Wrap(err, "problem configuring worker pool for main remote queue")
+ return errors.Wrap(err, "setting main remote queue worker pool")
}
e.remoteQueue = rq
e.RegisterCloser("application-queue", false, func(ctx context.Context) error {
@@ -404,20 +474,25 @@ func (e *envState) createApplicationQueue(ctx context.Context) error {
return nil
}
-func (e *envState) createRemoteQueueGroup(ctx context.Context) error {
- opts := e.getRemoteQueueGroupDBOptions()
+func (e *envState) createRemoteQueueGroup(ctx context.Context, client *mongo.Client) error {
+ opts := e.getRemoteQueueGroupDBOptions(client)
retryOpts := e.settings.Amboy.Retry.RetryableQueueOptions()
queueOpts := queue.MongoDBQueueOptions{
NumWorkers: utility.ToIntPtr(e.settings.Amboy.GroupDefaultWorkers),
DB: &opts,
- Ordered: utility.FalsePtr(),
Retryable: &retryOpts,
}
+ perQueue, regexpQueue, err := e.getNamedRemoteQueueOptions(client)
+ if err != nil {
+ return errors.Wrap(err, "getting named remote queue options")
+ }
+
remoteQueueGroupOpts := queue.MongoDBQueueGroupOptions{
DefaultQueue: queueOpts,
- PerQueue: e.getNamedRemoteQueueOptions(),
+ PerQueue: perQueue,
+ RegexpQueue: regexpQueue,
BackgroundCreateFrequency: time.Duration(e.settings.Amboy.GroupBackgroundCreateFrequencyMinutes) * time.Minute,
PruneFrequency: time.Duration(e.settings.Amboy.GroupPruneFrequencyMinutes) * time.Minute,
TTL: time.Duration(e.settings.Amboy.GroupTTLMinutes) * time.Minute,
@@ -425,36 +500,63 @@ func (e *envState) createRemoteQueueGroup(ctx context.Context) error {
remoteQueueGroup, err := queue.NewMongoDBSingleQueueGroup(ctx, remoteQueueGroupOpts)
if err != nil {
- return errors.Wrap(err, "problem constructing remote queue group")
+ return errors.Wrap(err, "creating remote queue group")
}
e.remoteQueueGroup = remoteQueueGroup
e.RegisterCloser("remote-queue-group", false, func(ctx context.Context) error {
- return errors.Wrap(e.remoteQueueGroup.Close(ctx), "problem waiting for remote queue group to close")
+ return errors.Wrap(e.remoteQueueGroup.Close(ctx), "waiting for remote queue group to close")
})
return nil
}
-func (e *envState) getRemoteQueueGroupDBOptions() queue.MongoDBOptions {
+func (e *envState) getRemoteQueueGroupDBOptions(client *mongo.Client) queue.MongoDBOptions {
opts := queue.DefaultMongoDBOptions()
- opts.URI = e.settings.Database.Url
- opts.DB = e.settings.Amboy.DB
+ opts.Client = client
+ opts.DB = e.settings.Amboy.DBConnection.Database
opts.Collection = e.settings.Amboy.Name
opts.Priority = e.settings.Amboy.RequireRemotePriority
opts.SkipQueueIndexBuilds = true
opts.SkipReportingIndexBuilds = true
+ opts.PreferredIndexes = e.getPreferredRemoteQueueIndexes()
opts.UseGroups = true
opts.GroupName = e.settings.Amboy.Name
opts.LockTimeout = time.Duration(e.settings.Amboy.LockTimeoutMinutes) * time.Minute
- opts.Client = e.client
return opts
}
-func (e *envState) getNamedRemoteQueueOptions() map[string]queue.MongoDBQueueOptions {
+func (e *envState) getPreferredRemoteQueueIndexes() queue.PreferredIndexOptions {
+ if e.settings.Amboy.SkipPreferredIndexes {
+ return queue.PreferredIndexOptions{}
+ }
+ return queue.PreferredIndexOptions{
+ NextJob: bson.D{
+ bson.E{
+ Key: "status.completed",
+ Value: 1,
+ },
+ bson.E{
+ Key: "status.in_prog",
+ Value: 1,
+ },
+ bson.E{
+ Key: "status.mod_ts",
+ Value: 1,
+ },
+ },
+ }
+}
+
+func (e *envState) getNamedRemoteQueueOptions(client *mongo.Client) (map[string]queue.MongoDBQueueOptions, []queue.RegexpMongoDBQueueOptions, error) {
perQueueOpts := map[string]queue.MongoDBQueueOptions{}
+ var regexpQueueOpts []queue.RegexpMongoDBQueueOptions
for _, namedQueue := range e.settings.Amboy.NamedQueues {
- dbOpts := e.getRemoteQueueGroupDBOptions()
+ if namedQueue.Name == "" && namedQueue.Regexp == "" {
+ continue
+ }
+
+ dbOpts := e.getRemoteQueueGroupDBOptions(client)
if namedQueue.SampleSize != 0 {
dbOpts.SampleSize = namedQueue.SampleSize
}
@@ -467,12 +569,26 @@ func (e *envState) getNamedRemoteQueueOptions() map[string]queue.MongoDBQueueOpt
} else {
numWorkers = e.settings.Amboy.GroupDefaultWorkers
}
- perQueueOpts[namedQueue.Name] = queue.MongoDBQueueOptions{
+ queueOpts := queue.MongoDBQueueOptions{
NumWorkers: utility.ToIntPtr(numWorkers),
DB: &dbOpts,
}
+ if namedQueue.Name != "" {
+ perQueueOpts[namedQueue.Name] = queueOpts
+ continue
+ }
+
+ re, err := regexp.Compile(namedQueue.Regexp)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "invalid regexp '%s'", namedQueue.Regexp)
+ }
+ regexpQueueOpts = append(regexpQueueOpts, queue.RegexpMongoDBQueueOptions{
+ Regexp: *re,
+ Options: queueOpts,
+ })
}
- return perQueueOpts
+
+ return perQueueOpts, regexpQueueOpts, nil
}
func (e *envState) createNotificationQueue(ctx context.Context) error {
@@ -484,10 +600,10 @@ func (e *envState) createNotificationQueue(ctx context.Context) error {
time.Duration(e.settings.Notify.BufferIntervalSeconds)*time.Second,
e.notificationsQueue)
if err != nil {
- return errors.Wrap(err, "Failed to make notifications queue runner")
+ return errors.Wrap(err, "creating notifications queue")
}
if err = e.notificationsQueue.SetRunner(runner); err != nil {
- return errors.Wrap(err, "failed to set notifications queue runner")
+ return errors.Wrap(err, "setting notifications queue runner")
}
rootSenders := []send.Sender{}
for _, s := range e.senders {
@@ -505,7 +621,7 @@ func (e *envState) createNotificationQueue(ctx context.Context) error {
"queue": "notifications",
"status": e.notificationsQueue.Stats(ctx),
})
- catcher.Add(errors.New("failed to stop with running jobs"))
+ catcher.New("failed to stop with running jobs")
}
e.notificationsQueue.Close(ctx)
@@ -565,7 +681,7 @@ func (e *envState) initClientConfig() {
"cause": "infrastructure configuration issue",
}))
} else if len(e.clientConfig.ClientBinaries) == 0 {
- grip.Critical("No clients are available for this server")
+ grip.Critical("no clients binaries are available for this server")
}
}
@@ -594,19 +710,19 @@ func (e *envState) initSenders(ctx context.Context) error {
}
if len(smtp.AdminEmail) == 0 {
if err := opts.AddRecipient("", "test@domain.invalid"); err != nil {
- return errors.Wrap(err, "failed to setup email logger")
+ return errors.Wrap(err, "adding email logger test recipient")
}
} else {
for i := range smtp.AdminEmail {
if err := opts.AddRecipient("", smtp.AdminEmail[i]); err != nil {
- return errors.Wrap(err, "failed to setup email logger")
+ return errors.Wrap(err, "adding email logger recipient")
}
}
}
sender, err := send.NewSMTPLogger(&opts, levelInfo)
if err != nil {
- return errors.Wrap(err, "Failed to setup email logger")
+ return errors.Wrap(err, "setting up email logger")
}
e.senders[SenderEmail] = sender
}
@@ -619,7 +735,7 @@ func (e *envState) initSenders(ctx context.Context) error {
Token: githubToken,
}, "")
if err != nil {
- return errors.Wrap(err, "Failed to setup github status logger")
+ return errors.Wrap(err, "setting up GitHub status logger")
}
e.senders[SenderGithubStatus] = sender
}
@@ -627,13 +743,13 @@ func (e *envState) initSenders(ctx context.Context) error {
if jira := &e.settings.Jira; len(jira.GetHostURL()) != 0 {
sender, err = send.NewJiraLogger(ctx, jira.Export(), levelInfo)
if err != nil {
- return errors.Wrap(err, "Failed to setup jira issue logger")
+ return errors.Wrap(err, "setting up Jira issue logger")
}
e.senders[SenderJIRAIssue] = sender
sender, err = send.NewJiraCommentLogger(ctx, "", jira.Export(), levelInfo)
if err != nil {
- return errors.Wrap(err, "Failed to setup jira comment logger")
+ return errors.Wrap(err, "setting up Jira comment logger")
}
e.senders[SenderJIRAComment] = sender
}
@@ -646,23 +762,22 @@ func (e *envState) initSenders(ctx context.Context) error {
Channel: "#",
Name: "evergreen",
Username: "Evergreen",
- IconURL: fmt.Sprintf("%s/static/img/evergreen_green_150x150.png", e.settings.Ui.Url),
}, slack.Token, levelInfo)
if err != nil {
- return errors.Wrap(err, "Failed to setup slack logger")
+ return errors.Wrap(err, "setting up Slack logger")
}
e.senders[SenderSlack] = sender
}
sender, err = util.NewEvergreenWebhookLogger()
if err != nil {
- return errors.Wrap(err, "Failed to setup evergreen webhook logger")
+ return errors.Wrap(err, "setting up Evergreen webhook logger")
}
e.senders[SenderEvergreenWebhook] = sender
sender, err = send.NewGenericLogger("evergreen", levelInfo)
if err != nil {
- return errors.Wrap(err, "Failed to setup evergreen generic logger")
+ return errors.Wrap(err, "setting up Evergreen generic logger")
}
e.senders[SenderGeneric] = sender
@@ -702,7 +817,7 @@ func (e *envState) initJasper() error {
func (e *envState) initDepot(ctx context.Context) error {
if e.settings.DomainName == "" {
- return errors.Errorf("bootstrapping '%s' collection requires domain name to be set in admin settings", CredentialsCollection)
+ return errors.Errorf("bootstrapping collection '%s' requires domain name to be set in admin settings", CredentialsCollection)
}
maxExpiration := time.Duration(math.MaxInt64)
@@ -734,9 +849,48 @@ func (e *envState) initDepot(ctx context.Context) error {
var err error
if e.depot, err = certdepot.BootstrapDepotWithMongoClient(ctx, e.client, bootstrapConfig); err != nil {
- return errors.Wrapf(err, "could not bootstrap %s collection", CredentialsCollection)
+ return errors.Wrapf(err, "bootstrapping collection '%s'", CredentialsCollection)
+ }
+
+ return nil
+}
+
+func (e *envState) initTracer(ctx context.Context) error {
+ if !e.settings.Tracer.Enabled {
+ return nil
+ }
+
+ resource, err := resource.New(ctx,
+ resource.WithProcess(),
+ resource.WithHost(),
+ resource.WithAttributes(semconv.ServiceName("evergreen")),
+ resource.WithAttributes(semconv.ServiceVersion(BuildRevision)),
+ )
+ if err != nil {
+ return errors.Wrap(err, "making otel resource")
+ }
+
+ client := otlptracegrpc.NewClient(
+ otlptracegrpc.WithEndpoint(e.settings.Tracer.CollectorEndpoint),
+ )
+ exp, err := otlptrace.New(ctx, client)
+ if err != nil {
+ return errors.Wrap(err, "initializing otel exporter")
}
+ tp := trace.NewTracerProvider(
+ trace.WithBatcher(exp),
+ trace.WithResource(resource),
+ )
+ otel.SetTracerProvider(tp)
+
+ e.RegisterCloser("otel-tracer-provider", false, func(ctx context.Context) error {
+ catcher := grip.NewBasicCatcher()
+ catcher.Add(tp.Shutdown(ctx))
+ catcher.Add(exp.Shutdown(ctx))
+ return nil
+ })
+
return nil
}
@@ -874,7 +1028,7 @@ func (e *envState) SaveConfig() error {
}
err := util.DeepCopy(*e.settings, ©, registeredTypes)
if err != nil {
- return errors.Wrap(err, "problem copying settings")
+ return errors.Wrap(err, "copying settings")
}
gob.Register(map[interface{}]interface{}{})
@@ -885,7 +1039,7 @@ func (e *envState) SaveConfig() error {
var projects map[string]BuildBaronSettings
err := mapstructure.Decode(field, &projects)
if err != nil {
- return errors.Wrap(err, "problem decoding buildbaron projects")
+ return errors.Wrap(err, "decoding buildbaron projects")
}
plugin[fieldName] = projects
}
@@ -902,7 +1056,7 @@ func (e *envState) GetSender(key SenderKey) (send.Sender, error) {
sender, ok := e.senders[key]
if !ok {
- return nil, errors.Errorf("unknown sender key %v", key)
+ return nil, errors.Errorf("unknown sender key '%s'", key.String())
}
return sender, nil
@@ -935,9 +1089,6 @@ func (e *envState) Close(ctx context.Context) error {
e.mu.RLock()
defer e.mu.RUnlock()
- // TODO we could, in the future call all closers in but that
- // would require more complex waiting and timeout logic
-
deadline, _ := ctx.Deadline()
catcher := grip.NewBasicCatcher()
wg := &sync.WaitGroup{}
@@ -1040,7 +1191,7 @@ func getClientConfig(baseURL, s3BaseURL string) (*ClientConfig, error) {
return nil
})
if err != nil {
- return nil, errors.Wrap(err, "problem finding client binaries")
+ return nil, errors.Wrap(err, "finding client binaries")
}
return c, nil
diff --git a/environment_test.go b/environment_test.go
index 99aca1d21b8..e3251d21b2f 100644
--- a/environment_test.go
+++ b/environment_test.go
@@ -5,14 +5,39 @@ import (
"fmt"
"os"
"path/filepath"
+ "strconv"
"strings"
"testing"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
"github.com/mongodb/grip/send"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
+ "go.mongodb.org/mongo-driver/bson"
)
+func init() {
+ if skip, _ := strconv.ParseBool(os.Getenv("AUTH_ENABLED")); skip {
+ // The DB auth test cannot initialize the environment due to
+ // requiring DB auth credentials.
+ return
+ }
+
+ if GetEnvironment() == nil {
+ ctx := context.Background()
+
+ path := testConfigFile()
+ env, err := NewEnvironment(ctx, path, nil)
+ grip.EmergencyFatal(message.WrapError(err, message.Fields{
+ "message": "could not initialize test environment",
+ "path": path,
+ }))
+
+ SetEnvironment(env)
+ }
+}
+
type EnvironmentSuite struct {
path string
env *envState
@@ -42,7 +67,6 @@ func (s *EnvironmentSuite) SetupTest() {
}
func (s *EnvironmentSuite) TestInitDB() {
-
db := &DBSettings{
Url: "mongodb://localhost:27017",
DB: "mci_test",
@@ -56,6 +80,8 @@ func (s *EnvironmentSuite) TestInitDB() {
}
err := localEnv.initDB(ctx, *db)
s.NoError(err)
+ _, err = localEnv.client.ListDatabases(ctx, bson.M{})
+ s.NoError(err)
}
func (s *EnvironmentSuite) TestLoadingConfig() {
diff --git a/globals.go b/globals.go
index 5215d73c321..2129f8ba287 100644
--- a/globals.go
+++ b/globals.go
@@ -25,9 +25,13 @@ const (
// HostBuildingFailed is a failure state indicating that an intent host was
// attempting to create a host but failed during creation. Hosts that fail
// to build will terminate shortly.
- HostBuildingFailed = "building-failed"
- HostStarting = "starting"
- HostProvisioning = "provisioning"
+ HostBuildingFailed = "building-failed"
+ HostStarting = "starting"
+ HostProvisioning = "provisioning"
+ // HostProvisionFailed is a failure state indicating that a host was
+ // successfully created (i.e. requested from the cloud provider) but failed
+ // while it was starting up. Hosts that fail to provisoin will terminate
+ // shortly.
HostProvisionFailed = "provision failed"
HostQuarantined = "quarantined"
HostDecommissioned = "decommissioned"
@@ -37,20 +41,12 @@ const (
HostExternalUserName = "external"
- HostStatusSuccess = "success"
- HostStatusFailed = "failed"
-
// Task Statuses used in the database models
// TaskInactive is not assigned to any new tasks, but can be found
// in the database and is used in the UI.
TaskInactive = "inactive"
- // TaskUnstarted is assigned to a display task after cleaning up one of
- // its execution tasks. This indicates that the display task is
- // pending a rerun
- TaskUnstarted = "unstarted"
-
// TaskUndispatched indicates either:
// 1. a task is not scheduled to run (when Task.Activated == false)
// 2. a task is scheduled to run (when Task.Activated == true)
@@ -96,9 +92,24 @@ const (
CommandTypeSetup = "setup"
// Task descriptions
+ //
+ // TaskDescriptionHeartbeat indicates that a task failed because it did not
+ // send a heartbeat while it was running. Tasks are expected to send
+ // periodic heartbeats back to the app server indicating the task is still
+ // actively running, or else they are considered stale.
TaskDescriptionHeartbeat = "heartbeat"
+ // TaskDescriptionStranded indicates that a task failed because its
+ // underlying runtime environment (i.e. container or host) encountered an
+ // issue. For example, if a host is terminated while the task is still
+ // running, the task is considered stranded.
TaskDescriptionStranded = "stranded"
TaskDescriptionNoResults = "expected test results, but none attached"
+ // TaskDescriptionContainerUnallocatable indicates that the reason a
+ // container task failed is because it cannot be allocated a container.
+ TaskDescriptionContainerUnallocatable = "container task cannot be allocated"
+ // TaskDescriptionAborted indicates that the reason a task failed is specifically
+ // because it was manually aborted.
+ TaskDescriptionAborted = "aborted"
// Task Statuses that are currently used only by the UI, and in tests
// (these may be used in old tasks as actual task statuses rather than just
@@ -201,6 +212,7 @@ const (
PlannerVersionLegacy = "legacy"
PlannerVersionTunable = "tunable"
+ // TODO: EVG-18706 all distros use DispatcherVersionRevisedWithDependencies, we may be able to remove these and their custom logic
DispatcherVersionLegacy = "legacy"
DispatcherVersionRevised = "revised"
DispatcherVersionRevisedWithDependencies = "revised-with-dependencies"
@@ -279,6 +291,10 @@ const (
TasksAlreadyGeneratedError = "generator already ran and generated tasks"
KeyTooLargeToIndexError = "key too large to index"
InvalidDivideInputError = "$divide only supports numeric types"
+
+ // Valid types of performing git clone
+ CloneMethodLegacySSH = "legacy-ssh"
+ CloneMethodOAuth = "oauth"
)
var TaskStatuses = []string{
@@ -298,7 +314,6 @@ var TaskStatuses = []string{
TaskWillRun,
TaskUnscheduled,
TaskUndispatched,
- TaskUnstarted,
TaskDispatched,
}
@@ -320,13 +335,20 @@ var TaskNonGenericFailureStatuses = []string{
TaskSystemTimedOut,
}
+var TaskSystemFailures = []string{
+ TaskSystemFailed,
+ TaskTimedOut,
+ TaskSystemUnresponse,
+ TaskSystemTimedOut,
+ TaskTestTimedOut,
+}
+
// TaskFailureStatuses represent all the ways that a completed task can fail,
// inclusive of display statuses such as system failures.
var TaskFailureStatuses = append([]string{TaskFailed}, TaskNonGenericFailureStatuses...)
var TaskUnstartedStatuses = []string{
TaskInactive,
- TaskUnstarted,
TaskUndispatched,
}
@@ -347,6 +369,10 @@ func IsFailedTaskStatus(status string) bool {
return utility.StringSliceContains(TaskFailureStatuses, status)
}
+func IsSystemFailedTaskStatus(status string) bool {
+ return utility.StringSliceContains(TaskSystemFailures, status)
+}
+
func IsValidTaskEndStatus(status string) bool {
return status == TaskSucceeded || status == TaskFailed
}
@@ -378,8 +404,38 @@ func VersionStatusToPatchStatus(versionStatus string) (string, error) {
}
}
+func PatchStatusToVersionStatus(patchStatus string) (string, error) {
+ switch patchStatus {
+ case PatchCreated:
+ return VersionCreated, nil
+ case PatchStarted:
+ return VersionStarted, nil
+ case PatchFailed:
+ return VersionFailed, nil
+ case PatchSucceeded:
+ return VersionSucceeded, nil
+ default:
+ return "", errors.Errorf("unknown patch status: %s", patchStatus)
+ }
+}
+
type ModificationAction string
+// Common OTEL attribute keys
+const (
+ TaskIDOtelAttribute = "evergreen.task.id"
+ TaskNameOtelAttribute = "evergreen.task.name"
+ TaskExecutionOtelAttribute = "evergreen.task.execution"
+ TaskStatusOtelAttribute = "evergreen.task.status"
+ VersionIDOtelAttribute = "evergreen.version.id"
+ VersionRequesterOtelAttribute = "evergreen.version.requester"
+ BuildIDOtelAttribute = "evergreen.build.id"
+ BuildNameOtelAttribute = "evergreen.build.name"
+ ProjectIdentifierOtelAttribute = "evergreen.project.identifier"
+ ProjectIDOtelAttribute = "evergreen.project.id"
+ DistroIDOtelAttribute = "evergreen.distro.id"
+)
+
const (
RestartAction ModificationAction = "restart"
SetActiveAction ModificationAction = "set_active"
@@ -419,7 +475,6 @@ const (
// Constants related to cloud providers and provider-specific settings.
const (
- ProviderNameEc2Auto = "ec2-auto"
ProviderNameEc2OnDemand = "ec2-ondemand"
ProviderNameEc2Spot = "ec2-spot"
ProviderNameEc2Fleet = "ec2-fleet"
@@ -434,12 +489,25 @@ const (
// DefaultEC2Region is the default region where hosts should be spawned.
DefaultEC2Region = "us-east-1"
// DefaultEBSType is Amazon's default EBS type.
- DefaultEBSType = "gp2"
+ DefaultEBSType = "gp3"
// DefaultEBSAvailabilityZone is the default availability zone for EBS
// volumes. This may be a temporary default.
DefaultEBSAvailabilityZone = "us-east-1a"
)
+// IsEc2Provider returns true if the provider is ec2.
+func IsEc2Provider(provider string) bool {
+ return provider == ProviderNameEc2OnDemand ||
+ provider == ProviderNameEc2Spot ||
+ provider == ProviderNameEc2Fleet
+}
+
+// IsDockerProvider returns true if the provider is docker.
+func IsDockerProvider(provider string) bool {
+ return provider == ProviderNameDocker ||
+ provider == ProviderNameDockerMock
+}
+
var (
// ProviderSpawnable includes all cloud provider types where hosts can be
// dynamically created and terminated according to need. This has no
@@ -447,7 +515,6 @@ var (
ProviderSpawnable = []string{
ProviderNameEc2OnDemand,
ProviderNameEc2Spot,
- ProviderNameEc2Auto,
ProviderNameEc2Fleet,
ProviderNameGce,
ProviderNameOpenstack,
@@ -462,7 +529,6 @@ var (
ProviderUserSpawnable = []string{
ProviderNameEc2OnDemand,
ProviderNameEc2Spot,
- ProviderNameEc2Auto,
ProviderNameEc2Fleet,
ProviderNameGce,
ProviderNameOpenstack,
@@ -476,7 +542,6 @@ var (
// ProviderSpotEc2Type includes all cloud provider types that manage EC2
// spot instances.
ProviderSpotEc2Type = []string{
- ProviderNameEc2Auto,
ProviderNameEc2Spot,
ProviderNameEc2Fleet,
}
@@ -484,7 +549,6 @@ var (
// ProviderEc2Type includes all cloud provider types that manage EC2
// instances.
ProviderEc2Type = []string{
- ProviderNameEc2Auto,
ProviderNameEc2Spot,
ProviderNameEc2Fleet,
ProviderNameEc2OnDemand,
@@ -493,11 +557,13 @@ var (
const (
DefaultServiceConfigurationFileName = "/etc/mci_settings.yml"
- DefaultDatabaseUrl = "mongodb://localhost:27017"
+ DefaultDatabaseURL = "mongodb://localhost:27017"
DefaultDatabaseName = "mci"
DefaultDatabaseWriteMode = "majority"
DefaultDatabaseReadMode = "majority"
+ DefaultAmboyDatabaseURL = "mongodb://localhost:27017"
+
// database and config directory, set to the testing version by default for safety
NotificationsFile = "mci-notifications.yml"
ClientDirectory = "clients"
@@ -509,7 +575,7 @@ const (
RepotrackerVersionRequester = "gitter_request"
TriggerRequester = "trigger_request"
MergeTestRequester = "merge_test" // commit queue
- AdHocRequester = "ad_hoc"
+ AdHocRequester = "ad_hoc" // periodic build
)
var AllRequesterTypes = []string{
@@ -528,6 +594,7 @@ var (
RepotrackerVersionRequester,
TriggerRequester,
GitTagRequester,
+ AdHocRequester,
}
)
@@ -539,6 +606,7 @@ const (
S3PullCommandName = "s3.pull"
ShellExecCommandName = "shell.exec"
AttachResultsCommandName = "attach.results"
+ ManifestLoadCommandName = "manifest.load"
AttachArtifactsCommandName = "attach.artifacts"
AttachXUnitResultsCommandName = "attach.xunit_results"
)
@@ -749,7 +817,6 @@ var (
// TaskUncompletedStatuses are all statuses that do not represent a finished state.
TaskUncompletedStatuses = []string{
TaskStarted,
- TaskUnstarted,
TaskUndispatched,
TaskDispatched,
TaskConflict,
@@ -772,6 +839,12 @@ var (
ArchLinuxAmd64: "Linux 64-bit",
ArchLinux386: "Linux 32-bit",
}
+
+ // ValidCloneMethods includes all recognized clone methods.
+ ValidCloneMethods = []string{
+ CloneMethodLegacySSH,
+ CloneMethodOAuth,
+ }
)
// FindEvergreenHome finds the directory of the EVGHOME environment variable.
@@ -803,6 +876,10 @@ func IsGitTagRequester(requester string) bool {
return requester == GitTagRequester
}
+func IsCommitQueueRequester(requester string) bool {
+ return requester == MergeTestRequester
+}
+
func ShouldConsiderBatchtime(requester string) bool {
return !IsPatchRequester(requester) && requester != AdHocRequester && requester != GitTagRequester
}
@@ -1102,6 +1179,7 @@ const (
LogViewerRaw LogViewer = "raw"
LogViewerHTML LogViewer = "html"
LogViewerLobster LogViewer = "lobster"
+ LogViewerParsley LogViewer = "parsley"
)
// ContainerOS denotes the operating system of a running container.
@@ -1166,10 +1244,22 @@ func (w WindowsVersion) Validate() error {
case Windows2022, Windows2019, Windows2016:
return nil
default:
- return errors.Errorf("unrecognized windows version '%s'", w)
+ return errors.Errorf("unrecognized Windows version '%s'", w)
}
}
+// ParserProjectStorageMethod represents a means to store the parser project.
+type ParserProjectStorageMethod string
+
+const (
+ // ProjectStorageMethodDB indicates that the parser project is stored as a
+ // single document in a DB collection.
+ ProjectStorageMethodDB ParserProjectStorageMethod = "db"
+ // ProjectStorageMethodS3 indicates that the parser project is stored as a
+ // single object in S3.
+ ProjectStorageMethodS3 ParserProjectStorageMethod = "s3"
+)
+
const (
// Valid public key types.
publicKeyRSA = "ssh-rsa"
@@ -1185,6 +1275,8 @@ var validKeyTypes = []string{
publicKeyECDSA,
}
+var sensitiveCollections = []string{"project_vars"}
+
// ValidateSSHKey errors if the given key does not start with one of the allowed prefixes.
func ValidateSSHKey(key string) error {
for _, prefix := range validKeyTypes {
@@ -1195,3 +1287,12 @@ func ValidateSSHKey(key string) error {
return errors.Errorf("either an invalid Evergreen-managed key name has been provided, "+
"or the key value is not one of the valid types: %s", validKeyTypes)
}
+
+// ValidateCloneMethod checks that the clone mechanism is one of the supported
+// methods.
+func ValidateCloneMethod(method string) error {
+ if !utility.StringSliceContains(ValidCloneMethods, method) {
+ return errors.Errorf("'%s' is not a valid clone method", method)
+ }
+ return nil
+}
diff --git a/go.mod b/go.mod
index 9c0eb262c8f..2ce97916ace 100644
--- a/go.mod
+++ b/go.mod
@@ -1,57 +1,187 @@
module github.com/evergreen-ci/evergreen
-go 1.16
+go 1.19
require (
- github.com/99designs/gqlgen v0.14.0
+ github.com/99designs/gqlgen v0.17.20
github.com/PuerkitoBio/rehttp v1.1.0
- github.com/aws/aws-sdk-go v1.44.25
+ github.com/aws/aws-sdk-go v1.44.210
github.com/cheynewallace/tabby v1.1.1
github.com/docker/docker v20.10.12+incompatible
github.com/docker/go-connections v0.4.0
github.com/dustin/go-humanize v1.0.0
- github.com/evergreen-ci/birch v0.0.0-20211025210128-7f3409c2b515
+ github.com/evergreen-ci/birch v0.0.0-20220401151432-c792c3d8e0eb
github.com/evergreen-ci/certdepot v0.0.0-20211117185134-dbedb3d79a10
- github.com/evergreen-ci/cocoa v0.0.0-20220610175551-2ddb1b6e0758
- github.com/evergreen-ci/gimlet v0.0.0-20220419172609-b882e01673e7
- github.com/evergreen-ci/go-test2json v0.0.0-20180702150328-5b6cfd2e8cb0
- github.com/evergreen-ci/juniper v0.0.0-20220118233332-0813edc78908
- github.com/evergreen-ci/pail v0.0.0-20211028170419-8efd623fd305
- github.com/evergreen-ci/poplar v0.0.0-20220119144730-b220d71c0330
+ github.com/evergreen-ci/cocoa v0.0.0-20230323210713-a34b158b096e
+ github.com/evergreen-ci/gimlet v0.0.0-20230317174941-7e759337ad2c
+ github.com/evergreen-ci/juniper v0.0.0-20230119161755-1aced8006202
+ github.com/evergreen-ci/pail v0.0.0-20220908201135-8a2090a672b7
+ github.com/evergreen-ci/poplar v0.0.0-20220908212406-a5e2aa799def
github.com/evergreen-ci/shrub v0.0.0-20211025143051-a8d91b2e29fd
- github.com/evergreen-ci/timber v0.0.0-20220119202616-544be15f3b95
- github.com/evergreen-ci/utility v0.0.0-20220622184037-b63c011983c2
- github.com/google/go-github/v34 v34.0.0
+ github.com/evergreen-ci/timber v0.0.0-20230413164224-05a3a6e11d78
+ github.com/evergreen-ci/utility v0.0.0-20230508194838-873894227dc9
+ github.com/google/go-github/v52 v52.0.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/gophercloud/gophercloud v0.1.0
github.com/gorilla/csrf v1.7.1
+ github.com/gorilla/mux v1.8.0
github.com/gorilla/sessions v1.2.1
github.com/jpillora/backoff v1.0.0
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/mitchellh/go-homedir v1.1.0
- github.com/mitchellh/mapstructure v1.4.2
- github.com/mongodb/amboy v0.0.0-20220209145213-c1c572da4472
- github.com/mongodb/anser v0.0.0-20220318141853-005b8ead5b8f
- github.com/mongodb/ftdc v0.0.0-20211028165431-67f017692185
- github.com/mongodb/grip v0.0.0-20220401165023-6a1d9bb90c21
+ github.com/mitchellh/mapstructure v1.5.0
+ github.com/mongodb/amboy v0.0.0-20221207220239-4ab00e3ea9da
+ github.com/mongodb/anser v0.0.0-20230501213745-c62f11870fd4
+ github.com/mongodb/grip v0.0.0-20230503175150-8b2e395f3111
github.com/pkg/errors v0.9.1
+ github.com/ravilushqa/otelgqlgen v0.11.0
github.com/robbiet480/go.sns v0.0.0-20210223081447-c7c9eb6836cb
github.com/robfig/cron v1.2.0
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/smartystreets/goconvey v1.7.2
- github.com/stretchr/testify v1.7.1
- github.com/urfave/cli v1.22.5
- github.com/vektah/gqlparser/v2 v2.2.0
+ github.com/stretchr/testify v1.8.2
+ github.com/urfave/cli v1.22.10
+ github.com/vektah/gqlparser/v2 v2.5.1
github.com/vmware/govmomi v0.27.1
- go.mongodb.org/mongo-driver v1.8.3
- golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
- golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
- golang.org/x/tools v0.1.9
- gonum.org/v1/gonum v0.11.0
- google.golang.org/api v0.60.0
- google.golang.org/grpc v1.44.0
+ go.mongodb.org/mongo-driver v1.11.2
+ go.opentelemetry.io/contrib/detectors/aws/ec2 v1.15.0
+ go.opentelemetry.io/contrib/detectors/aws/ecs v1.15.0
+ go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.40.0
+ go.opentelemetry.io/otel v1.15.0
+ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.38.0
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.0
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.0
+ go.opentelemetry.io/otel/metric v0.38.0
+ go.opentelemetry.io/otel/sdk v1.15.0
+ go.opentelemetry.io/otel/sdk/metric v0.38.0
+ go.opentelemetry.io/otel/trace v1.15.0
+ golang.org/x/crypto v0.7.0
+ golang.org/x/oauth2 v0.7.0
+ golang.org/x/tools v0.6.0
+ gonum.org/v1/gonum v0.12.0
+ google.golang.org/api v0.103.0
+ google.golang.org/grpc v1.54.0
gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
+)
+
+require (
+ cloud.google.com/go/compute v1.15.1 // indirect
+ cloud.google.com/go/compute/metadata v0.2.3 // indirect
+ github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e // indirect
+ github.com/Microsoft/go-winio v0.4.17 // indirect
+ github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
+ github.com/VividCortex/ewma v1.2.0 // indirect
+ github.com/agnivade/levenshtein v1.1.1 // indirect
+ github.com/andybalholm/brotli v1.0.3 // indirect
+ github.com/andygrunwald/go-jira v1.14.0 // indirect
+ github.com/blang/semver v3.5.1+incompatible // indirect
+ github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf // indirect
+ github.com/cenkalti/backoff/v4 v4.2.1 // indirect
+ github.com/cloudflare/circl v1.1.0 // indirect
+ github.com/containerd/cgroups v1.0.2 // indirect
+ github.com/containerd/containerd v1.5.7 // indirect
+ github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
+ github.com/coreos/go-systemd/v22 v22.3.2 // indirect
+ github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d // indirect
+ github.com/dghubble/oauth1 v0.7.2 // indirect
+ github.com/docker/distribution v2.7.1+incompatible // indirect
+ github.com/docker/go-units v0.4.0 // indirect
+ github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
+ github.com/evergreen-ci/aviation v0.0.0-20220405151811-ff4a78a4297c // indirect
+ github.com/evergreen-ci/baobab v1.0.1-0.20211025210153-3206308845c1 // indirect
+ github.com/evergreen-ci/bond v0.0.0-20211109152423-ba2b6b207f56 // indirect
+ github.com/evergreen-ci/lru v0.0.0-20211029170532-008d075b972d // indirect
+ github.com/evergreen-ci/mrpc v0.0.0-20211025143107-842bca81a3f8 // indirect
+ github.com/evergreen-ci/negroni v1.0.1-0.20211028183800-67b6d7c2c035 // indirect
+ github.com/fatih/structs v1.1.0 // indirect
+ github.com/felixge/httpsnoop v1.0.3 // indirect
+ github.com/fsnotify/fsnotify v1.5.1 // indirect
+ github.com/fuyufjh/splunk-hec-go v0.3.4-0.20210909061418-feecd03924b7 // indirect
+ github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect
+ github.com/go-ldap/ldap/v3 v3.4.4 // indirect
+ github.com/go-logr/logr v1.2.4 // indirect
+ github.com/go-logr/stdr v1.2.2 // indirect
+ github.com/go-ole/go-ole v1.2.6 // indirect
+ github.com/goccy/go-json v0.9.4 // indirect
+ github.com/godbus/dbus/v5 v5.0.4 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
+ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
+ github.com/golang/protobuf v1.5.2 // indirect
+ github.com/golang/snappy v0.0.4 // indirect
+ github.com/google/go-github v17.0.0+incompatible // indirect
+ github.com/google/go-querystring v1.1.0 // indirect
+ github.com/google/uuid v1.3.0 // indirect
+ github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
+ github.com/googleapis/gax-go/v2 v2.7.0 // indirect
+ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
+ github.com/gorilla/securecookie v1.1.1 // indirect
+ github.com/gorilla/websocket v1.5.0 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 // indirect
+ github.com/hashicorp/golang-lru v0.5.4 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/jtolds/gls v4.20.0+incompatible // indirect
+ github.com/klauspost/compress v1.13.6 // indirect
+ github.com/klauspost/pgzip v1.2.5 // indirect
+ github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
+ github.com/lestrrat-go/blackmagic v1.0.0 // indirect
+ github.com/lestrrat-go/httpcc v1.0.0 // indirect
+ github.com/lestrrat-go/iter v1.0.1 // indirect
+ github.com/lestrrat-go/jwx v1.2.18 // indirect
+ github.com/lestrrat-go/option v1.0.0 // indirect
+ github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
+ github.com/mattn/go-xmpp v0.0.0-20211029151415-912ba614897a // indirect
+ github.com/mholt/archiver/v3 v3.5.1 // indirect
+ github.com/mongodb/ftdc v0.0.0-20220401165013-13e4af55e809 // indirect
+ github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808 // indirect
+ github.com/nwaples/rardecode v1.1.2 // indirect
+ github.com/okta/okta-jwt-verifier-golang v1.3.1 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.0.2 // indirect
+ github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
+ github.com/papertrail/go-tail v0.0.0-20180509224916-973c153b0431 // indirect
+ github.com/patrickmn/go-cache v0.0.0-20180815053127-5633e0862627 // indirect
+ github.com/peterhellberg/link v1.2.0 // indirect
+ github.com/phyber/negroni-gzip v1.0.0 // indirect
+ github.com/pierrec/lz4/v4 v4.1.9 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
+ github.com/rs/cors v1.8.3 // indirect
+ github.com/russross/blackfriday/v2 v2.1.0 // indirect
+ github.com/shoenig/go-m1cpu v0.1.4 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/slack-go/slack v0.12.1 // indirect
+ github.com/smartystreets/assertions v1.2.0 // indirect
+ github.com/square/certstrap v1.2.0 // indirect
+ github.com/tklauser/go-sysconf v0.3.11 // indirect
+ github.com/tklauser/numcpus v0.6.0 // indirect
+ github.com/trivago/tgo v1.0.7 // indirect
+ github.com/ulikunitz/xz v0.5.10 // indirect
+ github.com/urfave/cli/v2 v2.8.1 // indirect
+ github.com/urfave/negroni v1.0.0 // indirect
+ github.com/xdg-go/pbkdf2 v1.0.0 // indirect
+ github.com/xdg-go/scram v1.1.1 // indirect
+ github.com/xdg-go/stringprep v1.0.3 // indirect
+ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
+ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
+ github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
+ github.com/yusufpapurcu/wmi v1.2.2 // indirect
+ go.opencensus.io v0.24.0 // indirect
+ go.opentelemetry.io/contrib v1.10.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.0 // indirect
+ go.opentelemetry.io/proto/otlp v0.19.0 // indirect
+ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 // indirect
+ golang.org/x/mod v0.8.0 // indirect
+ golang.org/x/net v0.9.0 // indirect
+ golang.org/x/sync v0.1.0 // indirect
+ golang.org/x/sys v0.7.0 // indirect
+ golang.org/x/text v0.9.0 // indirect
+ google.golang.org/appengine v1.6.7 // indirect
+ google.golang.org/protobuf v1.30.0 // indirect
+ gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
)
require (
@@ -60,12 +190,11 @@ require (
)
require (
- github.com/DATA-DOG/go-sqlmock v1.5.0
- github.com/evergreen-ci/aviation v0.0.0-20211123195311-5ddfd75b3753 // indirect
github.com/evergreen-ci/evg-lint v0.0.0-20211115144425-3b19c8e83a57
+ github.com/evergreen-ci/plank v0.0.0-20230207190607-5f47f8a30da1
github.com/evergreen-ci/tarjan v0.0.0-20170824211642-fcd3f3321826
github.com/mongodb/jasper v0.0.0-20220214215554-82e5a72cff6b
- github.com/shirou/gopsutil/v3 v3.22.3
- github.com/trinodb/trino-go-client v0.300.0
- google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 // indirect
+ github.com/shirou/gopsutil/v3 v3.23.3
+ google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
+ gopkg.in/yaml.v3 v3.0.1
)
diff --git a/go.sum b/go.sum
index de74d7d149b..3e3b86f2c02 100644
--- a/go.sum
+++ b/go.sum
@@ -14,27 +14,20 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
-cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
-cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
-cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
-cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
-cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
-cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
-cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
-cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
-cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
-cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
-cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
-cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8=
-cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
+cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
+cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE=
+cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA=
+cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
+cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
+cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
@@ -47,8 +40,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc=
-github.com/99designs/gqlgen v0.14.0 h1:Wg8aNYQUjMR/4v+W3xD+7SizOy6lSvVeQ06AobNQAXI=
-github.com/99designs/gqlgen v0.14.0/go.mod h1:S7z4boV+Nx4VvzMUpVrY/YuHjFX4n7rDyuTqvAkuoRE=
+github.com/99designs/gqlgen v0.17.20 h1:O7WzccIhKB1dm+7g6dhQcULINftfiLSBg2l/mwbpJMw=
+github.com/99designs/gqlgen v0.17.20/go.mod h1:Mja2HI23kWT1VRH09hvWshFgOzKswpO20o4ScpJIES4=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
@@ -63,12 +56,12 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
-github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28=
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
+github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e h1:NeAW1fUYUEWhft7pkxDf6WoUvEZJ/uOKsvtpjLnn8MU=
+github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
-github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
@@ -90,6 +83,8 @@ github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5
github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
+github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/rehttp v1.1.0 h1:JFZ7OeK+hbJpTxhNB0NDZT47AuXqCU0Smxfjtph7/Rs=
github.com/PuerkitoBio/rehttp v1.1.0/go.mod h1:LUwKPoDbDIA2RL5wYZCNsQ90cx4OJ4AWBmq6KzWZL1s=
@@ -100,8 +95,8 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/a8m/tree v0.0.0-20210115125333-10a5fd5b637d/go.mod h1:FSdwKX97koS5efgm8WevNf7XS3PqtyFkKDDXrz778cg=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
-github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM=
-github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
+github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
+github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
@@ -127,9 +122,11 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l
github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
github.com/aws/aws-sdk-go v1.41.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.41.12/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
-github.com/aws/aws-sdk-go v1.42.44/go.mod h1:OGr6lGMAKGlG9CVrYnWYDKIyb829c6EVBRjxqjmPepc=
-github.com/aws/aws-sdk-go v1.44.25 h1:cJZ4gtEpWAD/StO9GGOAyv6AaAoZ9OJUhu96gF9qaio=
-github.com/aws/aws-sdk-go v1.44.25/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
+github.com/aws/aws-sdk-go v1.43.30/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
+github.com/aws/aws-sdk-go v1.44.89/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
+github.com/aws/aws-sdk-go v1.44.127/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
+github.com/aws/aws-sdk-go v1.44.210 h1:/cqRMHSSgzLEKILIDGwhaX2hiIpyRurw7MRy6aaSufg=
+github.com/aws/aws-sdk-go v1.44.210/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
@@ -144,16 +141,20 @@ github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edY
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/bluele/slack v0.0.0-20180528010058-b4b4d354a079 h1:dm7wU6Dyf+rVGryOAB8/J/I+pYT/9AdG8dstD3kdMWU=
github.com/bluele/slack v0.0.0-20180528010058-b4b4d354a079/go.mod h1:W679Ri2W93VLD8cVpEY/zLH1ow4zhJcCyjzrKxfM3QM=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
+github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf h1:WCnJxXZXx9c8gwz598wvdqmu+YTzB9wx2X1OovK3Le8=
+github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf/go.mod h1:CeKhh8xSs3WZAc50xABMxu+FlfAAd5PNumo7NfOv7EE=
github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
+github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
+github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
+github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -170,13 +171,15 @@ github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX
github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY=
+github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
@@ -284,8 +287,9 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
@@ -302,8 +306,9 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d h1:
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go.mod h1:tmAIfUFEirG/Y8jhZ9M+h36obRZAk/1fcSpXwAVlfqE=
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
github.com/dghubble/oauth1 v0.7.0/go.mod h1:8pFdfPkv/jr8mkChVbNVuJ0suiHe278BtWI4Tk1ujxk=
-github.com/dghubble/oauth1 v0.7.1 h1:JjbOVSVVkms9A4h/sTQy5Jb2nFuAAVb2qVYgenJPyrE=
github.com/dghubble/oauth1 v0.7.1/go.mod h1:0eEzON0UY/OLACQrmnjgJjmvCGXzjBCsZqL1kWDXtF0=
+github.com/dghubble/oauth1 v0.7.2 h1:pwcinOZy8z6XkNxvPmUDY52M7RDPxt0Xw1zgZ6Cl5JA=
+github.com/dghubble/oauth1 v0.7.2/go.mod h1:9erQdIhqhOHG/7K9s/tgh9Ks/AfoyrO5mW/43Lu2+kE=
github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
@@ -339,41 +344,41 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evergreen-ci/aviation v0.0.0-20211026175554-41a4410c650f/go.mod h1:aKaSPhULP3hvwaX/sF5k5bQLtnOhndnRdnwNTqR3/cA=
-github.com/evergreen-ci/aviation v0.0.0-20211123195311-5ddfd75b3753 h1:m9WkzWN7etlzcrghimbtOhY2tbI1nJu4UXR6/C+Y0GE=
-github.com/evergreen-ci/aviation v0.0.0-20211123195311-5ddfd75b3753/go.mod h1:aKaSPhULP3hvwaX/sF5k5bQLtnOhndnRdnwNTqR3/cA=
+github.com/evergreen-ci/aviation v0.0.0-20220405151811-ff4a78a4297c h1:o9S56cFdIhqv47Ckj9jJS1nVXZu5TIcZyUwkOChYRrk=
+github.com/evergreen-ci/aviation v0.0.0-20220405151811-ff4a78a4297c/go.mod h1:5A+CTXmwVhGbqj5jryhkREK5iMmZEGpbFkdim4HwHtQ=
github.com/evergreen-ci/baobab v1.0.1-0.20211025210153-3206308845c1 h1:EEj39Mty+xo8nQVt1+Fm0X3TOp/hhpf31ZsQoLgwGGI=
github.com/evergreen-ci/baobab v1.0.1-0.20211025210153-3206308845c1/go.mod h1:BBYlpXc8SBL1azK6BDvxzw4UJokQlykfMngXCWFqt4o=
github.com/evergreen-ci/birch v0.0.0-20191213201306-f4dae6f450a2/go.mod h1:IfmR6rcYhoHGAdYS51VEr60p1YzzXJvb7pFtGdNc88A=
github.com/evergreen-ci/birch v0.0.0-20211018155026-a778a63e2418/go.mod h1:IfmR6rcYhoHGAdYS51VEr60p1YzzXJvb7pFtGdNc88A=
-github.com/evergreen-ci/birch v0.0.0-20211025210128-7f3409c2b515 h1:uVar/l4+HAs9MQokJEUxVyh1DmZiAKE917rMokJnWs4=
github.com/evergreen-ci/birch v0.0.0-20211025210128-7f3409c2b515/go.mod h1:UkffaTUdn8MZqVxl4PHgPWJ7uXk/HixOTjRcVjtL5lg=
+github.com/evergreen-ci/birch v0.0.0-20220401151432-c792c3d8e0eb h1:8JTwpIvxuM9/LUogsfAAdnNkxkbwwyRXuPLEF8MIR4o=
+github.com/evergreen-ci/birch v0.0.0-20220401151432-c792c3d8e0eb/go.mod h1:VwKNloyO+PS+AkmshHmpHih8aVoQ3eyqWOXAnlUT5Kk=
github.com/evergreen-ci/bond v0.0.0-20211109152423-ba2b6b207f56 h1:e94brJfi0WTMWpoDJJoOEN4OHKzYBjfOsfg/18eUmoQ=
github.com/evergreen-ci/bond v0.0.0-20211109152423-ba2b6b207f56/go.mod h1:EO+OqmQuA+KvHdY8qlRaRNiuRHmPN5bNCTuSVynD0Nk=
github.com/evergreen-ci/certdepot v0.0.0-20211109153348-d681ebe95b66/go.mod h1:X72gmQuA1g8E1vWg1Jfve3zdHoPxJkpwXDMLV1COs5g=
github.com/evergreen-ci/certdepot v0.0.0-20211117185134-dbedb3d79a10 h1:dVNSXGxztN6t1S3vGxbSKqb5vqIRM5LiM1O5JjnVuCA=
github.com/evergreen-ci/certdepot v0.0.0-20211117185134-dbedb3d79a10/go.mod h1:KpN0y+4m4oplnmM/PQmKAG+NQDKUbtr1BbdR4mr+6Ww=
-github.com/evergreen-ci/cocoa v0.0.0-20220610175551-2ddb1b6e0758 h1:ut9eiV6eS2n9aNF1UM0fFZYlOwo9DFRHD7/y/oy/EcQ=
-github.com/evergreen-ci/cocoa v0.0.0-20220610175551-2ddb1b6e0758/go.mod h1:/3htq2sL7ej1sZ+5AOM0XmKmHlTfeAQ7GG9UZ8gqt2g=
+github.com/evergreen-ci/cocoa v0.0.0-20230323210713-a34b158b096e h1:gF78PFpZWebIzDP42oKtnG6WOVLTBcOoG3eZKrhOdxA=
+github.com/evergreen-ci/cocoa v0.0.0-20230323210713-a34b158b096e/go.mod h1:9loFu7XeSsMF9tCQyJyUyjrVGkhQAEoOTgwniVzFzVI=
github.com/evergreen-ci/evg-lint v0.0.0-20211115144425-3b19c8e83a57 h1:CIUR6i5YWJ/z5RbZ11UomO7aZxQjeHqAjOqGwPh7sCY=
github.com/evergreen-ci/evg-lint v0.0.0-20211115144425-3b19c8e83a57/go.mod h1:lbmNkNEkJEuhIdctIEbJhx4hMzjRvbUg172mQRvNnKo=
github.com/evergreen-ci/gimlet v0.0.0-20211018155143-ebbbff34990a/go.mod h1:F2dAoc1x1+JwZH9ylB9tpeOnztafEx2IbZjEz8GQzOM=
github.com/evergreen-ci/gimlet v0.0.0-20211029160936-5b64c7b33753/go.mod h1:57Sr3kCsdBlf9ii/ZYyuNDTzcDLDN7laOyJeIXYPGGs=
github.com/evergreen-ci/gimlet v0.0.0-20220401150826-5898de01dbd8/go.mod h1:LfnJ3oYEVFUHwIPoAotvn9bbtAT+lAaCpH5YYnyxluk=
-github.com/evergreen-ci/gimlet v0.0.0-20220419172609-b882e01673e7 h1:7fRw2w8ISLXe0ovqKvODeAIciluCgIQyFSF1W0DfpS4=
-github.com/evergreen-ci/gimlet v0.0.0-20220419172609-b882e01673e7/go.mod h1:NqXYQ2lPMU7dY33a4ZrqXJKQ3ZY8IZru8H/rpY0hrxs=
-github.com/evergreen-ci/go-test2json v0.0.0-20180702150328-5b6cfd2e8cb0 h1:0hhomVgkD0cohkbPX5v//ST2IIngWRWSrJSzYdiUXT4=
-github.com/evergreen-ci/go-test2json v0.0.0-20180702150328-5b6cfd2e8cb0/go.mod h1:LPjADOtSJOJ1MWZ7E7p6KMeIoeQ1XWOo3uuF+GHPcT4=
+github.com/evergreen-ci/gimlet v0.0.0-20220401151443-33c830c51cee/go.mod h1:NqXYQ2lPMU7dY33a4ZrqXJKQ3ZY8IZru8H/rpY0hrxs=
+github.com/evergreen-ci/gimlet v0.0.0-20230317174941-7e759337ad2c h1:CFI5vY95JHQmHWKk4BcbENBG3XXnj+D+9gUfYfsTQzQ=
+github.com/evergreen-ci/gimlet v0.0.0-20230317174941-7e759337ad2c/go.mod h1:DfTQmg7Yf8DXDeeJxweZ2/o3AMS3D9wErxrlPcpXc7g=
github.com/evergreen-ci/juniper v0.0.0-20210624185208-0fd21a88954c/go.mod h1:LewZWRe1jV5XJhNksoB0rpvlwsg+D6M3yvzIFJZ8OJs=
-github.com/evergreen-ci/juniper v0.0.0-20220118233332-0813edc78908 h1:k7f+q2yaOdv+SNSV2iHhqdBIxA8Yk78CLGypk8d+efI=
github.com/evergreen-ci/juniper v0.0.0-20220118233332-0813edc78908/go.mod h1:LewZWRe1jV5XJhNksoB0rpvlwsg+D6M3yvzIFJZ8OJs=
+github.com/evergreen-ci/juniper v0.0.0-20230119161755-1aced8006202 h1:MK0NYjJ1XHqvXMKwwV7uJC/6vOsLDuSUDoWmy9wahck=
+github.com/evergreen-ci/juniper v0.0.0-20230119161755-1aced8006202/go.mod h1:LewZWRe1jV5XJhNksoB0rpvlwsg+D6M3yvzIFJZ8OJs=
github.com/evergreen-ci/lru v0.0.0-20211029170532-008d075b972d h1:DdLeUQM7wsrlsiKiI6jYLDCSF6asMuBuT8C4nUIQdJA=
github.com/evergreen-ci/lru v0.0.0-20211029170532-008d075b972d/go.mod h1:A/RxjQaIiyGDAbbeRcMzbjkiaEqZvaZ8AEGqysO4fhA=
github.com/evergreen-ci/mrpc v0.0.0-20211025143107-842bca81a3f8 h1:J8fB9j5/gMf/+2Xgigfbyo9p712g8bnUgMoOZCdPSH4=
@@ -381,25 +386,36 @@ github.com/evergreen-ci/mrpc v0.0.0-20211025143107-842bca81a3f8/go.mod h1:VYRQQh
github.com/evergreen-ci/negroni v1.0.1-0.20211028183800-67b6d7c2c035 h1:oVU/ni/sRq+GAogUMLa7LBGtvVHMVLbisuytxBC5KaY=
github.com/evergreen-ci/negroni v1.0.1-0.20211028183800-67b6d7c2c035/go.mod h1:pvK7NM0ZC+sfTLuIiJN4BgM1S9S5Oo79PJReAFFph18=
github.com/evergreen-ci/pail v0.0.0-20211018155204-833e3187cfe7/go.mod h1:5gJ3srLW+mTEtewtmEs5qdnFiKFtwoggc/U3oFCVAdc=
-github.com/evergreen-ci/pail v0.0.0-20211028170419-8efd623fd305 h1:tnLHGYdEFW3hHvmz8VcK6Tu4Pr7wTcqgIJucNyP2qck=
github.com/evergreen-ci/pail v0.0.0-20211028170419-8efd623fd305/go.mod h1:ch0TKjI+NK2GewovamMpY9tqoe0Fal71c/4x+4x1+Io=
+github.com/evergreen-ci/pail v0.0.0-20220405154537-920afff49d92/go.mod h1:Vne1WBTeJaI2zRTv3forHzliSSQmr1zCogZIcpjFsUo=
+github.com/evergreen-ci/pail v0.0.0-20220908201135-8a2090a672b7 h1:XA4npSEntrWplLPkOqTiYmGTLNbNJS/9MzNWwfuC8DM=
+github.com/evergreen-ci/pail v0.0.0-20220908201135-8a2090a672b7/go.mod h1:Ten0LDyKy6zFGFtu4DwTdOa+KGpiivkwJZmXEa024mw=
+github.com/evergreen-ci/plank v0.0.0-20230207190607-5f47f8a30da1 h1:KkCHAMVyiM3/JHccjC9tAXE0KM80p19hlXJhaiggAdQ=
+github.com/evergreen-ci/plank v0.0.0-20230207190607-5f47f8a30da1/go.mod h1:v8BYoLFIhvElWTc1xtP7aHPBEwTC3dh308PgFBbROaI=
github.com/evergreen-ci/poplar v0.0.0-20211028170046-0999224b53df/go.mod h1:xiggfkrlxlu2C2e58tvk0WAYFetgNC7U9ONqcP29xZs=
github.com/evergreen-ci/poplar v0.0.0-20211028171636-d45516ea1ce5/go.mod h1:RHBpqOlxE28M/lUgWRpxJ+WrHqCuY8a7EcXIvzqiPys=
-github.com/evergreen-ci/poplar v0.0.0-20220119144730-b220d71c0330 h1:8J5GUVBl5D6wgUqxSV7xja4GTVje8JwgxhFuoeGrvGg=
github.com/evergreen-ci/poplar v0.0.0-20220119144730-b220d71c0330/go.mod h1:O5wGST4cE5G6vO0QATuDAgftApq9tow9avdjZqcSWS8=
+github.com/evergreen-ci/poplar v0.0.0-20220405164038-0cfe3198c320/go.mod h1:H4E1ha844o4VDsuJQQyB+HKHmz8gaXCRnukfWDPV/Zw=
+github.com/evergreen-ci/poplar v0.0.0-20220908212406-a5e2aa799def h1:A37I3mgA6TTPbddu4UuEbpc0HMGxYSRwtu42s/9dpAY=
+github.com/evergreen-ci/poplar v0.0.0-20220908212406-a5e2aa799def/go.mod h1:rj0uvK3GWKZmynb6AeZ66eZvorKSQDxvV1mh5lZVkHc=
github.com/evergreen-ci/shrub v0.0.0-20211025143051-a8d91b2e29fd h1:ZTiko2itvbnMVPYBuOlh2aSLjk9JgZ5UFSzjnFG/5ts=
github.com/evergreen-ci/shrub v0.0.0-20211025143051-a8d91b2e29fd/go.mod h1:UTWsClgKujHCHUovGzTTRW5i5HPWo5Ie/PTeODAkcjo=
github.com/evergreen-ci/tarjan v0.0.0-20170824211642-fcd3f3321826 h1:oViYb1lmJN1k9SExkF87VTess4JVR7Uvwr8AAKzJ864=
github.com/evergreen-ci/tarjan v0.0.0-20170824211642-fcd3f3321826/go.mod h1:SnQ9F63VSR6kHbC4aFE+f7+iL3yANhjaN9TT9T4skao=
-github.com/evergreen-ci/timber v0.0.0-20220119202616-544be15f3b95 h1:Y88D2bv37Ocfa8BoLfbTVepef9VvikKkoP5TaFQw/Jk=
-github.com/evergreen-ci/timber v0.0.0-20220119202616-544be15f3b95/go.mod h1:Owh+4Jydm5Pp+OuNgW4Z9YB79tc6hly2g36t9fnWqMc=
+github.com/evergreen-ci/timber v0.0.0-20230413164224-05a3a6e11d78 h1:Q1HuesKSJFqxNVZoIzQRRc/yha8cYVt2W7ke62hvt9I=
+github.com/evergreen-ci/timber v0.0.0-20230413164224-05a3a6e11d78/go.mod h1:iQ61Jnff5R5IMDMK/CytJSzerlXw/XC51CQFTURM0Pk=
github.com/evergreen-ci/utility v0.0.0-20211026201827-97b21fa2660a/go.mod h1:fuEDytmDhOv+UCUwRPG/qD7mjVkUgx37KEv+thUgHVk=
-github.com/evergreen-ci/utility v0.0.0-20220302150552-3f7a1a268ea7/go.mod h1:EXIwZ5mlP/g0UrWPWX7oRTKQ8nD/ghE3lPCKQ8JMjbk=
-github.com/evergreen-ci/utility v0.0.0-20220622184037-b63c011983c2 h1:/kxVsjuy7aYGZLqWt4vNDvyffCjmlKGDybkAtD6S7/o=
-github.com/evergreen-ci/utility v0.0.0-20220622184037-b63c011983c2/go.mod h1:wSui4nRyDZzm2db7Ju7ZzBAelLyVLmcTPJEIh1IdSrc=
+github.com/evergreen-ci/utility v0.0.0-20220404192535-d16eb64796e6/go.mod h1:wSui4nRyDZzm2db7Ju7ZzBAelLyVLmcTPJEIh1IdSrc=
+github.com/evergreen-ci/utility v0.0.0-20220725171106-4730479c6118/go.mod h1:J23DaXv/35hpeeDLK1ay9KX/7zMF0HdVMAitqXQW9j0=
+github.com/evergreen-ci/utility v0.0.0-20230104160902-3f0e05a638bd/go.mod h1:vkCEVgfCMIDajzbG/PHZURszI2Y1SuFqNWX9EUxmLLI=
+github.com/evergreen-ci/utility v0.0.0-20230216205613-b8156d58f1e5/go.mod h1:JOJFPxtV7r9EEPqdcgkhgMvUMFGNTkUuYp0u2d8zcQI=
+github.com/evergreen-ci/utility v0.0.0-20230508194838-873894227dc9 h1:FEYS+Jjz+CSKTWnZgsvmHY7LlNMVfIxnp8rI7zYE5Es=
+github.com/evergreen-ci/utility v0.0.0-20230508194838-873894227dc9/go.mod h1:JOJFPxtV7r9EEPqdcgkhgMvUMFGNTkUuYp0u2d8zcQI=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
+github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
+github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
@@ -419,8 +435,9 @@ github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2H
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do=
-github.com/go-asn1-ber/asn1-ber v1.5.1 h1:pDbRAunXzIUXfx4CB2QJFv5IuPiuoW+sWvr/Us009o8=
github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
+github.com/go-asn1-ber/asn1-ber v1.5.4 h1:vXT6d/FNDiELJnLb6hGNa309LMsrCoYFvpwHDF0+Y1A=
+github.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g=
github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks=
github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY=
@@ -435,12 +452,18 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U=
github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk=
github.com/go-ldap/ldap/v3 v3.4.1/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg=
-github.com/go-ldap/ldap/v3 v3.4.2 h1:zFZKcXKLqZpFMrMQGHeHWKXbDTdNCmhGY9AK41zPh+8=
github.com/go-ldap/ldap/v3 v3.4.2/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg=
+github.com/go-ldap/ldap/v3 v3.4.4 h1:qPjipEpt+qDa6SI/h1fzuGWoRUY+qqQ9sOZq67/PYUs=
+github.com/go-ldap/ldap/v3 v3.4.4/go.mod h1:fe1MsuN5eJJ1FeLT/LEBVdWfNWKh459R7aXgXtJC+aI=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
+github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
@@ -456,8 +479,9 @@ github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
+github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho=
+github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
@@ -487,7 +511,6 @@ github.com/goccy/go-json v0.9.4 h1:L8MLKG2mvVXiQu07qB6hmfqeSYQdOnqPot2GhsIwIaI=
github.com/goccy/go-json v0.9.4/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
-github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=
@@ -506,6 +529,8 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
+github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -519,8 +544,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
-github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
-github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -536,12 +559,10 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -558,23 +579,21 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github v8.0.1-0.20170604030111-7a51fb928f52+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
-github.com/google/go-github/v34 v34.0.0 h1:/siYFImY8KwGc5QD1gaPf+f8QX6tLwxNIco2RkYxoFA=
-github.com/google/go-github/v34 v34.0.0/go.mod h1:w/2qlrXUfty+lbyO6tatnzIw97v1CM+/jZcwXMDiPQQ=
+github.com/google/go-github/v52 v52.0.0 h1:uyGWOY+jMQ8GVGSX8dkSwCzlehU3WfdxQ7GweO/JP7M=
+github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4=
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
-github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
@@ -582,13 +601,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -598,21 +610,20 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs=
+github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
-github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU=
-github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
+github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ=
+github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8=
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o=
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/csrf v1.7.1 h1:Ir3o2c1/Uzj6FBxMlAUB6SivgVMy1ONXwYgXn+/aHPE=
github.com/gorilla/csrf v1.7.1/go.mod h1:+a/4tCmqhG6/w4oafeAZ9pEa3/NZOWYVbD9fV0FwIQA=
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
-github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
@@ -623,8 +634,9 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
+github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
@@ -632,20 +644,23 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 h1:kr3j8iIMR4ywO/O0rvksXaJvauGGCMg2zAZIiNZ9uIQ=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0/go.mod h1:ummNFgdgLhhX7aIiy35vVmQNS0rWXknfPE0qe6fmFXg=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
-github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
@@ -653,8 +668,6 @@ github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
-github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
-github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
@@ -681,6 +694,7 @@ github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uia
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
+github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
@@ -727,9 +741,10 @@ github.com/lestrrat-go/option v0.0.0-20210103042652-6f1ecfceda35/go.mod h1:5ZHFb
github.com/lestrrat-go/option v1.0.0 h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4=
github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
github.com/lestrrat-go/pdebug/v3 v3.0.1/go.mod h1:za+m+Ve24yCxTEhR59N7UlnJomWwCiIqbJRmKeiADU4=
-github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
-github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
+github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
+github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY=
+github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -737,16 +752,14 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
-github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007 h1:reVOUXwnhsYv/8UqjvhrMOu5CNT9UapHFLbQ2JcXsmg=
-github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
+github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
+github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/mattn/go-xmpp v0.0.0-20161121012536-f4550b539938/go.mod h1:Cs5mF0OsrRRmhkyOod//ldNPOwJsrBvJ+1WRspv0xoc=
@@ -763,10 +776,10 @@ github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
-github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
+github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
@@ -780,24 +793,28 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mongodb/amboy v0.0.0-20200527191935-07fdffff5b8c/go.mod h1:SfpzZNF2KZUT5zO0/q4eUqW+EQe64MiY8xXmkBHZDqk=
github.com/mongodb/amboy v0.0.0-20211101161704-2b42087d24e6/go.mod h1:aYcnjrBUtbgB+naQ6FlVltCdprHv9Td2GOkQkZUqPvY=
-github.com/mongodb/amboy v0.0.0-20220209145213-c1c572da4472 h1:0SH2HyIc99y320nbDa7B8aZo9Lf4pH4hI48/OsZPzeE=
-github.com/mongodb/amboy v0.0.0-20220209145213-c1c572da4472/go.mod h1:fRreUmkIoK+4oDwmLBIaI2Dt2t9qJBolXEceTF3JZXI=
+github.com/mongodb/amboy v0.0.0-20220408143015-94858bb64f00/go.mod h1:pyAwlkip3M7Hw91UqQpTo9Oo7clNgGFdOqa9EvgvhbM=
+github.com/mongodb/amboy v0.0.0-20221207220239-4ab00e3ea9da h1:1sLg2d9tVr6UDunkbYKh1pvSgxKQIYiTvOS0u8UPaV8=
+github.com/mongodb/amboy v0.0.0-20221207220239-4ab00e3ea9da/go.mod h1:a8nLsoZ7xIXS0S6WgZTgILrIU/YAHG/hex1OzcpLk2A=
github.com/mongodb/anser v0.0.0-20190422213746-1fb43a6d9968/go.mod h1:ESqf0zBEuYrqL0xADbIAFgdEOaBFpwZ4tkzY84ge+QA=
github.com/mongodb/anser v0.0.0-20211116195831-fdc43007b59f/go.mod h1:jDikxuo5FKbiTMAb8B5AMT3QqFSNrim2+GiRTSCdazU=
-github.com/mongodb/anser v0.0.0-20220318141853-005b8ead5b8f h1:cOPq9/377MrwRdgMGHsj5szvOGCokC7SYly2o5uEdv8=
-github.com/mongodb/anser v0.0.0-20220318141853-005b8ead5b8f/go.mod h1:f+I4lJPnxVhAJL63AbVjhAQ/4de1F3rT2vNjpwNbQIk=
+github.com/mongodb/anser v0.0.0-20230501213745-c62f11870fd4 h1:0/XR1OmWPRXADG+fSBQ/JO6TMcrpDLabuG6baNhpWt0=
+github.com/mongodb/anser v0.0.0-20230501213745-c62f11870fd4/go.mod h1:saPu+6unYdVwezT3WEhgdvz+7oIPgJi7Ooss7lQgg28=
github.com/mongodb/ftdc v0.0.0-20211018154918-80dd1c22e4cf/go.mod h1:qd800FxWJIh4VUqu2d9Cmzdpv1CGXMqdwkntAKbaLlY=
-github.com/mongodb/ftdc v0.0.0-20211028165431-67f017692185 h1:SmFnrK5+eDC3MWPO0meWWy5cZVdLZtWUsr4H4rXOydA=
github.com/mongodb/ftdc v0.0.0-20211028165431-67f017692185/go.mod h1:r7lJoletuTMfdKxFs/1WJfqjynicCsoHZmdL/UN0lpQ=
+github.com/mongodb/ftdc v0.0.0-20220401165013-13e4af55e809 h1:CQVEigRr2M/OFIPn+wQWerSadMioMY1cLp22yZX+Ygk=
+github.com/mongodb/ftdc v0.0.0-20220401165013-13e4af55e809/go.mod h1:zz0HHFUU4/TOxl9TW4P9t3y3Ivx+sTWS2nwnhuYYRdw=
github.com/mongodb/grip v0.0.0-20211018154934-e661a71929d5/go.mod h1:g0r93iHSTLD50bDT7vNj+z+Y3nKz9o/tQXtB9esq2tk=
github.com/mongodb/grip v0.0.0-20211028155128-86e6e47bafdb/go.mod h1:0CTWxPoPDJPkpJvh5ejbCxbwVdPEea6Ap6vgpstiWsg=
github.com/mongodb/grip v0.0.0-20211101151816-abbea0c0d465/go.mod h1:686LUUoh+vP85XVjr1ZYqC2mk52m138QmCZ4B2HZYkI=
github.com/mongodb/grip v0.0.0-20220210164115-898ba2888109/go.mod h1:VAvqrRA7VH0xZmgcZNbN9ksYT20R5XywjeAv6o1CZZ8=
-github.com/mongodb/grip v0.0.0-20220401165023-6a1d9bb90c21 h1:SBXhTs+Umg5AX4uBrNbfq6hbxJELFCN42j3fC7QJG+M=
github.com/mongodb/grip v0.0.0-20220401165023-6a1d9bb90c21/go.mod h1:QfF6CwbaTQx1Kgww77c6ROPBFN+JCiU2qBnk2SjKHyU=
+github.com/mongodb/grip v0.0.0-20230503175150-8b2e395f3111 h1:mqvQQokI4q97oVGbyZ9o0CpGjAE/UN8fDK5t5irTtVk=
+github.com/mongodb/grip v0.0.0-20230503175150-8b2e395f3111/go.mod h1:2aBs5TWdJ2oxyEqC7HZWwR79ky0WMDHQZXbX7qdQRWI=
github.com/mongodb/jasper v0.0.0-20220214215554-82e5a72cff6b h1:VeoszGUVkmmRmPxwiJIiO/psZbPwz7tc6qbX2xDoQLY=
github.com/mongodb/jasper v0.0.0-20220214215554-82e5a72cff6b/go.mod h1:ZMsAlwE3H8Yh/L9bc3lliN3EZME41wButVxWpt2e4Io=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
+github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808 h1:pmpDGKLw4n82EtrNiLqB+xSz/JQwFOaZuMALYUHwX5s=
github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
@@ -806,6 +823,7 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
+github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M=
@@ -814,8 +832,9 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/okta/okta-jwt-verifier-golang v1.1.1/go.mod h1:Nw85EhrNXkWgfkhE9lggRoRVZLVm7zf/ZtglDUzkKU8=
github.com/okta/okta-jwt-verifier-golang v1.2.1/go.mod h1:cHffA777f7Yi4K+yDzUp89sGD5v8sk04Pc3CiT1OMR8=
-github.com/okta/okta-jwt-verifier-golang v1.3.0 h1:vWW2yd2Kkh17CPu/PTbUhhX9+BCSW1ViIXCGO19GlVg=
github.com/okta/okta-jwt-verifier-golang v1.3.0/go.mod h1:cHffA777f7Yi4K+yDzUp89sGD5v8sk04Pc3CiT1OMR8=
+github.com/okta/okta-jwt-verifier-golang v1.3.1 h1:V+9W5KD3nG7xN0UYtnzXtkurGcs71bLwzPFuUGNMwdE=
+github.com/okta/okta-jwt-verifier-golang v1.3.1/go.mod h1:cHffA777f7Yi4K+yDzUp89sGD5v8sk04Pc3CiT1OMR8=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -856,8 +875,6 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo
github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8=
-github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
-github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/papertrail/go-tail v0.0.0-20180509224916-973c153b0431 h1:i1egM7gz4bPxLCIwBJOkpk6TqHpjTnL4dE1xdN/4dcs=
github.com/papertrail/go-tail v0.0.0-20180509224916-973c153b0431/go.mod h1:dMID0RaS2a5rhpOjC4RsAKitU6WGgkFBZnPVffL69b8=
github.com/patrickmn/go-cache v0.0.0-20180815053127-5633e0862627 h1:pSCLCl6joCFRnjpeojzOpEYs4q7Vditq8fySFG5ap3Y=
@@ -866,8 +883,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
-github.com/peterhellberg/link v1.1.0 h1:s2+RH8EGuI/mI4QwrWGSYQCRz7uNgip9BaM04HKu5kc=
-github.com/peterhellberg/link v1.1.0/go.mod h1:gtSlOT4jmkY8P47hbTc8PTgiDDWpdPbFYl75keYyBB8=
+github.com/peterhellberg/link v1.2.0 h1:UA5pg3Gp/E0F2WdX7GERiNrPQrM1K6CVJUUWfHa4t6c=
+github.com/peterhellberg/link v1.2.0/go.mod h1:gYfAh+oJgQu2SrZHg5hROVRQe1ICoK0/HHJTcE0edxc=
github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY=
github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
@@ -886,8 +903,9 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
+github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI=
+github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -918,6 +936,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
+github.com/ravilushqa/otelgqlgen v0.11.0 h1:4BWet8Utf1DdSnV6/ySzoXV1JqPb/6JvdXcjkDu1hps=
+github.com/ravilushqa/otelgqlgen v0.11.0/go.mod h1:fQUw671L7n+NqWO/C4sEOTkgB/LFwcZu0QJTbiQnEi0=
github.com/robbiet480/go.sns v0.0.0-20210223081447-c7c9eb6836cb h1:0OJCKQDYBoiOW3Fn+dENmiGQXU8CmIUJqS+B1rZVNbU=
github.com/robbiet480/go.sns v0.0.0-20210223081447-c7c9eb6836cb/go.mod h1:9CDhL7uDVy8vEVDNPJzxq89dPaPBWP6hxQcC8woBHus=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
@@ -929,13 +949,14 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM=
-github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
-github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
+github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo=
+github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
@@ -946,16 +967,17 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/shirou/gopsutil v3.21.9+incompatible h1:LTLpUnfX81MkHeCtSrwNKZwuW5Id6kCa7/P43NdcNn4=
github.com/shirou/gopsutil v3.21.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/gopsutil/v3 v3.21.10/go.mod h1:t75NhzCZ/dYyPQjyQmrAYP6c8+LCdFANeBMdLPCNnew=
github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA=
-github.com/shirou/gopsutil/v3 v3.22.3 h1:UebRzEomgMpv61e3hgD1tGooqX5trFbdU/ehphbHd00=
github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM=
-github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
-github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
+github.com/shirou/gopsutil/v3 v3.23.3 h1:Syt5vVZXUDXPEXpIBt5ziWsJ4LdSAAxF4l/xZeQgSEE=
+github.com/shirou/gopsutil/v3 v3.23.3/go.mod h1:lSBNN6t3+D6W5e5nXTxc8KIMMVxAcS+6IJlffjRRlMU=
+github.com/shoenig/go-m1cpu v0.1.4 h1:SZPIgRM2sEF9NJy50mRHu9PKGwxyyTTJIWvCtgVbozs=
+github.com/shoenig/go-m1cpu v0.1.4/go.mod h1:Wwvst4LR89UxjeFtLRMrpgRiyY4xPsejnVZym39dbAQ=
+github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c=
+github.com/shoenig/test v0.6.3/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
@@ -966,6 +988,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/slack-go/slack v0.12.1 h1:X97b9g2hnITDtNsNe5GkGx6O2/Sz/uC20ejRZN6QxOw=
+github.com/slack-go/slack v0.12.1/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
@@ -995,16 +1019,22 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
+github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
@@ -1013,15 +1043,15 @@ github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhV
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
-github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
+github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
+github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
-github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
+github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
+github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/trinodb/trino-go-client v0.300.0 h1:DnTskW//HKm9oggYviFsYIMdLyl7TqlWs4yXhW9NlKE=
-github.com/trinodb/trino-go-client v0.300.0/go.mod h1:/CMFmXqrFGmn76o/ZGefBLq7X6l0tsTJV4zrgQMVvvM=
github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM=
github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
@@ -1036,16 +1066,15 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
-github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
-github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k=
-github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
+github.com/urfave/cli v1.22.10 h1:p8Fspmz3iTctJstry1PYS3HVdllxnEzTEsgIgtxTrCk=
+github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4=
+github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY=
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
-github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg=
-github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U=
-github.com/vektah/gqlparser/v2 v2.2.0 h1:bAc3slekAAJW6sZTi07aGq0OrfaCjj4jxARAaC7g2EM=
-github.com/vektah/gqlparser/v2 v2.2.0/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4=
+github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4=
+github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs=
github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
@@ -1059,10 +1088,12 @@ github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
-github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w=
github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
-github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc=
+github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E=
+github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g=
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
+github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs=
+github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
@@ -1070,6 +1101,8 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofm
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk=
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4=
@@ -1077,9 +1110,9 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
@@ -1093,20 +1126,55 @@ go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R7
go.mongodb.org/mongo-driver v1.7.4/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg=
go.mongodb.org/mongo-driver v1.8.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.mongodb.org/mongo-driver v1.8.2/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
-go.mongodb.org/mongo-driver v1.8.3 h1:TDKlTkGDKm9kkJVUOAXDK5/fkqKHJVwYQSpoRfB43R4=
go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.8.4/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.10.1/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8=
+go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
+go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
+go.mongodb.org/mongo-driver v1.11.2 h1:+1v2rDQUWNcGW7/7E0Jvdz51V38XXxJfhzbV17aNHCw=
+go.mongodb.org/mongo-driver v1.11.2/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8=
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
-go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
-go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
+go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
+go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
+go.opentelemetry.io/contrib v1.10.0 h1:RczVFZu4UDkHjx0ErqGMV9fT/96knz7ZMu6ljFMzesg=
+go.opentelemetry.io/contrib v1.10.0/go.mod h1:yp0N4+hnpWCpnMzs6T6WbD9Amfg7reEZsS0jAd/5M2Q=
+go.opentelemetry.io/contrib/detectors/aws/ec2 v1.15.0 h1:IJb935+mApmqpqbS93EaUyWzUy0DmRjlXGs29cCAf1Y=
+go.opentelemetry.io/contrib/detectors/aws/ec2 v1.15.0/go.mod h1:xbIEqTzBFb73nKlBFeJJvwRKI8EDWIJNzM6VY72t1sw=
+go.opentelemetry.io/contrib/detectors/aws/ecs v1.15.0 h1:JxdEpFtJmjWJPPBNKDL1yWjAo5niU+J19JWI3Hndqz4=
+go.opentelemetry.io/contrib/detectors/aws/ecs v1.15.0/go.mod h1:w/ohtFImOLwwI25qtKm/N039Mn4zX1yiMPeWi+uPeD8=
+go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.40.0 h1:KToMJH0+5VxWBGtfeluRmWR3wLtE7nP+80YrxNI5FGs=
+go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.40.0/go.mod h1:RK3vgddjxVcF1q7IBVppzG6k2cW/NBnZHQ3X4g+EYBQ=
+go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk=
+go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek=
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.0 h1:ZSdnH1x5Gm/eUFNQquwSt4/LMCOqS6KPlI9qaTKx5Ho=
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.0/go.mod h1:uOTV75+LOzV+ODmL8ahRLWkFA3eQcSC2aAsbxIu4duk=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.0 h1:yrZB4yN5wfL3xYtpr7sToqg+d7we6JmmQKVUhwEiSCU=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.0/go.mod h1:QF3fAQsmF6UrxpgUelM4wxUkyBlyVoyj1Oi3BQ6/TuI=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.38.0 h1:VbOU5gwBVxCdavUhJrpvyMwrg3B0CvEwroh8IpBnuW4=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.38.0/go.mod h1:hg4ivadJqcdaFEUdPeuw7fdi06SHWD0tFE/T3j/8tq4=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.0 h1:rk5I7PaOk5NGQHfHR2Rz6MgdA8AYQSHwsigFsOxEC1c=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.0/go.mod h1:pvkFJxNUXyJ5i8u6m8NIcqkoOf/65VM2mSyBbBJfeVQ=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.0 h1:rHD0vfQbtki6/FnsMzTpAOgdv+Ku+T6R47MZXmgelf8=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.0/go.mod h1:RPagkaZrpwD+rSwQjzos6rBLsHOvenOqufCj4/7I46E=
+go.opentelemetry.io/otel/metric v0.38.0 h1:vv/Nv/44S3GzMMmeUhaesBKsAenE6xLkTVWL+zuv30w=
+go.opentelemetry.io/otel/metric v0.38.0/go.mod h1:uAtxN5hl8aXh5irD8afBtSwQU5Zjg64WWSz6KheZxBg=
+go.opentelemetry.io/otel/sdk v1.15.0 h1:jZTCkRRd08nxD6w7rIaZeDNGZGGQstH3SfLQ3ZsKICk=
+go.opentelemetry.io/otel/sdk v1.15.0/go.mod h1:XDEMrYWzJ4YlC17i6Luih2lwDw2j6G0PkUfr1ZqE+rQ=
+go.opentelemetry.io/otel/sdk/metric v0.38.0 h1:c/6/VZihe+5ink8ERufY1/o1QtnoON+k1YonZF2jYR4=
+go.opentelemetry.io/otel/sdk/metric v0.38.0/go.mod h1:tqrguFLaGJ3i+uyG67bzxJgsG6Y2bL6HmAn9V/cVRRo=
+go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo=
+go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw=
+go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -1121,7 +1189,6 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -1130,8 +1197,10 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
+golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1170,8 +1239,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
@@ -1180,11 +1247,13 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1223,43 +1292,32 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
-golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
+golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
+golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
+golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1271,8 +1329,10 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1282,7 +1342,6 @@ golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1316,7 +1375,6 @@ golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1336,7 +1394,6 @@ golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1347,42 +1404,41 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211031064116-611d5d643895/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1391,8 +1447,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1404,7 +1462,6 @@ golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@@ -1416,7 +1473,6 @@ golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
@@ -1454,33 +1510,27 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
-golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
-golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
+golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0=
-gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E=
gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA=
+gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o=
+gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY=
@@ -1502,21 +1552,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
-google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
-google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
-google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
-google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
-google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
-google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
-google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
-google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
-google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
-google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
-google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
-google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
-google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
-google.golang.org/api v0.60.0 h1:eq/zs5WPH4J9undYM9IP1O7dSr7Yh8Y0GtSCpzGzIUk=
-google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4=
+google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ=
+google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -1558,37 +1595,11 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
-google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
-google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
-google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
-google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
-google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
-google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
-google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
-google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk=
-google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
+google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -1605,24 +1616,19 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
-google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
-google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
-google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
+google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg=
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
+google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
+google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
+google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
+google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag=
+google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1635,8 +1641,11 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
+google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -1651,17 +1660,9 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
+gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
+gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
-gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
-gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
-gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM=
-gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
-gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI=
-gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
-gopkg.in/jcmturner/gokrb5.v6 v6.1.1 h1:n0KFjpbuM5pFMN38/Ay+Br3l91netGSVqHPHEXeWUqk=
-gopkg.in/jcmturner/gokrb5.v6 v6.1.1/go.mod h1:NFjHNLrHQiruory+EmqDXCGv6CrjkeYeA+bR9mIfNFk=
-gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
-gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
@@ -1682,8 +1683,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
@@ -1732,5 +1734,3 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
-sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
-sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k=
diff --git a/gqlgen.yml b/gqlgen.yml
index f159b957312..30fed5181bf 100644
--- a/gqlgen.yml
+++ b/gqlgen.yml
@@ -4,59 +4,267 @@
# for detailed .gqlgen.yml documentation.
schema:
- - graphql/schema.graphql
+ - graphql/schema/**/*.graphql
exec:
filename: graphql/generated.go
model:
filename: graphql/models_gen.go
resolver:
- filename: graphql/resolvers.go
- type: Resolver
+ layout: follow-schema
+ dir: graphql
+ filename_template: "{name}_resolver.go"
models:
+ Annotation:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotation
+ AWSConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIAWSConfig
+ AWSPodConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIAWSPodConfig
+ BannerTheme:
+ model: github.com/evergreen-ci/evergreen.BannerTheme
Build:
model: github.com/evergreen-ci/evergreen/rest/model.APIBuild
- VersionToRestart:
- model: github.com/evergreen-ci/evergreen/model.VersionToRestart
- SubscriptionInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APISubscription
- SelectorInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APISelector
- SubscriberInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APISubscriber
- StringMap:
- model: github.com/evergreen-ci/evergreen/graphql.StringMap
- Patch:
- model: github.com/evergreen-ci/evergreen/rest/model.APIPatch
- Parameter:
- model: github.com/evergreen-ci/evergreen/rest/model.APIParameter
- ParameterInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIParameter
- File:
- model: github.com/evergreen-ci/evergreen/rest/model.APIFile
- VariantTask:
- model: github.com/evergreen-ci/evergreen/rest/model.VariantTask
- VariantTaskInput:
- model: github.com/evergreen-ci/evergreen/rest/model.VariantTask
+ BuildBaronSettings:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIBuildBaronSettings
+ BuildBaronSettingsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIBuildBaronSettings
+ BuildVariantTuple:
+ model: github.com/evergreen-ci/evergreen/model/task.BuildVariantTuple
ChildPatch:
model: github.com/evergreen-ci/evergreen/rest/model.ChildPatch
ChildPatchAlias:
model: github.com/evergreen-ci/evergreen/rest/model.APIChildPatchAlias
- ModuleCodeChange:
- model: github.com/evergreen-ci/evergreen/rest/model.APIModulePatch
+ ClientBinary:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIClientBinary
+ ClientConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIClientConfig
+ CloudProviderConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APICloudProviders
+ CommitQueue:
+ model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueue
+ CommitQueueItem:
+ model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueItem
+ CommitQueueParams:
+ model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams
+ CommitQueueParamsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams
+ CopyProjectInput:
+ model: github.com/evergreen-ci/evergreen/rest/data.CopyProjectOpts
+ CreateProjectInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
+ DistroInfo:
+ model: github.com/evergreen-ci/evergreen/rest/model.DistroInfo
+ Distro:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIDistro
+ Duration:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIDuration
+ ECSConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIECSConfig
+ ExternalLink:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIExternalLink
+ ExternalLinkInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIExternalLink
+ File:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIFile
FileDiff:
model: github.com/evergreen-ci/evergreen/rest/model.FileDiff
- Volume:
- model: github.com/evergreen-ci/evergreen/rest/model.APIVolume
- Annotation:
- model: github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotation
- Note:
- model: github.com/evergreen-ci/evergreen/rest/model.APINote
- IssueLinkInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIIssueLink
+ GeneralSubscription:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISubscription
+ GithubCheckSubscriber:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIGithubCheckSubscriber
+ GithubProjectConflicts:
+ model: github.com/evergreen-ci/evergreen/model.GithubProjectConflicts
+ GithubPRSubscriber:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIGithubPRSubscriber
+ GithubUser:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIGithubUser
+ GithubUserInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIGithubUser
+ GroupedTaskStatusCount:
+ model: github.com/evergreen-ci/evergreen/model/task.GroupedTaskStatusCount
+ Host:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIHost
+ HostEventLogData:
+ model: github.com/evergreen-ci/evergreen/rest/model.HostAPIEventData
+ HostEventLogEntry:
+ model: github.com/evergreen-ci/evergreen/rest/model.HostAPIEventLogEntry
+ InstanceTag:
+ model: github.com/evergreen-ci/evergreen/model/host.Tag
+ InstanceTagInput:
+ model: github.com/evergreen-ci/evergreen/model/host.Tag
IssueLink:
model: github.com/evergreen-ci/evergreen/rest/model.APIIssueLink
+ IssueLinkInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIIssueLink
+ JiraConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIJiraConfig
+ JiraField:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIJiraField
+ JiraFieldInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIJiraField
+ JiraIssueSubscriber:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIJIRAIssueSubscriber
+ JiraIssueSubscriberInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIJIRAIssueSubscriber
+ JiraStatus:
+ model: github.com/evergreen-ci/evergreen/thirdparty.JiraStatus
+ JiraTicket:
+ model: github.com/evergreen-ci/evergreen/thirdparty.JiraTicket
+ LogkeeperBuild:
+ model: github.com/evergreen-ci/plank.Build
+ LogkeeperTest:
+ model: github.com/evergreen-ci/plank.Test
+ LogMessage:
+ model: github.com/evergreen-ci/evergreen/apimodels.LogMessage
+ Module:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIModule
+ ModuleCodeChange:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIModulePatch
+ Note:
+ model: github.com/evergreen-ci/evergreen/rest/model.APINote
+ Notifications:
+ model: github.com/evergreen-ci/evergreen/rest/model.APINotificationPreferences
+ NotificationsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APINotificationPreferences
+ OomTrackerInfo:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIOomTrackerInfo
+ Parameter:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIParameter
+ ParameterInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIParameter
+ Patch:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPatch
+ fields:
+ projectIdentifier:
+ resolver: true
+ commitQueuePosition:
+ resolver: true
+ PatchTriggerAlias:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPatchTriggerDefinition
+ PatchTriggerAliasInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPatchTriggerDefinition
+ PeriodicBuild:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPeriodicBuildDefinition
+ PeriodicBuildInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPeriodicBuildDefinition
+ Permissions:
+ fields:
+ canCreateProject:
+ resolver: true
+ Pod:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPod
+ PodEventLogEntry:
+ model: github.com/evergreen-ci/evergreen/rest/model.PodAPIEventLogEntry
+ PodEventLogData:
+ model: github.com/evergreen-ci/evergreen/rest/model.PodAPIEventData
+ Project:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
+ fields:
+ patches:
+ resolver: true
+ ProjectAlias:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectAlias
+ ProjectAliasInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectAlias
+ ProjectBanner:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectBanner
+ ProjectBannerInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectBanner
+ ProjectEventLogEntry:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEvent
+ ProjectEventSettings:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEventSettings
+ fields:
+ projectSubscriptions:
+ resolver: true
+ ProjectInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
+ ProjectSettings:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
+ fields:
+ githubWebhooksEnabled:
+ resolver: true
+ vars:
+ resolver: true
+ aliases:
+ resolver: true
+ projectSubscriptions:
+ resolver: true
+ subscriptions:
+ resolver: true
+ ProjectSettingsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
+ ProjectSubscription:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISubscription
+ ProjectVars:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectVars
+ fields:
+ privateVars:
+ resolver: true
+ adminOnlyVars:
+ resolver: true
+ ProjectVarsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectVars
+ PublicKey:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPubKey
+ RepoCommitQueueParams:
+ model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams
+ RepoEventLogEntry:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEvent
+ RepoEventSettings:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEventSettings
+ RepoRef:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
+ RepoRefInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
+ RepoSettings:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
+ fields:
+ githubWebhooksEnabled:
+ resolver: true
+ vars:
+ resolver: true
+ aliases:
+ resolver: true
+ projectSubscriptions:
+ resolver: true
+ subscriptions:
+ resolver: true
+ RepoSettingsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
+ RepoTaskSyncOptions:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITaskSyncOptions
+ RepoWorkstationConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig
+ SearchReturnInfo:
+ model: github.com/evergreen-ci/evergreen/thirdparty.SearchReturnInfo
+ Selector:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISelector
+ SelectorInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISelector
+ SiteBanner:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIBanner
Source:
model: github.com/evergreen-ci/evergreen/rest/model.APISource
+ SpawnHostConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISpawnHostConfig
+ SpruceConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIAdminSettings
+ SlackConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISlackConfig
+ StatusCount:
+ model: github.com/evergreen-ci/evergreen/model/task.StatusCount
+ StringMap:
+ model: github.com/evergreen-ci/evergreen/graphql.StringMap
+ SubscriberInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISubscriber
+ SubscriberWrapper:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISubscriber
+ fields:
+ subscriber:
+ resolver: true
+ SubscriptionInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APISubscription
Task:
model: github.com/evergreen-ci/evergreen/rest/model.APITask
fields:
@@ -92,262 +300,111 @@ models:
resolver: true
project:
resolver: true
- BaseTaskInfo:
- model: github.com/evergreen-ci/evergreen/rest/model.APIBaseTaskInfo
- TaskLogLinks:
- model: github.com/evergreen-ci/evergreen/rest/model.LogLinks
+ TaskAnnotationSettings:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotationSettings
+ TaskAnnotationSettingsInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotationSettings
+ TaskContainerCreationOpts:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIPodTaskContainerCreationOptions
TaskEndDetail:
model: github.com/evergreen-ci/evergreen/rest/model.ApiTaskEndDetail
- OomTrackerInfo:
- model: github.com/evergreen-ci/evergreen/rest/model.APIOomTrackerInfo
- TestResult:
- model: github.com/evergreen-ci/evergreen/rest/model.APITest
- TestLog:
- model: github.com/evergreen-ci/evergreen/rest/model.TestLogs
- Duration:
- model: github.com/evergreen-ci/evergreen/rest/model.APIDuration
- ProjectEventSettings:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEventSettings
- RepoEventSettings:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEventSettings
- ProjectEventLogEntry:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEvent
- RepoEventLogEntry:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectEvent
- ProjectSettings:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
- fields:
- githubWebhooksEnabled:
- resolver: true
- vars:
- resolver: true
- aliases:
- resolver: true
- subscriptions:
- resolver: true
- RepoSettings:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
+ TaskEventLogData:
+ model: github.com/evergreen-ci/evergreen/rest/model.TaskEventData
+ TaskEventLogEntry:
+ model: github.com/evergreen-ci/evergreen/rest/model.TaskAPIEventLogEntry
+ TaskInfo:
+ model: github.com/evergreen-ci/evergreen/rest/model.TaskInfo
+ MetadataLink:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIMetadataLink
+ MetadataLinkInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIMetadataLink
+ TaskLogLinks:
+ model: github.com/evergreen-ci/evergreen/rest/model.LogLinks
+ TaskLogs:
fields:
- githubWebhooksEnabled:
+ eventLogs:
resolver: true
- vars:
+ taskLogs:
resolver: true
- aliases:
+ systemLogs:
resolver: true
- subscriptions:
+ agentLogs:
resolver: true
- ProjectSettingsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
- RepoSettingsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectSettings
- Project:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
- fields:
- patches:
+ allLogs:
resolver: true
- RepoRef:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
- CreateProjectInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
- ProjectInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
- RepoRefInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectRef
- CopyProjectInput:
- model: github.com/evergreen-ci/evergreen/rest/data.CopyProjectOpts
- CommitQueueParams:
- model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams
- RepoCommitQueueParams:
- model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams
- CommitQueueParamsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams
- PatchTriggerAlias:
- model: github.com/evergreen-ci/evergreen/rest/model.APIPatchTriggerDefinition
- PatchTriggerAliasInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIPatchTriggerDefinition
- BuildBaronSettings:
- model: github.com/evergreen-ci/evergreen/rest/model.APIBuildBaronSettings
- BuildBaronSettingsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIBuildBaronSettings
- TaskAnnotationSettings:
- model: github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotationSettings
- TaskAnnotationSettingsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotationSettings
- JiraField:
- model: github.com/evergreen-ci/evergreen/rest/model.APIJiraField
- JiraFieldInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIJiraField
- Webhook:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWebHook
- WebhookInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWebHook
TaskSpecifier:
model: github.com/evergreen-ci/evergreen/rest/model.APITaskSpecifier
TaskSpecifierInput:
model: github.com/evergreen-ci/evergreen/rest/model.APITaskSpecifier
- TriggerAlias:
- model: github.com/evergreen-ci/evergreen/rest/model.APITriggerDefinition
- TriggerAliasInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APITriggerDefinition
- PeriodicBuild:
- model: github.com/evergreen-ci/evergreen/rest/model.APIPeriodicBuildDefinition
- PeriodicBuildInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIPeriodicBuildDefinition
+ TaskStats:
+ model: github.com/evergreen-ci/evergreen/model/task.TaskStats
TaskSyncOptions:
model: github.com/evergreen-ci/evergreen/rest/model.APITaskSyncOptions
- RepoTaskSyncOptions:
- model: github.com/evergreen-ci/evergreen/rest/model.APITaskSyncOptions
TaskSyncOptionsInput:
model: github.com/evergreen-ci/evergreen/rest/model.APITaskSyncOptions
- WorkstationConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig
- RepoWorkstationConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig
- WorkstationConfigInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig
- WorkstationSetupCommand:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationSetupCommand
- WorkstationSetupCommandInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationSetupCommand
- ProjectVars:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectVars
- fields:
- privateVars:
- resolver: true
- adminOnlyVars:
- resolver: true
- ProjectVarsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectVars
- ProjectAlias:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectAlias
- ProjectAliasInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIProjectAlias
- ProjectSubscription:
- model: github.com/evergreen-ci/evergreen/rest/model.APISubscription
- ProjectSubscriber:
- model: github.com/evergreen-ci/evergreen/rest/model.APISubscriber
- fields:
- subscriber:
- resolver: true
- GithubPRSubscriber:
- model: github.com/evergreen-ci/evergreen/rest/model.APIGithubPRSubscriber
- GithubCheckSubscriber:
- model: github.com/evergreen-ci/evergreen/rest/model.APIGithubCheckSubscriber
- WebhookSubscriber:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWebhookSubscriber
- WebhookHeader:
- model: github.com/evergreen-ci/evergreen/rest/model.APIWebhookHeader
- JiraIssueSubscriber:
- model: github.com/evergreen-ci/evergreen/rest/model.APIJIRAIssueSubscriber
- Selector:
- model: github.com/evergreen-ci/evergreen/rest/model.APISelector
+ TaskQueueItem:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITaskQueueItem
+ TicketFields:
+ model: github.com/evergreen-ci/evergreen/thirdparty.TicketFields
+ TestLog:
+ model: github.com/evergreen-ci/evergreen/rest/model.TestLogs
+ TestResult:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITest
+ ContainerResources:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIContainerResources
+ ContainerResourcesInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIContainerResources
+ TriggerAlias:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITriggerDefinition
+ TriggerAliasInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APITriggerDefinition
+ UIConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIUIConfig
User:
model: github.com/evergreen-ci/evergreen/rest/model.APIDBUser
fields:
patches:
resolver: true
- TaskEventLogEntry:
- model: github.com/evergreen-ci/evergreen/rest/model.TaskAPIEventLogEntry
- TaskEventLogData:
- model: github.com/evergreen-ci/evergreen/rest/model.TaskEventData
- LogMessage:
- model: github.com/evergreen-ci/evergreen/apimodels.LogMessage
- CommitQueue:
- model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueue
- CommitQueueItem:
- model: github.com/evergreen-ci/evergreen/rest/model.APICommitQueueItem
- Module:
- model: github.com/evergreen-ci/evergreen/rest/model.APIModule
+ subscriptions:
+ resolver: true
UserSettings:
model: github.com/evergreen-ci/evergreen/rest/model.APIUserSettings
- Notifications:
- model: github.com/evergreen-ci/evergreen/rest/model.APINotificationPreferences
- GithubUser:
- model: github.com/evergreen-ci/evergreen/rest/model.APIGithubUser
UserSettingsInput:
model: github.com/evergreen-ci/evergreen/rest/model.APIUserSettings
- NotificationsInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APINotificationPreferences
- GithubUserInput:
- model: github.com/evergreen-ci/evergreen/rest/model.APIGithubUser
- GithubProjectConflicts:
- model: github.com/evergreen-ci/evergreen/model.GithubProjectConflicts
- ClientConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIClientConfig
- ClientBinary:
- model: github.com/evergreen-ci/evergreen/rest/model.APIClientBinary
UseSpruceOptions:
model: github.com/evergreen-ci/evergreen/rest/model.APIUseSpruceOptions
UseSpruceOptionsInput:
model: github.com/evergreen-ci/evergreen/rest/model.APIUseSpruceOptions
- SiteBanner:
- model: github.com/evergreen-ci/evergreen/rest/model.APIBanner
- Host:
- model: github.com/evergreen-ci/evergreen/rest/model.APIHost
- HostEventLogEntry:
- model: github.com/evergreen-ci/evergreen/rest/model.HostAPIEventLogEntry
- HostEventLogData:
- model: github.com/evergreen-ci/evergreen/rest/model.HostAPIEventData
- TaskInfo:
- model: github.com/evergreen-ci/evergreen/rest/model.TaskInfo
- InstanceTag:
- model: github.com/evergreen-ci/evergreen/model/host.Tag
- InstanceTagInput:
- model: github.com/evergreen-ci/evergreen/model/host.Tag
- PublicKey:
- model: github.com/evergreen-ci/evergreen/rest/model.APIPubKey
- DistroInfo:
- model: github.com/evergreen-ci/evergreen/rest/model.DistroInfo
- Distro:
- model: github.com/evergreen-ci/evergreen/rest/model.APIDistro
- TaskQueueItem:
- model: github.com/evergreen-ci/evergreen/rest/model.APITaskQueueItem
- SearchReturnInfo:
- model: github.com/evergreen-ci/evergreen/thirdparty.SearchReturnInfo
- JiraTicket:
- model: github.com/evergreen-ci/evergreen/thirdparty.JiraTicket
- TicketFields:
- model: github.com/evergreen-ci/evergreen/thirdparty.TicketFields
- JiraStatus:
- model: github.com/evergreen-ci/evergreen/thirdparty.JiraStatus
- SpruceConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIAdminSettings
- UIConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIUIConfig
- JiraConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIJiraConfig
- CloudProviderConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APICloudProviders
- AWSConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APIAWSConfig
- SpawnHostConfig:
- model: github.com/evergreen-ci/evergreen/rest/model.APISpawnHostConfig
+ VariantTask:
+ model: github.com/evergreen-ci/evergreen/rest/model.VariantTask
+ VariantTaskInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.VariantTask
Version:
model: github.com/evergreen-ci/evergreen/rest/model.APIVersion
fields:
status:
resolver: true
- BuildVariantTuple:
- model: github.com/evergreen-ci/evergreen/model/task.BuildVariantTuple
- StatusCount:
- model: github.com/evergreen-ci/evergreen/model/task.StatusCount
- TaskStats:
- model: github.com/evergreen-ci/evergreen/model/task.TaskStats
- GroupedTaskStatusCount:
- model: github.com/evergreen-ci/evergreen/model/task.GroupedTaskStatusCount
- TaskLogs:
- fields:
- eventLogs:
- resolver: true
- taskLogs:
- resolver: true
- systemLogs:
- resolver: true
- agentLogs:
- resolver: true
- allLogs:
- resolver: true
- Permissions:
- fields:
- canCreateProject:
- resolver: true
\ No newline at end of file
+ VersionToRestart:
+ model: github.com/evergreen-ci/evergreen/model.VersionToRestart
+ Volume:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIVolume
+ Webhook:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWebHook
+ WebhookHeader:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWebhookHeader
+ WebhookHeaderInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWebhookHeader
+ WebhookInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWebHook
+ WebhookSubscriber:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWebhookSubscriber
+ WebhookSubscriberInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWebhookSubscriber
+ WorkstationConfig:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig
+ WorkstationConfigInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig
+ WorkstationSetupCommand:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationSetupCommand
+ WorkstationSetupCommandInput:
+ model: github.com/evergreen-ci/evergreen/rest/model.APIWorkstationSetupCommand
diff --git a/graphql/annotation_resolver.go b/graphql/annotation_resolver.go
new file mode 100644
index 00000000000..7c229fc41d0
--- /dev/null
+++ b/graphql/annotation_resolver.go
@@ -0,0 +1,31 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/task"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+)
+
+// WebhookConfigured is the resolver for the webhookConfigured field.
+func (r *annotationResolver) WebhookConfigured(ctx context.Context, obj *restModel.APITaskAnnotation) (bool, error) {
+ t, err := task.FindOneId(*obj.TaskId)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding task: %s", err.Error()))
+ }
+ if t == nil {
+ return false, ResourceNotFound.Send(ctx, "error finding task for the task annotation")
+ }
+ _, ok, _ := model.IsWebhookConfigured(t.Project, t.Version)
+ return ok, nil
+}
+
+// Annotation returns AnnotationResolver implementation.
+func (r *Resolver) Annotation() AnnotationResolver { return &annotationResolver{r} }
+
+type annotationResolver struct{ *Resolver }
diff --git a/graphql/directive_test.go b/graphql/directive_test.go
index bb618249438..031edf9b3b7 100644
--- a/graphql/directive_test.go
+++ b/graphql/directive_test.go
@@ -4,18 +4,21 @@ import (
"context"
"testing"
+ "github.com/99designs/gqlgen/graphql"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/user"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/gimlet"
+ "github.com/evergreen-ci/utility"
"github.com/stretchr/testify/require"
+ "github.com/vektah/gqlparser/v2/ast"
)
func init() {
testutil.Setup()
-
}
func setupPermissions(t *testing.T) {
@@ -23,11 +26,6 @@ func setupPermissions(t *testing.T) {
ctx := context.Background()
require.NoError(t, env.DB().Drop(ctx))
- // TODO (EVG-15499): Create scope and role collection because the
- // RoleManager will try inserting in a transaction, which is not allowed for
- // FCV < 4.4.
- require.NoError(t, db.CreateCollections(evergreen.ScopeCollection, evergreen.RoleCollection))
-
roleManager := env.RoleManager()
roles, err := roleManager.GetAllRoles()
@@ -38,7 +36,7 @@ func setupPermissions(t *testing.T) {
ID: "superuser",
Name: "superuser",
Scope: "superuser_scope",
- Permissions: map[string]int{"admin_settings": 10, "project_create": 10, "distro_create": 10, "modify_roles": 10},
+ Permissions: map[string]int{"project_create": 10, "distro_create": 10, "modify_roles": 10},
}
err = roleManager.UpdateRole(superUserRole)
require.NoError(t, err)
@@ -78,8 +76,19 @@ func setupPermissions(t *testing.T) {
require.NoError(t, err)
}
-func TestRequireSuperUser(t *testing.T) {
+func TestCanCreateProject(t *testing.T) {
setupPermissions(t)
+ require.NoError(t, db.Clear(user.Collection),
+ "unable to clear user collection")
+ dbUser := &user.DBUser{
+ Id: apiUser,
+ Settings: user.UserSettings{
+ SlackUsername: "testuser",
+ SlackMemberId: "testuser",
+ },
+ }
+ require.NoError(t, dbUser.Insert())
+
const email = "testuser@mongodb.com"
const accessToken = "access_token"
const refreshToken = "refresh_token"
@@ -103,7 +112,7 @@ func TestRequireSuperUser(t *testing.T) {
ctx = gimlet.AttachUser(ctx, usr)
require.NotNil(t, ctx)
- res, err := config.Directives.RequireSuperUser(ctx, obj, next)
+ res, err := config.Directives.CanCreateProject(ctx, obj, next)
require.Error(t, err, "user testuser does not have permission to access this resolver")
require.Nil(t, res)
require.Equal(t, 0, callCount)
@@ -111,13 +120,61 @@ func TestRequireSuperUser(t *testing.T) {
err = usr.AddRole("superuser")
require.NoError(t, err)
- res, err = config.Directives.RequireSuperUser(ctx, obj, next)
+ res, err = config.Directives.CanCreateProject(ctx, obj, next)
require.NoError(t, err)
require.Nil(t, res)
require.Equal(t, 1, callCount)
+
+ err = usr.RemoveRole("superuser")
+ require.NoError(t, err)
+
+ err = usr.AddRole("admin_project")
+ require.NoError(t, err)
+
+ obj = map[string]interface{}{
+ "project": map[string]interface{}{
+ "identifier": "anything",
+ },
+ }
+ res, err = config.Directives.CanCreateProject(ctx, obj, next)
+ require.NoError(t, err)
+ require.Nil(t, res)
+ require.Equal(t, 2, callCount)
+
+ // Should error if you are not an admin of project to copy
+ obj = map[string]interface{}{
+ "project": map[string]interface{}{
+ "projectIdToCopy": "anything",
+ },
+ }
+ res, err = config.Directives.CanCreateProject(ctx, obj, next)
+ require.EqualError(t, err, "input: user testuser does not have permission to access this resolver")
+ require.Nil(t, res)
+ require.Equal(t, 2, callCount)
+
+ obj = map[string]interface{}{
+ "project": map[string]interface{}{
+ "projectIdToCopy": "project_id",
+ },
+ }
+ res, err = config.Directives.CanCreateProject(ctx, obj, next)
+ require.NoError(t, err)
+ require.Nil(t, res)
+ require.Equal(t, 3, callCount)
+
}
-func setupUser() (*user.DBUser, error) {
+func setupUser(t *testing.T) (*user.DBUser, error) {
+ require.NoError(t, db.Clear(user.Collection),
+ "unable to clear user collection")
+ dbUser := &user.DBUser{
+ Id: apiUser,
+ Settings: user.UserSettings{
+ SlackUsername: "testuser",
+ SlackMemberId: "testuser",
+ },
+ }
+ require.NoError(t, dbUser.Insert())
const email = "testuser@mongodb.com"
const accessToken = "access_token"
const refreshToken = "refresh_token"
@@ -139,7 +196,7 @@ func TestRequireProjectAccess(t *testing.T) {
return nil, nil
}
- usr, err := setupUser()
+ usr, err := setupUser(t)
require.NoError(t, err)
require.NotNil(t, usr)
@@ -221,3 +278,64 @@ func TestRequireProjectAccess(t *testing.T) {
require.Nil(t, res)
require.Equal(t, 4, callCount)
}
+
+func TestRequireProjectFieldAccess(t *testing.T) {
+ setupPermissions(t)
+ config := New("/graphql")
+ require.NotNil(t, config)
+ ctx := context.Background()
+
+ // callCount keeps track of how many times the function is called
+ callCount := 0
+ next := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ callCount++
+ return nil, nil
+ }
+
+ usr, err := setupUser(t)
+ require.NoError(t, err)
+ require.NotNil(t, usr)
+
+ ctx = gimlet.AttachUser(ctx, usr)
+ require.NotNil(t, ctx)
+
+ apiProjectRef := &restModel.APIProjectRef{
+ Identifier: utility.ToStringPtr("project_identifier"),
+ Admins: utility.ToStringPtrSlice([]string{"admin_1", "admin_2", "admin_3"}),
+ }
+
+ fieldCtx := &graphql.FieldContext{
+ Field: graphql.CollectedField{
+ Field: &ast.Field{
+ Alias: "admins",
+ },
+ },
+ }
+ ctx = graphql.WithFieldContext(ctx, fieldCtx)
+
+ res, err := config.Directives.RequireProjectFieldAccess(ctx, interface{}(nil), next)
+ require.EqualError(t, err, "input: project not valid")
+ require.Nil(t, res)
+ require.Equal(t, 0, callCount)
+
+ res, err = config.Directives.RequireProjectFieldAccess(ctx, apiProjectRef, next)
+ require.EqualError(t, err, "input: project not specified")
+ require.Nil(t, res)
+ require.Equal(t, 0, callCount)
+
+ apiProjectRef.Id = utility.ToStringPtr("project_id")
+
+ res, err = config.Directives.RequireProjectFieldAccess(ctx, apiProjectRef, next)
+ require.EqualError(t, err, "input: user does not have permission to access the field 'admins' for project with ID 'project_id'")
+ require.Nil(t, res)
+ require.Equal(t, 0, callCount)
+
+ err = usr.AddRole("view_project")
+ require.NoError(t, err)
+
+ res, err = config.Directives.RequireProjectFieldAccess(ctx, apiProjectRef, next)
+ require.NoError(t, err)
+ require.Nil(t, res)
+ require.Equal(t, 1, callCount)
+}
diff --git a/graphql/generated.go b/graphql/generated.go
index f133939e71c..fc126f8dcf3 100644
--- a/graphql/generated.go
+++ b/graphql/generated.go
@@ -5,6 +5,7 @@ package graphql
import (
"bytes"
"context"
+ "embed"
"errors"
"fmt"
"strconv"
@@ -14,6 +15,7 @@ import (
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
+ "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/apimodels"
model1 "github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/host"
@@ -21,6 +23,7 @@ import (
"github.com/evergreen-ci/evergreen/rest/data"
"github.com/evergreen-ci/evergreen/rest/model"
"github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/plank"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
)
@@ -46,33 +49,44 @@ type ResolverRoot interface {
Annotation() AnnotationResolver
Host() HostResolver
IssueLink() IssueLinkResolver
+ LogkeeperBuild() LogkeeperBuildResolver
Mutation() MutationResolver
Patch() PatchResolver
Permissions() PermissionsResolver
+ Pod() PodResolver
+ PodEventLogData() PodEventLogDataResolver
Project() ProjectResolver
+ ProjectEventSettings() ProjectEventSettingsResolver
ProjectSettings() ProjectSettingsResolver
- ProjectSubscriber() ProjectSubscriberResolver
ProjectVars() ProjectVarsResolver
Query() QueryResolver
- RepoRef() RepoRefResolver
RepoSettings() RepoSettingsResolver
+ SubscriberWrapper() SubscriberWrapperResolver
Task() TaskResolver
+ TaskContainerCreationOpts() TaskContainerCreationOptsResolver
TaskLogs() TaskLogsResolver
TaskQueueItem() TaskQueueItemResolver
TicketFields() TicketFieldsResolver
User() UserResolver
Version() VersionResolver
Volume() VolumeResolver
+ SubscriberInput() SubscriberInputResolver
}
type DirectiveRoot struct {
- RequireProjectAccess func(ctx context.Context, obj interface{}, next graphql.Resolver, access ProjectSettingsAccess) (res interface{}, err error)
- RequireSuperUser func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
+ CanCreateProject func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
+ RequireProjectAccess func(ctx context.Context, obj interface{}, next graphql.Resolver, access ProjectSettingsAccess) (res interface{}, err error)
+ RequireProjectFieldAccess func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}
type ComplexityRoot struct {
AWSConfig struct {
MaxVolumeSizePerUser func(childComplexity int) int
+ Pod func(childComplexity int) int
+ }
+
+ AWSPodConfig struct {
+ ECS func(childComplexity int) int
}
AbortInfo struct {
@@ -88,6 +102,7 @@ type ComplexityRoot struct {
CreatedIssues func(childComplexity int) int
Id func(childComplexity int) int
Issues func(childComplexity int) int
+ MetadataLinks func(childComplexity int) int
Note func(childComplexity int) int
SuspectedIssues func(childComplexity int) int
TaskExecution func(childComplexity int) int
@@ -95,16 +110,6 @@ type ComplexityRoot struct {
WebhookConfigured func(childComplexity int) int
}
- BaseTaskInfo struct {
- Id func(childComplexity int) int
- Status func(childComplexity int) int
- }
-
- BaseTaskResult struct {
- ID func(childComplexity int) int
- Status func(childComplexity int) int
- }
-
Build struct {
ActualMakespan func(childComplexity int) int
BuildVariant func(childComplexity int) int
@@ -173,10 +178,15 @@ type ComplexityRoot struct {
}
CommitQueueParams struct {
- Enabled func(childComplexity int) int
- MergeMethod func(childComplexity int) int
- Message func(childComplexity int) int
- RequireSigned func(childComplexity int) int
+ Enabled func(childComplexity int) int
+ MergeMethod func(childComplexity int) int
+ Message func(childComplexity int) int
+ }
+
+ ContainerResources struct {
+ CPU func(childComplexity int) int
+ MemoryMB func(childComplexity int) int
+ Name func(childComplexity int) int
}
Dependency struct {
@@ -204,6 +214,21 @@ type ComplexityRoot struct {
WorkDir func(childComplexity int) int
}
+ ECSConfig struct {
+ MaxCPU func(childComplexity int) int
+ MaxMemoryMB func(childComplexity int) int
+ }
+
+ ExternalLink struct {
+ DisplayName func(childComplexity int) int
+ URLTemplate func(childComplexity int) int
+ }
+
+ ExternalLinkForMetadata struct {
+ DisplayName func(childComplexity int) int
+ URL func(childComplexity int) int
+ }
+
File struct {
Link func(childComplexity int) int
Name func(childComplexity int) int
@@ -218,6 +243,17 @@ type ComplexityRoot struct {
FileName func(childComplexity int) int
}
+ GeneralSubscription struct {
+ ID func(childComplexity int) int
+ OwnerType func(childComplexity int) int
+ RegexSelectors func(childComplexity int) int
+ ResourceType func(childComplexity int) int
+ Selectors func(childComplexity int) int
+ Subscriber func(childComplexity int) int
+ Trigger func(childComplexity int) int
+ TriggerData func(childComplexity int) int
+ }
+
GithubCheckSubscriber struct {
Owner func(childComplexity int) int
Ref func(childComplexity int) int
@@ -255,7 +291,6 @@ type ComplexityRoot struct {
GroupedProjects struct {
GroupDisplayName func(childComplexity int) int
- Name func(childComplexity int) int
Projects func(childComplexity int) int
Repo func(childComplexity int) int
}
@@ -267,6 +302,7 @@ type ComplexityRoot struct {
}
Host struct {
+ Ami func(childComplexity int) int
AvailabilityZone func(childComplexity int) int
DisplayName func(childComplexity int) int
Distro func(childComplexity int) int
@@ -378,6 +414,26 @@ type ComplexityRoot struct {
Version func(childComplexity int) int
}
+ LogkeeperBuild struct {
+ BuildNum func(childComplexity int) int
+ Builder func(childComplexity int) int
+ ID func(childComplexity int) int
+ Task func(childComplexity int) int
+ TaskExecution func(childComplexity int) int
+ TaskID func(childComplexity int) int
+ Tests func(childComplexity int) int
+ }
+
+ LogkeeperTest struct {
+ BuildID func(childComplexity int) int
+ Command func(childComplexity int) int
+ ID func(childComplexity int) int
+ Name func(childComplexity int) int
+ Phase func(childComplexity int) int
+ TaskExecution func(childComplexity int) int
+ TaskID func(childComplexity int) int
+ }
+
MainlineCommitVersion struct {
RolledUpVersions func(childComplexity int) int
Version func(childComplexity int) int
@@ -399,6 +455,12 @@ type ComplexityRoot struct {
Revision func(childComplexity int) int
}
+ MetadataLink struct {
+ Source func(childComplexity int) int
+ Text func(childComplexity int) int
+ URL func(childComplexity int) int
+ }
+
Module struct {
Issue func(childComplexity int) int
Module func(childComplexity int) int
@@ -420,10 +482,10 @@ type ComplexityRoot struct {
AttachVolumeToHost func(childComplexity int, volumeAndHost VolumeHost) int
BbCreateTicket func(childComplexity int, taskID string, execution *int) int
ClearMySubscriptions func(childComplexity int) int
- CopyProject func(childComplexity int, project data.CopyProjectOpts) int
- CreateProject func(childComplexity int, project model.APIProjectRef) int
+ CopyProject func(childComplexity int, project data.CopyProjectOpts, requestS3Creds *bool) int
+ CreateProject func(childComplexity int, project model.APIProjectRef, requestS3Creds *bool) int
CreatePublicKey func(childComplexity int, publicKeyInput PublicKeyInput) int
- DeactivateStepbackTasks func(childComplexity int, projectID string) int
+ DeactivateStepbackTask func(childComplexity int, projectID string, buildVariantName string, taskName string) int
DefaultSectionToRepo func(childComplexity int, projectID string, section ProjectSettingsSection) int
DetachProjectFromRepo func(childComplexity int, projectID string) int
DetachVolumeFromHost func(childComplexity int, volumeID string) int
@@ -431,8 +493,10 @@ type ComplexityRoot struct {
EditSpawnHost func(childComplexity int, spawnHost *EditSpawnHostInput) int
EnqueuePatch func(childComplexity int, patchID string, commitMessage *string) int
ForceRepotrackerRun func(childComplexity int, projectID string) int
+ MigrateVolume func(childComplexity int, volumeID string, spawnHostInput *SpawnHostInput) int
MoveAnnotationIssue func(childComplexity int, taskID string, execution int, apiIssue model.APIIssueLink, isIssue bool) int
OverrideTaskDependencies func(childComplexity int, taskID string) int
+ PromoteVarsToRepo func(childComplexity int, projectID string, varNames []string) int
RemoveAnnotationIssue func(childComplexity int, taskID string, execution int, apiIssue model.APIIssueLink, isIssue bool) int
RemoveFavoriteProject func(childComplexity int, identifier string) int
RemoveItemFromCommitQueue func(childComplexity int, commitQueueID string, issue string) int
@@ -440,7 +504,7 @@ type ComplexityRoot struct {
RemoveVolume func(childComplexity int, volumeID string) int
ReprovisionToNew func(childComplexity int, hostIds []string) int
RestartJasper func(childComplexity int, hostIds []string) int
- RestartTask func(childComplexity int, taskID string) int
+ RestartTask func(childComplexity int, taskID string, failedOnly bool) int
RestartVersions func(childComplexity int, versionID string, abort bool, versionsToRestart []*model1.VersionToRestart) int
SaveProjectSettingsForSection func(childComplexity int, projectSettings *model.APIProjectSettings, section ProjectSettingsSection) int
SaveRepoSettingsForSection func(childComplexity int, repoSettings *model.APIProjectSettings, section ProjectSettingsSection) int
@@ -449,6 +513,7 @@ type ComplexityRoot struct {
SchedulePatchTasks func(childComplexity int, patchID string) int
ScheduleTasks func(childComplexity int, taskIds []string) int
ScheduleUndispatchedBaseTasks func(childComplexity int, patchID string) int
+ SetAnnotationMetadataLinks func(childComplexity int, taskID string, execution int, metadataLinks []*model.APIMetadataLink) int
SetPatchPriority func(childComplexity int, patchID string, priority int) int
SetTaskPriority func(childComplexity int, taskID string, priority int) int
SpawnHost func(childComplexity int, spawnHostInput *SpawnHostInput) int
@@ -492,7 +557,6 @@ type ComplexityRoot struct {
Author func(childComplexity int) int
AuthorDisplayName func(childComplexity int) int
BaseTaskStatuses func(childComplexity int) int
- BaseVersionID func(childComplexity int) int
Builds func(childComplexity int) int
CanEnqueueToCommitQueue func(childComplexity int) int
ChildPatchAliases func(childComplexity int) int
@@ -510,6 +574,7 @@ type ComplexityRoot struct {
Project func(childComplexity int) int
ProjectId func(childComplexity int) int
ProjectIdentifier func(childComplexity int) int
+ ProjectMetadata func(childComplexity int) int
Status func(childComplexity int) int
TaskCount func(childComplexity int) int
TaskStatuses func(childComplexity int) int
@@ -530,11 +595,6 @@ type ComplexityRoot struct {
Variants func(childComplexity int) int
}
- PatchTasks struct {
- Count func(childComplexity int) int
- Tasks func(childComplexity int) int
- }
-
PatchTime struct {
Finished func(childComplexity int) int
Started func(childComplexity int) int
@@ -570,52 +630,86 @@ type ComplexityRoot struct {
UserID func(childComplexity int) int
}
+ Pod struct {
+ Events func(childComplexity int, limit *int, page *int) int
+ ID func(childComplexity int) int
+ Status func(childComplexity int) int
+ Task func(childComplexity int) int
+ TaskContainerCreationOpts func(childComplexity int) int
+ Type func(childComplexity int) int
+ }
+
+ PodEventLogData struct {
+ NewStatus func(childComplexity int) int
+ OldStatus func(childComplexity int) int
+ Reason func(childComplexity int) int
+ Task func(childComplexity int) int
+ TaskExecution func(childComplexity int) int
+ TaskID func(childComplexity int) int
+ TaskStatus func(childComplexity int) int
+ }
+
+ PodEventLogEntry struct {
+ Data func(childComplexity int) int
+ EventType func(childComplexity int) int
+ ID func(childComplexity int) int
+ ProcessedAt func(childComplexity int) int
+ ResourceId func(childComplexity int) int
+ ResourceType func(childComplexity int) int
+ Timestamp func(childComplexity int) int
+ }
+
+ PodEvents struct {
+ Count func(childComplexity int) int
+ EventLogEntries func(childComplexity int) int
+ }
+
Project struct {
- Admins func(childComplexity int) int
- BatchTime func(childComplexity int) int
- Branch func(childComplexity int) int
- BuildBaronSettings func(childComplexity int) int
- CedarTestResultsEnabled func(childComplexity int) int
- CommitQueue func(childComplexity int) int
- DeactivatePrevious func(childComplexity int) int
- DefaultLogger func(childComplexity int) int
- DisabledStatsCache func(childComplexity int) int
- DispatchingDisabled func(childComplexity int) int
- DisplayName func(childComplexity int) int
- Enabled func(childComplexity int) int
- FilesIgnoredFromCache func(childComplexity int) int
- GitTagAuthorizedTeams func(childComplexity int) int
- GitTagAuthorizedUsers func(childComplexity int) int
- GitTagVersionsEnabled func(childComplexity int) int
- GithubChecksEnabled func(childComplexity int) int
- GithubTriggerAliases func(childComplexity int) int
- Hidden func(childComplexity int) int
- Id func(childComplexity int) int
- Identifier func(childComplexity int) int
- IsFavorite func(childComplexity int) int
- ManualPRTestingEnabled func(childComplexity int) int
- NotifyOnBuildFailure func(childComplexity int) int
- Owner func(childComplexity int) int
- PRTestingEnabled func(childComplexity int) int
- PatchTriggerAliases func(childComplexity int) int
- Patches func(childComplexity int, patchesInput PatchesInput) int
- PatchingDisabled func(childComplexity int) int
- PerfEnabled func(childComplexity int) int
- PeriodicBuilds func(childComplexity int) int
- Private func(childComplexity int) int
- RemotePath func(childComplexity int) int
- Repo func(childComplexity int) int
- RepoRefId func(childComplexity int) int
- RepotrackerDisabled func(childComplexity int) int
- Restricted func(childComplexity int) int
- SpawnHostScriptPath func(childComplexity int) int
- TaskAnnotationSettings func(childComplexity int) int
- TaskSync func(childComplexity int) int
- TracksPushEvents func(childComplexity int) int
- Triggers func(childComplexity int) int
- ValidDefaultLoggers func(childComplexity int) int
- VersionControlEnabled func(childComplexity int) int
- WorkstationConfig func(childComplexity int) int
+ Admins func(childComplexity int) int
+ Banner func(childComplexity int) int
+ BatchTime func(childComplexity int) int
+ Branch func(childComplexity int) int
+ BuildBaronSettings func(childComplexity int) int
+ CommitQueue func(childComplexity int) int
+ ContainerSizeDefinitions func(childComplexity int) int
+ DeactivatePrevious func(childComplexity int) int
+ DisabledStatsCache func(childComplexity int) int
+ DispatchingDisabled func(childComplexity int) int
+ DisplayName func(childComplexity int) int
+ Enabled func(childComplexity int) int
+ ExternalLinks func(childComplexity int) int
+ GitTagAuthorizedTeams func(childComplexity int) int
+ GitTagAuthorizedUsers func(childComplexity int) int
+ GitTagVersionsEnabled func(childComplexity int) int
+ GithubChecksEnabled func(childComplexity int) int
+ GithubTriggerAliases func(childComplexity int) int
+ Hidden func(childComplexity int) int
+ Id func(childComplexity int) int
+ Identifier func(childComplexity int) int
+ IsFavorite func(childComplexity int) int
+ ManualPRTestingEnabled func(childComplexity int) int
+ NotifyOnBuildFailure func(childComplexity int) int
+ Owner func(childComplexity int) int
+ PRTestingEnabled func(childComplexity int) int
+ PatchTriggerAliases func(childComplexity int) int
+ Patches func(childComplexity int, patchesInput PatchesInput) int
+ PatchingDisabled func(childComplexity int) int
+ PerfEnabled func(childComplexity int) int
+ PeriodicBuilds func(childComplexity int) int
+ Private func(childComplexity int) int
+ RemotePath func(childComplexity int) int
+ Repo func(childComplexity int) int
+ RepoRefId func(childComplexity int) int
+ RepotrackerDisabled func(childComplexity int) int
+ Restricted func(childComplexity int) int
+ SpawnHostScriptPath func(childComplexity int) int
+ StepbackDisabled func(childComplexity int) int
+ TaskAnnotationSettings func(childComplexity int) int
+ TaskSync func(childComplexity int) int
+ TracksPushEvents func(childComplexity int) int
+ Triggers func(childComplexity int) int
+ VersionControlEnabled func(childComplexity int) int
+ WorkstationConfig func(childComplexity int) int
}
ProjectAlias struct {
@@ -629,6 +723,11 @@ type ComplexityRoot struct {
VariantTags func(childComplexity int) int
}
+ ProjectBanner struct {
+ Text func(childComplexity int) int
+ Theme func(childComplexity int) int
+ }
+
ProjectBuildVariant struct {
DisplayName func(childComplexity int) int
Name func(childComplexity int) int
@@ -646,6 +745,7 @@ type ComplexityRoot struct {
Aliases func(childComplexity int) int
GithubWebhooksEnabled func(childComplexity int) int
ProjectRef func(childComplexity int) int
+ ProjectSubscriptions func(childComplexity int) int
Subscriptions func(childComplexity int) int
Vars func(childComplexity int) int
}
@@ -659,15 +759,11 @@ type ComplexityRoot struct {
Aliases func(childComplexity int) int
GithubWebhooksEnabled func(childComplexity int) int
ProjectRef func(childComplexity int) int
+ ProjectSubscriptions func(childComplexity int) int
Subscriptions func(childComplexity int) int
Vars func(childComplexity int) int
}
- ProjectSubscriber struct {
- Subscriber func(childComplexity int) int
- Type func(childComplexity int) int
- }
-
ProjectSubscription struct {
ID func(childComplexity int) int
OwnerType func(childComplexity int) int
@@ -694,9 +790,9 @@ type ComplexityRoot struct {
AwsRegions func(childComplexity int) int
BbGetCreatedTickets func(childComplexity int, taskID string) int
BuildBaron func(childComplexity int, taskID string, execution int) int
- BuildVariantsForTaskName func(childComplexity int, projectID string, taskName string) int
+ BuildVariantsForTaskName func(childComplexity int, projectIdentifier string, taskName string) int
ClientConfig func(childComplexity int) int
- CommitQueue func(childComplexity int, id string) int
+ CommitQueue func(childComplexity int, projectIdentifier string) int
DistroTaskQueue func(childComplexity int, distroID string) int
Distros func(childComplexity int, onlySpawnable bool) int
GithubProjectConflicts func(childComplexity int, projectID string) int
@@ -705,13 +801,14 @@ type ComplexityRoot struct {
HostEvents func(childComplexity int, hostID string, hostTag *string, limit *int, page *int) int
Hosts func(childComplexity int, hostID *string, distroID *string, currentTaskID *string, statuses []string, startedBy *string, sortBy *HostSortBy, sortDir *SortDirection, page *int, limit *int) int
InstanceTypes func(childComplexity int) int
+ LogkeeperBuildMetadata func(childComplexity int, buildID string) int
MainlineCommits func(childComplexity int, options MainlineCommitsOptions, buildVariantOptions *BuildVariantOptions) int
MyHosts func(childComplexity int) int
MyPublicKeys func(childComplexity int) int
MyVolumes func(childComplexity int) int
Patch func(childComplexity int, id string) int
- PatchTasks func(childComplexity int, patchID string, sorts []*SortOrder, page *int, limit *int, statuses []string, baseStatuses []string, variant *string, taskName *string, includeEmptyActivation *bool) int
- Project func(childComplexity int, projectID string) int
+ Pod func(childComplexity int, podID string) int
+ Project func(childComplexity int, projectIdentifier string) int
ProjectEvents func(childComplexity int, identifier string, limit *int, before *time.Time) int
ProjectSettings func(childComplexity int, identifier string) int
Projects func(childComplexity int) int
@@ -721,9 +818,7 @@ type ComplexityRoot struct {
SubnetAvailabilityZones func(childComplexity int) int
Task func(childComplexity int, taskID string, execution *int) int
TaskAllExecutions func(childComplexity int, taskID string) int
- TaskFiles func(childComplexity int, taskID string, execution *int) int
- TaskLogs func(childComplexity int, taskID string, execution *int) int
- TaskNamesForBuildVariant func(childComplexity int, projectID string, buildVariant string) int
+ TaskNamesForBuildVariant func(childComplexity int, projectIdentifier string, buildVariant string) int
TaskQueueDistros func(childComplexity int) int
TaskTestSample func(childComplexity int, tasks []string, filters []*TestFilter) int
TaskTests func(childComplexity int, taskID string, execution *int, sortCategory *TestSortCategory, sortDirection *SortDirection, page *int, limit *int, testName *string, statuses []string, groupID *string) int
@@ -735,59 +830,58 @@ type ComplexityRoot struct {
}
RepoCommitQueueParams struct {
- Enabled func(childComplexity int) int
- MergeMethod func(childComplexity int) int
- Message func(childComplexity int) int
- RequireSigned func(childComplexity int) int
+ Enabled func(childComplexity int) int
+ MergeMethod func(childComplexity int) int
+ Message func(childComplexity int) int
}
RepoRef struct {
- Admins func(childComplexity int) int
- BatchTime func(childComplexity int) int
- Branch func(childComplexity int) int
- BuildBaronSettings func(childComplexity int) int
- CedarTestResultsEnabled func(childComplexity int) int
- CommitQueue func(childComplexity int) int
- DeactivatePrevious func(childComplexity int) int
- DefaultLogger func(childComplexity int) int
- DisabledStatsCache func(childComplexity int) int
- DispatchingDisabled func(childComplexity int) int
- DisplayName func(childComplexity int) int
- Enabled func(childComplexity int) int
- FilesIgnoredFromCache func(childComplexity int) int
- GitTagAuthorizedTeams func(childComplexity int) int
- GitTagAuthorizedUsers func(childComplexity int) int
- GitTagVersionsEnabled func(childComplexity int) int
- GithubChecksEnabled func(childComplexity int) int
- GithubTriggerAliases func(childComplexity int) int
- Id func(childComplexity int) int
- ManualPRTestingEnabled func(childComplexity int) int
- NotifyOnBuildFailure func(childComplexity int) int
- Owner func(childComplexity int) int
- PRTestingEnabled func(childComplexity int) int
- PatchTriggerAliases func(childComplexity int) int
- PatchingDisabled func(childComplexity int) int
- PerfEnabled func(childComplexity int) int
- PeriodicBuilds func(childComplexity int) int
- Private func(childComplexity int) int
- RemotePath func(childComplexity int) int
- Repo func(childComplexity int) int
- RepotrackerDisabled func(childComplexity int) int
- Restricted func(childComplexity int) int
- SpawnHostScriptPath func(childComplexity int) int
- TaskAnnotationSettings func(childComplexity int) int
- TaskSync func(childComplexity int) int
- TracksPushEvents func(childComplexity int) int
- Triggers func(childComplexity int) int
- ValidDefaultLoggers func(childComplexity int) int
- VersionControlEnabled func(childComplexity int) int
- WorkstationConfig func(childComplexity int) int
+ Admins func(childComplexity int) int
+ BatchTime func(childComplexity int) int
+ Branch func(childComplexity int) int
+ BuildBaronSettings func(childComplexity int) int
+ CommitQueue func(childComplexity int) int
+ ContainerSizeDefinitions func(childComplexity int) int
+ DeactivatePrevious func(childComplexity int) int
+ DisabledStatsCache func(childComplexity int) int
+ DispatchingDisabled func(childComplexity int) int
+ DisplayName func(childComplexity int) int
+ Enabled func(childComplexity int) int
+ ExternalLinks func(childComplexity int) int
+ GitTagAuthorizedTeams func(childComplexity int) int
+ GitTagAuthorizedUsers func(childComplexity int) int
+ GitTagVersionsEnabled func(childComplexity int) int
+ GithubChecksEnabled func(childComplexity int) int
+ GithubTriggerAliases func(childComplexity int) int
+ Id func(childComplexity int) int
+ ManualPRTestingEnabled func(childComplexity int) int
+ NotifyOnBuildFailure func(childComplexity int) int
+ Owner func(childComplexity int) int
+ PRTestingEnabled func(childComplexity int) int
+ PatchTriggerAliases func(childComplexity int) int
+ PatchingDisabled func(childComplexity int) int
+ PerfEnabled func(childComplexity int) int
+ PeriodicBuilds func(childComplexity int) int
+ Private func(childComplexity int) int
+ RemotePath func(childComplexity int) int
+ Repo func(childComplexity int) int
+ RepotrackerDisabled func(childComplexity int) int
+ Restricted func(childComplexity int) int
+ SpawnHostScriptPath func(childComplexity int) int
+ StepbackDisabled func(childComplexity int) int
+ TaskAnnotationSettings func(childComplexity int) int
+ TaskSync func(childComplexity int) int
+ TracksPushEvents func(childComplexity int) int
+ Triggers func(childComplexity int) int
+ VersionControlEnabled func(childComplexity int) int
+ WorkstationConfig func(childComplexity int) int
}
RepoSettings struct {
Aliases func(childComplexity int) int
GithubWebhooksEnabled func(childComplexity int) int
ProjectRef func(childComplexity int) int
+ ProjectSubscriptions func(childComplexity int) int
Subscriptions func(childComplexity int) int
Vars func(childComplexity int) int
}
@@ -814,6 +908,10 @@ type ComplexityRoot struct {
Type func(childComplexity int) int
}
+ SlackConfig struct {
+ Name func(childComplexity int) int
+ }
+
Source struct {
Author func(childComplexity int) int
Requester func(childComplexity int) int
@@ -832,6 +930,7 @@ type ComplexityRoot struct {
GithubOrgs func(childComplexity int) int
Jira func(childComplexity int) int
Providers func(childComplexity int) int
+ Slack func(childComplexity int) int
Spawnhost func(childComplexity int) int
Ui func(childComplexity int) int
}
@@ -851,6 +950,11 @@ type ComplexityRoot struct {
WebhookSubscriber func(childComplexity int) int
}
+ SubscriberWrapper struct {
+ Subscriber func(childComplexity int) int
+ Type func(childComplexity int) int
+ }
+
Task struct {
AbortInfo func(childComplexity int) int
Aborted func(childComplexity int) int
@@ -866,6 +970,7 @@ type ComplexityRoot struct {
BuildVariant func(childComplexity int) int
BuildVariantDisplayName func(childComplexity int) int
CanAbort func(childComplexity int) int
+ CanDisable func(childComplexity int) int
CanModifyAnnotation func(childComplexity int) int
CanOverrideDependencies func(childComplexity int) int
CanRestart func(childComplexity int) int
@@ -902,18 +1007,23 @@ type ComplexityRoot struct {
Order func(childComplexity int) int
Patch func(childComplexity int) int
PatchNumber func(childComplexity int) int
+ Pod func(childComplexity int) int
Priority func(childComplexity int) int
Project func(childComplexity int) int
ProjectId func(childComplexity int) int
ProjectIdentifier func(childComplexity int) int
Requester func(childComplexity int) int
+ ResetWhenFinished func(childComplexity int) int
Revision func(childComplexity int) int
ScheduledTime func(childComplexity int) int
SpawnHostLink func(childComplexity int) int
StartTime func(childComplexity int) int
Status func(childComplexity int) int
+ TaskFiles func(childComplexity int) int
TaskGroup func(childComplexity int) int
TaskGroupMaxHosts func(childComplexity int) int
+ TaskLogs func(childComplexity int) int
+ Tests func(childComplexity int, opts *TestFilterOptions) int
TimeTaken func(childComplexity int) int
TotalTestCount func(childComplexity int) int
VersionMetadata func(childComplexity int) int
@@ -924,6 +1034,15 @@ type ComplexityRoot struct {
JiraCustomFields func(childComplexity int) int
}
+ TaskContainerCreationOpts struct {
+ Arch func(childComplexity int) int
+ CPU func(childComplexity int) int
+ Image func(childComplexity int) int
+ MemoryMB func(childComplexity int) int
+ Os func(childComplexity int) int
+ WorkingDir func(childComplexity int) int
+ }
+
TaskEndDetail struct {
Description func(childComplexity int) int
OOMTracker func(childComplexity int) int
@@ -937,6 +1056,7 @@ type ComplexityRoot struct {
HostId func(childComplexity int) int
JiraIssue func(childComplexity int) int
JiraLink func(childComplexity int) int
+ PodId func(childComplexity int) int
Priority func(childComplexity int) int
Status func(childComplexity int) int
Timestamp func(childComplexity int) int
@@ -1000,21 +1120,6 @@ type ComplexityRoot struct {
Version func(childComplexity int) int
}
- TaskResult struct {
- Aborted func(childComplexity int) int
- BaseStatus func(childComplexity int) int
- BaseTask func(childComplexity int) int
- Blocked func(childComplexity int) int
- BuildVariant func(childComplexity int) int
- BuildVariantDisplayName func(childComplexity int) int
- DisplayName func(childComplexity int) int
- Execution func(childComplexity int) int
- ExecutionTasksFull func(childComplexity int) int
- ID func(childComplexity int) int
- Status func(childComplexity int) int
- Version func(childComplexity int) int
- }
-
TaskSpecifier struct {
PatchAlias func(childComplexity int) int
TaskRegex func(childComplexity int) int
@@ -1048,6 +1153,7 @@ type ComplexityRoot struct {
LineNum func(childComplexity int) int
URL func(childComplexity int) int
URLLobster func(childComplexity int) int
+ URLParsley func(childComplexity int) int
URLRaw func(childComplexity int) int
}
@@ -1111,11 +1217,12 @@ type ComplexityRoot struct {
}
User struct {
- DisplayName func(childComplexity int) int
- EmailAddress func(childComplexity int) int
- Patches func(childComplexity int, patchesInput PatchesInput) int
- Permissions func(childComplexity int) int
- UserID func(childComplexity int) int
+ DisplayName func(childComplexity int) int
+ EmailAddress func(childComplexity int) int
+ Patches func(childComplexity int, patchesInput PatchesInput) int
+ Permissions func(childComplexity int) int
+ Subscriptions func(childComplexity int) int
+ UserID func(childComplexity int) int
}
UserConfig struct {
@@ -1125,15 +1232,12 @@ type ComplexityRoot struct {
User func(childComplexity int) int
}
- UserPatches struct {
- FilteredPatchCount func(childComplexity int) int
- Patches func(childComplexity int) int
- }
-
UserSettings struct {
+ DateFormat func(childComplexity int) int
GithubUser func(childComplexity int) int
Notifications func(childComplexity int) int
Region func(childComplexity int) int
+ SlackMemberId func(childComplexity int) int
SlackUsername func(childComplexity int) int
Timezone func(childComplexity int) int
UseSpruceOptions func(childComplexity int) int
@@ -1145,38 +1249,46 @@ type ComplexityRoot struct {
}
Version struct {
- Activated func(childComplexity int) int
- Author func(childComplexity int) int
- BaseTaskStatuses func(childComplexity int) int
- BaseVersion func(childComplexity int) int
- Branch func(childComplexity int) int
- BuildVariantStats func(childComplexity int, options *BuildVariantOptions) int
- BuildVariants func(childComplexity int, options *BuildVariantOptions) int
- ChildVersions func(childComplexity int) int
- CreateTime func(childComplexity int) int
- FinishTime func(childComplexity int) int
- Id func(childComplexity int) int
- IsPatch func(childComplexity int) int
- Manifest func(childComplexity int) int
- Message func(childComplexity int) int
- Order func(childComplexity int) int
- Parameters func(childComplexity int) int
- Patch func(childComplexity int) int
- PreviousVersion func(childComplexity int) int
- Project func(childComplexity int) int
- ProjectIdentifier func(childComplexity int) int
- ProjectMetadata func(childComplexity int) int
- Repo func(childComplexity int) int
- Requester func(childComplexity int) int
- Revision func(childComplexity int) int
- StartTime func(childComplexity int) int
- Status func(childComplexity int) int
- TaskCount func(childComplexity int) int
- TaskStatusCounts func(childComplexity int, options *BuildVariantOptions) int
- TaskStatusStats func(childComplexity int, options *BuildVariantOptions) int
- TaskStatuses func(childComplexity int) int
- UpstreamProject func(childComplexity int) int
- VersionTiming func(childComplexity int) int
+ Activated func(childComplexity int) int
+ Author func(childComplexity int) int
+ BaseTaskStatuses func(childComplexity int) int
+ BaseVersion func(childComplexity int) int
+ Branch func(childComplexity int) int
+ BuildVariantStats func(childComplexity int, options BuildVariantOptions) int
+ BuildVariants func(childComplexity int, options BuildVariantOptions) int
+ ChildVersions func(childComplexity int) int
+ CreateTime func(childComplexity int) int
+ Errors func(childComplexity int) int
+ ExternalLinksForMetadata func(childComplexity int) int
+ FinishTime func(childComplexity int) int
+ Id func(childComplexity int) int
+ IsPatch func(childComplexity int) int
+ Manifest func(childComplexity int) int
+ Message func(childComplexity int) int
+ Order func(childComplexity int) int
+ Parameters func(childComplexity int) int
+ Patch func(childComplexity int) int
+ PreviousVersion func(childComplexity int) int
+ Project func(childComplexity int) int
+ ProjectIdentifier func(childComplexity int) int
+ ProjectMetadata func(childComplexity int) int
+ Repo func(childComplexity int) int
+ Requester func(childComplexity int) int
+ Revision func(childComplexity int) int
+ StartTime func(childComplexity int) int
+ Status func(childComplexity int) int
+ TaskCount func(childComplexity int) int
+ TaskStatusStats func(childComplexity int, options BuildVariantOptions) int
+ TaskStatuses func(childComplexity int) int
+ Tasks func(childComplexity int, options TaskFilterOptions) int
+ UpstreamProject func(childComplexity int) int
+ VersionTiming func(childComplexity int) int
+ Warnings func(childComplexity int) int
+ }
+
+ VersionTasks struct {
+ Count func(childComplexity int) int
+ Data func(childComplexity int) int
}
VersionTiming struct {
@@ -1195,6 +1307,7 @@ type ComplexityRoot struct {
Host func(childComplexity int) int
HostID func(childComplexity int) int
ID func(childComplexity int) int
+ Migrating func(childComplexity int) int
NoExpiration func(childComplexity int) int
Size func(childComplexity int) int
Type func(childComplexity int) int
@@ -1211,9 +1324,12 @@ type ComplexityRoot struct {
}
WebhookSubscriber struct {
- Headers func(childComplexity int) int
- Secret func(childComplexity int) int
- URL func(childComplexity int) int
+ Headers func(childComplexity int) int
+ MinDelayMS func(childComplexity int) int
+ Retries func(childComplexity int) int
+ Secret func(childComplexity int) int
+ TimeoutMS func(childComplexity int) int
+ URL func(childComplexity int) int
}
WorkstationConfig struct {
@@ -1231,177 +1347,206 @@ type AnnotationResolver interface {
WebhookConfigured(ctx context.Context, obj *model.APITaskAnnotation) (bool, error)
}
type HostResolver interface {
- HomeVolume(ctx context.Context, obj *model.APIHost) (*model.APIVolume, error)
+ Ami(ctx context.Context, obj *model.APIHost) (*string, error)
DistroID(ctx context.Context, obj *model.APIHost) (*string, error)
+ Elapsed(ctx context.Context, obj *model.APIHost) (*time.Time, error)
+
+ HomeVolume(ctx context.Context, obj *model.APIHost) (*model.APIVolume, error)
Uptime(ctx context.Context, obj *model.APIHost) (*time.Time, error)
- Elapsed(ctx context.Context, obj *model.APIHost) (*time.Time, error)
Volumes(ctx context.Context, obj *model.APIHost) ([]*model.APIVolume, error)
}
type IssueLinkResolver interface {
JiraTicket(ctx context.Context, obj *model.APIIssueLink) (*thirdparty.JiraTicket, error)
}
+type LogkeeperBuildResolver interface {
+ Task(ctx context.Context, obj *plank.Build) (*model.APITask, error)
+}
type MutationResolver interface {
- AddFavoriteProject(ctx context.Context, identifier string) (*model.APIProjectRef, error)
- RemoveFavoriteProject(ctx context.Context, identifier string) (*model.APIProjectRef, error)
- CreateProject(ctx context.Context, project model.APIProjectRef) (*model.APIProjectRef, error)
- CopyProject(ctx context.Context, project data.CopyProjectOpts) (*model.APIProjectRef, error)
- AttachProjectToNewRepo(ctx context.Context, project MoveProjectInput) (*model.APIProjectRef, error)
- SaveProjectSettingsForSection(ctx context.Context, projectSettings *model.APIProjectSettings, section ProjectSettingsSection) (*model.APIProjectSettings, error)
- SaveRepoSettingsForSection(ctx context.Context, repoSettings *model.APIProjectSettings, section ProjectSettingsSection) (*model.APIProjectSettings, error)
- DefaultSectionToRepo(ctx context.Context, projectID string, section ProjectSettingsSection) (*string, error)
- AttachProjectToRepo(ctx context.Context, projectID string) (*model.APIProjectRef, error)
- DetachProjectFromRepo(ctx context.Context, projectID string) (*model.APIProjectRef, error)
- ForceRepotrackerRun(ctx context.Context, projectID string) (bool, error)
- DeactivateStepbackTasks(ctx context.Context, projectID string) (bool, error)
- SchedulePatch(ctx context.Context, patchID string, configure PatchConfigure) (*model.APIPatch, error)
- SchedulePatchTasks(ctx context.Context, patchID string) (*string, error)
- UnschedulePatchTasks(ctx context.Context, patchID string, abort bool) (*string, error)
- RestartVersions(ctx context.Context, versionID string, abort bool, versionsToRestart []*model1.VersionToRestart) ([]*model.APIVersion, error)
- ScheduleUndispatchedBaseTasks(ctx context.Context, patchID string) ([]*model.APITask, error)
- EnqueuePatch(ctx context.Context, patchID string, commitMessage *string) (*model.APIPatch, error)
- SetPatchPriority(ctx context.Context, patchID string, priority int) (*string, error)
- ScheduleTasks(ctx context.Context, taskIds []string) ([]*model.APITask, error)
- UnscheduleTask(ctx context.Context, taskID string) (*model.APITask, error)
- AbortTask(ctx context.Context, taskID string) (*model.APITask, error)
- SetTaskPriority(ctx context.Context, taskID string, priority int) (*model.APITask, error)
- RestartTask(ctx context.Context, taskID string) (*model.APITask, error)
- SaveSubscription(ctx context.Context, subscription model.APISubscription) (bool, error)
+ BbCreateTicket(ctx context.Context, taskID string, execution *int) (bool, error)
+ AddAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue model.APIIssueLink, isIssue bool) (bool, error)
EditAnnotationNote(ctx context.Context, taskID string, execution int, originalMessage string, newMessage string) (bool, error)
MoveAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue model.APIIssueLink, isIssue bool) (bool, error)
- AddAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue model.APIIssueLink, isIssue bool) (bool, error)
RemoveAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue model.APIIssueLink, isIssue bool) (bool, error)
- RemoveItemFromCommitQueue(ctx context.Context, commitQueueID string, issue string) (*string, error)
- UpdateUserSettings(ctx context.Context, userSettings *model.APIUserSettings) (bool, error)
- RestartJasper(ctx context.Context, hostIds []string) (int, error)
+ SetAnnotationMetadataLinks(ctx context.Context, taskID string, execution int, metadataLinks []*model.APIMetadataLink) (bool, error)
ReprovisionToNew(ctx context.Context, hostIds []string) (int, error)
+ RestartJasper(ctx context.Context, hostIds []string) (int, error)
UpdateHostStatus(ctx context.Context, hostIds []string, status string, notes *string) (int, error)
- CreatePublicKey(ctx context.Context, publicKeyInput PublicKeyInput) ([]*model.APIPubKey, error)
+ EnqueuePatch(ctx context.Context, patchID string, commitMessage *string) (*model.APIPatch, error)
+ SchedulePatch(ctx context.Context, patchID string, configure PatchConfigure) (*model.APIPatch, error)
+ SchedulePatchTasks(ctx context.Context, patchID string) (*string, error)
+ ScheduleUndispatchedBaseTasks(ctx context.Context, patchID string) ([]*model.APITask, error)
+ SetPatchPriority(ctx context.Context, patchID string, priority int) (*string, error)
+ UnschedulePatchTasks(ctx context.Context, patchID string, abort bool) (*string, error)
+ AddFavoriteProject(ctx context.Context, identifier string) (*model.APIProjectRef, error)
+ AttachProjectToNewRepo(ctx context.Context, project MoveProjectInput) (*model.APIProjectRef, error)
+ AttachProjectToRepo(ctx context.Context, projectID string) (*model.APIProjectRef, error)
+ CreateProject(ctx context.Context, project model.APIProjectRef, requestS3Creds *bool) (*model.APIProjectRef, error)
+ CopyProject(ctx context.Context, project data.CopyProjectOpts, requestS3Creds *bool) (*model.APIProjectRef, error)
+ DefaultSectionToRepo(ctx context.Context, projectID string, section ProjectSettingsSection) (*string, error)
+ DetachProjectFromRepo(ctx context.Context, projectID string) (*model.APIProjectRef, error)
+ ForceRepotrackerRun(ctx context.Context, projectID string) (bool, error)
+ PromoteVarsToRepo(ctx context.Context, projectID string, varNames []string) (bool, error)
+ RemoveFavoriteProject(ctx context.Context, identifier string) (*model.APIProjectRef, error)
+ SaveProjectSettingsForSection(ctx context.Context, projectSettings *model.APIProjectSettings, section ProjectSettingsSection) (*model.APIProjectSettings, error)
+ SaveRepoSettingsForSection(ctx context.Context, repoSettings *model.APIProjectSettings, section ProjectSettingsSection) (*model.APIProjectSettings, error)
+ DeactivateStepbackTask(ctx context.Context, projectID string, buildVariantName string, taskName string) (bool, error)
+ AttachVolumeToHost(ctx context.Context, volumeAndHost VolumeHost) (bool, error)
+ DetachVolumeFromHost(ctx context.Context, volumeID string) (bool, error)
+ EditSpawnHost(ctx context.Context, spawnHost *EditSpawnHostInput) (*model.APIHost, error)
+ MigrateVolume(ctx context.Context, volumeID string, spawnHostInput *SpawnHostInput) (bool, error)
SpawnHost(ctx context.Context, spawnHostInput *SpawnHostInput) (*model.APIHost, error)
SpawnVolume(ctx context.Context, spawnVolumeInput SpawnVolumeInput) (bool, error)
- UpdateVolume(ctx context.Context, updateVolumeInput UpdateVolumeInput) (bool, error)
+ RemoveVolume(ctx context.Context, volumeID string) (bool, error)
UpdateSpawnHostStatus(ctx context.Context, hostID string, action SpawnHostStatusActions) (*model.APIHost, error)
+ UpdateVolume(ctx context.Context, updateVolumeInput UpdateVolumeInput) (bool, error)
+ AbortTask(ctx context.Context, taskID string) (*model.APITask, error)
+ OverrideTaskDependencies(ctx context.Context, taskID string) (*model.APITask, error)
+ RestartTask(ctx context.Context, taskID string, failedOnly bool) (*model.APITask, error)
+ ScheduleTasks(ctx context.Context, taskIds []string) ([]*model.APITask, error)
+ SetTaskPriority(ctx context.Context, taskID string, priority int) (*model.APITask, error)
+ UnscheduleTask(ctx context.Context, taskID string) (*model.APITask, error)
+ ClearMySubscriptions(ctx context.Context) (int, error)
+ CreatePublicKey(ctx context.Context, publicKeyInput PublicKeyInput) ([]*model.APIPubKey, error)
RemovePublicKey(ctx context.Context, keyName string) ([]*model.APIPubKey, error)
+ SaveSubscription(ctx context.Context, subscription model.APISubscription) (bool, error)
UpdatePublicKey(ctx context.Context, targetKeyName string, updateInfo PublicKeyInput) ([]*model.APIPubKey, error)
- AttachVolumeToHost(ctx context.Context, volumeAndHost VolumeHost) (bool, error)
- DetachVolumeFromHost(ctx context.Context, volumeID string) (bool, error)
- RemoveVolume(ctx context.Context, volumeID string) (bool, error)
- EditSpawnHost(ctx context.Context, spawnHost *EditSpawnHostInput) (*model.APIHost, error)
- BbCreateTicket(ctx context.Context, taskID string, execution *int) (bool, error)
- ClearMySubscriptions(ctx context.Context) (int, error)
- OverrideTaskDependencies(ctx context.Context, taskID string) (*model.APITask, error)
+ UpdateUserSettings(ctx context.Context, userSettings *model.APIUserSettings) (bool, error)
+ RemoveItemFromCommitQueue(ctx context.Context, commitQueueID string, issue string) (*string, error)
+ RestartVersions(ctx context.Context, versionID string, abort bool, versionsToRestart []*model1.VersionToRestart) ([]*model.APIVersion, error)
}
type PatchResolver interface {
AuthorDisplayName(ctx context.Context, obj *model.APIPatch) (string, error)
- VersionFull(ctx context.Context, obj *model.APIPatch) (*model.APIVersion, error)
+ BaseTaskStatuses(ctx context.Context, obj *model.APIPatch) ([]string, error)
+ Builds(ctx context.Context, obj *model.APIPatch) ([]*model.APIBuild, error)
+
+ CommitQueuePosition(ctx context.Context, obj *model.APIPatch) (*int, error)
Duration(ctx context.Context, obj *model.APIPatch) (*PatchDuration, error)
- Time(ctx context.Context, obj *model.APIPatch) (*PatchTime, error)
- TaskCount(ctx context.Context, obj *model.APIPatch) (*int, error)
- BaseVersionID(ctx context.Context, obj *model.APIPatch) (*string, error)
+ PatchTriggerAliases(ctx context.Context, obj *model.APIPatch) ([]*model.APIPatchTriggerDefinition, error)
Project(ctx context.Context, obj *model.APIPatch) (*PatchProject, error)
- Builds(ctx context.Context, obj *model.APIPatch) ([]*model.APIBuild, error)
- CommitQueuePosition(ctx context.Context, obj *model.APIPatch) (*int, error)
+
+ ProjectIdentifier(ctx context.Context, obj *model.APIPatch) (string, error)
+ ProjectMetadata(ctx context.Context, obj *model.APIPatch) (*model.APIProjectRef, error)
+
+ TaskCount(ctx context.Context, obj *model.APIPatch) (*int, error)
+
TaskStatuses(ctx context.Context, obj *model.APIPatch) ([]string, error)
- BaseTaskStatuses(ctx context.Context, obj *model.APIPatch) ([]string, error)
+ Time(ctx context.Context, obj *model.APIPatch) (*PatchTime, error)
- PatchTriggerAliases(ctx context.Context, obj *model.APIPatch) ([]*model.APIPatchTriggerDefinition, error)
+ VersionFull(ctx context.Context, obj *model.APIPatch) (*model.APIVersion, error)
}
type PermissionsResolver interface {
CanCreateProject(ctx context.Context, obj *Permissions) (bool, error)
}
+type PodResolver interface {
+ Events(ctx context.Context, obj *model.APIPod, limit *int, page *int) (*PodEvents, error)
+
+ Status(ctx context.Context, obj *model.APIPod) (string, error)
+ Task(ctx context.Context, obj *model.APIPod) (*model.APITask, error)
+
+ Type(ctx context.Context, obj *model.APIPod) (string, error)
+}
+type PodEventLogDataResolver interface {
+ Task(ctx context.Context, obj *model.PodAPIEventData) (*model.APITask, error)
+}
type ProjectResolver interface {
IsFavorite(ctx context.Context, obj *model.APIProjectRef) (bool, error)
- ValidDefaultLoggers(ctx context.Context, obj *model.APIProjectRef) ([]string, error)
+
Patches(ctx context.Context, obj *model.APIProjectRef, patchesInput PatchesInput) (*Patches, error)
}
+type ProjectEventSettingsResolver interface {
+ ProjectSubscriptions(ctx context.Context, obj *model.APIProjectEventSettings) ([]*model.APISubscription, error)
+}
type ProjectSettingsResolver interface {
+ Aliases(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APIProjectAlias, error)
GithubWebhooksEnabled(ctx context.Context, obj *model.APIProjectSettings) (bool, error)
- Vars(ctx context.Context, obj *model.APIProjectSettings) (*model.APIProjectVars, error)
- Aliases(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APIProjectAlias, error)
+ ProjectSubscriptions(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APISubscription, error)
Subscriptions(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APISubscription, error)
-}
-type ProjectSubscriberResolver interface {
- Subscriber(ctx context.Context, obj *model.APISubscriber) (*Subscriber, error)
+ Vars(ctx context.Context, obj *model.APIProjectSettings) (*model.APIProjectVars, error)
}
type ProjectVarsResolver interface {
- PrivateVars(ctx context.Context, obj *model.APIProjectVars) ([]*string, error)
- AdminOnlyVars(ctx context.Context, obj *model.APIProjectVars) ([]*string, error)
+ AdminOnlyVars(ctx context.Context, obj *model.APIProjectVars) ([]string, error)
+ PrivateVars(ctx context.Context, obj *model.APIProjectVars) ([]string, error)
}
type QueryResolver interface {
- Task(ctx context.Context, taskID string, execution *int) (*model.APITask, error)
- TaskAllExecutions(ctx context.Context, taskID string) ([]*model.APITask, error)
- Patch(ctx context.Context, id string) (*model.APIPatch, error)
- Version(ctx context.Context, id string) (*model.APIVersion, error)
- Projects(ctx context.Context) ([]*GroupedProjects, error)
- ViewableProjectRefs(ctx context.Context) ([]*GroupedProjects, error)
- GithubProjectConflicts(ctx context.Context, projectID string) (*model1.GithubProjectConflicts, error)
- Project(ctx context.Context, projectID string) (*model.APIProjectRef, error)
- PatchTasks(ctx context.Context, patchID string, sorts []*SortOrder, page *int, limit *int, statuses []string, baseStatuses []string, variant *string, taskName *string, includeEmptyActivation *bool) (*PatchTasks, error)
- TaskTests(ctx context.Context, taskID string, execution *int, sortCategory *TestSortCategory, sortDirection *SortDirection, page *int, limit *int, testName *string, statuses []string, groupID *string) (*TaskTestResult, error)
- TaskTestSample(ctx context.Context, tasks []string, filters []*TestFilter) ([]*TaskTestResultSample, error)
- TaskFiles(ctx context.Context, taskID string, execution *int) (*TaskFiles, error)
- User(ctx context.Context, userID *string) (*model.APIDBUser, error)
- TaskLogs(ctx context.Context, taskID string, execution *int) (*TaskLogs, error)
- CommitQueue(ctx context.Context, id string) (*model.APICommitQueue, error)
- UserSettings(ctx context.Context) (*model.APIUserSettings, error)
- SpruceConfig(ctx context.Context) (*model.APIAdminSettings, error)
+ BbGetCreatedTickets(ctx context.Context, taskID string) ([]*thirdparty.JiraTicket, error)
+ BuildBaron(ctx context.Context, taskID string, execution int) (*BuildBaron, error)
AwsRegions(ctx context.Context) ([]string, error)
- SubnetAvailabilityZones(ctx context.Context) ([]string, error)
- UserConfig(ctx context.Context) (*UserConfig, error)
ClientConfig(ctx context.Context) (*model.APIClientConfig, error)
+ InstanceTypes(ctx context.Context) ([]string, error)
+ SpruceConfig(ctx context.Context) (*model.APIAdminSettings, error)
+ SubnetAvailabilityZones(ctx context.Context) ([]string, error)
+ Distros(ctx context.Context, onlySpawnable bool) ([]*model.APIDistro, error)
+ DistroTaskQueue(ctx context.Context, distroID string) ([]*model.APITaskQueueItem, error)
Host(ctx context.Context, hostID string) (*model.APIHost, error)
HostEvents(ctx context.Context, hostID string, hostTag *string, limit *int, page *int) (*HostEvents, error)
Hosts(ctx context.Context, hostID *string, distroID *string, currentTaskID *string, statuses []string, startedBy *string, sortBy *HostSortBy, sortDir *SortDirection, page *int, limit *int) (*HostsResponse, error)
+ TaskQueueDistros(ctx context.Context) ([]*TaskQueueDistro, error)
+ Pod(ctx context.Context, podID string) (*model.APIPod, error)
+ Patch(ctx context.Context, id string) (*model.APIPatch, error)
+ GithubProjectConflicts(ctx context.Context, projectID string) (*model1.GithubProjectConflicts, error)
+ Project(ctx context.Context, projectIdentifier string) (*model.APIProjectRef, error)
+ Projects(ctx context.Context) ([]*GroupedProjects, error)
+ ProjectEvents(ctx context.Context, identifier string, limit *int, before *time.Time) (*ProjectEvents, error)
+ ProjectSettings(ctx context.Context, identifier string) (*model.APIProjectSettings, error)
+ RepoEvents(ctx context.Context, id string, limit *int, before *time.Time) (*ProjectEvents, error)
+ RepoSettings(ctx context.Context, id string) (*model.APIProjectSettings, error)
+ ViewableProjectRefs(ctx context.Context) ([]*GroupedProjects, error)
MyHosts(ctx context.Context) ([]*model.APIHost, error)
MyVolumes(ctx context.Context) ([]*model.APIVolume, error)
+ LogkeeperBuildMetadata(ctx context.Context, buildID string) (*plank.Build, error)
+ Task(ctx context.Context, taskID string, execution *int) (*model.APITask, error)
+ TaskAllExecutions(ctx context.Context, taskID string) ([]*model.APITask, error)
+ TaskTests(ctx context.Context, taskID string, execution *int, sortCategory *TestSortCategory, sortDirection *SortDirection, page *int, limit *int, testName *string, statuses []string, groupID *string) (*TaskTestResult, error)
+ TaskTestSample(ctx context.Context, tasks []string, filters []*TestFilter) ([]*TaskTestResultSample, error)
MyPublicKeys(ctx context.Context) ([]*model.APIPubKey, error)
- Distros(ctx context.Context, onlySpawnable bool) ([]*model.APIDistro, error)
- InstanceTypes(ctx context.Context) ([]string, error)
- DistroTaskQueue(ctx context.Context, distroID string) ([]*model.APITaskQueueItem, error)
- TaskQueueDistros(ctx context.Context) ([]*TaskQueueDistro, error)
- BuildBaron(ctx context.Context, taskID string, execution int) (*BuildBaron, error)
- BbGetCreatedTickets(ctx context.Context, taskID string) ([]*thirdparty.JiraTicket, error)
+ User(ctx context.Context, userID *string) (*model.APIDBUser, error)
+ UserConfig(ctx context.Context) (*UserConfig, error)
+ UserSettings(ctx context.Context) (*model.APIUserSettings, error)
+ CommitQueue(ctx context.Context, projectIdentifier string) (*model.APICommitQueue, error)
+ BuildVariantsForTaskName(ctx context.Context, projectIdentifier string, taskName string) ([]*task.BuildVariantTuple, error)
MainlineCommits(ctx context.Context, options MainlineCommitsOptions, buildVariantOptions *BuildVariantOptions) (*MainlineCommits, error)
- TaskNamesForBuildVariant(ctx context.Context, projectID string, buildVariant string) ([]string, error)
- BuildVariantsForTaskName(ctx context.Context, projectID string, taskName string) ([]*task.BuildVariantTuple, error)
- ProjectSettings(ctx context.Context, identifier string) (*model.APIProjectSettings, error)
- RepoSettings(ctx context.Context, id string) (*model.APIProjectSettings, error)
- ProjectEvents(ctx context.Context, identifier string, limit *int, before *time.Time) (*ProjectEvents, error)
- RepoEvents(ctx context.Context, id string, limit *int, before *time.Time) (*ProjectEvents, error)
+ TaskNamesForBuildVariant(ctx context.Context, projectIdentifier string, buildVariant string) ([]string, error)
HasVersion(ctx context.Context, id string) (bool, error)
-}
-type RepoRefResolver interface {
- ValidDefaultLoggers(ctx context.Context, obj *model.APIProjectRef) ([]string, error)
+ Version(ctx context.Context, id string) (*model.APIVersion, error)
}
type RepoSettingsResolver interface {
+ Aliases(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APIProjectAlias, error)
GithubWebhooksEnabled(ctx context.Context, obj *model.APIProjectSettings) (bool, error)
- Vars(ctx context.Context, obj *model.APIProjectSettings) (*model.APIProjectVars, error)
- Aliases(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APIProjectAlias, error)
+ ProjectSubscriptions(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APISubscription, error)
Subscriptions(ctx context.Context, obj *model.APIProjectSettings) ([]*model.APISubscription, error)
+ Vars(ctx context.Context, obj *model.APIProjectSettings) (*model.APIProjectVars, error)
+}
+type SubscriberWrapperResolver interface {
+ Subscriber(ctx context.Context, obj *model.APISubscriber) (*Subscriber, error)
}
type TaskResolver interface {
AbortInfo(ctx context.Context, obj *model.APITask) (*AbortInfo, error)
Ami(ctx context.Context, obj *model.APITask) (*string, error)
Annotation(ctx context.Context, obj *model.APITask) (*model.APITaskAnnotation, error)
- BaseTask(ctx context.Context, obj *model.APITask) (*model.APITask, error)
BaseStatus(ctx context.Context, obj *model.APITask) (*string, error)
+ BaseTask(ctx context.Context, obj *model.APITask) (*model.APITask, error)
BuildVariantDisplayName(ctx context.Context, obj *model.APITask) (*string, error)
CanAbort(ctx context.Context, obj *model.APITask) (bool, error)
+ CanDisable(ctx context.Context, obj *model.APITask) (bool, error)
CanModifyAnnotation(ctx context.Context, obj *model.APITask) (bool, error)
+ CanOverrideDependencies(ctx context.Context, obj *model.APITask) (bool, error)
CanRestart(ctx context.Context, obj *model.APITask) (bool, error)
CanSchedule(ctx context.Context, obj *model.APITask) (bool, error)
CanSetPriority(ctx context.Context, obj *model.APITask) (bool, error)
CanUnschedule(ctx context.Context, obj *model.APITask) (bool, error)
+ DependsOn(ctx context.Context, obj *model.APITask) ([]*Dependency, error)
+
DisplayTask(ctx context.Context, obj *model.APITask) (*model.APITask, error)
EstimatedStart(ctx context.Context, obj *model.APITask) (*model.APIDuration, error)
@@ -1416,68 +1561,88 @@ type TaskResolver interface {
LatestExecution(ctx context.Context, obj *model.APITask) (int, error)
MinQueuePosition(ctx context.Context, obj *model.APITask) (int, error)
+
Patch(ctx context.Context, obj *model.APITask) (*model.APIPatch, error)
PatchNumber(ctx context.Context, obj *model.APITask) (*int, error)
+ Pod(ctx context.Context, obj *model.APITask) (*model.APIPod, error)
Project(ctx context.Context, obj *model.APITask) (*model.APIProjectRef, error)
ProjectIdentifier(ctx context.Context, obj *model.APITask) (*string, error)
- DependsOn(ctx context.Context, obj *model.APITask) ([]*Dependency, error)
- CanOverrideDependencies(ctx context.Context, obj *model.APITask) (bool, error)
SpawnHostLink(ctx context.Context, obj *model.APITask) (*string, error)
Status(ctx context.Context, obj *model.APITask) (string, error)
+ TaskFiles(ctx context.Context, obj *model.APITask) (*TaskFiles, error)
+
+ TaskLogs(ctx context.Context, obj *model.APITask) (*TaskLogs, error)
+ Tests(ctx context.Context, obj *model.APITask, opts *TestFilterOptions) (*TaskTestResult, error)
TotalTestCount(ctx context.Context, obj *model.APITask) (int, error)
VersionMetadata(ctx context.Context, obj *model.APITask) (*model.APIVersion, error)
}
+type TaskContainerCreationOptsResolver interface {
+ Os(ctx context.Context, obj *model.APIPodTaskContainerCreationOptions) (string, error)
+ Arch(ctx context.Context, obj *model.APIPodTaskContainerCreationOptions) (string, error)
+}
type TaskLogsResolver interface {
- EventLogs(ctx context.Context, obj *TaskLogs) ([]*model.TaskAPIEventLogEntry, error)
- TaskLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error)
- SystemLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error)
AgentLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error)
AllLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error)
+
+ EventLogs(ctx context.Context, obj *TaskLogs) ([]*model.TaskAPIEventLogEntry, error)
+
+ SystemLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error)
+
+ TaskLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error)
}
type TaskQueueItemResolver interface {
Requester(ctx context.Context, obj *model.APITaskQueueItem) (TaskQueueItemType, error)
}
type TicketFieldsResolver interface {
+ AssignedTeam(ctx context.Context, obj *thirdparty.TicketFields) (*string, error)
AssigneeDisplayName(ctx context.Context, obj *thirdparty.TicketFields) (*string, error)
- ResolutionName(ctx context.Context, obj *thirdparty.TicketFields) (*string, error)
- AssignedTeam(ctx context.Context, obj *thirdparty.TicketFields) (*string, error)
+ ResolutionName(ctx context.Context, obj *thirdparty.TicketFields) (*string, error)
}
type UserResolver interface {
Patches(ctx context.Context, obj *model.APIDBUser, patchesInput PatchesInput) (*Patches, error)
Permissions(ctx context.Context, obj *model.APIDBUser) (*Permissions, error)
+ Subscriptions(ctx context.Context, obj *model.APIDBUser) ([]*model.APISubscription, error)
}
type VersionResolver interface {
- Status(ctx context.Context, obj *model.APIVersion) (string, error)
+ BaseTaskStatuses(ctx context.Context, obj *model.APIVersion) ([]string, error)
+ BaseVersion(ctx context.Context, obj *model.APIVersion) (*model.APIVersion, error)
- ProjectMetadata(ctx context.Context, obj *model.APIVersion) (*model.APIProjectRef, error)
+ BuildVariants(ctx context.Context, obj *model.APIVersion, options BuildVariantOptions) ([]*GroupedBuildVariant, error)
+ BuildVariantStats(ctx context.Context, obj *model.APIVersion, options BuildVariantOptions) ([]*task.GroupedTaskStatusCount, error)
+ ChildVersions(ctx context.Context, obj *model.APIVersion) ([]*model.APIVersion, error)
- TaskStatusCounts(ctx context.Context, obj *model.APIVersion, options *BuildVariantOptions) ([]*task.StatusCount, error)
- TaskStatusStats(ctx context.Context, obj *model.APIVersion, options *BuildVariantOptions) (*task.TaskStats, error)
- BuildVariants(ctx context.Context, obj *model.APIVersion, options *BuildVariantOptions) ([]*GroupedBuildVariant, error)
- BuildVariantStats(ctx context.Context, obj *model.APIVersion, options *BuildVariantOptions) ([]*task.GroupedTaskStatusCount, error)
IsPatch(ctx context.Context, obj *model.APIVersion) (bool, error)
+ Manifest(ctx context.Context, obj *model.APIVersion) (*Manifest, error)
+
Patch(ctx context.Context, obj *model.APIVersion) (*model.APIPatch, error)
- ChildVersions(ctx context.Context, obj *model.APIVersion) ([]*model.APIVersion, error)
- TaskCount(ctx context.Context, obj *model.APIVersion) (*int, error)
- BaseVersion(ctx context.Context, obj *model.APIVersion) (*model.APIVersion, error)
PreviousVersion(ctx context.Context, obj *model.APIVersion) (*model.APIVersion, error)
- VersionTiming(ctx context.Context, obj *model.APIVersion) (*VersionTiming, error)
+ ProjectMetadata(ctx context.Context, obj *model.APIVersion) (*model.APIProjectRef, error)
+
+ Status(ctx context.Context, obj *model.APIVersion) (string, error)
+ TaskCount(ctx context.Context, obj *model.APIVersion) (*int, error)
+ Tasks(ctx context.Context, obj *model.APIVersion, options TaskFilterOptions) (*VersionTasks, error)
TaskStatuses(ctx context.Context, obj *model.APIVersion) ([]string, error)
- BaseTaskStatuses(ctx context.Context, obj *model.APIVersion) ([]string, error)
- Manifest(ctx context.Context, obj *model.APIVersion) (*Manifest, error)
+ TaskStatusStats(ctx context.Context, obj *model.APIVersion, options BuildVariantOptions) (*task.TaskStats, error)
UpstreamProject(ctx context.Context, obj *model.APIVersion) (*UpstreamProject, error)
+ VersionTiming(ctx context.Context, obj *model.APIVersion) (*VersionTiming, error)
+ ExternalLinksForMetadata(ctx context.Context, obj *model.APIVersion) ([]*ExternalLinkForMetadata, error)
+ Warnings(ctx context.Context, obj *model.APIVersion) ([]string, error)
}
type VolumeResolver interface {
Host(ctx context.Context, obj *model.APIVolume) (*model.APIHost, error)
}
+type SubscriberInputResolver interface {
+ Target(ctx context.Context, obj *model.APISubscriber, data string) error
+}
+
type executableSchema struct {
resolvers ResolverRoot
directives DirectiveRoot
@@ -1500,6 +1665,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.AWSConfig.MaxVolumeSizePerUser(childComplexity), true
+ case "AWSConfig.pod":
+ if e.complexity.AWSConfig.Pod == nil {
+ break
+ }
+
+ return e.complexity.AWSConfig.Pod(childComplexity), true
+
+ case "AWSPodConfig.ecs":
+ if e.complexity.AWSPodConfig.ECS == nil {
+ break
+ }
+
+ return e.complexity.AWSPodConfig.ECS(childComplexity), true
+
case "AbortInfo.buildVariantDisplayName":
if e.complexity.AbortInfo.BuildVariantDisplayName == nil {
break
@@ -1563,6 +1742,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Annotation.Issues(childComplexity), true
+ case "Annotation.metadataLinks":
+ if e.complexity.Annotation.MetadataLinks == nil {
+ break
+ }
+
+ return e.complexity.Annotation.MetadataLinks(childComplexity), true
+
case "Annotation.note":
if e.complexity.Annotation.Note == nil {
break
@@ -1598,34 +1784,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Annotation.WebhookConfigured(childComplexity), true
- case "BaseTaskInfo.id":
- if e.complexity.BaseTaskInfo.Id == nil {
- break
- }
-
- return e.complexity.BaseTaskInfo.Id(childComplexity), true
-
- case "BaseTaskInfo.status":
- if e.complexity.BaseTaskInfo.Status == nil {
- break
- }
-
- return e.complexity.BaseTaskInfo.Status(childComplexity), true
-
- case "BaseTaskResult.id":
- if e.complexity.BaseTaskResult.ID == nil {
- break
- }
-
- return e.complexity.BaseTaskResult.ID(childComplexity), true
-
- case "BaseTaskResult.status":
- if e.complexity.BaseTaskResult.Status == nil {
- break
- }
-
- return e.complexity.BaseTaskResult.Status(childComplexity), true
-
case "Build.actualMakespan":
if e.complexity.Build.ActualMakespan == nil {
break
@@ -1906,12 +2064,26 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.CommitQueueParams.Message(childComplexity), true
- case "CommitQueueParams.requireSigned":
- if e.complexity.CommitQueueParams.RequireSigned == nil {
+ case "ContainerResources.cpu":
+ if e.complexity.ContainerResources.CPU == nil {
break
}
- return e.complexity.CommitQueueParams.RequireSigned(childComplexity), true
+ return e.complexity.ContainerResources.CPU(childComplexity), true
+
+ case "ContainerResources.memoryMb":
+ if e.complexity.ContainerResources.MemoryMB == nil {
+ break
+ }
+
+ return e.complexity.ContainerResources.MemoryMB(childComplexity), true
+
+ case "ContainerResources.name":
+ if e.complexity.ContainerResources.Name == nil {
+ break
+ }
+
+ return e.complexity.ContainerResources.Name(childComplexity), true
case "Dependency.buildVariant":
if e.complexity.Dependency.BuildVariant == nil {
@@ -2025,6 +2197,48 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.DistroInfo.WorkDir(childComplexity), true
+ case "ECSConfig.maxCPU":
+ if e.complexity.ECSConfig.MaxCPU == nil {
+ break
+ }
+
+ return e.complexity.ECSConfig.MaxCPU(childComplexity), true
+
+ case "ECSConfig.maxMemoryMb":
+ if e.complexity.ECSConfig.MaxMemoryMB == nil {
+ break
+ }
+
+ return e.complexity.ECSConfig.MaxMemoryMB(childComplexity), true
+
+ case "ExternalLink.displayName":
+ if e.complexity.ExternalLink.DisplayName == nil {
+ break
+ }
+
+ return e.complexity.ExternalLink.DisplayName(childComplexity), true
+
+ case "ExternalLink.urlTemplate":
+ if e.complexity.ExternalLink.URLTemplate == nil {
+ break
+ }
+
+ return e.complexity.ExternalLink.URLTemplate(childComplexity), true
+
+ case "ExternalLinkForMetadata.displayName":
+ if e.complexity.ExternalLinkForMetadata.DisplayName == nil {
+ break
+ }
+
+ return e.complexity.ExternalLinkForMetadata.DisplayName(childComplexity), true
+
+ case "ExternalLinkForMetadata.url":
+ if e.complexity.ExternalLinkForMetadata.URL == nil {
+ break
+ }
+
+ return e.complexity.ExternalLinkForMetadata.URL(childComplexity), true
+
case "File.link":
if e.complexity.File.Link == nil {
break
@@ -2081,6 +2295,62 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.FileDiff.FileName(childComplexity), true
+ case "GeneralSubscription.id":
+ if e.complexity.GeneralSubscription.ID == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.ID(childComplexity), true
+
+ case "GeneralSubscription.ownerType":
+ if e.complexity.GeneralSubscription.OwnerType == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.OwnerType(childComplexity), true
+
+ case "GeneralSubscription.regexSelectors":
+ if e.complexity.GeneralSubscription.RegexSelectors == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.RegexSelectors(childComplexity), true
+
+ case "GeneralSubscription.resourceType":
+ if e.complexity.GeneralSubscription.ResourceType == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.ResourceType(childComplexity), true
+
+ case "GeneralSubscription.selectors":
+ if e.complexity.GeneralSubscription.Selectors == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.Selectors(childComplexity), true
+
+ case "GeneralSubscription.subscriber":
+ if e.complexity.GeneralSubscription.Subscriber == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.Subscriber(childComplexity), true
+
+ case "GeneralSubscription.trigger":
+ if e.complexity.GeneralSubscription.Trigger == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.Trigger(childComplexity), true
+
+ case "GeneralSubscription.triggerData":
+ if e.complexity.GeneralSubscription.TriggerData == nil {
+ break
+ }
+
+ return e.complexity.GeneralSubscription.TriggerData(childComplexity), true
+
case "GithubCheckSubscriber.owner":
if e.complexity.GithubCheckSubscriber.Owner == nil {
break
@@ -2207,13 +2477,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.GroupedProjects.GroupDisplayName(childComplexity), true
- case "GroupedProjects.name":
- if e.complexity.GroupedProjects.Name == nil {
- break
- }
-
- return e.complexity.GroupedProjects.Name(childComplexity), true
-
case "GroupedProjects.projects":
if e.complexity.GroupedProjects.Projects == nil {
break
@@ -2249,6 +2512,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.GroupedTaskStatusCount.Variant(childComplexity), true
+ case "Host.ami":
+ if e.complexity.Host.Ami == nil {
+ break
+ }
+
+ return e.complexity.Host.Ami(childComplexity), true
+
case "Host.availabilityZone":
if e.complexity.Host.AvailabilityZone == nil {
break
@@ -2760,6 +3030,104 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.LogMessage.Version(childComplexity), true
+ case "LogkeeperBuild.buildNum":
+ if e.complexity.LogkeeperBuild.BuildNum == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.BuildNum(childComplexity), true
+
+ case "LogkeeperBuild.builder":
+ if e.complexity.LogkeeperBuild.Builder == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.Builder(childComplexity), true
+
+ case "LogkeeperBuild.id":
+ if e.complexity.LogkeeperBuild.ID == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.ID(childComplexity), true
+
+ case "LogkeeperBuild.task":
+ if e.complexity.LogkeeperBuild.Task == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.Task(childComplexity), true
+
+ case "LogkeeperBuild.taskExecution":
+ if e.complexity.LogkeeperBuild.TaskExecution == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.TaskExecution(childComplexity), true
+
+ case "LogkeeperBuild.taskId":
+ if e.complexity.LogkeeperBuild.TaskID == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.TaskID(childComplexity), true
+
+ case "LogkeeperBuild.tests":
+ if e.complexity.LogkeeperBuild.Tests == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperBuild.Tests(childComplexity), true
+
+ case "LogkeeperTest.buildId":
+ if e.complexity.LogkeeperTest.BuildID == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.BuildID(childComplexity), true
+
+ case "LogkeeperTest.command":
+ if e.complexity.LogkeeperTest.Command == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.Command(childComplexity), true
+
+ case "LogkeeperTest.id":
+ if e.complexity.LogkeeperTest.ID == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.ID(childComplexity), true
+
+ case "LogkeeperTest.name":
+ if e.complexity.LogkeeperTest.Name == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.Name(childComplexity), true
+
+ case "LogkeeperTest.phase":
+ if e.complexity.LogkeeperTest.Phase == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.Phase(childComplexity), true
+
+ case "LogkeeperTest.taskExecution":
+ if e.complexity.LogkeeperTest.TaskExecution == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.TaskExecution(childComplexity), true
+
+ case "LogkeeperTest.taskId":
+ if e.complexity.LogkeeperTest.TaskID == nil {
+ break
+ }
+
+ return e.complexity.LogkeeperTest.TaskID(childComplexity), true
+
case "MainlineCommitVersion.rolledUpVersions":
if e.complexity.MainlineCommitVersion.RolledUpVersions == nil {
break
@@ -2844,6 +3212,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Manifest.Revision(childComplexity), true
+ case "MetadataLink.source":
+ if e.complexity.MetadataLink.Source == nil {
+ break
+ }
+
+ return e.complexity.MetadataLink.Source(childComplexity), true
+
+ case "MetadataLink.text":
+ if e.complexity.MetadataLink.Text == nil {
+ break
+ }
+
+ return e.complexity.MetadataLink.Text(childComplexity), true
+
+ case "MetadataLink.url":
+ if e.complexity.MetadataLink.URL == nil {
+ break
+ }
+
+ return e.complexity.MetadataLink.URL(childComplexity), true
+
case "Module.issue":
if e.complexity.Module.Issue == nil {
break
@@ -2987,7 +3376,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Mutation.CopyProject(childComplexity, args["project"].(data.CopyProjectOpts)), true
+ return e.complexity.Mutation.CopyProject(childComplexity, args["project"].(data.CopyProjectOpts), args["requestS3Creds"].(*bool)), true
case "Mutation.createProject":
if e.complexity.Mutation.CreateProject == nil {
@@ -2999,7 +3388,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Mutation.CreateProject(childComplexity, args["project"].(model.APIProjectRef)), true
+ return e.complexity.Mutation.CreateProject(childComplexity, args["project"].(model.APIProjectRef), args["requestS3Creds"].(*bool)), true
case "Mutation.createPublicKey":
if e.complexity.Mutation.CreatePublicKey == nil {
@@ -3013,17 +3402,17 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Mutation.CreatePublicKey(childComplexity, args["publicKeyInput"].(PublicKeyInput)), true
- case "Mutation.deactivateStepbackTasks":
- if e.complexity.Mutation.DeactivateStepbackTasks == nil {
+ case "Mutation.deactivateStepbackTask":
+ if e.complexity.Mutation.DeactivateStepbackTask == nil {
break
}
- args, err := ec.field_Mutation_deactivateStepbackTasks_args(context.TODO(), rawArgs)
+ args, err := ec.field_Mutation_deactivateStepbackTask_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
- return e.complexity.Mutation.DeactivateStepbackTasks(childComplexity, args["projectId"].(string)), true
+ return e.complexity.Mutation.DeactivateStepbackTask(childComplexity, args["projectId"].(string), args["buildVariantName"].(string), args["taskName"].(string)), true
case "Mutation.defaultSectionToRepo":
if e.complexity.Mutation.DefaultSectionToRepo == nil {
@@ -3109,6 +3498,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Mutation.ForceRepotrackerRun(childComplexity, args["projectId"].(string)), true
+ case "Mutation.migrateVolume":
+ if e.complexity.Mutation.MigrateVolume == nil {
+ break
+ }
+
+ args, err := ec.field_Mutation_migrateVolume_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Mutation.MigrateVolume(childComplexity, args["volumeId"].(string), args["spawnHostInput"].(*SpawnHostInput)), true
+
case "Mutation.moveAnnotationIssue":
if e.complexity.Mutation.MoveAnnotationIssue == nil {
break
@@ -3133,6 +3534,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Mutation.OverrideTaskDependencies(childComplexity, args["taskId"].(string)), true
+ case "Mutation.promoteVarsToRepo":
+ if e.complexity.Mutation.PromoteVarsToRepo == nil {
+ break
+ }
+
+ args, err := ec.field_Mutation_promoteVarsToRepo_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Mutation.PromoteVarsToRepo(childComplexity, args["projectId"].(string), args["varNames"].([]string)), true
+
case "Mutation.removeAnnotationIssue":
if e.complexity.Mutation.RemoveAnnotationIssue == nil {
break
@@ -3227,7 +3640,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Mutation.RestartTask(childComplexity, args["taskId"].(string)), true
+ return e.complexity.Mutation.RestartTask(childComplexity, args["taskId"].(string), args["failedOnly"].(bool)), true
case "Mutation.restartVersions":
if e.complexity.Mutation.RestartVersions == nil {
@@ -3325,6 +3738,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Mutation.ScheduleUndispatchedBaseTasks(childComplexity, args["patchId"].(string)), true
+ case "Mutation.setAnnotationMetadataLinks":
+ if e.complexity.Mutation.SetAnnotationMetadataLinks == nil {
+ break
+ }
+
+ args, err := ec.field_Mutation_setAnnotationMetadataLinks_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Mutation.SetAnnotationMetadataLinks(childComplexity, args["taskId"].(string), args["execution"].(int), args["metadataLinks"].([]*model.APIMetadataLink)), true
+
case "Mutation.setPatchPriority":
if e.complexity.Mutation.SetPatchPriority == nil {
break
@@ -3576,13 +4001,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Patch.BaseTaskStatuses(childComplexity), true
- case "Patch.baseVersionID":
- if e.complexity.Patch.BaseVersionID == nil {
- break
- }
-
- return e.complexity.Patch.BaseVersionID(childComplexity), true
-
case "Patch.builds":
if e.complexity.Patch.Builds == nil {
break
@@ -3702,6 +4120,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Patch.ProjectIdentifier(childComplexity), true
+ case "Patch.projectMetadata":
+ if e.complexity.Patch.ProjectMetadata == nil {
+ break
+ }
+
+ return e.complexity.Patch.ProjectMetadata(childComplexity), true
+
case "Patch.status":
if e.complexity.Patch.Status == nil {
break
@@ -3786,20 +4211,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.PatchProject.Variants(childComplexity), true
- case "PatchTasks.count":
- if e.complexity.PatchTasks.Count == nil {
- break
- }
-
- return e.complexity.PatchTasks.Count(childComplexity), true
-
- case "PatchTasks.tasks":
- if e.complexity.PatchTasks.Tasks == nil {
- break
- }
-
- return e.complexity.PatchTasks.Tasks(childComplexity), true
-
case "PatchTime.finished":
if e.complexity.PatchTime.Finished == nil {
break
@@ -3940,6 +4351,165 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Permissions.UserID(childComplexity), true
+ case "Pod.events":
+ if e.complexity.Pod.Events == nil {
+ break
+ }
+
+ args, err := ec.field_Pod_events_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Pod.Events(childComplexity, args["limit"].(*int), args["page"].(*int)), true
+
+ case "Pod.id":
+ if e.complexity.Pod.ID == nil {
+ break
+ }
+
+ return e.complexity.Pod.ID(childComplexity), true
+
+ case "Pod.status":
+ if e.complexity.Pod.Status == nil {
+ break
+ }
+
+ return e.complexity.Pod.Status(childComplexity), true
+
+ case "Pod.task":
+ if e.complexity.Pod.Task == nil {
+ break
+ }
+
+ return e.complexity.Pod.Task(childComplexity), true
+
+ case "Pod.taskContainerCreationOpts":
+ if e.complexity.Pod.TaskContainerCreationOpts == nil {
+ break
+ }
+
+ return e.complexity.Pod.TaskContainerCreationOpts(childComplexity), true
+
+ case "Pod.type":
+ if e.complexity.Pod.Type == nil {
+ break
+ }
+
+ return e.complexity.Pod.Type(childComplexity), true
+
+ case "PodEventLogData.newStatus":
+ if e.complexity.PodEventLogData.NewStatus == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.NewStatus(childComplexity), true
+
+ case "PodEventLogData.oldStatus":
+ if e.complexity.PodEventLogData.OldStatus == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.OldStatus(childComplexity), true
+
+ case "PodEventLogData.reason":
+ if e.complexity.PodEventLogData.Reason == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.Reason(childComplexity), true
+
+ case "PodEventLogData.task":
+ if e.complexity.PodEventLogData.Task == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.Task(childComplexity), true
+
+ case "PodEventLogData.taskExecution":
+ if e.complexity.PodEventLogData.TaskExecution == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.TaskExecution(childComplexity), true
+
+ case "PodEventLogData.taskID":
+ if e.complexity.PodEventLogData.TaskID == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.TaskID(childComplexity), true
+
+ case "PodEventLogData.taskStatus":
+ if e.complexity.PodEventLogData.TaskStatus == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogData.TaskStatus(childComplexity), true
+
+ case "PodEventLogEntry.data":
+ if e.complexity.PodEventLogEntry.Data == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.Data(childComplexity), true
+
+ case "PodEventLogEntry.eventType":
+ if e.complexity.PodEventLogEntry.EventType == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.EventType(childComplexity), true
+
+ case "PodEventLogEntry.id":
+ if e.complexity.PodEventLogEntry.ID == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.ID(childComplexity), true
+
+ case "PodEventLogEntry.processedAt":
+ if e.complexity.PodEventLogEntry.ProcessedAt == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.ProcessedAt(childComplexity), true
+
+ case "PodEventLogEntry.resourceId":
+ if e.complexity.PodEventLogEntry.ResourceId == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.ResourceId(childComplexity), true
+
+ case "PodEventLogEntry.resourceType":
+ if e.complexity.PodEventLogEntry.ResourceType == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.ResourceType(childComplexity), true
+
+ case "PodEventLogEntry.timestamp":
+ if e.complexity.PodEventLogEntry.Timestamp == nil {
+ break
+ }
+
+ return e.complexity.PodEventLogEntry.Timestamp(childComplexity), true
+
+ case "PodEvents.count":
+ if e.complexity.PodEvents.Count == nil {
+ break
+ }
+
+ return e.complexity.PodEvents.Count(childComplexity), true
+
+ case "PodEvents.eventLogEntries":
+ if e.complexity.PodEvents.EventLogEntries == nil {
+ break
+ }
+
+ return e.complexity.PodEvents.EventLogEntries(childComplexity), true
+
case "Project.admins":
if e.complexity.Project.Admins == nil {
break
@@ -3947,6 +4517,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Project.Admins(childComplexity), true
+ case "Project.banner":
+ if e.complexity.Project.Banner == nil {
+ break
+ }
+
+ return e.complexity.Project.Banner(childComplexity), true
+
case "Project.batchTime":
if e.complexity.Project.BatchTime == nil {
break
@@ -3968,13 +4545,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Project.BuildBaronSettings(childComplexity), true
- case "Project.cedarTestResultsEnabled":
- if e.complexity.Project.CedarTestResultsEnabled == nil {
- break
- }
-
- return e.complexity.Project.CedarTestResultsEnabled(childComplexity), true
-
case "Project.commitQueue":
if e.complexity.Project.CommitQueue == nil {
break
@@ -3982,19 +4552,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Project.CommitQueue(childComplexity), true
- case "Project.deactivatePrevious":
- if e.complexity.Project.DeactivatePrevious == nil {
+ case "Project.containerSizeDefinitions":
+ if e.complexity.Project.ContainerSizeDefinitions == nil {
break
}
- return e.complexity.Project.DeactivatePrevious(childComplexity), true
+ return e.complexity.Project.ContainerSizeDefinitions(childComplexity), true
- case "Project.defaultLogger":
- if e.complexity.Project.DefaultLogger == nil {
+ case "Project.deactivatePrevious":
+ if e.complexity.Project.DeactivatePrevious == nil {
break
}
- return e.complexity.Project.DefaultLogger(childComplexity), true
+ return e.complexity.Project.DeactivatePrevious(childComplexity), true
case "Project.disabledStatsCache":
if e.complexity.Project.DisabledStatsCache == nil {
@@ -4024,12 +4594,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Project.Enabled(childComplexity), true
- case "Project.filesIgnoredFromCache":
- if e.complexity.Project.FilesIgnoredFromCache == nil {
+ case "Project.externalLinks":
+ if e.complexity.Project.ExternalLinks == nil {
break
}
- return e.complexity.Project.FilesIgnoredFromCache(childComplexity), true
+ return e.complexity.Project.ExternalLinks(childComplexity), true
case "Project.gitTagAuthorizedTeams":
if e.complexity.Project.GitTagAuthorizedTeams == nil {
@@ -4211,6 +4781,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Project.SpawnHostScriptPath(childComplexity), true
+ case "Project.stepbackDisabled":
+ if e.complexity.Project.StepbackDisabled == nil {
+ break
+ }
+
+ return e.complexity.Project.StepbackDisabled(childComplexity), true
+
case "Project.taskAnnotationSettings":
if e.complexity.Project.TaskAnnotationSettings == nil {
break
@@ -4239,13 +4816,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Project.Triggers(childComplexity), true
- case "Project.validDefaultLoggers":
- if e.complexity.Project.ValidDefaultLoggers == nil {
- break
- }
-
- return e.complexity.Project.ValidDefaultLoggers(childComplexity), true
-
case "Project.versionControlEnabled":
if e.complexity.Project.VersionControlEnabled == nil {
break
@@ -4316,6 +4886,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ProjectAlias.VariantTags(childComplexity), true
+ case "ProjectBanner.text":
+ if e.complexity.ProjectBanner.Text == nil {
+ break
+ }
+
+ return e.complexity.ProjectBanner.Text(childComplexity), true
+
+ case "ProjectBanner.theme":
+ if e.complexity.ProjectBanner.Theme == nil {
+ break
+ }
+
+ return e.complexity.ProjectBanner.Theme(childComplexity), true
+
case "ProjectBuildVariant.displayName":
if e.complexity.ProjectBuildVariant.DisplayName == nil {
break
@@ -4386,6 +4970,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ProjectEventSettings.ProjectRef(childComplexity), true
+ case "ProjectEventSettings.projectSubscriptions":
+ if e.complexity.ProjectEventSettings.ProjectSubscriptions == nil {
+ break
+ }
+
+ return e.complexity.ProjectEventSettings.ProjectSubscriptions(childComplexity), true
+
case "ProjectEventSettings.subscriptions":
if e.complexity.ProjectEventSettings.Subscriptions == nil {
break
@@ -4435,6 +5026,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ProjectSettings.ProjectRef(childComplexity), true
+ case "ProjectSettings.projectSubscriptions":
+ if e.complexity.ProjectSettings.ProjectSubscriptions == nil {
+ break
+ }
+
+ return e.complexity.ProjectSettings.ProjectSubscriptions(childComplexity), true
+
case "ProjectSettings.subscriptions":
if e.complexity.ProjectSettings.Subscriptions == nil {
break
@@ -4449,20 +5047,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ProjectSettings.Vars(childComplexity), true
- case "ProjectSubscriber.subscriber":
- if e.complexity.ProjectSubscriber.Subscriber == nil {
- break
- }
-
- return e.complexity.ProjectSubscriber.Subscriber(childComplexity), true
-
- case "ProjectSubscriber.type":
- if e.complexity.ProjectSubscriber.Type == nil {
- break
- }
-
- return e.complexity.ProjectSubscriber.Type(childComplexity), true
-
case "ProjectSubscription.id":
if e.complexity.ProjectSubscription.ID == nil {
break
@@ -4595,7 +5179,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Query.BuildVariantsForTaskName(childComplexity, args["projectId"].(string), args["taskName"].(string)), true
+ return e.complexity.Query.BuildVariantsForTaskName(childComplexity, args["projectIdentifier"].(string), args["taskName"].(string)), true
case "Query.clientConfig":
if e.complexity.Query.ClientConfig == nil {
@@ -4614,7 +5198,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Query.CommitQueue(childComplexity, args["id"].(string)), true
+ return e.complexity.Query.CommitQueue(childComplexity, args["projectIdentifier"].(string)), true
case "Query.distroTaskQueue":
if e.complexity.Query.DistroTaskQueue == nil {
@@ -4707,6 +5291,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Query.InstanceTypes(childComplexity), true
+ case "Query.logkeeperBuildMetadata":
+ if e.complexity.Query.LogkeeperBuildMetadata == nil {
+ break
+ }
+
+ args, err := ec.field_Query_logkeeperBuildMetadata_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Query.LogkeeperBuildMetadata(childComplexity, args["buildId"].(string)), true
+
case "Query.mainlineCommits":
if e.complexity.Query.MainlineCommits == nil {
break
@@ -4752,17 +5348,17 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Query.Patch(childComplexity, args["id"].(string)), true
- case "Query.patchTasks":
- if e.complexity.Query.PatchTasks == nil {
+ case "Query.pod":
+ if e.complexity.Query.Pod == nil {
break
}
- args, err := ec.field_Query_patchTasks_args(context.TODO(), rawArgs)
+ args, err := ec.field_Query_pod_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
- return e.complexity.Query.PatchTasks(childComplexity, args["patchId"].(string), args["sorts"].([]*SortOrder), args["page"].(*int), args["limit"].(*int), args["statuses"].([]string), args["baseStatuses"].([]string), args["variant"].(*string), args["taskName"].(*string), args["includeEmptyActivation"].(*bool)), true
+ return e.complexity.Query.Pod(childComplexity, args["podId"].(string)), true
case "Query.project":
if e.complexity.Query.Project == nil {
@@ -4774,7 +5370,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Query.Project(childComplexity, args["projectId"].(string)), true
+ return e.complexity.Query.Project(childComplexity, args["projectIdentifier"].(string)), true
case "Query.projectEvents":
if e.complexity.Query.ProjectEvents == nil {
@@ -4869,30 +5465,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Query.TaskAllExecutions(childComplexity, args["taskId"].(string)), true
- case "Query.taskFiles":
- if e.complexity.Query.TaskFiles == nil {
- break
- }
-
- args, err := ec.field_Query_taskFiles_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Query.TaskFiles(childComplexity, args["taskId"].(string), args["execution"].(*int)), true
-
- case "Query.taskLogs":
- if e.complexity.Query.TaskLogs == nil {
- break
- }
-
- args, err := ec.field_Query_taskLogs_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Query.TaskLogs(childComplexity, args["taskId"].(string), args["execution"].(*int)), true
-
case "Query.taskNamesForBuildVariant":
if e.complexity.Query.TaskNamesForBuildVariant == nil {
break
@@ -4903,7 +5475,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Query.TaskNamesForBuildVariant(childComplexity, args["projectId"].(string), args["buildVariant"].(string)), true
+ return e.complexity.Query.TaskNamesForBuildVariant(childComplexity, args["projectIdentifier"].(string), args["buildVariant"].(string)), true
case "Query.taskQueueDistros":
if e.complexity.Query.TaskQueueDistros == nil {
@@ -5002,13 +5574,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoCommitQueueParams.Message(childComplexity), true
- case "RepoCommitQueueParams.requireSigned":
- if e.complexity.RepoCommitQueueParams.RequireSigned == nil {
- break
- }
-
- return e.complexity.RepoCommitQueueParams.RequireSigned(childComplexity), true
-
case "RepoRef.admins":
if e.complexity.RepoRef.Admins == nil {
break
@@ -5037,13 +5602,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoRef.BuildBaronSettings(childComplexity), true
- case "RepoRef.cedarTestResultsEnabled":
- if e.complexity.RepoRef.CedarTestResultsEnabled == nil {
- break
- }
-
- return e.complexity.RepoRef.CedarTestResultsEnabled(childComplexity), true
-
case "RepoRef.commitQueue":
if e.complexity.RepoRef.CommitQueue == nil {
break
@@ -5051,19 +5609,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoRef.CommitQueue(childComplexity), true
- case "RepoRef.deactivatePrevious":
- if e.complexity.RepoRef.DeactivatePrevious == nil {
+ case "RepoRef.containerSizeDefinitions":
+ if e.complexity.RepoRef.ContainerSizeDefinitions == nil {
break
}
- return e.complexity.RepoRef.DeactivatePrevious(childComplexity), true
+ return e.complexity.RepoRef.ContainerSizeDefinitions(childComplexity), true
- case "RepoRef.defaultLogger":
- if e.complexity.RepoRef.DefaultLogger == nil {
+ case "RepoRef.deactivatePrevious":
+ if e.complexity.RepoRef.DeactivatePrevious == nil {
break
}
- return e.complexity.RepoRef.DefaultLogger(childComplexity), true
+ return e.complexity.RepoRef.DeactivatePrevious(childComplexity), true
case "RepoRef.disabledStatsCache":
if e.complexity.RepoRef.DisabledStatsCache == nil {
@@ -5093,12 +5651,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoRef.Enabled(childComplexity), true
- case "RepoRef.filesIgnoredFromCache":
- if e.complexity.RepoRef.FilesIgnoredFromCache == nil {
+ case "RepoRef.externalLinks":
+ if e.complexity.RepoRef.ExternalLinks == nil {
break
}
- return e.complexity.RepoRef.FilesIgnoredFromCache(childComplexity), true
+ return e.complexity.RepoRef.ExternalLinks(childComplexity), true
case "RepoRef.gitTagAuthorizedTeams":
if e.complexity.RepoRef.GitTagAuthorizedTeams == nil {
@@ -5240,6 +5798,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoRef.SpawnHostScriptPath(childComplexity), true
+ case "RepoRef.stepbackDisabled":
+ if e.complexity.RepoRef.StepbackDisabled == nil {
+ break
+ }
+
+ return e.complexity.RepoRef.StepbackDisabled(childComplexity), true
+
case "RepoRef.taskAnnotationSettings":
if e.complexity.RepoRef.TaskAnnotationSettings == nil {
break
@@ -5268,13 +5833,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoRef.Triggers(childComplexity), true
- case "RepoRef.validDefaultLoggers":
- if e.complexity.RepoRef.ValidDefaultLoggers == nil {
- break
- }
-
- return e.complexity.RepoRef.ValidDefaultLoggers(childComplexity), true
-
case "RepoRef.versionControlEnabled":
if e.complexity.RepoRef.VersionControlEnabled == nil {
break
@@ -5310,6 +5868,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.RepoSettings.ProjectRef(childComplexity), true
+ case "RepoSettings.projectSubscriptions":
+ if e.complexity.RepoSettings.ProjectSubscriptions == nil {
+ break
+ }
+
+ return e.complexity.RepoSettings.ProjectSubscriptions(childComplexity), true
+
case "RepoSettings.subscriptions":
if e.complexity.RepoSettings.Subscriptions == nil {
break
@@ -5394,6 +5959,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Selector.Type(childComplexity), true
+ case "SlackConfig.name":
+ if e.complexity.SlackConfig.Name == nil {
+ break
+ }
+
+ return e.complexity.SlackConfig.Name(childComplexity), true
+
case "Source.author":
if e.complexity.Source.Author == nil {
break
@@ -5471,6 +6043,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.SpruceConfig.Providers(childComplexity), true
+ case "SpruceConfig.slack":
+ if e.complexity.SpruceConfig.Slack == nil {
+ break
+ }
+
+ return e.complexity.SpruceConfig.Slack(childComplexity), true
+
case "SpruceConfig.spawnHost":
if e.complexity.SpruceConfig.Spawnhost == nil {
break
@@ -5548,6 +6127,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Subscriber.WebhookSubscriber(childComplexity), true
+ case "SubscriberWrapper.subscriber":
+ if e.complexity.SubscriberWrapper.Subscriber == nil {
+ break
+ }
+
+ return e.complexity.SubscriberWrapper.Subscriber(childComplexity), true
+
+ case "SubscriberWrapper.type":
+ if e.complexity.SubscriberWrapper.Type == nil {
+ break
+ }
+
+ return e.complexity.SubscriberWrapper.Type(childComplexity), true
+
case "Task.abortInfo":
if e.complexity.Task.AbortInfo == nil {
break
@@ -5646,6 +6239,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Task.CanAbort(childComplexity), true
+ case "Task.canDisable":
+ if e.complexity.Task.CanDisable == nil {
+ break
+ }
+
+ return e.complexity.Task.CanDisable(childComplexity), true
+
case "Task.canModifyAnnotation":
if e.complexity.Task.CanModifyAnnotation == nil {
break
@@ -5898,6 +6498,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Task.PatchNumber(childComplexity), true
+ case "Task.pod":
+ if e.complexity.Task.Pod == nil {
+ break
+ }
+
+ return e.complexity.Task.Pod(childComplexity), true
+
case "Task.priority":
if e.complexity.Task.Priority == nil {
break
@@ -5933,6 +6540,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Task.Requester(childComplexity), true
+ case "Task.resetWhenFinished":
+ if e.complexity.Task.ResetWhenFinished == nil {
+ break
+ }
+
+ return e.complexity.Task.ResetWhenFinished(childComplexity), true
+
case "Task.revision":
if e.complexity.Task.Revision == nil {
break
@@ -5968,6 +6582,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Task.Status(childComplexity), true
+ case "Task.taskFiles":
+ if e.complexity.Task.TaskFiles == nil {
+ break
+ }
+
+ return e.complexity.Task.TaskFiles(childComplexity), true
+
case "Task.taskGroup":
if e.complexity.Task.TaskGroup == nil {
break
@@ -5982,6 +6603,25 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Task.TaskGroupMaxHosts(childComplexity), true
+ case "Task.taskLogs":
+ if e.complexity.Task.TaskLogs == nil {
+ break
+ }
+
+ return e.complexity.Task.TaskLogs(childComplexity), true
+
+ case "Task.tests":
+ if e.complexity.Task.Tests == nil {
+ break
+ }
+
+ args, err := ec.field_Task_tests_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Task.Tests(childComplexity, args["opts"].(*TestFilterOptions)), true
+
case "Task.timeTaken":
if e.complexity.Task.TimeTaken == nil {
break
@@ -6017,6 +6657,48 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TaskAnnotationSettings.JiraCustomFields(childComplexity), true
+ case "TaskContainerCreationOpts.arch":
+ if e.complexity.TaskContainerCreationOpts.Arch == nil {
+ break
+ }
+
+ return e.complexity.TaskContainerCreationOpts.Arch(childComplexity), true
+
+ case "TaskContainerCreationOpts.cpu":
+ if e.complexity.TaskContainerCreationOpts.CPU == nil {
+ break
+ }
+
+ return e.complexity.TaskContainerCreationOpts.CPU(childComplexity), true
+
+ case "TaskContainerCreationOpts.image":
+ if e.complexity.TaskContainerCreationOpts.Image == nil {
+ break
+ }
+
+ return e.complexity.TaskContainerCreationOpts.Image(childComplexity), true
+
+ case "TaskContainerCreationOpts.memoryMB":
+ if e.complexity.TaskContainerCreationOpts.MemoryMB == nil {
+ break
+ }
+
+ return e.complexity.TaskContainerCreationOpts.MemoryMB(childComplexity), true
+
+ case "TaskContainerCreationOpts.os":
+ if e.complexity.TaskContainerCreationOpts.Os == nil {
+ break
+ }
+
+ return e.complexity.TaskContainerCreationOpts.Os(childComplexity), true
+
+ case "TaskContainerCreationOpts.workingDir":
+ if e.complexity.TaskContainerCreationOpts.WorkingDir == nil {
+ break
+ }
+
+ return e.complexity.TaskContainerCreationOpts.WorkingDir(childComplexity), true
+
case "TaskEndDetail.description":
if e.complexity.TaskEndDetail.Description == nil {
break
@@ -6080,6 +6762,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TaskEventLogData.JiraLink(childComplexity), true
+ case "TaskEventLogData.podId":
+ if e.complexity.TaskEventLogData.PodId == nil {
+ break
+ }
+
+ return e.complexity.TaskEventLogData.PodId(childComplexity), true
+
case "TaskEventLogData.priority":
if e.complexity.TaskEventLogData.Priority == nil {
break
@@ -6360,90 +7049,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TaskQueueItem.Version(childComplexity), true
- case "TaskResult.aborted":
- if e.complexity.TaskResult.Aborted == nil {
- break
- }
-
- return e.complexity.TaskResult.Aborted(childComplexity), true
-
- case "TaskResult.baseStatus":
- if e.complexity.TaskResult.BaseStatus == nil {
- break
- }
-
- return e.complexity.TaskResult.BaseStatus(childComplexity), true
-
- case "TaskResult.baseTask":
- if e.complexity.TaskResult.BaseTask == nil {
- break
- }
-
- return e.complexity.TaskResult.BaseTask(childComplexity), true
-
- case "TaskResult.blocked":
- if e.complexity.TaskResult.Blocked == nil {
- break
- }
-
- return e.complexity.TaskResult.Blocked(childComplexity), true
-
- case "TaskResult.buildVariant":
- if e.complexity.TaskResult.BuildVariant == nil {
- break
- }
-
- return e.complexity.TaskResult.BuildVariant(childComplexity), true
-
- case "TaskResult.buildVariantDisplayName":
- if e.complexity.TaskResult.BuildVariantDisplayName == nil {
- break
- }
-
- return e.complexity.TaskResult.BuildVariantDisplayName(childComplexity), true
-
- case "TaskResult.displayName":
- if e.complexity.TaskResult.DisplayName == nil {
- break
- }
-
- return e.complexity.TaskResult.DisplayName(childComplexity), true
-
- case "TaskResult.execution":
- if e.complexity.TaskResult.Execution == nil {
- break
- }
-
- return e.complexity.TaskResult.Execution(childComplexity), true
-
- case "TaskResult.executionTasksFull":
- if e.complexity.TaskResult.ExecutionTasksFull == nil {
- break
- }
-
- return e.complexity.TaskResult.ExecutionTasksFull(childComplexity), true
-
- case "TaskResult.id":
- if e.complexity.TaskResult.ID == nil {
- break
- }
-
- return e.complexity.TaskResult.ID(childComplexity), true
-
- case "TaskResult.status":
- if e.complexity.TaskResult.Status == nil {
- break
- }
-
- return e.complexity.TaskResult.Status(childComplexity), true
-
- case "TaskResult.version":
- if e.complexity.TaskResult.Version == nil {
- break
- }
-
- return e.complexity.TaskResult.Version(childComplexity), true
-
case "TaskSpecifier.patchAlias":
if e.complexity.TaskSpecifier.PatchAlias == nil {
break
@@ -6563,6 +7168,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TestLog.URLLobster(childComplexity), true
+ case "TestLog.urlParsley":
+ if e.complexity.TestLog.URLParsley == nil {
+ break
+ }
+
+ return e.complexity.TestLog.URLParsley(childComplexity), true
+
case "TestLog.urlRaw":
if e.complexity.TestLog.URLRaw == nil {
break
@@ -6890,6 +7502,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.User.Permissions(childComplexity), true
+ case "User.subscriptions":
+ if e.complexity.User.Subscriptions == nil {
+ break
+ }
+
+ return e.complexity.User.Subscriptions(childComplexity), true
+
case "User.userId":
if e.complexity.User.UserID == nil {
break
@@ -6925,19 +7544,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.UserConfig.User(childComplexity), true
- case "UserPatches.filteredPatchCount":
- if e.complexity.UserPatches.FilteredPatchCount == nil {
- break
- }
-
- return e.complexity.UserPatches.FilteredPatchCount(childComplexity), true
-
- case "UserPatches.patches":
- if e.complexity.UserPatches.Patches == nil {
+ case "UserSettings.dateFormat":
+ if e.complexity.UserSettings.DateFormat == nil {
break
}
- return e.complexity.UserPatches.Patches(childComplexity), true
+ return e.complexity.UserSettings.DateFormat(childComplexity), true
case "UserSettings.githubUser":
if e.complexity.UserSettings.GithubUser == nil {
@@ -6960,6 +7572,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.UserSettings.Region(childComplexity), true
+ case "UserSettings.slackMemberId":
+ if e.complexity.UserSettings.SlackMemberId == nil {
+ break
+ }
+
+ return e.complexity.UserSettings.SlackMemberId(childComplexity), true
+
case "UserSettings.slackUsername":
if e.complexity.UserSettings.SlackUsername == nil {
break
@@ -7040,7 +7659,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Version.BuildVariantStats(childComplexity, args["options"].(*BuildVariantOptions)), true
+ return e.complexity.Version.BuildVariantStats(childComplexity, args["options"].(BuildVariantOptions)), true
case "Version.buildVariants":
if e.complexity.Version.BuildVariants == nil {
@@ -7052,7 +7671,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Version.BuildVariants(childComplexity, args["options"].(*BuildVariantOptions)), true
+ return e.complexity.Version.BuildVariants(childComplexity, args["options"].(BuildVariantOptions)), true
case "Version.childVersions":
if e.complexity.Version.ChildVersions == nil {
@@ -7068,6 +7687,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Version.CreateTime(childComplexity), true
+ case "Version.errors":
+ if e.complexity.Version.Errors == nil {
+ break
+ }
+
+ return e.complexity.Version.Errors(childComplexity), true
+
+ case "Version.externalLinksForMetadata":
+ if e.complexity.Version.ExternalLinksForMetadata == nil {
+ break
+ }
+
+ return e.complexity.Version.ExternalLinksForMetadata(childComplexity), true
+
case "Version.finishTime":
if e.complexity.Version.FinishTime == nil {
break
@@ -7194,18 +7827,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Version.TaskCount(childComplexity), true
- case "Version.taskStatusCounts":
- if e.complexity.Version.TaskStatusCounts == nil {
- break
- }
-
- args, err := ec.field_Version_taskStatusCounts_args(context.TODO(), rawArgs)
- if err != nil {
- return 0, false
- }
-
- return e.complexity.Version.TaskStatusCounts(childComplexity, args["options"].(*BuildVariantOptions)), true
-
case "Version.taskStatusStats":
if e.complexity.Version.TaskStatusStats == nil {
break
@@ -7216,7 +7837,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
- return e.complexity.Version.TaskStatusStats(childComplexity, args["options"].(*BuildVariantOptions)), true
+ return e.complexity.Version.TaskStatusStats(childComplexity, args["options"].(BuildVariantOptions)), true
case "Version.taskStatuses":
if e.complexity.Version.TaskStatuses == nil {
@@ -7225,6 +7846,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Version.TaskStatuses(childComplexity), true
+ case "Version.tasks":
+ if e.complexity.Version.Tasks == nil {
+ break
+ }
+
+ args, err := ec.field_Version_tasks_args(context.TODO(), rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Version.Tasks(childComplexity, args["options"].(TaskFilterOptions)), true
+
case "Version.upstreamProject":
if e.complexity.Version.UpstreamProject == nil {
break
@@ -7239,6 +7872,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Version.VersionTiming(childComplexity), true
+ case "Version.warnings":
+ if e.complexity.Version.Warnings == nil {
+ break
+ }
+
+ return e.complexity.Version.Warnings(childComplexity), true
+
+ case "VersionTasks.count":
+ if e.complexity.VersionTasks.Count == nil {
+ break
+ }
+
+ return e.complexity.VersionTasks.Count(childComplexity), true
+
+ case "VersionTasks.data":
+ if e.complexity.VersionTasks.Data == nil {
+ break
+ }
+
+ return e.complexity.VersionTasks.Data(childComplexity), true
+
case "VersionTiming.makespan":
if e.complexity.VersionTiming.Makespan == nil {
break
@@ -7323,6 +7977,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Volume.ID(childComplexity), true
+ case "Volume.migrating":
+ if e.complexity.Volume.Migrating == nil {
+ break
+ }
+
+ return e.complexity.Volume.Migrating(childComplexity), true
+
case "Volume.noExpiration":
if e.complexity.Volume.NoExpiration == nil {
break
@@ -7379,6 +8040,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.WebhookSubscriber.Headers(childComplexity), true
+ case "WebhookSubscriber.minDelayMs":
+ if e.complexity.WebhookSubscriber.MinDelayMS == nil {
+ break
+ }
+
+ return e.complexity.WebhookSubscriber.MinDelayMS(childComplexity), true
+
+ case "WebhookSubscriber.retries":
+ if e.complexity.WebhookSubscriber.Retries == nil {
+ break
+ }
+
+ return e.complexity.WebhookSubscriber.Retries(childComplexity), true
+
case "WebhookSubscriber.secret":
if e.complexity.WebhookSubscriber.Secret == nil {
break
@@ -7386,6 +8061,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.WebhookSubscriber.Secret(childComplexity), true
+ case "WebhookSubscriber.timeoutMs":
+ if e.complexity.WebhookSubscriber.TimeoutMS == nil {
+ break
+ }
+
+ return e.complexity.WebhookSubscriber.TimeoutMS(childComplexity), true
+
case "WebhookSubscriber.url":
if e.complexity.WebhookSubscriber.URL == nil {
break
@@ -7428,6 +8110,64 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
rc := graphql.GetOperationContext(ctx)
ec := executionContext{rc, e}
+ inputUnmarshalMap := graphql.BuildUnmarshalerMap(
+ ec.unmarshalInputBuildBaronSettingsInput,
+ ec.unmarshalInputBuildVariantOptions,
+ ec.unmarshalInputCommitQueueParamsInput,
+ ec.unmarshalInputContainerResourcesInput,
+ ec.unmarshalInputCopyProjectInput,
+ ec.unmarshalInputCreateProjectInput,
+ ec.unmarshalInputDisplayTask,
+ ec.unmarshalInputEditSpawnHostInput,
+ ec.unmarshalInputExternalLinkInput,
+ ec.unmarshalInputGithubUserInput,
+ ec.unmarshalInputInstanceTagInput,
+ ec.unmarshalInputIssueLinkInput,
+ ec.unmarshalInputJiraFieldInput,
+ ec.unmarshalInputJiraIssueSubscriberInput,
+ ec.unmarshalInputMainlineCommitsOptions,
+ ec.unmarshalInputMetadataLinkInput,
+ ec.unmarshalInputMoveProjectInput,
+ ec.unmarshalInputNotificationsInput,
+ ec.unmarshalInputParameterInput,
+ ec.unmarshalInputPatchConfigure,
+ ec.unmarshalInputPatchTriggerAliasInput,
+ ec.unmarshalInputPatchesInput,
+ ec.unmarshalInputPeriodicBuildInput,
+ ec.unmarshalInputProjectAliasInput,
+ ec.unmarshalInputProjectBannerInput,
+ ec.unmarshalInputProjectInput,
+ ec.unmarshalInputProjectSettingsInput,
+ ec.unmarshalInputProjectVarsInput,
+ ec.unmarshalInputPublicKeyInput,
+ ec.unmarshalInputRepoRefInput,
+ ec.unmarshalInputRepoSettingsInput,
+ ec.unmarshalInputSelectorInput,
+ ec.unmarshalInputSortOrder,
+ ec.unmarshalInputSpawnHostInput,
+ ec.unmarshalInputSpawnVolumeInput,
+ ec.unmarshalInputSubscriberInput,
+ ec.unmarshalInputSubscriptionInput,
+ ec.unmarshalInputTaskAnnotationSettingsInput,
+ ec.unmarshalInputTaskFilterOptions,
+ ec.unmarshalInputTaskSpecifierInput,
+ ec.unmarshalInputTaskSyncOptionsInput,
+ ec.unmarshalInputTestFilter,
+ ec.unmarshalInputTestFilterOptions,
+ ec.unmarshalInputTestSortOptions,
+ ec.unmarshalInputTriggerAliasInput,
+ ec.unmarshalInputUpdateVolumeInput,
+ ec.unmarshalInputUseSpruceOptionsInput,
+ ec.unmarshalInputUserSettingsInput,
+ ec.unmarshalInputVariantTasks,
+ ec.unmarshalInputVersionToRestart,
+ ec.unmarshalInputVolumeHost,
+ ec.unmarshalInputWebhookHeaderInput,
+ ec.unmarshalInputWebhookInput,
+ ec.unmarshalInputWebhookSubscriberInput,
+ ec.unmarshalInputWorkstationConfigInput,
+ ec.unmarshalInputWorkstationSetupCommandInput,
+ )
first := true
switch rc.Operation.Operation {
@@ -7437,6 +8177,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return nil
}
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
data := ec._Query(ctx, rc.Operation.SelectionSet)
var buf bytes.Buffer
data.MarshalGQL(&buf)
@@ -7451,6 +8192,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return nil
}
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
var buf bytes.Buffer
data.MarshalGQL(&buf)
@@ -7484,1736 +8226,47 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
}
-var sources = []*ast.Source{
- {Name: "graphql/schema.graphql", Input: `directive @requireSuperUser on FIELD_DEFINITION
-directive @requireProjectAccess(access: ProjectSettingsAccess!) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
-
-type Query {
- task(taskId: String!, execution: Int): Task
- taskAllExecutions(taskId: String!): [Task!]!
- patch(id: String!): Patch!
- version(id: String!): Version!
- projects: [GroupedProjects]!
- viewableProjectRefs: [GroupedProjects]!
- githubProjectConflicts(projectId: String!): GithubProjectConflicts!
- project(projectId: String!): Project!
- patchTasks(
- patchId: String!
- sorts: [SortOrder!]
- page: Int = 0
- limit: Int = 0
- statuses: [String!] = []
- baseStatuses: [String!] = []
- variant: String
- taskName: String
- includeEmptyActivation: Boolean = false
- ): PatchTasks!
- taskTests(
- taskId: String!
- execution: Int
- sortCategory: TestSortCategory = TEST_NAME
- sortDirection: SortDirection = ASC
- page: Int = 0
- limit: Int = 0
- testName: String = ""
- statuses: [String!]! = []
- groupId: String = ""
- ): TaskTestResult!
- taskTestSample(
- tasks: [String!]!
- filters: [TestFilter!]!
- ): [TaskTestResultSample!]
- taskFiles(taskId: String!, execution: Int): TaskFiles!
- user(userId: String): User!
- taskLogs(taskId: String!, execution: Int): TaskLogs!
- commitQueue(id: String!): CommitQueue!
- userSettings: UserSettings
- spruceConfig: SpruceConfig
- awsRegions: [String!]
- subnetAvailabilityZones: [String!]!
- userConfig: UserConfig
- clientConfig: ClientConfig
- host(hostId: String!): Host
- hostEvents(
- hostId: String!
- hostTag: String = ""
- limit: Int = 0
- page: Int = 0
- ): HostEvents!
- hosts(
- hostId: String = ""
- distroId: String = ""
- currentTaskId: String = ""
- statuses: [String!] = []
- startedBy: String = ""
- sortBy: HostSortBy = STATUS
- sortDir: SortDirection = ASC
- page: Int = 0
- limit: Int = 10
- ): HostsResponse!
- myHosts: [Host!]!
- myVolumes: [Volume!]!
- myPublicKeys: [PublicKey!]!
- distros(onlySpawnable: Boolean!): [Distro]!
- instanceTypes: [String!]!
- distroTaskQueue(distroId: String!): [TaskQueueItem!]!
- taskQueueDistros: [TaskQueueDistro!]!
- buildBaron(taskId: String!, execution: Int!): BuildBaron!
- bbGetCreatedTickets(taskId: String!): [JiraTicket!]!
- mainlineCommits(options: MainlineCommitsOptions!, buildVariantOptions: BuildVariantOptions): MainlineCommits
- taskNamesForBuildVariant(projectId: String!, buildVariant: String!): [String!]
- buildVariantsForTaskName(projectId: String!, taskName: String!): [BuildVariantTuple]
- projectSettings(identifier: String! @requireProjectAccess(access: VIEW)): ProjectSettings!
- repoSettings(id: String! @requireProjectAccess(access: VIEW)): RepoSettings!
- projectEvents(
- identifier: String!
- limit: Int = 0
- before: Time
- @requireProjectAccess(access: VIEW)
- ): ProjectEvents!
- repoEvents(
- id: String!
- limit: Int = 0
- before: Time
- @requireProjectAccess(access: VIEW)
- ): ProjectEvents!
- hasVersion(id: String!): Boolean!
-}
-
-type Mutation {
- addFavoriteProject(identifier: String!): Project!
- removeFavoriteProject(identifier: String!): Project!
- createProject(project: CreateProjectInput!): Project! @requireSuperUser
- copyProject(project: CopyProjectInput!): Project! @requireSuperUser
- attachProjectToNewRepo(project: MoveProjectInput!): Project!
- saveProjectSettingsForSection(projectSettings: ProjectSettingsInput, section: ProjectSettingsSection!): ProjectSettings!
- saveRepoSettingsForSection(repoSettings: RepoSettingsInput, section: ProjectSettingsSection!): RepoSettings!
- defaultSectionToRepo(projectId: String! @requireProjectAccess(access: EDIT), section: ProjectSettingsSection!): String
- attachProjectToRepo(projectId: String! @requireProjectAccess(access: EDIT)): Project!
- detachProjectFromRepo(projectId: String! @requireProjectAccess(access: EDIT)): Project!
- forceRepotrackerRun(projectId: String! @requireProjectAccess(access: EDIT)): Boolean!
- deactivateStepbackTasks(projectId: String! @requireProjectAccess(access: EDIT)): Boolean!
- schedulePatch(patchId: String!, configure: PatchConfigure!): Patch!
- schedulePatchTasks(patchId: String!): String
- unschedulePatchTasks(patchId: String!, abort: Boolean!): String
- restartVersions(versionId: String!, abort: Boolean!, versionsToRestart: [VersionToRestart!]!): [Version!]
- scheduleUndispatchedBaseTasks(patchId: String!): [Task!]
- enqueuePatch(patchId: String!, commitMessage: String): Patch!
- setPatchPriority(patchId: String!, priority: Int!): String
- scheduleTasks(taskIds: [String!]!): [Task!]!
- unscheduleTask(taskId: String!): Task!
- abortTask(taskId: String!): Task!
- setTaskPriority(taskId: String!, priority: Int!): Task!
- restartTask(taskId: String!): Task!
- saveSubscription(subscription: SubscriptionInput!): Boolean!
- editAnnotationNote(
- taskId: String!
- execution: Int!
- originalMessage: String!
- newMessage: String!
- ): Boolean!
- moveAnnotationIssue(
- taskId: String!
- execution: Int!
- apiIssue: IssueLinkInput!
- isIssue: Boolean!
- ): Boolean!
- addAnnotationIssue(
- taskId: String!
- execution: Int!
- apiIssue: IssueLinkInput!
- isIssue: Boolean!
- ): Boolean!
- removeAnnotationIssue(
- taskId: String!
- execution: Int!
- apiIssue: IssueLinkInput!
- isIssue: Boolean!
- ): Boolean!
- removeItemFromCommitQueue(commitQueueId: String!, issue: String!): String
- updateUserSettings(userSettings: UserSettingsInput): Boolean!
- restartJasper(hostIds: [String!]!): Int!
- reprovisionToNew(hostIds: [String!]!): Int!
- updateHostStatus(
- hostIds: [String!]!
- status: String!
- notes: String = ""
- ): Int!
- createPublicKey(publicKeyInput: PublicKeyInput!): [PublicKey!]!
- spawnHost(spawnHostInput: SpawnHostInput): Host!
- spawnVolume(spawnVolumeInput: SpawnVolumeInput!): Boolean!
- updateVolume(updateVolumeInput: UpdateVolumeInput!): Boolean!
- updateSpawnHostStatus(hostId: String!, action: SpawnHostStatusActions!): Host!
- removePublicKey(keyName: String!): [PublicKey!]!
- updatePublicKey(
- targetKeyName: String!
- updateInfo: PublicKeyInput!
- ): [PublicKey!]!
- attachVolumeToHost(volumeAndHost: VolumeHost!): Boolean!
- detachVolumeFromHost(volumeId: String!): Boolean!
- removeVolume(volumeId: String!): Boolean!
- editSpawnHost(spawnHost: EditSpawnHostInput): Host!
- bbCreateTicket(taskId: String!, execution: Int): Boolean!
- clearMySubscriptions: Int!
- overrideTaskDependencies(taskId: String!): Task!
-}
-
-input VersionToRestart {
- versionId: String!
- taskIds: [String!]!
-}
-
-input TestFilter {
- testName: String!
- testStatus: String!
-}
-
-# This will represent failing test results on the task history pages.
-type TaskTestResultSample {
- taskId: String!
- execution: Int!
- totalTestCount: Int!
- matchingFailedTestNames: [String!]!
-}
-
-# Array of activated and unactivated versions
-# nextPageOrderNumber represents the last order number returned and is used for pagination
-# prevPageOrderNumber represents the order number of the previous page and is also used for pagination
-type MainlineCommits {
- nextPageOrderNumber: Int
- prevPageOrderNumber: Int
- versions: [MainlineCommitVersion!]!
-}
-
-type MainlineCommitVersion {
- version: Version
- rolledUpVersions: [Version!]
-}
-
-type Version {
- id: String!
- createTime: Time!
- startTime: Time
- finishTime: Time
- message: String!
- revision: String!
- author: String!
- status: String!
- order: Int!
- repo: String!
- project: String!
- projectIdentifier: String!
- projectMetadata: Project
- branch: String!
- requester: String!
- activated: Boolean
- taskStatusCounts(options: BuildVariantOptions): [StatusCount!] @deprecated(reason: "Use taskStatusStats instead")
- taskStatusStats(options: BuildVariantOptions): TaskStats
- buildVariants(options: BuildVariantOptions): [GroupedBuildVariant]
- buildVariantStats(options: BuildVariantOptions): [GroupedTaskStatusCount!]
- isPatch: Boolean!
- patch: Patch
- childVersions: [Version]
- taskCount: Int
- baseVersion: Version
- previousVersion: Version
- versionTiming: VersionTiming
- parameters: [Parameter!]!
- taskStatuses: [String!]!
- baseTaskStatuses: [String!]!
- manifest: Manifest
- upstreamProject: UpstreamProject
-}
-
-type UpstreamProject {
- owner: String!
- repo: String!
- revision: String!
- project: String!
- triggerID: String! # This is the ID of the trigger that created the upstream version (corresponds to a task ID or build ID)
- resourceID: String! # This is the ID of the UI linkable resource that triggered the upstream version (corresponds to a task ID or version ID)
- task: Task
- version: Version
- triggerType: String!
-}
-
-type Manifest {
- id: String!
- revision: String!
- project: String!
- branch: String!
- isBase: Boolean!
- moduleOverrides: StringMap
- modules: Map
-}
-
-type VersionTiming {
- makespan: Duration
- timeTaken: Duration
-}
-
-type TaskStats {
- counts: [StatusCount!]
- eta: Time
-}
-
-type StatusCount {
- status: String!
- count: Int!
-}
-
-# Returns task counts grouped by status for a build variant
-type GroupedTaskStatusCount {
- variant: String!
- displayName: String!
- statusCounts: [StatusCount!]!
-}
-
-input BuildVariantOptions {
- variants: [String!]
- tasks: [String!]
- statuses: [String!]
- includeBaseTasks: Boolean
-}
-input MainlineCommitsOptions {
- projectID: String!
- limit: Int = 7
- skipOrderNumber: Int = 0
- # shouldCollapse is used to determine if unmatching active versions should be collapsed
- shouldCollapse: Boolean = false
- requesters: [String!]
-}
-
-type BuildVariantTuple {
- buildVariant: String!
- displayName: String!
-}
-
-enum ProjectSettingsAccess {
- EDIT
- VIEW
-}
-
-enum SpawnHostStatusActions {
- START
- STOP
- TERMINATE
-}
-enum TaskSortCategory {
- NAME
- STATUS
- BASE_STATUS
- VARIANT
- DURATION
-}
-
-enum TestSortCategory {
- BASE_STATUS
- STATUS
- START_TIME
- DURATION
- TEST_NAME
-}
-
-enum SortDirection {
- ASC
- DESC
-}
-
-enum MetStatus {
- UNMET
- MET
- PENDING
- STARTED
-}
-
-enum RequiredStatus {
- MUST_FAIL
- MUST_FINISH
- MUST_SUCCEED
-}
-
-enum HostSortBy {
- ID
- DISTRO
- CURRENT_TASK
- STATUS
- ELAPSED
- UPTIME
- IDLE_TIME
- OWNER
-}
-
-enum TaskQueueItemType {
- COMMIT
- PATCH
-}
-
-enum ProjectSettingsSection {
- GENERAL
- ACCESS
- VARIABLES
- GITHUB_AND_COMMIT_QUEUE
- NOTIFICATIONS
- PATCH_ALIASES
- WORKSTATION
- TRIGGERS
- PERIODIC_BUILDS
- PLUGINS
-}
-
-input VolumeHost {
- volumeId: String!
- hostId: String!
-}
-input PatchConfigure {
- description: String!
- variantsTasks: [VariantTasks!]!
- parameters: [ParameterInput]
- patchTriggerAliases: [String!]
-}
-input VariantTasks {
- variant: String!
- tasks: [String!]!
- displayTasks: [DisplayTask!]!
-}
-input DisplayTask {
- Name: String!
- ExecTasks: [String!]!
-}
-
-input SubscriptionInput {
- id: String
- resource_type: String
- trigger: String
- selectors: [SelectorInput!]!
- regex_selectors: [SelectorInput!]!
- subscriber: SubscriberInput!
- owner_type: String
- owner: String
- trigger_data: StringMap!
-}
-
-input UserSettingsInput {
- timezone: String
- region: String
- githubUser: GithubUserInput
- slackUsername: String
- notifications: NotificationsInput
- useSpruceOptions: UseSpruceOptionsInput
-}
-input SelectorInput {
- type: String!
- data: String!
-}
-
-input SubscriberInput {
- type: String!
- target: String!
-}
-
-input UseSpruceOptionsInput {
- hasUsedSpruceBefore: Boolean
- hasUsedMainlineCommitsBefore: Boolean
- spruceV1: Boolean
-}
-
-input PatchesInput {
- limit: Int! = 0
- page: Int! = 0
- patchName: String! = ""
- statuses: [String!]! = []
- includeCommitQueue: Boolean = false
- onlyCommitQueue: Boolean = false
-}
-
-input CreateProjectInput {
- identifier: String!
- owner: String!
- repo: String!
- repoRefId: String
- id: String
-}
-
-input CopyProjectInput {
- projectIdToCopy: String!
- newProjectIdentifier: String!
- newProjectId: String
-}
-
-input MoveProjectInput {
- projectId: String! @requireProjectAccess(access: EDIT)
- newOwner: String!
- newRepo: String!
-}
-
-input ProjectSettingsInput {
- githubWebhooksEnabled: Boolean
- projectRef: ProjectInput
- vars: ProjectVarsInput
- aliases: [ProjectAliasInput!]
- subscriptions: [SubscriptionInput!]
-}
-
-input ProjectInput {
- id: String! @requireProjectAccess(access: EDIT)
- identifier: String
- displayName: String
- enabled: Boolean
- private: Boolean
- restricted: Boolean
- owner: String
- repo: String
- branch: String
- remotePath: String
- patchingDisabled: Boolean
- repotrackerDisabled: Boolean
- dispatchingDisabled: Boolean
- versionControlEnabled: Boolean
- prTestingEnabled: Boolean
- manualPrTestingEnabled: Boolean
- githubChecksEnabled: Boolean
- batchTime: Int
- deactivatePrevious: Boolean
- defaultLogger: String
- notifyOnBuildFailure: Boolean
- triggers: [TriggerAliasInput!]
- patchTriggerAliases: [PatchTriggerAliasInput!]
- githubTriggerAliases: [String]
- periodicBuilds: [PeriodicBuildInput!]
- cedarTestResultsEnabled: Boolean
- commitQueue: CommitQueueParamsInput
- admins: [String!]
- spawnHostScriptPath: String
- tracksPushEvents: Boolean
- taskSync: TaskSyncOptionsInput
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean
- workstationConfig: WorkstationConfigInput
- perfEnabled: Boolean
- buildBaronSettings: BuildBaronSettingsInput
- taskAnnotationSettings: TaskAnnotationSettingsInput
-}
-
-
-input RepoSettingsInput {
- githubWebhooksEnabled: Boolean
- projectRef: RepoRefInput ## use the repo ref here in order to have stronger types
- vars: ProjectVarsInput
- aliases: [ProjectAliasInput!]
- subscriptions: [SubscriptionInput!]
-}
-
-input RepoRefInput {
- id: String! @requireProjectAccess(access: EDIT)
- displayName: String
- enabled: Boolean
- private: Boolean
- restricted: Boolean
- owner: String
- repo: String
- branch: String
- remotePath: String
- patchingDisabled: Boolean
- repotrackerDisabled: Boolean
- dispatchingDisabled: Boolean
- versionControlEnabled: Boolean
- prTestingEnabled: Boolean
- manualPrTestingEnabled: Boolean
- githubChecksEnabled: Boolean
- batchTime: Int
- deactivatePrevious: Boolean
- defaultLogger: String
- notifyOnBuildFailure: Boolean
- triggers: [TriggerAliasInput!]
- patchTriggerAliases: [PatchTriggerAliasInput!]
- githubTriggerAliases: [String!]
- periodicBuilds: [PeriodicBuildInput!]
- cedarTestResultsEnabled: Boolean
- commitQueue: CommitQueueParamsInput
- admins: [String!]
- spawnHostScriptPath: String
- tracksPushEvents: Boolean
- taskSync: TaskSyncOptionsInput
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean
- workstationConfig: WorkstationConfigInput
- perfEnabled: Boolean
- buildBaronSettings: BuildBaronSettingsInput
- taskAnnotationSettings: TaskAnnotationSettingsInput
-}
-
-input TriggerAliasInput {
- project: String!
- level: String!
- buildVariantRegex: String!
- taskRegex: String!
- status: String!
- dateCutoff: Int!
- configFile: String!
- alias: String!
-}
-
-input PeriodicBuildInput {
- id: String!
- configFile: String!
- intervalHours: Int!
- alias: String!
- message: String!
- nextRunTime: Time!
-}
-
-input CommitQueueParamsInput {
- enabled: Boolean
- requireSigned: Boolean
- mergeMethod: String
- message: String
-}
-
-input TaskSyncOptionsInput {
- configEnabled: Boolean
- patchEnabled: Boolean
-}
-
-input BuildBaronSettingsInput {
- ticketCreateProject: String!
- ticketSearchProjects: [String!]
- bfSuggestionServer: String
- bfSuggestionUsername: String
- bfSuggestionPassword: String
- bfSuggestionTimeoutSecs: Int
- bfSuggestionFeaturesURL: String
-}
-
-input TaskAnnotationSettingsInput {
- jiraCustomFields: [JiraFieldInput!]
- fileTicketWebhook: WebhookInput
-}
-
-input JiraFieldInput {
- field: String!
- displayText: String!
-}
-
-input WebhookInput {
- endpoint: String!
- secret: String!
-}
-
-input WorkstationConfigInput {
- setupCommands: [WorkstationSetupCommandInput!]
- gitClone: Boolean
-}
-
-input WorkstationSetupCommandInput {
- command: String!
- directory: String
-}
-
-input PatchTriggerAliasInput {
- alias: String!
- childProjectIdentifier: String!
- taskSpecifiers: [TaskSpecifierInput!]!
- status: String
- parentAsModule: String
-}
-
-input TaskSpecifierInput {
- patchAlias: String!
- taskRegex: String!
- variantRegex: String!
-}
-
-input ProjectVarsInput {
- vars: StringMap
- privateVarsList: [String]
- adminOnlyVarsList: [String]
-}
-
-input VariantTaskInput {
- name: String!
- tasks: [String!]!
-}
-
-input ProjectAliasInput {
- id: String!
- alias: String!
- gitTag: String!
- variant: String!
- task: String!
- remotePath: String!
- variantTags: [String!]!
- taskTags: [String!]!
-}
-
-input SpawnHostInput {
- distroId: String!
- region: String!
- savePublicKey: Boolean!
- publicKey: PublicKeyInput!
- userDataScript: String
- expiration: Time
- noExpiration: Boolean!
- setUpScript: String
- isVirtualWorkStation: Boolean!
- homeVolumeSize: Int
- volumeId: String
- taskId: String
- useProjectSetupScript: Boolean
- useTaskConfig: Boolean
- spawnHostsStartedByTask: Boolean
- taskSync: Boolean
-}
-
-input EditSpawnHostInput {
- hostId: String!
- displayName: String
- expiration: Time
- noExpiration: Boolean
- instanceType: String
- addedInstanceTags: [InstanceTagInput!]
- deletedInstanceTags: [InstanceTagInput!]
- volume: String
- servicePassword: String
- publicKey: PublicKeyInput
- savePublicKey: Boolean
-}
-
-input SpawnVolumeInput {
- availabilityZone: String!
- size: Int!
- type: String!
- expiration: Time
- noExpiration: Boolean
- host: String
-}
-
-input UpdateVolumeInput {
- expiration: Time
- noExpiration: Boolean
- name: String
- volumeId: String!
-}
-
-input IssueLinkInput {
- url: String!
- issueKey: String!
- confidenceScore: Float
-}
-
-input SortOrder {
- Key: TaskSortCategory!
- Direction: SortDirection!
-}
-
-type TaskQueueItem {
- id: ID!
- displayName: String!
- project: String!
- buildVariant: String!
- expectedDuration: Duration!
- priority: Int!
- revision: String!
- requester: TaskQueueItemType!
- version: String!
-}
-
-type TaskQueueDistro {
- id: ID!
- taskCount: Int!
- hostCount: Int!
-}
-
-type Host {
- homeVolume: Volume
- id: ID!
- hostUrl: String!
- tag: String!
- distroId: String
- status: String!
- runningTask: TaskInfo
- totalIdleTime: Duration
- uptime: Time # host creation time
- elapsed: Time # running task start time
- startedBy: String!
- provider: String!
- lastCommunicationTime: Time
- noExpiration: Boolean!
- instanceType: String
- homeVolumeID: String
- volumes: [Volume!]!
- user: String
- distro: DistroInfo
- availabilityZone: String
- instanceTags: [InstanceTag!]!
- expiration: Time
- displayName: String
-}
-
-type InstanceTag {
- key: String!
- value: String!
- canBeModified: Boolean!
-}
-
-input InstanceTagInput {
- key: String!
- value: String!
-}
-type DistroInfo {
- id: String
- workDir: String
- isVirtualWorkStation: Boolean
- user: String
- isWindows: Boolean
- bootstrapMethod: String
-}
-
-type Distro {
- name: String
- userSpawnAllowed: Boolean
- workDir: String
- user: String
- isVirtualWorkStation: Boolean!
-}
-
-type TaskInfo {
- id: ID
- name: String
-}
-
-type HostsResponse {
- filteredHostsCount: Int
- totalHostsCount: Int!
- hosts: [Host!]!
-}
-
-type PatchTasks {
- tasks: [Task!]!
- count: Int!
-}
-
-type GroupedBuildVariant {
- variant: String!
- displayName: String!
- tasks: [Task]
-}
-
-type TaskFiles {
- fileCount: Int!
- groupedFiles: [GroupedFiles!]!
-}
-
-type GroupedFiles {
- taskName: String
- files: [File!]
-}
-
-type ModuleCodeChange {
- branchName: String!
- htmlLink: String!
- rawLink: String!
- fileDiffs: [FileDiff!]!
-}
-
-type FileDiff {
- fileName: String!
- additions: Int!
- deletions: Int!
- diffLink: String!
- description: String!
-}
-
-type ChildPatchAlias {
- alias: String!
- patchId: String!
-}
-
-type PatchTriggerAlias {
- alias: String!
- childProjectId: String!
- childProjectIdentifier: String!
- taskSpecifiers: [TaskSpecifier!]
- status: String
- parentAsModule: String
- variantsTasks: [VariantTask!]!
-}
-
-type UserPatches {
- patches: [Patch!]!
- filteredPatchCount: Int!
-}
-
-type Patches {
- patches: [Patch!]!
- filteredPatchCount: Int!
-}
-
-type Patch {
- createTime: Time
- id: ID!
- description: String!
- projectID: String!
- projectIdentifier: String!
- githash: String!
- patchNumber: Int!
- author: String!
- authorDisplayName: String!
- versionFull: Version
- status: String!
- variants: [String!]!
- tasks: [String!]!
- childPatches: [Patch!]
- childPatchAliases: [ChildPatchAlias!]
- variantsTasks: [VariantTask]!
- activated: Boolean!
- alias: String
- duration: PatchDuration
- time: PatchTime
- taskCount: Int
- baseVersionID: String @deprecated(reason: "Use versionFull.baseVersion.id instead")
- parameters: [Parameter!]!
- moduleCodeChanges: [ModuleCodeChange!]!
- project: PatchProject
- builds: [Build!]!
- commitQueuePosition: Int
- taskStatuses: [String!]!
- baseTaskStatuses: [String!]!
- canEnqueueToCommitQueue: Boolean!
- patchTriggerAliases: [PatchTriggerAlias!]!
-}
-
-type Build {
- id: String!
- buildVariant: String!
- status: String!
- predictedMakespan: Duration!
- actualMakespan: Duration!
-}
-
-type Volume {
- id: String!
- displayName: String!
- createdBy: String!
- type: String!
- availabilityZone: String!
- size: Int!
- expiration: Time
- deviceName: String
- hostID: String!
- noExpiration: Boolean!
- homeVolume: Boolean!
- host: Host
- creationTime: Time
-}
-
-type PatchProject {
- variants: [ProjectBuildVariant!]!
-}
-type ProjectBuildVariant {
- name: String!
- displayName: String!
- tasks: [String!]!
-}
-
-type Parameter {
- key: String!
- value: String!
-}
-
-input ParameterInput {
- key: String!
- value: String!
-}
-
-type TaskResult {
- id: ID!
- execution: Int!
- aborted: Boolean!
- displayName: String!
- version: String!
- status: String!
- baseStatus: String
- baseTask: BaseTaskResult
- buildVariant: String!
- buildVariantDisplayName: String!
- blocked: Boolean!
- executionTasksFull: [Task!]
-}
-
-type BaseTaskResult {
- id: ID!
- status: String!
-}
-
-type PatchDuration {
- makespan: String
- timeTaken: String
- time: PatchTime
-}
-
-type PatchTime {
- started: String
- finished: String
- submittedAt: String!
-}
-
-type VariantTask {
- name: String!
- tasks: [String!]!
-}
-
-type TaskLogLinks {
- allLogLink: String
- agentLogLink: String
- systemLogLink: String
- taskLogLink: String
- eventLogLink: String
-}
-
-type TaskEndDetail {
- status: String!
- type: String!
- description: String
- timedOut: Boolean
- timeoutType: String
- oomTracker: OomTrackerInfo!
-}
-
-type OomTrackerInfo {
- detected: Boolean!
- pids: [Int]
-}
-
-type TaskTestResult {
- totalTestCount: Int!
- filteredTestCount: Int!
- testResults: [TestResult!]!
-}
-
-type TestResult {
- id: String!
- groupID: String
- status: String!
- baseStatus: String
- testFile: String!
- logs: TestLog!
- exitCode: Int
- startTime: Time
- duration: Float
- endTime: Time
- taskId: String
- execution: Int
-}
-
-type TestLog {
- url: String
- urlRaw: String
- urlLobster: String
- lineNum: Int
-}
-
-type Dependency {
- name: String!
- metStatus: MetStatus!
- requiredStatus: RequiredStatus!
- buildVariant: String!
- taskId: String!
-}
-
-
-type AbortInfo {
- user: String!
- taskID: String!
- taskDisplayName: String!
- buildVariantDisplayName: String!
- newVersion: String!
- prClosed: Boolean!
-}
-
-type Task {
- aborted: Boolean!
- abortInfo: AbortInfo
- activated: Boolean!
- activatedBy: String
- activatedTime: Time
- ami: String
- annotation: Annotation
- baseTask: Task
- baseStatus: String
- blocked: Boolean!
- buildId: String!
- buildVariant: String!
- buildVariantDisplayName: String
- canAbort: Boolean!
- canModifyAnnotation: Boolean!
- canRestart: Boolean!
- canSchedule: Boolean!
- canSetPriority: Boolean!
- canSync: Boolean!
- canUnschedule: Boolean!
- createTime: Time
- details: TaskEndDetail
- dispatchTime: Time
- displayName: String!
- displayOnly: Boolean
- displayTask: Task
- distroId: String!
- estimatedStart: Duration
- execution: Int!
- executionTasks: [String!]
- executionTasksFull: [Task!]
- expectedDuration: Duration
- failedTestCount: Int!
- finishTime: Time
- generatedBy: String
- generatedByName: String
- generateTask: Boolean
- hostId: String
- id: String!
- ingestTime: Time
- isPerfPluginEnabled: Boolean!
- latestExecution: Int!
- logs: TaskLogLinks!
- minQueuePosition: Int!
- patch: Patch
- patchNumber: Int
- priority: Int
- project: Project
- projectId: String!
- projectIdentifier: String
- dependsOn: [Dependency!]
- canOverrideDependencies: Boolean!
- requester: String!
- revision: String
- scheduledTime: Time
- containerAllocatedTime: Time
- spawnHostLink: String
- startTime: Time
- status: String!
- taskGroup: String
- taskGroupMaxHosts: Int
- timeTaken: Duration
- totalTestCount: Int!
- versionMetadata: Version!
- order: Int!
-}
-
-type BaseTaskInfo {
- id: String
- status: String
-}
-
-type GroupedProjects {
- groupDisplayName: String!
- name: String! @deprecated(reason: "name is deprecated. Use groupDisplayName instead.")
- repo: RepoRef
- projects: [Project!]!
-}
-
-type Permissions {
- userId: String!
- canCreateProject: Boolean!
-}
-
-type GithubProjectConflicts {
- commitQueueIdentifiers: [String!]
- prTestingIdentifiers: [String!]
- commitCheckIdentifiers: [String!]
-}
-
-type ProjectSettings {
- githubWebhooksEnabled: Boolean!
- projectRef: Project
- vars: ProjectVars
- aliases: [ProjectAlias!]
- subscriptions: [ProjectSubscription!]
-}
-
-type ProjectEventSettings{
- githubWebhooksEnabled: Boolean!
- projectRef: Project
- vars: ProjectVars
- aliases: [ProjectAlias!]
- subscriptions: [ProjectSubscription!]
-}
-
-type RepoSettings {
- githubWebhooksEnabled: Boolean!
- projectRef: RepoRef ## use the repo ref here in order to have stronger types
- vars: ProjectVars
- aliases: [ProjectAlias!]
- subscriptions: [ProjectSubscription!]
-}
-
-## ProjectEvents is used for any event that has the PROJECT type.
-## Although RepoSettings uses RepoRef in practice to have stronger types, this can't be enforced
-## for event logs because new fields could always be introduced that don't exist in the old event logs.
-type ProjectEvents {
- eventLogEntries: [ProjectEventLogEntry!]!
- count: Int!
-}
-
-type ProjectEventLogEntry {
- timestamp: Time!
- user: String!
- before: ProjectEventSettings
- after: ProjectEventSettings
-}
-
-type ProjectVars {
- vars: StringMap
- privateVars: [String]
- adminOnlyVars: [String]
-}
-
-type ProjectAlias {
- id: String!
- alias: String!
- gitTag: String!
- variant: String!
- task: String!
- remotePath: String!
- variantTags: [String!]!
- taskTags: [String!]!
-}
-
-type ProjectSubscription {
- id: String!
- resourceType: String!
- trigger: String!
- selectors: [Selector!]!
- regexSelectors: [Selector!]!
- subscriber: ProjectSubscriber
- ownerType: String!
- triggerData: StringMap
- }
-
-type Selector {
- type: String!
- data: String!
-}
-
-type ProjectSubscriber {
- type: String!
- subscriber: Subscriber!
-
-}
-
-type Subscriber {
- githubPRSubscriber: GithubPRSubscriber
- githubCheckSubscriber: GithubCheckSubscriber
- webhookSubscriber: WebhookSubscriber
- jiraIssueSubscriber: JiraIssueSubscriber
- jiraCommentSubscriber: String
- emailSubscriber: String
- slackSubscriber: String
-}
-
-type GithubPRSubscriber {
- owner: String!
- repo: String!
- ref: String!
- prNumber: Int
-}
-
-type GithubCheckSubscriber {
- owner: String!
- repo: String!
- ref: String!
-}
-
-type JiraIssueSubscriber {
- project: String!
- issueType: String!
-}
-
-type WebhookSubscriber {
- url: String!
- secret: String!
- headers: [WebhookHeader]!
-}
-
-type WebhookHeader {
- key: String!
- value: String!
-}
-
-type Project {
- id: String!
- identifier: String!
- displayName: String!
- enabled: Boolean
- private: Boolean
- restricted: Boolean
- owner: String!
- repo: String!
- branch: String!
- remotePath: String!
- patchingDisabled: Boolean
- repotrackerDisabled: Boolean
- dispatchingDisabled: Boolean
- versionControlEnabled: Boolean
- prTestingEnabled: Boolean
- manualPrTestingEnabled: Boolean
- githubChecksEnabled: Boolean
- batchTime: Int!
- deactivatePrevious: Boolean
- defaultLogger: String!
- notifyOnBuildFailure: Boolean
- triggers: [TriggerAlias!]
- patchTriggerAliases: [PatchTriggerAlias!]
- githubTriggerAliases: [String!]
- periodicBuilds: [PeriodicBuild!]
- cedarTestResultsEnabled: Boolean
- commitQueue: CommitQueueParams!
- admins: [String]
- spawnHostScriptPath: String!
- tracksPushEvents: Boolean
- taskSync: TaskSyncOptions!
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean
- workstationConfig: WorkstationConfig!
- perfEnabled: Boolean
- buildBaronSettings: BuildBaronSettings!
- taskAnnotationSettings: TaskAnnotationSettings!
-
- hidden: Boolean
- repoRefId: String!
-
- isFavorite: Boolean!
- validDefaultLoggers: [String!]!
- patches(patchesInput: PatchesInput!): Patches!
-}
-
-## repo types have booleans defaulted, and so these are required.
-
-type RepoRef {
- id: String!
-
- displayName: String!
- enabled: Boolean!
- private: Boolean!
- restricted: Boolean!
- owner: String!
- repo: String!
- branch: String!
- remotePath: String!
- patchingDisabled: Boolean!
- repotrackerDisabled: Boolean!
- dispatchingDisabled: Boolean!
- versionControlEnabled: Boolean!
- prTestingEnabled: Boolean!
- manualPrTestingEnabled: Boolean!
- githubChecksEnabled: Boolean!
- batchTime: Int!
- deactivatePrevious: Boolean!
- defaultLogger: String!
- notifyOnBuildFailure: Boolean!
- triggers: [TriggerAlias!]!
- patchTriggerAliases: [PatchTriggerAlias!]
- githubTriggerAliases: [String!]
- periodicBuilds: [PeriodicBuild!]
- cedarTestResultsEnabled: Boolean!
- commitQueue: RepoCommitQueueParams!
- admins: [String!]!
- spawnHostScriptPath: String!
- tracksPushEvents: Boolean!
- taskSync: RepoTaskSyncOptions!
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean!
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean!
- workstationConfig: RepoWorkstationConfig!
- perfEnabled: Boolean!
- buildBaronSettings: BuildBaronSettings!
- taskAnnotationSettings: TaskAnnotationSettings!
-
- validDefaultLoggers: [String!]!
-}
-
-type TriggerAlias {
- project: String!
- level: String!
- buildVariantRegex: String!
- taskRegex: String!
- status: String!
- dateCutoff: Int!
- configFile: String!
- alias: String!
-}
-
-
-type PeriodicBuild {
- id: String!
- configFile: String!
- intervalHours: Int!
- alias: String!
- message: String!
- nextRunTime: Time!
-}
-
-type CommitQueueParams {
- enabled: Boolean
- requireSigned: Boolean
- mergeMethod: String!
- message: String!
-}
-
-type RepoCommitQueueParams {
- enabled: Boolean!
- requireSigned: Boolean!
- mergeMethod: String!
- message: String!
-}
-
-type TaskSyncOptions {
- configEnabled: Boolean
- patchEnabled: Boolean
-}
-
-type RepoTaskSyncOptions {
- configEnabled: Boolean!
- patchEnabled: Boolean!
-}
-
-type WorkstationConfig {
- setupCommands: [WorkstationSetupCommand!]
- gitClone: Boolean
-}
-
-type BuildBaronSettings {
- ticketCreateProject: String!
- ticketSearchProjects: [String!]
- bfSuggestionServer: String
- bfSuggestionUsername: String
- bfSuggestionPassword: String
- bfSuggestionTimeoutSecs: Int
- bfSuggestionFeaturesURL: String
-}
-
-type TaskAnnotationSettings {
- jiraCustomFields: [JiraField!]
- fileTicketWebhook: Webhook!
-}
-
-type JiraField {
- field: String!
- displayText: String!
-}
-
-type Webhook {
- endpoint: String!
- secret: String!
-}
-
-type RepoWorkstationConfig {
- setupCommands: [WorkstationSetupCommand!]
- gitClone: Boolean!
-}
-
-type WorkstationSetupCommand {
- command: String!
- directory: String!
-}
-
-type TaskSpecifier {
- patchAlias: String!
- taskRegex: String!
- variantRegex: String!
-}
-
-type File {
- name: String!
- link: String!
- visibility: String!
-}
-
-type User {
- displayName: String!
- userId: String!
- emailAddress: String!
- patches(patchesInput: PatchesInput!): Patches!
- permissions: Permissions!
-}
-
-type TaskLogs {
- taskId: String!
- execution: Int!
- defaultLogger: String!
- eventLogs: [TaskEventLogEntry!]!
- taskLogs: [LogMessage!]!
- systemLogs: [LogMessage!]!
- agentLogs: [LogMessage!]!
- allLogs: [LogMessage!]!
-}
-
-type TaskEventLogData {
- hostId: String
- jiraIssue: String
- jiraLink: String
- priority: Int
- status: String
- timestamp: Time
- userId: String
-}
-
-type TaskEventLogEntry {
- id: String!
- resourceType: String!
- processedAt: Time!
- timestamp: Time
- eventType: String
- data: TaskEventLogData!
- resourceId: String!
-}
-
-type LogMessage {
- type: String
- severity: String
- message: String
- timestamp: Time
- version: Int
-}
-
-type CommitQueue {
- projectId: String
- message: String
- owner: String
- repo: String
- queue: [CommitQueueItem!]
-}
-
-type CommitQueueItem {
- issue: String
- version: String
- enqueueTime: Time
- patch: Patch
- source: String
- modules: [Module!]
-}
-
-type Module {
- module: String
- issue: String
-}
-
-type UserSettings {
- timezone: String
- region: String
- githubUser: GithubUser
- slackUsername: String
- notifications: Notifications
- useSpruceOptions: UseSpruceOptions
-}
-
-type UseSpruceOptions {
- hasUsedSpruceBefore: Boolean
- hasUsedMainlineCommitsBefore: Boolean
- spruceV1: Boolean
-}
-
-input GithubUserInput {
- lastKnownAs: String
-}
-type GithubUser {
- uid: Int
- lastKnownAs: String
-}
-input NotificationsInput {
- buildBreak: String
- patchFinish: String
- patchFirstFailure: String
- spawnHostExpiration: String
- spawnHostOutcome: String
- commitQueue: String
-}
-type Notifications {
- buildBreak: String
- patchFinish: String
- patchFirstFailure: String
- spawnHostExpiration: String
- spawnHostOutcome: String
- commitQueue: String
-}
-type UserConfig {
- user: String!
- api_key: String!
- api_server_host: String!
- ui_server_host: String!
-}
-
-input PublicKeyInput {
- name: String!
- key: String!
-}
-
-type PublicKey {
- name: String!
- key: String!
-}
-
-type ClientConfig {
- clientBinaries: [ClientBinary!]
- latestRevision: String
-}
-
-type ClientBinary {
- arch: String
- os: String
- url: String
- displayName: String
-}
-
-type SpruceConfig {
- ui: UIConfig
- jira: JiraConfig
- banner: String
- bannerTheme: String
- githubOrgs: [String!]!
- providers: CloudProviderConfig
- spawnHost: SpawnHostConfig!
-}
+//go:embed "schema/directives.graphql" "schema/mutation.graphql" "schema/query.graphql" "schema/scalars.graphql" "schema/types/annotation.graphql" "schema/types/commit_queue.graphql" "schema/types/config.graphql" "schema/types/host.graphql" "schema/types/issue_link.graphql" "schema/types/logkeeper.graphql" "schema/types/mainline_commits.graphql" "schema/types/patch.graphql" "schema/types/permissions.graphql" "schema/types/pod.graphql" "schema/types/project.graphql" "schema/types/project_settings.graphql" "schema/types/project_subscriber.graphql" "schema/types/project_vars.graphql" "schema/types/repo_ref.graphql" "schema/types/repo_settings.graphql" "schema/types/spawn.graphql" "schema/types/subscriptions.graphql" "schema/types/task.graphql" "schema/types/task_logs.graphql" "schema/types/task_queue_item.graphql" "schema/types/ticket_fields.graphql" "schema/types/user.graphql" "schema/types/version.graphql" "schema/types/volume.graphql"
+var sourcesFS embed.FS
-type JiraConfig {
- host: String
-}
-
-type UIConfig {
- userVoice: String
- defaultProject: String!
-}
-
-type CloudProviderConfig {
- aws: AWSConfig
-}
-
-type AWSConfig {
- maxVolumeSizePerUser: Int
-}
-
-type SpawnHostConfig {
- unexpirableHostsPerUser: Int!
- unexpirableVolumesPerUser: Int!
- spawnHostsPerUser: Int!
-}
-
-type HostEvents {
- eventLogEntries: [HostEventLogEntry!]!
- count: Int!
-}
-
-type HostEventLogEntry {
- id: String!
- resourceType: String!
- processedAt: Time!
- timestamp: Time
- eventType: String
- data: HostEventLogData!
- resourceId: String!
-}
-
-type HostEventLogData {
- agentRevision: String!
- agentBuild: String!
- jasperRevision: String!
- oldStatus: String!
- newStatus: String!
- logs: String!
- hostname: String!
- provisioningMethod: String!
- taskId: String!
- taskPid: String!
- taskStatus: String!
- execution: String!
- monitorOp: String!
- user: String!
- successful: Boolean!
- duration: Duration!
-}
-
-type BuildBaron {
- searchReturnInfo: SearchReturnInfo
- buildBaronConfigured: Boolean!
- bbTicketCreationDefined: Boolean!
-}
-
-# build baron plugin
-type SearchReturnInfo {
- issues: [JiraTicket!]!
- search: String!
- source: String!
- featuresURL: String!
-}
-type JiraTicket {
- key: String!
- fields: TicketFields!
-}
-
-type TicketFields {
- summary: String!
- assigneeDisplayName: String
- resolutionName: String
- created: String!
- updated: String!
- status: JiraStatus!
- assignedTeam: String
-}
-
-type JiraStatus {
- id: String!
- name: String!
-}
-
-type Annotation {
- id: String!
- taskId: String!
- taskExecution: Int!
- note: Note
- issues: [IssueLink]
- suspectedIssues: [IssueLink]
- createdIssues: [IssueLink]
- webhookConfigured: Boolean!
-}
-
-type Note {
- message: String!
- source: Source!
-}
-
-type IssueLink {
- issueKey: String
- url: String
- source: Source
- jiraTicket: JiraTicket
- confidenceScore: Float
-}
-
-type Source {
- author: String!
- time: Time!
- requester: String!
+func sourceData(filename string) string {
+ data, err := sourcesFS.ReadFile(filename)
+ if err != nil {
+ panic(fmt.Sprintf("codegen problem: %s not available", filename))
+ }
+ return string(data)
}
-scalar Time
-scalar Duration
-scalar StringMap
-scalar Map
-`, BuiltIn: false},
+var sources = []*ast.Source{
+ {Name: "schema/directives.graphql", Input: sourceData("schema/directives.graphql"), BuiltIn: false},
+ {Name: "schema/mutation.graphql", Input: sourceData("schema/mutation.graphql"), BuiltIn: false},
+ {Name: "schema/query.graphql", Input: sourceData("schema/query.graphql"), BuiltIn: false},
+ {Name: "schema/scalars.graphql", Input: sourceData("schema/scalars.graphql"), BuiltIn: false},
+ {Name: "schema/types/annotation.graphql", Input: sourceData("schema/types/annotation.graphql"), BuiltIn: false},
+ {Name: "schema/types/commit_queue.graphql", Input: sourceData("schema/types/commit_queue.graphql"), BuiltIn: false},
+ {Name: "schema/types/config.graphql", Input: sourceData("schema/types/config.graphql"), BuiltIn: false},
+ {Name: "schema/types/host.graphql", Input: sourceData("schema/types/host.graphql"), BuiltIn: false},
+ {Name: "schema/types/issue_link.graphql", Input: sourceData("schema/types/issue_link.graphql"), BuiltIn: false},
+ {Name: "schema/types/logkeeper.graphql", Input: sourceData("schema/types/logkeeper.graphql"), BuiltIn: false},
+ {Name: "schema/types/mainline_commits.graphql", Input: sourceData("schema/types/mainline_commits.graphql"), BuiltIn: false},
+ {Name: "schema/types/patch.graphql", Input: sourceData("schema/types/patch.graphql"), BuiltIn: false},
+ {Name: "schema/types/permissions.graphql", Input: sourceData("schema/types/permissions.graphql"), BuiltIn: false},
+ {Name: "schema/types/pod.graphql", Input: sourceData("schema/types/pod.graphql"), BuiltIn: false},
+ {Name: "schema/types/project.graphql", Input: sourceData("schema/types/project.graphql"), BuiltIn: false},
+ {Name: "schema/types/project_settings.graphql", Input: sourceData("schema/types/project_settings.graphql"), BuiltIn: false},
+ {Name: "schema/types/project_subscriber.graphql", Input: sourceData("schema/types/project_subscriber.graphql"), BuiltIn: false},
+ {Name: "schema/types/project_vars.graphql", Input: sourceData("schema/types/project_vars.graphql"), BuiltIn: false},
+ {Name: "schema/types/repo_ref.graphql", Input: sourceData("schema/types/repo_ref.graphql"), BuiltIn: false},
+ {Name: "schema/types/repo_settings.graphql", Input: sourceData("schema/types/repo_settings.graphql"), BuiltIn: false},
+ {Name: "schema/types/spawn.graphql", Input: sourceData("schema/types/spawn.graphql"), BuiltIn: false},
+ {Name: "schema/types/subscriptions.graphql", Input: sourceData("schema/types/subscriptions.graphql"), BuiltIn: false},
+ {Name: "schema/types/task.graphql", Input: sourceData("schema/types/task.graphql"), BuiltIn: false},
+ {Name: "schema/types/task_logs.graphql", Input: sourceData("schema/types/task_logs.graphql"), BuiltIn: false},
+ {Name: "schema/types/task_queue_item.graphql", Input: sourceData("schema/types/task_queue_item.graphql"), BuiltIn: false},
+ {Name: "schema/types/ticket_fields.graphql", Input: sourceData("schema/types/ticket_fields.graphql"), BuiltIn: false},
+ {Name: "schema/types/user.graphql", Input: sourceData("schema/types/user.graphql"), BuiltIn: false},
+ {Name: "schema/types/version.graphql", Input: sourceData("schema/types/version.graphql"), BuiltIn: false},
+ {Name: "schema/types/volume.graphql", Input: sourceData("schema/types/volume.graphql"), BuiltIn: false},
}
var parsedSchema = gqlparser.MustLoadSchema(sources...)
@@ -9400,12 +8453,36 @@ func (ec *executionContext) field_Mutation_copyProject_args(ctx context.Context,
var arg0 data.CopyProjectOpts
if tmp, ok := rawArgs["project"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project"))
- arg0, err = ec.unmarshalNCopyProjectInput2githubácomáevergreenáciáevergreenárestádataáCopyProjectOpts(ctx, tmp)
+ directive0 := func(ctx context.Context) (interface{}, error) {
+ return ec.unmarshalNCopyProjectInput2githubácomáevergreenáciáevergreenárestádataáCopyProjectOpts(ctx, tmp)
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.CanCreateProject == nil {
+ return nil, errors.New("directive canCreateProject is not implemented")
+ }
+ return ec.directives.CanCreateProject(ctx, rawArgs, directive0)
+ }
+
+ tmp, err = directive1(ctx)
if err != nil {
- return nil, err
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if data, ok := tmp.(data.CopyProjectOpts); ok {
+ arg0 = data
+ } else {
+ return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/data.CopyProjectOpts`, tmp))
}
}
args["project"] = arg0
+ var arg1 *bool
+ if tmp, ok := rawArgs["requestS3Creds"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requestS3Creds"))
+ arg1, err = ec.unmarshalOBoolean2ábool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["requestS3Creds"] = arg1
return args, nil
}
@@ -9415,12 +8492,36 @@ func (ec *executionContext) field_Mutation_createProject_args(ctx context.Contex
var arg0 model.APIProjectRef
if tmp, ok := rawArgs["project"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project"))
- arg0, err = ec.unmarshalNCreateProjectInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, tmp)
+ directive0 := func(ctx context.Context) (interface{}, error) {
+ return ec.unmarshalNCreateProjectInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, tmp)
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.CanCreateProject == nil {
+ return nil, errors.New("directive canCreateProject is not implemented")
+ }
+ return ec.directives.CanCreateProject(ctx, rawArgs, directive0)
+ }
+
+ tmp, err = directive1(ctx)
if err != nil {
- return nil, err
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if data, ok := tmp.(model.APIProjectRef); ok {
+ arg0 = data
+ } else {
+ return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APIProjectRef`, tmp))
}
}
args["project"] = arg0
+ var arg1 *bool
+ if tmp, ok := rawArgs["requestS3Creds"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requestS3Creds"))
+ arg1, err = ec.unmarshalOBoolean2ábool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["requestS3Creds"] = arg1
return args, nil
}
@@ -9439,12 +8540,30 @@ func (ec *executionContext) field_Mutation_createPublicKey_args(ctx context.Cont
return args, nil
}
-func (ec *executionContext) field_Mutation_deactivateStepbackTasks_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Mutation_deactivateStepbackTask_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["projectId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectId"))
+ arg0, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["projectId"] = arg0
+ var arg1 string
+ if tmp, ok := rawArgs["buildVariantName"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildVariantName"))
+ arg1, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["buildVariantName"] = arg1
+ var arg2 string
+ if tmp, ok := rawArgs["taskName"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskName"))
directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) }
directive1 := func(ctx context.Context) (interface{}, error) {
access, err := ec.unmarshalNProjectSettingsAccess2githubácomáevergreenáciáevergreenágraphqláProjectSettingsAccess(ctx, "EDIT")
@@ -9462,12 +8581,12 @@ func (ec *executionContext) field_Mutation_deactivateStepbackTasks_args(ctx cont
return nil, graphql.ErrorOnPath(ctx, err)
}
if data, ok := tmp.(string); ok {
- arg0 = data
+ arg2 = data
} else {
return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp))
}
}
- args["projectId"] = arg0
+ args["taskName"] = arg2
return args, nil
}
@@ -9672,6 +8791,30 @@ func (ec *executionContext) field_Mutation_forceRepotrackerRun_args(ctx context.
return args, nil
}
+func (ec *executionContext) field_Mutation_migrateVolume_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 string
+ if tmp, ok := rawArgs["volumeId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeId"))
+ arg0, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["volumeId"] = arg0
+ var arg1 *SpawnHostInput
+ if tmp, ok := rawArgs["spawnHostInput"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostInput"))
+ arg1, err = ec.unmarshalOSpawnHostInput2ágithubácomáevergreenáciáevergreenágraphqláSpawnHostInput(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["spawnHostInput"] = arg1
+ return args, nil
+}
+
func (ec *executionContext) field_Mutation_moveAnnotationIssue_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ -9729,6 +8872,47 @@ func (ec *executionContext) field_Mutation_overrideTaskDependencies_args(ctx con
return args, nil
}
+func (ec *executionContext) field_Mutation_promoteVarsToRepo_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 string
+ if tmp, ok := rawArgs["projectId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectId"))
+ directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ access, err := ec.unmarshalNProjectSettingsAccess2githubácomáevergreenáciáevergreenágraphqláProjectSettingsAccess(ctx, "EDIT")
+ if err != nil {
+ return nil, err
+ }
+ if ec.directives.RequireProjectAccess == nil {
+ return nil, errors.New("directive requireProjectAccess is not implemented")
+ }
+ return ec.directives.RequireProjectAccess(ctx, rawArgs, directive0, access)
+ }
+
+ tmp, err = directive1(ctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if data, ok := tmp.(string); ok {
+ arg0 = data
+ } else {
+ return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp))
+ }
+ }
+ args["projectId"] = arg0
+ var arg1 []string
+ if tmp, ok := rawArgs["varNames"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("varNames"))
+ arg1, err = ec.unmarshalNString2ástringá(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["varNames"] = arg1
+ return args, nil
+}
+
func (ec *executionContext) field_Mutation_removeAnnotationIssue_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ -9882,6 +9066,15 @@ func (ec *executionContext) field_Mutation_restartTask_args(ctx context.Context,
}
}
args["taskId"] = arg0
+ var arg1 bool
+ if tmp, ok := rawArgs["failedOnly"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("failedOnly"))
+ arg1, err = ec.unmarshalNBoolean2bool(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["failedOnly"] = arg1
return args, nil
}
@@ -10050,6 +9243,39 @@ func (ec *executionContext) field_Mutation_scheduleUndispatchedBaseTasks_args(ct
return args, nil
}
+func (ec *executionContext) field_Mutation_setAnnotationMetadataLinks_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 string
+ if tmp, ok := rawArgs["taskId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskId"))
+ arg0, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["taskId"] = arg0
+ var arg1 int
+ if tmp, ok := rawArgs["execution"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("execution"))
+ arg1, err = ec.unmarshalNInt2int(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["execution"] = arg1
+ var arg2 []*model.APIMetadataLink
+ if tmp, ok := rawArgs["metadataLinks"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metadataLinks"))
+ arg2, err = ec.unmarshalNMetadataLinkInput2áágithubácomáevergreenáciáevergreenárestámodeláAPIMetadataLinká(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["metadataLinks"] = arg2
+ return args, nil
+}
+
func (ec *executionContext) field_Mutation_setPatchPriority_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ -10278,6 +9504,30 @@ func (ec *executionContext) field_Mutation_updateVolume_args(ctx context.Context
return args, nil
}
+func (ec *executionContext) field_Pod_events_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 *int
+ if tmp, ok := rawArgs["limit"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
+ arg0, err = ec.unmarshalOInt2áint(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["limit"] = arg0
+ var arg1 *int
+ if tmp, ok := rawArgs["page"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
+ arg1, err = ec.unmarshalOInt2áint(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["page"] = arg1
+ return args, nil
+}
+
func (ec *executionContext) field_Project_patches_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ -10351,14 +9601,14 @@ func (ec *executionContext) field_Query_buildVariantsForTaskName_args(ctx contex
var err error
args := map[string]interface{}{}
var arg0 string
- if tmp, ok := rawArgs["projectId"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectId"))
+ if tmp, ok := rawArgs["projectIdentifier"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdentifier"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["projectId"] = arg0
+ args["projectIdentifier"] = arg0
var arg1 string
if tmp, ok := rawArgs["taskName"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskName"))
@@ -10375,14 +9625,14 @@ func (ec *executionContext) field_Query_commitQueue_args(ctx context.Context, ra
var err error
args := map[string]interface{}{}
var arg0 string
- if tmp, ok := rawArgs["id"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ if tmp, ok := rawArgs["projectIdentifier"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdentifier"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["id"] = arg0
+ args["projectIdentifier"] = arg0
return args, nil
}
@@ -10590,6 +9840,21 @@ func (ec *executionContext) field_Query_hosts_args(ctx context.Context, rawArgs
return args, nil
}
+func (ec *executionContext) field_Query_logkeeperBuildMetadata_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 string
+ if tmp, ok := rawArgs["buildId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildId"))
+ arg0, err = ec.unmarshalNString2string(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["buildId"] = arg0
+ return args, nil
+}
+
func (ec *executionContext) field_Query_mainlineCommits_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ -10614,105 +9879,33 @@ func (ec *executionContext) field_Query_mainlineCommits_args(ctx context.Context
return args, nil
}
-func (ec *executionContext) field_Query_patchTasks_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Query_patch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 string
- if tmp, ok := rawArgs["patchId"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("patchId"))
+ if tmp, ok := rawArgs["id"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["patchId"] = arg0
- var arg1 []*SortOrder
- if tmp, ok := rawArgs["sorts"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sorts"))
- arg1, err = ec.unmarshalOSortOrder2áágithubácomáevergreenáciáevergreenágraphqláSortOrderá(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["sorts"] = arg1
- var arg2 *int
- if tmp, ok := rawArgs["page"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
- arg2, err = ec.unmarshalOInt2áint(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["page"] = arg2
- var arg3 *int
- if tmp, ok := rawArgs["limit"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
- arg3, err = ec.unmarshalOInt2áint(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["limit"] = arg3
- var arg4 []string
- if tmp, ok := rawArgs["statuses"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statuses"))
- arg4, err = ec.unmarshalOString2ástringá(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["statuses"] = arg4
- var arg5 []string
- if tmp, ok := rawArgs["baseStatuses"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("baseStatuses"))
- arg5, err = ec.unmarshalOString2ástringá(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["baseStatuses"] = arg5
- var arg6 *string
- if tmp, ok := rawArgs["variant"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variant"))
- arg6, err = ec.unmarshalOString2ástring(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["variant"] = arg6
- var arg7 *string
- if tmp, ok := rawArgs["taskName"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskName"))
- arg7, err = ec.unmarshalOString2ástring(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["taskName"] = arg7
- var arg8 *bool
- if tmp, ok := rawArgs["includeEmptyActivation"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeEmptyActivation"))
- arg8, err = ec.unmarshalOBoolean2ábool(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["includeEmptyActivation"] = arg8
+ args["id"] = arg0
return args, nil
}
-func (ec *executionContext) field_Query_patch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Query_pod_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 string
- if tmp, ok := rawArgs["id"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ if tmp, ok := rawArgs["podId"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("podId"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["id"] = arg0
+ args["podId"] = arg0
return args, nil
}
@@ -10804,14 +9997,14 @@ func (ec *executionContext) field_Query_project_args(ctx context.Context, rawArg
var err error
args := map[string]interface{}{}
var arg0 string
- if tmp, ok := rawArgs["projectId"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectId"))
+ if tmp, ok := rawArgs["projectIdentifier"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdentifier"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["projectId"] = arg0
+ args["projectIdentifier"] = arg0
return args, nil
}
@@ -10914,66 +10107,18 @@ func (ec *executionContext) field_Query_taskAllExecutions_args(ctx context.Conte
return args, nil
}
-func (ec *executionContext) field_Query_taskFiles_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 string
- if tmp, ok := rawArgs["taskId"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskId"))
- arg0, err = ec.unmarshalNString2string(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["taskId"] = arg0
- var arg1 *int
- if tmp, ok := rawArgs["execution"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("execution"))
- arg1, err = ec.unmarshalOInt2áint(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["execution"] = arg1
- return args, nil
-}
-
-func (ec *executionContext) field_Query_taskLogs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- var arg0 string
- if tmp, ok := rawArgs["taskId"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskId"))
- arg0, err = ec.unmarshalNString2string(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["taskId"] = arg0
- var arg1 *int
- if tmp, ok := rawArgs["execution"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("execution"))
- arg1, err = ec.unmarshalOInt2áint(ctx, tmp)
- if err != nil {
- return nil, err
- }
- }
- args["execution"] = arg1
- return args, nil
-}
-
func (ec *executionContext) field_Query_taskNamesForBuildVariant_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 string
- if tmp, ok := rawArgs["projectId"]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectId"))
+ if tmp, ok := rawArgs["projectIdentifier"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdentifier"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
- args["projectId"] = arg0
+ args["projectIdentifier"] = arg0
var arg1 string
if tmp, ok := rawArgs["buildVariant"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildVariant"))
@@ -11151,6 +10296,21 @@ func (ec *executionContext) field_Query_version_args(ctx context.Context, rawArg
return args, nil
}
+func (ec *executionContext) field_Task_tests_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+ var err error
+ args := map[string]interface{}{}
+ var arg0 *TestFilterOptions
+ if tmp, ok := rawArgs["opts"]; ok {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("opts"))
+ arg0, err = ec.unmarshalOTestFilterOptions2ágithubácomáevergreenáciáevergreenágraphqláTestFilterOptions(ctx, tmp)
+ if err != nil {
+ return nil, err
+ }
+ }
+ args["opts"] = arg0
+ return args, nil
+}
+
func (ec *executionContext) field_User_patches_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
@@ -11169,10 +10329,10 @@ func (ec *executionContext) field_User_patches_args(ctx context.Context, rawArgs
func (ec *executionContext) field_Version_buildVariantStats_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
- var arg0 *BuildVariantOptions
+ var arg0 BuildVariantOptions
if tmp, ok := rawArgs["options"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options"))
- arg0, err = ec.unmarshalOBuildVariantOptions2ágithubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
+ arg0, err = ec.unmarshalNBuildVariantOptions2githubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
if err != nil {
return nil, err
}
@@ -11184,10 +10344,10 @@ func (ec *executionContext) field_Version_buildVariantStats_args(ctx context.Con
func (ec *executionContext) field_Version_buildVariants_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
- var arg0 *BuildVariantOptions
+ var arg0 BuildVariantOptions
if tmp, ok := rawArgs["options"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options"))
- arg0, err = ec.unmarshalOBuildVariantOptions2ágithubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
+ arg0, err = ec.unmarshalNBuildVariantOptions2githubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
if err != nil {
return nil, err
}
@@ -11196,13 +10356,13 @@ func (ec *executionContext) field_Version_buildVariants_args(ctx context.Context
return args, nil
}
-func (ec *executionContext) field_Version_taskStatusCounts_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Version_taskStatusStats_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
- var arg0 *BuildVariantOptions
+ var arg0 BuildVariantOptions
if tmp, ok := rawArgs["options"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options"))
- arg0, err = ec.unmarshalOBuildVariantOptions2ágithubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
+ arg0, err = ec.unmarshalNBuildVariantOptions2githubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
if err != nil {
return nil, err
}
@@ -11211,13 +10371,13 @@ func (ec *executionContext) field_Version_taskStatusCounts_args(ctx context.Cont
return args, nil
}
-func (ec *executionContext) field_Version_taskStatusStats_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Version_tasks_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
- var arg0 *BuildVariantOptions
+ var arg0 TaskFilterOptions
if tmp, ok := rawArgs["options"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("options"))
- arg0, err = ec.unmarshalOBuildVariantOptions2ágithubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx, tmp)
+ arg0, err = ec.unmarshalNTaskFilterOptions2githubácomáevergreenáciáevergreenágraphqláTaskFilterOptions(ctx, tmp)
if err != nil {
return nil, err
}
@@ -11265,24 +10425,61 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg
// region **************************** field.gotpl *****************************
func (ec *executionContext) _AWSConfig_maxVolumeSizePerUser(ctx context.Context, field graphql.CollectedField, obj *model.APIAWSConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AWSConfig_maxVolumeSizePerUser(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.MaxVolumeSizePerUser, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*int)
+ fc.Result = res
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_AWSConfig_maxVolumeSizePerUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AWSConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AWSConfig_pod(ctx context.Context, field graphql.CollectedField, obj *model.APIAWSConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AWSConfig_pod(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MaxVolumeSizePerUser, nil
+ return obj.Pod, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11291,30 +10488,90 @@ func (ec *executionContext) _AWSConfig_maxVolumeSizePerUser(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*model.APIAWSPodConfig)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalOAWSPodConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIAWSPodConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _AbortInfo_user(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_AWSConfig_pod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AWSConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "ecs":
+ return ec.fieldContext_AWSPodConfig_ecs(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AWSPodConfig", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _AWSPodConfig_ecs(ctx context.Context, field graphql.CollectedField, obj *model.APIAWSPodConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AWSPodConfig_ecs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AbortInfo",
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ECS, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIECSConfig)
+ fc.Result = res
+ return ec.marshalOECSConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIECSConfig(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_AWSPodConfig_ecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AWSPodConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "maxCPU":
+ return ec.fieldContext_ECSConfig_maxCPU(ctx, field)
+ case "maxMemoryMb":
+ return ec.fieldContext_ECSConfig_maxMemoryMb(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ECSConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AbortInfo_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AbortInfo_buildVariantDisplayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.User, nil
+ return obj.BuildVariantDisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11331,25 +10588,34 @@ func (ec *executionContext) _AbortInfo_user(ctx context.Context, field graphql.C
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AbortInfo_taskID(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AbortInfo_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AbortInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AbortInfo_newVersion(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AbortInfo_newVersion(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskID, nil
+ return obj.NewVersion, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11366,25 +10632,34 @@ func (ec *executionContext) _AbortInfo_taskID(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AbortInfo_taskDisplayName(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AbortInfo_newVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AbortInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AbortInfo_prClosed(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AbortInfo_prClosed(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskDisplayName, nil
+ return obj.PrClosed, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11396,30 +10671,39 @@ func (ec *executionContext) _AbortInfo_taskDisplayName(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _AbortInfo_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AbortInfo_prClosed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AbortInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AbortInfo_taskDisplayName(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AbortInfo_taskDisplayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildVariantDisplayName, nil
+ return obj.TaskDisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11436,25 +10720,34 @@ func (ec *executionContext) _AbortInfo_buildVariantDisplayName(ctx context.Conte
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AbortInfo_newVersion(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AbortInfo_taskDisplayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AbortInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AbortInfo_taskID(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AbortInfo_taskID(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NewVersion, nil
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11471,25 +10764,34 @@ func (ec *executionContext) _AbortInfo_newVersion(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AbortInfo_prClosed(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AbortInfo_taskID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AbortInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AbortInfo_user(ctx context.Context, field graphql.CollectedField, obj *AbortInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AbortInfo_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PrClosed, nil
+ return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11501,27 +10803,36 @@ func (ec *executionContext) _AbortInfo_prClosed(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_AbortInfo_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AbortInfo",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) _Annotation_id(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Annotation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Id, nil
@@ -11541,92 +10852,137 @@ func (ec *executionContext) _Annotation_id(ctx context.Context, field graphql.Co
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Annotation_taskId(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Annotation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Annotation_createdIssues(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_createdIssues(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskId, nil
+ return obj.CreatedIssues, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.APIIssueLink)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOIssueLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIIssueLink(ctx, field.Selections, res)
}
-func (ec *executionContext) _Annotation_taskExecution(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Annotation_createdIssues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "confidenceScore":
+ return ec.fieldContext_IssueLink_confidenceScore(ctx, field)
+ case "issueKey":
+ return ec.fieldContext_IssueLink_issueKey(ctx, field)
+ case "jiraTicket":
+ return ec.fieldContext_IssueLink_jiraTicket(ctx, field)
+ case "source":
+ return ec.fieldContext_IssueLink_source(ctx, field)
+ case "url":
+ return ec.fieldContext_IssueLink_url(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IssueLink", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Annotation_issues(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_issues(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskExecution, nil
+ return obj.Issues, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.([]model.APIIssueLink)
fc.Result = res
- return ec.marshalNInt2áint(ctx, field.Selections, res)
+ return ec.marshalOIssueLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIIssueLink(ctx, field.Selections, res)
}
-func (ec *executionContext) _Annotation_note(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Annotation_issues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "confidenceScore":
+ return ec.fieldContext_IssueLink_confidenceScore(ctx, field)
+ case "issueKey":
+ return ec.fieldContext_IssueLink_issueKey(ctx, field)
+ case "jiraTicket":
+ return ec.fieldContext_IssueLink_jiraTicket(ctx, field)
+ case "source":
+ return ec.fieldContext_IssueLink_source(ctx, field)
+ case "url":
+ return ec.fieldContext_IssueLink_url(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IssueLink", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Annotation_note(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_note(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Note, nil
@@ -11643,54 +10999,37 @@ func (ec *executionContext) _Annotation_note(ctx context.Context, field graphql.
return ec.marshalONote2ágithubácomáevergreenáciáevergreenárestámodeláAPINote(ctx, field.Selections, res)
}
-func (ec *executionContext) _Annotation_issues(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Annotation_note(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_Note_message(ctx, field)
+ case "source":
+ return ec.fieldContext_Note_source(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Note", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Issues, nil
- })
+func (ec *executionContext) _Annotation_suspectedIssues(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_suspectedIssues(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIIssueLink)
- fc.Result = res
- return ec.marshalOIssueLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIIssueLink(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Annotation_suspectedIssues(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Annotation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.SuspectedIssues, nil
@@ -11707,25 +11046,46 @@ func (ec *executionContext) _Annotation_suspectedIssues(ctx context.Context, fie
return ec.marshalOIssueLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIIssueLink(ctx, field.Selections, res)
}
-func (ec *executionContext) _Annotation_createdIssues(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Annotation_suspectedIssues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "confidenceScore":
+ return ec.fieldContext_IssueLink_confidenceScore(ctx, field)
+ case "issueKey":
+ return ec.fieldContext_IssueLink_issueKey(ctx, field)
+ case "jiraTicket":
+ return ec.fieldContext_IssueLink_jiraTicket(ctx, field)
+ case "source":
+ return ec.fieldContext_IssueLink_source(ctx, field)
+ case "url":
+ return ec.fieldContext_IssueLink_url(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IssueLink", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Annotation_metadataLinks(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_metadataLinks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CreatedIssues, nil
+ return obj.MetadataLinks, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11734,30 +11094,47 @@ func (ec *executionContext) _Annotation_createdIssues(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIIssueLink)
+ res := resTmp.([]model.APIMetadataLink)
fc.Result = res
- return ec.marshalOIssueLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIIssueLink(ctx, field.Selections, res)
+ return ec.marshalOMetadataLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIMetadataLink(ctx, field.Selections, res)
}
-func (ec *executionContext) _Annotation_webhookConfigured(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Annotation_metadataLinks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Annotation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "url":
+ return ec.fieldContext_MetadataLink_url(ctx, field)
+ case "text":
+ return ec.fieldContext_MetadataLink_text(ctx, field)
+ case "source":
+ return ec.fieldContext_MetadataLink_source(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type MetadataLink", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Annotation_taskId(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_taskId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Annotation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Annotation().WebhookConfigured(rctx, obj)
+ return obj.TaskId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11769,94 +11146,83 @@ func (ec *executionContext) _Annotation_webhookConfigured(ctx context.Context, f
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _BaseTaskInfo_id(ctx context.Context, field graphql.CollectedField, obj *model.APIBaseTaskInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "BaseTaskInfo",
+func (ec *executionContext) fieldContext_Annotation_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Annotation_taskExecution(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_taskExecution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return obj.TaskExecution, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _BaseTaskInfo_status(ctx context.Context, field graphql.CollectedField, obj *model.APIBaseTaskInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "BaseTaskInfo",
+func (ec *executionContext) fieldContext_Annotation_taskExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Annotation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
- })
+func (ec *executionContext) _Annotation_webhookConfigured(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Annotation_webhookConfigured(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _BaseTaskResult_id(ctx context.Context, field graphql.CollectedField, obj *BaseTaskResult) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "BaseTaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return ec.resolvers.Annotation().WebhookConfigured(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -11868,30 +11234,39 @@ func (ec *executionContext) _BaseTaskResult_id(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNID2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Annotation_webhookConfigured(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Annotation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
}
-func (ec *executionContext) _BaseTaskResult_status(ctx context.Context, field graphql.CollectedField, obj *BaseTaskResult) (ret graphql.Marshaler) {
+func (ec *executionContext) _Build_id(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Build_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "BaseTaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11903,30 +11278,39 @@ func (ec *executionContext) _BaseTaskResult_status(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Build_id(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Build_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Build",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Build_actualMakespan(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Build_actualMakespan(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return obj.ActualMakespan, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -11938,27 +11322,36 @@ func (ec *executionContext) _Build_id(ctx context.Context, field graphql.Collect
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _Build_buildVariant(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Build_actualMakespan(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Build",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Build_buildVariant(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Build_buildVariant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.BuildVariant, nil
@@ -11978,25 +11371,34 @@ func (ec *executionContext) _Build_buildVariant(ctx context.Context, field graph
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Build_status(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Build_buildVariant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Build",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Build_predictedMakespan(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Build_predictedMakespan(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return obj.PredictedMakespan, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12008,30 +11410,39 @@ func (ec *executionContext) _Build_status(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _Build_predictedMakespan(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Build_predictedMakespan(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Build",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Build_status(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Build_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PredictedMakespan, nil
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12043,30 +11454,39 @@ func (ec *executionContext) _Build_predictedMakespan(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(model.APIDuration)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Build_actualMakespan(ctx context.Context, field graphql.CollectedField, obj *model.APIBuild) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Build_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Build",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaron_bbTicketCreationDefined(ctx context.Context, field graphql.CollectedField, obj *BuildBaron) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaron_bbTicketCreationDefined(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ActualMakespan, nil
+ return obj.BbTicketCreationDefined, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12078,59 +11498,36 @@ func (ec *executionContext) _Build_actualMakespan(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(model.APIDuration)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaron_searchReturnInfo(ctx context.Context, field graphql.CollectedField, obj *BuildBaron) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaron_bbTicketCreationDefined(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaron",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.SearchReturnInfo, nil
- })
+func (ec *executionContext) _BuildBaron_buildBaronConfigured(ctx context.Context, field graphql.CollectedField, obj *BuildBaron) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaron_buildBaronConfigured(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*thirdparty.SearchReturnInfo)
- fc.Result = res
- return ec.marshalOSearchReturnInfo2ágithubácomáevergreenáciáevergreenáthirdpartyáSearchReturnInfo(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _BuildBaron_buildBaronConfigured(ctx context.Context, field graphql.CollectedField, obj *BuildBaron) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "BuildBaron",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.BuildBaronConfigured, nil
@@ -12150,95 +11547,126 @@ func (ec *executionContext) _BuildBaron_buildBaronConfigured(ctx context.Context
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaron_bbTicketCreationDefined(ctx context.Context, field graphql.CollectedField, obj *BuildBaron) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaron_buildBaronConfigured(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaron",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaron_searchReturnInfo(ctx context.Context, field graphql.CollectedField, obj *BuildBaron) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaron_searchReturnInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BbTicketCreationDefined, nil
+ return obj.SearchReturnInfo, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*thirdparty.SearchReturnInfo)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOSearchReturnInfo2ágithubácomáevergreenáciáevergreenáthirdpartyáSearchReturnInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_ticketCreateProject(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "BuildBaronSettings",
+func (ec *executionContext) fieldContext_BuildBaron_searchReturnInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BuildBaron",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "featuresURL":
+ return ec.fieldContext_SearchReturnInfo_featuresURL(ctx, field)
+ case "issues":
+ return ec.fieldContext_SearchReturnInfo_issues(ctx, field)
+ case "search":
+ return ec.fieldContext_SearchReturnInfo_search(ctx, field)
+ case "source":
+ return ec.fieldContext_SearchReturnInfo_source(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SearchReturnInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_bfSuggestionFeaturesURL(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_bfSuggestionFeaturesURL(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TicketCreateProject, nil
+ return obj.BFSuggestionFeaturesURL, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_ticketSearchProjects(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaronSettings_bfSuggestionFeaturesURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaronSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_bfSuggestionPassword(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_bfSuggestionPassword(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TicketSearchProjects, nil
+ return obj.BFSuggestionPassword, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12247,27 +11675,36 @@ func (ec *executionContext) _BuildBaronSettings_ticketSearchProjects(ctx context
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_bfSuggestionServer(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaronSettings_bfSuggestionPassword(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaronSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_bfSuggestionServer(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_bfSuggestionServer(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.BFSuggestionServer, nil
@@ -12284,25 +11721,34 @@ func (ec *executionContext) _BuildBaronSettings_bfSuggestionServer(ctx context.C
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_bfSuggestionUsername(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaronSettings_bfSuggestionServer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaronSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_bfSuggestionTimeoutSecs(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_bfSuggestionTimeoutSecs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BFSuggestionUsername, nil
+ return obj.BFSuggestionTimeoutSecs, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12311,30 +11757,39 @@ func (ec *executionContext) _BuildBaronSettings_bfSuggestionUsername(ctx context
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_bfSuggestionPassword(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaronSettings_bfSuggestionTimeoutSecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaronSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_bfSuggestionUsername(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_bfSuggestionUsername(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BFSuggestionPassword, nil
+ return obj.BFSuggestionUsername, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12348,57 +11803,78 @@ func (ec *executionContext) _BuildBaronSettings_bfSuggestionPassword(ctx context
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_bfSuggestionTimeoutSecs(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaronSettings_bfSuggestionUsername(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaronSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_ticketCreateProject(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_ticketCreateProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BFSuggestionTimeoutSecs, nil
+ return obj.TicketCreateProject, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildBaronSettings_bfSuggestionFeaturesURL(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildBaronSettings_ticketCreateProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildBaronSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildBaronSettings_ticketSearchProjects(ctx context.Context, field graphql.CollectedField, obj *model.APIBuildBaronSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildBaronSettings_ticketSearchProjects(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BFSuggestionFeaturesURL, nil
+ return obj.TicketSearchProjects, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12407,27 +11883,36 @@ func (ec *executionContext) _BuildBaronSettings_bfSuggestionFeaturesURL(ctx cont
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BuildBaronSettings_ticketSearchProjects(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BuildBaronSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) _BuildVariantTuple_buildVariant(ctx context.Context, field graphql.CollectedField, obj *task.BuildVariantTuple) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildVariantTuple_buildVariant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "BuildVariantTuple",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.BuildVariant, nil
@@ -12447,22 +11932,31 @@ func (ec *executionContext) _BuildVariantTuple_buildVariant(ctx context.Context,
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _BuildVariantTuple_displayName(ctx context.Context, field graphql.CollectedField, obj *task.BuildVariantTuple) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BuildVariantTuple_buildVariant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BuildVariantTuple",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BuildVariantTuple_displayName(ctx context.Context, field graphql.CollectedField, obj *task.BuildVariantTuple) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BuildVariantTuple_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DisplayName, nil
@@ -12482,22 +11976,31 @@ func (ec *executionContext) _BuildVariantTuple_displayName(ctx context.Context,
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_BuildVariantTuple_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BuildVariantTuple",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ChildPatchAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIChildPatchAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ChildPatchAlias_alias(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ChildPatchAlias",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Alias, nil
@@ -12517,22 +12020,31 @@ func (ec *executionContext) _ChildPatchAlias_alias(ctx context.Context, field gr
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChildPatchAlias_patchId(ctx context.Context, field graphql.CollectedField, obj *model.APIChildPatchAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_ChildPatchAlias_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ChildPatchAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ChildPatchAlias_patchId(ctx context.Context, field graphql.CollectedField, obj *model.APIChildPatchAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ChildPatchAlias_patchId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PatchID, nil
@@ -12552,22 +12064,31 @@ func (ec *executionContext) _ChildPatchAlias_patchId(ctx context.Context, field
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_ChildPatchAlias_patchId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ChildPatchAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ClientBinary_arch(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ClientBinary_arch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ClientBinary",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Arch, nil
@@ -12584,57 +12105,75 @@ func (ec *executionContext) _ClientBinary_arch(ctx context.Context, field graphq
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ClientBinary_os(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_ClientBinary_arch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ClientBinary",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.OS, nil
- })
+func (ec *executionContext) _ClientBinary_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ClientBinary_displayName(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ClientBinary_url(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DisplayName, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ClientBinary_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ClientBinary",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ClientBinary_os(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ClientBinary_os(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.URL, nil
+ return obj.OS, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12648,25 +12187,34 @@ func (ec *executionContext) _ClientBinary_url(ctx context.Context, field graphql
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ClientBinary_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_ClientBinary_os(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ClientBinary",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ClientBinary_url(ctx context.Context, field graphql.CollectedField, obj *model.APIClientBinary) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ClientBinary_url(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return obj.URL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12680,22 +12228,31 @@ func (ec *executionContext) _ClientBinary_displayName(ctx context.Context, field
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_ClientBinary_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ClientBinary",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ClientConfig_clientBinaries(ctx context.Context, field graphql.CollectedField, obj *model.APIClientConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ClientConfig_clientBinaries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ClientConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientBinaries, nil
@@ -12712,22 +12269,41 @@ func (ec *executionContext) _ClientConfig_clientBinaries(ctx context.Context, fi
return ec.marshalOClientBinary2ágithubácomáevergreenáciáevergreenárestámodeláAPIClientBinaryá(ctx, field.Selections, res)
}
-func (ec *executionContext) _ClientConfig_latestRevision(ctx context.Context, field graphql.CollectedField, obj *model.APIClientConfig) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_ClientConfig_clientBinaries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ClientConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "arch":
+ return ec.fieldContext_ClientBinary_arch(ctx, field)
+ case "displayName":
+ return ec.fieldContext_ClientBinary_displayName(ctx, field)
+ case "os":
+ return ec.fieldContext_ClientBinary_os(ctx, field)
+ case "url":
+ return ec.fieldContext_ClientBinary_url(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ClientBinary", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ClientConfig_latestRevision(ctx context.Context, field graphql.CollectedField, obj *model.APIClientConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ClientConfig_latestRevision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.LatestRevision, nil
@@ -12744,22 +12320,31 @@ func (ec *executionContext) _ClientConfig_latestRevision(ctx context.Context, fi
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_ClientConfig_latestRevision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ClientConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CloudProviderConfig_aws(ctx context.Context, field graphql.CollectedField, obj *model.APICloudProviders) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CloudProviderConfig_aws(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CloudProviderConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.AWS, nil
@@ -12776,54 +12361,37 @@ func (ec *executionContext) _CloudProviderConfig_aws(ctx context.Context, field
return ec.marshalOAWSConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIAWSConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueue_projectId(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "CommitQueue",
+func (ec *executionContext) fieldContext_CloudProviderConfig_aws(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CloudProviderConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "maxVolumeSizePerUser":
+ return ec.fieldContext_AWSConfig_maxVolumeSizePerUser(ctx, field)
+ case "pod":
+ return ec.fieldContext_AWSConfig_pod(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AWSConfig", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ProjectID, nil
- })
+func (ec *executionContext) _CommitQueue_message(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueue_message(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _CommitQueue_message(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommitQueue",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -12840,22 +12408,31 @@ func (ec *executionContext) _CommitQueue_message(ctx context.Context, field grap
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueue_owner(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueue_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueue",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueue_owner(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueue_owner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Owner, nil
@@ -12872,25 +12449,34 @@ func (ec *executionContext) _CommitQueue_owner(ctx context.Context, field graphq
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueue_repo(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueue_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueue",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueue_projectId(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueue_projectId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return obj.ProjectID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12904,22 +12490,31 @@ func (ec *executionContext) _CommitQueue_repo(ctx context.Context, field graphql
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueue_queue(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueue_projectId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueue",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueue_queue(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueue_queue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Queue, nil
@@ -12936,25 +12531,48 @@ func (ec *executionContext) _CommitQueue_queue(ctx context.Context, field graphq
return ec.marshalOCommitQueueItem2ágithubácomáevergreenáciáevergreenárestámodeláAPICommitQueueItemá(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueItem_issue(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "CommitQueueItem",
+func (ec *executionContext) fieldContext_CommitQueue_queue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommitQueue",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "enqueueTime":
+ return ec.fieldContext_CommitQueueItem_enqueueTime(ctx, field)
+ case "issue":
+ return ec.fieldContext_CommitQueueItem_issue(ctx, field)
+ case "modules":
+ return ec.fieldContext_CommitQueueItem_modules(ctx, field)
+ case "patch":
+ return ec.fieldContext_CommitQueueItem_patch(ctx, field)
+ case "source":
+ return ec.fieldContext_CommitQueueItem_source(ctx, field)
+ case "version":
+ return ec.fieldContext_CommitQueueItem_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommitQueueItem", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueue_repo(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueue_repo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Issue, nil
+ return obj.Repo, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -12968,25 +12586,75 @@ func (ec *executionContext) _CommitQueueItem_issue(ctx context.Context, field gr
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueItem_version(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_CommitQueue_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommitQueue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _CommitQueueItem_enqueueTime(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueItem_enqueueTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.EnqueueTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*time.Time)
+ fc.Result = res
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_CommitQueueItem_enqueueTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueueItem_issue(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueItem_issue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Version, nil
+ return obj.Issue, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13000,25 +12668,34 @@ func (ec *executionContext) _CommitQueueItem_version(ctx context.Context, field
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueItem_enqueueTime(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueueItem_issue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueueItem_modules(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueItem_modules(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EnqueueTime, nil
+ return obj.Modules, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13027,27 +12704,42 @@ func (ec *executionContext) _CommitQueueItem_enqueueTime(ctx context.Context, fi
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.([]model.APIModule)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOModule2ágithubácomáevergreenáciáevergreenárestámodeláAPIModuleá(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueItem_patch(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueueItem_modules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "issue":
+ return ec.fieldContext_Module_issue(ctx, field)
+ case "module":
+ return ec.fieldContext_Module_module(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Module", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueueItem_patch(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueItem_patch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Patch, nil
@@ -13064,22 +12756,95 @@ func (ec *executionContext) _CommitQueueItem_patch(ctx context.Context, field gr
return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CommitQueueItem_patch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommitQueueItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CommitQueueItem_source(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueItem_source(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommitQueueItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Source, nil
@@ -13096,25 +12861,34 @@ func (ec *executionContext) _CommitQueueItem_source(ctx context.Context, field g
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueItem_modules(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueueItem_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueueItem_version(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueItem_version(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Modules, nil
+ return obj.Version, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13123,27 +12897,36 @@ func (ec *executionContext) _CommitQueueItem_modules(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIModule)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOModule2ágithubácomáevergreenáciáevergreenárestámodeláAPIModuleá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_CommitQueueItem_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommitQueueItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) _CommitQueueParams_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueParams_enabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommitQueueParams",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Enabled, nil
@@ -13160,54 +12943,31 @@ func (ec *executionContext) _CommitQueueParams_enabled(ctx context.Context, fiel
return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueParams_requireSigned(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueueParams_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueueParams",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.RequireSigned, nil
- })
+func (ec *executionContext) _CommitQueueParams_mergeMethod(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueParams_mergeMethod(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _CommitQueueParams_mergeMethod(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommitQueueParams",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MergeMethod, nil
@@ -13227,22 +12987,31 @@ func (ec *executionContext) _CommitQueueParams_mergeMethod(ctx context.Context,
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitQueueParams_message(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommitQueueParams_mergeMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommitQueueParams",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommitQueueParams_message(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommitQueueParams_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -13262,22 +13031,31 @@ func (ec *executionContext) _CommitQueueParams_message(ctx context.Context, fiel
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Dependency_name(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Dependency",
+func (ec *executionContext) fieldContext_CommitQueueParams_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommitQueueParams",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ContainerResources_name(ctx context.Context, field graphql.CollectedField, obj *model.APIContainerResources) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ContainerResources_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
@@ -13292,30 +13070,39 @@ func (ec *executionContext) _Dependency_name(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Dependency_metStatus(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Dependency",
+func (ec *executionContext) fieldContext_ContainerResources_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ContainerResources",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ContainerResources_cpu(ctx context.Context, field graphql.CollectedField, obj *model.APIContainerResources) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ContainerResources_cpu(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MetStatus, nil
+ return obj.CPU, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13327,30 +13114,39 @@ func (ec *executionContext) _Dependency_metStatus(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(MetStatus)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNMetStatus2githubácomáevergreenáciáevergreenágraphqláMetStatus(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _Dependency_requiredStatus(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Dependency",
+func (ec *executionContext) fieldContext_ContainerResources_cpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ContainerResources",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ContainerResources_memoryMb(ctx context.Context, field graphql.CollectedField, obj *model.APIContainerResources) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ContainerResources_memoryMb(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RequiredStatus, nil
+ return obj.MemoryMB, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13362,27 +13158,36 @@ func (ec *executionContext) _Dependency_requiredStatus(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(RequiredStatus)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNRequiredStatus2githubácomáevergreenáciáevergreenágraphqláRequiredStatus(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ContainerResources_memoryMb(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ContainerResources",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) _Dependency_buildVariant(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Dependency_buildVariant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Dependency",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.BuildVariant, nil
@@ -13402,25 +13207,34 @@ func (ec *executionContext) _Dependency_buildVariant(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Dependency_taskId(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Dependency_buildVariant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Dependency",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Dependency_metStatus(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Dependency_metStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskID, nil
+ return obj.MetStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13432,27 +13246,36 @@ func (ec *executionContext) _Dependency_taskId(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(MetStatus)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNMetStatus2githubácomáevergreenáciáevergreenágraphqláMetStatus(ctx, field.Selections, res)
}
-func (ec *executionContext) _Distro_name(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Distro",
+func (ec *executionContext) fieldContext_Dependency_metStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Dependency",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type MetStatus does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Dependency_name(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Dependency_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
@@ -13462,64 +13285,176 @@ func (ec *executionContext) _Distro_name(ctx context.Context, field graphql.Coll
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Distro_userSpawnAllowed(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Dependency_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Dependency",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Dependency_requiredStatus(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Dependency_requiredStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Distro",
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RequiredStatus, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(RequiredStatus)
+ fc.Result = res
+ return ec.marshalNRequiredStatus2githubácomáevergreenáciáevergreenágraphqláRequiredStatus(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Dependency_requiredStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Dependency",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type RequiredStatus does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Dependency_taskId(ctx context.Context, field graphql.CollectedField, obj *Dependency) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Dependency_taskId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UserSpawnAllowed, nil
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Distro_workDir(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Dependency_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Dependency",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Distro_isVirtualWorkStation(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Distro_isVirtualWorkStation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsVirtualWorkstation, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Distro_isVirtualWorkStation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Distro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Distro_name(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Distro_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.WorkDir, nil
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13533,22 +13468,31 @@ func (ec *executionContext) _Distro_workDir(ctx context.Context, field graphql.C
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Distro_user(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Distro_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Distro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Distro_user(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Distro_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
@@ -13565,57 +13509,113 @@ func (ec *executionContext) _Distro_user(ctx context.Context, field graphql.Coll
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Distro_isVirtualWorkStation(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Distro_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Distro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Distro_userSpawnAllowed(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Distro_userSpawnAllowed(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsVirtualWorkstation, nil
+ return obj.UserSpawnAllowed, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _DistroInfo_id(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Distro_userSpawnAllowed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Distro",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Distro_workDir(ctx context.Context, field graphql.CollectedField, obj *model.APIDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Distro_workDir(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "DistroInfo",
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.WorkDir, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Distro_workDir(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Distro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _DistroInfo_id(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DistroInfo_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Id, nil
@@ -13632,25 +13632,34 @@ func (ec *executionContext) _DistroInfo_id(ctx context.Context, field graphql.Co
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _DistroInfo_workDir(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_DistroInfo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "DistroInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _DistroInfo_bootstrapMethod(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DistroInfo_bootstrapMethod(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.WorkDir, nil
+ return obj.BootstrapMethod, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13664,22 +13673,31 @@ func (ec *executionContext) _DistroInfo_workDir(ctx context.Context, field graph
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _DistroInfo_isVirtualWorkStation(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_DistroInfo_bootstrapMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "DistroInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _DistroInfo_isVirtualWorkStation(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DistroInfo_isVirtualWorkStation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsVirtualWorkstation, nil
@@ -13696,25 +13714,34 @@ func (ec *executionContext) _DistroInfo_isVirtualWorkStation(ctx context.Context
return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _DistroInfo_user(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_DistroInfo_isVirtualWorkStation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "DistroInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _DistroInfo_isWindows(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DistroInfo_isWindows(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.User, nil
+ return obj.IsWindows, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13723,30 +13750,39 @@ func (ec *executionContext) _DistroInfo_user(ctx context.Context, field graphql.
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _DistroInfo_isWindows(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_DistroInfo_isWindows(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "DistroInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _DistroInfo_user(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DistroInfo_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsWindows, nil
+ return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13755,30 +13791,39 @@ func (ec *executionContext) _DistroInfo_isWindows(ctx context.Context, field gra
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _DistroInfo_bootstrapMethod(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_DistroInfo_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "DistroInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _DistroInfo_workDir(ctx context.Context, field graphql.CollectedField, obj *model.DistroInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_DistroInfo_workDir(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BootstrapMethod, nil
+ return obj.WorkDir, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13792,25 +13837,34 @@ func (ec *executionContext) _DistroInfo_bootstrapMethod(ctx context.Context, fie
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _File_name(ctx context.Context, field graphql.CollectedField, obj *model.APIFile) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "File",
+func (ec *executionContext) fieldContext_DistroInfo_workDir(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "DistroInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ECSConfig_maxCPU(ctx context.Context, field graphql.CollectedField, obj *model.APIECSConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ECSConfig_maxCPU(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.MaxCPU, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13822,30 +13876,39 @@ func (ec *executionContext) _File_name(ctx context.Context, field graphql.Collec
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _File_link(ctx context.Context, field graphql.CollectedField, obj *model.APIFile) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "File",
+func (ec *executionContext) fieldContext_ECSConfig_maxCPU(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ECSConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ECSConfig_maxMemoryMb(ctx context.Context, field graphql.CollectedField, obj *model.APIECSConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ECSConfig_maxMemoryMb(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Link, nil
+ return obj.MaxMemoryMB, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13857,30 +13920,39 @@ func (ec *executionContext) _File_link(ctx context.Context, field graphql.Collec
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _File_visibility(ctx context.Context, field graphql.CollectedField, obj *model.APIFile) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "File",
+func (ec *executionContext) fieldContext_ECSConfig_maxMemoryMb(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ECSConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ExternalLink_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIExternalLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ExternalLink_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Visibility, nil
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13897,25 +13969,34 @@ func (ec *executionContext) _File_visibility(ctx context.Context, field graphql.
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _FileDiff_fileName(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "FileDiff",
+func (ec *executionContext) fieldContext_ExternalLink_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ExternalLink",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ExternalLink_urlTemplate(ctx context.Context, field graphql.CollectedField, obj *model.APIExternalLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ExternalLink_urlTemplate(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FileName, nil
+ return obj.URLTemplate, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13932,25 +14013,34 @@ func (ec *executionContext) _FileDiff_fileName(ctx context.Context, field graphq
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _FileDiff_additions(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "FileDiff",
+func (ec *executionContext) fieldContext_ExternalLink_urlTemplate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ExternalLink",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ExternalLinkForMetadata_url(ctx context.Context, field graphql.CollectedField, obj *ExternalLinkForMetadata) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ExternalLinkForMetadata_url(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Additions, nil
+ return obj.URL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13962,30 +14052,39 @@ func (ec *executionContext) _FileDiff_additions(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _FileDiff_deletions(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "FileDiff",
+func (ec *executionContext) fieldContext_ExternalLinkForMetadata_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ExternalLinkForMetadata",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ExternalLinkForMetadata_displayName(ctx context.Context, field graphql.CollectedField, obj *ExternalLinkForMetadata) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ExternalLinkForMetadata_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Deletions, nil
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -13997,30 +14096,39 @@ func (ec *executionContext) _FileDiff_deletions(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _FileDiff_diffLink(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "FileDiff",
+func (ec *executionContext) fieldContext_ExternalLinkForMetadata_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ExternalLinkForMetadata",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _File_link(ctx context.Context, field graphql.CollectedField, obj *model.APIFile) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_File_link(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DiffLink, nil
+ return obj.Link, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14037,25 +14145,34 @@ func (ec *executionContext) _FileDiff_diffLink(ctx context.Context, field graphq
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _FileDiff_description(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "FileDiff",
+func (ec *executionContext) fieldContext_File_link(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "File",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _File_name(ctx context.Context, field graphql.CollectedField, obj *model.APIFile) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_File_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14067,30 +14184,39 @@ func (ec *executionContext) _FileDiff_description(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubCheckSubscriber_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubCheckSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubCheckSubscriber",
+func (ec *executionContext) fieldContext_File_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "File",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _File_visibility(ctx context.Context, field graphql.CollectedField, obj *model.APIFile) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_File_visibility(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Owner, nil
+ return obj.Visibility, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14107,25 +14233,34 @@ func (ec *executionContext) _GithubCheckSubscriber_owner(ctx context.Context, fi
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubCheckSubscriber_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubCheckSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubCheckSubscriber",
+func (ec *executionContext) fieldContext_File_visibility(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "File",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _FileDiff_additions(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_FileDiff_additions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return obj.Additions, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14137,30 +14272,39 @@ func (ec *executionContext) _GithubCheckSubscriber_repo(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubCheckSubscriber_ref(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubCheckSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubCheckSubscriber",
+func (ec *executionContext) fieldContext_FileDiff_additions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "FileDiff",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _FileDiff_deletions(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_FileDiff_deletions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Ref, nil
+ return obj.Deletions, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14172,30 +14316,39 @@ func (ec *executionContext) _GithubCheckSubscriber_ref(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubPRSubscriber_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubPRSubscriber",
+func (ec *executionContext) fieldContext_FileDiff_deletions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "FileDiff",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _FileDiff_description(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_FileDiff_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Owner, nil
+ return obj.Description, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14207,30 +14360,39 @@ func (ec *executionContext) _GithubPRSubscriber_owner(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubPRSubscriber_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubPRSubscriber",
+func (ec *executionContext) fieldContext_FileDiff_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "FileDiff",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _FileDiff_diffLink(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_FileDiff_diffLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return obj.DiffLink, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14247,25 +14409,34 @@ func (ec *executionContext) _GithubPRSubscriber_repo(ctx context.Context, field
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubPRSubscriber_ref(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubPRSubscriber",
+func (ec *executionContext) fieldContext_FileDiff_diffLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "FileDiff",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _FileDiff_fileName(ctx context.Context, field graphql.CollectedField, obj *model.FileDiff) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_FileDiff_fileName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Ref, nil
+ return obj.FileName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14282,217 +14453,172 @@ func (ec *executionContext) _GithubPRSubscriber_ref(ctx context.Context, field g
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubPRSubscriber_prNumber(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubPRSubscriber",
+func (ec *executionContext) fieldContext_FileDiff_fileName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "FileDiff",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.PRNumber, nil
- })
+func (ec *executionContext) _GeneralSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(int)
- fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _GithubProjectConflicts_commitQueueIdentifiers(ctx context.Context, field graphql.CollectedField, obj *model1.GithubProjectConflicts) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "GithubProjectConflicts",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CommitQueueIdentifiers, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubProjectConflicts_prTestingIdentifiers(ctx context.Context, field graphql.CollectedField, obj *model1.GithubProjectConflicts) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubProjectConflicts",
+func (ec *executionContext) fieldContext_GeneralSubscription_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.PRTestingIdentifiers, nil
- })
+func (ec *executionContext) _GeneralSubscription_ownerType(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_ownerType(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]string)
- fc.Result = res
- return ec.marshalOString2ástringá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _GithubProjectConflicts_commitCheckIdentifiers(ctx context.Context, field graphql.CollectedField, obj *model1.GithubProjectConflicts) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "GithubProjectConflicts",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CommitCheckIdentifiers, nil
+ return obj.OwnerType, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GithubUser_uid(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubUser) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GithubUser",
+func (ec *executionContext) fieldContext_GeneralSubscription_ownerType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.UID, nil
- })
+func (ec *executionContext) _GeneralSubscription_regexSelectors(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_regexSelectors(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(int)
- fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _GithubUser_lastKnownAs(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubUser) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "GithubUser",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.LastKnownAs, nil
+ return obj.RegexSelectors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.APISelector)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNSelector2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedBuildVariant_variant(ctx context.Context, field graphql.CollectedField, obj *GroupedBuildVariant) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedBuildVariant",
+func (ec *executionContext) fieldContext_GeneralSubscription_regexSelectors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "data":
+ return ec.fieldContext_Selector_data(ctx, field)
+ case "type":
+ return ec.fieldContext_Selector_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Selector", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GeneralSubscription_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_resourceType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Variant, nil
+ return obj.ResourceType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14504,30 +14630,39 @@ func (ec *executionContext) _GroupedBuildVariant_variant(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedBuildVariant_displayName(ctx context.Context, field graphql.CollectedField, obj *GroupedBuildVariant) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedBuildVariant",
+func (ec *executionContext) fieldContext_GeneralSubscription_resourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GeneralSubscription_selectors(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_selectors(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return obj.Selectors, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14539,30 +14674,45 @@ func (ec *executionContext) _GroupedBuildVariant_displayName(ctx context.Context
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.([]model.APISelector)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNSelector2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedBuildVariant_tasks(ctx context.Context, field graphql.CollectedField, obj *GroupedBuildVariant) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedBuildVariant",
+func (ec *executionContext) fieldContext_GeneralSubscription_selectors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "data":
+ return ec.fieldContext_Selector_data(ctx, field)
+ case "type":
+ return ec.fieldContext_Selector_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Selector", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GeneralSubscription_subscriber(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_subscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Tasks, nil
+ return obj.Subscriber, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14571,62 +14721,89 @@ func (ec *executionContext) _GroupedBuildVariant_tasks(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*model.APITask)
+ res := resTmp.(model.APISubscriber)
fc.Result = res
- return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalOSubscriberWrapper2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedFiles_taskName(ctx context.Context, field graphql.CollectedField, obj *GroupedFiles) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedFiles",
+func (ec *executionContext) fieldContext_GeneralSubscription_subscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "subscriber":
+ return ec.fieldContext_SubscriberWrapper_subscriber(ctx, field)
+ case "type":
+ return ec.fieldContext_SubscriberWrapper_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SubscriberWrapper", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GeneralSubscription_trigger(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_trigger(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskName, nil
+ return obj.Trigger, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedFiles_files(ctx context.Context, field graphql.CollectedField, obj *GroupedFiles) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedFiles",
+func (ec *executionContext) fieldContext_GeneralSubscription_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GeneralSubscription_triggerData(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GeneralSubscription_triggerData(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Files, nil
+ return obj.TriggerData, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14635,30 +14812,39 @@ func (ec *executionContext) _GroupedFiles_files(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*model.APIFile)
+ res := resTmp.(map[string]string)
fc.Result = res
- return ec.marshalOFile2áágithubácomáevergreenáciáevergreenárestámodeláAPIFileá(ctx, field.Selections, res)
+ return ec.marshalOStringMap2map(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedProjects_groupDisplayName(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedProjects",
+func (ec *executionContext) fieldContext_GeneralSubscription_triggerData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GeneralSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type StringMap does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubCheckSubscriber_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubCheckSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubCheckSubscriber_owner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GroupDisplayName, nil
+ return obj.Owner, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14670,30 +14856,39 @@ func (ec *executionContext) _GroupedProjects_groupDisplayName(ctx context.Contex
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedProjects_name(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedProjects",
+func (ec *executionContext) fieldContext_GithubCheckSubscriber_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubCheckSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubCheckSubscriber_ref(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubCheckSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubCheckSubscriber_ref(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.Ref, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14705,62 +14900,39 @@ func (ec *executionContext) _GroupedProjects_name(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedProjects_repo(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedProjects",
+func (ec *executionContext) fieldContext_GithubCheckSubscriber_ref(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubCheckSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
- })
+func (ec *executionContext) _GithubCheckSubscriber_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubCheckSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubCheckSubscriber_repo(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*model.APIProjectRef)
- fc.Result = res
- return ec.marshalORepoRef2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _GroupedProjects_projects(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "GroupedProjects",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Projects, nil
+ return obj.Repo, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14772,30 +14944,39 @@ func (ec *executionContext) _GroupedProjects_projects(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]*model.APIProjectRef)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNProject2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRefá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedTaskStatusCount_variant(ctx context.Context, field graphql.CollectedField, obj *task.GroupedTaskStatusCount) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedTaskStatusCount",
+func (ec *executionContext) fieldContext_GithubCheckSubscriber_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubCheckSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubPRSubscriber_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubPRSubscriber_owner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Variant, nil
+ return obj.Owner, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14807,132 +14988,80 @@ func (ec *executionContext) _GroupedTaskStatusCount_variant(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _GroupedTaskStatusCount_displayName(ctx context.Context, field graphql.CollectedField, obj *task.GroupedTaskStatusCount) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "GroupedTaskStatusCount",
+func (ec *executionContext) fieldContext_GithubPRSubscriber_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubPRSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
- })
+func (ec *executionContext) _GithubPRSubscriber_prNumber(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubPRSubscriber_prNumber(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _GroupedTaskStatusCount_statusCounts(ctx context.Context, field graphql.CollectedField, obj *task.GroupedTaskStatusCount) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "GroupedTaskStatusCount",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.StatusCounts, nil
+ return obj.PRNumber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*task.StatusCount)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNStatusCount2áágithubácomáevergreenáciáevergreenámodelátaskáStatusCountá(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_homeVolume(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GithubPRSubscriber_prNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubPRSubscriber",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Host().HomeVolume(rctx, obj)
- })
+func (ec *executionContext) _GithubPRSubscriber_ref(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubPRSubscriber_ref(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*model.APIVolume)
- fc.Result = res
- return ec.marshalOVolume2ágithubácomáevergreenáciáevergreenárestámodeláAPIVolume(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Host_id(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return obj.Ref, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14946,28 +15075,37 @@ func (ec *executionContext) _Host_id(ctx context.Context, field graphql.Collecte
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNID2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_hostUrl(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GithubPRSubscriber_ref(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubPRSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubPRSubscriber_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubPRSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubPRSubscriber_repo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HostURL, nil
+ return obj.Repo, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -14984,60 +15122,75 @@ func (ec *executionContext) _Host_hostUrl(ctx context.Context, field graphql.Col
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_tag(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GithubPRSubscriber_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubPRSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubProjectConflicts_commitCheckIdentifiers(ctx context.Context, field graphql.CollectedField, obj *model1.GithubProjectConflicts) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubProjectConflicts_commitCheckIdentifiers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Tag, nil
+ return obj.CommitCheckIdentifiers, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_distroId(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_GithubProjectConflicts_commitCheckIdentifiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubProjectConflicts",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _GithubProjectConflicts_commitQueueIdentifiers(ctx context.Context, field graphql.CollectedField, obj *model1.GithubProjectConflicts) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubProjectConflicts_commitQueueIdentifiers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Host().DistroID(rctx, obj)
+ return obj.CommitQueueIdentifiers, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15046,65 +15199,80 @@ func (ec *executionContext) _Host_distroId(ctx context.Context, field graphql.Co
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_status(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GithubProjectConflicts_commitQueueIdentifiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubProjectConflicts",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubProjectConflicts_prTestingIdentifiers(ctx context.Context, field graphql.CollectedField, obj *model1.GithubProjectConflicts) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubProjectConflicts_prTestingIdentifiers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return obj.PRTestingIdentifiers, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_runningTask(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GithubProjectConflicts_prTestingIdentifiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubProjectConflicts",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubUser_lastKnownAs(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubUser_lastKnownAs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RunningTask, nil
+ return obj.LastKnownAs, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15113,30 +15281,39 @@ func (ec *executionContext) _Host_runningTask(ctx context.Context, field graphql
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.TaskInfo)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTaskInfo2githubácomáevergreenáciáevergreenárestámodeláTaskInfo(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_totalIdleTime(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GithubUser_lastKnownAs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubUser",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GithubUser_uid(ctx context.Context, field graphql.CollectedField, obj *model.APIGithubUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GithubUser_uid(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TotalIdleTime, nil
+ return obj.UID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15145,62 +15322,83 @@ func (ec *executionContext) _Host_totalIdleTime(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APIDuration)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_uptime(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_GithubUser_uid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GithubUser",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _GroupedBuildVariant_displayName(ctx context.Context, field graphql.CollectedField, obj *GroupedBuildVariant) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedBuildVariant_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Host().Uptime(rctx, obj)
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_elapsed(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_GroupedBuildVariant_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedBuildVariant",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _GroupedBuildVariant_tasks(ctx context.Context, field graphql.CollectedField, obj *GroupedBuildVariant) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedBuildVariant_tasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Host().Elapsed(rctx, obj)
+ return obj.Tasks, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15209,30 +15407,183 @@ func (ec *executionContext) _Host_elapsed(ctx context.Context, field graphql.Col
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.([]*model.APITask)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_startedBy(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_GroupedBuildVariant_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedBuildVariant",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _GroupedBuildVariant_variant(ctx context.Context, field graphql.CollectedField, obj *GroupedBuildVariant) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedBuildVariant_variant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.StartedBy, nil
+ return obj.Variant, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15244,65 +15595,88 @@ func (ec *executionContext) _Host_startedBy(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_provider(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedBuildVariant_variant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedBuildVariant",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GroupedFiles_files(ctx context.Context, field graphql.CollectedField, obj *GroupedFiles) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedFiles_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Provider, nil
+ return obj.Files, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIFile)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOFile2áágithubácomáevergreenáciáevergreenárestámodeláAPIFileá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_lastCommunicationTime(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedFiles_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedFiles",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "link":
+ return ec.fieldContext_File_link(ctx, field)
+ case "name":
+ return ec.fieldContext_File_name(ctx, field)
+ case "visibility":
+ return ec.fieldContext_File_visibility(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type File", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GroupedFiles_taskName(ctx context.Context, field graphql.CollectedField, obj *GroupedFiles) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedFiles_taskName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.LastCommunicationTime, nil
+ return obj.TaskName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15311,30 +15685,39 @@ func (ec *executionContext) _Host_lastCommunicationTime(ctx context.Context, fie
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(time.Time)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTime2timeáTime(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_noExpiration(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedFiles_taskName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedFiles",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GroupedProjects_groupDisplayName(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedProjects_groupDisplayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NoExpiration, nil
+ return obj.GroupDisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15346,62 +15729,175 @@ func (ec *executionContext) _Host_noExpiration(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_instanceType(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedProjects_groupDisplayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedProjects",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GroupedProjects_projects(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedProjects_projects(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.InstanceType, nil
+ return obj.Projects, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIProjectRef)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRefá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_homeVolumeID(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_GroupedProjects_projects(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedProjects",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _GroupedProjects_repo(ctx context.Context, field graphql.CollectedField, obj *GroupedProjects) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedProjects_repo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HomeVolumeID, nil
+ return obj.Repo, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15410,30 +15906,119 @@ func (ec *executionContext) _Host_homeVolumeID(ctx context.Context, field graphq
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalORepoRef2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_volumes(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_GroupedProjects_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedProjects",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_RepoRef_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_RepoRef_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_RepoRef_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_RepoRef_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_RepoRef_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_RepoRef_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_RepoRef_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_RepoRef_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_RepoRef_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_RepoRef_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_RepoRef_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_RepoRef_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_RepoRef_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_RepoRef_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_RepoRef_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_RepoRef_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_RepoRef_gitTagVersionsEnabled(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_RepoRef_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_RepoRef_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_RepoRef_owner(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_RepoRef_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_RepoRef_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_RepoRef_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_RepoRef_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_RepoRef_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_RepoRef_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_RepoRef_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_RepoRef_repo(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_RepoRef_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_RepoRef_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_RepoRef_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_RepoRef_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_RepoRef_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_RepoRef_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_RepoRef_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_RepoRef_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_RepoRef_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_RepoRef_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_RepoRef_externalLinks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoRef", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _GroupedTaskStatusCount_displayName(ctx context.Context, field graphql.CollectedField, obj *task.GroupedTaskStatusCount) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedTaskStatusCount_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Host().Volumes(rctx, obj)
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15445,161 +16030,218 @@ func (ec *executionContext) _Host_volumes(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.([]*model.APIVolume)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNVolume2áágithubácomáevergreenáciáevergreenárestámodeláAPIVolumeá(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_user(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedTaskStatusCount_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedTaskStatusCount",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GroupedTaskStatusCount_statusCounts(ctx context.Context, field graphql.CollectedField, obj *task.GroupedTaskStatusCount) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedTaskStatusCount_statusCounts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.User, nil
+ return obj.StatusCounts, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*task.StatusCount)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNStatusCount2áágithubácomáevergreenáciáevergreenámodelátaskáStatusCountá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_distro(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedTaskStatusCount_statusCounts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedTaskStatusCount",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_StatusCount_count(ctx, field)
+ case "status":
+ return ec.fieldContext_StatusCount_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type StatusCount", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _GroupedTaskStatusCount_variant(ctx context.Context, field graphql.CollectedField, obj *task.GroupedTaskStatusCount) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_GroupedTaskStatusCount_variant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Distro, nil
+ return obj.Variant, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(model.DistroInfo)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalODistroInfo2githubácomáevergreenáciáevergreenárestámodeláDistroInfo(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Host",
+func (ec *executionContext) fieldContext_GroupedTaskStatusCount_variant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "GroupedTaskStatusCount",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_id(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.AvailabilityZone, nil
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNID2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_instanceTags(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Host_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_availabilityZone(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.InstanceTags, nil
+ return obj.AvailabilityZone, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]host.Tag)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInstanceTag2ágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Host_expiration(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Host_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_ami(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_ami(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Expiration, nil
+ return ec.resolvers.Host().Ami(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -15608,27 +16250,36 @@ func (ec *executionContext) _Host_expiration(ctx context.Context, field graphql.
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Host_ami(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) _Host_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Host",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DisplayName, nil
@@ -15645,165 +16296,212 @@ func (ec *executionContext) _Host_displayName(ctx context.Context, field graphql
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_agentRevision(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_distro(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_distro(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.AgentRevision, nil
+ return obj.Distro, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.DistroInfo)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalODistroInfo2githubácomáevergreenáciáevergreenárestámodeláDistroInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_agentBuild(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_distro(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_DistroInfo_id(ctx, field)
+ case "bootstrapMethod":
+ return ec.fieldContext_DistroInfo_bootstrapMethod(ctx, field)
+ case "isVirtualWorkStation":
+ return ec.fieldContext_DistroInfo_isVirtualWorkStation(ctx, field)
+ case "isWindows":
+ return ec.fieldContext_DistroInfo_isWindows(ctx, field)
+ case "user":
+ return ec.fieldContext_DistroInfo_user(ctx, field)
+ case "workDir":
+ return ec.fieldContext_DistroInfo_workDir(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type DistroInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_distroId(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_distroId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.AgentBuild, nil
+ return ec.resolvers.Host().DistroID(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_jasperRevision(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Host_distroId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Host_elapsed(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_elapsed(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.JasperRevision, nil
+ return ec.resolvers.Host().Elapsed(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_oldStatus(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Host_elapsed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Host_expiration(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_expiration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.OldStatus, nil
+ return obj.Expiration, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_newStatus(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_expiration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_hostUrl(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_hostUrl(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NewStatus, nil
+ return obj.HostURL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15820,130 +16518,187 @@ func (ec *executionContext) _HostEventLogData_newStatus(ctx context.Context, fie
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_logs(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_hostUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_homeVolume(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_homeVolume(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Logs, nil
+ return ec.resolvers.Host().HomeVolume(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIVolume)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOVolume2ágithubácomáevergreenáciáevergreenárestámodeláAPIVolume(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_hostname(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Host_homeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Volume_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Volume_availabilityZone(ctx, field)
+ case "createdBy":
+ return ec.fieldContext_Volume_createdBy(ctx, field)
+ case "creationTime":
+ return ec.fieldContext_Volume_creationTime(ctx, field)
+ case "deviceName":
+ return ec.fieldContext_Volume_deviceName(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Volume_displayName(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Volume_expiration(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Volume_homeVolume(ctx, field)
+ case "host":
+ return ec.fieldContext_Volume_host(ctx, field)
+ case "hostID":
+ return ec.fieldContext_Volume_hostID(ctx, field)
+ case "migrating":
+ return ec.fieldContext_Volume_migrating(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Volume_noExpiration(ctx, field)
+ case "size":
+ return ec.fieldContext_Volume_size(ctx, field)
+ case "type":
+ return ec.fieldContext_Volume_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Volume", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Host_homeVolumeID(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_homeVolumeID(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Hostname, nil
+ return obj.HomeVolumeID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_provisioningMethod(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_homeVolumeID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_instanceType(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_instanceType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProvisioningMethod, nil
+ return obj.InstanceType, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_taskId(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_instanceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_instanceTags(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_instanceTags(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskId, nil
+ return obj.InstanceTags, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -15955,65 +16710,88 @@ func (ec *executionContext) _HostEventLogData_taskId(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]host.Tag)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInstanceTag2ágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_taskPid(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_instanceTags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "canBeModified":
+ return ec.fieldContext_InstanceTag_canBeModified(ctx, field)
+ case "key":
+ return ec.fieldContext_InstanceTag_key(ctx, field)
+ case "value":
+ return ec.fieldContext_InstanceTag_value(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type InstanceTag", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_lastCommunicationTime(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskPid, nil
+ return obj.LastCommunicationTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2timeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_taskStatus(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_lastCommunicationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_noExpiration(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_noExpiration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskStatus, nil
+ return obj.NoExpiration, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16025,30 +16803,39 @@ func (ec *executionContext) _HostEventLogData_taskStatus(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_execution(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_noExpiration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_provider(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_provider(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Execution, nil
+ return obj.Provider, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16065,60 +16852,81 @@ func (ec *executionContext) _HostEventLogData_execution(ctx context.Context, fie
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_monitorOp(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_provider(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_runningTask(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_runningTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MonitorOp, nil
+ return obj.RunningTask, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.TaskInfo)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTaskInfo2githubácomáevergreenáciáevergreenárestámodeláTaskInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_user(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_runningTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_TaskInfo_id(ctx, field)
+ case "name":
+ return ec.fieldContext_TaskInfo_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_startedBy(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_startedBy(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.User, nil
+ return obj.StartedBy, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16135,60 +16943,34 @@ func (ec *executionContext) _HostEventLogData_user(ctx context.Context, field gr
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogData_successful(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
+func (ec *executionContext) fieldContext_Host_startedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Successful, nil
- })
+func (ec *executionContext) _Host_status(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_status(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
- fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _HostEventLogData_duration(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Duration, nil
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16200,65 +16982,39 @@ func (ec *executionContext) _HostEventLogData_duration(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(model.APIDuration)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
+func (ec *executionContext) fieldContext_Host_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
- })
+func (ec *executionContext) _Host_tag(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_tag(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _HostEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ResourceType, nil
+ return obj.Tag, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16275,60 +17031,75 @@ func (ec *executionContext) _HostEventLogEntry_resourceType(ctx context.Context,
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
+func (ec *executionContext) fieldContext_Host_tag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_totalIdleTime(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_totalIdleTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProcessedAt, nil
+ return obj.TotalIdleTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
+func (ec *executionContext) fieldContext_Host_totalIdleTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_uptime(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_uptime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Timestamp, nil
+ return ec.resolvers.Host().Uptime(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -16342,25 +17113,34 @@ func (ec *executionContext) _HostEventLogEntry_timestamp(ctx context.Context, fi
return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Host_uptime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Host_user(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EventType, nil
+ return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16374,25 +17154,34 @@ func (ec *executionContext) _HostEventLogEntry_eventType(ctx context.Context, fi
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
+func (ec *executionContext) fieldContext_Host_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Host_volumes(ctx context.Context, field graphql.CollectedField, obj *model.APIHost) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Host_volumes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Data, nil
+ return ec.resolvers.Host().Volumes(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -16404,30 +17193,69 @@ func (ec *executionContext) _HostEventLogEntry_data(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(*model.HostAPIEventData)
+ res := resTmp.([]*model.APIVolume)
fc.Result = res
- return ec.marshalNHostEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláHostAPIEventData(ctx, field.Selections, res)
+ return ec.marshalNVolume2áágithubácomáevergreenáciáevergreenárestámodeláAPIVolumeá(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Host_volumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Host",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Volume_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Volume_availabilityZone(ctx, field)
+ case "createdBy":
+ return ec.fieldContext_Volume_createdBy(ctx, field)
+ case "creationTime":
+ return ec.fieldContext_Volume_creationTime(ctx, field)
+ case "deviceName":
+ return ec.fieldContext_Volume_deviceName(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Volume_displayName(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Volume_expiration(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Volume_homeVolume(ctx, field)
+ case "host":
+ return ec.fieldContext_Volume_host(ctx, field)
+ case "hostID":
+ return ec.fieldContext_Volume_hostID(ctx, field)
+ case "migrating":
+ return ec.fieldContext_Volume_migrating(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Volume_noExpiration(ctx, field)
+ case "size":
+ return ec.fieldContext_Volume_size(ctx, field)
+ case "type":
+ return ec.fieldContext_Volume_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Volume", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _HostEventLogData_agentBuild(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_agentBuild(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "HostEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ResourceId, nil
+ return obj.AgentBuild, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16444,25 +17272,34 @@ func (ec *executionContext) _HostEventLogEntry_resourceId(ctx context.Context, f
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField, obj *HostEvents) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEvents",
+func (ec *executionContext) fieldContext_HostEventLogData_agentBuild(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_agentRevision(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_agentRevision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EventLogEntries, nil
+ return obj.AgentRevision, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16474,30 +17311,39 @@ func (ec *executionContext) _HostEvents_eventLogEntries(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.([]*model.HostAPIEventLogEntry)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNHostEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláHostAPIEventLogEntryá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostEvents_count(ctx context.Context, field graphql.CollectedField, obj *HostEvents) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostEvents",
+func (ec *executionContext) fieldContext_HostEventLogData_agentRevision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_duration(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_duration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Count, nil
+ return obj.Duration, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16509,62 +17355,83 @@ func (ec *executionContext) _HostEvents_count(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostsResponse_filteredHostsCount(ctx context.Context, field graphql.CollectedField, obj *HostsResponse) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostsResponse",
+func (ec *executionContext) fieldContext_HostEventLogData_duration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_execution(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_execution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FilteredHostsCount, nil
+ return obj.Execution, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostsResponse_totalHostsCount(ctx context.Context, field graphql.CollectedField, obj *HostsResponse) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostsResponse",
+func (ec *executionContext) fieldContext_HostEventLogData_execution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_hostname(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_hostname(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TotalHostsCount, nil
+ return obj.Hostname, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16576,30 +17443,39 @@ func (ec *executionContext) _HostsResponse_totalHostsCount(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _HostsResponse_hosts(ctx context.Context, field graphql.CollectedField, obj *HostsResponse) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "HostsResponse",
+func (ec *executionContext) fieldContext_HostEventLogData_hostname(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_jasperRevision(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_jasperRevision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Hosts, nil
+ return obj.JasperRevision, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16611,30 +17487,39 @@ func (ec *executionContext) _HostsResponse_hosts(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.([]*model.APIHost)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNHost2áágithubácomáevergreenáciáevergreenárestámodeláAPIHostá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _InstanceTag_key(ctx context.Context, field graphql.CollectedField, obj *host.Tag) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "InstanceTag",
+func (ec *executionContext) fieldContext_HostEventLogData_jasperRevision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_logs(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_logs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Key, nil
+ return obj.Logs, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16646,30 +17531,39 @@ func (ec *executionContext) _InstanceTag_key(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _InstanceTag_value(ctx context.Context, field graphql.CollectedField, obj *host.Tag) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "InstanceTag",
+func (ec *executionContext) fieldContext_HostEventLogData_logs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_monitorOp(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_monitorOp(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Value, nil
+ return obj.MonitorOp, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16681,30 +17575,39 @@ func (ec *executionContext) _InstanceTag_value(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _InstanceTag_canBeModified(ctx context.Context, field graphql.CollectedField, obj *host.Tag) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "InstanceTag",
+func (ec *executionContext) fieldContext_HostEventLogData_monitorOp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_newStatus(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_newStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CanBeModified, nil
+ return obj.NewStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16716,222 +17619,259 @@ func (ec *executionContext) _InstanceTag_canBeModified(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _IssueLink_issueKey(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "IssueLink",
+func (ec *executionContext) fieldContext_HostEventLogData_newStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_oldStatus(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_oldStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IssueKey, nil
+ return obj.OldStatus, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _IssueLink_url(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "IssueLink",
+func (ec *executionContext) fieldContext_HostEventLogData_oldStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_provisioningMethod(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_provisioningMethod(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.URL, nil
+ return obj.ProvisioningMethod, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _IssueLink_source(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "IssueLink",
+func (ec *executionContext) fieldContext_HostEventLogData_provisioningMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_successful(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_successful(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Source, nil
+ return obj.Successful, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APISource)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOSource2ágithubácomáevergreenáciáevergreenárestámodeláAPISource(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _IssueLink_jiraTicket(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_HostEventLogData_successful(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _HostEventLogData_taskId(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_taskId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "IssueLink",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.IssueLink().JiraTicket(rctx, obj)
+ return obj.TaskId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*thirdparty.JiraTicket)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOJiraTicket2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicket(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _IssueLink_confidenceScore(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "IssueLink",
+func (ec *executionContext) fieldContext_HostEventLogData_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ConfidenceScore, nil
- })
+func (ec *executionContext) _HostEventLogData_taskPid(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_taskPid(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*float64)
- fc.Result = res
- return ec.marshalOFloat2áfloat64(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _JiraConfig_host(ctx context.Context, field graphql.CollectedField, obj *model.APIJiraConfig) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "JiraConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Host, nil
+ return obj.TaskPid, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraField_field(ctx context.Context, field graphql.CollectedField, obj *model.APIJiraField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraField",
+func (ec *executionContext) fieldContext_HostEventLogData_taskPid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_taskStatus(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_taskStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Field, nil
+ return obj.TaskStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16948,25 +17888,34 @@ func (ec *executionContext) _JiraField_field(ctx context.Context, field graphql.
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraField_displayText(ctx context.Context, field graphql.CollectedField, obj *model.APIJiraField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraField",
+func (ec *executionContext) fieldContext_HostEventLogData_taskStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogData_user(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogData_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayText, nil
+ return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -16983,25 +17932,34 @@ func (ec *executionContext) _JiraField_displayText(ctx context.Context, field gr
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraIssueSubscriber_project(ctx context.Context, field graphql.CollectedField, obj *model.APIJIRAIssueSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraIssueSubscriber",
+func (ec *executionContext) fieldContext_HostEventLogData_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Project, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17018,25 +17976,34 @@ func (ec *executionContext) _JiraIssueSubscriber_project(ctx context.Context, fi
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraIssueSubscriber_issueType(ctx context.Context, field graphql.CollectedField, obj *model.APIJIRAIssueSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraIssueSubscriber",
+func (ec *executionContext) fieldContext_HostEventLogEntry_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_data(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IssueType, nil
+ return obj.Data, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17048,65 +18015,114 @@ func (ec *executionContext) _JiraIssueSubscriber_issueType(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.HostAPIEventData)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNHostEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláHostAPIEventData(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraStatus_id(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraStatus) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_HostEventLogEntry_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "agentBuild":
+ return ec.fieldContext_HostEventLogData_agentBuild(ctx, field)
+ case "agentRevision":
+ return ec.fieldContext_HostEventLogData_agentRevision(ctx, field)
+ case "duration":
+ return ec.fieldContext_HostEventLogData_duration(ctx, field)
+ case "execution":
+ return ec.fieldContext_HostEventLogData_execution(ctx, field)
+ case "hostname":
+ return ec.fieldContext_HostEventLogData_hostname(ctx, field)
+ case "jasperRevision":
+ return ec.fieldContext_HostEventLogData_jasperRevision(ctx, field)
+ case "logs":
+ return ec.fieldContext_HostEventLogData_logs(ctx, field)
+ case "monitorOp":
+ return ec.fieldContext_HostEventLogData_monitorOp(ctx, field)
+ case "newStatus":
+ return ec.fieldContext_HostEventLogData_newStatus(ctx, field)
+ case "oldStatus":
+ return ec.fieldContext_HostEventLogData_oldStatus(ctx, field)
+ case "provisioningMethod":
+ return ec.fieldContext_HostEventLogData_provisioningMethod(ctx, field)
+ case "successful":
+ return ec.fieldContext_HostEventLogData_successful(ctx, field)
+ case "taskId":
+ return ec.fieldContext_HostEventLogData_taskId(ctx, field)
+ case "taskPid":
+ return ec.fieldContext_HostEventLogData_taskPid(ctx, field)
+ case "taskStatus":
+ return ec.fieldContext_HostEventLogData_taskStatus(ctx, field)
+ case "user":
+ return ec.fieldContext_HostEventLogData_user(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type HostEventLogData", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _HostEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_eventType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "JiraStatus",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return obj.EventType, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraStatus_name(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraStatus) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraStatus",
+func (ec *executionContext) fieldContext_HostEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_processedAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.ProcessedAt, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17118,30 +18134,39 @@ func (ec *executionContext) _JiraStatus_name(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraTicket_key(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraTicket) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraTicket",
+func (ec *executionContext) fieldContext_HostEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_resourceId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Key, nil
+ return obj.ResourceId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17153,30 +18178,39 @@ func (ec *executionContext) _JiraTicket_key(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _JiraTicket_fields(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraTicket) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "JiraTicket",
+func (ec *executionContext) fieldContext_HostEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_resourceType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Fields, nil
+ return obj.ResourceType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17188,62 +18222,39 @@ func (ec *executionContext) _JiraTicket_fields(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(*thirdparty.TicketFields)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTicketFields2ágithubácomáevergreenáciáevergreenáthirdpartyáTicketFields(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _LogMessage_type(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "LogMessage",
+func (ec *executionContext) fieldContext_HostEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
- })
+func (ec *executionContext) _HostEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.HostAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEventLogEntry_timestamp(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _LogMessage_severity(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LogMessage",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Severity, nil
+ return obj.Timestamp, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17252,190 +18263,143 @@ func (ec *executionContext) _LogMessage_severity(ctx context.Context, field grap
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _LogMessage_message(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "LogMessage",
+func (ec *executionContext) fieldContext_HostEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Message, nil
- })
+func (ec *executionContext) _HostEvents_count(ctx context.Context, field graphql.CollectedField, obj *HostEvents) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEvents_count(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _LogMessage_timestamp(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LogMessage",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Timestamp, nil
+ return obj.Count, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(time.Time)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOTime2timeáTime(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _LogMessage_version(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "LogMessage",
+func (ec *executionContext) fieldContext_HostEvents_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEvents",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Version, nil
- })
+func (ec *executionContext) _HostEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField, obj *HostEvents) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostEvents_eventLogEntries(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(int)
- fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _MainlineCommitVersion_version(ctx context.Context, field graphql.CollectedField, obj *MainlineCommitVersion) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "MainlineCommitVersion",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Version, nil
+ return obj.EventLogEntries, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.([]*model.HostAPIEventLogEntry)
fc.Result = res
- return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalNHostEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláHostAPIEventLogEntryá(ctx, field.Selections, res)
}
-func (ec *executionContext) _MainlineCommitVersion_rolledUpVersions(ctx context.Context, field graphql.CollectedField, obj *MainlineCommitVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "MainlineCommitVersion",
+func (ec *executionContext) fieldContext_HostEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostEvents",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_HostEventLogEntry_id(ctx, field)
+ case "data":
+ return ec.fieldContext_HostEventLogEntry_data(ctx, field)
+ case "eventType":
+ return ec.fieldContext_HostEventLogEntry_eventType(ctx, field)
+ case "processedAt":
+ return ec.fieldContext_HostEventLogEntry_processedAt(ctx, field)
+ case "resourceId":
+ return ec.fieldContext_HostEventLogEntry_resourceId(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_HostEventLogEntry_resourceType(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_HostEventLogEntry_timestamp(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type HostEventLogEntry", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.RolledUpVersions, nil
- })
+func (ec *executionContext) _HostsResponse_filteredHostsCount(ctx context.Context, field graphql.CollectedField, obj *HostsResponse) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostsResponse_filteredHostsCount(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.([]*model.APIVersion)
- fc.Result = res
- return ec.marshalOVersion2áágithubácomáevergreenáciáevergreenárestámodeláAPIVersioná(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _MainlineCommits_nextPageOrderNumber(ctx context.Context, field graphql.CollectedField, obj *MainlineCommits) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "MainlineCommits",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NextPageOrderNumber, nil
+ return obj.FilteredHostsCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17449,57 +18413,128 @@ func (ec *executionContext) _MainlineCommits_nextPageOrderNumber(ctx context.Con
return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _MainlineCommits_prevPageOrderNumber(ctx context.Context, field graphql.CollectedField, obj *MainlineCommits) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "MainlineCommits",
+func (ec *executionContext) fieldContext_HostsResponse_filteredHostsCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostsResponse",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _HostsResponse_hosts(ctx context.Context, field graphql.CollectedField, obj *HostsResponse) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostsResponse_hosts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PrevPageOrderNumber, nil
+ return obj.Hosts, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.([]*model.APIHost)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalNHost2áágithubácomáevergreenáciáevergreenárestámodeláAPIHostá(ctx, field.Selections, res)
}
-func (ec *executionContext) _MainlineCommits_versions(ctx context.Context, field graphql.CollectedField, obj *MainlineCommits) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_HostsResponse_hosts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostsResponse",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _HostsResponse_totalHostsCount(ctx context.Context, field graphql.CollectedField, obj *HostsResponse) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_HostsResponse_totalHostsCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "MainlineCommits",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Versions, nil
+ return obj.TotalHostsCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17511,30 +18546,39 @@ func (ec *executionContext) _MainlineCommits_versions(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]*MainlineCommitVersion)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNMainlineCommitVersion2áágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersioná(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_id(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Manifest",
+func (ec *executionContext) fieldContext_HostsResponse_totalHostsCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "HostsResponse",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _InstanceTag_canBeModified(ctx context.Context, field graphql.CollectedField, obj *host.Tag) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_InstanceTag_canBeModified(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.CanBeModified, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17546,30 +18590,39 @@ func (ec *executionContext) _Manifest_id(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_revision(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Manifest",
+func (ec *executionContext) fieldContext_InstanceTag_canBeModified(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "InstanceTag",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _InstanceTag_key(ctx context.Context, field graphql.CollectedField, obj *host.Tag) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_InstanceTag_key(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Revision, nil
+ return obj.Key, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17586,25 +18639,34 @@ func (ec *executionContext) _Manifest_revision(ctx context.Context, field graphq
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_project(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Manifest",
+func (ec *executionContext) fieldContext_InstanceTag_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "InstanceTag",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _InstanceTag_value(ctx context.Context, field graphql.CollectedField, obj *host.Tag) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_InstanceTag_value(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Project, nil
+ return obj.Value, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17621,95 +18683,116 @@ func (ec *executionContext) _Manifest_project(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_branch(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Manifest",
+func (ec *executionContext) fieldContext_InstanceTag_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "InstanceTag",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IssueLink_confidenceScore(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IssueLink_confidenceScore(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Branch, nil
+ return obj.ConfidenceScore, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*float64)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOFloat2áfloat64(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_isBase(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Manifest",
+func (ec *executionContext) fieldContext_IssueLink_confidenceScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IssueLink",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Float does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IssueLink_issueKey(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IssueLink_issueKey(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsBase, nil
+ return obj.IssueKey, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_moduleOverrides(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Manifest",
+func (ec *executionContext) fieldContext_IssueLink_issueKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IssueLink",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IssueLink_jiraTicket(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IssueLink_jiraTicket(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ModuleOverrides, nil
+ return ec.resolvers.IssueLink().JiraTicket(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -17718,30 +18801,45 @@ func (ec *executionContext) _Manifest_moduleOverrides(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(map[string]string)
+ res := resTmp.(*thirdparty.JiraTicket)
fc.Result = res
- return ec.marshalOStringMap2map(ctx, field.Selections, res)
+ return ec.marshalOJiraTicket2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicket(ctx, field.Selections, res)
}
-func (ec *executionContext) _Manifest_modules(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_IssueLink_jiraTicket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IssueLink",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "fields":
+ return ec.fieldContext_JiraTicket_fields(ctx, field)
+ case "key":
+ return ec.fieldContext_JiraTicket_key(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraTicket", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _IssueLink_source(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IssueLink_source(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Manifest",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Modules, nil
+ return obj.Source, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17750,30 +18848,47 @@ func (ec *executionContext) _Manifest_modules(ctx context.Context, field graphql
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(map[string]interface{})
+ res := resTmp.(*model.APISource)
fc.Result = res
- return ec.marshalOMap2map(ctx, field.Selections, res)
+ return ec.marshalOSource2ágithubácomáevergreenáciáevergreenárestámodeláAPISource(ctx, field.Selections, res)
}
-func (ec *executionContext) _Module_module(ctx context.Context, field graphql.CollectedField, obj *model.APIModule) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Module",
+func (ec *executionContext) fieldContext_IssueLink_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IssueLink",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "author":
+ return ec.fieldContext_Source_author(ctx, field)
+ case "requester":
+ return ec.fieldContext_Source_requester(ctx, field)
+ case "time":
+ return ec.fieldContext_Source_time(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Source", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IssueLink_url(ctx context.Context, field graphql.CollectedField, obj *model.APIIssueLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IssueLink_url(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Module, nil
+ return obj.URL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17787,25 +18902,34 @@ func (ec *executionContext) _Module_module(ctx context.Context, field graphql.Co
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Module_issue(ctx context.Context, field graphql.CollectedField, obj *model.APIModule) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Module",
+func (ec *executionContext) fieldContext_IssueLink_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IssueLink",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _JiraConfig_host(ctx context.Context, field graphql.CollectedField, obj *model.APIJiraConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraConfig_host(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Issue, nil
+ return obj.Host, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17819,25 +18943,34 @@ func (ec *executionContext) _Module_issue(ctx context.Context, field graphql.Col
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ModuleCodeChange_branchName(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ModuleCodeChange",
+func (ec *executionContext) fieldContext_JiraConfig_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _JiraField_displayText(ctx context.Context, field graphql.CollectedField, obj *model.APIJiraField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraField_displayText(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BranchName, nil
+ return obj.DisplayText, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17854,25 +18987,34 @@ func (ec *executionContext) _ModuleCodeChange_branchName(ctx context.Context, fi
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ModuleCodeChange_htmlLink(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ModuleCodeChange",
+func (ec *executionContext) fieldContext_JiraField_displayText(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraField",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _JiraField_field(ctx context.Context, field graphql.CollectedField, obj *model.APIJiraField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraField_field(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HTMLLink, nil
+ return obj.Field, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17889,25 +19031,34 @@ func (ec *executionContext) _ModuleCodeChange_htmlLink(ctx context.Context, fiel
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ModuleCodeChange_rawLink(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ModuleCodeChange",
+func (ec *executionContext) fieldContext_JiraField_field(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraField",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _JiraIssueSubscriber_issueType(ctx context.Context, field graphql.CollectedField, obj *model.APIJIRAIssueSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraIssueSubscriber_issueType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RawLink, nil
+ return obj.IssueType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17924,25 +19075,34 @@ func (ec *executionContext) _ModuleCodeChange_rawLink(ctx context.Context, field
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ModuleCodeChange_fileDiffs(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ModuleCodeChange",
+func (ec *executionContext) fieldContext_JiraIssueSubscriber_issueType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraIssueSubscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _JiraIssueSubscriber_project(ctx context.Context, field graphql.CollectedField, obj *model.APIJIRAIssueSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraIssueSubscriber_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FileDiffs, nil
+ return obj.Project, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17954,37 +19114,39 @@ func (ec *executionContext) _ModuleCodeChange_fileDiffs(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.([]model.FileDiff)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNFileDiff2ágithubácomáevergreenáciáevergreenárestámodeláFileDiffá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_addFavoriteProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_JiraIssueSubscriber_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraIssueSubscriber",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_addFavoriteProject_args(ctx, rawArgs)
+func (ec *executionContext) _JiraStatus_id(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraStatus) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraStatus_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AddFavoriteProject(rctx, args["identifier"].(string))
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -17996,37 +19158,39 @@ func (ec *executionContext) _Mutation_addFavoriteProject(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_removeFavoriteProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_JiraStatus_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraStatus",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_removeFavoriteProject_args(ctx, rawArgs)
+func (ec *executionContext) _JiraStatus_name(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraStatus) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraStatus_name(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RemoveFavoriteProject(rctx, args["identifier"].(string))
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18038,57 +19202,39 @@ func (ec *executionContext) _Mutation_removeFavoriteProject(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_createProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_JiraStatus_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraStatus",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_createProject_args(ctx, rawArgs)
+func (ec *executionContext) _JiraTicket_fields(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraTicket) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraTicket_fields(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- directive0 := func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().CreateProject(rctx, args["project"].(model.APIProjectRef))
- }
- directive1 := func(ctx context.Context) (interface{}, error) {
- if ec.directives.RequireSuperUser == nil {
- return nil, errors.New("directive requireSuperUser is not implemented")
- }
- return ec.directives.RequireSuperUser(ctx, nil, directive0)
- }
-
- tmp, err := directive1(rctx)
- if err != nil {
- return nil, graphql.ErrorOnPath(ctx, err)
- }
- if tmp == nil {
- return nil, nil
- }
- if data, ok := tmp.(*model.APIProjectRef); ok {
- return data, nil
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
}
- return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/evergreen-ci/evergreen/rest/model.APIProjectRef`, tmp)
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Fields, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18100,57 +19246,55 @@ func (ec *executionContext) _Mutation_createProject(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(*thirdparty.TicketFields)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNTicketFields2ágithubácomáevergreenáciáevergreenáthirdpartyáTicketFields(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_copyProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_JiraTicket_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraTicket",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "assignedTeam":
+ return ec.fieldContext_TicketFields_assignedTeam(ctx, field)
+ case "assigneeDisplayName":
+ return ec.fieldContext_TicketFields_assigneeDisplayName(ctx, field)
+ case "created":
+ return ec.fieldContext_TicketFields_created(ctx, field)
+ case "resolutionName":
+ return ec.fieldContext_TicketFields_resolutionName(ctx, field)
+ case "status":
+ return ec.fieldContext_TicketFields_status(ctx, field)
+ case "summary":
+ return ec.fieldContext_TicketFields_summary(ctx, field)
+ case "updated":
+ return ec.fieldContext_TicketFields_updated(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TicketFields", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_copyProject_args(ctx, rawArgs)
+func (ec *executionContext) _JiraTicket_key(ctx context.Context, field graphql.CollectedField, obj *thirdparty.JiraTicket) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_JiraTicket_key(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- directive0 := func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().CopyProject(rctx, args["project"].(data.CopyProjectOpts))
- }
- directive1 := func(ctx context.Context) (interface{}, error) {
- if ec.directives.RequireSuperUser == nil {
- return nil, errors.New("directive requireSuperUser is not implemented")
- }
- return ec.directives.RequireSuperUser(ctx, nil, directive0)
- }
-
- tmp, err := directive1(rctx)
- if err != nil {
- return nil, graphql.ErrorOnPath(ctx, err)
- }
- if tmp == nil {
- return nil, nil
- }
- if data, ok := tmp.(*model.APIProjectRef); ok {
- return data, nil
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
}
- return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/evergreen-ci/evergreen/rest/model.APIProjectRef`, tmp)
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Key, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18162,163 +19306,162 @@ func (ec *executionContext) _Mutation_copyProject(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_attachProjectToNewRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_JiraTicket_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "JiraTicket",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_attachProjectToNewRepo_args(ctx, rawArgs)
+func (ec *executionContext) _LogMessage_message(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogMessage_message(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AttachProjectToNewRepo(rctx, args["project"].(MoveProjectInput))
+ return obj.Message, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_saveProjectSettingsForSection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogMessage_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogMessage",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_saveProjectSettingsForSection_args(ctx, rawArgs)
+func (ec *executionContext) _LogMessage_severity(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogMessage_severity(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SaveProjectSettingsForSection(rctx, args["projectSettings"].(*model.APIProjectSettings), args["section"].(ProjectSettingsSection))
+ return obj.Severity, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIProjectSettings)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNProjectSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
+ return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_saveRepoSettingsForSection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogMessage_severity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogMessage",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_saveRepoSettingsForSection_args(ctx, rawArgs)
+func (ec *executionContext) _LogMessage_timestamp(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogMessage_timestamp(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SaveRepoSettingsForSection(rctx, args["repoSettings"].(*model.APIProjectSettings), args["section"].(ProjectSettingsSection))
+ return obj.Timestamp, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIProjectSettings)
+ res := resTmp.(time.Time)
fc.Result = res
- return ec.marshalNRepoSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
+ return ec.marshalOTime2timeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_defaultSectionToRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogMessage_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogMessage",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_defaultSectionToRepo_args(ctx, rawArgs)
+func (ec *executionContext) _LogMessage_type(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogMessage_type(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().DefaultSectionToRepo(rctx, args["projectId"].(string), args["section"].(ProjectSettingsSection))
+ return obj.Type, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18327,79 +19470,80 @@ func (ec *executionContext) _Mutation_defaultSectionToRepo(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_attachProjectToRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogMessage_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogMessage",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_attachProjectToRepo_args(ctx, rawArgs)
+func (ec *executionContext) _LogMessage_version(ctx context.Context, field graphql.CollectedField, obj *apimodels.LogMessage) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogMessage_version(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AttachProjectToRepo(rctx, args["projectId"].(string))
+ return obj.Version, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_detachProjectFromRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogMessage_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogMessage",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_detachProjectFromRepo_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_id(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().DetachProjectFromRepo(rctx, args["projectId"].(string))
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18411,37 +19555,39 @@ func (ec *executionContext) _Mutation_detachProjectFromRepo(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_forceRepotrackerRun(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_forceRepotrackerRun_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_builder(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_builder(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().ForceRepotrackerRun(rctx, args["projectId"].(string))
+ return obj.Builder, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18453,37 +19599,39 @@ func (ec *executionContext) _Mutation_forceRepotrackerRun(ctx context.Context, f
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_deactivateStepbackTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_builder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_deactivateStepbackTasks_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_buildNum(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_buildNum(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().DeactivateStepbackTasks(rctx, args["projectId"].(string))
+ return obj.BuildNum, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18495,37 +19643,39 @@ func (ec *executionContext) _Mutation_deactivateStepbackTasks(ctx context.Contex
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_schedulePatch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_buildNum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_schedulePatch_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_taskId(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_taskId(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SchedulePatch(rctx, args["patchId"].(string), args["configure"].(PatchConfigure))
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18537,193 +19687,375 @@ func (ec *executionContext) _Mutation_schedulePatch(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(*model.APIPatch)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_schedulePatchTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_schedulePatchTasks_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_taskExecution(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_taskExecution(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SchedulePatchTasks(rctx, args["patchId"].(string))
+ return obj.TaskExecution, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_unschedulePatchTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_taskExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_unschedulePatchTasks_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_tests(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_tests(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UnschedulePatchTasks(rctx, args["patchId"].(string), args["abort"].(bool))
+ return obj.Tests, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]plank.Test)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNLogkeeperTest2ágithubácomáevergreenáciáplankáTestá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_restartVersions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_tests(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_LogkeeperTest_id(ctx, field)
+ case "name":
+ return ec.fieldContext_LogkeeperTest_name(ctx, field)
+ case "buildId":
+ return ec.fieldContext_LogkeeperTest_buildId(ctx, field)
+ case "taskId":
+ return ec.fieldContext_LogkeeperTest_taskId(ctx, field)
+ case "taskExecution":
+ return ec.fieldContext_LogkeeperTest_taskExecution(ctx, field)
+ case "phase":
+ return ec.fieldContext_LogkeeperTest_phase(ctx, field)
+ case "command":
+ return ec.fieldContext_LogkeeperTest_command(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LogkeeperTest", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_restartVersions_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperBuild_task(ctx context.Context, field graphql.CollectedField, obj *plank.Build) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperBuild_task(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RestartVersions(rctx, args["versionId"].(string), args["abort"].(bool), args["versionsToRestart"].([]*model1.VersionToRestart))
+ return ec.resolvers.LogkeeperBuild().Task(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*model.APIVersion)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOVersion2áágithubácomáevergreenáciáevergreenárestámodeláAPIVersioná(ctx, field.Selections, res)
+ return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_scheduleUndispatchedBaseTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperBuild_task(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperBuild",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_scheduleUndispatchedBaseTasks_args(ctx, rawArgs)
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _LogkeeperTest_id(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().ScheduleUndispatchedBaseTasks(rctx, args["patchId"].(string))
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*model.APITask)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_enqueuePatch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_enqueuePatch_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperTest_name(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_name(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().EnqueuePatch(rctx, args["patchId"].(string), args["commitMessage"].(*string))
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18735,76 +20067,83 @@ func (ec *executionContext) _Mutation_enqueuePatch(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(*model.APIPatch)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_setPatchPriority(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_setPatchPriority_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperTest_buildId(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_buildId(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SetPatchPriority(rctx, args["patchId"].(string), args["priority"].(int))
+ return obj.BuildID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_scheduleTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_buildId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_scheduleTasks_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperTest_taskId(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_taskId(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().ScheduleTasks(rctx, args["taskIds"].([]string))
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18816,37 +20155,39 @@ func (ec *executionContext) _Mutation_scheduleTasks(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.([]*model.APITask)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_unscheduleTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_unscheduleTask_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperTest_taskExecution(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_taskExecution(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UnscheduleTask(rctx, args["taskId"].(string))
+ return obj.TaskExecution, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18858,37 +20199,39 @@ func (ec *executionContext) _Mutation_unscheduleTask(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_abortTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_taskExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_abortTask_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperTest_phase(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_phase(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AbortTask(rctx, args["taskId"].(string))
+ return obj.Phase, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18900,37 +20243,39 @@ func (ec *executionContext) _Mutation_abortTask(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_setTaskPriority(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_phase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_setTaskPriority_args(ctx, rawArgs)
+func (ec *executionContext) _LogkeeperTest_command(ctx context.Context, field graphql.CollectedField, obj *plank.Test) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LogkeeperTest_command(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SetTaskPriority(rctx, args["taskId"].(string), args["priority"].(int))
+ return obj.Command, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -18942,205 +20287,347 @@ func (ec *executionContext) _Mutation_setTaskPriority(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_restartTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_LogkeeperTest_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LogkeeperTest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_restartTask_args(ctx, rawArgs)
+func (ec *executionContext) _MainlineCommitVersion_rolledUpVersions(ctx context.Context, field graphql.CollectedField, obj *MainlineCommitVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MainlineCommitVersion_rolledUpVersions(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RestartTask(rctx, args["taskId"].(string))
+ return obj.RolledUpVersions, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.([]*model.APIVersion)
fc.Result = res
- return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalOVersion2áágithubácomáevergreenáciáevergreenárestámodeláAPIVersioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_saveSubscription(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_MainlineCommitVersion_rolledUpVersions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MainlineCommitVersion",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _MainlineCommitVersion_version(ctx context.Context, field graphql.CollectedField, obj *MainlineCommitVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MainlineCommitVersion_version(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_saveSubscription_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SaveSubscription(rctx, args["subscription"].(model.APISubscription))
+ return obj.Version, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*model.APIVersion)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_editAnnotationNote(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MainlineCommitVersion_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MainlineCommitVersion",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_editAnnotationNote_args(ctx, rawArgs)
+func (ec *executionContext) _MainlineCommits_nextPageOrderNumber(ctx context.Context, field graphql.CollectedField, obj *MainlineCommits) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MainlineCommits_nextPageOrderNumber(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().EditAnnotationNote(rctx, args["taskId"].(string), args["execution"].(int), args["originalMessage"].(string), args["newMessage"].(string))
+ return obj.NextPageOrderNumber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_moveAnnotationIssue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MainlineCommits_nextPageOrderNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MainlineCommits",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_moveAnnotationIssue_args(ctx, rawArgs)
+func (ec *executionContext) _MainlineCommits_prevPageOrderNumber(ctx context.Context, field graphql.CollectedField, obj *MainlineCommits) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MainlineCommits_prevPageOrderNumber(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().MoveAnnotationIssue(rctx, args["taskId"].(string), args["execution"].(int), args["apiIssue"].(model.APIIssueLink), args["isIssue"].(bool))
+ return obj.PrevPageOrderNumber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_addAnnotationIssue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MainlineCommits_prevPageOrderNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MainlineCommits",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_addAnnotationIssue_args(ctx, rawArgs)
+func (ec *executionContext) _MainlineCommits_versions(ctx context.Context, field graphql.CollectedField, obj *MainlineCommits) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MainlineCommits_versions(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AddAnnotationIssue(rctx, args["taskId"].(string), args["execution"].(int), args["apiIssue"].(model.APIIssueLink), args["isIssue"].(bool))
+ return obj.Versions, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19152,37 +20639,45 @@ func (ec *executionContext) _Mutation_addAnnotationIssue(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]*MainlineCommitVersion)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNMainlineCommitVersion2áágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_removeAnnotationIssue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MainlineCommits_versions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MainlineCommits",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "rolledUpVersions":
+ return ec.fieldContext_MainlineCommitVersion_rolledUpVersions(ctx, field)
+ case "version":
+ return ec.fieldContext_MainlineCommitVersion_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type MainlineCommitVersion", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_removeAnnotationIssue_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_id(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RemoveAnnotationIssue(rctx, args["taskId"].(string), args["execution"].(int), args["apiIssue"].(model.APIIssueLink), args["isIssue"].(bool))
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19194,76 +20689,83 @@ func (ec *executionContext) _Mutation_removeAnnotationIssue(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_removeItemFromCommitQueue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_removeItemFromCommitQueue_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_branch(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_branch(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RemoveItemFromCommitQueue(rctx, args["commitQueueId"].(string), args["issue"].(string))
+ return obj.Branch, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_updateUserSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_branch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_updateUserSettings_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_isBase(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_isBase(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UpdateUserSettings(rctx, args["userSettings"].(*model.APIUserSettings))
+ return obj.IsBase, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19280,116 +20782,116 @@ func (ec *executionContext) _Mutation_updateUserSettings(ctx context.Context, fi
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_restartJasper(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_isBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_restartJasper_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_moduleOverrides(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_moduleOverrides(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RestartJasper(rctx, args["hostIds"].([]string))
+ return obj.ModuleOverrides, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(map[string]string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalOStringMap2map(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_reprovisionToNew(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_moduleOverrides(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type StringMap does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_reprovisionToNew_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_modules(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_modules(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().ReprovisionToNew(rctx, args["hostIds"].([]string))
+ return obj.Modules, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(map[string]interface{})
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalOMap2map(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_updateHostStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_modules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Map does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_updateHostStatus_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_project(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_project(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UpdateHostStatus(rctx, args["hostIds"].([]string), args["status"].(string), args["notes"].(*string))
+ return obj.Project, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19401,37 +20903,39 @@ func (ec *executionContext) _Mutation_updateHostStatus(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_createPublicKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_createPublicKey_args(ctx, rawArgs)
+func (ec *executionContext) _Manifest_revision(ctx context.Context, field graphql.CollectedField, obj *Manifest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Manifest_revision(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().CreatePublicKey(rctx, args["publicKeyInput"].(PublicKeyInput))
+ return obj.Revision, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19443,37 +20947,39 @@ func (ec *executionContext) _Mutation_createPublicKey(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]*model.APIPubKey)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_spawnHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Manifest_revision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Manifest",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_spawnHost_args(ctx, rawArgs)
+func (ec *executionContext) _MetadataLink_url(ctx context.Context, field graphql.CollectedField, obj *model.APIMetadataLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MetadataLink_url(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SpawnHost(rctx, args["spawnHostInput"].(*SpawnHostInput))
+ return obj.URL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19485,37 +20991,39 @@ func (ec *executionContext) _Mutation_spawnHost(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*model.APIHost)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_spawnVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MetadataLink_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MetadataLink",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_spawnVolume_args(ctx, rawArgs)
+func (ec *executionContext) _MetadataLink_text(ctx context.Context, field graphql.CollectedField, obj *model.APIMetadataLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MetadataLink_text(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SpawnVolume(rctx, args["spawnVolumeInput"].(SpawnVolumeInput))
+ return obj.Text, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19527,163 +21035,170 @@ func (ec *executionContext) _Mutation_spawnVolume(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_updateVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MetadataLink_text(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MetadataLink",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_updateVolume_args(ctx, rawArgs)
+func (ec *executionContext) _MetadataLink_source(ctx context.Context, field graphql.CollectedField, obj *model.APIMetadataLink) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_MetadataLink_source(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UpdateVolume(rctx, args["updateVolumeInput"].(UpdateVolumeInput))
+ return obj.Source, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*model.APISource)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOSource2ágithubácomáevergreenáciáevergreenárestámodeláAPISource(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_updateSpawnHostStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_MetadataLink_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "MetadataLink",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "author":
+ return ec.fieldContext_Source_author(ctx, field)
+ case "requester":
+ return ec.fieldContext_Source_requester(ctx, field)
+ case "time":
+ return ec.fieldContext_Source_time(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Source", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_updateSpawnHostStatus_args(ctx, rawArgs)
+func (ec *executionContext) _Module_issue(ctx context.Context, field graphql.CollectedField, obj *model.APIModule) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Module_issue(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UpdateSpawnHostStatus(rctx, args["hostId"].(string), args["action"].(SpawnHostStatusActions))
+ return obj.Issue, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIHost)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_removePublicKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Module_issue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Module",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_removePublicKey_args(ctx, rawArgs)
+func (ec *executionContext) _Module_module(ctx context.Context, field graphql.CollectedField, obj *model.APIModule) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Module_module(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RemovePublicKey(rctx, args["keyName"].(string))
+ return obj.Module, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIPubKey)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_updatePublicKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_Module_module(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Module",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_updatePublicKey_args(ctx, rawArgs)
+func (ec *executionContext) _ModuleCodeChange_branchName(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ModuleCodeChange_branchName(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().UpdatePublicKey(rctx, args["targetKeyName"].(string), args["updateInfo"].(PublicKeyInput))
+ return obj.BranchName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19695,37 +21210,39 @@ func (ec *executionContext) _Mutation_updatePublicKey(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]*model.APIPubKey)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_attachVolumeToHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_ModuleCodeChange_branchName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ModuleCodeChange",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_attachVolumeToHost_args(ctx, rawArgs)
+func (ec *executionContext) _ModuleCodeChange_fileDiffs(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ModuleCodeChange_fileDiffs(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AttachVolumeToHost(rctx, args["volumeAndHost"].(VolumeHost))
+ return obj.FileDiffs, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19737,37 +21254,51 @@ func (ec *executionContext) _Mutation_attachVolumeToHost(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]model.FileDiff)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNFileDiff2ágithubácomáevergreenáciáevergreenárestámodeláFileDiffá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_detachVolumeFromHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_ModuleCodeChange_fileDiffs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ModuleCodeChange",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "additions":
+ return ec.fieldContext_FileDiff_additions(ctx, field)
+ case "deletions":
+ return ec.fieldContext_FileDiff_deletions(ctx, field)
+ case "description":
+ return ec.fieldContext_FileDiff_description(ctx, field)
+ case "diffLink":
+ return ec.fieldContext_FileDiff_diffLink(ctx, field)
+ case "fileName":
+ return ec.fieldContext_FileDiff_fileName(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type FileDiff", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_detachVolumeFromHost_args(ctx, rawArgs)
+func (ec *executionContext) _ModuleCodeChange_htmlLink(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ModuleCodeChange_htmlLink(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().DetachVolumeFromHost(rctx, args["volumeId"].(string))
+ return obj.HTMLLink, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19779,37 +21310,39 @@ func (ec *executionContext) _Mutation_detachVolumeFromHost(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_removeVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_ModuleCodeChange_htmlLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ModuleCodeChange",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_removeVolume_args(ctx, rawArgs)
+func (ec *executionContext) _ModuleCodeChange_rawLink(ctx context.Context, field graphql.CollectedField, obj *model.APIModulePatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ModuleCodeChange_rawLink(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().RemoveVolume(rctx, args["volumeId"].(string))
+ return obj.RawLink, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -19821,37 +21354,39 @@ func (ec *executionContext) _Mutation_removeVolume(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_editSpawnHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Mutation",
+func (ec *executionContext) fieldContext_ModuleCodeChange_rawLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ModuleCodeChange",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_editSpawnHost_args(ctx, rawArgs)
+func (ec *executionContext) _Mutation_bbCreateTicket(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_bbCreateTicket(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().EditSpawnHost(rctx, args["spawnHost"].(*EditSpawnHostInput))
+ return ec.resolvers.Mutation().BbCreateTicket(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -19863,37 +21398,50 @@ func (ec *executionContext) _Mutation_editSpawnHost(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(*model.APIHost)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_bbCreateTicket(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_bbCreateTicket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_bbCreateTicket_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_bbCreateTicket_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_addAnnotationIssue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_addAnnotationIssue(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().BbCreateTicket(rctx, args["taskId"].(string), args["execution"].(*int))
+ return ec.resolvers.Mutation().AddAnnotationIssue(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(int), fc.Args["apiIssue"].(model.APIIssueLink), fc.Args["isIssue"].(bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -19910,25 +21458,45 @@ func (ec *executionContext) _Mutation_bbCreateTicket(ctx context.Context, field
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_clearMySubscriptions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_addAnnotationIssue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_addAnnotationIssue_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_editAnnotationNote(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_editAnnotationNote(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().ClearMySubscriptions(rctx)
+ return ec.resolvers.Mutation().EditAnnotationNote(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(int), fc.Args["originalMessage"].(string), fc.Args["newMessage"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -19940,37 +21508,50 @@ func (ec *executionContext) _Mutation_clearMySubscriptions(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_overrideTaskDependencies(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_editAnnotationNote(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_overrideTaskDependencies_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_editAnnotationNote_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_moveAnnotationIssue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_moveAnnotationIssue(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().OverrideTaskDependencies(rctx, args["taskId"].(string))
+ return ec.resolvers.Mutation().MoveAnnotationIssue(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(int), fc.Args["apiIssue"].(model.APIIssueLink), fc.Args["isIssue"].(bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -19982,30 +21563,50 @@ func (ec *executionContext) _Mutation_overrideTaskDependencies(ctx context.Conte
}
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Note_message(ctx context.Context, field graphql.CollectedField, obj *model.APINote) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_moveAnnotationIssue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Note",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_moveAnnotationIssue_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_removeAnnotationIssue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_removeAnnotationIssue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Message, nil
+ return ec.resolvers.Mutation().RemoveAnnotationIssue(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(int), fc.Args["apiIssue"].(model.APIIssueLink), fc.Args["isIssue"].(bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -20017,30 +21618,50 @@ func (ec *executionContext) _Note_message(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Note_source(ctx context.Context, field graphql.CollectedField, obj *model.APINote) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_removeAnnotationIssue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Note",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_removeAnnotationIssue_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_setAnnotationMetadataLinks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_setAnnotationMetadataLinks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Source, nil
+ return ec.resolvers.Mutation().SetAnnotationMetadataLinks(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(int), fc.Args["metadataLinks"].([]*model.APIMetadataLink))
})
if err != nil {
ec.Error(ctx, err)
@@ -20052,190 +21673,453 @@ func (ec *executionContext) _Note_source(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(*model.APISource)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNSource2ágithubácomáevergreenáciáevergreenárestámodeláAPISource(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Notifications_buildBreak(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_setAnnotationMetadataLinks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Notifications",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_setAnnotationMetadataLinks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_reprovisionToNew(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_reprovisionToNew(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildBreak, nil
+ return ec.resolvers.Mutation().ReprovisionToNew(rctx, fc.Args["hostIds"].([]string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Notifications_patchFinish(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_reprovisionToNew(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Notifications",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_reprovisionToNew_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_restartJasper(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_restartJasper(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchFinish, nil
+ return ec.resolvers.Mutation().RestartJasper(rctx, fc.Args["hostIds"].([]string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Notifications_patchFirstFailure(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_restartJasper(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Notifications",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_restartJasper_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_updateHostStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_updateHostStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchFirstFailure, nil
+ return ec.resolvers.Mutation().UpdateHostStatus(rctx, fc.Args["hostIds"].([]string), fc.Args["status"].(string), fc.Args["notes"].(*string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Notifications_spawnHostExpiration(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_updateHostStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Notifications",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_updateHostStatus_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_enqueuePatch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_enqueuePatch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpawnHostExpiration, nil
+ return ec.resolvers.Mutation().EnqueuePatch(rctx, fc.Args["patchId"].(string), fc.Args["commitMessage"].(*string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIPatch)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
}
-func (ec *executionContext) _Notifications_spawnHostOutcome(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_enqueuePatch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_enqueuePatch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_schedulePatch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_schedulePatch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Notifications",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpawnHostOutcome, nil
+ return ec.resolvers.Mutation().SchedulePatch(rctx, fc.Args["patchId"].(string), fc.Args["configure"].(PatchConfigure))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIPatch)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
}
-func (ec *executionContext) _Notifications_commitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_schedulePatch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_schedulePatch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_schedulePatchTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_schedulePatchTasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Notifications",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CommitQueue, nil
+ return ec.resolvers.Mutation().SchedulePatchTasks(rctx, fc.Args["patchId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20249,60 +22133,241 @@ func (ec *executionContext) _Notifications_commitQueue(ctx context.Context, fiel
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _OomTrackerInfo_detected(ctx context.Context, field graphql.CollectedField, obj *model.APIOomTrackerInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_schedulePatchTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "OomTrackerInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_schedulePatchTasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_scheduleUndispatchedBaseTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_scheduleUndispatchedBaseTasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Detected, nil
+ return ec.resolvers.Mutation().ScheduleUndispatchedBaseTasks(rctx, fc.Args["patchId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]*model.APITask)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
}
-func (ec *executionContext) _OomTrackerInfo_pids(ctx context.Context, field graphql.CollectedField, obj *model.APIOomTrackerInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_scheduleUndispatchedBaseTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_scheduleUndispatchedBaseTasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_setPatchPriority(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_setPatchPriority(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "OomTrackerInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Pids, nil
+ return ec.resolvers.Mutation().SetPatchPriority(rctx, fc.Args["patchId"].(string), fc.Args["priority"].(int))
})
if err != nil {
ec.Error(ctx, err)
@@ -20311,65 +22376,102 @@ func (ec *executionContext) _OomTrackerInfo_pids(ctx context.Context, field grap
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Parameter_key(ctx context.Context, field graphql.CollectedField, obj *model.APIParameter) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_setPatchPriority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Parameter",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_setPatchPriority_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_unschedulePatchTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_unschedulePatchTasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Key, nil
+ return ec.resolvers.Mutation().UnschedulePatchTasks(rctx, fc.Args["patchId"].(string), fc.Args["abort"].(bool))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Parameter_value(ctx context.Context, field graphql.CollectedField, obj *model.APIParameter) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_unschedulePatchTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Parameter",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_unschedulePatchTasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_addFavoriteProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_addFavoriteProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Value, nil
+ return ec.resolvers.Mutation().AddFavoriteProject(rctx, fc.Args["identifier"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20381,62 +22483,289 @@ func (ec *executionContext) _Parameter_value(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_createTime(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_addFavoriteProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_addFavoriteProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_attachProjectToNewRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_attachProjectToNewRepo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CreateTime, nil
+ return ec.resolvers.Mutation().AttachProjectToNewRepo(rctx, fc.Args["project"].(MoveProjectInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_id(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_attachProjectToNewRepo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_attachProjectToNewRepo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_attachProjectToRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_attachProjectToRepo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return ec.resolvers.Mutation().AttachProjectToRepo(rctx, fc.Args["projectId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20448,30 +22777,142 @@ func (ec *executionContext) _Patch_id(ctx context.Context, field graphql.Collect
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNID2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_description(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_attachProjectToRepo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_attachProjectToRepo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_createProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_createProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return ec.resolvers.Mutation().CreateProject(rctx, fc.Args["project"].(model.APIProjectRef), fc.Args["requestS3Creds"].(*bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -20483,30 +22924,142 @@ func (ec *executionContext) _Patch_description(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_projectID(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_createProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_createProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_copyProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_copyProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProjectId, nil
+ return ec.resolvers.Mutation().CopyProject(rctx, fc.Args["project"].(data.CopyProjectOpts), fc.Args["requestS3Creds"].(*bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -20518,65 +23071,194 @@ func (ec *executionContext) _Patch_projectID(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_projectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_copyProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_copyProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_defaultSectionToRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_defaultSectionToRepo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProjectIdentifier, nil
+ return ec.resolvers.Mutation().DefaultSectionToRepo(rctx, fc.Args["projectId"].(string), fc.Args["section"].(ProjectSettingsSection))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_githash(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_defaultSectionToRepo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_defaultSectionToRepo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_detachProjectFromRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_detachProjectFromRepo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Githash, nil
+ return ec.resolvers.Mutation().DetachProjectFromRepo(rctx, fc.Args["projectId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20588,30 +23270,142 @@ func (ec *executionContext) _Patch_githash(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_patchNumber(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_detachProjectFromRepo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_detachProjectFromRepo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_forceRepotrackerRun(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_forceRepotrackerRun(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchNumber, nil
+ return ec.resolvers.Mutation().ForceRepotrackerRun(rctx, fc.Args["projectId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20623,30 +23417,50 @@ func (ec *executionContext) _Patch_patchNumber(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_author(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_forceRepotrackerRun(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_forceRepotrackerRun_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_promoteVarsToRepo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_promoteVarsToRepo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Author, nil
+ return ec.resolvers.Mutation().PromoteVarsToRepo(rctx, fc.Args["projectId"].(string), fc.Args["varNames"].([]string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20658,30 +23472,50 @@ func (ec *executionContext) _Patch_author(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_authorDisplayName(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_promoteVarsToRepo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_promoteVarsToRepo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_removeFavoriteProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_removeFavoriteProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().AuthorDisplayName(rctx, obj)
+ return ec.resolvers.Mutation().RemoveFavoriteProject(rctx, fc.Args["identifier"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20693,62 +23527,211 @@ func (ec *executionContext) _Patch_authorDisplayName(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_versionFull(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_removeFavoriteProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_removeFavoriteProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_saveProjectSettingsForSection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_saveProjectSettingsForSection(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().VersionFull(rctx, obj)
+ return ec.resolvers.Mutation().SaveProjectSettingsForSection(rctx, fc.Args["projectSettings"].(*model.APIProjectSettings), fc.Args["section"].(ProjectSettingsSection))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.(*model.APIProjectSettings)
fc.Result = res
- return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalNProjectSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_status(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_saveProjectSettingsForSection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aliases":
+ return ec.fieldContext_ProjectSettings_aliases(ctx, field)
+ case "githubWebhooksEnabled":
+ return ec.fieldContext_ProjectSettings_githubWebhooksEnabled(ctx, field)
+ case "projectRef":
+ return ec.fieldContext_ProjectSettings_projectRef(ctx, field)
+ case "projectSubscriptions":
+ return ec.fieldContext_ProjectSettings_projectSubscriptions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_ProjectSettings_subscriptions(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectSettings_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSettings", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_saveProjectSettingsForSection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_saveRepoSettingsForSection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_saveRepoSettingsForSection(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return ec.resolvers.Mutation().SaveRepoSettingsForSection(rctx, fc.Args["repoSettings"].(*model.APIProjectSettings), fc.Args["section"].(ProjectSettingsSection))
})
if err != nil {
ec.Error(ctx, err)
@@ -20760,30 +23743,64 @@ func (ec *executionContext) _Patch_status(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectSettings)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNRepoSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_variants(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_saveRepoSettingsForSection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aliases":
+ return ec.fieldContext_RepoSettings_aliases(ctx, field)
+ case "githubWebhooksEnabled":
+ return ec.fieldContext_RepoSettings_githubWebhooksEnabled(ctx, field)
+ case "projectRef":
+ return ec.fieldContext_RepoSettings_projectRef(ctx, field)
+ case "projectSubscriptions":
+ return ec.fieldContext_RepoSettings_projectSubscriptions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_RepoSettings_subscriptions(ctx, field)
+ case "vars":
+ return ec.fieldContext_RepoSettings_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoSettings", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_saveRepoSettingsForSection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_deactivateStepbackTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_deactivateStepbackTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Variants, nil
+ return ec.resolvers.Mutation().DeactivateStepbackTask(rctx, fc.Args["projectId"].(string), fc.Args["buildVariantName"].(string), fc.Args["taskName"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -20795,30 +23812,50 @@ func (ec *executionContext) _Patch_variants(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_tasks(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_deactivateStepbackTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_deactivateStepbackTask_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_attachVolumeToHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_attachVolumeToHost(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Tasks, nil
+ return ec.resolvers.Mutation().AttachVolumeToHost(rctx, fc.Args["volumeAndHost"].(VolumeHost))
})
if err != nil {
ec.Error(ctx, err)
@@ -20830,94 +23867,210 @@ func (ec *executionContext) _Patch_tasks(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_childPatches(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_attachVolumeToHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_attachVolumeToHost_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_detachVolumeFromHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_detachVolumeFromHost(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ChildPatches, nil
+ return ec.resolvers.Mutation().DetachVolumeFromHost(rctx, fc.Args["volumeId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]model.APIPatch)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_childPatchAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_detachVolumeFromHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_detachVolumeFromHost_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_editSpawnHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_editSpawnHost(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ChildPatchAliases, nil
+ return ec.resolvers.Mutation().EditSpawnHost(rctx, fc.Args["spawnHost"].(*EditSpawnHostInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]model.APIChildPatchAlias)
+ res := resTmp.(*model.APIHost)
fc.Result = res
- return ec.marshalOChildPatchAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIChildPatchAliasá(ctx, field.Selections, res)
+ return ec.marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_variantsTasks(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_editSpawnHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_editSpawnHost_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_migrateVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_migrateVolume(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.VariantsTasks, nil
+ return ec.resolvers.Mutation().MigrateVolume(rctx, fc.Args["volumeId"].(string), fc.Args["spawnHostInput"].(*SpawnHostInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -20929,30 +24082,50 @@ func (ec *executionContext) _Patch_variantsTasks(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.([]model.VariantTask)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNVariantTask2ágithubácomáevergreenáciáevergreenárestámodeláVariantTask(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_activated(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_migrateVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_migrateVolume_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_spawnHost(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_spawnHost(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Activated, nil
+ return ec.resolvers.Mutation().SpawnHost(rctx, fc.Args["spawnHostInput"].(*SpawnHostInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -20964,190 +24137,315 @@ func (ec *executionContext) _Patch_activated(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*model.APIHost)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_spawnHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_spawnHost_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_spawnVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_spawnVolume(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Alias, nil
+ return ec.resolvers.Mutation().SpawnVolume(rctx, fc.Args["spawnVolumeInput"].(SpawnVolumeInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_duration(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Patch",
+func (ec *executionContext) fieldContext_Mutation_spawnVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().Duration(rctx, obj)
- })
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_spawnVolume_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
- return graphql.Null
+ return
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*PatchDuration)
- fc.Result = res
- return ec.marshalOPatchDuration2ágithubácomáevergreenáciáevergreenágraphqláPatchDuration(ctx, field.Selections, res)
+ return fc, nil
}
-func (ec *executionContext) _Patch_time(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) _Mutation_removeVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_removeVolume(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().Time(rctx, obj)
+ return ec.resolvers.Mutation().RemoveVolume(rctx, fc.Args["volumeId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*PatchTime)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOPatchTime2ágithubácomáevergreenáciáevergreenágraphqláPatchTime(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_taskCount(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Patch",
+func (ec *executionContext) fieldContext_Mutation_removeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().TaskCount(rctx, obj)
- })
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_removeVolume_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
+ return
}
- res := resTmp.(*int)
- fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return fc, nil
}
-func (ec *executionContext) _Patch_baseVersionID(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) _Mutation_updateSpawnHostStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_updateSpawnHostStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().BaseVersionID(rctx, obj)
+ return ec.resolvers.Mutation().UpdateSpawnHostStatus(rctx, fc.Args["hostId"].(string), fc.Args["action"].(SpawnHostStatusActions))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIHost)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_parameters(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_updateSpawnHostStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_updateSpawnHostStatus_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_updateVolume(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_updateVolume(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Parameters, nil
+ return ec.resolvers.Mutation().UpdateVolume(rctx, fc.Args["updateVolumeInput"].(UpdateVolumeInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -21159,30 +24457,50 @@ func (ec *executionContext) _Patch_parameters(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.([]model.APIParameter)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNParameter2ágithubácomáevergreenáciáevergreenárestámodeláAPIParameterá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_moduleCodeChanges(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_updateVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_updateVolume_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_abortTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_abortTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ModuleCodeChanges, nil
+ return ec.resolvers.Mutation().AbortTask(rctx, fc.Args["taskId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -21194,62 +24512,393 @@ func (ec *executionContext) _Patch_moduleCodeChanges(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]model.APIModulePatch)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalNModuleCodeChange2ágithubácomáevergreenáciáevergreenárestámodeláAPIModulePatchá(ctx, field.Selections, res)
+ return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_project(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_abortTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_abortTask_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_overrideTaskDependencies(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_overrideTaskDependencies(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().Project(rctx, obj)
+ return ec.resolvers.Mutation().OverrideTaskDependencies(rctx, fc.Args["taskId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*PatchProject)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOPatchProject2ágithubácomáevergreenáciáevergreenágraphqláPatchProject(ctx, field.Selections, res)
+ return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_builds(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_overrideTaskDependencies(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_overrideTaskDependencies_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_restartTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_restartTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().Builds(rctx, obj)
+ return ec.resolvers.Mutation().RestartTask(rctx, fc.Args["taskId"].(string), fc.Args["failedOnly"].(bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -21261,62 +24910,393 @@ func (ec *executionContext) _Patch_builds(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.([]*model.APIBuild)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalNBuild2áágithubácomáevergreenáciáevergreenárestámodeláAPIBuildá(ctx, field.Selections, res)
+ return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_commitQueuePosition(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_restartTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_restartTask_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_scheduleTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_scheduleTasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().CommitQueuePosition(rctx, obj)
+ return ec.resolvers.Mutation().ScheduleTasks(rctx, fc.Args["taskIds"].([]string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.([]*model.APITask)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalNTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_taskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_scheduleTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_scheduleTasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_setTaskPriority(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_setTaskPriority(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().TaskStatuses(rctx, obj)
+ return ec.resolvers.Mutation().SetTaskPriority(rctx, fc.Args["taskId"].(string), fc.Args["priority"].(int))
})
if err != nil {
ec.Error(ctx, err)
@@ -21328,30 +25308,194 @@ func (ec *executionContext) _Patch_taskStatuses(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_baseTaskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_setTaskPriority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_setTaskPriority_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_unscheduleTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_unscheduleTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().BaseTaskStatuses(rctx, obj)
+ return ec.resolvers.Mutation().UnscheduleTask(rctx, fc.Args["taskId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -21363,30 +25507,194 @@ func (ec *executionContext) _Patch_baseTaskStatuses(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_canEnqueueToCommitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_unscheduleTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_unscheduleTask_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_clearMySubscriptions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_clearMySubscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Patch",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CanEnqueueToCommitQueue, nil
+ return ec.resolvers.Mutation().ClearMySubscriptions(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -21398,30 +25706,39 @@ func (ec *executionContext) _Patch_canEnqueueToCommitQueue(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patch_patchTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Patch",
+func (ec *executionContext) fieldContext_Mutation_clearMySubscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_createPublicKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_createPublicKey(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Patch().PatchTriggerAliases(rctx, obj)
+ return ec.resolvers.Mutation().CreatePublicKey(rctx, fc.Args["publicKeyInput"].(PublicKeyInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -21433,126 +25750,117 @@ func (ec *executionContext) _Patch_patchTriggerAliases(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.([]*model.APIPatchTriggerDefinition)
+ res := resTmp.([]*model.APIPubKey)
fc.Result = res
- return ec.marshalNPatchTriggerAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx, field.Selections, res)
+ return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchDuration_makespan(ctx context.Context, field graphql.CollectedField, obj *PatchDuration) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_createPublicKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_PublicKey_key(ctx, field)
+ case "name":
+ return ec.fieldContext_PublicKey_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PublicKey", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchDuration",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Makespan, nil
- })
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_createPublicKey_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
+ return
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return fc, nil
}
-func (ec *executionContext) _PatchDuration_timeTaken(ctx context.Context, field graphql.CollectedField, obj *PatchDuration) (ret graphql.Marshaler) {
+func (ec *executionContext) _Mutation_removePublicKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_removePublicKey(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchDuration",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TimeTaken, nil
+ return ec.resolvers.Mutation().RemovePublicKey(rctx, fc.Args["keyName"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIPubKey)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchDuration_time(ctx context.Context, field graphql.CollectedField, obj *PatchDuration) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_removePublicKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_PublicKey_key(ctx, field)
+ case "name":
+ return ec.fieldContext_PublicKey_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PublicKey", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchDuration",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Time, nil
- })
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_removePublicKey_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
+ return
}
- res := resTmp.(*PatchTime)
- fc.Result = res
- return ec.marshalOPatchTime2ágithubácomáevergreenáciáevergreenágraphqláPatchTime(ctx, field.Selections, res)
+ return fc, nil
}
-func (ec *executionContext) _PatchProject_variants(ctx context.Context, field graphql.CollectedField, obj *PatchProject) (ret graphql.Marshaler) {
+func (ec *executionContext) _Mutation_saveSubscription(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_saveSubscription(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Variants, nil
+ return ec.resolvers.Mutation().SaveSubscription(rctx, fc.Args["subscription"].(model.APISubscription))
})
if err != nil {
ec.Error(ctx, err)
@@ -21564,30 +25872,50 @@ func (ec *executionContext) _PatchProject_variants(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.([]*ProjectBuildVariant)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNProjectBuildVariant2áágithubácomáevergreenáciáevergreenágraphqláProjectBuildVariantá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTasks_tasks(ctx context.Context, field graphql.CollectedField, obj *PatchTasks) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_saveSubscription(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchTasks",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_saveSubscription_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_updatePublicKey(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_updatePublicKey(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Tasks, nil
+ return ec.resolvers.Mutation().UpdatePublicKey(rctx, fc.Args["targetKeyName"].(string), fc.Args["updateInfo"].(PublicKeyInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -21599,30 +25927,56 @@ func (ec *executionContext) _PatchTasks_tasks(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.([]*model.APITask)
+ res := resTmp.([]*model.APIPubKey)
fc.Result = res
- return ec.marshalNTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
+ return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTasks_count(ctx context.Context, field graphql.CollectedField, obj *PatchTasks) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_updatePublicKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_PublicKey_key(ctx, field)
+ case "name":
+ return ec.fieldContext_PublicKey_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PublicKey", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchTasks",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_updatePublicKey_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_updateUserSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_updateUserSettings(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Count, nil
+ return ec.resolvers.Mutation().UpdateUserSettings(rctx, fc.Args["userSettings"].(*model.APIUserSettings))
})
if err != nil {
ec.Error(ctx, err)
@@ -21634,62 +25988,50 @@ func (ec *executionContext) _PatchTasks_count(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTime_started(ctx context.Context, field graphql.CollectedField, obj *PatchTime) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_updateUserSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchTime",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Started, nil
- })
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_updateUserSettings_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
- return graphql.Null
+ return
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return fc, nil
}
-func (ec *executionContext) _PatchTime_finished(ctx context.Context, field graphql.CollectedField, obj *PatchTime) (ret graphql.Marshaler) {
+func (ec *executionContext) _Mutation_removeItemFromCommitQueue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_removeItemFromCommitQueue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchTime",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Finished, nil
+ return ec.resolvers.Mutation().RemoveItemFromCommitQueue(rctx, fc.Args["commitQueueId"].(string), fc.Args["issue"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -21703,60 +26045,169 @@ func (ec *executionContext) _PatchTime_finished(ctx context.Context, field graph
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTime_submittedAt(ctx context.Context, field graphql.CollectedField, obj *PatchTime) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_removeItemFromCommitQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchTime",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_removeItemFromCommitQueue_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Mutation_restartVersions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_restartVersions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SubmittedAt, nil
+ return ec.resolvers.Mutation().RestartVersions(rctx, fc.Args["versionId"].(string), fc.Args["abort"].(bool), fc.Args["versionsToRestart"].([]*model1.VersionToRestart))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.([]*model.APIVersion)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOVersion2áágithubácomáevergreenáciáevergreenárestámodeláAPIVersioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_restartVersions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_restartVersions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Note_message(ctx context.Context, field graphql.CollectedField, obj *model.APINote) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Note_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Alias, nil
+ return obj.Message, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -21773,25 +26224,34 @@ func (ec *executionContext) _PatchTriggerAlias_alias(ctx context.Context, field
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_childProjectId(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
+func (ec *executionContext) fieldContext_Note_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Note",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Note_source(ctx context.Context, field graphql.CollectedField, obj *model.APINote) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Note_source(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ChildProjectId, nil
+ return obj.Source, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -21803,65 +26263,88 @@ func (ec *executionContext) _PatchTriggerAlias_childProjectId(ctx context.Contex
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APISource)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNSource2ágithubácomáevergreenáciáevergreenárestámodeláAPISource(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_childProjectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
+func (ec *executionContext) fieldContext_Note_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Note",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "author":
+ return ec.fieldContext_Source_author(ctx, field)
+ case "requester":
+ return ec.fieldContext_Source_requester(ctx, field)
+ case "time":
+ return ec.fieldContext_Source_time(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Source", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Notifications_buildBreak(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Notifications_buildBreak(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ChildProjectIdentifier, nil
+ return obj.BuildBreak, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_taskSpecifiers(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
+func (ec *executionContext) fieldContext_Notifications_buildBreak(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Notifications",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Notifications_commitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Notifications_commitQueue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskSpecifiers, nil
+ return obj.CommitQueue, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -21870,30 +26353,39 @@ func (ec *executionContext) _PatchTriggerAlias_taskSpecifiers(ctx context.Contex
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APITaskSpecifier)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTaskSpecifier2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskSpecifierá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_status(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
+func (ec *executionContext) fieldContext_Notifications_commitQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Notifications",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Notifications_patchFinish(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Notifications_patchFinish(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return obj.PatchFinish, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -21907,25 +26399,34 @@ func (ec *executionContext) _PatchTriggerAlias_status(ctx context.Context, field
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_parentAsModule(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
+func (ec *executionContext) fieldContext_Notifications_patchFinish(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Notifications",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Notifications_patchFirstFailure(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Notifications_patchFirstFailure(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ParentAsModule, nil
+ return obj.PatchFirstFailure, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -21939,95 +26440,116 @@ func (ec *executionContext) _PatchTriggerAlias_parentAsModule(ctx context.Contex
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PatchTriggerAlias_variantsTasks(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PatchTriggerAlias",
+func (ec *executionContext) fieldContext_Notifications_patchFirstFailure(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Notifications",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Notifications_spawnHostExpiration(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Notifications_spawnHostExpiration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.VariantsTasks, nil
+ return obj.SpawnHostExpiration, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]model.VariantTask)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNVariantTask2ágithubácomáevergreenáciáevergreenárestámodeláVariantTaská(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patches_patches(ctx context.Context, field graphql.CollectedField, obj *Patches) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Patches",
+func (ec *executionContext) fieldContext_Notifications_spawnHostExpiration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Notifications",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Notifications_spawnHostOutcome(ctx context.Context, field graphql.CollectedField, obj *model.APINotificationPreferences) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Notifications_spawnHostOutcome(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Patches, nil
+ return obj.SpawnHostOutcome, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIPatch)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNPatch2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Patches_filteredPatchCount(ctx context.Context, field graphql.CollectedField, obj *Patches) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Patches",
+func (ec *executionContext) fieldContext_Notifications_spawnHostOutcome(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Notifications",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _OomTrackerInfo_detected(ctx context.Context, field graphql.CollectedField, obj *model.APIOomTrackerInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OomTrackerInfo_detected(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FilteredPatchCount, nil
+ return obj.Detected, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22039,30 +26561,80 @@ func (ec *executionContext) _Patches_filteredPatchCount(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PeriodicBuild_id(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_OomTrackerInfo_detected(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "OomTrackerInfo",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _OomTrackerInfo_pids(ctx context.Context, field graphql.CollectedField, obj *model.APIOomTrackerInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OomTrackerInfo_pids(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "PeriodicBuild",
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Pids, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]int)
+ fc.Result = res
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_OomTrackerInfo_pids(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "OomTrackerInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Parameter_key(ctx context.Context, field graphql.CollectedField, obj *model.APIParameter) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Parameter_key(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.Key, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22079,25 +26651,34 @@ func (ec *executionContext) _PeriodicBuild_id(ctx context.Context, field graphql
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PeriodicBuild_configFile(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PeriodicBuild",
+func (ec *executionContext) fieldContext_Parameter_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Parameter",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Parameter_value(ctx context.Context, field graphql.CollectedField, obj *model.APIParameter) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Parameter_value(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ConfigFile, nil
+ return obj.Value, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22114,25 +26695,34 @@ func (ec *executionContext) _PeriodicBuild_configFile(ctx context.Context, field
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PeriodicBuild_intervalHours(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PeriodicBuild",
+func (ec *executionContext) fieldContext_Parameter_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Parameter",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_id(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IntervalHours, nil
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22144,30 +26734,39 @@ func (ec *executionContext) _PeriodicBuild_intervalHours(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2áint(ctx, field.Selections, res)
+ return ec.marshalNID2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PeriodicBuild_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PeriodicBuild",
+func (ec *executionContext) fieldContext_Patch_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_activated(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_activated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Alias, nil
+ return obj.Activated, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22179,65 +26778,80 @@ func (ec *executionContext) _PeriodicBuild_alias(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PeriodicBuild_message(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PeriodicBuild",
+func (ec *executionContext) fieldContext_Patch_activated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_alias(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Message, nil
+ return obj.Alias, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PeriodicBuild_nextRunTime(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PeriodicBuild",
+func (ec *executionContext) fieldContext_Patch_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_author(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NextRunTime, nil
+ return obj.Author, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22249,30 +26863,39 @@ func (ec *executionContext) _PeriodicBuild_nextRunTime(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Permissions_userId(ctx context.Context, field graphql.CollectedField, obj *Permissions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Permissions",
+func (ec *executionContext) fieldContext_Patch_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_authorDisplayName(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UserID, nil
+ return ec.resolvers.Patch().AuthorDisplayName(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22289,25 +26912,34 @@ func (ec *executionContext) _Permissions_userId(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Permissions_canCreateProject(ctx context.Context, field graphql.CollectedField, obj *Permissions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Permissions",
+func (ec *executionContext) fieldContext_Patch_authorDisplayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_baseTaskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Permissions().CanCreateProject(rctx, obj)
+ return ec.resolvers.Patch().BaseTaskStatuses(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22319,30 +26951,39 @@ func (ec *executionContext) _Permissions_canCreateProject(ctx context.Context, f
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_id(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_baseTaskStatuses(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_builds(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_builds(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return ec.resolvers.Patch().Builds(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22354,30 +26995,51 @@ func (ec *executionContext) _Project_id(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIBuild)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBuild2áágithubácomáevergreenáciáevergreenárestámodeláAPIBuildá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_identifier(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_builds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Build_id(ctx, field)
+ case "actualMakespan":
+ return ec.fieldContext_Build_actualMakespan(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Build_buildVariant(ctx, field)
+ case "predictedMakespan":
+ return ec.fieldContext_Build_predictedMakespan(ctx, field)
+ case "status":
+ return ec.fieldContext_Build_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Build", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_canEnqueueToCommitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Identifier, nil
+ return obj.CanEnqueueToCommitQueue, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22389,65 +27051,86 @@ func (ec *executionContext) _Project_identifier(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_canEnqueueToCommitQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_childPatchAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return obj.ChildPatchAliases, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.APIChildPatchAlias)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOChildPatchAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIChildPatchAliasá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_childPatchAliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "alias":
+ return ec.fieldContext_ChildPatchAlias_alias(ctx, field)
+ case "patchId":
+ return ec.fieldContext_ChildPatchAlias_patchId(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ChildPatchAlias", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_childPatches(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_childPatches(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Enabled, nil
+ return obj.ChildPatches, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22456,30 +27139,103 @@ func (ec *executionContext) _Project_enabled(ctx context.Context, field graphql.
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]model.APIPatch)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_private(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_childPatches(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_commitQueuePosition(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Private, nil
+ return ec.resolvers.Patch().CommitQueuePosition(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22488,30 +27244,39 @@ func (ec *executionContext) _Project_private(ctx context.Context, field graphql.
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_restricted(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_commitQueuePosition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_createTime(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_createTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Restricted, nil
+ return obj.CreateTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22520,30 +27285,39 @@ func (ec *executionContext) _Project_restricted(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_description(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Owner, nil
+ return obj.Description, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22560,60 +27334,83 @@ func (ec *executionContext) _Project_owner(ctx context.Context, field graphql.Co
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_duration(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_duration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return ec.resolvers.Patch().Duration(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*PatchDuration)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOPatchDuration2ágithubácomáevergreenáciáevergreenágraphqláPatchDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_branch(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_duration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "makespan":
+ return ec.fieldContext_PatchDuration_makespan(ctx, field)
+ case "time":
+ return ec.fieldContext_PatchDuration_time(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_PatchDuration_timeTaken(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchDuration", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_githash(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_githash(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Branch, nil
+ return obj.Githash, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22630,25 +27427,34 @@ func (ec *executionContext) _Project_branch(ctx context.Context, field graphql.C
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_remotePath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_githash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_moduleCodeChanges(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RemotePath, nil
+ return obj.ModuleCodeChanges, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22660,190 +27466,203 @@ func (ec *executionContext) _Project_remotePath(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.APIModulePatch)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNModuleCodeChange2ágithubácomáevergreenáciáevergreenárestámodeláAPIModulePatchá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_patchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_moduleCodeChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "branchName":
+ return ec.fieldContext_ModuleCodeChange_branchName(ctx, field)
+ case "fileDiffs":
+ return ec.fieldContext_ModuleCodeChange_fileDiffs(ctx, field)
+ case "htmlLink":
+ return ec.fieldContext_ModuleCodeChange_htmlLink(ctx, field)
+ case "rawLink":
+ return ec.fieldContext_ModuleCodeChange_rawLink(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ModuleCodeChange", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.PatchingDisabled, nil
- })
+func (ec *executionContext) _Patch_parameters(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_parameters(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_repotrackerDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RepotrackerDisabled, nil
+ return obj.Parameters, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]model.APIParameter)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNParameter2ágithubácomáevergreenáciáevergreenárestámodeláAPIParameterá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_dispatchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_parameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_Parameter_key(ctx, field)
+ case "value":
+ return ec.fieldContext_Parameter_value(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Parameter", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DispatchingDisabled, nil
- })
+func (ec *executionContext) _Patch_patchNumber(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_patchNumber(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_versionControlEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.VersionControlEnabled, nil
+ return obj.PatchNumber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_prTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_patchNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_patchTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PRTestingEnabled, nil
+ return ec.resolvers.Patch().PatchTriggerAliases(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]*model.APIPatchTriggerDefinition)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNPatchTriggerAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_manualPrTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_patchTriggerAliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "alias":
+ return ec.fieldContext_PatchTriggerAlias_alias(ctx, field)
+ case "childProjectId":
+ return ec.fieldContext_PatchTriggerAlias_childProjectId(ctx, field)
+ case "childProjectIdentifier":
+ return ec.fieldContext_PatchTriggerAlias_childProjectIdentifier(ctx, field)
+ case "parentAsModule":
+ return ec.fieldContext_PatchTriggerAlias_parentAsModule(ctx, field)
+ case "status":
+ return ec.fieldContext_PatchTriggerAlias_status(ctx, field)
+ case "taskSpecifiers":
+ return ec.fieldContext_PatchTriggerAlias_taskSpecifiers(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_PatchTriggerAlias_variantsTasks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchTriggerAlias", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_project(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ManualPRTestingEnabled, nil
+ return ec.resolvers.Patch().Project(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22852,62 +27671,87 @@ func (ec *executionContext) _Project_manualPrTestingEnabled(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*PatchProject)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOPatchProject2ágithubácomáevergreenáciáevergreenágraphqláPatchProject(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_githubChecksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "variants":
+ return ec.fieldContext_PatchProject_variants(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchProject", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_projectID(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_projectID(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubChecksEnabled, nil
+ return obj.ProjectId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_batchTime(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_projectID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_projectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BatchTime, nil
+ return ec.resolvers.Patch().ProjectIdentifier(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22919,30 +27763,39 @@ func (ec *executionContext) _Project_batchTime(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_deactivatePrevious(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_projectIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_projectMetadata(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_projectMetadata(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DeactivatePrevious, nil
+ return ec.resolvers.Patch().ProjectMetadata(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -22951,30 +27804,131 @@ func (ec *executionContext) _Project_deactivatePrevious(ctx context.Context, fie
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Patch_projectMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ return fc, nil
}
-func (ec *executionContext) _Project_defaultLogger(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) _Patch_status(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DefaultLogger, nil
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -22991,25 +27945,34 @@ func (ec *executionContext) _Project_defaultLogger(ctx context.Context, field gr
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_notifyOnBuildFailure(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_taskCount(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_taskCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NotifyOnBuildFailure, nil
+ return ec.resolvers.Patch().TaskCount(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -23018,158 +27981,127 @@ func (ec *executionContext) _Project_notifyOnBuildFailure(ctx context.Context, f
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_triggers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_taskCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_tasks(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_tasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Triggers, nil
+ return obj.Tasks, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- return graphql.Null
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
}
- res := resTmp.([]model.APITriggerDefinition)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, field.Selections, res)
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_patchTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.PatchTriggerAliases, nil
- })
+func (ec *executionContext) _Patch_taskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_taskStatuses(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.([]model.APIPatchTriggerDefinition)
- fc.Result = res
- return ec.marshalOPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_githubTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubTriggerAliases, nil
+ return ec.resolvers.Patch().TaskStatuses(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_periodicBuilds(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_taskStatuses(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.PeriodicBuilds, nil
- })
+func (ec *executionContext) _Patch_time(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_time(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIPeriodicBuildDefinition)
- fc.Result = res
- return ec.marshalOPeriodicBuild2ágithubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinitioná(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_cedarTestResultsEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CedarTestResultsEnabled, nil
+ return ec.resolvers.Patch().Time(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -23178,30 +28110,47 @@ func (ec *executionContext) _Project_cedarTestResultsEnabled(ctx context.Context
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*PatchTime)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOPatchTime2ágithubácomáevergreenáciáevergreenágraphqláPatchTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_commitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "finished":
+ return ec.fieldContext_PatchTime_finished(ctx, field)
+ case "started":
+ return ec.fieldContext_PatchTime_started(ctx, field)
+ case "submittedAt":
+ return ec.fieldContext_PatchTime_submittedAt(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchTime", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Patch_variants(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_variants(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CommitQueue, nil
+ return obj.Variants, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23213,62 +28162,39 @@ func (ec *executionContext) _Project_commitQueue(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(model.APICommitQueueParams)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalNCommitQueueParams2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, field.Selections, res)
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_admins(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_variants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Admins, nil
- })
+func (ec *executionContext) _Patch_variantsTasks(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_variantsTasks(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
- fc.Result = res
- return ec.marshalOString2áástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_spawnHostScriptPath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpawnHostScriptPath, nil
+ return obj.VariantsTasks, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23280,30 +28206,45 @@ func (ec *executionContext) _Project_spawnHostScriptPath(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.VariantTask)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNVariantTask2ágithubácomáevergreenáciáevergreenárestámodeláVariantTask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_tracksPushEvents(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_Patch_variantsTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_VariantTask_name(ctx, field)
+ case "tasks":
+ return ec.fieldContext_VariantTask_tasks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type VariantTask", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patch_versionFull(ctx context.Context, field graphql.CollectedField, obj *model.APIPatch) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patch_versionFull(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TracksPushEvents, nil
+ return ec.resolvers.Patch().VersionFull(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -23312,65 +28253,152 @@ func (ec *executionContext) _Project_tracksPushEvents(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*model.APIVersion)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_taskSync(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patch_versionFull(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patch",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PatchDuration_makespan(ctx context.Context, field graphql.CollectedField, obj *PatchDuration) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchDuration_makespan(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskSync, nil
+ return obj.Makespan, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(model.APITaskSyncOptions)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTaskSyncOptions2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_gitTagAuthorizedUsers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchDuration_makespan(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchDuration",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchDuration_time(ctx context.Context, field graphql.CollectedField, obj *PatchDuration) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchDuration_time(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitTagAuthorizedUsers, nil
+ return obj.Time, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23379,30 +28407,47 @@ func (ec *executionContext) _Project_gitTagAuthorizedUsers(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*PatchTime)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOPatchTime2ágithubácomáevergreenáciáevergreenágraphqláPatchTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_gitTagAuthorizedTeams(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchDuration_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchDuration",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "finished":
+ return ec.fieldContext_PatchTime_finished(ctx, field)
+ case "started":
+ return ec.fieldContext_PatchTime_started(ctx, field)
+ case "submittedAt":
+ return ec.fieldContext_PatchTime_submittedAt(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchTime", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchDuration_timeTaken(ctx context.Context, field graphql.CollectedField, obj *PatchDuration) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchDuration_timeTaken(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitTagAuthorizedTeams, nil
+ return obj.TimeTaken, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23411,62 +28456,91 @@ func (ec *executionContext) _Project_gitTagAuthorizedTeams(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_gitTagVersionsEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchDuration_timeTaken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchDuration",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchProject_variants(ctx context.Context, field graphql.CollectedField, obj *PatchProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchProject_variants(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitTagVersionsEnabled, nil
+ return obj.Variants, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]*ProjectBuildVariant)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNProjectBuildVariant2áágithubácomáevergreenáciáevergreenágraphqláProjectBuildVariantá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_filesIgnoredFromCache(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchProject_variants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchProject",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayName":
+ return ec.fieldContext_ProjectBuildVariant_displayName(ctx, field)
+ case "name":
+ return ec.fieldContext_ProjectBuildVariant_name(ctx, field)
+ case "tasks":
+ return ec.fieldContext_ProjectBuildVariant_tasks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectBuildVariant", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchTime_finished(ctx context.Context, field graphql.CollectedField, obj *PatchTime) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTime_finished(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FilesIgnoredFromCache, nil
+ return obj.Finished, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23475,30 +28549,39 @@ func (ec *executionContext) _Project_filesIgnoredFromCache(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_disabledStatsCache(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchTime_finished(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTime",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchTime_started(ctx context.Context, field graphql.CollectedField, obj *PatchTime) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTime_started(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisabledStatsCache, nil
+ return obj.Started, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23507,30 +28590,39 @@ func (ec *executionContext) _Project_disabledStatsCache(ctx context.Context, fie
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_workstationConfig(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchTime_started(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTime",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchTime_submittedAt(ctx context.Context, field graphql.CollectedField, obj *PatchTime) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTime_submittedAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.WorkstationConfig, nil
+ return obj.SubmittedAt, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23542,62 +28634,39 @@ func (ec *executionContext) _Project_workstationConfig(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(model.APIWorkstationConfig)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNWorkstationConfig2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_perfEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchTime_submittedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTime",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.PerfEnabled, nil
- })
+func (ec *executionContext) _PatchTriggerAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_alias(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_buildBaronSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildBaronSettings, nil
+ return obj.Alias, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23609,30 +28678,39 @@ func (ec *executionContext) _Project_buildBaronSettings(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(model.APIBuildBaronSettings)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBuildBaronSettings2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_taskAnnotationSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchTriggerAlias_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchTriggerAlias_childProjectId(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_childProjectId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskAnnotationSettings, nil
+ return obj.ChildProjectId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23644,62 +28722,39 @@ func (ec *executionContext) _Project_taskAnnotationSettings(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(model.APITaskAnnotationSettings)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTaskAnnotationSettings2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_hidden(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchTriggerAlias_childProjectId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Hidden, nil
- })
+func (ec *executionContext) _PatchTriggerAlias_childProjectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_childProjectIdentifier(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Project_repoRefId(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RepoRefId, nil
+ return obj.ChildProjectIdentifier, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23716,137 +28771,165 @@ func (ec *executionContext) _Project_repoRefId(ctx context.Context, field graphq
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_isFavorite(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_PatchTriggerAlias_childProjectIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PatchTriggerAlias_parentAsModule(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_parentAsModule(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Project().IsFavorite(rctx, obj)
+ return obj.ParentAsModule, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_PatchTriggerAlias_parentAsModule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
-func (ec *executionContext) _Project_validDefaultLoggers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) _PatchTriggerAlias_status(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Project",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Project().ValidDefaultLoggers(rctx, obj)
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Project_patches(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Project",
+func (ec *executionContext) fieldContext_PatchTriggerAlias_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Project_patches_args(ctx, rawArgs)
+func (ec *executionContext) _PatchTriggerAlias_taskSpecifiers(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_taskSpecifiers(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Project().Patches(rctx, obj, args["patchesInput"].(PatchesInput))
+ return obj.TaskSpecifiers, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*Patches)
+ res := resTmp.([]model.APITaskSpecifier)
fc.Result = res
- return ec.marshalNPatches2ágithubácomáevergreenáciáevergreenágraphqláPatches(ctx, field.Selections, res)
+ return ec.marshalOTaskSpecifier2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskSpecifierá(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_id(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_PatchTriggerAlias_taskSpecifiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "patchAlias":
+ return ec.fieldContext_TaskSpecifier_patchAlias(ctx, field)
+ case "taskRegex":
+ return ec.fieldContext_TaskSpecifier_taskRegex(ctx, field)
+ case "variantRegex":
+ return ec.fieldContext_TaskSpecifier_variantRegex(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskSpecifier", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PatchTriggerAlias_variantsTasks(ctx context.Context, field graphql.CollectedField, obj *model.APIPatchTriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PatchTriggerAlias_variantsTasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.VariantsTasks, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23858,30 +28941,45 @@ func (ec *executionContext) _ProjectAlias_id(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.VariantTask)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNVariantTask2ágithubácomáevergreenáciáevergreenárestámodeláVariantTaská(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_PatchTriggerAlias_variantsTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PatchTriggerAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_VariantTask_name(ctx, field)
+ case "tasks":
+ return ec.fieldContext_VariantTask_tasks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type VariantTask", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patches_filteredPatchCount(ctx context.Context, field graphql.CollectedField, obj *Patches) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patches_filteredPatchCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Alias, nil
+ return obj.FilteredPatchCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23893,30 +28991,39 @@ func (ec *executionContext) _ProjectAlias_alias(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_gitTag(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_Patches_filteredPatchCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patches",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Patches_patches(ctx context.Context, field graphql.CollectedField, obj *Patches) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Patches_patches(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitTag, nil
+ return obj.Patches, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23928,30 +29035,103 @@ func (ec *executionContext) _ProjectAlias_gitTag(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIPatch)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNPatch2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_variant(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Patches_patches(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Patches",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PeriodicBuild_id(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PeriodicBuild_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Variant, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -23968,25 +29148,34 @@ func (ec *executionContext) _ProjectAlias_variant(ctx context.Context, field gra
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_task(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_PeriodicBuild_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PeriodicBuild",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PeriodicBuild_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PeriodicBuild_alias(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Task, nil
+ return obj.Alias, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24003,25 +29192,34 @@ func (ec *executionContext) _ProjectAlias_task(ctx context.Context, field graphq
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_remotePath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_PeriodicBuild_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PeriodicBuild",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PeriodicBuild_configFile(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PeriodicBuild_configFile(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RemotePath, nil
+ return obj.ConfigFile, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24038,25 +29236,34 @@ func (ec *executionContext) _ProjectAlias_remotePath(ctx context.Context, field
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_variantTags(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_PeriodicBuild_configFile(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PeriodicBuild",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PeriodicBuild_intervalHours(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PeriodicBuild_intervalHours(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.VariantTags, nil
+ return obj.IntervalHours, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24068,30 +29275,39 @@ func (ec *executionContext) _ProjectAlias_variantTags(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectAlias_taskTags(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectAlias",
+func (ec *executionContext) fieldContext_PeriodicBuild_intervalHours(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PeriodicBuild",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PeriodicBuild_message(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PeriodicBuild_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskTags, nil
+ return obj.Message, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24103,30 +29319,39 @@ func (ec *executionContext) _ProjectAlias_taskTags(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectBuildVariant_name(ctx context.Context, field graphql.CollectedField, obj *ProjectBuildVariant) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectBuildVariant",
+func (ec *executionContext) fieldContext_PeriodicBuild_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PeriodicBuild",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PeriodicBuild_nextRunTime(ctx context.Context, field graphql.CollectedField, obj *model.APIPeriodicBuildDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PeriodicBuild_nextRunTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.NextRunTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24138,30 +29363,39 @@ func (ec *executionContext) _ProjectBuildVariant_name(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectBuildVariant_displayName(ctx context.Context, field graphql.CollectedField, obj *ProjectBuildVariant) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectBuildVariant",
+func (ec *executionContext) fieldContext_PeriodicBuild_nextRunTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PeriodicBuild",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Permissions_canCreateProject(ctx context.Context, field graphql.CollectedField, obj *Permissions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Permissions_canCreateProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return ec.resolvers.Permissions().CanCreateProject(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -24173,30 +29407,39 @@ func (ec *executionContext) _ProjectBuildVariant_displayName(ctx context.Context
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectBuildVariant_tasks(ctx context.Context, field graphql.CollectedField, obj *ProjectBuildVariant) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Permissions_canCreateProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Permissions",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Permissions_userId(ctx context.Context, field graphql.CollectedField, obj *Permissions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Permissions_userId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectBuildVariant",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Tasks, nil
+ return obj.UserID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24208,30 +29451,39 @@ func (ec *executionContext) _ProjectBuildVariant_tasks(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEventLogEntry",
+func (ec *executionContext) fieldContext_Permissions_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Permissions",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Pod_events(ctx context.Context, field graphql.CollectedField, obj *model.APIPod) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Pod_events(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Timestamp, nil
+ return ec.resolvers.Pod().Events(rctx, obj, fc.Args["limit"].(*int), fc.Args["page"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -24243,30 +29495,56 @@ func (ec *executionContext) _ProjectEventLogEntry_timestamp(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*PodEvents)
fc.Result = res
- return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNPodEvents2ágithubácomáevergreenáciáevergreenágraphqláPodEvents(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventLogEntry_user(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Pod_events(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Pod",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_PodEvents_count(ctx, field)
+ case "eventLogEntries":
+ return ec.fieldContext_PodEvents_eventLogEntries(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PodEvents", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Pod_events_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Pod_id(ctx context.Context, field graphql.CollectedField, obj *model.APIPod) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Pod_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.User, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24283,57 +29561,78 @@ func (ec *executionContext) _ProjectEventLogEntry_user(ctx context.Context, fiel
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventLogEntry_before(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEventLogEntry",
+func (ec *executionContext) fieldContext_Pod_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Pod",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Pod_status(ctx context.Context, field graphql.CollectedField, obj *model.APIPod) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Pod_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Before, nil
+ return ec.resolvers.Pod().Status(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(model.APIProjectEventSettings)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOProjectEventSettings2githubácomáevergreenáciáevergreenárestámodeláAPIProjectEventSettings(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventLogEntry_after(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Pod_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Pod",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Pod_task(ctx context.Context, field graphql.CollectedField, obj *model.APIPod) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Pod_task(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.After, nil
+ return ec.resolvers.Pod().Task(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -24342,30 +29641,183 @@ func (ec *executionContext) _ProjectEventLogEntry_after(ctx context.Context, fie
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APIProjectEventSettings)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOProjectEventSettings2githubácomáevergreenáciáevergreenárestámodeláAPIProjectEventSettings(ctx, field.Selections, res)
+ return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEventSettings",
+func (ec *executionContext) fieldContext_Pod_task(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Pod",
Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.GithubWebhooksEnabled, nil
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Pod_taskContainerCreationOpts(ctx context.Context, field graphql.CollectedField, obj *model.APIPod) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Pod_taskContainerCreationOpts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TaskContainerCreationOpts, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24377,62 +29829,97 @@ func (ec *executionContext) _ProjectEventSettings_githubWebhooksEnabled(ctx cont
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(model.APIPodTaskContainerCreationOptions)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNTaskContainerCreationOpts2githubácomáevergreenáciáevergreenárestámodeláAPIPodTaskContainerCreationOptions(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventSettings_projectRef(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEventSettings",
+func (ec *executionContext) fieldContext_Pod_taskContainerCreationOpts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Pod",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "image":
+ return ec.fieldContext_TaskContainerCreationOpts_image(ctx, field)
+ case "memoryMB":
+ return ec.fieldContext_TaskContainerCreationOpts_memoryMB(ctx, field)
+ case "cpu":
+ return ec.fieldContext_TaskContainerCreationOpts_cpu(ctx, field)
+ case "os":
+ return ec.fieldContext_TaskContainerCreationOpts_os(ctx, field)
+ case "arch":
+ return ec.fieldContext_TaskContainerCreationOpts_arch(ctx, field)
+ case "workingDir":
+ return ec.fieldContext_TaskContainerCreationOpts_workingDir(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskContainerCreationOpts", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Pod_type(ctx context.Context, field graphql.CollectedField, obj *model.APIPod) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Pod_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProjectRef, nil
+ return ec.resolvers.Pod().Type(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(model.APIProjectRef)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOProject2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventSettings_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Pod_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Pod",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PodEventLogData_oldStatus(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_oldStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectEventSettings",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Vars, nil
+ return obj.OldStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24441,30 +29928,39 @@ func (ec *executionContext) _ProjectEventSettings_vars(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APIProjectVars)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOProjectVars2githubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventSettings_aliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEventSettings",
+func (ec *executionContext) fieldContext_PodEventLogData_oldStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PodEventLogData_newStatus(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_newStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Aliases, nil
+ return obj.NewStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24473,199 +29969,121 @@ func (ec *executionContext) _ProjectEventSettings_aliases(ctx context.Context, f
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIProjectAlias)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOProjectAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEventSettings_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEventSettings",
+func (ec *executionContext) fieldContext_PodEventLogData_newStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Subscriptions, nil
- })
+func (ec *executionContext) _PodEventLogData_reason(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_reason(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.([]model.APISubscription)
- fc.Result = res
- return ec.marshalOProjectSubscription2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField, obj *ProjectEvents) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectEvents",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EventLogEntries, nil
+ return obj.Reason, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIProjectEvent)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNProjectEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectEventá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectEvents_count(ctx context.Context, field graphql.CollectedField, obj *ProjectEvents) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectEvents",
+func (ec *executionContext) fieldContext_PodEventLogData_reason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Count, nil
- })
+func (ec *executionContext) _PodEventLogData_taskID(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_taskID(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(int)
- fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSettings",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectSettings().GithubWebhooksEnabled(rctx, obj)
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSettings_projectRef(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSettings",
+func (ec *executionContext) fieldContext_PodEventLogData_taskID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ProjectRef, nil
- })
+func (ec *executionContext) _PodEventLogData_taskExecution(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_taskExecution(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(model.APIProjectRef)
- fc.Result = res
- return ec.marshalOProject2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectSettings_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSettings",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectSettings().Vars(rctx, obj)
+ return obj.TaskExecution, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24674,30 +30092,39 @@ func (ec *executionContext) _ProjectSettings_vars(ctx context.Context, field gra
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIProjectVars)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalOProjectVars2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSettings_aliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_PodEventLogData_taskExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PodEventLogData_taskStatus(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_taskStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSettings",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectSettings().Aliases(rctx, obj)
+ return obj.TaskStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24706,30 +30133,39 @@ func (ec *executionContext) _ProjectSettings_aliases(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*model.APIProjectAlias)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOProjectAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSettings_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_PodEventLogData_taskStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PodEventLogData_task(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogData_task(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSettings",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectSettings().Subscriptions(rctx, obj)
+ return ec.resolvers.PodEventLogData().Task(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -24738,30 +30174,183 @@ func (ec *executionContext) _ProjectSettings_subscriptions(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*model.APISubscription)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
+ return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscriber_type(ctx context.Context, field graphql.CollectedField, obj *model.APISubscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_PodEventLogData_task(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogData",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PodEventLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24778,25 +30367,34 @@ func (ec *executionContext) _ProjectSubscriber_type(ctx context.Context, field g
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscriber_subscriber(ctx context.Context, field graphql.CollectedField, obj *model.APISubscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_PodEventLogEntry_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _PodEventLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_data(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscriber",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectSubscriber().Subscriber(rctx, obj)
+ return obj.Data, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24808,65 +30406,96 @@ func (ec *executionContext) _ProjectSubscriber_subscriber(ctx context.Context, f
}
return graphql.Null
}
- res := resTmp.(*Subscriber)
+ res := resTmp.(*model.PodAPIEventData)
fc.Result = res
- return ec.marshalNSubscriber2ágithubácomáevergreenáciáevergreenágraphqláSubscriber(ctx, field.Selections, res)
+ return ec.marshalNPodEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláPodAPIEventData(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEventLogEntry_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "oldStatus":
+ return ec.fieldContext_PodEventLogData_oldStatus(ctx, field)
+ case "newStatus":
+ return ec.fieldContext_PodEventLogData_newStatus(ctx, field)
+ case "reason":
+ return ec.fieldContext_PodEventLogData_reason(ctx, field)
+ case "taskID":
+ return ec.fieldContext_PodEventLogData_taskID(ctx, field)
+ case "taskExecution":
+ return ec.fieldContext_PodEventLogData_taskExecution(ctx, field)
+ case "taskStatus":
+ return ec.fieldContext_PodEventLogData_taskStatus(ctx, field)
+ case "task":
+ return ec.fieldContext_PodEventLogData_task(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PodEventLogData", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PodEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_eventType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.EventType, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PodEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_processedAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ResourceType, nil
+ return obj.ProcessedAt, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24878,30 +30507,39 @@ func (ec *executionContext) _ProjectSubscription_resourceType(ctx context.Contex
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_trigger(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PodEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_resourceId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Trigger, nil
+ return obj.ResourceId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24918,60 +30556,34 @@ func (ec *executionContext) _ProjectSubscription_trigger(ctx context.Context, fi
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_selectors(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Selectors, nil
- })
+func (ec *executionContext) _PodEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_resourceType(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]model.APISelector)
- fc.Result = res
- return ec.marshalNSelector2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectSubscription_regexSelectors(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RegexSelectors, nil
+ return obj.ResourceType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -24983,30 +30595,39 @@ func (ec *executionContext) _ProjectSubscription_regexSelectors(ctx context.Cont
}
return graphql.Null
}
- res := resTmp.([]model.APISelector)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNSelector2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_subscriber(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PodEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.PodAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEventLogEntry_timestamp(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Subscriber, nil
+ return obj.Timestamp, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -25015,30 +30636,39 @@ func (ec *executionContext) _ProjectSubscription_subscriber(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APISubscriber)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOProjectSubscriber2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_ownerType(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PodEvents_count(ctx context.Context, field graphql.CollectedField, obj *PodEvents) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEvents_count(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.OwnerType, nil
+ return obj.Count, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -25050,126 +30680,163 @@ func (ec *executionContext) _ProjectSubscription_ownerType(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectSubscription_triggerData(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "ProjectSubscription",
+func (ec *executionContext) fieldContext_PodEvents_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEvents",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.TriggerData, nil
- })
+func (ec *executionContext) _PodEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField, obj *PodEvents) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PodEvents_eventLogEntries(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(map[string]string)
- fc.Result = res
- return ec.marshalOStringMap2map(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _ProjectVars_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectVars) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectVars",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Vars, nil
+ return obj.EventLogEntries, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(map[string]string)
+ res := resTmp.([]*model.PodAPIEventLogEntry)
fc.Result = res
- return ec.marshalOStringMap2map(ctx, field.Selections, res)
+ return ec.marshalNPodEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláPodAPIEventLogEntryá(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectVars_privateVars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectVars) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_PodEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PodEvents",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_PodEventLogEntry_id(ctx, field)
+ case "data":
+ return ec.fieldContext_PodEventLogEntry_data(ctx, field)
+ case "eventType":
+ return ec.fieldContext_PodEventLogEntry_eventType(ctx, field)
+ case "processedAt":
+ return ec.fieldContext_PodEventLogEntry_processedAt(ctx, field)
+ case "resourceId":
+ return ec.fieldContext_PodEventLogEntry_resourceId(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_PodEventLogEntry_resourceType(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_PodEventLogEntry_timestamp(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PodEventLogEntry", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_id(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectVars",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectVars().PrivateVars(rctx, obj)
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2áástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ProjectVars_adminOnlyVars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectVars) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_admins(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_admins(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ProjectVars",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.ProjectVars().AdminOnlyVars(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Admins, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -25183,25 +30850,54 @@ func (ec *executionContext) _ProjectVars_adminOnlyVars(ctx context.Context, fiel
return ec.marshalOString2áástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _PublicKey_name(ctx context.Context, field graphql.CollectedField, obj *model.APIPubKey) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PublicKey",
+func (ec *executionContext) fieldContext_Project_admins(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_batchTime(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_batchTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BatchTime, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(int); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be int`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -25213,30 +30909,39 @@ func (ec *executionContext) _PublicKey_name(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _PublicKey_key(ctx context.Context, field graphql.CollectedField, obj *model.APIPubKey) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "PublicKey",
+func (ec *executionContext) fieldContext_Project_batchTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_branch(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_branch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Key, nil
+ return obj.Branch, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -25253,71 +30958,54 @@ func (ec *executionContext) _PublicKey_key(ctx context.Context, field graphql.Co
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_task(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_branch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_task_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Task(rctx, args["taskId"].(string), args["execution"].(*int))
- })
+func (ec *executionContext) _Project_buildBaronSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_buildBaronSettings(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*model.APITask)
- fc.Result = res
- return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_taskAllExecutions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_taskAllExecutions_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskAllExecutions(rctx, args["taskId"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BuildBaronSettings, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APIBuildBaronSettings); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APIBuildBaronSettings`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -25329,37 +31017,75 @@ func (ec *executionContext) _Query_taskAllExecutions(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]*model.APITask)
+ res := resTmp.(model.APIBuildBaronSettings)
fc.Result = res
- return ec.marshalNTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
+ return ec.marshalNBuildBaronSettings2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_patch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_buildBaronSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "bfSuggestionFeaturesURL":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionFeaturesURL(ctx, field)
+ case "bfSuggestionPassword":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionPassword(ctx, field)
+ case "bfSuggestionServer":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionServer(ctx, field)
+ case "bfSuggestionTimeoutSecs":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionTimeoutSecs(ctx, field)
+ case "bfSuggestionUsername":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionUsername(ctx, field)
+ case "ticketCreateProject":
+ return ec.fieldContext_BuildBaronSettings_ticketCreateProject(ctx, field)
+ case "ticketSearchProjects":
+ return ec.fieldContext_BuildBaronSettings_ticketSearchProjects(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BuildBaronSettings", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_patch_args(ctx, rawArgs)
+func (ec *executionContext) _Project_commitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_commitQueue(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Patch(rctx, args["id"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitQueue, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APICommitQueueParams); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -25371,191 +31097,299 @@ func (ec *executionContext) _Query_patch(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(*model.APIPatch)
+ res := resTmp.(model.APICommitQueueParams)
fc.Result = res
- return ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
+ return ec.marshalNCommitQueueParams2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_version(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_commitQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "enabled":
+ return ec.fieldContext_CommitQueueParams_enabled(ctx, field)
+ case "mergeMethod":
+ return ec.fieldContext_CommitQueueParams_mergeMethod(ctx, field)
+ case "message":
+ return ec.fieldContext_CommitQueueParams_message(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommitQueueParams", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_version_args(ctx, rawArgs)
+func (ec *executionContext) _Project_containerSizeDefinitions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Version(rctx, args["id"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ContainerSizeDefinitions, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIContainerResources); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIContainerResources`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.([]model.APIContainerResources)
fc.Result = res
- return ec.marshalNVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalOContainerResources2ágithubácomáevergreenáciáevergreenárestámodeláAPIContainerResourcesá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_projects(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_containerSizeDefinitions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_ContainerResources_name(ctx, field)
+ case "cpu":
+ return ec.fieldContext_ContainerResources_cpu(ctx, field)
+ case "memoryMb":
+ return ec.fieldContext_ContainerResources_memoryMb(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ContainerResources", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_deactivatePrevious(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Projects(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeactivatePrevious, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*GroupedProjects)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNGroupedProjects2áágithubácomáevergreenáciáevergreenágraphqláGroupedProjects(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_viewableProjectRefs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_deactivatePrevious(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_disabledStatsCache(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().ViewableProjectRefs(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DisabledStatsCache, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*GroupedProjects)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNGroupedProjects2áágithubácomáevergreenáciáevergreenágraphqláGroupedProjects(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_githubProjectConflicts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_disabledStatsCache(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_githubProjectConflicts_args(ctx, rawArgs)
+func (ec *executionContext) _Project_dispatchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_dispatchingDisabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().GithubProjectConflicts(rctx, args["projectId"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DispatchingDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model1.GithubProjectConflicts)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNGithubProjectConflicts2ágithubácomáevergreenáciáevergreenámodeláGithubProjectConflicts(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_project(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_dispatchingDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_project_args(ctx, rawArgs)
+func (ec *executionContext) _Project_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_displayName(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Project(rctx, args["projectId"].(string))
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -25567,121 +31401,161 @@ func (ec *executionContext) _Query_project(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_patchTasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_patchTasks_args(ctx, rawArgs)
+func (ec *executionContext) _Project_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_enabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().PatchTasks(rctx, args["patchId"].(string), args["sorts"].([]*SortOrder), args["page"].(*int), args["limit"].(*int), args["statuses"].([]string), args["baseStatuses"].([]string), args["variant"].(*string), args["taskName"].(*string), args["includeEmptyActivation"].(*bool))
+ return obj.Enabled, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*PatchTasks)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNPatchTasks2ágithubácomáevergreenáciáevergreenágraphqláPatchTasks(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_taskTests(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_taskTests_args(ctx, rawArgs)
+func (ec *executionContext) _Project_githubChecksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_githubChecksEnabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskTests(rctx, args["taskId"].(string), args["execution"].(*int), args["sortCategory"].(*TestSortCategory), args["sortDirection"].(*SortDirection), args["page"].(*int), args["limit"].(*int), args["testName"].(*string), args["statuses"].([]string), args["groupId"].(*string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GithubChecksEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*TaskTestResult)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNTaskTestResult2ágithubácomáevergreenáciáevergreenágraphqláTaskTestResult(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_taskTestSample(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_githubChecksEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_taskTestSample_args(ctx, rawArgs)
+func (ec *executionContext) _Project_githubTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_githubTriggerAliases(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskTestSample(rctx, args["tasks"].([]string), args["filters"].([]*TestFilter))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GithubTriggerAliases, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -25690,198 +31564,181 @@ func (ec *executionContext) _Query_taskTestSample(ctx context.Context, field gra
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*TaskTestResultSample)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOTaskTestResultSample2áágithubácomáevergreenáciáevergreenágraphqláTaskTestResultSampleá(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_taskFiles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_githubTriggerAliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_taskFiles_args(ctx, rawArgs)
+func (ec *executionContext) _Project_gitTagAuthorizedTeams(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskFiles(rctx, args["taskId"].(string), args["execution"].(*int))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitTagAuthorizedTeams, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*TaskFiles)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalNTaskFiles2ágithubácomáevergreenáciáevergreenágraphqláTaskFiles(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_gitTagAuthorizedTeams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_user_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().User(rctx, args["userId"].(*string))
- })
+func (ec *executionContext) _Project_gitTagAuthorizedUsers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIDBUser)
- fc.Result = res
- return ec.marshalNUser2ágithubácomáevergreenáciáevergreenárestámodeláAPIDBUser(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_taskLogs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_taskLogs_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskLogs(rctx, args["taskId"].(string), args["execution"].(*int))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitTagAuthorizedUsers, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*TaskLogs)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalNTaskLogs2ágithubácomáevergreenáciáevergreenágraphqláTaskLogs(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_commitQueue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_gitTagAuthorizedUsers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_commitQueue_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().CommitQueue(rctx, args["id"].(string))
- })
+func (ec *executionContext) _Project_gitTagVersionsEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APICommitQueue)
- fc.Result = res
- return ec.marshalNCommitQueue2ágithubácomáevergreenáciáevergreenárestámodeláAPICommitQueue(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_userSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().UserSettings(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitTagVersionsEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -25890,30 +31747,39 @@ func (ec *executionContext) _Query_userSettings(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIUserSettings)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOUserSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIUserSettings(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_spruceConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_gitTagVersionsEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_hidden(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_hidden(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().SpruceConfig(rctx)
+ return obj.Hidden, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -25922,62 +31788,83 @@ func (ec *executionContext) _Query_spruceConfig(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIAdminSettings)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOSpruceConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIAdminSettings(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_awsRegions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_hidden(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_identifier(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_identifier(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().AwsRegions(rctx)
+ return obj.Identifier, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_subnetAvailabilityZones(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_identifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_isFavorite(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_isFavorite(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().SubnetAvailabilityZones(rctx)
+ return ec.resolvers.Project().IsFavorite(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -25989,62 +31876,59 @@ func (ec *executionContext) _Query_subnetAvailabilityZones(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_userConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().UserConfig(rctx)
- })
+func (ec *executionContext) _Project_manualPrTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*UserConfig)
- fc.Result = res
- return ec.marshalOUserConfig2ágithubácomáevergreenáciáevergreenágraphqláUserConfig(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_clientConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().ClientConfig(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ManualPRTestingEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26053,37 +31937,59 @@ func (ec *executionContext) _Query_clientConfig(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIClientConfig)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOClientConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIClientConfig(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_host(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_manualPrTestingEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_host_args(ctx, rawArgs)
+func (ec *executionContext) _Project_notifyOnBuildFailure(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Host(rctx, args["hostId"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.NotifyOnBuildFailure, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26092,37 +31998,39 @@ func (ec *executionContext) _Query_host(ctx context.Context, field graphql.Colle
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIHost)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_hostEvents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_notifyOnBuildFailure(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_hostEvents_args(ctx, rawArgs)
+func (ec *executionContext) _Project_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_owner(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().HostEvents(rctx, args["hostId"].(string), args["hostTag"].(*string), args["limit"].(*int), args["page"].(*int))
+ return obj.Owner, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -26134,37 +32042,39 @@ func (ec *executionContext) _Query_hostEvents(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*HostEvents)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNHostEvents2ágithubácomáevergreenáciáevergreenágraphqláHostEvents(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_hosts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_hosts_args(ctx, rawArgs)
+func (ec *executionContext) _Project_patches(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_patches(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Hosts(rctx, args["hostId"].(*string), args["distroId"].(*string), args["currentTaskId"].(*string), args["statuses"].([]string), args["startedBy"].(*string), args["sortBy"].(*HostSortBy), args["sortDir"].(*SortDirection), args["page"].(*int), args["limit"].(*int))
+ return ec.resolvers.Project().Patches(rctx, obj, fc.Args["patchesInput"].(PatchesInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -26176,254 +32086,452 @@ func (ec *executionContext) _Query_hosts(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(*HostsResponse)
+ res := resTmp.(*Patches)
fc.Result = res
- return ec.marshalNHostsResponse2ágithubácomáevergreenáciáevergreenágraphqláHostsResponse(ctx, field.Selections, res)
+ return ec.marshalNPatches2ágithubácomáevergreenáciáevergreenágraphqláPatches(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_myHosts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_patches(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "filteredPatchCount":
+ return ec.fieldContext_Patches_filteredPatchCount(ctx, field)
+ case "patches":
+ return ec.fieldContext_Patches_patches(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patches", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Project_patches_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_patchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_patchingDisabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().MyHosts(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PatchingDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIHost)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNHost2áágithubácomáevergreenáciáevergreenárestámodeláAPIHostá(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_myVolumes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_patchingDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_patchTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().MyVolumes(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PatchTriggerAliases, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIPatchTriggerDefinition); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIPatchTriggerDefinition`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIVolume)
+ res := resTmp.([]model.APIPatchTriggerDefinition)
fc.Result = res
- return ec.marshalNVolume2áágithubácomáevergreenáciáevergreenárestámodeláAPIVolumeá(ctx, field.Selections, res)
+ return ec.marshalOPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_myPublicKeys(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_patchTriggerAliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "alias":
+ return ec.fieldContext_PatchTriggerAlias_alias(ctx, field)
+ case "childProjectId":
+ return ec.fieldContext_PatchTriggerAlias_childProjectId(ctx, field)
+ case "childProjectIdentifier":
+ return ec.fieldContext_PatchTriggerAlias_childProjectIdentifier(ctx, field)
+ case "parentAsModule":
+ return ec.fieldContext_PatchTriggerAlias_parentAsModule(ctx, field)
+ case "status":
+ return ec.fieldContext_PatchTriggerAlias_status(ctx, field)
+ case "taskSpecifiers":
+ return ec.fieldContext_PatchTriggerAlias_taskSpecifiers(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_PatchTriggerAlias_variantsTasks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchTriggerAlias", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_perfEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_perfEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().MyPublicKeys(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PerfEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIPubKey)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_distros(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_perfEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_distros_args(ctx, rawArgs)
+func (ec *executionContext) _Project_periodicBuilds(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_periodicBuilds(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Distros(rctx, args["onlySpawnable"].(bool))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PeriodicBuilds, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIPeriodicBuildDefinition); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIPeriodicBuildDefinition`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APIDistro)
+ res := resTmp.([]model.APIPeriodicBuildDefinition)
fc.Result = res
- return ec.marshalNDistro2áágithubácomáevergreenáciáevergreenárestámodeláAPIDistro(ctx, field.Selections, res)
+ return ec.marshalOPeriodicBuild2ágithubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_instanceTypes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_periodicBuilds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_PeriodicBuild_id(ctx, field)
+ case "alias":
+ return ec.fieldContext_PeriodicBuild_alias(ctx, field)
+ case "configFile":
+ return ec.fieldContext_PeriodicBuild_configFile(ctx, field)
+ case "intervalHours":
+ return ec.fieldContext_PeriodicBuild_intervalHours(ctx, field)
+ case "message":
+ return ec.fieldContext_PeriodicBuild_message(ctx, field)
+ case "nextRunTime":
+ return ec.fieldContext_PeriodicBuild_nextRunTime(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PeriodicBuild", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_private(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_private(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().InstanceTypes(rctx)
+ return obj.Private, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_distroTaskQueue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_private(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_distroTaskQueue_args(ctx, rawArgs)
+func (ec *executionContext) _Project_prTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_prTestingEnabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().DistroTaskQueue(rctx, args["distroId"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PRTestingEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APITaskQueueItem)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNTaskQueueItem2áágithubácomáevergreenáciáevergreenárestámodeláAPITaskQueueItemá(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_taskQueueDistros(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_prTestingEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_remotePath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_remotePath(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskQueueDistros(rctx)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RemotePath, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26435,37 +32543,39 @@ func (ec *executionContext) _Query_taskQueueDistros(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.([]*TaskQueueDistro)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTaskQueueDistro2áágithubácomáevergreenáciáevergreenágraphqláTaskQueueDistroá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_buildBaron(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_remotePath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_buildBaron_args(ctx, rawArgs)
+func (ec *executionContext) _Project_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_repo(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().BuildBaron(rctx, args["taskId"].(string), args["execution"].(int))
+ return obj.Repo, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -26477,37 +32587,39 @@ func (ec *executionContext) _Query_buildBaron(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*BuildBaron)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBuildBaron2ágithubácomáevergreenáciáevergreenágraphqláBuildBaron(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_bbGetCreatedTickets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_bbGetCreatedTickets_args(ctx, rawArgs)
+func (ec *executionContext) _Project_repoRefId(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_repoRefId(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().BbGetCreatedTickets(rctx, args["taskId"].(string))
+ return obj.RepoRefId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -26519,76 +32631,59 @@ func (ec *executionContext) _Query_bbGetCreatedTickets(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.([]*thirdparty.JiraTicket)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNJiraTicket2áágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicketá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_mainlineCommits(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_repoRefId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_mainlineCommits_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().MainlineCommits(rctx, args["options"].(MainlineCommitsOptions), args["buildVariantOptions"].(*BuildVariantOptions))
- })
+func (ec *executionContext) _Project_repotrackerDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_repotrackerDisabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*MainlineCommits)
- fc.Result = res
- return ec.marshalOMainlineCommits2ágithubácomáevergreenáciáevergreenágraphqláMainlineCommits(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query_taskNamesForBuildVariant(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_taskNamesForBuildVariant_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().TaskNamesForBuildVariant(rctx, args["projectId"].(string), args["buildVariant"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RepotrackerDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26597,37 +32692,39 @@ func (ec *executionContext) _Query_taskNamesForBuildVariant(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOString2ástringá(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_buildVariantsForTaskName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_repotrackerDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_buildVariantsForTaskName_args(ctx, rawArgs)
+func (ec *executionContext) _Project_restricted(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_restricted(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().BuildVariantsForTaskName(rctx, args["projectId"].(string), args["taskName"].(string))
+ return obj.Restricted, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -26636,37 +32733,39 @@ func (ec *executionContext) _Query_buildVariantsForTaskName(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*task.BuildVariantTuple)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOBuildVariantTuple2áágithubácomáevergreenáciáevergreenámodelátaskáBuildVariantTuple(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_projectSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_restricted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_projectSettings_args(ctx, rawArgs)
+func (ec *executionContext) _Project_spawnHostScriptPath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().ProjectSettings(rctx, args["identifier"].(string))
+ return obj.SpawnHostScriptPath, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -26678,79 +32777,120 @@ func (ec *executionContext) _Query_projectSettings(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(*model.APIProjectSettings)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNProjectSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_repoSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_spawnHostScriptPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_repoSettings_args(ctx, rawArgs)
+func (ec *executionContext) _Project_stepbackDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_stepbackDisabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().RepoSettings(rctx, args["id"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.StepbackDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*model.APIProjectSettings)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNRepoSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_projectEvents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_stepbackDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_projectEvents_args(ctx, rawArgs)
+func (ec *executionContext) _Project_taskAnnotationSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().ProjectEvents(rctx, args["identifier"].(string), args["limit"].(*int), args["before"].(*time.Time))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TaskAnnotationSettings, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APITaskAnnotationSettings); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotationSettings`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26762,37 +32902,65 @@ func (ec *executionContext) _Query_projectEvents(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(*ProjectEvents)
+ res := resTmp.(model.APITaskAnnotationSettings)
fc.Result = res
- return ec.marshalNProjectEvents2ágithubácomáevergreenáciáevergreenágraphqláProjectEvents(ctx, field.Selections, res)
+ return ec.marshalNTaskAnnotationSettings2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_repoEvents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_taskAnnotationSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "fileTicketWebhook":
+ return ec.fieldContext_TaskAnnotationSettings_fileTicketWebhook(ctx, field)
+ case "jiraCustomFields":
+ return ec.fieldContext_TaskAnnotationSettings_jiraCustomFields(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskAnnotationSettings", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_repoEvents_args(ctx, rawArgs)
+func (ec *executionContext) _Project_taskSync(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_taskSync(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().RepoEvents(rctx, args["id"].(string), args["limit"].(*int), args["before"].(*time.Time))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TaskSync, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APITaskSyncOptions); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APITaskSyncOptions`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26804,79 +32972,65 @@ func (ec *executionContext) _Query_repoEvents(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*ProjectEvents)
+ res := resTmp.(model.APITaskSyncOptions)
fc.Result = res
- return ec.marshalNProjectEvents2ágithubácomáevergreenáciáevergreenágraphqláProjectEvents(ctx, field.Selections, res)
+ return ec.marshalNTaskSyncOptions2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_hasVersion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Query",
+func (ec *executionContext) fieldContext_Project_taskSync(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "configEnabled":
+ return ec.fieldContext_TaskSyncOptions_configEnabled(ctx, field)
+ case "patchEnabled":
+ return ec.fieldContext_TaskSyncOptions_patchEnabled(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskSyncOptions", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_hasVersion_args(ctx, rawArgs)
+func (ec *executionContext) _Project_tracksPushEvents(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_tracksPushEvents(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().HasVersion(rctx, args["id"].(string))
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(bool)
- fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query___type_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.introspectType(args["name"].(string))
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TracksPushEvents, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26885,30 +33039,59 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Project_tracksPushEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Project_triggers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_triggers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.introspectSchema()
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Triggers, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APITriggerDefinition); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APITriggerDefinition`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26917,65 +33100,138 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*introspection.Schema)
+ res := resTmp.([]model.APITriggerDefinition)
fc.Result = res
- return ec.marshalO__Schema2ágithubácomá99designságqlgenágraphqláintrospectionáSchema(ctx, field.Selections, res)
+ return ec.marshalOTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoCommitQueueParams_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoCommitQueueParams",
+func (ec *executionContext) fieldContext_Project_triggers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "alias":
+ return ec.fieldContext_TriggerAlias_alias(ctx, field)
+ case "buildVariantRegex":
+ return ec.fieldContext_TriggerAlias_buildVariantRegex(ctx, field)
+ case "configFile":
+ return ec.fieldContext_TriggerAlias_configFile(ctx, field)
+ case "dateCutoff":
+ return ec.fieldContext_TriggerAlias_dateCutoff(ctx, field)
+ case "level":
+ return ec.fieldContext_TriggerAlias_level(ctx, field)
+ case "project":
+ return ec.fieldContext_TriggerAlias_project(ctx, field)
+ case "status":
+ return ec.fieldContext_TriggerAlias_status(ctx, field)
+ case "taskRegex":
+ return ec.fieldContext_TriggerAlias_taskRegex(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TriggerAlias", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_versionControlEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Enabled, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.VersionControlEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoCommitQueueParams_requireSigned(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoCommitQueueParams",
+func (ec *executionContext) fieldContext_Project_versionControlEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_workstationConfig(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_workstationConfig(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.RequireSigned, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.WorkstationConfig, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APIWorkstationConfig); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -26987,100 +33243,139 @@ func (ec *executionContext) _RepoCommitQueueParams_requireSigned(ctx context.Con
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(model.APIWorkstationConfig)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNWorkstationConfig2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoCommitQueueParams_mergeMethod(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoCommitQueueParams",
+func (ec *executionContext) fieldContext_Project_workstationConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "gitClone":
+ return ec.fieldContext_WorkstationConfig_gitClone(ctx, field)
+ case "setupCommands":
+ return ec.fieldContext_WorkstationConfig_setupCommands(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WorkstationConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_externalLinks(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_externalLinks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MergeMethod, nil
+ return obj.ExternalLinks, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.APIExternalLink)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOExternalLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIExternalLinká(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoCommitQueueParams_message(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoCommitQueueParams",
+func (ec *executionContext) fieldContext_Project_externalLinks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayName":
+ return ec.fieldContext_ExternalLink_displayName(ctx, field)
+ case "urlTemplate":
+ return ec.fieldContext_ExternalLink_urlTemplate(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ExternalLink", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Project_banner(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Project_banner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Message, nil
+ return obj.Banner, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIProjectBanner)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOProjectBanner2githubácomáevergreenáciáevergreenárestámodeláAPIProjectBanner(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_id(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_Project_banner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Project",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "text":
+ return ec.fieldContext_ProjectBanner_text(ctx, field)
+ case "theme":
+ return ec.fieldContext_ProjectBanner_theme(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectBanner", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_id(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27097,25 +33392,34 @@ func (ec *executionContext) _RepoRef_id(ctx context.Context, field graphql.Colle
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_alias(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return obj.Alias, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27132,25 +33436,34 @@ func (ec *executionContext) _RepoRef_displayName(ctx context.Context, field grap
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_gitTag(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_gitTag(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Enabled, nil
+ return obj.GitTag, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27162,30 +33475,39 @@ func (ec *executionContext) _RepoRef_enabled(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_private(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_gitTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_remotePath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_remotePath(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Private, nil
+ return obj.RemotePath, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27197,30 +33519,39 @@ func (ec *executionContext) _RepoRef_private(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_restricted(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_remotePath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_task(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_task(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Restricted, nil
+ return obj.Task, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27232,30 +33563,39 @@ func (ec *executionContext) _RepoRef_restricted(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_task(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_taskTags(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_taskTags(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Owner, nil
+ return obj.TaskTags, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27267,30 +33607,39 @@ func (ec *executionContext) _RepoRef_owner(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_taskTags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_variant(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_variant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return obj.Variant, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27307,25 +33656,34 @@ func (ec *executionContext) _RepoRef_repo(ctx context.Context, field graphql.Col
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_branch(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_variant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectAlias_variantTags(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectAlias) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectAlias_variantTags(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Branch, nil
+ return obj.VariantTags, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27337,30 +33695,39 @@ func (ec *executionContext) _RepoRef_branch(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_remotePath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectAlias_variantTags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectAlias",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectBanner_text(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectBanner) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectBanner_text(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RemotePath, nil
+ return obj.Text, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27377,25 +33744,34 @@ func (ec *executionContext) _RepoRef_remotePath(ctx context.Context, field graph
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_patchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectBanner_text(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectBanner",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectBanner_theme(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectBanner) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectBanner_theme(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchingDisabled, nil
+ return obj.Theme, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27407,30 +33783,39 @@ func (ec *executionContext) _RepoRef_patchingDisabled(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(evergreen.BannerTheme)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNBannerTheme2githubácomáevergreenáciáevergreenáBannerTheme(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_repotrackerDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectBanner_theme(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectBanner",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type BannerTheme does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectBuildVariant_displayName(ctx context.Context, field graphql.CollectedField, obj *ProjectBuildVariant) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectBuildVariant_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.RepotrackerDisabled, nil
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27442,30 +33827,39 @@ func (ec *executionContext) _RepoRef_repotrackerDisabled(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_dispatchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectBuildVariant_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectBuildVariant",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectBuildVariant_name(ctx context.Context, field graphql.CollectedField, obj *ProjectBuildVariant) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectBuildVariant_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DispatchingDisabled, nil
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27477,65 +33871,39 @@ func (ec *executionContext) _RepoRef_dispatchingDisabled(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_versionControlEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectBuildVariant_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectBuildVariant",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.VersionControlEnabled, nil
- })
+func (ec *executionContext) _ProjectBuildVariant_tasks(ctx context.Context, field graphql.CollectedField, obj *ProjectBuildVariant) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectBuildVariant_tasks(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _RepoRef_prTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PRTestingEnabled, nil
+ return obj.Tasks, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27547,135 +33915,149 @@ func (ec *executionContext) _RepoRef_prTestingEnabled(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_manualPrTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectBuildVariant_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectBuildVariant",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ManualPRTestingEnabled, nil
- })
+func (ec *executionContext) _ProjectEventLogEntry_after(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventLogEntry_after(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*bool)
- fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _RepoRef_githubChecksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubChecksEnabled, nil
+ return obj.After, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(model.APIProjectEventSettings)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOProjectEventSettings2githubácomáevergreenáciáevergreenárestámodeláAPIProjectEventSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_batchTime(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventLogEntry_after(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aliases":
+ return ec.fieldContext_ProjectEventSettings_aliases(ctx, field)
+ case "githubWebhooksEnabled":
+ return ec.fieldContext_ProjectEventSettings_githubWebhooksEnabled(ctx, field)
+ case "projectRef":
+ return ec.fieldContext_ProjectEventSettings_projectRef(ctx, field)
+ case "projectSubscriptions":
+ return ec.fieldContext_ProjectEventSettings_projectSubscriptions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_ProjectEventSettings_subscriptions(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectEventSettings_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectEventSettings", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventLogEntry_before(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventLogEntry_before(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BatchTime, nil
+ return obj.Before, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(model.APIProjectEventSettings)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalOProjectEventSettings2githubácomáevergreenáciáevergreenárestámodeláAPIProjectEventSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_deactivatePrevious(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventLogEntry_before(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aliases":
+ return ec.fieldContext_ProjectEventSettings_aliases(ctx, field)
+ case "githubWebhooksEnabled":
+ return ec.fieldContext_ProjectEventSettings_githubWebhooksEnabled(ctx, field)
+ case "projectRef":
+ return ec.fieldContext_ProjectEventSettings_projectRef(ctx, field)
+ case "projectSubscriptions":
+ return ec.fieldContext_ProjectEventSettings_projectSubscriptions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_ProjectEventSettings_subscriptions(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectEventSettings_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectEventSettings", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventLogEntry_timestamp(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DeactivatePrevious, nil
+ return obj.Timestamp, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27687,30 +34069,39 @@ func (ec *executionContext) _RepoRef_deactivatePrevious(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_defaultLogger(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventLogEntry_user(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEvent) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventLogEntry_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DefaultLogger, nil
+ return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27727,60 +34118,93 @@ func (ec *executionContext) _RepoRef_defaultLogger(ctx context.Context, field gr
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_notifyOnBuildFailure(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventLogEntry_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventSettings_aliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventSettings_aliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NotifyOnBuildFailure, nil
+ return obj.Aliases, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]model.APIProjectAlias)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOProjectAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_triggers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventSettings_aliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectAlias_id(ctx, field)
+ case "alias":
+ return ec.fieldContext_ProjectAlias_alias(ctx, field)
+ case "gitTag":
+ return ec.fieldContext_ProjectAlias_gitTag(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_ProjectAlias_remotePath(ctx, field)
+ case "task":
+ return ec.fieldContext_ProjectAlias_task(ctx, field)
+ case "taskTags":
+ return ec.fieldContext_ProjectAlias_taskTags(ctx, field)
+ case "variant":
+ return ec.fieldContext_ProjectAlias_variant(ctx, field)
+ case "variantTags":
+ return ec.fieldContext_ProjectAlias_variantTags(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectAlias", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventSettings_githubWebhooksEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Triggers, nil
+ return obj.GithubWebhooksEnabled, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27792,30 +34216,39 @@ func (ec *executionContext) _RepoRef_triggers(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.([]model.APITriggerDefinition)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_patchTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventSettings_projectRef(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventSettings_projectRef(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchTriggerAliases, nil
+ return obj.ProjectRef, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27824,30 +34257,131 @@ func (ec *executionContext) _RepoRef_patchTriggerAliases(ctx context.Context, fi
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIPatchTriggerDefinition)
+ res := resTmp.(model.APIProjectRef)
fc.Result = res
- return ec.marshalOPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx, field.Selections, res)
+ return ec.marshalOProject2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_githubTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventSettings_projectRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.GithubTriggerAliases, nil
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectEventSettings_projectSubscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventSettings_projectSubscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.ProjectEventSettings().ProjectSubscriptions(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -27856,30 +34390,57 @@ func (ec *executionContext) _RepoRef_githubTriggerAliases(ctx context.Context, f
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.([]*model.APISubscription)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_periodicBuilds(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectEventSettings_projectSubscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSubscription", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectEventSettings_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventSettings_subscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PeriodicBuilds, nil
+ return obj.Subscriptions, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27888,65 +34449,106 @@ func (ec *executionContext) _RepoRef_periodicBuilds(ctx context.Context, field g
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIPeriodicBuildDefinition)
+ res := resTmp.([]model.APISubscription)
fc.Result = res
- return ec.marshalOPeriodicBuild2ágithubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinitioná(ctx, field.Selections, res)
+ return ec.marshalOProjectSubscription2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_cedarTestResultsEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventSettings_subscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSubscription", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEventSettings_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectEventSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEventSettings_vars(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CedarTestResultsEnabled, nil
+ return obj.Vars, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(model.APIProjectVars)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOProjectVars2githubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_commitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEventSettings_vars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEventSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "adminOnlyVars":
+ return ec.fieldContext_ProjectVars_adminOnlyVars(ctx, field)
+ case "privateVars":
+ return ec.fieldContext_ProjectVars_privateVars(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectVars_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectVars", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEvents_count(ctx context.Context, field graphql.CollectedField, obj *ProjectEvents) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEvents_count(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CommitQueue, nil
+ return obj.Count, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27958,30 +34560,39 @@ func (ec *executionContext) _RepoRef_commitQueue(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(model.APICommitQueueParams)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNRepoCommitQueueParams2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_admins(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEvents_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEvents",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField, obj *ProjectEvents) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectEvents_eventLogEntries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Admins, nil
+ return obj.EventLogEntries, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -27993,65 +34604,108 @@ func (ec *executionContext) _RepoRef_admins(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.([]*model.APIProjectEvent)
fc.Result = res
- return ec.marshalNString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNProjectEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectEventá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_spawnHostScriptPath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectEvents_eventLogEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectEvents",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "after":
+ return ec.fieldContext_ProjectEventLogEntry_after(ctx, field)
+ case "before":
+ return ec.fieldContext_ProjectEventLogEntry_before(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_ProjectEventLogEntry_timestamp(ctx, field)
+ case "user":
+ return ec.fieldContext_ProjectEventLogEntry_user(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectEventLogEntry", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectSettings_aliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSettings_aliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpawnHostScriptPath, nil
+ return ec.resolvers.ProjectSettings().Aliases(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIProjectAlias)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOProjectAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_tracksPushEvents(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSettings_aliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectAlias_id(ctx, field)
+ case "alias":
+ return ec.fieldContext_ProjectAlias_alias(ctx, field)
+ case "gitTag":
+ return ec.fieldContext_ProjectAlias_gitTag(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_ProjectAlias_remotePath(ctx, field)
+ case "task":
+ return ec.fieldContext_ProjectAlias_task(ctx, field)
+ case "taskTags":
+ return ec.fieldContext_ProjectAlias_taskTags(ctx, field)
+ case "variant":
+ return ec.fieldContext_ProjectAlias_variant(ctx, field)
+ case "variantTags":
+ return ec.fieldContext_ProjectAlias_variantTags(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectAlias", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSettings_githubWebhooksEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TracksPushEvents, nil
+ return ec.resolvers.ProjectSettings().GithubWebhooksEnabled(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -28063,65 +34717,172 @@ func (ec *executionContext) _RepoRef_tracksPushEvents(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_taskSync(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSettings_projectRef(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSettings_projectRef(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskSync, nil
+ return obj.ProjectRef, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(model.APITaskSyncOptions)
+ res := resTmp.(model.APIProjectRef)
fc.Result = res
- return ec.marshalNRepoTaskSyncOptions2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, field.Selections, res)
+ return ec.marshalOProject2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_gitTagAuthorizedUsers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectSettings_projectRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.GitTagAuthorizedUsers, nil
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSettings_projectSubscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSettings_projectSubscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.ProjectSettings().ProjectSubscriptions(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -28130,30 +34891,57 @@ func (ec *executionContext) _RepoRef_gitTagAuthorizedUsers(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.([]*model.APISubscription)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_gitTagAuthorizedTeams(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSettings_projectSubscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSubscription", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSettings_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSettings_subscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitTagAuthorizedTeams, nil
+ return ec.resolvers.ProjectSettings().Subscriptions(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -28162,97 +34950,106 @@ func (ec *executionContext) _RepoRef_gitTagAuthorizedTeams(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.([]*model.APISubscription)
fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
+ return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_gitTagVersionsEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSettings_subscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSubscription", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSettings_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSettings_vars(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitTagVersionsEnabled, nil
+ return ec.resolvers.ProjectSettings().Vars(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*model.APIProjectVars)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOProjectVars2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_filesIgnoredFromCache(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectSettings_vars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSettings",
Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "adminOnlyVars":
+ return ec.fieldContext_ProjectVars_adminOnlyVars(ctx, field)
+ case "privateVars":
+ return ec.fieldContext_ProjectVars_privateVars(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectVars_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectVars", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.FilesIgnoredFromCache, nil
- })
+func (ec *executionContext) _ProjectSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
- fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _RepoRef_disabledStatsCache(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisabledStatsCache, nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28264,30 +35061,39 @@ func (ec *executionContext) _RepoRef_disabledStatsCache(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_workstationConfig(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectSubscription_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectSubscription_ownerType(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.WorkstationConfig, nil
+ return obj.OwnerType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28299,30 +35105,39 @@ func (ec *executionContext) _RepoRef_workstationConfig(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(model.APIWorkstationConfig)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNRepoWorkstationConfig2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_perfEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectSubscription_ownerType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectSubscription_regexSelectors(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PerfEnabled, nil
+ return obj.RegexSelectors, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28334,30 +35149,45 @@ func (ec *executionContext) _RepoRef_perfEnabled(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.([]model.APISelector)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNSelector2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_buildBaronSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectSubscription_regexSelectors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "data":
+ return ec.fieldContext_Selector_data(ctx, field)
+ case "type":
+ return ec.fieldContext_Selector_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Selector", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectSubscription_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildBaronSettings, nil
+ return obj.ResourceType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28369,30 +35199,39 @@ func (ec *executionContext) _RepoRef_buildBaronSettings(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(model.APIBuildBaronSettings)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBuildBaronSettings2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_taskAnnotationSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
+func (ec *executionContext) fieldContext_ProjectSubscription_resourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectSubscription_selectors(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskAnnotationSettings, nil
+ return obj.Selectors, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28404,65 +35243,92 @@ func (ec *executionContext) _RepoRef_taskAnnotationSettings(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(model.APITaskAnnotationSettings)
+ res := resTmp.([]model.APISelector)
fc.Result = res
- return ec.marshalNTaskAnnotationSettings2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, field.Selections, res)
+ return ec.marshalNSelector2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoRef_validDefaultLoggers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSubscription_selectors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "data":
+ return ec.fieldContext_Selector_data(ctx, field)
+ case "type":
+ return ec.fieldContext_Selector_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Selector", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSubscription_subscriber(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoRef",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.RepoRef().ValidDefaultLoggers(rctx, obj)
+ return obj.Subscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(model.APISubscriber)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalOSubscriberWrapper2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSubscription_subscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "subscriber":
+ return ec.fieldContext_SubscriberWrapper_subscriber(ctx, field)
+ case "type":
+ return ec.fieldContext_SubscriberWrapper_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SubscriberWrapper", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectSubscription_trigger(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoSettings",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.RepoSettings().GithubWebhooksEnabled(rctx, obj)
+ return obj.Trigger, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28474,30 +35340,39 @@ func (ec *executionContext) _RepoSettings_githubWebhooksEnabled(ctx context.Cont
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoSettings_projectRef(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoSettings",
+func (ec *executionContext) fieldContext_ProjectSubscription_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectSubscription_triggerData(ctx context.Context, field graphql.CollectedField, obj *model.APISubscription) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProjectRef, nil
+ return obj.TriggerData, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28506,94 +35381,127 @@ func (ec *executionContext) _RepoSettings_projectRef(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APIProjectRef)
+ res := resTmp.(map[string]string)
fc.Result = res
- return ec.marshalORepoRef2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalOStringMap2map(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoSettings_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_ProjectSubscription_triggerData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectSubscription",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type StringMap does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _ProjectVars_adminOnlyVars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectVars) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectVars_adminOnlyVars(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoSettings",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.RepoSettings().Vars(rctx, obj)
+ return ec.resolvers.ProjectVars().AdminOnlyVars(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIProjectVars)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalOProjectVars2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoSettings_aliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoSettings",
+func (ec *executionContext) fieldContext_ProjectVars_adminOnlyVars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectVars",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectVars_privateVars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectVars) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectVars_privateVars(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.RepoSettings().Aliases(rctx, obj)
+ return ec.resolvers.ProjectVars().PrivateVars(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*model.APIProjectAlias)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalOProjectAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoSettings_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoSettings",
+func (ec *executionContext) fieldContext_ProjectVars_privateVars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectVars",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ProjectVars_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectVars) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ProjectVars_vars(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.RepoSettings().Subscriptions(rctx, obj)
+ return obj.Vars, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28602,30 +35510,39 @@ func (ec *executionContext) _RepoSettings_subscriptions(ctx context.Context, fie
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*model.APISubscription)
+ res := resTmp.(map[string]string)
fc.Result = res
- return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
+ return ec.marshalOStringMap2map(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoTaskSyncOptions_configEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoTaskSyncOptions",
+func (ec *executionContext) fieldContext_ProjectVars_vars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ProjectVars",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type StringMap does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PublicKey_key(ctx context.Context, field graphql.CollectedField, obj *model.APIPubKey) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PublicKey_key(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ConfigEnabled, nil
+ return obj.Key, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28637,30 +35554,39 @@ func (ec *executionContext) _RepoTaskSyncOptions_configEnabled(ctx context.Conte
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoTaskSyncOptions_patchEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoTaskSyncOptions",
+func (ec *executionContext) fieldContext_PublicKey_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PublicKey",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PublicKey_name(ctx context.Context, field graphql.CollectedField, obj *model.APIPubKey) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PublicKey_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchEnabled, nil
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -28672,62 +35598,100 @@ func (ec *executionContext) _RepoTaskSyncOptions_patchEnabled(ctx context.Contex
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoWorkstationConfig_setupCommands(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "RepoWorkstationConfig",
+func (ec *executionContext) fieldContext_PublicKey_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PublicKey",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_bbGetCreatedTickets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_bbGetCreatedTickets(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SetupCommands, nil
+ return ec.resolvers.Query().BbGetCreatedTickets(rctx, fc.Args["taskId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]model.APIWorkstationSetupCommand)
+ res := resTmp.([]*thirdparty.JiraTicket)
fc.Result = res
- return ec.marshalOWorkstationSetupCommand2ágithubácomáevergreenáciáevergreenárestámodeláAPIWorkstationSetupCommandá(ctx, field.Selections, res)
+ return ec.marshalNJiraTicket2áágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicketá(ctx, field.Selections, res)
}
-func (ec *executionContext) _RepoWorkstationConfig_gitClone(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_bbGetCreatedTickets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "fields":
+ return ec.fieldContext_JiraTicket_fields(ctx, field)
+ case "key":
+ return ec.fieldContext_JiraTicket_key(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraTicket", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "RepoWorkstationConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_bbGetCreatedTickets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_buildBaron(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_buildBaron(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitClone, nil
+ return ec.resolvers.Query().BuildBaron(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(int))
})
if err != nil {
ec.Error(ctx, err)
@@ -28739,100 +35703,146 @@ func (ec *executionContext) _RepoWorkstationConfig_gitClone(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*BuildBaron)
fc.Result = res
- return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNBuildBaron2ágithubácomáevergreenáciáevergreenágraphqláBuildBaron(ctx, field.Selections, res)
}
-func (ec *executionContext) _SearchReturnInfo_issues(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_buildBaron(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "bbTicketCreationDefined":
+ return ec.fieldContext_BuildBaron_bbTicketCreationDefined(ctx, field)
+ case "buildBaronConfigured":
+ return ec.fieldContext_BuildBaron_buildBaronConfigured(ctx, field)
+ case "searchReturnInfo":
+ return ec.fieldContext_BuildBaron_searchReturnInfo(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BuildBaron", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SearchReturnInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_buildBaron_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_awsRegions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_awsRegions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Issues, nil
+ return ec.resolvers.Query().AwsRegions(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]thirdparty.JiraTicket)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNJiraTicket2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicketá(ctx, field.Selections, res)
+ return ec.marshalOString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _SearchReturnInfo_search(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_awsRegions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_clientConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_clientConfig(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SearchReturnInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Search, nil
+ return ec.resolvers.Query().ClientConfig(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIClientConfig)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOClientConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIClientConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _SearchReturnInfo_source(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_clientConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientBinaries":
+ return ec.fieldContext_ClientConfig_clientBinaries(ctx, field)
+ case "latestRevision":
+ return ec.fieldContext_ClientConfig_latestRevision(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ClientConfig", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_instanceTypes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_instanceTypes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SearchReturnInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Source, nil
+ return ec.resolvers.Query().InstanceTypes(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -28844,65 +35854,98 @@ func (ec *executionContext) _SearchReturnInfo_source(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _SearchReturnInfo_featuresURL(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
- defer func() {
+func (ec *executionContext) fieldContext_Query_instanceTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_spruceConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_spruceConfig(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SearchReturnInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FeaturesURL, nil
+ return ec.resolvers.Query().SpruceConfig(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIAdminSettings)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOSpruceConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIAdminSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Selector_type(ctx context.Context, field graphql.CollectedField, obj *model.APISelector) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_spruceConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "banner":
+ return ec.fieldContext_SpruceConfig_banner(ctx, field)
+ case "bannerTheme":
+ return ec.fieldContext_SpruceConfig_bannerTheme(ctx, field)
+ case "githubOrgs":
+ return ec.fieldContext_SpruceConfig_githubOrgs(ctx, field)
+ case "jira":
+ return ec.fieldContext_SpruceConfig_jira(ctx, field)
+ case "providers":
+ return ec.fieldContext_SpruceConfig_providers(ctx, field)
+ case "spawnHost":
+ return ec.fieldContext_SpruceConfig_spawnHost(ctx, field)
+ case "ui":
+ return ec.fieldContext_SpruceConfig_ui(ctx, field)
+ case "slack":
+ return ec.fieldContext_SpruceConfig_slack(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SpruceConfig", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_subnetAvailabilityZones(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_subnetAvailabilityZones(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Selector",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return ec.resolvers.Query().SubnetAvailabilityZones(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -28914,30 +35957,39 @@ func (ec *executionContext) _Selector_type(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Selector_data(ctx context.Context, field graphql.CollectedField, obj *model.APISelector) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_subnetAvailabilityZones(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_distros(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_distros(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Selector",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Data, nil
+ return ec.resolvers.Query().Distros(rctx, fc.Args["onlySpawnable"].(bool))
})
if err != nil {
ec.Error(ctx, err)
@@ -28949,30 +36001,62 @@ func (ec *executionContext) _Selector_data(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIDistro)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNDistro2áágithubácomáevergreenáciáevergreenárestámodeláAPIDistro(ctx, field.Selections, res)
}
-func (ec *executionContext) _Source_author(ctx context.Context, field graphql.CollectedField, obj *model.APISource) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_distros(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "isVirtualWorkStation":
+ return ec.fieldContext_Distro_isVirtualWorkStation(ctx, field)
+ case "name":
+ return ec.fieldContext_Distro_name(ctx, field)
+ case "user":
+ return ec.fieldContext_Distro_user(ctx, field)
+ case "userSpawnAllowed":
+ return ec.fieldContext_Distro_userSpawnAllowed(ctx, field)
+ case "workDir":
+ return ec.fieldContext_Distro_workDir(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Distro", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Source",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_distros_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_distroTaskQueue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_distroTaskQueue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Author, nil
+ return ec.resolvers.Query().DistroTaskQueue(rctx, fc.Args["distroId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -28984,65 +36068,172 @@ func (ec *executionContext) _Source_author(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APITaskQueueItem)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNTaskQueueItem2áágithubácomáevergreenáciáevergreenárestámodeláAPITaskQueueItemá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Source_time(ctx context.Context, field graphql.CollectedField, obj *model.APISource) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_distroTaskQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_TaskQueueItem_id(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_TaskQueueItem_buildVariant(ctx, field)
+ case "displayName":
+ return ec.fieldContext_TaskQueueItem_displayName(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_TaskQueueItem_expectedDuration(ctx, field)
+ case "priority":
+ return ec.fieldContext_TaskQueueItem_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_TaskQueueItem_project(ctx, field)
+ case "requester":
+ return ec.fieldContext_TaskQueueItem_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_TaskQueueItem_revision(ctx, field)
+ case "version":
+ return ec.fieldContext_TaskQueueItem_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskQueueItem", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Source",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_distroTaskQueue_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_host(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_host(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Time, nil
+ return ec.resolvers.Query().Host(rctx, fc.Args["hostId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*model.APIHost)
fc.Result = res
- return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
}
-func (ec *executionContext) _Source_requester(ctx context.Context, field graphql.CollectedField, obj *model.APISource) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_host_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_hostEvents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_hostEvents(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Source",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Requester, nil
+ return ec.resolvers.Query().HostEvents(rctx, fc.Args["hostId"].(string), fc.Args["hostTag"].(*string), fc.Args["limit"].(*int), fc.Args["page"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -29054,30 +36245,56 @@ func (ec *executionContext) _Source_requester(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*HostEvents)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNHostEvents2ágithubácomáevergreenáciáevergreenágraphqláHostEvents(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpawnHostConfig_unexpirableHostsPerUser(ctx context.Context, field graphql.CollectedField, obj *model.APISpawnHostConfig) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_hostEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_HostEvents_count(ctx, field)
+ case "eventLogEntries":
+ return ec.fieldContext_HostEvents_eventLogEntries(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type HostEvents", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SpawnHostConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_hostEvents_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_hosts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_hosts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UnexpirableHostsPerUser, nil
+ return ec.resolvers.Query().Hosts(rctx, fc.Args["hostId"].(*string), fc.Args["distroId"].(*string), fc.Args["currentTaskId"].(*string), fc.Args["statuses"].([]string), fc.Args["startedBy"].(*string), fc.Args["sortBy"].(*HostSortBy), fc.Args["sortDir"].(*SortDirection), fc.Args["page"].(*int), fc.Args["limit"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -29089,30 +36306,58 @@ func (ec *executionContext) _SpawnHostConfig_unexpirableHostsPerUser(ctx context
}
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*HostsResponse)
fc.Result = res
- return ec.marshalNInt2áint(ctx, field.Selections, res)
+ return ec.marshalNHostsResponse2ágithubácomáevergreenáciáevergreenágraphqláHostsResponse(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpawnHostConfig_unexpirableVolumesPerUser(ctx context.Context, field graphql.CollectedField, obj *model.APISpawnHostConfig) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_hosts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "filteredHostsCount":
+ return ec.fieldContext_HostsResponse_filteredHostsCount(ctx, field)
+ case "hosts":
+ return ec.fieldContext_HostsResponse_hosts(ctx, field)
+ case "totalHostsCount":
+ return ec.fieldContext_HostsResponse_totalHostsCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type HostsResponse", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SpawnHostConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_hosts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_taskQueueDistros(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_taskQueueDistros(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UnexpirableVolumesPerUser, nil
+ return ec.resolvers.Query().TaskQueueDistros(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -29124,30 +36369,47 @@ func (ec *executionContext) _SpawnHostConfig_unexpirableVolumesPerUser(ctx conte
}
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.([]*TaskQueueDistro)
fc.Result = res
- return ec.marshalNInt2áint(ctx, field.Selections, res)
+ return ec.marshalNTaskQueueDistro2áágithubácomáevergreenáciáevergreenágraphqláTaskQueueDistroá(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpawnHostConfig_spawnHostsPerUser(ctx context.Context, field graphql.CollectedField, obj *model.APISpawnHostConfig) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_taskQueueDistros(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_TaskQueueDistro_id(ctx, field)
+ case "hostCount":
+ return ec.fieldContext_TaskQueueDistro_hostCount(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_TaskQueueDistro_taskCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskQueueDistro", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_pod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_pod(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SpawnHostConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpawnHostsPerUser, nil
+ return ec.resolvers.Query().Pod(rctx, fc.Args["podId"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -29159,158 +36421,393 @@ func (ec *executionContext) _SpawnHostConfig_spawnHostsPerUser(ctx context.Conte
}
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*model.APIPod)
fc.Result = res
- return ec.marshalNInt2áint(ctx, field.Selections, res)
+ return ec.marshalNPod2ágithubácomáevergreenáciáevergreenárestámodeláAPIPod(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpruceConfig_ui(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_pod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "events":
+ return ec.fieldContext_Pod_events(ctx, field)
+ case "id":
+ return ec.fieldContext_Pod_id(ctx, field)
+ case "status":
+ return ec.fieldContext_Pod_status(ctx, field)
+ case "task":
+ return ec.fieldContext_Pod_task(ctx, field)
+ case "taskContainerCreationOpts":
+ return ec.fieldContext_Pod_taskContainerCreationOpts(ctx, field)
+ case "type":
+ return ec.fieldContext_Pod_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Pod", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Ui, nil
- })
- if err != nil {
+ if fc.Args, err = ec.field_Query_pod_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
+ return
}
- res := resTmp.(*model.APIUIConfig)
- fc.Result = res
- return ec.marshalOUIConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIUIConfig(ctx, field.Selections, res)
+ return fc, nil
}
-func (ec *executionContext) _SpruceConfig_jira(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) _Query_patch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_patch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Jira, nil
+ return ec.resolvers.Query().Patch(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIJiraConfig)
+ res := resTmp.(*model.APIPatch)
fc.Result = res
- return ec.marshalOJiraConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIJiraConfig(ctx, field.Selections, res)
+ return ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpruceConfig_banner(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_patch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_patch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_githubProjectConflicts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_githubProjectConflicts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Banner, nil
+ return ec.resolvers.Query().GithubProjectConflicts(rctx, fc.Args["projectId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model1.GithubProjectConflicts)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNGithubProjectConflicts2ágithubácomáevergreenáciáevergreenámodeláGithubProjectConflicts(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpruceConfig_bannerTheme(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_githubProjectConflicts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "commitCheckIdentifiers":
+ return ec.fieldContext_GithubProjectConflicts_commitCheckIdentifiers(ctx, field)
+ case "commitQueueIdentifiers":
+ return ec.fieldContext_GithubProjectConflicts_commitQueueIdentifiers(ctx, field)
+ case "prTestingIdentifiers":
+ return ec.fieldContext_GithubProjectConflicts_prTestingIdentifiers(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GithubProjectConflicts", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_githubProjectConflicts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_project(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BannerTheme, nil
+ return ec.resolvers.Query().Project(rctx, fc.Args["projectIdentifier"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpruceConfig_githubOrgs(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_project_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_projects(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_projects(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubOrgs, nil
+ return ec.resolvers.Query().Projects(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -29322,62 +36819,108 @@ func (ec *executionContext) _SpruceConfig_githubOrgs(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.([]*GroupedProjects)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNGroupedProjects2áágithubácomáevergreenáciáevergreenágraphqláGroupedProjects(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpruceConfig_providers(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_projects(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "groupDisplayName":
+ return ec.fieldContext_GroupedProjects_groupDisplayName(ctx, field)
+ case "projects":
+ return ec.fieldContext_GroupedProjects_projects(ctx, field)
+ case "repo":
+ return ec.fieldContext_GroupedProjects_repo(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GroupedProjects", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_projectEvents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_projectEvents(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Providers, nil
+ return ec.resolvers.Query().ProjectEvents(rctx, fc.Args["identifier"].(string), fc.Args["limit"].(*int), fc.Args["before"].(*time.Time))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APICloudProviders)
+ res := resTmp.(*ProjectEvents)
fc.Result = res
- return ec.marshalOCloudProviderConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPICloudProviders(ctx, field.Selections, res)
+ return ec.marshalNProjectEvents2ágithubácomáevergreenáciáevergreenágraphqláProjectEvents(ctx, field.Selections, res)
}
-func (ec *executionContext) _SpruceConfig_spawnHost(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_projectEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_ProjectEvents_count(ctx, field)
+ case "eventLogEntries":
+ return ec.fieldContext_ProjectEvents_eventLogEntries(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectEvents", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SpruceConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_projectEvents_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_projectSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_projectSettings(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Spawnhost, nil
+ return ec.resolvers.Query().ProjectSettings(rctx, fc.Args["identifier"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -29389,30 +36932,64 @@ func (ec *executionContext) _SpruceConfig_spawnHost(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(*model.APISpawnHostConfig)
+ res := resTmp.(*model.APIProjectSettings)
fc.Result = res
- return ec.marshalNSpawnHostConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPISpawnHostConfig(ctx, field.Selections, res)
+ return ec.marshalNProjectSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _StatusCount_status(ctx context.Context, field graphql.CollectedField, obj *task.StatusCount) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_projectSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aliases":
+ return ec.fieldContext_ProjectSettings_aliases(ctx, field)
+ case "githubWebhooksEnabled":
+ return ec.fieldContext_ProjectSettings_githubWebhooksEnabled(ctx, field)
+ case "projectRef":
+ return ec.fieldContext_ProjectSettings_projectRef(ctx, field)
+ case "projectSubscriptions":
+ return ec.fieldContext_ProjectSettings_projectSubscriptions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_ProjectSettings_subscriptions(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectSettings_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSettings", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "StatusCount",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_projectSettings_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_repoEvents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_repoEvents(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return ec.resolvers.Query().RepoEvents(rctx, fc.Args["id"].(string), fc.Args["limit"].(*int), fc.Args["before"].(*time.Time))
})
if err != nil {
ec.Error(ctx, err)
@@ -29424,30 +37001,56 @@ func (ec *executionContext) _StatusCount_status(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*ProjectEvents)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNProjectEvents2ágithubácomáevergreenáciáevergreenágraphqláProjectEvents(ctx, field.Selections, res)
}
-func (ec *executionContext) _StatusCount_count(ctx context.Context, field graphql.CollectedField, obj *task.StatusCount) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_repoEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_ProjectEvents_count(ctx, field)
+ case "eventLogEntries":
+ return ec.fieldContext_ProjectEvents_eventLogEntries(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectEvents", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "StatusCount",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_repoEvents_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_repoSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_repoSettings(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Count, nil
+ return ec.resolvers.Query().RepoSettings(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -29459,158 +37062,355 @@ func (ec *executionContext) _StatusCount_count(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*model.APIProjectSettings)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNRepoSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_githubPRSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
- defer func() {
+func (ec *executionContext) fieldContext_Query_repoSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aliases":
+ return ec.fieldContext_RepoSettings_aliases(ctx, field)
+ case "githubWebhooksEnabled":
+ return ec.fieldContext_RepoSettings_githubWebhooksEnabled(ctx, field)
+ case "projectRef":
+ return ec.fieldContext_RepoSettings_projectRef(ctx, field)
+ case "projectSubscriptions":
+ return ec.fieldContext_RepoSettings_projectSubscriptions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_RepoSettings_subscriptions(ctx, field)
+ case "vars":
+ return ec.fieldContext_RepoSettings_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoSettings", field.Name)
+ },
+ }
+ defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_repoSettings_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_viewableProjectRefs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_viewableProjectRefs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubPRSubscriber, nil
+ return ec.resolvers.Query().ViewableProjectRefs(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIGithubPRSubscriber)
+ res := resTmp.([]*GroupedProjects)
fc.Result = res
- return ec.marshalOGithubPRSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubPRSubscriber(ctx, field.Selections, res)
+ return ec.marshalNGroupedProjects2áágithubácomáevergreenáciáevergreenágraphqláGroupedProjects(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_githubCheckSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_viewableProjectRefs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "groupDisplayName":
+ return ec.fieldContext_GroupedProjects_groupDisplayName(ctx, field)
+ case "projects":
+ return ec.fieldContext_GroupedProjects_projects(ctx, field)
+ case "repo":
+ return ec.fieldContext_GroupedProjects_repo(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GroupedProjects", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_myHosts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_myHosts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubCheckSubscriber, nil
+ return ec.resolvers.Query().MyHosts(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIGithubCheckSubscriber)
+ res := resTmp.([]*model.APIHost)
fc.Result = res
- return ec.marshalOGithubCheckSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubCheckSubscriber(ctx, field.Selections, res)
+ return ec.marshalNHost2áágithubácomáevergreenáciáevergreenárestámodeláAPIHostá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_webhookSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_myHosts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_myVolumes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_myVolumes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.WebhookSubscriber, nil
+ return ec.resolvers.Query().MyVolumes(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIWebhookSubscriber)
+ res := resTmp.([]*model.APIVolume)
fc.Result = res
- return ec.marshalOWebhookSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookSubscriber(ctx, field.Selections, res)
+ return ec.marshalNVolume2áágithubácomáevergreenáciáevergreenárestámodeláAPIVolumeá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_jiraIssueSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_myVolumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Volume_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Volume_availabilityZone(ctx, field)
+ case "createdBy":
+ return ec.fieldContext_Volume_createdBy(ctx, field)
+ case "creationTime":
+ return ec.fieldContext_Volume_creationTime(ctx, field)
+ case "deviceName":
+ return ec.fieldContext_Volume_deviceName(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Volume_displayName(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Volume_expiration(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Volume_homeVolume(ctx, field)
+ case "host":
+ return ec.fieldContext_Volume_host(ctx, field)
+ case "hostID":
+ return ec.fieldContext_Volume_hostID(ctx, field)
+ case "migrating":
+ return ec.fieldContext_Volume_migrating(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Volume_noExpiration(ctx, field)
+ case "size":
+ return ec.fieldContext_Volume_size(ctx, field)
+ case "type":
+ return ec.fieldContext_Volume_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Volume", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_logkeeperBuildMetadata(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_logkeeperBuildMetadata(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.JiraIssueSubscriber, nil
+ return ec.resolvers.Query().LogkeeperBuildMetadata(rctx, fc.Args["buildId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIJIRAIssueSubscriber)
+ res := resTmp.(*plank.Build)
fc.Result = res
- return ec.marshalOJiraIssueSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIJIRAIssueSubscriber(ctx, field.Selections, res)
+ return ec.marshalNLogkeeperBuild2ágithubácomáevergreenáciáplankáBuild(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_jiraCommentSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_logkeeperBuildMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_LogkeeperBuild_id(ctx, field)
+ case "builder":
+ return ec.fieldContext_LogkeeperBuild_builder(ctx, field)
+ case "buildNum":
+ return ec.fieldContext_LogkeeperBuild_buildNum(ctx, field)
+ case "taskId":
+ return ec.fieldContext_LogkeeperBuild_taskId(ctx, field)
+ case "taskExecution":
+ return ec.fieldContext_LogkeeperBuild_taskExecution(ctx, field)
+ case "tests":
+ return ec.fieldContext_LogkeeperBuild_tests(ctx, field)
+ case "task":
+ return ec.fieldContext_LogkeeperBuild_task(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LogkeeperBuild", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_logkeeperBuildMetadata_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_task(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_task(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.JiraCommentSubscriber, nil
+ return ec.resolvers.Query().Task(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -29619,161 +37419,568 @@ func (ec *executionContext) _Subscriber_jiraCommentSubscriber(ctx context.Contex
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_emailSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_task(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_task_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_taskAllExecutions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_taskAllExecutions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EmailSubscriber, nil
+ return ec.resolvers.Query().TaskAllExecutions(rctx, fc.Args["taskId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APITask)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
}
-func (ec *executionContext) _Subscriber_slackSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_taskAllExecutions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_taskAllExecutions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_taskTests(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_taskTests(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Subscriber",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SlackSubscriber, nil
+ return ec.resolvers.Query().TaskTests(rctx, fc.Args["taskId"].(string), fc.Args["execution"].(*int), fc.Args["sortCategory"].(*TestSortCategory), fc.Args["sortDirection"].(*SortDirection), fc.Args["page"].(*int), fc.Args["limit"].(*int), fc.Args["testName"].(*string), fc.Args["statuses"].([]string), fc.Args["groupId"].(*string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*TaskTestResult)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNTaskTestResult2ágithubácomáevergreenáciáevergreenágraphqláTaskTestResult(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_aborted(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_taskTests(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "testResults":
+ return ec.fieldContext_TaskTestResult_testResults(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_TaskTestResult_totalTestCount(ctx, field)
+ case "filteredTestCount":
+ return ec.fieldContext_TaskTestResult_filteredTestCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskTestResult", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_taskTests_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_taskTestSample(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_taskTestSample(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Aborted, nil
+ return ec.resolvers.Query().TaskTestSample(rctx, fc.Args["tasks"].([]string), fc.Args["filters"].([]*TestFilter))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]*TaskTestResultSample)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOTaskTestResultSample2áágithubácomáevergreenáciáevergreenágraphqláTaskTestResultSampleá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_abortInfo(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_taskTestSample(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "execution":
+ return ec.fieldContext_TaskTestResultSample_execution(ctx, field)
+ case "matchingFailedTestNames":
+ return ec.fieldContext_TaskTestResultSample_matchingFailedTestNames(ctx, field)
+ case "taskId":
+ return ec.fieldContext_TaskTestResultSample_taskId(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_TaskTestResultSample_totalTestCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskTestResultSample", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_taskTestSample_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_myPublicKeys(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_myPublicKeys(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().AbortInfo(rctx, obj)
+ return ec.resolvers.Query().MyPublicKeys(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*AbortInfo)
+ res := resTmp.([]*model.APIPubKey)
fc.Result = res
- return ec.marshalOAbortInfo2ágithubácomáevergreenáciáevergreenágraphqláAbortInfo(ctx, field.Selections, res)
+ return ec.marshalNPublicKey2áágithubácomáevergreenáciáevergreenárestámodeláAPIPubKeyá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_activated(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_myPublicKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_PublicKey_key(ctx, field)
+ case "name":
+ return ec.fieldContext_PublicKey_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PublicKey", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Activated, nil
+ return ec.resolvers.Query().User(rctx, fc.Args["userId"].(*string))
})
if err != nil {
ec.Error(ctx, err)
@@ -29785,30 +37992,64 @@ func (ec *executionContext) _Task_activated(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*model.APIDBUser)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNUser2ágithubácomáevergreenáciáevergreenárestámodeláAPIDBUser(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_activatedBy(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayName":
+ return ec.fieldContext_User_displayName(ctx, field)
+ case "emailAddress":
+ return ec.fieldContext_User_emailAddress(ctx, field)
+ case "patches":
+ return ec.fieldContext_User_patches(ctx, field)
+ case "permissions":
+ return ec.fieldContext_User_permissions(ctx, field)
+ case "subscriptions":
+ return ec.fieldContext_User_subscriptions(ctx, field)
+ case "userId":
+ return ec.fieldContext_User_userId(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_user_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_userConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_userConfig(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ActivatedBy, nil
+ return ec.resolvers.Query().UserConfig(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -29817,30 +38058,49 @@ func (ec *executionContext) _Task_activatedBy(ctx context.Context, field graphql
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*UserConfig)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOUserConfig2ágithubácomáevergreenáciáevergreenágraphqláUserConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_activatedTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_userConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "api_key":
+ return ec.fieldContext_UserConfig_api_key(ctx, field)
+ case "api_server_host":
+ return ec.fieldContext_UserConfig_api_server_host(ctx, field)
+ case "ui_server_host":
+ return ec.fieldContext_UserConfig_ui_server_host(ctx, field)
+ case "user":
+ return ec.fieldContext_UserConfig_user(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type UserConfig", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_userSettings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_userSettings(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ActivatedTime, nil
+ return ec.resolvers.Query().UserSettings(rctx)
})
if err != nil {
ec.Error(ctx, err)
@@ -29849,62 +38109,124 @@ func (ec *executionContext) _Task_activatedTime(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*model.APIUserSettings)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOUserSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIUserSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_ami(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_userSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "githubUser":
+ return ec.fieldContext_UserSettings_githubUser(ctx, field)
+ case "notifications":
+ return ec.fieldContext_UserSettings_notifications(ctx, field)
+ case "region":
+ return ec.fieldContext_UserSettings_region(ctx, field)
+ case "slackUsername":
+ return ec.fieldContext_UserSettings_slackUsername(ctx, field)
+ case "slackMemberId":
+ return ec.fieldContext_UserSettings_slackMemberId(ctx, field)
+ case "timezone":
+ return ec.fieldContext_UserSettings_timezone(ctx, field)
+ case "useSpruceOptions":
+ return ec.fieldContext_UserSettings_useSpruceOptions(ctx, field)
+ case "dateFormat":
+ return ec.fieldContext_UserSettings_dateFormat(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type UserSettings", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query_commitQueue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_commitQueue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().Ami(rctx, obj)
+ return ec.resolvers.Query().CommitQueue(rctx, fc.Args["projectIdentifier"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APICommitQueue)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNCommitQueue2ágithubácomáevergreenáciáevergreenárestámodeláAPICommitQueue(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_annotation(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_commitQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_CommitQueue_message(ctx, field)
+ case "owner":
+ return ec.fieldContext_CommitQueue_owner(ctx, field)
+ case "projectId":
+ return ec.fieldContext_CommitQueue_projectId(ctx, field)
+ case "queue":
+ return ec.fieldContext_CommitQueue_queue(ctx, field)
+ case "repo":
+ return ec.fieldContext_CommitQueue_repo(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommitQueue", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_commitQueue_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_buildVariantsForTaskName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_buildVariantsForTaskName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().Annotation(rctx, obj)
+ return ec.resolvers.Query().BuildVariantsForTaskName(rctx, fc.Args["projectIdentifier"].(string), fc.Args["taskName"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -29913,30 +38235,56 @@ func (ec *executionContext) _Task_annotation(ctx context.Context, field graphql.
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APITaskAnnotation)
+ res := resTmp.([]*task.BuildVariantTuple)
fc.Result = res
- return ec.marshalOAnnotation2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotation(ctx, field.Selections, res)
+ return ec.marshalOBuildVariantTuple2áágithubácomáevergreenáciáevergreenámodelátaskáBuildVariantTuple(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_baseTask(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_buildVariantsForTaskName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "buildVariant":
+ return ec.fieldContext_BuildVariantTuple_buildVariant(ctx, field)
+ case "displayName":
+ return ec.fieldContext_BuildVariantTuple_displayName(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BuildVariantTuple", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_buildVariantsForTaskName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_mainlineCommits(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_mainlineCommits(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().BaseTask(rctx, obj)
+ return ec.resolvers.Query().MainlineCommits(rctx, fc.Args["options"].(MainlineCommitsOptions), fc.Args["buildVariantOptions"].(*BuildVariantOptions))
})
if err != nil {
ec.Error(ctx, err)
@@ -29945,30 +38293,58 @@ func (ec *executionContext) _Task_baseTask(ctx context.Context, field graphql.Co
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.(*MainlineCommits)
fc.Result = res
- return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalOMainlineCommits2ágithubácomáevergreenáciáevergreenágraphqláMainlineCommits(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_baseStatus(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_mainlineCommits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "nextPageOrderNumber":
+ return ec.fieldContext_MainlineCommits_nextPageOrderNumber(ctx, field)
+ case "prevPageOrderNumber":
+ return ec.fieldContext_MainlineCommits_prevPageOrderNumber(ctx, field)
+ case "versions":
+ return ec.fieldContext_MainlineCommits_versions(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type MainlineCommits", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_mainlineCommits_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_taskNamesForBuildVariant(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_taskNamesForBuildVariant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().BaseStatus(rctx, obj)
+ return ec.resolvers.Query().TaskNamesForBuildVariant(rctx, fc.Args["projectIdentifier"].(string), fc.Args["buildVariant"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -29977,30 +38353,50 @@ func (ec *executionContext) _Task_baseStatus(ctx context.Context, field graphql.
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_blocked(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_taskNamesForBuildVariant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_taskNamesForBuildVariant_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_hasVersion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_hasVersion(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Blocked, nil
+ return ec.resolvers.Query().HasVersion(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -30017,25 +38413,45 @@ func (ec *executionContext) _Task_blocked(ctx context.Context, field graphql.Col
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_buildId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_hasVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_hasVersion_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query_version(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_version(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildId, nil
+ return ec.resolvers.Query().Version(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -30047,65 +38463,196 @@ func (ec *executionContext) _Task_buildId(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIVersion)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_buildVariant(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_version_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query___type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildVariant, nil
+ return ec.introspectType(fc.Args["name"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*introspection.Type)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query___schema(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().BuildVariantDisplayName(rctx, obj)
+ return ec.introspectSchema()
})
if err != nil {
ec.Error(ctx, err)
@@ -30114,30 +38661,53 @@ func (ec *executionContext) _Task_buildVariantDisplayName(ctx context.Context, f
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*introspection.Schema)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalO__Schema2ágithubácomá99designságqlgenágraphqláintrospectionáSchema(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canAbort(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "description":
+ return ec.fieldContext___Schema_description(ctx, field)
+ case "types":
+ return ec.fieldContext___Schema_types(ctx, field)
+ case "queryType":
+ return ec.fieldContext___Schema_queryType(ctx, field)
+ case "mutationType":
+ return ec.fieldContext___Schema_mutationType(ctx, field)
+ case "subscriptionType":
+ return ec.fieldContext___Schema_subscriptionType(ctx, field)
+ case "directives":
+ return ec.fieldContext___Schema_directives(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoCommitQueueParams_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoCommitQueueParams_enabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanAbort(rctx, obj)
+ return obj.Enabled, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -30149,30 +38719,39 @@ func (ec *executionContext) _Task_canAbort(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canModifyAnnotation(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoCommitQueueParams_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoCommitQueueParams",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoCommitQueueParams_mergeMethod(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoCommitQueueParams_mergeMethod(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanModifyAnnotation(rctx, obj)
+ return obj.MergeMethod, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -30184,30 +38763,39 @@ func (ec *executionContext) _Task_canModifyAnnotation(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canRestart(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoCommitQueueParams_mergeMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoCommitQueueParams",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoCommitQueueParams_message(ctx context.Context, field graphql.CollectedField, obj *model.APICommitQueueParams) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoCommitQueueParams_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanRestart(rctx, obj)
+ return obj.Message, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -30219,30 +38807,39 @@ func (ec *executionContext) _Task_canRestart(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canSchedule(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoCommitQueueParams_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoCommitQueueParams",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_id(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanSchedule(rctx, obj)
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -30254,30 +38851,59 @@ func (ec *executionContext) _Task_canSchedule(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canSetPriority(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_admins(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_admins(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanSetPriority(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Admins, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30289,30 +38915,59 @@ func (ec *executionContext) _Task_canSetPriority(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canSync(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_admins(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_batchTime(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_batchTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.CanSync, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BatchTime, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(int); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be int`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30324,30 +38979,39 @@ func (ec *executionContext) _Task_canSync(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canUnschedule(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_batchTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_branch(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_branch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanUnschedule(rctx, obj)
+ return obj.Branch, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -30359,126 +39023,139 @@ func (ec *executionContext) _Task_canUnschedule(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_createTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_branch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.CreateTime, nil
- })
+func (ec *executionContext) _RepoRef_buildBaronSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_buildBaronSettings(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
- fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_details(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Details, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BuildBaronSettings, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APIBuildBaronSettings); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APIBuildBaronSettings`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(model.ApiTaskEndDetail)
+ res := resTmp.(model.APIBuildBaronSettings)
fc.Result = res
- return ec.marshalOTaskEndDetail2githubácomáevergreenáciáevergreenárestámodeláApiTaskEndDetail(ctx, field.Selections, res)
+ return ec.marshalNBuildBaronSettings2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_dispatchTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_buildBaronSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "bfSuggestionFeaturesURL":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionFeaturesURL(ctx, field)
+ case "bfSuggestionPassword":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionPassword(ctx, field)
+ case "bfSuggestionServer":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionServer(ctx, field)
+ case "bfSuggestionTimeoutSecs":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionTimeoutSecs(ctx, field)
+ case "bfSuggestionUsername":
+ return ec.fieldContext_BuildBaronSettings_bfSuggestionUsername(ctx, field)
+ case "ticketCreateProject":
+ return ec.fieldContext_BuildBaronSettings_ticketCreateProject(ctx, field)
+ case "ticketSearchProjects":
+ return ec.fieldContext_BuildBaronSettings_ticketSearchProjects(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BuildBaronSettings", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DispatchTime, nil
- })
+func (ec *executionContext) _RepoRef_commitQueue(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_commitQueue(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
- fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CommitQueue, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APICommitQueueParams); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APICommitQueueParams`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30490,62 +39167,67 @@ func (ec *executionContext) _Task_displayName(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APICommitQueueParams)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNRepoCommitQueueParams2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_displayOnly(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_commitQueue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "enabled":
+ return ec.fieldContext_RepoCommitQueueParams_enabled(ctx, field)
+ case "mergeMethod":
+ return ec.fieldContext_RepoCommitQueueParams_mergeMethod(ctx, field)
+ case "message":
+ return ec.fieldContext_RepoCommitQueueParams_message(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoCommitQueueParams", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DisplayOnly, nil
- })
+func (ec *executionContext) _RepoRef_containerSizeDefinitions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_containerSizeDefinitions(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(bool)
- fc.Result = res
- return ec.marshalOBoolean2bool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_displayTask(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().DisplayTask(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ContainerSizeDefinitions, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIContainerResources); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIContainerResources`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30554,30 +39236,67 @@ func (ec *executionContext) _Task_displayTask(ctx context.Context, field graphql
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.([]model.APIContainerResources)
fc.Result = res
- return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalOContainerResources2ágithubácomáevergreenáciáevergreenárestámodeláAPIContainerResourcesá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_distroId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_containerSizeDefinitions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_ContainerResources_name(ctx, field)
+ case "cpu":
+ return ec.fieldContext_ContainerResources_cpu(ctx, field)
+ case "memoryMb":
+ return ec.fieldContext_ContainerResources_memoryMb(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ContainerResources", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_deactivatePrevious(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_deactivatePrevious(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DistroId, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeactivatePrevious, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30589,62 +39308,59 @@ func (ec *executionContext) _Task_distroId(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_estimatedStart(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_deactivatePrevious(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().EstimatedStart(rctx, obj)
- })
+func (ec *executionContext) _RepoRef_disabledStatsCache(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_disabledStatsCache(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIDuration)
- fc.Result = res
- return ec.marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_execution(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Execution, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DisabledStatsCache, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30656,126 +39372,103 @@ func (ec *executionContext) _Task_execution(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_executionTasks(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_disabledStatsCache(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ExecutionTasks, nil
- })
+func (ec *executionContext) _RepoRef_dispatchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_dispatchingDisabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*string)
- fc.Result = res
- return ec.marshalOString2áástringá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_executionTasksFull(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().ExecutionTasksFull(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DispatchingDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*model.APITask)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_expectedDuration(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_dispatchingDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ExpectedDuration, nil
- })
+func (ec *executionContext) _RepoRef_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_displayName(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APIDuration)
- fc.Result = res
- return ec.marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_failedTestCount(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().FailedTestCount(rctx, obj)
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -30787,94 +39480,167 @@ func (ec *executionContext) _Task_failedTestCount(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_finishTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_enabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_enabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FinishTime, nil
+ return obj.Enabled, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_generatedBy(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_githubChecksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_githubChecksEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.GeneratedBy, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GithubChecksEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_generatedByName(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_githubChecksEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_githubTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_githubTriggerAliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().GeneratedByName(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GithubTriggerAliases, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30883,30 +39649,59 @@ func (ec *executionContext) _Task_generatedByName(ctx context.Context, field gra
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_generateTask(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_githubTriggerAliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_gitTagAuthorizedTeams(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_gitTagAuthorizedTeams(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.GenerateTask, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitTagAuthorizedTeams, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30915,30 +39710,59 @@ func (ec *executionContext) _Task_generateTask(ctx context.Context, field graphq
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_hostId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_gitTagAuthorizedTeams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_gitTagAuthorizedUsers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_gitTagAuthorizedUsers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.HostId, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitTagAuthorizedUsers, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []*string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30947,30 +39771,59 @@ func (ec *executionContext) _Task_hostId(ctx context.Context, field graphql.Coll
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_id(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_gitTagAuthorizedUsers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_gitTagVersionsEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_gitTagVersionsEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitTagVersionsEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -30982,62 +39835,123 @@ func (ec *executionContext) _Task_id(ctx context.Context, field graphql.Collecte
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_ingestTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_gitTagVersionsEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_manualPrTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_manualPrTestingEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.IngestTime, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ManualPRTestingEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_isPerfPluginEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_manualPrTestingEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_notifyOnBuildFailure(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_notifyOnBuildFailure(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().IsPerfPluginEnabled(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.NotifyOnBuildFailure, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31049,30 +39963,39 @@ func (ec *executionContext) _Task_isPerfPluginEnabled(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_latestExecution(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_notifyOnBuildFailure(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_owner(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_owner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().LatestExecution(rctx, obj)
+ return obj.Owner, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -31084,65 +40007,59 @@ func (ec *executionContext) _Task_latestExecution(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_logs(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Logs, nil
- })
+func (ec *executionContext) _RepoRef_patchingDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_patchingDisabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(model.LogLinks)
- fc.Result = res
- return ec.marshalNTaskLogLinks2githubácomáevergreenáciáevergreenárestámodeláLogLinks(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_minQueuePosition(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().MinQueuePosition(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PatchingDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31154,30 +40071,59 @@ func (ec *executionContext) _Task_minQueuePosition(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_patch(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_patchingDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_patchTriggerAliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_patchTriggerAliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().Patch(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PatchTriggerAliases, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIPatchTriggerDefinition); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIPatchTriggerDefinition`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31186,94 +40132,139 @@ func (ec *executionContext) _Task_patch(ctx context.Context, field graphql.Colle
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIPatch)
+ res := resTmp.([]model.APIPatchTriggerDefinition)
fc.Result = res
- return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
+ return ec.marshalOPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_patchNumber(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_patchTriggerAliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "alias":
+ return ec.fieldContext_PatchTriggerAlias_alias(ctx, field)
+ case "childProjectId":
+ return ec.fieldContext_PatchTriggerAlias_childProjectId(ctx, field)
+ case "childProjectIdentifier":
+ return ec.fieldContext_PatchTriggerAlias_childProjectIdentifier(ctx, field)
+ case "parentAsModule":
+ return ec.fieldContext_PatchTriggerAlias_parentAsModule(ctx, field)
+ case "status":
+ return ec.fieldContext_PatchTriggerAlias_status(ctx, field)
+ case "taskSpecifiers":
+ return ec.fieldContext_PatchTriggerAlias_taskSpecifiers(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_PatchTriggerAlias_variantsTasks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PatchTriggerAlias", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_perfEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_perfEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().PatchNumber(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PerfEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_priority(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_perfEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Priority, nil
- })
+func (ec *executionContext) _RepoRef_periodicBuilds(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_periodicBuilds(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(int64)
- fc.Result = res
- return ec.marshalOInt2int64(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_project(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().Project(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PeriodicBuilds, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIPeriodicBuildDefinition); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIPeriodicBuildDefinition`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31282,30 +40273,53 @@ func (ec *executionContext) _Task_project(ctx context.Context, field graphql.Col
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
+ res := resTmp.([]model.APIPeriodicBuildDefinition)
fc.Result = res
- return ec.marshalOProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+ return ec.marshalOPeriodicBuild2ágithubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_projectId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_periodicBuilds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_PeriodicBuild_id(ctx, field)
+ case "alias":
+ return ec.fieldContext_PeriodicBuild_alias(ctx, field)
+ case "configFile":
+ return ec.fieldContext_PeriodicBuild_configFile(ctx, field)
+ case "intervalHours":
+ return ec.fieldContext_PeriodicBuild_intervalHours(ctx, field)
+ case "message":
+ return ec.fieldContext_PeriodicBuild_message(ctx, field)
+ case "nextRunTime":
+ return ec.fieldContext_PeriodicBuild_nextRunTime(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PeriodicBuild", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_private(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_private(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProjectId, nil
+ return obj.Private, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -31317,94 +40331,123 @@ func (ec *executionContext) _Task_projectId(ctx context.Context, field graphql.C
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_projectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_private(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().ProjectIdentifier(rctx, obj)
- })
+func (ec *executionContext) _RepoRef_prTestingEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_prTestingEnabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_dependsOn(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().DependsOn(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PRTestingEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]*Dependency)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalODependency2áágithubácomáevergreenáciáevergreenágraphqláDependencyá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_canOverrideDependencies(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_prTestingEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_remotePath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_remotePath(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().CanOverrideDependencies(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RemotePath, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*string); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31416,30 +40459,39 @@ func (ec *executionContext) _Task_canOverrideDependencies(ctx context.Context, f
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_requester(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_remotePath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_repo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Requester, nil
+ return obj.Repo, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -31456,185 +40508,142 @@ func (ec *executionContext) _Task_requester(ctx context.Context, field graphql.C
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_revision(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Revision, nil
- })
+func (ec *executionContext) _RepoRef_repotrackerDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_repotrackerDisabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_scheduledTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ScheduledTime, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.RepotrackerDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_containerAllocatedTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_repotrackerDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ContainerAllocatedTime, nil
- })
+func (ec *executionContext) _RepoRef_restricted(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_restricted(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*time.Time)
- fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_spawnHostLink(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().SpawnHostLink(rctx, obj)
+ return obj.Restricted, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_startTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_restricted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.StartTime, nil
- })
+func (ec *executionContext) _RepoRef_spawnHostScriptPath(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_spawnHostScriptPath(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
- fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_status(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().Status(rctx, obj)
+ return obj.SpawnHostScriptPath, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -31646,126 +40655,123 @@ func (ec *executionContext) _Task_status(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_taskGroup(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_spawnHostScriptPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_stepbackDisabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_stepbackDisabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.TaskGroup, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_taskGroupMaxHosts(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.TaskGroupMaxHosts, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.StepbackDisabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_timeTaken(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_stepbackDisabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.TimeTaken, nil
- })
+func (ec *executionContext) _RepoRef_taskAnnotationSettings(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_taskAnnotationSettings(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(model.APIDuration)
- fc.Result = res
- return ec.marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Task_totalTestCount(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().TotalTestCount(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TaskAnnotationSettings, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APITaskAnnotationSettings); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APITaskAnnotationSettings`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31777,30 +40783,65 @@ func (ec *executionContext) _Task_totalTestCount(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(model.APITaskAnnotationSettings)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNTaskAnnotationSettings2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_versionMetadata(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoRef_taskAnnotationSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "fileTicketWebhook":
+ return ec.fieldContext_TaskAnnotationSettings_fileTicketWebhook(ctx, field)
+ case "jiraCustomFields":
+ return ec.fieldContext_TaskAnnotationSettings_jiraCustomFields(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskAnnotationSettings", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoRef_taskSync(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_taskSync(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Task",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Task().VersionMetadata(rctx, obj)
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TaskSync, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APITaskSyncOptions); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APITaskSyncOptions`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31812,30 +40853,65 @@ func (ec *executionContext) _Task_versionMetadata(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.(model.APITaskSyncOptions)
fc.Result = res
- return ec.marshalNVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalNRepoTaskSyncOptions2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, field.Selections, res)
}
-func (ec *executionContext) _Task_order(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Task",
+func (ec *executionContext) fieldContext_RepoRef_taskSync(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "configEnabled":
+ return ec.fieldContext_RepoTaskSyncOptions_configEnabled(ctx, field)
+ case "patchEnabled":
+ return ec.fieldContext_RepoTaskSyncOptions_patchEnabled(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoTaskSyncOptions", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_tracksPushEvents(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_tracksPushEvents(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Order, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TracksPushEvents, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31847,62 +40923,59 @@ func (ec *executionContext) _Task_order(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskAnnotationSettings_jiraCustomFields(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotationSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskAnnotationSettings",
+func (ec *executionContext) fieldContext_RepoRef_tracksPushEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.JiraCustomFields, nil
- })
+func (ec *executionContext) _RepoRef_triggers(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_triggers(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIJiraField)
- fc.Result = res
- return ec.marshalOJiraField2ágithubácomáevergreenáciáevergreenárestámodeláAPIJiraFieldá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskAnnotationSettings_fileTicketWebhook(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotationSettings) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskAnnotationSettings",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.FileTicketWebhook, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Triggers, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APITriggerDefinition); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APITriggerDefinition`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31914,30 +40987,77 @@ func (ec *executionContext) _TaskAnnotationSettings_fileTicketWebhook(ctx contex
}
return graphql.Null
}
- res := resTmp.(model.APIWebHook)
+ res := resTmp.([]model.APITriggerDefinition)
fc.Result = res
- return ec.marshalNWebhook2githubácomáevergreenáciáevergreenárestámodeláAPIWebHook(ctx, field.Selections, res)
+ return ec.marshalNTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEndDetail_status(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEndDetail",
+func (ec *executionContext) fieldContext_RepoRef_triggers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "alias":
+ return ec.fieldContext_TriggerAlias_alias(ctx, field)
+ case "buildVariantRegex":
+ return ec.fieldContext_TriggerAlias_buildVariantRegex(ctx, field)
+ case "configFile":
+ return ec.fieldContext_TriggerAlias_configFile(ctx, field)
+ case "dateCutoff":
+ return ec.fieldContext_TriggerAlias_dateCutoff(ctx, field)
+ case "level":
+ return ec.fieldContext_TriggerAlias_level(ctx, field)
+ case "project":
+ return ec.fieldContext_TriggerAlias_project(ctx, field)
+ case "status":
+ return ec.fieldContext_TriggerAlias_status(ctx, field)
+ case "taskRegex":
+ return ec.fieldContext_TriggerAlias_taskRegex(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TriggerAlias", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_versionControlEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_versionControlEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.VersionControlEnabled, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(*bool); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31949,30 +41069,59 @@ func (ec *executionContext) _TaskEndDetail_status(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEndDetail_type(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEndDetail",
+func (ec *executionContext) fieldContext_RepoRef_versionControlEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoRef_workstationConfig(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_workstationConfig(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.WorkstationConfig, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.(model.APIWorkstationConfig); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/evergreen-ci/evergreen/rest/model.APIWorkstationConfig`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -31984,62 +41133,65 @@ func (ec *executionContext) _TaskEndDetail_type(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIWorkstationConfig)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNRepoWorkstationConfig2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEndDetail_description(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEndDetail",
+func (ec *executionContext) fieldContext_RepoRef_workstationConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "gitClone":
+ return ec.fieldContext_RepoWorkstationConfig_gitClone(ctx, field)
+ case "setupCommands":
+ return ec.fieldContext_RepoWorkstationConfig_setupCommands(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoWorkstationConfig", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
- })
+func (ec *executionContext) _RepoRef_externalLinks(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectRef) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoRef_externalLinks(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskEndDetail_timedOut(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEndDetail",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.TimedOut, nil
+ directive0 := func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ExternalLinks, nil
+ }
+ directive1 := func(ctx context.Context) (interface{}, error) {
+ if ec.directives.RequireProjectFieldAccess == nil {
+ return nil, errors.New("directive requireProjectFieldAccess is not implemented")
+ }
+ return ec.directives.RequireProjectFieldAccess(ctx, obj, directive0)
+ }
+
+ tmp, err := directive1(rctx)
+ if err != nil {
+ return nil, graphql.ErrorOnPath(ctx, err)
+ }
+ if tmp == nil {
+ return nil, nil
+ }
+ if data, ok := tmp.([]model.APIExternalLink); ok {
+ return data, nil
+ }
+ return nil, fmt.Errorf(`unexpected type %T from directive, should be []github.com/evergreen-ci/evergreen/rest/model.APIExternalLink`, tmp)
})
if err != nil {
ec.Error(ctx, err)
@@ -32048,30 +41200,45 @@ func (ec *executionContext) _TaskEndDetail_timedOut(ctx context.Context, field g
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]model.APIExternalLink)
fc.Result = res
- return ec.marshalOBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOExternalLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIExternalLinká(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEndDetail_timeoutType(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEndDetail",
+func (ec *executionContext) fieldContext_RepoRef_externalLinks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoRef",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayName":
+ return ec.fieldContext_ExternalLink_displayName(ctx, field)
+ case "urlTemplate":
+ return ec.fieldContext_ExternalLink_urlTemplate(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ExternalLink", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _RepoSettings_aliases(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoSettings_aliases(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TimeoutType, nil
+ return ec.resolvers.RepoSettings().Aliases(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -32080,30 +41247,57 @@ func (ec *executionContext) _TaskEndDetail_timeoutType(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APIProjectAlias)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOProjectAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEndDetail_oomTracker(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoSettings_aliases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectAlias_id(ctx, field)
+ case "alias":
+ return ec.fieldContext_ProjectAlias_alias(ctx, field)
+ case "gitTag":
+ return ec.fieldContext_ProjectAlias_gitTag(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_ProjectAlias_remotePath(ctx, field)
+ case "task":
+ return ec.fieldContext_ProjectAlias_task(ctx, field)
+ case "taskTags":
+ return ec.fieldContext_ProjectAlias_taskTags(ctx, field)
+ case "variant":
+ return ec.fieldContext_ProjectAlias_variant(ctx, field)
+ case "variantTags":
+ return ec.fieldContext_ProjectAlias_variantTags(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectAlias", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoSettings_githubWebhooksEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEndDetail",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.OOMTracker, nil
+ return ec.resolvers.RepoSettings().GithubWebhooksEnabled(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -32115,30 +41309,39 @@ func (ec *executionContext) _TaskEndDetail_oomTracker(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(model.APIOomTrackerInfo)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNOomTrackerInfo2githubácomáevergreenáciáevergreenárestámodeláAPIOomTrackerInfo(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogData_hostId(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoSettings_githubWebhooksEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoSettings_projectRef(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoSettings_projectRef(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HostId, nil
+ return obj.ProjectRef, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32147,30 +41350,119 @@ func (ec *executionContext) _TaskEventLogData_hostId(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIProjectRef)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalORepoRef2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogData_jiraIssue(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
+func (ec *executionContext) fieldContext_RepoSettings_projectRef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.JiraIssue, nil
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_RepoRef_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_RepoRef_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_RepoRef_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_RepoRef_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_RepoRef_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_RepoRef_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_RepoRef_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_RepoRef_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_RepoRef_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_RepoRef_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_RepoRef_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_RepoRef_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_RepoRef_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_RepoRef_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_RepoRef_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_RepoRef_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_RepoRef_gitTagVersionsEnabled(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_RepoRef_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_RepoRef_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_RepoRef_owner(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_RepoRef_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_RepoRef_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_RepoRef_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_RepoRef_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_RepoRef_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_RepoRef_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_RepoRef_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_RepoRef_repo(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_RepoRef_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_RepoRef_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_RepoRef_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_RepoRef_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_RepoRef_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_RepoRef_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_RepoRef_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_RepoRef_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_RepoRef_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_RepoRef_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_RepoRef_externalLinks(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type RepoRef", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoSettings_projectSubscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoSettings_projectSubscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.RepoSettings().ProjectSubscriptions(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -32179,30 +41471,57 @@ func (ec *executionContext) _TaskEventLogData_jiraIssue(ctx context.Context, fie
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APISubscription)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogData_jiraLink(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoSettings_projectSubscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSubscription", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoSettings_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoSettings_subscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.JiraLink, nil
+ return ec.resolvers.RepoSettings().Subscriptions(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -32211,62 +41530,57 @@ func (ec *executionContext) _TaskEventLogData_jiraLink(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APISubscription)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOProjectSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogData_priority(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
+func (ec *executionContext) fieldContext_RepoSettings_subscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoSettings",
Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_ProjectSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_ProjectSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_ProjectSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_ProjectSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_ProjectSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_ProjectSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_ProjectSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_ProjectSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectSubscription", field.Name)
+ },
+ }
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Priority, nil
- })
+func (ec *executionContext) _RepoSettings_vars(ctx context.Context, field graphql.CollectedField, obj *model.APIProjectSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoSettings_vars(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(int64)
- fc.Result = res
- return ec.marshalOInt2int64(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskEventLogData_status(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return ec.resolvers.RepoSettings().Vars(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -32275,94 +41589,91 @@ func (ec *executionContext) _TaskEventLogData_status(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APIProjectVars)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOProjectVars2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogData_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_RepoSettings_vars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoSettings",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "adminOnlyVars":
+ return ec.fieldContext_ProjectVars_adminOnlyVars(ctx, field)
+ case "privateVars":
+ return ec.fieldContext_ProjectVars_privateVars(ctx, field)
+ case "vars":
+ return ec.fieldContext_ProjectVars_vars(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ProjectVars", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _RepoTaskSyncOptions_configEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoTaskSyncOptions_configEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Timestamp, nil
+ return obj.ConfigEnabled, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogData_userId(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogData",
+func (ec *executionContext) fieldContext_RepoTaskSyncOptions_configEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoTaskSyncOptions",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.UserId, nil
- })
+func (ec *executionContext) _RepoTaskSyncOptions_patchEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoTaskSyncOptions_patchEnabled(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskEventLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.PatchEnabled, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32374,65 +41685,39 @@ func (ec *executionContext) _TaskEventLogEntry_id(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
+func (ec *executionContext) fieldContext_RepoTaskSyncOptions_patchEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoTaskSyncOptions",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ResourceType, nil
- })
+func (ec *executionContext) _RepoWorkstationConfig_gitClone(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoWorkstationConfig_gitClone(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProcessedAt, nil
+ return obj.GitClone, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32444,62 +41729,39 @@ func (ec *executionContext) _TaskEventLogEntry_processedAt(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
+func (ec *executionContext) fieldContext_RepoWorkstationConfig_gitClone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoWorkstationConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Timestamp, nil
- })
+func (ec *executionContext) _RepoWorkstationConfig_setupCommands(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_RepoWorkstationConfig_setupCommands(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
- fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EventType, nil
+ return obj.SetupCommands, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32508,30 +41770,45 @@ func (ec *executionContext) _TaskEventLogEntry_eventType(ctx context.Context, fi
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]model.APIWorkstationSetupCommand)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOWorkstationSetupCommand2ágithubácomáevergreenáciáevergreenárestámodeláAPIWorkstationSetupCommandá(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
+func (ec *executionContext) fieldContext_RepoWorkstationConfig_setupCommands(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "RepoWorkstationConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "command":
+ return ec.fieldContext_WorkstationSetupCommand_command(ctx, field)
+ case "directory":
+ return ec.fieldContext_WorkstationSetupCommand_directory(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WorkstationSetupCommand", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SearchReturnInfo_featuresURL(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SearchReturnInfo_featuresURL(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Data, nil
+ return obj.FeaturesURL, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32543,30 +41820,39 @@ func (ec *executionContext) _TaskEventLogEntry_data(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(*model.TaskEventData)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNTaskEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláTaskEventData(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskEventLogEntry",
+func (ec *executionContext) fieldContext_SearchReturnInfo_featuresURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SearchReturnInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SearchReturnInfo_issues(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SearchReturnInfo_issues(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ResourceId, nil
+ return obj.Issues, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32578,30 +41864,45 @@ func (ec *executionContext) _TaskEventLogEntry_resourceId(ctx context.Context, f
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]thirdparty.JiraTicket)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNJiraTicket2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicketá(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskFiles_fileCount(ctx context.Context, field graphql.CollectedField, obj *TaskFiles) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskFiles",
+func (ec *executionContext) fieldContext_SearchReturnInfo_issues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SearchReturnInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "fields":
+ return ec.fieldContext_JiraTicket_fields(ctx, field)
+ case "key":
+ return ec.fieldContext_JiraTicket_key(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraTicket", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SearchReturnInfo_search(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SearchReturnInfo_search(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FileCount, nil
+ return obj.Search, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32613,30 +41914,39 @@ func (ec *executionContext) _TaskFiles_fileCount(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskFiles_groupedFiles(ctx context.Context, field graphql.CollectedField, obj *TaskFiles) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskFiles",
+func (ec *executionContext) fieldContext_SearchReturnInfo_search(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SearchReturnInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SearchReturnInfo_source(ctx context.Context, field graphql.CollectedField, obj *thirdparty.SearchReturnInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SearchReturnInfo_source(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GroupedFiles, nil
+ return obj.Source, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32648,158 +41958,127 @@ func (ec *executionContext) _TaskFiles_groupedFiles(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.([]*GroupedFiles)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNGroupedFiles2áágithubácomáevergreenáciáevergreenágraphqláGroupedFilesá(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskInfo_id(ctx context.Context, field graphql.CollectedField, obj *model.TaskInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskInfo",
+func (ec *executionContext) fieldContext_SearchReturnInfo_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SearchReturnInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
- })
+func (ec *executionContext) _Selector_data(ctx context.Context, field graphql.CollectedField, obj *model.APISelector) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Selector_data(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOID2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskInfo_name(ctx context.Context, field graphql.CollectedField, obj *model.TaskInfo) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.Data, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogLinks_allLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogLinks",
+func (ec *executionContext) fieldContext_Selector_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Selector",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.AllLogLink, nil
- })
+func (ec *executionContext) _Selector_type(ctx context.Context, field graphql.CollectedField, obj *model.APISelector) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Selector_type(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskLogLinks_agentLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskLogLinks",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.AgentLogLink, nil
+ return obj.Type, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogLinks_systemLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogLinks",
+func (ec *executionContext) fieldContext_Selector_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Selector",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SlackConfig_name(ctx context.Context, field graphql.CollectedField, obj *model.APISlackConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SlackConfig_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SystemLogLink, nil
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32813,89 +42092,122 @@ func (ec *executionContext) _TaskLogLinks_systemLogLink(ctx context.Context, fie
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogLinks_taskLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogLinks",
+func (ec *executionContext) fieldContext_SlackConfig_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SlackConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Source_author(ctx context.Context, field graphql.CollectedField, obj *model.APISource) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Source_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskLogLink, nil
+ return obj.Author, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogLinks_eventLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogLinks",
+func (ec *executionContext) fieldContext_Source_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Source",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Source_requester(ctx context.Context, field graphql.CollectedField, obj *model.APISource) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Source_requester(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EventLogLink, nil
+ return obj.Requester, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_taskId(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
+func (ec *executionContext) fieldContext_Source_requester(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Source",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Source_time(ctx context.Context, field graphql.CollectedField, obj *model.APISource) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Source_time(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskID, nil
+ return obj.Time, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32907,30 +42219,39 @@ func (ec *executionContext) _TaskLogs_taskId(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_execution(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
+func (ec *executionContext) fieldContext_Source_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Source",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SpawnHostConfig_spawnHostsPerUser(ctx context.Context, field graphql.CollectedField, obj *model.APISpawnHostConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpawnHostConfig_spawnHostsPerUser(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Execution, nil
+ return obj.SpawnHostsPerUser, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32942,30 +42263,39 @@ func (ec *executionContext) _TaskLogs_execution(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_defaultLogger(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
+func (ec *executionContext) fieldContext_SpawnHostConfig_spawnHostsPerUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpawnHostConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SpawnHostConfig_unexpirableHostsPerUser(ctx context.Context, field graphql.CollectedField, obj *model.APISpawnHostConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpawnHostConfig_unexpirableHostsPerUser(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DefaultLogger, nil
+ return obj.UnexpirableHostsPerUser, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -32977,30 +42307,39 @@ func (ec *executionContext) _TaskLogs_defaultLogger(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_eventLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_SpawnHostConfig_unexpirableHostsPerUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpawnHostConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SpawnHostConfig_unexpirableVolumesPerUser(ctx context.Context, field graphql.CollectedField, obj *model.APISpawnHostConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpawnHostConfig_unexpirableVolumesPerUser(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TaskLogs().EventLogs(rctx, obj)
+ return obj.UnexpirableVolumesPerUser, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33012,100 +42351,121 @@ func (ec *executionContext) _TaskLogs_eventLogs(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.([]*model.TaskAPIEventLogEntry)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNTaskEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláTaskAPIEventLogEntryá(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_taskLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_SpawnHostConfig_unexpirableVolumesPerUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpawnHostConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SpruceConfig_banner(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_banner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TaskLogs().TaskLogs(rctx, obj)
+ return obj.Banner, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*apimodels.LogMessage)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_systemLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_SpruceConfig_banner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SpruceConfig_bannerTheme(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_bannerTheme(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TaskLogs().SystemLogs(rctx, obj)
+ return obj.BannerTheme, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*apimodels.LogMessage)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_agentLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_SpruceConfig_bannerTheme(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SpruceConfig_githubOrgs(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_githubOrgs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TaskLogs().AgentLogs(rctx, obj)
+ return obj.GithubOrgs, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33117,100 +42477,129 @@ func (ec *executionContext) _TaskLogs_agentLogs(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.([]*apimodels.LogMessage)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskLogs_allLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_SpruceConfig_githubOrgs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SpruceConfig_jira(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_jira(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskLogs",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TaskLogs().AllLogs(rctx, obj)
+ return obj.Jira, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*apimodels.LogMessage)
+ res := resTmp.(*model.APIJiraConfig)
fc.Result = res
- return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
+ return ec.marshalOJiraConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIJiraConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueDistro_id(ctx context.Context, field graphql.CollectedField, obj *TaskQueueDistro) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueDistro",
+func (ec *executionContext) fieldContext_SpruceConfig_jira(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "host":
+ return ec.fieldContext_JiraConfig_host(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SpruceConfig_providers(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_providers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.Providers, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APICloudProviders)
fc.Result = res
- return ec.marshalNID2string(ctx, field.Selections, res)
+ return ec.marshalOCloudProviderConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPICloudProviders(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueDistro_taskCount(ctx context.Context, field graphql.CollectedField, obj *TaskQueueDistro) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueDistro",
+func (ec *executionContext) fieldContext_SpruceConfig_providers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "aws":
+ return ec.fieldContext_CloudProviderConfig_aws(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CloudProviderConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SpruceConfig_spawnHost(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_spawnHost(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskCount, nil
+ return obj.Spawnhost, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33222,100 +42611,139 @@ func (ec *executionContext) _TaskQueueDistro_taskCount(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*model.APISpawnHostConfig)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNSpawnHostConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPISpawnHostConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueDistro_hostCount(ctx context.Context, field graphql.CollectedField, obj *TaskQueueDistro) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueDistro",
+func (ec *executionContext) fieldContext_SpruceConfig_spawnHost(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "spawnHostsPerUser":
+ return ec.fieldContext_SpawnHostConfig_spawnHostsPerUser(ctx, field)
+ case "unexpirableHostsPerUser":
+ return ec.fieldContext_SpawnHostConfig_unexpirableHostsPerUser(ctx, field)
+ case "unexpirableVolumesPerUser":
+ return ec.fieldContext_SpawnHostConfig_unexpirableVolumesPerUser(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SpawnHostConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SpruceConfig_ui(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_ui(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HostCount, nil
+ return obj.Ui, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*model.APIUIConfig)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalOUIConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIUIConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_id(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_SpruceConfig_ui(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "defaultProject":
+ return ec.fieldContext_UIConfig_defaultProject(ctx, field)
+ case "userVoice":
+ return ec.fieldContext_UIConfig_userVoice(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type UIConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SpruceConfig_slack(ctx context.Context, field graphql.CollectedField, obj *model.APIAdminSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SpruceConfig_slack(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return obj.Slack, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APISlackConfig)
fc.Result = res
- return ec.marshalNID2ástring(ctx, field.Selections, res)
+ return ec.marshalOSlackConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPISlackConfig(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_SpruceConfig_slack(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SpruceConfig",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_SlackConfig_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SlackConfig", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _StatusCount_count(ctx context.Context, field graphql.CollectedField, obj *task.StatusCount) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_StatusCount_count(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return obj.Count, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33327,30 +42755,39 @@ func (ec *executionContext) _TaskQueueItem_displayName(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_project(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_StatusCount_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "StatusCount",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _StatusCount_status(ctx context.Context, field graphql.CollectedField, obj *task.StatusCount) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_StatusCount_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Project, nil
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33362,345 +42799,364 @@ func (ec *executionContext) _TaskQueueItem_project(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_buildVariant(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_StatusCount_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "StatusCount",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Subscriber_emailSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_emailSubscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildVariant, nil
+ return obj.EmailSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_expectedDuration(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_Subscriber_emailSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Subscriber_githubCheckSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_githubCheckSubscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ExpectedDuration, nil
+ return obj.GithubCheckSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(model.APIDuration)
+ res := resTmp.(*model.APIGithubCheckSubscriber)
fc.Result = res
- return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalOGithubCheckSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubCheckSubscriber(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_priority(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_Subscriber_githubCheckSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "owner":
+ return ec.fieldContext_GithubCheckSubscriber_owner(ctx, field)
+ case "ref":
+ return ec.fieldContext_GithubCheckSubscriber_ref(ctx, field)
+ case "repo":
+ return ec.fieldContext_GithubCheckSubscriber_repo(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GithubCheckSubscriber", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Subscriber_githubPRSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_githubPRSubscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Priority, nil
+ return obj.GithubPRSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(int64)
+ res := resTmp.(*model.APIGithubPRSubscriber)
fc.Result = res
- return ec.marshalNInt2int64(ctx, field.Selections, res)
+ return ec.marshalOGithubPRSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubPRSubscriber(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_revision(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_Subscriber_githubPRSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "owner":
+ return ec.fieldContext_GithubPRSubscriber_owner(ctx, field)
+ case "prNumber":
+ return ec.fieldContext_GithubPRSubscriber_prNumber(ctx, field)
+ case "ref":
+ return ec.fieldContext_GithubPRSubscriber_ref(ctx, field)
+ case "repo":
+ return ec.fieldContext_GithubPRSubscriber_repo(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GithubPRSubscriber", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Subscriber_jiraCommentSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_jiraCommentSubscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Revision, nil
+ return obj.JiraCommentSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_requester(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Subscriber_jiraCommentSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Subscriber_jiraIssueSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_jiraIssueSubscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TaskQueueItem().Requester(rctx, obj)
+ return obj.JiraIssueSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(TaskQueueItemType)
+ res := resTmp.(*model.APIJIRAIssueSubscriber)
fc.Result = res
- return ec.marshalNTaskQueueItemType2githubácomáevergreenáciáevergreenágraphqláTaskQueueItemType(ctx, field.Selections, res)
+ return ec.marshalOJiraIssueSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIJIRAIssueSubscriber(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskQueueItem_version(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskQueueItem",
+func (ec *executionContext) fieldContext_Subscriber_jiraIssueSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "issueType":
+ return ec.fieldContext_JiraIssueSubscriber_issueType(ctx, field)
+ case "project":
+ return ec.fieldContext_JiraIssueSubscriber_project(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraIssueSubscriber", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Subscriber_slackSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_slackSubscriber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Version, nil
+ return obj.SlackSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskResult_id(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
+func (ec *executionContext) fieldContext_Subscriber_slackSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
- })
+func (ec *executionContext) _Subscriber_webhookSubscriber(ctx context.Context, field graphql.CollectedField, obj *Subscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Subscriber_webhookSubscriber(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalNID2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskResult_execution(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Execution, nil
+ return obj.WebhookSubscriber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*model.APIWebhookSubscriber)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalOWebhookSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookSubscriber(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskResult_aborted(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
+func (ec *executionContext) fieldContext_Subscriber_webhookSubscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Subscriber",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "headers":
+ return ec.fieldContext_WebhookSubscriber_headers(ctx, field)
+ case "secret":
+ return ec.fieldContext_WebhookSubscriber_secret(ctx, field)
+ case "url":
+ return ec.fieldContext_WebhookSubscriber_url(ctx, field)
+ case "retries":
+ return ec.fieldContext_WebhookSubscriber_retries(ctx, field)
+ case "minDelayMs":
+ return ec.fieldContext_WebhookSubscriber_minDelayMs(ctx, field)
+ case "timeoutMs":
+ return ec.fieldContext_WebhookSubscriber_timeoutMs(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WebhookSubscriber", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Aborted, nil
- })
+func (ec *executionContext) _SubscriberWrapper_subscriber(ctx context.Context, field graphql.CollectedField, obj *model.APISubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SubscriberWrapper_subscriber(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
- fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskResult_displayName(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return ec.resolvers.SubscriberWrapper().Subscriber(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -33712,30 +43168,55 @@ func (ec *executionContext) _TaskResult_displayName(ctx context.Context, field g
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*Subscriber)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNSubscriber2ágithubácomáevergreenáciáevergreenágraphqláSubscriber(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_SubscriberWrapper_subscriber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SubscriberWrapper",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "emailSubscriber":
+ return ec.fieldContext_Subscriber_emailSubscriber(ctx, field)
+ case "githubCheckSubscriber":
+ return ec.fieldContext_Subscriber_githubCheckSubscriber(ctx, field)
+ case "githubPRSubscriber":
+ return ec.fieldContext_Subscriber_githubPRSubscriber(ctx, field)
+ case "jiraCommentSubscriber":
+ return ec.fieldContext_Subscriber_jiraCommentSubscriber(ctx, field)
+ case "jiraIssueSubscriber":
+ return ec.fieldContext_Subscriber_jiraIssueSubscriber(ctx, field)
+ case "slackSubscriber":
+ return ec.fieldContext_Subscriber_slackSubscriber(ctx, field)
+ case "webhookSubscriber":
+ return ec.fieldContext_Subscriber_webhookSubscriber(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Subscriber", field.Name)
+ },
+ }
+ return fc, nil
}
-func (ec *executionContext) _TaskResult_version(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
+func (ec *executionContext) _SubscriberWrapper_type(ctx context.Context, field graphql.CollectedField, obj *model.APISubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SubscriberWrapper_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Version, nil
+ return obj.Type, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33747,129 +43228,83 @@ func (ec *executionContext) _TaskResult_version(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskResult_status(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
+func (ec *executionContext) fieldContext_SubscriberWrapper_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SubscriberWrapper",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
- })
+func (ec *executionContext) _Task_id(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_id(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskResult_baseStatus(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BaseStatus, nil
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskResult_baseTask(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
+func (ec *executionContext) fieldContext_Task_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.BaseTask, nil
- })
+func (ec *executionContext) _Task_aborted(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_aborted(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*BaseTaskResult)
- fc.Result = res
- return ec.marshalOBaseTaskResult2ágithubácomáevergreenáciáevergreenágraphqláBaseTaskResult(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskResult_buildVariant(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildVariant, nil
+ return obj.Aborted, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33881,65 +43316,94 @@ func (ec *executionContext) _TaskResult_buildVariant(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskResult_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
+func (ec *executionContext) fieldContext_Task_aborted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_abortInfo(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_abortInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildVariantDisplayName, nil
+ return ec.resolvers.Task().AbortInfo(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*AbortInfo)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOAbortInfo2ágithubácomáevergreenáciáevergreenágraphqláAbortInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Task_abortInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "buildVariantDisplayName":
+ return ec.fieldContext_AbortInfo_buildVariantDisplayName(ctx, field)
+ case "newVersion":
+ return ec.fieldContext_AbortInfo_newVersion(ctx, field)
+ case "prClosed":
+ return ec.fieldContext_AbortInfo_prClosed(ctx, field)
+ case "taskDisplayName":
+ return ec.fieldContext_AbortInfo_taskDisplayName(ctx, field)
+ case "taskID":
+ return ec.fieldContext_AbortInfo_taskID(ctx, field)
+ case "user":
+ return ec.fieldContext_AbortInfo_user(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AbortInfo", field.Name)
+ },
+ }
+ return fc, nil
}
-func (ec *executionContext) _TaskResult_blocked(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
+func (ec *executionContext) _Task_activated(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_activated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Blocked, nil
+ return obj.Activated, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -33956,162 +43420,157 @@ func (ec *executionContext) _TaskResult_blocked(ctx context.Context, field graph
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskResult_executionTasksFull(ctx context.Context, field graphql.CollectedField, obj *TaskResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskResult",
+func (ec *executionContext) fieldContext_Task_activated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.ExecutionTasksFull, nil
- })
+func (ec *executionContext) _Task_activatedBy(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_activatedBy(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.([]*model.APITask)
- fc.Result = res
- return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TaskSpecifier_patchAlias(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSpecifier) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskSpecifier",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchAlias, nil
+ return obj.ActivatedBy, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskSpecifier_taskRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSpecifier) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskSpecifier",
+func (ec *executionContext) fieldContext_Task_activatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_activatedTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_activatedTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskRegex, nil
+ return obj.ActivatedTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskSpecifier_variantRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSpecifier) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskSpecifier",
+func (ec *executionContext) fieldContext_Task_activatedTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_ami(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_ami(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.VariantRegex, nil
+ return ec.resolvers.Task().Ami(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskStats_counts(ctx context.Context, field graphql.CollectedField, obj *task.TaskStats) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_ami(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_annotation(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_annotation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskStats",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Counts, nil
+ return ec.resolvers.Task().Annotation(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34120,30 +43579,59 @@ func (ec *executionContext) _TaskStats_counts(ctx context.Context, field graphql
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]task.StatusCount)
+ res := resTmp.(*model.APITaskAnnotation)
fc.Result = res
- return ec.marshalOStatusCount2ágithubácomáevergreenáciáevergreenámodelátaskáStatusCountá(ctx, field.Selections, res)
+ return ec.marshalOAnnotation2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotation(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskStats_eta(ctx context.Context, field graphql.CollectedField, obj *task.TaskStats) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_annotation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Annotation_id(ctx, field)
+ case "createdIssues":
+ return ec.fieldContext_Annotation_createdIssues(ctx, field)
+ case "issues":
+ return ec.fieldContext_Annotation_issues(ctx, field)
+ case "note":
+ return ec.fieldContext_Annotation_note(ctx, field)
+ case "suspectedIssues":
+ return ec.fieldContext_Annotation_suspectedIssues(ctx, field)
+ case "metadataLinks":
+ return ec.fieldContext_Annotation_metadataLinks(ctx, field)
+ case "taskId":
+ return ec.fieldContext_Annotation_taskId(ctx, field)
+ case "taskExecution":
+ return ec.fieldContext_Annotation_taskExecution(ctx, field)
+ case "webhookConfigured":
+ return ec.fieldContext_Annotation_webhookConfigured(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Annotation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_baseStatus(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_baseStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskStats",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ETA, nil
+ return ec.resolvers.Task().BaseStatus(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34152,30 +43640,39 @@ func (ec *executionContext) _TaskStats_eta(ctx context.Context, field graphql.Co
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskSyncOptions_configEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_baseStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_baseTask(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_baseTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskSyncOptions",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ConfigEnabled, nil
+ return ec.resolvers.Task().BaseTask(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34184,62 +43681,227 @@ func (ec *executionContext) _TaskSyncOptions_configEnabled(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskSyncOptions_patchEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_baseTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_blocked(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_blocked(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskSyncOptions",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PatchEnabled, nil
+ return obj.Blocked, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResult_totalTestCount(ctx context.Context, field graphql.CollectedField, obj *TaskTestResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskTestResult",
+func (ec *executionContext) fieldContext_Task_blocked(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_buildId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_buildId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TotalTestCount, nil
+ return obj.BuildId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34251,30 +43913,39 @@ func (ec *executionContext) _TaskTestResult_totalTestCount(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResult_filteredTestCount(ctx context.Context, field graphql.CollectedField, obj *TaskTestResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskTestResult",
+func (ec *executionContext) fieldContext_Task_buildId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_buildVariant(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_buildVariant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FilteredTestCount, nil
+ return obj.BuildVariant, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34286,65 +43957,80 @@ func (ec *executionContext) _TaskTestResult_filteredTestCount(ctx context.Contex
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResult_testResults(ctx context.Context, field graphql.CollectedField, obj *TaskTestResult) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TaskTestResult",
+func (ec *executionContext) fieldContext_Task_buildVariant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TestResults, nil
+ return ec.resolvers.Task().BuildVariantDisplayName(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]*model.APITest)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTestResult2áágithubácomáevergreenáciáevergreenárestámodeláAPITestá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResultSample_taskId(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_buildVariantDisplayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canAbort(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canAbort(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskTestResultSample",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskID, nil
+ return ec.resolvers.Task().CanAbort(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34356,30 +44042,39 @@ func (ec *executionContext) _TaskTestResultSample_taskId(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResultSample_execution(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canAbort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canDisable(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canDisable(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskTestResultSample",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Execution, nil
+ return ec.resolvers.Task().CanDisable(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34391,30 +44086,39 @@ func (ec *executionContext) _TaskTestResultSample_execution(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResultSample_totalTestCount(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canDisable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canModifyAnnotation(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskTestResultSample",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TotalTestCount, nil
+ return ec.resolvers.Task().CanModifyAnnotation(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34426,30 +44130,39 @@ func (ec *executionContext) _TaskTestResultSample_totalTestCount(ctx context.Con
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TaskTestResultSample_matchingFailedTestNames(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canModifyAnnotation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canOverrideDependencies(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TaskTestResultSample",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MatchingFailedTestNames, nil
+ return ec.resolvers.Task().CanOverrideDependencies(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34461,158 +44174,171 @@ func (ec *executionContext) _TaskTestResultSample_matchingFailedTestNames(ctx co
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestLog_url(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestLog",
+func (ec *executionContext) fieldContext_Task_canOverrideDependencies(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.URL, nil
- })
+func (ec *executionContext) _Task_canRestart(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canRestart(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TestLog_urlRaw(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestLog",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.URLRaw, nil
+ return ec.resolvers.Task().CanRestart(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestLog_urlLobster(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canRestart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canSchedule(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canSchedule(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestLog",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.URLLobster, nil
+ return ec.resolvers.Task().CanSchedule(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestLog_lineNum(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canSchedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canSetPriority(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canSetPriority(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestLog",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.LineNum, nil
+ return ec.resolvers.Task().CanSetPriority(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_id(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canSetPriority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_canSync(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canSync(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.CanSync, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34624,62 +44350,39 @@ func (ec *executionContext) _TestResult_id(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_groupID(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_canSync(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.GroupID, nil
- })
+func (ec *executionContext) _Task_canUnschedule(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_canUnschedule(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _TestResult_status(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return ec.resolvers.Task().CanUnschedule(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34691,30 +44394,39 @@ func (ec *executionContext) _TestResult_status(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_baseStatus(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_canUnschedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_containerAllocatedTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BaseStatus, nil
+ return obj.ContainerAllocatedTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34723,100 +44435,133 @@ func (ec *executionContext) _TestResult_baseStatus(ctx context.Context, field gr
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_testFile(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_containerAllocatedTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_createTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_createTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TestFile, nil
+ return obj.CreateTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_logs(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_dependsOn(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_dependsOn(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Logs, nil
+ return ec.resolvers.Task().DependsOn(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(model.TestLogs)
+ res := resTmp.([]*Dependency)
fc.Result = res
- return ec.marshalNTestLog2githubácomáevergreenáciáevergreenárestámodeláTestLogs(ctx, field.Selections, res)
+ return ec.marshalODependency2áágithubácomáevergreenáciáevergreenágraphqláDependencyá(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_exitCode(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_dependsOn(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "buildVariant":
+ return ec.fieldContext_Dependency_buildVariant(ctx, field)
+ case "metStatus":
+ return ec.fieldContext_Dependency_metStatus(ctx, field)
+ case "name":
+ return ec.fieldContext_Dependency_name(ctx, field)
+ case "requiredStatus":
+ return ec.fieldContext_Dependency_requiredStatus(ctx, field)
+ case "taskId":
+ return ec.fieldContext_Dependency_taskId(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Dependency", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_details(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_details(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ExitCode, nil
+ return obj.Details, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34825,30 +44570,53 @@ func (ec *executionContext) _TestResult_exitCode(ctx context.Context, field grap
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(model.ApiTaskEndDetail)
fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
+ return ec.marshalOTaskEndDetail2githubácomáevergreenáciáevergreenárestámodeláApiTaskEndDetail(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_startTime(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_details(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "description":
+ return ec.fieldContext_TaskEndDetail_description(ctx, field)
+ case "oomTracker":
+ return ec.fieldContext_TaskEndDetail_oomTracker(ctx, field)
+ case "status":
+ return ec.fieldContext_TaskEndDetail_status(ctx, field)
+ case "timedOut":
+ return ec.fieldContext_TaskEndDetail_timedOut(ctx, field)
+ case "timeoutType":
+ return ec.fieldContext_TaskEndDetail_timeoutType(ctx, field)
+ case "type":
+ return ec.fieldContext_TaskEndDetail_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskEndDetail", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_dispatchTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_dispatchTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.StartTime, nil
+ return obj.DispatchTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34862,57 +44630,78 @@ func (ec *executionContext) _TestResult_startTime(ctx context.Context, field gra
return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_duration(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_dispatchTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Duration, nil
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(float64)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOFloat2float64(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_endTime(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_displayOnly(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_displayOnly(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EndTime, nil
+ return obj.DisplayOnly, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -34921,30 +44710,39 @@ func (ec *executionContext) _TestResult_endTime(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_taskId(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TestResult",
+func (ec *executionContext) fieldContext_Task_displayOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_displayTask(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_displayTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskID, nil
+ return ec.resolvers.Task().DisplayTask(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -34953,129 +44751,312 @@ func (ec *executionContext) _TestResult_taskId(ctx context.Context, field graphq
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*model.APITask)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
}
-func (ec *executionContext) _TestResult_execution(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_displayTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_distroId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_distroId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TestResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Execution, nil
+ return obj.DistroId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_summary(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
+func (ec *executionContext) fieldContext_Task_distroId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_estimatedStart(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_estimatedStart(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Summary, nil
+ return ec.resolvers.Task().EstimatedStart(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIDuration)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_assigneeDisplayName(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
+func (ec *executionContext) fieldContext_Task_estimatedStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_execution(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_execution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TicketFields().AssigneeDisplayName(rctx, obj)
+ return obj.Execution, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_resolutionName(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_execution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_executionTasks(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_executionTasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TicketFields().ResolutionName(rctx, obj)
+ return obj.ExecutionTasks, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35084,100 +45065,265 @@ func (ec *executionContext) _TicketFields_resolutionName(ctx context.Context, fi
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2áástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_created(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
+func (ec *executionContext) fieldContext_Task_executionTasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_executionTasksFull(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_executionTasksFull(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Created, nil
+ return ec.resolvers.Task().ExecutionTasksFull(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.([]*model.APITask)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_updated(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_executionTasksFull(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_expectedDuration(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_expectedDuration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Updated, nil
+ return obj.ExpectedDuration, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_status(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
+func (ec *executionContext) fieldContext_Task_expectedDuration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_failedTestCount(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_failedTestCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return ec.resolvers.Task().FailedTestCount(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -35189,30 +45335,39 @@ func (ec *executionContext) _TicketFields_status(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(*thirdparty.JiraStatus)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNJiraStatus2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraStatus(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _TicketFields_assignedTeam(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TicketFields",
+func (ec *executionContext) fieldContext_Task_failedTestCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_finishTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_finishTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.TicketFields().AssignedTeam(rctx, obj)
+ return obj.FinishTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35221,205 +45376,244 @@ func (ec *executionContext) _TicketFields_assignedTeam(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_project(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
+func (ec *executionContext) fieldContext_Task_finishTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_generatedBy(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_generatedBy(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Project, nil
+ return obj.GeneratedBy, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_level(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
+func (ec *executionContext) fieldContext_Task_generatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_generatedByName(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_generatedByName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Level, nil
+ return ec.resolvers.Task().GeneratedByName(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_buildVariantRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_generatedByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_generateTask(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_generateTask(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.BuildVariantRegex, nil
+ return obj.GenerateTask, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_taskRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
+func (ec *executionContext) fieldContext_Task_generateTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_hostId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_hostId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TaskRegex, nil
+ return obj.HostId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_status(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
+func (ec *executionContext) fieldContext_Task_hostId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_ingestTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_ingestTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status, nil
+ return obj.IngestTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_dateCutoff(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
+func (ec *executionContext) fieldContext_Task_ingestTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_isPerfPluginEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DateCutoff, nil
+ return ec.resolvers.Task().IsPerfPluginEnabled(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -35431,30 +45625,39 @@ func (ec *executionContext) _TriggerAlias_dateCutoff(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNInt2áint(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_configFile(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_isPerfPluginEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_latestExecution(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_latestExecution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ConfigFile, nil
+ return ec.resolvers.Task().LatestExecution(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -35466,30 +45669,39 @@ func (ec *executionContext) _TriggerAlias_configFile(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _TriggerAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_latestExecution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_logs(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_logs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TriggerAlias",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Alias, nil
+ return obj.Logs, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35501,62 +45713,51 @@ func (ec *executionContext) _TriggerAlias_alias(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.LogLinks)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNTaskLogLinks2githubácomáevergreenáciáevergreenárestámodeláLogLinks(ctx, field.Selections, res)
}
-func (ec *executionContext) _UIConfig_userVoice(ctx context.Context, field graphql.CollectedField, obj *model.APIUIConfig) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UIConfig",
+func (ec *executionContext) fieldContext_Task_logs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "agentLogLink":
+ return ec.fieldContext_TaskLogLinks_agentLogLink(ctx, field)
+ case "allLogLink":
+ return ec.fieldContext_TaskLogLinks_allLogLink(ctx, field)
+ case "eventLogLink":
+ return ec.fieldContext_TaskLogLinks_eventLogLink(ctx, field)
+ case "systemLogLink":
+ return ec.fieldContext_TaskLogLinks_systemLogLink(ctx, field)
+ case "taskLogLink":
+ return ec.fieldContext_TaskLogLinks_taskLogLink(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskLogLinks", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.UserVoice, nil
- })
+func (ec *executionContext) _Task_minQueuePosition(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_minQueuePosition(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _UIConfig_defaultProject(ctx context.Context, field graphql.CollectedField, obj *model.APIUIConfig) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UIConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DefaultProject, nil
+ return ec.resolvers.Task().MinQueuePosition(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -35568,30 +45769,39 @@ func (ec *executionContext) _UIConfig_defaultProject(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_owner(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_minQueuePosition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_order(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_order(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Owner, nil
+ return obj.Order, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35603,237 +45813,458 @@ func (ec *executionContext) _UpstreamProject_owner(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_repo(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
+func (ec *executionContext) fieldContext_Task_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_patch(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_patch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return ec.resolvers.Task().Patch(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIPatch)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_revision(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_patch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_patchNumber(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_patchNumber(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Revision, nil
+ return ec.resolvers.Task().PatchNumber(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_project(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_patchNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_pod(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_pod(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Project, nil
+ return ec.resolvers.Task().Pod(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIPod)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOPod2ágithubácomáevergreenáciáevergreenárestámodeláAPIPod(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_triggerID(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_pod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "events":
+ return ec.fieldContext_Pod_events(ctx, field)
+ case "id":
+ return ec.fieldContext_Pod_id(ctx, field)
+ case "status":
+ return ec.fieldContext_Pod_status(ctx, field)
+ case "task":
+ return ec.fieldContext_Pod_task(ctx, field)
+ case "taskContainerCreationOpts":
+ return ec.fieldContext_Pod_taskContainerCreationOpts(ctx, field)
+ case "type":
+ return ec.fieldContext_Pod_type(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Pod", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_priority(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_priority(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TriggerID, nil
+ return obj.Priority, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int64)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOInt2int64(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_resourceID(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
+func (ec *executionContext) fieldContext_Task_priority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_project(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ResourceID, nil
+ return ec.resolvers.Task().Project(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*model.APIProjectRef)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_task(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_projectId(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_projectId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Task, nil
+ return obj.ProjectId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APITask)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_version(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
+func (ec *executionContext) fieldContext_Task_projectId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_projectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_projectIdentifier(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Version, nil
+ return ec.resolvers.Task().ProjectIdentifier(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -35842,30 +46273,39 @@ func (ec *executionContext) _UpstreamProject_version(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _UpstreamProject_triggerType(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_projectIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_requester(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_requester(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UpstreamProject",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TriggerType, nil
+ return obj.Requester, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35877,62 +46317,83 @@ func (ec *executionContext) _UpstreamProject_triggerType(ctx context.Context, fi
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _UseSpruceOptions_hasUsedSpruceBefore(ctx context.Context, field graphql.CollectedField, obj *model.APIUseSpruceOptions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UseSpruceOptions",
+func (ec *executionContext) fieldContext_Task_requester(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_resetWhenFinished(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HasUsedSpruceBefore, nil
+ return obj.ResetWhenFinished, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx context.Context, field graphql.CollectedField, obj *model.APIUseSpruceOptions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UseSpruceOptions",
+func (ec *executionContext) fieldContext_Task_resetWhenFinished(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_revision(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_revision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HasUsedMainlineCommitsBefore, nil
+ return obj.Revision, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35941,30 +46402,39 @@ func (ec *executionContext) _UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx c
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _UseSpruceOptions_spruceV1(ctx context.Context, field graphql.CollectedField, obj *model.APIUseSpruceOptions) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UseSpruceOptions",
+func (ec *executionContext) fieldContext_Task_revision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_scheduledTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_scheduledTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SpruceV1, nil
+ return obj.ScheduledTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -35973,100 +46443,121 @@ func (ec *executionContext) _UseSpruceOptions_spruceV1(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _User_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
+func (ec *executionContext) fieldContext_Task_scheduledTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_spawnHostLink(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_spawnHostLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return ec.resolvers.Task().SpawnHostLink(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _User_userId(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_spawnHostLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_startTime(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_startTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "User",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UserID, nil
+ return obj.StartTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _User_emailAddress(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
+func (ec *executionContext) fieldContext_Task_startTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_status(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EmailAddress, nil
+ return ec.resolvers.Task().Status(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36078,37 +46569,39 @@ func (ec *executionContext) _User_emailAddress(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _User_patches(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
+func (ec *executionContext) fieldContext_Task_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_User_patches_args(ctx, rawArgs)
+func (ec *executionContext) _Task_taskFiles(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_taskFiles(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.User().Patches(rctx, obj, args["patchesInput"].(PatchesInput))
+ return ec.resolvers.Task().TaskFiles(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36120,100 +46613,127 @@ func (ec *executionContext) _User_patches(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*Patches)
+ res := resTmp.(*TaskFiles)
fc.Result = res
- return ec.marshalNPatches2ágithubácomáevergreenáciáevergreenágraphqláPatches(ctx, field.Selections, res)
+ return ec.marshalNTaskFiles2ágithubácomáevergreenáciáevergreenágraphqláTaskFiles(ctx, field.Selections, res)
}
-func (ec *executionContext) _User_permissions(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "User",
+func (ec *executionContext) fieldContext_Task_taskFiles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "fileCount":
+ return ec.fieldContext_TaskFiles_fileCount(ctx, field)
+ case "groupedFiles":
+ return ec.fieldContext_TaskFiles_groupedFiles(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskFiles", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_taskGroup(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_taskGroup(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.User().Permissions(rctx, obj)
+ return obj.TaskGroup, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*Permissions)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNPermissions2ágithubácomáevergreenáciáevergreenágraphqláPermissions(ctx, field.Selections, res)
+ return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserConfig_user(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UserConfig",
+func (ec *executionContext) fieldContext_Task_taskGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_taskGroupMaxHosts(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.User, nil
+ return obj.TaskGroupMaxHosts, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserConfig_api_key(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UserConfig",
+func (ec *executionContext) fieldContext_Task_taskGroupMaxHosts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_taskLogs(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_taskLogs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.APIKey, nil
+ return ec.resolvers.Task().TaskLogs(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36225,30 +46745,57 @@ func (ec *executionContext) _UserConfig_api_key(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*TaskLogs)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNTaskLogs2ágithubácomáevergreenáciáevergreenágraphqláTaskLogs(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserConfig_api_server_host(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_taskLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "agentLogs":
+ return ec.fieldContext_TaskLogs_agentLogs(ctx, field)
+ case "allLogs":
+ return ec.fieldContext_TaskLogs_allLogs(ctx, field)
+ case "defaultLogger":
+ return ec.fieldContext_TaskLogs_defaultLogger(ctx, field)
+ case "eventLogs":
+ return ec.fieldContext_TaskLogs_eventLogs(ctx, field)
+ case "execution":
+ return ec.fieldContext_TaskLogs_execution(ctx, field)
+ case "systemLogs":
+ return ec.fieldContext_TaskLogs_systemLogs(ctx, field)
+ case "taskId":
+ return ec.fieldContext_TaskLogs_taskId(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_TaskLogs_taskLogs(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskLogs", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Task_tests(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_tests(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UserConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.APIServerHost, nil
+ return ec.resolvers.Task().Tests(rctx, obj, fc.Args["opts"].(*TestFilterOptions))
})
if err != nil {
ec.Error(ctx, err)
@@ -36260,65 +46807,99 @@ func (ec *executionContext) _UserConfig_api_server_host(ctx context.Context, fie
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*TaskTestResult)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNTaskTestResult2ágithubácomáevergreenáciáevergreenágraphqláTaskTestResult(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserConfig_ui_server_host(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_tests(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "testResults":
+ return ec.fieldContext_TaskTestResult_testResults(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_TaskTestResult_totalTestCount(ctx, field)
+ case "filteredTestCount":
+ return ec.fieldContext_TaskTestResult_filteredTestCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskTestResult", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "UserConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Task_tests_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_timeTaken(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_timeTaken(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UIServerHost, nil
+ return obj.TimeTaken, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserPatches_patches(ctx context.Context, field graphql.CollectedField, obj *UserPatches) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UserPatches",
+func (ec *executionContext) fieldContext_Task_timeTaken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Task_totalTestCount(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_totalTestCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Patches, nil
+ return ec.resolvers.Task().TotalTestCount(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36330,30 +46911,39 @@ func (ec *executionContext) _UserPatches_patches(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.([]*model.APIPatch)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNPatch2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Task_totalTestCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
}
-func (ec *executionContext) _UserPatches_filteredPatchCount(ctx context.Context, field graphql.CollectedField, obj *UserPatches) (ret graphql.Marshaler) {
+func (ec *executionContext) _Task_versionMetadata(ctx context.Context, field graphql.CollectedField, obj *model.APITask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Task_versionMetadata(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UserPatches",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FilteredPatchCount, nil
+ return ec.resolvers.Task().VersionMetadata(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36365,94 +46955,161 @@ func (ec *executionContext) _UserPatches_filteredPatchCount(ctx context.Context,
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*model.APIVersion)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserSettings_timezone(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Task_versionMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Task",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskAnnotationSettings_fileTicketWebhook(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotationSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskAnnotationSettings_fileTicketWebhook(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UserSettings",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Timezone, nil
+ return obj.FileTicketWebhook, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIWebHook)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNWebhook2githubácomáevergreenáciáevergreenárestámodeláAPIWebHook(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserSettings_region(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UserSettings",
+func (ec *executionContext) fieldContext_TaskAnnotationSettings_fileTicketWebhook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskAnnotationSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "endpoint":
+ return ec.fieldContext_Webhook_endpoint(ctx, field)
+ case "secret":
+ return ec.fieldContext_Webhook_secret(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Webhook", field.Name)
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Region, nil
- })
+func (ec *executionContext) _TaskAnnotationSettings_jiraCustomFields(ctx context.Context, field graphql.CollectedField, obj *model.APITaskAnnotationSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskAnnotationSettings_jiraCustomFields(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _UserSettings_githubUser(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UserSettings",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GithubUser, nil
+ return obj.JiraCustomFields, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36461,126 +47118,133 @@ func (ec *executionContext) _UserSettings_githubUser(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIGithubUser)
+ res := resTmp.([]model.APIJiraField)
fc.Result = res
- return ec.marshalOGithubUser2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubUser(ctx, field.Selections, res)
+ return ec.marshalOJiraField2ágithubácomáevergreenáciáevergreenárestámodeláAPIJiraFieldá(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserSettings_slackUsername(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UserSettings",
+func (ec *executionContext) fieldContext_TaskAnnotationSettings_jiraCustomFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskAnnotationSettings",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayText":
+ return ec.fieldContext_JiraField_displayText(ctx, field)
+ case "field":
+ return ec.fieldContext_JiraField_field(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraField", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskContainerCreationOpts_image(ctx context.Context, field graphql.CollectedField, obj *model.APIPodTaskContainerCreationOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskContainerCreationOpts_image(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SlackUsername, nil
+ return obj.Image, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _UserSettings_notifications(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "UserSettings",
+func (ec *executionContext) fieldContext_TaskContainerCreationOpts_image(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskContainerCreationOpts",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Notifications, nil
- })
+func (ec *executionContext) _TaskContainerCreationOpts_memoryMB(ctx context.Context, field graphql.CollectedField, obj *model.APIPodTaskContainerCreationOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskContainerCreationOpts_memoryMB(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APINotificationPreferences)
- fc.Result = res
- return ec.marshalONotifications2ágithubácomáevergreenáciáevergreenárestámodeláAPINotificationPreferences(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _UserSettings_useSpruceOptions(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "UserSettings",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.UseSpruceOptions, nil
+ return obj.MemoryMB, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIUseSpruceOptions)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalOUseSpruceOptions2ágithubácomáevergreenáciáevergreenárestámodeláAPIUseSpruceOptions(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _VariantTask_name(ctx context.Context, field graphql.CollectedField, obj *model.VariantTask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "VariantTask",
+func (ec *executionContext) fieldContext_TaskContainerCreationOpts_memoryMB(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskContainerCreationOpts",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskContainerCreationOpts_cpu(ctx context.Context, field graphql.CollectedField, obj *model.APIPodTaskContainerCreationOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskContainerCreationOpts_cpu(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.CPU, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36592,30 +47256,39 @@ func (ec *executionContext) _VariantTask_name(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(*int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2áint(ctx, field.Selections, res)
}
-func (ec *executionContext) _VariantTask_tasks(ctx context.Context, field graphql.CollectedField, obj *model.VariantTask) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "VariantTask",
+func (ec *executionContext) fieldContext_TaskContainerCreationOpts_cpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskContainerCreationOpts",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskContainerCreationOpts_os(ctx context.Context, field graphql.CollectedField, obj *model.APIPodTaskContainerCreationOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskContainerCreationOpts_os(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Tasks, nil
+ return ec.resolvers.TaskContainerCreationOpts().Os(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36627,30 +47300,39 @@ func (ec *executionContext) _VariantTask_tasks(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.([]*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2áástringá(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_id(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskContainerCreationOpts_os(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskContainerCreationOpts",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskContainerCreationOpts_arch(ctx context.Context, field graphql.CollectedField, obj *model.APIPodTaskContainerCreationOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskContainerCreationOpts_arch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Id, nil
+ return ec.resolvers.TaskContainerCreationOpts().Arch(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -36662,30 +47344,39 @@ func (ec *executionContext) _Version_id(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_createTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskContainerCreationOpts_arch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskContainerCreationOpts",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskContainerCreationOpts_workingDir(ctx context.Context, field graphql.CollectedField, obj *model.APIPodTaskContainerCreationOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskContainerCreationOpts_workingDir(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CreateTime, nil
+ return obj.WorkingDir, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36697,62 +47388,39 @@ func (ec *executionContext) _Version_createTime(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_startTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskContainerCreationOpts_workingDir(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskContainerCreationOpts",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.StartTime, nil
- })
+func (ec *executionContext) _TaskEndDetail_description(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEndDetail_description(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
- fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Version_finishTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.FinishTime, nil
+ return obj.Description, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36761,30 +47429,39 @@ func (ec *executionContext) _Version_finishTime(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_message(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEndDetail_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEndDetail",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEndDetail_oomTracker(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEndDetail_oomTracker(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Message, nil
+ return obj.OOMTracker, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36796,30 +47473,45 @@ func (ec *executionContext) _Version_message(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIOomTrackerInfo)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNOomTrackerInfo2githubácomáevergreenáciáevergreenárestámodeláAPIOomTrackerInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_revision(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEndDetail_oomTracker(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEndDetail",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "detected":
+ return ec.fieldContext_OomTrackerInfo_detected(ctx, field)
+ case "pids":
+ return ec.fieldContext_OomTrackerInfo_pids(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type OomTrackerInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEndDetail_status(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEndDetail_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Revision, nil
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36836,95 +47528,116 @@ func (ec *executionContext) _Version_revision(ctx context.Context, field graphql
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_author(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEndDetail_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEndDetail",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEndDetail_timedOut(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEndDetail_timedOut(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Author, nil
+ return obj.TimedOut, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(bool)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_status(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEndDetail_timedOut(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEndDetail",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEndDetail_timeoutType(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEndDetail_timeoutType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().Status(rctx, obj)
+ return obj.TimeoutType, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_order(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEndDetail_timeoutType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEndDetail",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEndDetail_type(ctx context.Context, field graphql.CollectedField, obj *model.ApiTaskEndDetail) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEndDetail_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Order, nil
+ return obj.Type, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -36936,237 +47649,203 @@ func (ec *executionContext) _Version_order(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEndDetail_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEndDetail",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEventLogData_hostId(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_hostId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Repo, nil
+ return obj.HostId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_project(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_hostId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEventLogData_podId(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_podId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Project, nil
+ return obj.PodId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_projectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_podId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskEventLogData_jiraIssue(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_jiraIssue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ProjectIdentifier, nil
+ return obj.JiraIssue, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_projectMetadata(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_jiraIssue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().ProjectMetadata(rctx, obj)
- })
+func (ec *executionContext) _TaskEventLogData_jiraLink(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_jiraLink(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIProjectRef)
- fc.Result = res
- return ec.marshalOProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Version_branch(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Branch, nil
+ return obj.JiraLink, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_requester(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_jiraLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Requester, nil
- })
+func (ec *executionContext) _TaskEventLogData_priority(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_priority(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Version_activated(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Activated, nil
+ return obj.Priority, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37175,76 +47854,39 @@ func (ec *executionContext) _Version_activated(ctx context.Context, field graphq
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(int64)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalOInt2int64(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_taskStatusCounts(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_priority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Version_taskStatusCounts_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().TaskStatusCounts(rctx, obj, args["options"].(*BuildVariantOptions))
- })
+func (ec *executionContext) _TaskEventLogData_status(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_status(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- if resTmp == nil {
- return graphql.Null
- }
- res := resTmp.([]*task.StatusCount)
- fc.Result = res
- return ec.marshalOStatusCount2áágithubácomáevergreenáciáevergreenámodelátaskáStatusCountá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Version_taskStatusStats(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Version_taskStatusStats_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().TaskStatusStats(rctx, obj, args["options"].(*BuildVariantOptions))
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37253,37 +47895,39 @@ func (ec *executionContext) _Version_taskStatusStats(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*task.TaskStats)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOTaskStats2ágithubácomáevergreenáciáevergreenámodelátaskáTaskStats(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_buildVariants(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Version_buildVariants_args(ctx, rawArgs)
+func (ec *executionContext) _TaskEventLogData_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_timestamp(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().BuildVariants(rctx, obj, args["options"].(*BuildVariantOptions))
+ return obj.Timestamp, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37292,37 +47936,39 @@ func (ec *executionContext) _Version_buildVariants(ctx context.Context, field gr
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*GroupedBuildVariant)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOGroupedBuildVariant2áágithubácomáevergreenáciáevergreenágraphqláGroupedBuildVariant(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_buildVariantStats(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogData_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Version_buildVariantStats_args(ctx, rawArgs)
+func (ec *executionContext) _TaskEventLogData_userId(ctx context.Context, field graphql.CollectedField, obj *model.TaskEventData) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogData_userId(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().BuildVariantStats(rctx, obj, args["options"].(*BuildVariantOptions))
+ return obj.UserId, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37331,30 +47977,39 @@ func (ec *executionContext) _Version_buildVariantStats(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*task.GroupedTaskStatusCount)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOGroupedTaskStatusCount2áágithubácomáevergreenáciáevergreenámodelátaskáGroupedTaskStatusCountá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_isPatch(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogData_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogData",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().IsPatch(rctx, obj)
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37366,62 +48021,101 @@ func (ec *executionContext) _Version_isPatch(ctx context.Context, field graphql.
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_patch(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogEntry_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_data(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().Patch(rctx, obj)
+ return obj.Data, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIPatch)
+ res := resTmp.(*model.TaskEventData)
fc.Result = res
- return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
+ return ec.marshalNTaskEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláTaskEventData(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_childVersions(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogEntry_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hostId":
+ return ec.fieldContext_TaskEventLogData_hostId(ctx, field)
+ case "podId":
+ return ec.fieldContext_TaskEventLogData_podId(ctx, field)
+ case "jiraIssue":
+ return ec.fieldContext_TaskEventLogData_jiraIssue(ctx, field)
+ case "jiraLink":
+ return ec.fieldContext_TaskEventLogData_jiraLink(ctx, field)
+ case "priority":
+ return ec.fieldContext_TaskEventLogData_priority(ctx, field)
+ case "status":
+ return ec.fieldContext_TaskEventLogData_status(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_TaskEventLogData_timestamp(ctx, field)
+ case "userId":
+ return ec.fieldContext_TaskEventLogData_userId(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskEventLogData", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_eventType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().ChildVersions(rctx, obj)
+ return obj.EventType, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37430,126 +48124,171 @@ func (ec *executionContext) _Version_childVersions(ctx context.Context, field gr
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]*model.APIVersion)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOVersion2áágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_taskCount(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogEntry_eventType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_processedAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().TaskCount(rctx, obj)
+ return obj.ProcessedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*int)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOInt2áint(ctx, field.Selections, res)
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_baseVersion(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogEntry_processedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_resourceId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().BaseVersion(rctx, obj)
+ return obj.ResourceId, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_previousVersion(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogEntry_resourceId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_resourceType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().PreviousVersion(rctx, obj)
+ return obj.ResourceType, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIVersion)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_versionTiming(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskEventLogEntry_resourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.TaskAPIEventLogEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskEventLogEntry_timestamp(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().VersionTiming(rctx, obj)
+ return obj.Timestamp, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37558,30 +48297,39 @@ func (ec *executionContext) _Version_versionTiming(ctx context.Context, field gr
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*VersionTiming)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalOVersionTiming2ágithubácomáevergreenáciáevergreenágraphqláVersionTiming(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_parameters(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Version",
+func (ec *executionContext) fieldContext_TaskEventLogEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskEventLogEntry",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskFiles_fileCount(ctx context.Context, field graphql.CollectedField, obj *TaskFiles) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskFiles_fileCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Parameters, nil
+ return obj.FileCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37593,30 +48341,39 @@ func (ec *executionContext) _Version_parameters(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.([]model.APIParameter)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNParameter2ágithubácomáevergreenáciáevergreenárestámodeláAPIParameterá(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_taskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskFiles_fileCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskFiles",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskFiles_groupedFiles(ctx context.Context, field graphql.CollectedField, obj *TaskFiles) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskFiles_groupedFiles(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().TaskStatuses(rctx, obj)
+ return obj.GroupedFiles, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37628,65 +48385,86 @@ func (ec *executionContext) _Version_taskStatuses(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.([]*GroupedFiles)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalNGroupedFiles2áágithubácomáevergreenáciáevergreenágraphqláGroupedFilesá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_baseTaskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskFiles_groupedFiles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskFiles",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "files":
+ return ec.fieldContext_GroupedFiles_files(ctx, field)
+ case "taskName":
+ return ec.fieldContext_GroupedFiles_taskName(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GroupedFiles", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskInfo_id(ctx context.Context, field graphql.CollectedField, obj *model.TaskInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskInfo_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().BaseTaskStatuses(rctx, obj)
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástringá(ctx, field.Selections, res)
+ return ec.marshalOID2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_manifest(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskInfo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskInfo",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskInfo_name(ctx context.Context, field graphql.CollectedField, obj *model.TaskInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskInfo_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().Manifest(rctx, obj)
+ return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37695,30 +48473,39 @@ func (ec *executionContext) _Version_manifest(ctx context.Context, field graphql
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*Manifest)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOManifest2ágithubácomáevergreenáciáevergreenágraphqláManifest(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Version_upstreamProject(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskInfo_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskInfo",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskLogLinks_agentLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogLinks_agentLogLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Version",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Version().UpstreamProject(rctx, obj)
+ return obj.AgentLogLink, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37727,30 +48514,39 @@ func (ec *executionContext) _Version_upstreamProject(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*UpstreamProject)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOUpstreamProject2ágithubácomáevergreenáciáevergreenágraphqláUpstreamProject(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _VersionTiming_makespan(ctx context.Context, field graphql.CollectedField, obj *VersionTiming) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "VersionTiming",
+func (ec *executionContext) fieldContext_TaskLogLinks_agentLogLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogLinks",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogLinks_allLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogLinks_allLogLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Makespan, nil
+ return obj.AllLogLink, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37759,30 +48555,39 @@ func (ec *executionContext) _VersionTiming_makespan(ctx context.Context, field g
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIDuration)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _VersionTiming_timeTaken(ctx context.Context, field graphql.CollectedField, obj *VersionTiming) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "VersionTiming",
+func (ec *executionContext) fieldContext_TaskLogLinks_allLogLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogLinks",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogLinks_eventLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogLinks_eventLogLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.TimeTaken, nil
+ return obj.EventLogLink, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37791,100 +48596,121 @@ func (ec *executionContext) _VersionTiming_timeTaken(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*model.APIDuration)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_id(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogLinks_eventLogLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogLinks",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogLinks_systemLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogLinks_systemLogLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.ID, nil
+ return obj.SystemLogLink, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogLinks_systemLogLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogLinks",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogLinks_taskLogLink(ctx context.Context, field graphql.CollectedField, obj *model.LogLinks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogLinks_taskLogLink(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DisplayName, nil
+ return obj.TaskLogLink, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_createdBy(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogLinks_taskLogLink(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogLinks",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogs_agentLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_agentLogs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CreatedBy, nil
+ return ec.resolvers.TaskLogs().AgentLogs(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -37896,30 +48722,51 @@ func (ec *executionContext) _Volume_createdBy(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*apimodels.LogMessage)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_type(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskLogs_agentLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_LogMessage_message(ctx, field)
+ case "severity":
+ return ec.fieldContext_LogMessage_severity(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_LogMessage_timestamp(ctx, field)
+ case "type":
+ return ec.fieldContext_LogMessage_type(ctx, field)
+ case "version":
+ return ec.fieldContext_LogMessage_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LogMessage", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskLogs_allLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_allLogs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Volume",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return ec.resolvers.TaskLogs().AllLogs(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -37931,30 +48778,51 @@ func (ec *executionContext) _Volume_type(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*apimodels.LogMessage)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskLogs_allLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_LogMessage_message(ctx, field)
+ case "severity":
+ return ec.fieldContext_LogMessage_severity(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_LogMessage_timestamp(ctx, field)
+ case "type":
+ return ec.fieldContext_LogMessage_type(ctx, field)
+ case "version":
+ return ec.fieldContext_LogMessage_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LogMessage", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskLogs_defaultLogger(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_defaultLogger(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Volume",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.AvailabilityZone, nil
+ return obj.DefaultLogger, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -37966,30 +48834,39 @@ func (ec *executionContext) _Volume_availabilityZone(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_size(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogs_defaultLogger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogs_eventLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_eventLogs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Size, nil
+ return ec.resolvers.TaskLogs().EventLogs(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -38001,94 +48878,99 @@ func (ec *executionContext) _Volume_size(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(int)
+ res := resTmp.([]*model.TaskAPIEventLogEntry)
fc.Result = res
- return ec.marshalNInt2int(ctx, field.Selections, res)
+ return ec.marshalNTaskEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláTaskAPIEventLogEntryá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_expiration(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskLogs_eventLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_TaskEventLogEntry_id(ctx, field)
+ case "data":
+ return ec.fieldContext_TaskEventLogEntry_data(ctx, field)
+ case "eventType":
+ return ec.fieldContext_TaskEventLogEntry_eventType(ctx, field)
+ case "processedAt":
+ return ec.fieldContext_TaskEventLogEntry_processedAt(ctx, field)
+ case "resourceId":
+ return ec.fieldContext_TaskEventLogEntry_resourceId(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_TaskEventLogEntry_resourceType(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_TaskEventLogEntry_timestamp(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskEventLogEntry", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskLogs_execution(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_execution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Volume",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Expiration, nil
+ return obj.Execution, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_deviceName(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogs_execution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DeviceName, nil
- })
+func (ec *executionContext) _TaskLogs_systemLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_systemLogs(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _Volume_hostID(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Volume",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HostID, nil
+ return ec.resolvers.TaskLogs().SystemLogs(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -38100,30 +48982,51 @@ func (ec *executionContext) _Volume_hostID(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*apimodels.LogMessage)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_noExpiration(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskLogs_systemLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_LogMessage_message(ctx, field)
+ case "severity":
+ return ec.fieldContext_LogMessage_severity(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_LogMessage_timestamp(ctx, field)
+ case "type":
+ return ec.fieldContext_LogMessage_type(ctx, field)
+ case "version":
+ return ec.fieldContext_LogMessage_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LogMessage", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskLogs_taskId(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_taskId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Volume",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.NoExpiration, nil
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38135,30 +49038,39 @@ func (ec *executionContext) _Volume_noExpiration(ctx context.Context, field grap
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_homeVolume(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogs_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskLogs_taskLogs(ctx context.Context, field graphql.CollectedField, obj *TaskLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskLogs_taskLogs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.HomeVolume, nil
+ return ec.resolvers.TaskLogs().TaskLogs(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
@@ -38170,94 +49082,139 @@ func (ec *executionContext) _Volume_homeVolume(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]*apimodels.LogMessage)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNLogMessage2áágithubácomáevergreenáciáevergreenáapimodelsáLogMessageá(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_host(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskLogs_taskLogs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskLogs",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_LogMessage_message(ctx, field)
+ case "severity":
+ return ec.fieldContext_LogMessage_severity(ctx, field)
+ case "timestamp":
+ return ec.fieldContext_LogMessage_timestamp(ctx, field)
+ case "type":
+ return ec.fieldContext_LogMessage_type(ctx, field)
+ case "version":
+ return ec.fieldContext_LogMessage_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LogMessage", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueDistro_id(ctx context.Context, field graphql.CollectedField, obj *TaskQueueDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueDistro_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Volume().Host(rctx, obj)
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*model.APIHost)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalOHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
+ return ec.marshalNID2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Volume_creationTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Volume",
+func (ec *executionContext) fieldContext_TaskQueueDistro_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueDistro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueDistro_hostCount(ctx context.Context, field graphql.CollectedField, obj *TaskQueueDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueDistro_hostCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CreationTime, nil
+ return obj.HostCount, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*time.Time)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Webhook_endpoint(ctx context.Context, field graphql.CollectedField, obj *model.APIWebHook) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Webhook",
+func (ec *executionContext) fieldContext_TaskQueueDistro_hostCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueDistro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueDistro_taskCount(ctx context.Context, field graphql.CollectedField, obj *TaskQueueDistro) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueDistro_taskCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Endpoint, nil
+ return obj.TaskCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38269,30 +49226,39 @@ func (ec *executionContext) _Webhook_endpoint(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Webhook_secret(ctx context.Context, field graphql.CollectedField, obj *model.APIWebHook) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "Webhook",
+func (ec *executionContext) fieldContext_TaskQueueDistro_taskCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueDistro",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_id(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Secret, nil
+ return obj.Id, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38306,28 +49272,37 @@ func (ec *executionContext) _Webhook_secret(ctx context.Context, field graphql.C
}
res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNID2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _WebhookHeader_key(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookHeader) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WebhookHeader",
+func (ec *executionContext) fieldContext_TaskQueueItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_buildVariant(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_buildVariant(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Key, nil
+ return obj.BuildVariant, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38344,25 +49319,34 @@ func (ec *executionContext) _WebhookHeader_key(ctx context.Context, field graphq
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _WebhookHeader_value(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookHeader) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WebhookHeader",
+func (ec *executionContext) fieldContext_TaskQueueItem_buildVariant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Value, nil
+ return obj.DisplayName, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38379,25 +49363,34 @@ func (ec *executionContext) _WebhookHeader_value(ctx context.Context, field grap
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _WebhookSubscriber_url(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WebhookSubscriber",
+func (ec *executionContext) fieldContext_TaskQueueItem_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_expectedDuration(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_expectedDuration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.URL, nil
+ return obj.ExpectedDuration, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38409,30 +49402,39 @@ func (ec *executionContext) _WebhookSubscriber_url(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(model.APIDuration)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNDuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
}
-func (ec *executionContext) _WebhookSubscriber_secret(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WebhookSubscriber",
+func (ec *executionContext) fieldContext_TaskQueueItem_expectedDuration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_priority(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_priority(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Secret, nil
+ return obj.Priority, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38444,30 +49446,39 @@ func (ec *executionContext) _WebhookSubscriber_secret(ctx context.Context, field
}
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int64)
fc.Result = res
- return ec.marshalNString2ástring(ctx, field.Selections, res)
+ return ec.marshalNInt2int64(ctx, field.Selections, res)
}
-func (ec *executionContext) _WebhookSubscriber_headers(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WebhookSubscriber",
+func (ec *executionContext) fieldContext_TaskQueueItem_priority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_project(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Headers, nil
+ return obj.Project, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38479,94 +49490,83 @@ func (ec *executionContext) _WebhookSubscriber_headers(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.([]model.APIWebhookHeader)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNWebhookHeader2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookHeader(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _WorkstationConfig_setupCommands(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WorkstationConfig",
+func (ec *executionContext) fieldContext_TaskQueueItem_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.SetupCommands, nil
- })
+func (ec *executionContext) _TaskQueueItem_requester(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_requester(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]model.APIWorkstationSetupCommand)
- fc.Result = res
- return ec.marshalOWorkstationSetupCommand2ágithubácomáevergreenáciáevergreenárestámodeláAPIWorkstationSetupCommandá(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) _WorkstationConfig_gitClone(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "WorkstationConfig",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.GitClone, nil
+ return ec.resolvers.TaskQueueItem().Requester(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*bool)
+ res := resTmp.(TaskQueueItemType)
fc.Result = res
- return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+ return ec.marshalNTaskQueueItemType2githubácomáevergreenáciáevergreenágraphqláTaskQueueItemType(ctx, field.Selections, res)
}
-func (ec *executionContext) _WorkstationSetupCommand_command(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationSetupCommand) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskQueueItem_requester(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type TaskQueueItemType does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskQueueItem_revision(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_revision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "WorkstationSetupCommand",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Command, nil
+ return obj.Revision, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38583,25 +49583,34 @@ func (ec *executionContext) _WorkstationSetupCommand_command(ctx context.Context
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) _WorkstationSetupCommand_directory(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationSetupCommand) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "WorkstationSetupCommand",
+func (ec *executionContext) fieldContext_TaskQueueItem_revision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskQueueItem_version(ctx context.Context, field graphql.CollectedField, obj *model.APITaskQueueItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskQueueItem_version(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Directory, nil
+ return obj.Version, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38618,25 +49627,34 @@ func (ec *executionContext) _WorkstationSetupCommand_directory(ctx context.Conte
return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
+func (ec *executionContext) fieldContext_TaskQueueItem_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskQueueItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskSpecifier_patchAlias(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSpecifier) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskSpecifier_patchAlias(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.PatchAlias, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38648,62 +49666,39 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
+func (ec *executionContext) fieldContext_TaskSpecifier_patchAlias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskSpecifier",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
- })
+func (ec *executionContext) _TaskSpecifier_taskRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSpecifier) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskSpecifier_taskRegex(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Locations, nil
+ return obj.TaskRegex, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38715,30 +49710,39 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
}
return graphql.Null
}
- res := resTmp.([]string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__DirectiveLocation2ástringá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
+func (ec *executionContext) fieldContext_TaskSpecifier_taskRegex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskSpecifier",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskSpecifier_variantRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSpecifier) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskSpecifier_variantRegex(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Args, nil
+ return obj.VariantRegex, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38750,100 +49754,127 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
}
return graphql.Null
}
- res := resTmp.([]introspection.InputValue)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Directive",
+func (ec *executionContext) fieldContext_TaskSpecifier_variantRegex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskSpecifier",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskStats_counts(ctx context.Context, field graphql.CollectedField, obj *task.TaskStats) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskStats_counts(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsRepeatable, nil
+ return obj.Counts, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.([]task.StatusCount)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOStatusCount2ágithubácomáevergreenáciáevergreenámodelátaskáStatusCountá(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
+func (ec *executionContext) fieldContext_TaskStats_counts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskStats",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_StatusCount_count(ctx, field)
+ case "status":
+ return ec.fieldContext_StatusCount_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type StatusCount", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskStats_eta(ctx context.Context, field graphql.CollectedField, obj *task.TaskStats) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskStats_eta(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.ETA, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
+func (ec *executionContext) fieldContext_TaskStats_eta(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskStats",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskSyncOptions_configEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskSyncOptions_configEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.ConfigEnabled, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38852,97 +49883,150 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskSyncOptions_configEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskSyncOptions",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskSyncOptions_patchEnabled(ctx context.Context, field graphql.CollectedField, obj *model.APITaskSyncOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskSyncOptions_patchEnabled(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsDeprecated(), nil
+ return obj.PatchEnabled, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(*bool)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskSyncOptions_patchEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskSyncOptions",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskTestResult_testResults(ctx context.Context, field graphql.CollectedField, obj *TaskTestResult) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResult_testResults(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DeprecationReason(), nil
+ return obj.TestResults, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.([]*model.APITest)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalNTestResult2áágithubácomáevergreenáciáevergreenárestámodeláAPITestá(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskTestResult_testResults(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_TestResult_id(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_TestResult_baseStatus(ctx, field)
+ case "duration":
+ return ec.fieldContext_TestResult_duration(ctx, field)
+ case "endTime":
+ return ec.fieldContext_TestResult_endTime(ctx, field)
+ case "execution":
+ return ec.fieldContext_TestResult_execution(ctx, field)
+ case "exitCode":
+ return ec.fieldContext_TestResult_exitCode(ctx, field)
+ case "groupID":
+ return ec.fieldContext_TestResult_groupID(ctx, field)
+ case "logs":
+ return ec.fieldContext_TestResult_logs(ctx, field)
+ case "startTime":
+ return ec.fieldContext_TestResult_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_TestResult_status(ctx, field)
+ case "taskId":
+ return ec.fieldContext_TestResult_taskId(ctx, field)
+ case "testFile":
+ return ec.fieldContext_TestResult_testFile(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TestResult", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskTestResult_totalTestCount(ctx context.Context, field graphql.CollectedField, obj *TaskTestResult) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResult_totalTestCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.TotalTestCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -38954,62 +50038,83 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
+func (ec *executionContext) fieldContext_TaskTestResult_totalTestCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResult",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskTestResult_filteredTestCount(ctx context.Context, field graphql.CollectedField, obj *TaskTestResult) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResult_filteredTestCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.FilteredTestCount, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
+func (ec *executionContext) fieldContext_TaskTestResult_filteredTestCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResult",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskTestResultSample_execution(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResultSample_execution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Args, nil
+ return obj.Execution, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39021,30 +50126,39 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.([]introspection.InputValue)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
+func (ec *executionContext) fieldContext_TaskTestResultSample_execution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResultSample",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TaskTestResultSample_matchingFailedTestNames(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResultSample_matchingFailedTestNames(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return obj.MatchingFailedTestNames, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39056,30 +50170,39 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.([]string)
fc.Result = res
- return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TaskTestResultSample_matchingFailedTestNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResultSample",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TaskTestResultSample_taskId(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResultSample_taskId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.IsDeprecated(), nil
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39091,62 +50214,39 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra
}
return graphql.Null
}
- res := resTmp.(bool)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Field",
+func (ec *executionContext) fieldContext_TaskTestResultSample_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResultSample",
Field: field,
- Args: nil,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.DeprecationReason(), nil
- })
+func (ec *executionContext) _TaskTestResultSample_totalTestCount(ctx context.Context, field graphql.CollectedField, obj *TaskTestResultSample) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TaskTestResultSample_totalTestCount(ctx, field)
if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
- fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
+ return obj.TotalTestCount, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39158,30 +50258,39 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
+func (ec *executionContext) fieldContext_TaskTestResultSample_totalTestCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TaskTestResultSample",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TestLog_lineNum(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestLog_lineNum(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.LineNum, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39190,65 +50299,80 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
+func (ec *executionContext) fieldContext_TestLog_lineNum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestLog",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TestLog_url(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestLog_url(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Type, nil
+ return obj.URL, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
+func (ec *executionContext) fieldContext_TestLog_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestLog",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TestLog_urlLobster(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestLog_urlLobster(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.DefaultValue, nil
+ return obj.URLLobster, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39262,127 +50386,160 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel
return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestLog_urlLobster(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestLog",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestLog_urlParsley(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestLog_urlParsley(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Types(), nil
+ return obj.URLParsley, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestLog_urlParsley(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestLog",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestLog_urlRaw(ctx context.Context, field graphql.CollectedField, obj *model.TestLogs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestLog_urlRaw(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.QueryType(), nil
+ return obj.URLRaw, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestLog_urlRaw(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestLog",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_id(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.MutationType(), nil
+ return obj.ID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_baseStatus(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_baseStatus(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.SubscriptionType(), nil
+ return obj.BaseStatus, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39391,100 +50548,121 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_baseStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_duration(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_duration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Directives(), nil
+ return obj.Duration, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.([]introspection.Directive)
+ res := resTmp.(float64)
fc.Result = res
- return ec.marshalN__Directive2ágithubácomá99designságqlgenágraphqláintrospectionáDirectiveá(ctx, field.Selections, res)
+ return ec.marshalOFloat2float64(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_duration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Float does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_endTime(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_endTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Kind(), nil
+ return obj.EndTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_endTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_execution(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_execution(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Name(), nil
+ return obj.Execution, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39493,30 +50671,39 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2ástring(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_execution(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_exitCode(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_exitCode(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description(), nil
+ return obj.ExitCode, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39525,37 +50712,39 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(int)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
+func (ec *executionContext) fieldContext_TestResult_exitCode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
Field: field,
- Args: nil,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field___Type_fields_args(ctx, rawArgs)
+func (ec *executionContext) _TestResult_groupID(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_groupID(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Fields(args["includeDeprecated"].(bool)), nil
+ return obj.GroupID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39564,62 +50753,95 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]introspection.Field)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__Field2ágithubácomá99designságqlgenágraphqláintrospectionáFieldá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_groupID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_logs(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_logs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Interfaces(), nil
+ return obj.Logs, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]introspection.Type)
+ res := resTmp.(model.TestLogs)
fc.Result = res
- return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)
+ return ec.marshalNTestLog2githubácomáevergreenáciáevergreenárestámodeláTestLogs(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_logs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "lineNum":
+ return ec.fieldContext_TestLog_lineNum(ctx, field)
+ case "url":
+ return ec.fieldContext_TestLog_url(ctx, field)
+ case "urlLobster":
+ return ec.fieldContext_TestLog_urlLobster(ctx, field)
+ case "urlParsley":
+ return ec.fieldContext_TestLog_urlParsley(ctx, field)
+ case "urlRaw":
+ return ec.fieldContext_TestLog_urlRaw(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TestLog", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_startTime(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_startTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.PossibleTypes(), nil
+ return obj.StartTime, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39628,69 +50850,83 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]introspection.Type)
+ res := resTmp.(*time.Time)
fc.Result = res
- return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
- Object: "__Type",
+func (ec *executionContext) fieldContext_TestResult_startTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
Field: field,
- Args: nil,
- IsMethod: true,
+ IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
+func (ec *executionContext) _TestResult_status(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_status(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EnumValues(args["includeDeprecated"].(bool)), nil
+ return obj.Status, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.([]introspection.EnumValue)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__EnumValue2ágithubácomá99designságqlgenágraphqláintrospectionáEnumValueá(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_taskId(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_taskId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.InputFields(), nil
+ return obj.TaskID, nil
})
if err != nil {
ec.Error(ctx, err)
@@ -39699,69 +50935,7841 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.([]introspection.InputValue)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_TestResult_taskId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TestResult_testFile(ctx context.Context, field graphql.CollectedField, obj *model.APITest) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TestResult_testFile(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.OfType(), nil
+ return obj.TestFile, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
}
-// endregion **************************** field.gotpl *****************************
-
-// region **************************** input.gotpl *****************************
-
-func (ec *executionContext) unmarshalInputBuildBaronSettingsInput(ctx context.Context, obj interface{}) (model.APIBuildBaronSettings, error) {
- var it model.APIBuildBaronSettings
+func (ec *executionContext) fieldContext_TestResult_testFile(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TestResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_assignedTeam(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_assignedTeam(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.TicketFields().AssignedTeam(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_assignedTeam(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_assigneeDisplayName(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_assigneeDisplayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.TicketFields().AssigneeDisplayName(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_assigneeDisplayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_created(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_created(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Created, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_created(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_resolutionName(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_resolutionName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.TicketFields().ResolutionName(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_resolutionName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_status(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Status, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*thirdparty.JiraStatus)
+ fc.Result = res
+ return ec.marshalNJiraStatus2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraStatus(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_JiraStatus_id(ctx, field)
+ case "name":
+ return ec.fieldContext_JiraStatus_name(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type JiraStatus", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_summary(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_summary(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Summary, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_summary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TicketFields_updated(ctx context.Context, field graphql.CollectedField, obj *thirdparty.TicketFields) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TicketFields_updated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Updated, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TicketFields_updated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TicketFields",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_alias(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_alias(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Alias, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_buildVariantRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_buildVariantRegex(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.BuildVariantRegex, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_buildVariantRegex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_configFile(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_configFile(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ConfigFile, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_configFile(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_dateCutoff(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_dateCutoff(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DateCutoff, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*int)
+ fc.Result = res
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_dateCutoff(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_level(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_level(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Level, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_level(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_project(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Project, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_status(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Status, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TriggerAlias_taskRegex(ctx context.Context, field graphql.CollectedField, obj *model.APITriggerDefinition) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TriggerAlias_taskRegex(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TaskRegex, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TriggerAlias_taskRegex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TriggerAlias",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UIConfig_defaultProject(ctx context.Context, field graphql.CollectedField, obj *model.APIUIConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UIConfig_defaultProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DefaultProject, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UIConfig_defaultProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UIConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UIConfig_userVoice(ctx context.Context, field graphql.CollectedField, obj *model.APIUIConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UIConfig_userVoice(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.UserVoice, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UIConfig_userVoice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UIConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_owner(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_owner(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Owner, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_project(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Project, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_repo(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_repo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Repo, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_resourceID(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_resourceID(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ResourceID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_resourceID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_revision(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_revision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Revision, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_revision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_task(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_task(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Task, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APITask)
+ fc.Result = res
+ return ec.marshalOTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_task(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_triggerID(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_triggerID(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TriggerID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_triggerID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_triggerType(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_triggerType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TriggerType, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_triggerType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UpstreamProject_version(ctx context.Context, field graphql.CollectedField, obj *UpstreamProject) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UpstreamProject_version(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Version, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIVersion)
+ fc.Result = res
+ return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UpstreamProject_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UpstreamProject",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx context.Context, field graphql.CollectedField, obj *model.APIUseSpruceOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.HasUsedMainlineCommitsBefore, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UseSpruceOptions",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UseSpruceOptions_hasUsedSpruceBefore(ctx context.Context, field graphql.CollectedField, obj *model.APIUseSpruceOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UseSpruceOptions_hasUsedSpruceBefore(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.HasUsedSpruceBefore, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UseSpruceOptions_hasUsedSpruceBefore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UseSpruceOptions",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UseSpruceOptions_spruceV1(ctx context.Context, field graphql.CollectedField, obj *model.APIUseSpruceOptions) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UseSpruceOptions_spruceV1(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SpruceV1, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UseSpruceOptions_spruceV1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UseSpruceOptions",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _User_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_User_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DisplayName, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_User_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "User",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _User_emailAddress(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_User_emailAddress(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.EmailAddress, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_User_emailAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "User",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _User_patches(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_User_patches(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.User().Patches(rctx, obj, fc.Args["patchesInput"].(PatchesInput))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Patches)
+ fc.Result = res
+ return ec.marshalNPatches2ágithubácomáevergreenáciáevergreenágraphqláPatches(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_User_patches(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "User",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "filteredPatchCount":
+ return ec.fieldContext_Patches_filteredPatchCount(ctx, field)
+ case "patches":
+ return ec.fieldContext_Patches_patches(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patches", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_User_patches_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _User_permissions(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_User_permissions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.User().Permissions(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*Permissions)
+ fc.Result = res
+ return ec.marshalNPermissions2ágithubácomáevergreenáciáevergreenágraphqláPermissions(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_User_permissions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "User",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "canCreateProject":
+ return ec.fieldContext_Permissions_canCreateProject(ctx, field)
+ case "userId":
+ return ec.fieldContext_Permissions_userId(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Permissions", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _User_subscriptions(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_User_subscriptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.User().Subscriptions(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*model.APISubscription)
+ fc.Result = res
+ return ec.marshalOGeneralSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_User_subscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "User",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_GeneralSubscription_id(ctx, field)
+ case "ownerType":
+ return ec.fieldContext_GeneralSubscription_ownerType(ctx, field)
+ case "regexSelectors":
+ return ec.fieldContext_GeneralSubscription_regexSelectors(ctx, field)
+ case "resourceType":
+ return ec.fieldContext_GeneralSubscription_resourceType(ctx, field)
+ case "selectors":
+ return ec.fieldContext_GeneralSubscription_selectors(ctx, field)
+ case "subscriber":
+ return ec.fieldContext_GeneralSubscription_subscriber(ctx, field)
+ case "trigger":
+ return ec.fieldContext_GeneralSubscription_trigger(ctx, field)
+ case "triggerData":
+ return ec.fieldContext_GeneralSubscription_triggerData(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GeneralSubscription", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _User_userId(ctx context.Context, field graphql.CollectedField, obj *model.APIDBUser) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_User_userId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.UserID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_User_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "User",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserConfig_api_key(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserConfig_api_key(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.APIKey, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserConfig_api_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserConfig_api_server_host(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserConfig_api_server_host(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.APIServerHost, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserConfig_api_server_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserConfig_ui_server_host(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserConfig_ui_server_host(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.UIServerHost, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserConfig_ui_server_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserConfig_user(ctx context.Context, field graphql.CollectedField, obj *UserConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserConfig_user(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.User, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserConfig_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_githubUser(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_githubUser(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GithubUser, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIGithubUser)
+ fc.Result = res
+ return ec.marshalOGithubUser2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubUser(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_githubUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "lastKnownAs":
+ return ec.fieldContext_GithubUser_lastKnownAs(ctx, field)
+ case "uid":
+ return ec.fieldContext_GithubUser_uid(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GithubUser", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_notifications(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_notifications(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Notifications, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APINotificationPreferences)
+ fc.Result = res
+ return ec.marshalONotifications2ágithubácomáevergreenáciáevergreenárestámodeláAPINotificationPreferences(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_notifications(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "buildBreak":
+ return ec.fieldContext_Notifications_buildBreak(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Notifications_commitQueue(ctx, field)
+ case "patchFinish":
+ return ec.fieldContext_Notifications_patchFinish(ctx, field)
+ case "patchFirstFailure":
+ return ec.fieldContext_Notifications_patchFirstFailure(ctx, field)
+ case "spawnHostExpiration":
+ return ec.fieldContext_Notifications_spawnHostExpiration(ctx, field)
+ case "spawnHostOutcome":
+ return ec.fieldContext_Notifications_spawnHostOutcome(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Notifications", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_region(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_region(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Region, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_slackUsername(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_slackUsername(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SlackUsername, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_slackUsername(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_slackMemberId(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_slackMemberId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SlackMemberId, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_slackMemberId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_timezone(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_timezone(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Timezone, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_timezone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_useSpruceOptions(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_useSpruceOptions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.UseSpruceOptions, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIUseSpruceOptions)
+ fc.Result = res
+ return ec.marshalOUseSpruceOptions2ágithubácomáevergreenáciáevergreenárestámodeláAPIUseSpruceOptions(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_useSpruceOptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasUsedMainlineCommitsBefore":
+ return ec.fieldContext_UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx, field)
+ case "hasUsedSpruceBefore":
+ return ec.fieldContext_UseSpruceOptions_hasUsedSpruceBefore(ctx, field)
+ case "spruceV1":
+ return ec.fieldContext_UseSpruceOptions_spruceV1(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type UseSpruceOptions", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _UserSettings_dateFormat(ctx context.Context, field graphql.CollectedField, obj *model.APIUserSettings) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_UserSettings_dateFormat(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DateFormat, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_UserSettings_dateFormat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "UserSettings",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _VariantTask_name(ctx context.Context, field graphql.CollectedField, obj *model.VariantTask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_VariantTask_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_VariantTask_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "VariantTask",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _VariantTask_tasks(ctx context.Context, field graphql.CollectedField, obj *model.VariantTask) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_VariantTask_tasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Tasks, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*string)
+ fc.Result = res
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_VariantTask_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "VariantTask",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_id(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_activated(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_activated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Activated, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_activated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_author(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Author, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_baseTaskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().BaseTaskStatuses(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_baseTaskStatuses(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_baseVersion(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_baseVersion(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().BaseVersion(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIVersion)
+ fc.Result = res
+ return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_baseVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_branch(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_branch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Branch, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_branch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_buildVariants(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_buildVariants(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().BuildVariants(rctx, obj, fc.Args["options"].(BuildVariantOptions))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*GroupedBuildVariant)
+ fc.Result = res
+ return ec.marshalOGroupedBuildVariant2áágithubácomáevergreenáciáevergreenágraphqláGroupedBuildVariant(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_buildVariants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayName":
+ return ec.fieldContext_GroupedBuildVariant_displayName(ctx, field)
+ case "tasks":
+ return ec.fieldContext_GroupedBuildVariant_tasks(ctx, field)
+ case "variant":
+ return ec.fieldContext_GroupedBuildVariant_variant(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GroupedBuildVariant", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Version_buildVariants_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_buildVariantStats(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_buildVariantStats(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().BuildVariantStats(rctx, obj, fc.Args["options"].(BuildVariantOptions))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*task.GroupedTaskStatusCount)
+ fc.Result = res
+ return ec.marshalOGroupedTaskStatusCount2áágithubácomáevergreenáciáevergreenámodelátaskáGroupedTaskStatusCountá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_buildVariantStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "displayName":
+ return ec.fieldContext_GroupedTaskStatusCount_displayName(ctx, field)
+ case "statusCounts":
+ return ec.fieldContext_GroupedTaskStatusCount_statusCounts(ctx, field)
+ case "variant":
+ return ec.fieldContext_GroupedTaskStatusCount_variant(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type GroupedTaskStatusCount", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Version_buildVariantStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_childVersions(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_childVersions(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().ChildVersions(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]*model.APIVersion)
+ fc.Result = res
+ return ec.marshalOVersion2áágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_childVersions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_createTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_createTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CreateTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*time.Time)
+ fc.Result = res
+ return ec.marshalNTime2átimeáTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_errors(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_errors(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Errors, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*string)
+ fc.Result = res
+ return ec.marshalNString2áástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_errors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_finishTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_finishTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.FinishTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*time.Time)
+ fc.Result = res
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_finishTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_isPatch(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_isPatch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().IsPatch(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_isPatch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_manifest(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_manifest(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().Manifest(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*Manifest)
+ fc.Result = res
+ return ec.marshalOManifest2ágithubácomáevergreenáciáevergreenágraphqláManifest(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_manifest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Manifest_id(ctx, field)
+ case "branch":
+ return ec.fieldContext_Manifest_branch(ctx, field)
+ case "isBase":
+ return ec.fieldContext_Manifest_isBase(ctx, field)
+ case "moduleOverrides":
+ return ec.fieldContext_Manifest_moduleOverrides(ctx, field)
+ case "modules":
+ return ec.fieldContext_Manifest_modules(ctx, field)
+ case "project":
+ return ec.fieldContext_Manifest_project(ctx, field)
+ case "revision":
+ return ec.fieldContext_Manifest_revision(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Manifest", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_message(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Message, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_order(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_order(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Order, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_parameters(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_parameters(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Parameters, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]model.APIParameter)
+ fc.Result = res
+ return ec.marshalNParameter2ágithubácomáevergreenáciáevergreenárestámodeláAPIParameterá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_parameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_Parameter_key(ctx, field)
+ case "value":
+ return ec.fieldContext_Parameter_value(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Parameter", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_patch(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_patch(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().Patch(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIPatch)
+ fc.Result = res
+ return ec.marshalOPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_patch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Patch_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Patch_activated(ctx, field)
+ case "alias":
+ return ec.fieldContext_Patch_alias(ctx, field)
+ case "author":
+ return ec.fieldContext_Patch_author(ctx, field)
+ case "authorDisplayName":
+ return ec.fieldContext_Patch_authorDisplayName(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Patch_baseTaskStatuses(ctx, field)
+ case "builds":
+ return ec.fieldContext_Patch_builds(ctx, field)
+ case "canEnqueueToCommitQueue":
+ return ec.fieldContext_Patch_canEnqueueToCommitQueue(ctx, field)
+ case "childPatchAliases":
+ return ec.fieldContext_Patch_childPatchAliases(ctx, field)
+ case "childPatches":
+ return ec.fieldContext_Patch_childPatches(ctx, field)
+ case "commitQueuePosition":
+ return ec.fieldContext_Patch_commitQueuePosition(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Patch_createTime(ctx, field)
+ case "description":
+ return ec.fieldContext_Patch_description(ctx, field)
+ case "duration":
+ return ec.fieldContext_Patch_duration(ctx, field)
+ case "githash":
+ return ec.fieldContext_Patch_githash(ctx, field)
+ case "moduleCodeChanges":
+ return ec.fieldContext_Patch_moduleCodeChanges(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Patch_parameters(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Patch_patchNumber(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Patch_patchTriggerAliases(ctx, field)
+ case "project":
+ return ec.fieldContext_Patch_project(ctx, field)
+ case "projectID":
+ return ec.fieldContext_Patch_projectID(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Patch_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Patch_projectMetadata(ctx, field)
+ case "status":
+ return ec.fieldContext_Patch_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Patch_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Patch_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Patch_taskStatuses(ctx, field)
+ case "time":
+ return ec.fieldContext_Patch_time(ctx, field)
+ case "variants":
+ return ec.fieldContext_Patch_variants(ctx, field)
+ case "variantsTasks":
+ return ec.fieldContext_Patch_variantsTasks(ctx, field)
+ case "versionFull":
+ return ec.fieldContext_Patch_versionFull(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Patch", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_previousVersion(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_previousVersion(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().PreviousVersion(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIVersion)
+ fc.Result = res
+ return ec.marshalOVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_previousVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Version_id(ctx, field)
+ case "activated":
+ return ec.fieldContext_Version_activated(ctx, field)
+ case "author":
+ return ec.fieldContext_Version_author(ctx, field)
+ case "baseTaskStatuses":
+ return ec.fieldContext_Version_baseTaskStatuses(ctx, field)
+ case "baseVersion":
+ return ec.fieldContext_Version_baseVersion(ctx, field)
+ case "branch":
+ return ec.fieldContext_Version_branch(ctx, field)
+ case "buildVariants":
+ return ec.fieldContext_Version_buildVariants(ctx, field)
+ case "buildVariantStats":
+ return ec.fieldContext_Version_buildVariantStats(ctx, field)
+ case "childVersions":
+ return ec.fieldContext_Version_childVersions(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Version_createTime(ctx, field)
+ case "errors":
+ return ec.fieldContext_Version_errors(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Version_finishTime(ctx, field)
+ case "isPatch":
+ return ec.fieldContext_Version_isPatch(ctx, field)
+ case "manifest":
+ return ec.fieldContext_Version_manifest(ctx, field)
+ case "message":
+ return ec.fieldContext_Version_message(ctx, field)
+ case "order":
+ return ec.fieldContext_Version_order(ctx, field)
+ case "parameters":
+ return ec.fieldContext_Version_parameters(ctx, field)
+ case "patch":
+ return ec.fieldContext_Version_patch(ctx, field)
+ case "previousVersion":
+ return ec.fieldContext_Version_previousVersion(ctx, field)
+ case "project":
+ return ec.fieldContext_Version_project(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Version_projectIdentifier(ctx, field)
+ case "projectMetadata":
+ return ec.fieldContext_Version_projectMetadata(ctx, field)
+ case "repo":
+ return ec.fieldContext_Version_repo(ctx, field)
+ case "requester":
+ return ec.fieldContext_Version_requester(ctx, field)
+ case "revision":
+ return ec.fieldContext_Version_revision(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Version_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Version_status(ctx, field)
+ case "taskCount":
+ return ec.fieldContext_Version_taskCount(ctx, field)
+ case "tasks":
+ return ec.fieldContext_Version_tasks(ctx, field)
+ case "taskStatuses":
+ return ec.fieldContext_Version_taskStatuses(ctx, field)
+ case "taskStatusStats":
+ return ec.fieldContext_Version_taskStatusStats(ctx, field)
+ case "upstreamProject":
+ return ec.fieldContext_Version_upstreamProject(ctx, field)
+ case "versionTiming":
+ return ec.fieldContext_Version_versionTiming(ctx, field)
+ case "externalLinksForMetadata":
+ return ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ case "warnings":
+ return ec.fieldContext_Version_warnings(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Version", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_project(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_project(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Project, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_project(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_projectIdentifier(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_projectIdentifier(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ProjectIdentifier, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_projectIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_projectMetadata(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_projectMetadata(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().ProjectMetadata(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIProjectRef)
+ fc.Result = res
+ return ec.marshalOProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_projectMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Project_id(ctx, field)
+ case "admins":
+ return ec.fieldContext_Project_admins(ctx, field)
+ case "batchTime":
+ return ec.fieldContext_Project_batchTime(ctx, field)
+ case "branch":
+ return ec.fieldContext_Project_branch(ctx, field)
+ case "buildBaronSettings":
+ return ec.fieldContext_Project_buildBaronSettings(ctx, field)
+ case "commitQueue":
+ return ec.fieldContext_Project_commitQueue(ctx, field)
+ case "containerSizeDefinitions":
+ return ec.fieldContext_Project_containerSizeDefinitions(ctx, field)
+ case "deactivatePrevious":
+ return ec.fieldContext_Project_deactivatePrevious(ctx, field)
+ case "disabledStatsCache":
+ return ec.fieldContext_Project_disabledStatsCache(ctx, field)
+ case "dispatchingDisabled":
+ return ec.fieldContext_Project_dispatchingDisabled(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Project_displayName(ctx, field)
+ case "enabled":
+ return ec.fieldContext_Project_enabled(ctx, field)
+ case "githubChecksEnabled":
+ return ec.fieldContext_Project_githubChecksEnabled(ctx, field)
+ case "githubTriggerAliases":
+ return ec.fieldContext_Project_githubTriggerAliases(ctx, field)
+ case "gitTagAuthorizedTeams":
+ return ec.fieldContext_Project_gitTagAuthorizedTeams(ctx, field)
+ case "gitTagAuthorizedUsers":
+ return ec.fieldContext_Project_gitTagAuthorizedUsers(ctx, field)
+ case "gitTagVersionsEnabled":
+ return ec.fieldContext_Project_gitTagVersionsEnabled(ctx, field)
+ case "hidden":
+ return ec.fieldContext_Project_hidden(ctx, field)
+ case "identifier":
+ return ec.fieldContext_Project_identifier(ctx, field)
+ case "isFavorite":
+ return ec.fieldContext_Project_isFavorite(ctx, field)
+ case "manualPrTestingEnabled":
+ return ec.fieldContext_Project_manualPrTestingEnabled(ctx, field)
+ case "notifyOnBuildFailure":
+ return ec.fieldContext_Project_notifyOnBuildFailure(ctx, field)
+ case "owner":
+ return ec.fieldContext_Project_owner(ctx, field)
+ case "patches":
+ return ec.fieldContext_Project_patches(ctx, field)
+ case "patchingDisabled":
+ return ec.fieldContext_Project_patchingDisabled(ctx, field)
+ case "patchTriggerAliases":
+ return ec.fieldContext_Project_patchTriggerAliases(ctx, field)
+ case "perfEnabled":
+ return ec.fieldContext_Project_perfEnabled(ctx, field)
+ case "periodicBuilds":
+ return ec.fieldContext_Project_periodicBuilds(ctx, field)
+ case "private":
+ return ec.fieldContext_Project_private(ctx, field)
+ case "prTestingEnabled":
+ return ec.fieldContext_Project_prTestingEnabled(ctx, field)
+ case "remotePath":
+ return ec.fieldContext_Project_remotePath(ctx, field)
+ case "repo":
+ return ec.fieldContext_Project_repo(ctx, field)
+ case "repoRefId":
+ return ec.fieldContext_Project_repoRefId(ctx, field)
+ case "repotrackerDisabled":
+ return ec.fieldContext_Project_repotrackerDisabled(ctx, field)
+ case "restricted":
+ return ec.fieldContext_Project_restricted(ctx, field)
+ case "spawnHostScriptPath":
+ return ec.fieldContext_Project_spawnHostScriptPath(ctx, field)
+ case "stepbackDisabled":
+ return ec.fieldContext_Project_stepbackDisabled(ctx, field)
+ case "taskAnnotationSettings":
+ return ec.fieldContext_Project_taskAnnotationSettings(ctx, field)
+ case "taskSync":
+ return ec.fieldContext_Project_taskSync(ctx, field)
+ case "tracksPushEvents":
+ return ec.fieldContext_Project_tracksPushEvents(ctx, field)
+ case "triggers":
+ return ec.fieldContext_Project_triggers(ctx, field)
+ case "versionControlEnabled":
+ return ec.fieldContext_Project_versionControlEnabled(ctx, field)
+ case "workstationConfig":
+ return ec.fieldContext_Project_workstationConfig(ctx, field)
+ case "externalLinks":
+ return ec.fieldContext_Project_externalLinks(ctx, field)
+ case "banner":
+ return ec.fieldContext_Project_banner(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Project", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_repo(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_repo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Repo, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_repo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_requester(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_requester(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Requester, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_requester(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_revision(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_revision(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Revision, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_revision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_startTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_startTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.StartTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*time.Time)
+ fc.Result = res
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_startTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_status(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().Status(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_taskCount(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_taskCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().TaskCount(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*int)
+ fc.Result = res
+ return ec.marshalOInt2áint(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_taskCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_tasks(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_tasks(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().Tasks(rctx, obj, fc.Args["options"].(TaskFilterOptions))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*VersionTasks)
+ fc.Result = res
+ return ec.marshalNVersionTasks2ágithubácomáevergreenáciáevergreenágraphqláVersionTasks(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "count":
+ return ec.fieldContext_VersionTasks_count(ctx, field)
+ case "data":
+ return ec.fieldContext_VersionTasks_data(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type VersionTasks", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Version_tasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_taskStatuses(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_taskStatuses(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().TaskStatuses(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_taskStatuses(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_taskStatusStats(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_taskStatusStats(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().TaskStatusStats(rctx, obj, fc.Args["options"].(BuildVariantOptions))
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*task.TaskStats)
+ fc.Result = res
+ return ec.marshalOTaskStats2ágithubácomáevergreenáciáevergreenámodelátaskáTaskStats(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_taskStatusStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "counts":
+ return ec.fieldContext_TaskStats_counts(ctx, field)
+ case "eta":
+ return ec.fieldContext_TaskStats_eta(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TaskStats", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Version_taskStatusStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_upstreamProject(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_upstreamProject(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().UpstreamProject(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*UpstreamProject)
+ fc.Result = res
+ return ec.marshalOUpstreamProject2ágithubácomáevergreenáciáevergreenágraphqláUpstreamProject(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_upstreamProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "owner":
+ return ec.fieldContext_UpstreamProject_owner(ctx, field)
+ case "project":
+ return ec.fieldContext_UpstreamProject_project(ctx, field)
+ case "repo":
+ return ec.fieldContext_UpstreamProject_repo(ctx, field)
+ case "resourceID":
+ return ec.fieldContext_UpstreamProject_resourceID(ctx, field)
+ case "revision":
+ return ec.fieldContext_UpstreamProject_revision(ctx, field)
+ case "task":
+ return ec.fieldContext_UpstreamProject_task(ctx, field)
+ case "triggerID":
+ return ec.fieldContext_UpstreamProject_triggerID(ctx, field)
+ case "triggerType":
+ return ec.fieldContext_UpstreamProject_triggerType(ctx, field)
+ case "version":
+ return ec.fieldContext_UpstreamProject_version(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type UpstreamProject", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_versionTiming(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_versionTiming(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().VersionTiming(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*VersionTiming)
+ fc.Result = res
+ return ec.marshalOVersionTiming2ágithubácomáevergreenáciáevergreenágraphqláVersionTiming(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_versionTiming(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "makespan":
+ return ec.fieldContext_VersionTiming_makespan(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_VersionTiming_timeTaken(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type VersionTiming", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_externalLinksForMetadata(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_externalLinksForMetadata(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().ExternalLinksForMetadata(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*ExternalLinkForMetadata)
+ fc.Result = res
+ return ec.marshalNExternalLinkForMetadata2áágithubácomáevergreenáciáevergreenágraphqláExternalLinkForMetadataá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_externalLinksForMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "url":
+ return ec.fieldContext_ExternalLinkForMetadata_url(ctx, field)
+ case "displayName":
+ return ec.fieldContext_ExternalLinkForMetadata_displayName(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ExternalLinkForMetadata", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Version_warnings(ctx context.Context, field graphql.CollectedField, obj *model.APIVersion) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Version_warnings(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Version().Warnings(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalNString2ástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Version_warnings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Version",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _VersionTasks_count(ctx context.Context, field graphql.CollectedField, obj *VersionTasks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_VersionTasks_count(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Count, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_VersionTasks_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "VersionTasks",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _VersionTasks_data(ctx context.Context, field graphql.CollectedField, obj *VersionTasks) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_VersionTasks_data(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Data, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*model.APITask)
+ fc.Result = res
+ return ec.marshalNTask2áágithubácomáevergreenáciáevergreenárestámodeláAPITaská(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_VersionTasks_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "VersionTasks",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Task_id(ctx, field)
+ case "aborted":
+ return ec.fieldContext_Task_aborted(ctx, field)
+ case "abortInfo":
+ return ec.fieldContext_Task_abortInfo(ctx, field)
+ case "activated":
+ return ec.fieldContext_Task_activated(ctx, field)
+ case "activatedBy":
+ return ec.fieldContext_Task_activatedBy(ctx, field)
+ case "activatedTime":
+ return ec.fieldContext_Task_activatedTime(ctx, field)
+ case "ami":
+ return ec.fieldContext_Task_ami(ctx, field)
+ case "annotation":
+ return ec.fieldContext_Task_annotation(ctx, field)
+ case "baseStatus":
+ return ec.fieldContext_Task_baseStatus(ctx, field)
+ case "baseTask":
+ return ec.fieldContext_Task_baseTask(ctx, field)
+ case "blocked":
+ return ec.fieldContext_Task_blocked(ctx, field)
+ case "buildId":
+ return ec.fieldContext_Task_buildId(ctx, field)
+ case "buildVariant":
+ return ec.fieldContext_Task_buildVariant(ctx, field)
+ case "buildVariantDisplayName":
+ return ec.fieldContext_Task_buildVariantDisplayName(ctx, field)
+ case "canAbort":
+ return ec.fieldContext_Task_canAbort(ctx, field)
+ case "canDisable":
+ return ec.fieldContext_Task_canDisable(ctx, field)
+ case "canModifyAnnotation":
+ return ec.fieldContext_Task_canModifyAnnotation(ctx, field)
+ case "canOverrideDependencies":
+ return ec.fieldContext_Task_canOverrideDependencies(ctx, field)
+ case "canRestart":
+ return ec.fieldContext_Task_canRestart(ctx, field)
+ case "canSchedule":
+ return ec.fieldContext_Task_canSchedule(ctx, field)
+ case "canSetPriority":
+ return ec.fieldContext_Task_canSetPriority(ctx, field)
+ case "canSync":
+ return ec.fieldContext_Task_canSync(ctx, field)
+ case "canUnschedule":
+ return ec.fieldContext_Task_canUnschedule(ctx, field)
+ case "containerAllocatedTime":
+ return ec.fieldContext_Task_containerAllocatedTime(ctx, field)
+ case "createTime":
+ return ec.fieldContext_Task_createTime(ctx, field)
+ case "dependsOn":
+ return ec.fieldContext_Task_dependsOn(ctx, field)
+ case "details":
+ return ec.fieldContext_Task_details(ctx, field)
+ case "dispatchTime":
+ return ec.fieldContext_Task_dispatchTime(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Task_displayName(ctx, field)
+ case "displayOnly":
+ return ec.fieldContext_Task_displayOnly(ctx, field)
+ case "displayTask":
+ return ec.fieldContext_Task_displayTask(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Task_distroId(ctx, field)
+ case "estimatedStart":
+ return ec.fieldContext_Task_estimatedStart(ctx, field)
+ case "execution":
+ return ec.fieldContext_Task_execution(ctx, field)
+ case "executionTasks":
+ return ec.fieldContext_Task_executionTasks(ctx, field)
+ case "executionTasksFull":
+ return ec.fieldContext_Task_executionTasksFull(ctx, field)
+ case "expectedDuration":
+ return ec.fieldContext_Task_expectedDuration(ctx, field)
+ case "failedTestCount":
+ return ec.fieldContext_Task_failedTestCount(ctx, field)
+ case "finishTime":
+ return ec.fieldContext_Task_finishTime(ctx, field)
+ case "generatedBy":
+ return ec.fieldContext_Task_generatedBy(ctx, field)
+ case "generatedByName":
+ return ec.fieldContext_Task_generatedByName(ctx, field)
+ case "generateTask":
+ return ec.fieldContext_Task_generateTask(ctx, field)
+ case "hostId":
+ return ec.fieldContext_Task_hostId(ctx, field)
+ case "ingestTime":
+ return ec.fieldContext_Task_ingestTime(ctx, field)
+ case "isPerfPluginEnabled":
+ return ec.fieldContext_Task_isPerfPluginEnabled(ctx, field)
+ case "latestExecution":
+ return ec.fieldContext_Task_latestExecution(ctx, field)
+ case "logs":
+ return ec.fieldContext_Task_logs(ctx, field)
+ case "minQueuePosition":
+ return ec.fieldContext_Task_minQueuePosition(ctx, field)
+ case "order":
+ return ec.fieldContext_Task_order(ctx, field)
+ case "patch":
+ return ec.fieldContext_Task_patch(ctx, field)
+ case "patchNumber":
+ return ec.fieldContext_Task_patchNumber(ctx, field)
+ case "pod":
+ return ec.fieldContext_Task_pod(ctx, field)
+ case "priority":
+ return ec.fieldContext_Task_priority(ctx, field)
+ case "project":
+ return ec.fieldContext_Task_project(ctx, field)
+ case "projectId":
+ return ec.fieldContext_Task_projectId(ctx, field)
+ case "projectIdentifier":
+ return ec.fieldContext_Task_projectIdentifier(ctx, field)
+ case "requester":
+ return ec.fieldContext_Task_requester(ctx, field)
+ case "resetWhenFinished":
+ return ec.fieldContext_Task_resetWhenFinished(ctx, field)
+ case "revision":
+ return ec.fieldContext_Task_revision(ctx, field)
+ case "scheduledTime":
+ return ec.fieldContext_Task_scheduledTime(ctx, field)
+ case "spawnHostLink":
+ return ec.fieldContext_Task_spawnHostLink(ctx, field)
+ case "startTime":
+ return ec.fieldContext_Task_startTime(ctx, field)
+ case "status":
+ return ec.fieldContext_Task_status(ctx, field)
+ case "taskFiles":
+ return ec.fieldContext_Task_taskFiles(ctx, field)
+ case "taskGroup":
+ return ec.fieldContext_Task_taskGroup(ctx, field)
+ case "taskGroupMaxHosts":
+ return ec.fieldContext_Task_taskGroupMaxHosts(ctx, field)
+ case "taskLogs":
+ return ec.fieldContext_Task_taskLogs(ctx, field)
+ case "tests":
+ return ec.fieldContext_Task_tests(ctx, field)
+ case "timeTaken":
+ return ec.fieldContext_Task_timeTaken(ctx, field)
+ case "totalTestCount":
+ return ec.fieldContext_Task_totalTestCount(ctx, field)
+ case "versionMetadata":
+ return ec.fieldContext_Task_versionMetadata(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Task", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _VersionTiming_makespan(ctx context.Context, field graphql.CollectedField, obj *VersionTiming) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_VersionTiming_makespan(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Makespan, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIDuration)
+ fc.Result = res
+ return ec.marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_VersionTiming_makespan(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "VersionTiming",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _VersionTiming_timeTaken(ctx context.Context, field graphql.CollectedField, obj *VersionTiming) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_VersionTiming_timeTaken(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TimeTaken, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIDuration)
+ fc.Result = res
+ return ec.marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_VersionTiming_timeTaken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "VersionTiming",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Duration does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_id(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_availabilityZone(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.AvailabilityZone, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_createdBy(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_createdBy(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CreatedBy, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_creationTime(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_creationTime(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CreationTime, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*time.Time)
+ fc.Result = res
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_deviceName(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_deviceName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeviceName, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_deviceName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_displayName(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DisplayName, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_expiration(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_expiration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Expiration, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*time.Time)
+ fc.Result = res
+ return ec.marshalOTime2átimeáTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_expiration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_homeVolume(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_homeVolume(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.HomeVolume, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_homeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_host(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_host(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Volume().Host(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*model.APIHost)
+ fc.Result = res
+ return ec.marshalOHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_host(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Host_id(ctx, field)
+ case "availabilityZone":
+ return ec.fieldContext_Host_availabilityZone(ctx, field)
+ case "ami":
+ return ec.fieldContext_Host_ami(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Host_displayName(ctx, field)
+ case "distro":
+ return ec.fieldContext_Host_distro(ctx, field)
+ case "distroId":
+ return ec.fieldContext_Host_distroId(ctx, field)
+ case "elapsed":
+ return ec.fieldContext_Host_elapsed(ctx, field)
+ case "expiration":
+ return ec.fieldContext_Host_expiration(ctx, field)
+ case "hostUrl":
+ return ec.fieldContext_Host_hostUrl(ctx, field)
+ case "homeVolume":
+ return ec.fieldContext_Host_homeVolume(ctx, field)
+ case "homeVolumeID":
+ return ec.fieldContext_Host_homeVolumeID(ctx, field)
+ case "instanceType":
+ return ec.fieldContext_Host_instanceType(ctx, field)
+ case "instanceTags":
+ return ec.fieldContext_Host_instanceTags(ctx, field)
+ case "lastCommunicationTime":
+ return ec.fieldContext_Host_lastCommunicationTime(ctx, field)
+ case "noExpiration":
+ return ec.fieldContext_Host_noExpiration(ctx, field)
+ case "provider":
+ return ec.fieldContext_Host_provider(ctx, field)
+ case "runningTask":
+ return ec.fieldContext_Host_runningTask(ctx, field)
+ case "startedBy":
+ return ec.fieldContext_Host_startedBy(ctx, field)
+ case "status":
+ return ec.fieldContext_Host_status(ctx, field)
+ case "tag":
+ return ec.fieldContext_Host_tag(ctx, field)
+ case "totalIdleTime":
+ return ec.fieldContext_Host_totalIdleTime(ctx, field)
+ case "uptime":
+ return ec.fieldContext_Host_uptime(ctx, field)
+ case "user":
+ return ec.fieldContext_Host_user(ctx, field)
+ case "volumes":
+ return ec.fieldContext_Host_volumes(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Host", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_hostID(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_hostID(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.HostID, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_hostID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_migrating(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_migrating(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Migrating, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_migrating(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_noExpiration(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_noExpiration(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.NoExpiration, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_noExpiration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_size(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_size(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Size, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Volume_type(ctx context.Context, field graphql.CollectedField, obj *model.APIVolume) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Volume_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Type, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Volume_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Volume",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Webhook_endpoint(ctx context.Context, field graphql.CollectedField, obj *model.APIWebHook) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Webhook_endpoint(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Endpoint, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Webhook_endpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Webhook",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Webhook_secret(ctx context.Context, field graphql.CollectedField, obj *model.APIWebHook) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Webhook_secret(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Secret, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Webhook_secret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Webhook",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookHeader_key(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookHeader) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookHeader_key(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Key, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookHeader_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookHeader",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookHeader_value(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookHeader) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookHeader_value(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Value, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookHeader_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookHeader",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookSubscriber_headers(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriber_headers(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Headers, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]model.APIWebhookHeader)
+ fc.Result = res
+ return ec.marshalNWebhookHeader2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookHeader(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookSubscriber_headers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookSubscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "key":
+ return ec.fieldContext_WebhookHeader_key(ctx, field)
+ case "value":
+ return ec.fieldContext_WebhookHeader_value(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WebhookHeader", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookSubscriber_secret(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriber_secret(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Secret, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookSubscriber_secret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookSubscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookSubscriber_url(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriber_url(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.URL, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookSubscriber_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookSubscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookSubscriber_retries(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriber_retries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Retries, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookSubscriber_retries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookSubscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookSubscriber_minDelayMs(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriber_minDelayMs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.MinDelayMS, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookSubscriber_minDelayMs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookSubscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WebhookSubscriber_timeoutMs(ctx context.Context, field graphql.CollectedField, obj *model.APIWebhookSubscriber) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WebhookSubscriber_timeoutMs(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TimeoutMS, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WebhookSubscriber_timeoutMs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WebhookSubscriber",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WorkstationConfig_gitClone(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WorkstationConfig_gitClone(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.GitClone, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*bool)
+ fc.Result = res
+ return ec.marshalOBoolean2ábool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WorkstationConfig_gitClone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WorkstationConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WorkstationConfig_setupCommands(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationConfig) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WorkstationConfig_setupCommands(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SetupCommands, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]model.APIWorkstationSetupCommand)
+ fc.Result = res
+ return ec.marshalOWorkstationSetupCommand2ágithubácomáevergreenáciáevergreenárestámodeláAPIWorkstationSetupCommandá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WorkstationConfig_setupCommands(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WorkstationConfig",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "command":
+ return ec.fieldContext_WorkstationSetupCommand_command(ctx, field)
+ case "directory":
+ return ec.fieldContext_WorkstationSetupCommand_directory(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type WorkstationSetupCommand", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WorkstationSetupCommand_command(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationSetupCommand) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WorkstationSetupCommand_command(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Command, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WorkstationSetupCommand_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WorkstationSetupCommand",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _WorkstationSetupCommand_directory(ctx context.Context, field graphql.CollectedField, obj *model.APIWorkstationSetupCommand) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_WorkstationSetupCommand_directory(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Directory, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalNString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_WorkstationSetupCommand_directory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "WorkstationSetupCommand",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_locations(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Locations, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalN__DirectiveLocation2ástringá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type __DirectiveLocation does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_args(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Args, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsRepeatable, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsDeprecated(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeprecationReason(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_args(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Args, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Type, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.IsDeprecated(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ fc.Result = res
+ return ec.marshalNBoolean2bool(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DeprecationReason(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Type, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.DefaultValue, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_types(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Types(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_queryType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.QueryType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.MutationType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SubscriptionType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_directives(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Directives(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Directive)
+ fc.Result = res
+ return ec.marshalN__Directive2ágithubácomá99designságqlgenágraphqláintrospectionáDirectiveá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___Directive_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Directive_description(ctx, field)
+ case "locations":
+ return ec.fieldContext___Directive_locations(ctx, field)
+ case "args":
+ return ec.fieldContext___Directive_args(ctx, field)
+ case "isRepeatable":
+ return ec.fieldContext___Directive_isRepeatable(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_kind(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Kind(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type __TypeKind does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_fields(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Field)
+ fc.Result = res
+ return ec.marshalO__Field2ágithubácomá99designságqlgenágraphqláintrospectionáFieldá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___Field_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Field_description(ctx, field)
+ case "args":
+ return ec.fieldContext___Field_args(ctx, field)
+ case "type":
+ return ec.fieldContext___Field_type(ctx, field)
+ case "isDeprecated":
+ return ec.fieldContext___Field_isDeprecated(ctx, field)
+ case "deprecationReason":
+ return ec.fieldContext___Field_deprecationReason(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_interfaces(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Interfaces(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PossibleTypes(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_enumValues(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.EnumValue)
+ fc.Result = res
+ return ec.marshalO__EnumValue2ágithubácomá99designságqlgenágraphqláintrospectionáEnumValueá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___EnumValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___EnumValue_description(ctx, field)
+ case "isDeprecated":
+ return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
+ case "deprecationReason":
+ return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_inputFields(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.InputFields(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.([]introspection.InputValue)
+ fc.Result = res
+ return ec.marshalO__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_ofType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OfType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.SpecifiedByURL(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ástring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+// endregion **************************** field.gotpl *****************************
+
+// region **************************** input.gotpl *****************************
+
+func (ec *executionContext) unmarshalInputBuildBaronSettingsInput(ctx context.Context, obj interface{}) (model.APIBuildBaronSettings, error) {
+ var it model.APIBuildBaronSettings
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"bfSuggestionFeaturesURL", "bfSuggestionPassword", "bfSuggestionServer", "bfSuggestionTimeoutSecs", "bfSuggestionUsername", "ticketCreateProject", "ticketSearchProjects"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "ticketCreateProject":
+ case "bfSuggestionFeaturesURL":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketCreateProject"))
- it.TicketCreateProject, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionFeaturesURL"))
+ it.BFSuggestionFeaturesURL, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "ticketSearchProjects":
+ case "bfSuggestionPassword":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketSearchProjects"))
- it.TicketSearchProjects, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionPassword"))
+ it.BFSuggestionPassword, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -39773,35 +58781,35 @@ func (ec *executionContext) unmarshalInputBuildBaronSettingsInput(ctx context.Co
if err != nil {
return it, err
}
- case "bfSuggestionUsername":
+ case "bfSuggestionTimeoutSecs":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionUsername"))
- it.BFSuggestionUsername, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionTimeoutSecs"))
+ it.BFSuggestionTimeoutSecs, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "bfSuggestionPassword":
+ case "bfSuggestionUsername":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionPassword"))
- it.BFSuggestionPassword, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionUsername"))
+ it.BFSuggestionUsername, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "bfSuggestionTimeoutSecs":
+ case "ticketCreateProject":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionTimeoutSecs"))
- it.BFSuggestionTimeoutSecs, err = ec.unmarshalOInt2áint(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketCreateProject"))
+ it.TicketCreateProject, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "bfSuggestionFeaturesURL":
+ case "ticketSearchProjects":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bfSuggestionFeaturesURL"))
- it.BFSuggestionFeaturesURL, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketSearchProjects"))
+ it.TicketSearchProjects, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
@@ -39818,37 +58826,42 @@ func (ec *executionContext) unmarshalInputBuildVariantOptions(ctx context.Contex
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"includeBaseTasks", "statuses", "tasks", "variants"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "variants":
+ case "includeBaseTasks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variants"))
- it.Variants, err = ec.unmarshalOString2ástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeBaseTasks"))
+ it.IncludeBaseTasks, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "tasks":
+ case "statuses":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tasks"))
- it.Tasks, err = ec.unmarshalOString2ástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statuses"))
+ it.Statuses, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
- case "statuses":
+ case "tasks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statuses"))
- it.Statuses, err = ec.unmarshalOString2ástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tasks"))
+ it.Tasks, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
- case "includeBaseTasks":
+ case "variants":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeBaseTasks"))
- it.IncludeBaseTasks, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variants"))
+ it.Variants, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
@@ -39865,7 +58878,12 @@ func (ec *executionContext) unmarshalInputCommitQueueParamsInput(ctx context.Con
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"enabled", "mergeMethod", "message"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "enabled":
var err error
@@ -39875,14 +58893,6 @@ func (ec *executionContext) unmarshalInputCommitQueueParamsInput(ctx context.Con
if err != nil {
return it, err
}
- case "requireSigned":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requireSigned"))
- it.RequireSigned, err = ec.unmarshalOBoolean2ábool(ctx, v)
- if err != nil {
- return it, err
- }
case "mergeMethod":
var err error
@@ -39905,6 +58915,50 @@ func (ec *executionContext) unmarshalInputCommitQueueParamsInput(ctx context.Con
return it, nil
}
+func (ec *executionContext) unmarshalInputContainerResourcesInput(ctx context.Context, obj interface{}) (model.APIContainerResources, error) {
+ var it model.APIContainerResources
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"name", "cpu", "memoryMb"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "name":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
+ it.Name, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "cpu":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cpu"))
+ it.CPU, err = ec.unmarshalNInt2áint(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "memoryMb":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("memoryMb"))
+ it.MemoryMB, err = ec.unmarshalNInt2áint(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
func (ec *executionContext) unmarshalInputCopyProjectInput(ctx context.Context, obj interface{}) (data.CopyProjectOpts, error) {
var it data.CopyProjectOpts
asMap := map[string]interface{}{}
@@ -39912,13 +58966,18 @@ func (ec *executionContext) unmarshalInputCopyProjectInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"newProjectId", "newProjectIdentifier", "projectIdToCopy"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "projectIdToCopy":
+ case "newProjectId":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdToCopy"))
- it.ProjectIdToCopy, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newProjectId"))
+ it.NewProjectId, err = ec.unmarshalOString2string(ctx, v)
if err != nil {
return it, err
}
@@ -39930,11 +58989,11 @@ func (ec *executionContext) unmarshalInputCopyProjectInput(ctx context.Context,
if err != nil {
return it, err
}
- case "newProjectId":
+ case "projectIdToCopy":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newProjectId"))
- it.NewProjectId, err = ec.unmarshalOString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdToCopy"))
+ it.ProjectIdToCopy, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
@@ -39951,8 +59010,21 @@ func (ec *executionContext) unmarshalInputCreateProjectInput(ctx context.Context
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"id", "identifier", "owner", "repo", "repoRefId"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
+ case "id":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ it.Id, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "identifier":
var err error
@@ -39985,14 +59057,6 @@ func (ec *executionContext) unmarshalInputCreateProjectInput(ctx context.Context
if err != nil {
return it, err
}
- case "id":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
- it.Id, err = ec.unmarshalOString2ástring(ctx, v)
- if err != nil {
- return it, err
- }
}
}
@@ -40006,21 +59070,26 @@ func (ec *executionContext) unmarshalInputDisplayTask(ctx context.Context, obj i
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"ExecTasks", "Name"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "Name":
+ case "ExecTasks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name"))
- it.Name, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ExecTasks"))
+ it.ExecTasks, err = ec.unmarshalNString2ástringá(ctx, v)
if err != nil {
return it, err
}
- case "ExecTasks":
+ case "Name":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ExecTasks"))
- it.ExecTasks, err = ec.unmarshalNString2ástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name"))
+ it.Name, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
@@ -40037,13 +59106,26 @@ func (ec *executionContext) unmarshalInputEditSpawnHostInput(ctx context.Context
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"addedInstanceTags", "deletedInstanceTags", "displayName", "expiration", "hostId", "instanceType", "noExpiration", "publicKey", "savePublicKey", "servicePassword", "volume"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "hostId":
+ case "addedInstanceTags":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostId"))
- it.HostID, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("addedInstanceTags"))
+ it.AddedInstanceTags, err = ec.unmarshalOInstanceTagInput2áágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "deletedInstanceTags":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deletedInstanceTags"))
+ it.DeletedInstanceTags, err = ec.unmarshalOInstanceTagInput2áágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx, v)
if err != nil {
return it, err
}
@@ -40063,11 +59145,11 @@ func (ec *executionContext) unmarshalInputEditSpawnHostInput(ctx context.Context
if err != nil {
return it, err
}
- case "noExpiration":
+ case "hostId":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
- it.NoExpiration, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hostId"))
+ it.HostID, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
@@ -40079,27 +59161,27 @@ func (ec *executionContext) unmarshalInputEditSpawnHostInput(ctx context.Context
if err != nil {
return it, err
}
- case "addedInstanceTags":
+ case "noExpiration":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("addedInstanceTags"))
- it.AddedInstanceTags, err = ec.unmarshalOInstanceTagInput2áágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
+ it.NoExpiration, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "deletedInstanceTags":
+ case "publicKey":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deletedInstanceTags"))
- it.DeletedInstanceTags, err = ec.unmarshalOInstanceTagInput2áágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("publicKey"))
+ it.PublicKey, err = ec.unmarshalOPublicKeyInput2ágithubácomáevergreenáciáevergreenágraphqláPublicKeyInput(ctx, v)
if err != nil {
return it, err
}
- case "volume":
+ case "savePublicKey":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volume"))
- it.Volume, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("savePublicKey"))
+ it.SavePublicKey, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -40111,19 +59193,47 @@ func (ec *executionContext) unmarshalInputEditSpawnHostInput(ctx context.Context
if err != nil {
return it, err
}
- case "publicKey":
+ case "volume":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("publicKey"))
- it.PublicKey, err = ec.unmarshalOPublicKeyInput2ágithubácomáevergreenáciáevergreenágraphqláPublicKeyInput(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volume"))
+ it.Volume, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "savePublicKey":
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputExternalLinkInput(ctx context.Context, obj interface{}) (model.APIExternalLink, error) {
+ var it model.APIExternalLink
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"displayName", "urlTemplate"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "displayName":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("savePublicKey"))
- it.SavePublicKey, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName"))
+ it.DisplayName, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "urlTemplate":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlTemplate"))
+ it.URLTemplate, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40140,7 +59250,12 @@ func (ec *executionContext) unmarshalInputGithubUserInput(ctx context.Context, o
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"lastKnownAs"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "lastKnownAs":
var err error
@@ -40163,7 +59278,12 @@ func (ec *executionContext) unmarshalInputInstanceTagInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"key", "value"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "key":
var err error
@@ -40194,13 +59314,18 @@ func (ec *executionContext) unmarshalInputIssueLinkInput(ctx context.Context, ob
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"confidenceScore", "issueKey", "url"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "url":
+ case "confidenceScore":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url"))
- it.URL, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("confidenceScore"))
+ it.ConfidenceScore, err = ec.unmarshalOFloat2áfloat64(ctx, v)
if err != nil {
return it, err
}
@@ -40212,11 +59337,11 @@ func (ec *executionContext) unmarshalInputIssueLinkInput(ctx context.Context, ob
if err != nil {
return it, err
}
- case "confidenceScore":
+ case "url":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("confidenceScore"))
- it.ConfidenceScore, err = ec.unmarshalOFloat2áfloat64(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url"))
+ it.URL, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40233,8 +59358,21 @@ func (ec *executionContext) unmarshalInputJiraFieldInput(ctx context.Context, ob
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"displayText", "field"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
+ case "displayText":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayText"))
+ it.DisplayText, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "field":
var err error
@@ -40243,11 +59381,39 @@ func (ec *executionContext) unmarshalInputJiraFieldInput(ctx context.Context, ob
if err != nil {
return it, err
}
- case "displayText":
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputJiraIssueSubscriberInput(ctx context.Context, obj interface{}) (model.APIJIRAIssueSubscriber, error) {
+ var it model.APIJIRAIssueSubscriber
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"issueType", "project"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "issueType":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayText"))
- it.DisplayText, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("issueType"))
+ it.IssueType, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "project":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project"))
+ it.Project, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40267,30 +59433,38 @@ func (ec *executionContext) unmarshalInputMainlineCommitsOptions(ctx context.Con
if _, present := asMap["limit"]; !present {
asMap["limit"] = 7
}
+ if _, present := asMap["shouldCollapse"]; !present {
+ asMap["shouldCollapse"] = false
+ }
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"limit", "projectIdentifier", "requesters", "shouldCollapse", "skipOrderNumber"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "projectID":
+ case "limit":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectID"))
- it.ProjectID, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
+ it.Limit, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "limit":
+ case "projectIdentifier":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
- it.Limit, err = ec.unmarshalOInt2áint(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectIdentifier"))
+ it.ProjectIdentifier, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
- case "skipOrderNumber":
+ case "requesters":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("skipOrderNumber"))
- it.SkipOrderNumber, err = ec.unmarshalOInt2áint(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requesters"))
+ it.Requesters, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
@@ -40302,11 +59476,47 @@ func (ec *executionContext) unmarshalInputMainlineCommitsOptions(ctx context.Con
if err != nil {
return it, err
}
- case "requesters":
+ case "skipOrderNumber":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("requesters"))
- it.Requesters, err = ec.unmarshalOString2ástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("skipOrderNumber"))
+ it.SkipOrderNumber, err = ec.unmarshalOInt2áint(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputMetadataLinkInput(ctx context.Context, obj interface{}) (model.APIMetadataLink, error) {
+ var it model.APIMetadataLink
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"text", "url"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "text":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text"))
+ it.Text, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "url":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url"))
+ it.URL, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40323,8 +59533,29 @@ func (ec *executionContext) unmarshalInputMoveProjectInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"newOwner", "newRepo", "projectId"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
+ case "newOwner":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newOwner"))
+ it.NewOwner, err = ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "newRepo":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newRepo"))
+ it.NewRepo, err = ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "projectId":
var err error
@@ -40351,22 +59582,6 @@ func (ec *executionContext) unmarshalInputMoveProjectInput(ctx context.Context,
err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
return it, graphql.ErrorOnPath(ctx, err)
}
- case "newOwner":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newOwner"))
- it.NewOwner, err = ec.unmarshalNString2string(ctx, v)
- if err != nil {
- return it, err
- }
- case "newRepo":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("newRepo"))
- it.NewRepo, err = ec.unmarshalNString2string(ctx, v)
- if err != nil {
- return it, err
- }
}
}
@@ -40380,7 +59595,12 @@ func (ec *executionContext) unmarshalInputNotificationsInput(ctx context.Context
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"buildBreak", "commitQueue", "patchFinish", "patchFirstFailure", "spawnHostExpiration", "spawnHostOutcome"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "buildBreak":
var err error
@@ -40390,6 +59610,14 @@ func (ec *executionContext) unmarshalInputNotificationsInput(ctx context.Context
if err != nil {
return it, err
}
+ case "commitQueue":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commitQueue"))
+ it.CommitQueue, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "patchFinish":
var err error
@@ -40422,14 +59650,6 @@ func (ec *executionContext) unmarshalInputNotificationsInput(ctx context.Context
if err != nil {
return it, err
}
- case "commitQueue":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commitQueue"))
- it.CommitQueue, err = ec.unmarshalOString2ástring(ctx, v)
- if err != nil {
- return it, err
- }
}
}
@@ -40443,7 +59663,12 @@ func (ec *executionContext) unmarshalInputParameterInput(ctx context.Context, ob
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"key", "value"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "key":
var err error
@@ -40474,7 +59699,12 @@ func (ec *executionContext) unmarshalInputPatchConfigure(ctx context.Context, ob
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"description", "parameters", "patchTriggerAliases", "variantsTasks"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "description":
var err error
@@ -40484,14 +59714,6 @@ func (ec *executionContext) unmarshalInputPatchConfigure(ctx context.Context, ob
if err != nil {
return it, err
}
- case "variantsTasks":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variantsTasks"))
- it.VariantsTasks, err = ec.unmarshalNVariantTasks2áágithubácomáevergreenáciáevergreenágraphqláVariantTasksá(ctx, v)
- if err != nil {
- return it, err
- }
case "parameters":
var err error
@@ -40508,6 +59730,14 @@ func (ec *executionContext) unmarshalInputPatchConfigure(ctx context.Context, ob
if err != nil {
return it, err
}
+ case "variantsTasks":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variantsTasks"))
+ it.VariantsTasks, err = ec.unmarshalNVariantTasks2áágithubácomáevergreenáciáevergreenágraphqláVariantTasksá(ctx, v)
+ if err != nil {
+ return it, err
+ }
}
}
@@ -40521,7 +59751,12 @@ func (ec *executionContext) unmarshalInputPatchTriggerAliasInput(ctx context.Con
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"alias", "childProjectIdentifier", "parentAsModule", "status", "taskSpecifiers"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "alias":
var err error
@@ -40539,11 +59774,11 @@ func (ec *executionContext) unmarshalInputPatchTriggerAliasInput(ctx context.Con
if err != nil {
return it, err
}
- case "taskSpecifiers":
+ case "parentAsModule":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSpecifiers"))
- it.TaskSpecifiers, err = ec.unmarshalNTaskSpecifierInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskSpecifierá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("parentAsModule"))
+ it.ParentAsModule, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40555,11 +59790,11 @@ func (ec *executionContext) unmarshalInputPatchTriggerAliasInput(ctx context.Con
if err != nil {
return it, err
}
- case "parentAsModule":
+ case "taskSpecifiers":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("parentAsModule"))
- it.ParentAsModule, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSpecifiers"))
+ it.TaskSpecifiers, err = ec.unmarshalNTaskSpecifierInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskSpecifierá(ctx, v)
if err != nil {
return it, err
}
@@ -40576,8 +59811,34 @@ func (ec *executionContext) unmarshalInputPatchesInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ if _, present := asMap["limit"]; !present {
+ asMap["limit"] = 0
+ }
+ if _, present := asMap["page"]; !present {
+ asMap["page"] = 0
+ }
+ if _, present := asMap["patchName"]; !present {
+ asMap["patchName"] = ""
+ }
+ if _, present := asMap["statuses"]; !present {
+ asMap["statuses"] = []interface{}{}
+ }
+
+ fieldsInOrder := [...]string{"includeCommitQueue", "limit", "onlyCommitQueue", "page", "patchName", "statuses"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
+ case "includeCommitQueue":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeCommitQueue"))
+ it.IncludeCommitQueue, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "limit":
var err error
@@ -40586,6 +59847,14 @@ func (ec *executionContext) unmarshalInputPatchesInput(ctx context.Context, obj
if err != nil {
return it, err
}
+ case "onlyCommitQueue":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyCommitQueue"))
+ it.OnlyCommitQueue, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "page":
var err error
@@ -40610,22 +59879,6 @@ func (ec *executionContext) unmarshalInputPatchesInput(ctx context.Context, obj
if err != nil {
return it, err
}
- case "includeCommitQueue":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeCommitQueue"))
- it.IncludeCommitQueue, err = ec.unmarshalOBoolean2ábool(ctx, v)
- if err != nil {
- return it, err
- }
- case "onlyCommitQueue":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyCommitQueue"))
- it.OnlyCommitQueue, err = ec.unmarshalOBoolean2ábool(ctx, v)
- if err != nil {
- return it, err
- }
}
}
@@ -40639,7 +59892,12 @@ func (ec *executionContext) unmarshalInputPeriodicBuildInput(ctx context.Context
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"id", "alias", "configFile", "intervalHours", "message", "nextRunTime"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "id":
var err error
@@ -40649,6 +59907,14 @@ func (ec *executionContext) unmarshalInputPeriodicBuildInput(ctx context.Context
if err != nil {
return it, err
}
+ case "alias":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("alias"))
+ it.Alias, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "configFile":
var err error
@@ -40665,14 +59931,6 @@ func (ec *executionContext) unmarshalInputPeriodicBuildInput(ctx context.Context
if err != nil {
return it, err
}
- case "alias":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("alias"))
- it.Alias, err = ec.unmarshalNString2ástring(ctx, v)
- if err != nil {
- return it, err
- }
case "message":
var err error
@@ -40702,7 +59960,12 @@ func (ec *executionContext) unmarshalInputProjectAliasInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"id", "alias", "gitTag", "remotePath", "task", "taskTags", "variant", "variantTags"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "id":
var err error
@@ -40728,11 +59991,11 @@ func (ec *executionContext) unmarshalInputProjectAliasInput(ctx context.Context,
if err != nil {
return it, err
}
- case "variant":
+ case "remotePath":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variant"))
- it.Variant, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remotePath"))
+ it.RemotePath, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40744,11 +60007,19 @@ func (ec *executionContext) unmarshalInputProjectAliasInput(ctx context.Context,
if err != nil {
return it, err
}
- case "remotePath":
+ case "taskTags":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remotePath"))
- it.RemotePath, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskTags"))
+ it.TaskTags, err = ec.unmarshalNString2áástringá(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "variant":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variant"))
+ it.Variant, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -40760,11 +60031,39 @@ func (ec *executionContext) unmarshalInputProjectAliasInput(ctx context.Context,
if err != nil {
return it, err
}
- case "taskTags":
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputProjectBannerInput(ctx context.Context, obj interface{}) (model.APIProjectBanner, error) {
+ var it model.APIProjectBanner
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"text", "theme"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "text":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskTags"))
- it.TaskTags, err = ec.unmarshalNString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text"))
+ it.Text, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "theme":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("theme"))
+ it.Theme, err = ec.unmarshalNBannerTheme2githubácomáevergreenáciáevergreenáBannerTheme(ctx, v)
if err != nil {
return it, err
}
@@ -40781,7 +60080,12 @@ func (ec *executionContext) unmarshalInputProjectInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"id", "admins", "batchTime", "branch", "buildBaronSettings", "commitQueue", "deactivatePrevious", "disabledStatsCache", "dispatchingDisabled", "displayName", "enabled", "githubChecksEnabled", "githubTriggerAliases", "gitTagAuthorizedTeams", "gitTagAuthorizedUsers", "gitTagVersionsEnabled", "identifier", "manualPrTestingEnabled", "notifyOnBuildFailure", "owner", "patchingDisabled", "patchTriggerAliases", "perfEnabled", "periodicBuilds", "private", "prTestingEnabled", "remotePath", "repo", "repotrackerDisabled", "restricted", "spawnHostScriptPath", "stepbackDisabled", "taskAnnotationSettings", "taskSync", "tracksPushEvents", "triggers", "versionControlEnabled", "workstationConfig", "containerSizeDefinitions", "externalLinks", "banner"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "id":
var err error
@@ -40811,171 +60115,163 @@ func (ec *executionContext) unmarshalInputProjectInput(ctx context.Context, obj
err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
return it, graphql.ErrorOnPath(ctx, err)
}
- case "identifier":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("identifier"))
- it.Identifier, err = ec.unmarshalOString2ástring(ctx, v)
- if err != nil {
- return it, err
- }
- case "displayName":
+ case "admins":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName"))
- it.DisplayName, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("admins"))
+ it.Admins, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "enabled":
+ case "batchTime":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled"))
- it.Enabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("batchTime"))
+ it.BatchTime, err = ec.unmarshalOInt2int(ctx, v)
if err != nil {
return it, err
}
- case "private":
+ case "branch":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("private"))
- it.Private, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("branch"))
+ it.Branch, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "restricted":
+ case "buildBaronSettings":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("restricted"))
- it.Restricted, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildBaronSettings"))
+ it.BuildBaronSettings, err = ec.unmarshalOBuildBaronSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, v)
if err != nil {
return it, err
}
- case "owner":
+ case "commitQueue":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
- it.Owner, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commitQueue"))
+ it.CommitQueue, err = ec.unmarshalOCommitQueueParamsInput2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, v)
if err != nil {
return it, err
}
- case "repo":
+ case "deactivatePrevious":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
- it.Repo, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deactivatePrevious"))
+ it.DeactivatePrevious, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "branch":
+ case "disabledStatsCache":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("branch"))
- it.Branch, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("disabledStatsCache"))
+ it.DisabledStatsCache, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "remotePath":
+ case "dispatchingDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remotePath"))
- it.RemotePath, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dispatchingDisabled"))
+ it.DispatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "patchingDisabled":
+ case "displayName":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("patchingDisabled"))
- it.PatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName"))
+ it.DisplayName, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "repotrackerDisabled":
+ case "enabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repotrackerDisabled"))
- it.RepotrackerDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled"))
+ it.Enabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "dispatchingDisabled":
+ case "githubChecksEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dispatchingDisabled"))
- it.DispatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubChecksEnabled"))
+ it.GithubChecksEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "versionControlEnabled":
+ case "githubTriggerAliases":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionControlEnabled"))
- it.VersionControlEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubTriggerAliases"))
+ it.GithubTriggerAliases, err = ec.unmarshalOString2áástring(ctx, v)
if err != nil {
return it, err
}
- case "prTestingEnabled":
+ case "gitTagAuthorizedTeams":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prTestingEnabled"))
- it.PRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedTeams"))
+ it.GitTagAuthorizedTeams, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "manualPrTestingEnabled":
+ case "gitTagAuthorizedUsers":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("manualPrTestingEnabled"))
- it.ManualPRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedUsers"))
+ it.GitTagAuthorizedUsers, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "githubChecksEnabled":
+ case "gitTagVersionsEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubChecksEnabled"))
- it.GithubChecksEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagVersionsEnabled"))
+ it.GitTagVersionsEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "batchTime":
+ case "identifier":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("batchTime"))
- it.BatchTime, err = ec.unmarshalOInt2int(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("identifier"))
+ it.Identifier, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "deactivatePrevious":
+ case "manualPrTestingEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deactivatePrevious"))
- it.DeactivatePrevious, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("manualPrTestingEnabled"))
+ it.ManualPRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "defaultLogger":
+ case "notifyOnBuildFailure":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defaultLogger"))
- it.DefaultLogger, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notifyOnBuildFailure"))
+ it.NotifyOnBuildFailure, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "notifyOnBuildFailure":
+ case "owner":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notifyOnBuildFailure"))
- it.NotifyOnBuildFailure, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
+ it.Owner, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "triggers":
+ case "patchingDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("triggers"))
- it.Triggers, err = ec.unmarshalOTriggerAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("patchingDisabled"))
+ it.PatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -40987,11 +60283,11 @@ func (ec *executionContext) unmarshalInputProjectInput(ctx context.Context, obj
if err != nil {
return it, err
}
- case "githubTriggerAliases":
+ case "perfEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubTriggerAliases"))
- it.GithubTriggerAliases, err = ec.unmarshalOString2áástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("perfEnabled"))
+ it.PerfEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -41003,91 +60299,107 @@ func (ec *executionContext) unmarshalInputProjectInput(ctx context.Context, obj
if err != nil {
return it, err
}
- case "cedarTestResultsEnabled":
+ case "private":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cedarTestResultsEnabled"))
- it.CedarTestResultsEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("private"))
+ it.Private, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "commitQueue":
+ case "prTestingEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commitQueue"))
- it.CommitQueue, err = ec.unmarshalOCommitQueueParamsInput2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prTestingEnabled"))
+ it.PRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "admins":
+ case "remotePath":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("admins"))
- it.Admins, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remotePath"))
+ it.RemotePath, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "spawnHostScriptPath":
+ case "repo":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostScriptPath"))
- it.SpawnHostScriptPath, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
+ it.Repo, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "tracksPushEvents":
+ case "repotrackerDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tracksPushEvents"))
- it.TracksPushEvents, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repotrackerDisabled"))
+ it.RepotrackerDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "taskSync":
+ case "restricted":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSync"))
- it.TaskSync, err = ec.unmarshalOTaskSyncOptionsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("restricted"))
+ it.Restricted, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "gitTagAuthorizedUsers":
+ case "spawnHostScriptPath":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedUsers"))
- it.GitTagAuthorizedUsers, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostScriptPath"))
+ it.SpawnHostScriptPath, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "gitTagAuthorizedTeams":
+ case "stepbackDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedTeams"))
- it.GitTagAuthorizedTeams, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stepbackDisabled"))
+ it.StepbackDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "gitTagVersionsEnabled":
+ case "taskAnnotationSettings":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagVersionsEnabled"))
- it.GitTagVersionsEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskAnnotationSettings"))
+ it.TaskAnnotationSettings, err = ec.unmarshalOTaskAnnotationSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, v)
if err != nil {
return it, err
}
- case "filesIgnoredFromCache":
+ case "taskSync":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filesIgnoredFromCache"))
- it.FilesIgnoredFromCache, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSync"))
+ it.TaskSync, err = ec.unmarshalOTaskSyncOptionsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, v)
if err != nil {
return it, err
}
- case "disabledStatsCache":
+ case "tracksPushEvents":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("disabledStatsCache"))
- it.DisabledStatsCache, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tracksPushEvents"))
+ it.TracksPushEvents, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "triggers":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("triggers"))
+ it.Triggers, err = ec.unmarshalOTriggerAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "versionControlEnabled":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionControlEnabled"))
+ it.VersionControlEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -41099,27 +60411,27 @@ func (ec *executionContext) unmarshalInputProjectInput(ctx context.Context, obj
if err != nil {
return it, err
}
- case "perfEnabled":
+ case "containerSizeDefinitions":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("perfEnabled"))
- it.PerfEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("containerSizeDefinitions"))
+ it.ContainerSizeDefinitions, err = ec.unmarshalOContainerResourcesInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIContainerResourcesá(ctx, v)
if err != nil {
return it, err
}
- case "buildBaronSettings":
+ case "externalLinks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildBaronSettings"))
- it.BuildBaronSettings, err = ec.unmarshalOBuildBaronSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalLinks"))
+ it.ExternalLinks, err = ec.unmarshalOExternalLinkInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIExternalLinká(ctx, v)
if err != nil {
return it, err
}
- case "taskAnnotationSettings":
+ case "banner":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskAnnotationSettings"))
- it.TaskAnnotationSettings, err = ec.unmarshalOTaskAnnotationSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("banner"))
+ it.Banner, err = ec.unmarshalOProjectBannerInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectBanner(ctx, v)
if err != nil {
return it, err
}
@@ -41136,37 +60448,34 @@ func (ec *executionContext) unmarshalInputProjectSettingsInput(ctx context.Conte
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"aliases", "githubWebhooksEnabled", "projectRef", "subscriptions", "vars"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "githubWebhooksEnabled":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubWebhooksEnabled"))
- it.GithubWebhooksEnabled, err = ec.unmarshalOBoolean2bool(ctx, v)
- if err != nil {
- return it, err
- }
- case "projectRef":
+ case "aliases":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectRef"))
- it.ProjectRef, err = ec.unmarshalOProjectInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("aliases"))
+ it.Aliases, err = ec.unmarshalOProjectAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, v)
if err != nil {
return it, err
}
- case "vars":
+ case "githubWebhooksEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vars"))
- it.Vars, err = ec.unmarshalOProjectVarsInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubWebhooksEnabled"))
+ it.GithubWebhooksEnabled, err = ec.unmarshalOBoolean2bool(ctx, v)
if err != nil {
return it, err
}
- case "aliases":
+ case "projectRef":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("aliases"))
- it.Aliases, err = ec.unmarshalOProjectAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectRef"))
+ it.ProjectRef, err = ec.unmarshalOProjectInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx, v)
if err != nil {
return it, err
}
@@ -41178,6 +60487,14 @@ func (ec *executionContext) unmarshalInputProjectSettingsInput(ctx context.Conte
if err != nil {
return it, err
}
+ case "vars":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vars"))
+ it.Vars, err = ec.unmarshalOProjectVarsInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, v)
+ if err != nil {
+ return it, err
+ }
}
}
@@ -41191,13 +60508,18 @@ func (ec *executionContext) unmarshalInputProjectVarsInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"adminOnlyVarsList", "privateVarsList", "vars"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "vars":
+ case "adminOnlyVarsList":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vars"))
- it.Vars, err = ec.unmarshalOStringMap2map(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("adminOnlyVarsList"))
+ it.AdminOnlyVarsList, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -41209,11 +60531,11 @@ func (ec *executionContext) unmarshalInputProjectVarsInput(ctx context.Context,
if err != nil {
return it, err
}
- case "adminOnlyVarsList":
+ case "vars":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("adminOnlyVarsList"))
- it.AdminOnlyVarsList, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vars"))
+ it.Vars, err = ec.unmarshalOStringMap2map(ctx, v)
if err != nil {
return it, err
}
@@ -41230,21 +60552,26 @@ func (ec *executionContext) unmarshalInputPublicKeyInput(ctx context.Context, ob
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"key", "name"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "name":
+ case "key":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
- it.Name, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key"))
+ it.Key, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
- case "key":
+ case "name":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key"))
- it.Key, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
+ it.Name, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
@@ -41261,7 +60588,12 @@ func (ec *executionContext) unmarshalInputRepoRefInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"id", "admins", "batchTime", "branch", "buildBaronSettings", "commitQueue", "deactivatePrevious", "disabledStatsCache", "dispatchingDisabled", "displayName", "enabled", "externalLinks", "githubChecksEnabled", "githubTriggerAliases", "gitTagAuthorizedTeams", "gitTagAuthorizedUsers", "gitTagVersionsEnabled", "manualPrTestingEnabled", "notifyOnBuildFailure", "owner", "patchingDisabled", "patchTriggerAliases", "perfEnabled", "periodicBuilds", "private", "prTestingEnabled", "remotePath", "repo", "repotrackerDisabled", "restricted", "spawnHostScriptPath", "stepbackDisabled", "taskAnnotationSettings", "taskSync", "tracksPushEvents", "triggers", "versionControlEnabled", "workstationConfig", "containerSizeDefinitions"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "id":
var err error
@@ -41291,163 +60623,163 @@ func (ec *executionContext) unmarshalInputRepoRefInput(ctx context.Context, obj
err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
return it, graphql.ErrorOnPath(ctx, err)
}
- case "displayName":
+ case "admins":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName"))
- it.DisplayName, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("admins"))
+ it.Admins, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "enabled":
+ case "batchTime":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled"))
- it.Enabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("batchTime"))
+ it.BatchTime, err = ec.unmarshalOInt2int(ctx, v)
if err != nil {
return it, err
}
- case "private":
+ case "branch":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("private"))
- it.Private, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("branch"))
+ it.Branch, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "restricted":
+ case "buildBaronSettings":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("restricted"))
- it.Restricted, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildBaronSettings"))
+ it.BuildBaronSettings, err = ec.unmarshalOBuildBaronSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, v)
if err != nil {
return it, err
}
- case "owner":
+ case "commitQueue":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
- it.Owner, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commitQueue"))
+ it.CommitQueue, err = ec.unmarshalOCommitQueueParamsInput2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, v)
if err != nil {
return it, err
}
- case "repo":
+ case "deactivatePrevious":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
- it.Repo, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deactivatePrevious"))
+ it.DeactivatePrevious, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "branch":
+ case "disabledStatsCache":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("branch"))
- it.Branch, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("disabledStatsCache"))
+ it.DisabledStatsCache, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "remotePath":
+ case "dispatchingDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remotePath"))
- it.RemotePath, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dispatchingDisabled"))
+ it.DispatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "patchingDisabled":
+ case "displayName":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("patchingDisabled"))
- it.PatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName"))
+ it.DisplayName, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "repotrackerDisabled":
+ case "enabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repotrackerDisabled"))
- it.RepotrackerDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled"))
+ it.Enabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "dispatchingDisabled":
+ case "externalLinks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dispatchingDisabled"))
- it.DispatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalLinks"))
+ it.ExternalLinks, err = ec.unmarshalOExternalLinkInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIExternalLinká(ctx, v)
if err != nil {
return it, err
}
- case "versionControlEnabled":
+ case "githubChecksEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionControlEnabled"))
- it.VersionControlEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubChecksEnabled"))
+ it.GithubChecksEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "prTestingEnabled":
+ case "githubTriggerAliases":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prTestingEnabled"))
- it.PRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubTriggerAliases"))
+ it.GithubTriggerAliases, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "manualPrTestingEnabled":
+ case "gitTagAuthorizedTeams":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("manualPrTestingEnabled"))
- it.ManualPRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedTeams"))
+ it.GitTagAuthorizedTeams, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "githubChecksEnabled":
+ case "gitTagAuthorizedUsers":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubChecksEnabled"))
- it.GithubChecksEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedUsers"))
+ it.GitTagAuthorizedUsers, err = ec.unmarshalOString2áástringá(ctx, v)
if err != nil {
return it, err
}
- case "batchTime":
+ case "gitTagVersionsEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("batchTime"))
- it.BatchTime, err = ec.unmarshalOInt2int(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagVersionsEnabled"))
+ it.GitTagVersionsEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "deactivatePrevious":
+ case "manualPrTestingEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deactivatePrevious"))
- it.DeactivatePrevious, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("manualPrTestingEnabled"))
+ it.ManualPRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "defaultLogger":
+ case "notifyOnBuildFailure":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defaultLogger"))
- it.DefaultLogger, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notifyOnBuildFailure"))
+ it.NotifyOnBuildFailure, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "notifyOnBuildFailure":
+ case "owner":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notifyOnBuildFailure"))
- it.NotifyOnBuildFailure, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
+ it.Owner, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "triggers":
+ case "patchingDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("triggers"))
- it.Triggers, err = ec.unmarshalOTriggerAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("patchingDisabled"))
+ it.PatchingDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -41459,11 +60791,11 @@ func (ec *executionContext) unmarshalInputRepoRefInput(ctx context.Context, obj
if err != nil {
return it, err
}
- case "githubTriggerAliases":
+ case "perfEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubTriggerAliases"))
- it.GithubTriggerAliases, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("perfEnabled"))
+ it.PerfEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -41475,123 +60807,123 @@ func (ec *executionContext) unmarshalInputRepoRefInput(ctx context.Context, obj
if err != nil {
return it, err
}
- case "cedarTestResultsEnabled":
+ case "private":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cedarTestResultsEnabled"))
- it.CedarTestResultsEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("private"))
+ it.Private, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "commitQueue":
+ case "prTestingEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commitQueue"))
- it.CommitQueue, err = ec.unmarshalOCommitQueueParamsInput2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prTestingEnabled"))
+ it.PRTestingEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "admins":
+ case "remotePath":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("admins"))
- it.Admins, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remotePath"))
+ it.RemotePath, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "spawnHostScriptPath":
+ case "repo":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostScriptPath"))
- it.SpawnHostScriptPath, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
+ it.Repo, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "tracksPushEvents":
+ case "repotrackerDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tracksPushEvents"))
- it.TracksPushEvents, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repotrackerDisabled"))
+ it.RepotrackerDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "taskSync":
+ case "restricted":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSync"))
- it.TaskSync, err = ec.unmarshalOTaskSyncOptionsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("restricted"))
+ it.Restricted, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "gitTagAuthorizedUsers":
+ case "spawnHostScriptPath":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedUsers"))
- it.GitTagAuthorizedUsers, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostScriptPath"))
+ it.SpawnHostScriptPath, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "gitTagAuthorizedTeams":
+ case "stepbackDisabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagAuthorizedTeams"))
- it.GitTagAuthorizedTeams, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stepbackDisabled"))
+ it.StepbackDisabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "gitTagVersionsEnabled":
+ case "taskAnnotationSettings":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gitTagVersionsEnabled"))
- it.GitTagVersionsEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskAnnotationSettings"))
+ it.TaskAnnotationSettings, err = ec.unmarshalOTaskAnnotationSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, v)
if err != nil {
return it, err
}
- case "filesIgnoredFromCache":
+ case "taskSync":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filesIgnoredFromCache"))
- it.FilesIgnoredFromCache, err = ec.unmarshalOString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSync"))
+ it.TaskSync, err = ec.unmarshalOTaskSyncOptionsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskSyncOptions(ctx, v)
if err != nil {
return it, err
}
- case "disabledStatsCache":
+ case "tracksPushEvents":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("disabledStatsCache"))
- it.DisabledStatsCache, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tracksPushEvents"))
+ it.TracksPushEvents, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "workstationConfig":
+ case "triggers":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workstationConfig"))
- it.WorkstationConfig, err = ec.unmarshalOWorkstationConfigInput2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("triggers"))
+ it.Triggers, err = ec.unmarshalOTriggerAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx, v)
if err != nil {
return it, err
}
- case "perfEnabled":
+ case "versionControlEnabled":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("perfEnabled"))
- it.PerfEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionControlEnabled"))
+ it.VersionControlEnabled, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "buildBaronSettings":
+ case "workstationConfig":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildBaronSettings"))
- it.BuildBaronSettings, err = ec.unmarshalOBuildBaronSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workstationConfig"))
+ it.WorkstationConfig, err = ec.unmarshalOWorkstationConfigInput2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx, v)
if err != nil {
return it, err
}
- case "taskAnnotationSettings":
+ case "containerSizeDefinitions":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskAnnotationSettings"))
- it.TaskAnnotationSettings, err = ec.unmarshalOTaskAnnotationSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotationSettings(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("containerSizeDefinitions"))
+ it.ContainerSizeDefinitions, err = ec.unmarshalOContainerResourcesInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIContainerResourcesá(ctx, v)
if err != nil {
return it, err
}
@@ -41608,8 +60940,21 @@ func (ec *executionContext) unmarshalInputRepoSettingsInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"aliases", "githubWebhooksEnabled", "projectRef", "subscriptions", "vars"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
+ case "aliases":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("aliases"))
+ it.Aliases, err = ec.unmarshalOProjectAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "githubWebhooksEnabled":
var err error
@@ -41626,27 +60971,19 @@ func (ec *executionContext) unmarshalInputRepoSettingsInput(ctx context.Context,
if err != nil {
return it, err
}
- case "vars":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vars"))
- it.Vars, err = ec.unmarshalOProjectVarsInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, v)
- if err != nil {
- return it, err
- }
- case "aliases":
+ case "subscriptions":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("aliases"))
- it.Aliases, err = ec.unmarshalOProjectAliasInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAliasá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("subscriptions"))
+ it.Subscriptions, err = ec.unmarshalOSubscriptionInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, v)
if err != nil {
return it, err
}
- case "subscriptions":
+ case "vars":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("subscriptions"))
- it.Subscriptions, err = ec.unmarshalOSubscriptionInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vars"))
+ it.Vars, err = ec.unmarshalOProjectVarsInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectVars(ctx, v)
if err != nil {
return it, err
}
@@ -41663,21 +61000,26 @@ func (ec *executionContext) unmarshalInputSelectorInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"data", "type"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "type":
+ case "data":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type"))
- it.Type, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("data"))
+ it.Data, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "data":
+ case "type":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("data"))
- it.Data, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type"))
+ it.Type, err = ec.unmarshalNString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -41694,21 +61036,26 @@ func (ec *executionContext) unmarshalInputSortOrder(ctx context.Context, obj int
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"Direction", "Key"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "Key":
+ case "Direction":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Key"))
- it.Key, err = ec.unmarshalNTaskSortCategory2githubácomáevergreenáciáevergreenágraphqláTaskSortCategory(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Direction"))
+ it.Direction, err = ec.unmarshalNSortDirection2githubácomáevergreenáciáevergreenágraphqláSortDirection(ctx, v)
if err != nil {
return it, err
}
- case "Direction":
+ case "Key":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Direction"))
- it.Direction, err = ec.unmarshalNSortDirection2githubácomáevergreenáciáevergreenágraphqláSortDirection(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Key"))
+ it.Key, err = ec.unmarshalNTaskSortCategory2githubácomáevergreenáciáevergreenágraphqláTaskSortCategory(ctx, v)
if err != nil {
return it, err
}
@@ -41725,7 +61072,12 @@ func (ec *executionContext) unmarshalInputSpawnHostInput(ctx context.Context, ob
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"distroId", "expiration", "homeVolumeSize", "isVirtualWorkStation", "noExpiration", "publicKey", "region", "savePublicKey", "setUpScript", "spawnHostsStartedByTask", "taskId", "taskSync", "useProjectSetupScript", "userDataScript", "useTaskConfig", "volumeId"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "distroId":
var err error
@@ -41735,91 +61087,91 @@ func (ec *executionContext) unmarshalInputSpawnHostInput(ctx context.Context, ob
if err != nil {
return it, err
}
- case "region":
+ case "expiration":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("region"))
- it.Region, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expiration"))
+ it.Expiration, err = ec.unmarshalOTime2átimeáTime(ctx, v)
if err != nil {
return it, err
}
- case "savePublicKey":
+ case "homeVolumeSize":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("savePublicKey"))
- it.SavePublicKey, err = ec.unmarshalNBoolean2bool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("homeVolumeSize"))
+ it.HomeVolumeSize, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "publicKey":
+ case "isVirtualWorkStation":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("publicKey"))
- it.PublicKey, err = ec.unmarshalNPublicKeyInput2ágithubácomáevergreenáciáevergreenágraphqláPublicKeyInput(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isVirtualWorkStation"))
+ it.IsVirtualWorkStation, err = ec.unmarshalNBoolean2bool(ctx, v)
if err != nil {
return it, err
}
- case "userDataScript":
+ case "noExpiration":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userDataScript"))
- it.UserDataScript, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
+ it.NoExpiration, err = ec.unmarshalNBoolean2bool(ctx, v)
if err != nil {
return it, err
}
- case "expiration":
+ case "publicKey":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expiration"))
- it.Expiration, err = ec.unmarshalOTime2átimeáTime(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("publicKey"))
+ it.PublicKey, err = ec.unmarshalNPublicKeyInput2ágithubácomáevergreenáciáevergreenágraphqláPublicKeyInput(ctx, v)
if err != nil {
return it, err
}
- case "noExpiration":
+ case "region":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
- it.NoExpiration, err = ec.unmarshalNBoolean2bool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("region"))
+ it.Region, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
- case "setUpScript":
+ case "savePublicKey":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("setUpScript"))
- it.SetUpScript, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("savePublicKey"))
+ it.SavePublicKey, err = ec.unmarshalNBoolean2bool(ctx, v)
if err != nil {
return it, err
}
- case "isVirtualWorkStation":
+ case "setUpScript":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isVirtualWorkStation"))
- it.IsVirtualWorkStation, err = ec.unmarshalNBoolean2bool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("setUpScript"))
+ it.SetUpScript, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "homeVolumeSize":
+ case "spawnHostsStartedByTask":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("homeVolumeSize"))
- it.HomeVolumeSize, err = ec.unmarshalOInt2áint(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostsStartedByTask"))
+ it.SpawnHostsStartedByTask, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "volumeId":
+ case "taskId":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeId"))
- it.VolumeID, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskId"))
+ it.TaskID, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "taskId":
+ case "taskSync":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskId"))
- it.TaskID, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSync"))
+ it.TaskSync, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -41831,27 +61183,27 @@ func (ec *executionContext) unmarshalInputSpawnHostInput(ctx context.Context, ob
if err != nil {
return it, err
}
- case "useTaskConfig":
+ case "userDataScript":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("useTaskConfig"))
- it.UseTaskConfig, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userDataScript"))
+ it.UserDataScript, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "spawnHostsStartedByTask":
+ case "useTaskConfig":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spawnHostsStartedByTask"))
- it.SpawnHostsStartedByTask, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("useTaskConfig"))
+ it.UseTaskConfig, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "taskSync":
+ case "volumeId":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskSync"))
- it.TaskSync, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumeId"))
+ it.VolumeID, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -41868,7 +61220,12 @@ func (ec *executionContext) unmarshalInputSpawnVolumeInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"availabilityZone", "expiration", "host", "noExpiration", "size", "type"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "availabilityZone":
var err error
@@ -41878,6 +61235,30 @@ func (ec *executionContext) unmarshalInputSpawnVolumeInput(ctx context.Context,
if err != nil {
return it, err
}
+ case "expiration":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expiration"))
+ it.Expiration, err = ec.unmarshalOTime2átimeáTime(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "host":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("host"))
+ it.Host, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "noExpiration":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
+ it.NoExpiration, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ if err != nil {
+ return it, err
+ }
case "size":
var err error
@@ -41894,27 +61275,150 @@ func (ec *executionContext) unmarshalInputSpawnVolumeInput(ctx context.Context,
if err != nil {
return it, err
}
- case "expiration":
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputSubscriberInput(ctx context.Context, obj interface{}) (model.APISubscriber, error) {
+ var it model.APISubscriber
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"target", "type", "webhookSubscriber", "jiraIssueSubscriber"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "target":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expiration"))
- it.Expiration, err = ec.unmarshalOTime2átimeáTime(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("target"))
+ data, err := ec.unmarshalNString2string(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ if err = ec.resolvers.SubscriberInput().Target(ctx, &it, data); err != nil {
+ return it, err
+ }
+ case "type":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type"))
+ it.Type, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "webhookSubscriber":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("webhookSubscriber"))
+ it.WebhookSubscriber, err = ec.unmarshalOWebhookSubscriberInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookSubscriber(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "jiraIssueSubscriber":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("jiraIssueSubscriber"))
+ it.JiraIssueSubscriber, err = ec.unmarshalOJiraIssueSubscriberInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIJIRAIssueSubscriber(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputSubscriptionInput(ctx context.Context, obj interface{}) (model.APISubscription, error) {
+ var it model.APISubscription
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"id", "owner_type", "owner", "regex_selectors", "resource_type", "selectors", "subscriber", "trigger_data", "trigger"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "id":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
+ it.ID, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "owner_type":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner_type"))
+ it.OwnerType, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "owner":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
+ it.Owner, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "regex_selectors":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("regex_selectors"))
+ it.RegexSelectors, err = ec.unmarshalNSelectorInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "resource_type":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resource_type"))
+ it.ResourceType, err = ec.unmarshalOString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "selectors":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("selectors"))
+ it.Selectors, err = ec.unmarshalNSelectorInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "subscriber":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("subscriber"))
+ it.Subscriber, err = ec.unmarshalNSubscriberInput2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx, v)
if err != nil {
return it, err
}
- case "noExpiration":
+ case "trigger_data":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
- it.NoExpiration, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trigger_data"))
+ it.TriggerData, err = ec.unmarshalNStringMap2map(ctx, v)
if err != nil {
return it, err
}
- case "host":
+ case "trigger":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("host"))
- it.Host, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trigger"))
+ it.Trigger, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -41924,28 +61428,33 @@ func (ec *executionContext) unmarshalInputSpawnVolumeInput(ctx context.Context,
return it, nil
}
-func (ec *executionContext) unmarshalInputSubscriberInput(ctx context.Context, obj interface{}) (model.APISubscriber, error) {
- var it model.APISubscriber
+func (ec *executionContext) unmarshalInputTaskAnnotationSettingsInput(ctx context.Context, obj interface{}) (model.APITaskAnnotationSettings, error) {
+ var it model.APITaskAnnotationSettings
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"fileTicketWebhook", "jiraCustomFields"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "type":
+ case "fileTicketWebhook":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type"))
- it.Type, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileTicketWebhook"))
+ it.FileTicketWebhook, err = ec.unmarshalOWebhookInput2githubácomáevergreenáciáevergreenárestámodeláAPIWebHook(ctx, v)
if err != nil {
return it, err
}
- case "target":
+ case "jiraCustomFields":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("target"))
- it.Target, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("jiraCustomFields"))
+ it.JiraCustomFields, err = ec.unmarshalOJiraFieldInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIJiraFieldá(ctx, v)
if err != nil {
return it, err
}
@@ -41955,115 +61464,108 @@ func (ec *executionContext) unmarshalInputSubscriberInput(ctx context.Context, o
return it, nil
}
-func (ec *executionContext) unmarshalInputSubscriptionInput(ctx context.Context, obj interface{}) (model.APISubscription, error) {
- var it model.APISubscription
+func (ec *executionContext) unmarshalInputTaskFilterOptions(ctx context.Context, obj interface{}) (TaskFilterOptions, error) {
+ var it TaskFilterOptions
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
- for k, v := range asMap {
- switch k {
- case "id":
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
- it.ID, err = ec.unmarshalOString2ástring(ctx, v)
- if err != nil {
- return it, err
- }
- case "resource_type":
- var err error
+ if _, present := asMap["baseStatuses"]; !present {
+ asMap["baseStatuses"] = []interface{}{}
+ }
+ if _, present := asMap["includeEmptyActivation"]; !present {
+ asMap["includeEmptyActivation"] = false
+ }
+ if _, present := asMap["includeNeverActivatedTasks"]; !present {
+ asMap["includeNeverActivatedTasks"] = false
+ }
+ if _, present := asMap["limit"]; !present {
+ asMap["limit"] = 0
+ }
+ if _, present := asMap["page"]; !present {
+ asMap["page"] = 0
+ }
+ if _, present := asMap["statuses"]; !present {
+ asMap["statuses"] = []interface{}{}
+ }
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resource_type"))
- it.ResourceType, err = ec.unmarshalOString2ástring(ctx, v)
- if err != nil {
- return it, err
- }
- case "trigger":
+ fieldsInOrder := [...]string{"baseStatuses", "includeEmptyActivation", "includeNeverActivatedTasks", "limit", "page", "sorts", "statuses", "taskName", "variant"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "baseStatuses":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trigger"))
- it.Trigger, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("baseStatuses"))
+ it.BaseStatuses, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
- case "selectors":
+ case "includeEmptyActivation":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("selectors"))
- it.Selectors, err = ec.unmarshalNSelectorInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeEmptyActivation"))
+ it.IncludeEmptyActivation, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "regex_selectors":
+ case "includeNeverActivatedTasks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("regex_selectors"))
- it.RegexSelectors, err = ec.unmarshalNSelectorInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeNeverActivatedTasks"))
+ it.IncludeNeverActivatedTasks, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "subscriber":
+ case "limit":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("subscriber"))
- it.Subscriber, err = ec.unmarshalNSubscriberInput2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
+ it.Limit, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "owner_type":
+ case "page":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner_type"))
- it.OwnerType, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
+ it.Page, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "owner":
+ case "sorts":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
- it.Owner, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sorts"))
+ it.Sorts, err = ec.unmarshalOSortOrder2áágithubácomáevergreenáciáevergreenágraphqláSortOrderá(ctx, v)
if err != nil {
return it, err
}
- case "trigger_data":
+ case "statuses":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trigger_data"))
- it.TriggerData, err = ec.unmarshalNStringMap2map(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statuses"))
+ it.Statuses, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
- }
- }
-
- return it, nil
-}
-
-func (ec *executionContext) unmarshalInputTaskAnnotationSettingsInput(ctx context.Context, obj interface{}) (model.APITaskAnnotationSettings, error) {
- var it model.APITaskAnnotationSettings
- asMap := map[string]interface{}{}
- for k, v := range obj.(map[string]interface{}) {
- asMap[k] = v
- }
-
- for k, v := range asMap {
- switch k {
- case "jiraCustomFields":
+ case "taskName":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("jiraCustomFields"))
- it.JiraCustomFields, err = ec.unmarshalOJiraFieldInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIJiraFieldá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskName"))
+ it.TaskName, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "fileTicketWebhook":
+ case "variant":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileTicketWebhook"))
- it.FileTicketWebhook, err = ec.unmarshalOWebhookInput2githubácomáevergreenáciáevergreenárestámodeláAPIWebHook(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variant"))
+ it.Variant, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -42080,7 +61582,12 @@ func (ec *executionContext) unmarshalInputTaskSpecifierInput(ctx context.Context
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"patchAlias", "taskRegex", "variantRegex"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "patchAlias":
var err error
@@ -42119,7 +61626,12 @@ func (ec *executionContext) unmarshalInputTaskSyncOptionsInput(ctx context.Conte
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"configEnabled", "patchEnabled"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "configEnabled":
var err error
@@ -42150,7 +61662,12 @@ func (ec *executionContext) unmarshalInputTestFilter(ctx context.Context, obj in
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"testName", "testStatus"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "testName":
var err error
@@ -42174,71 +61691,124 @@ func (ec *executionContext) unmarshalInputTestFilter(ctx context.Context, obj in
return it, nil
}
-func (ec *executionContext) unmarshalInputTriggerAliasInput(ctx context.Context, obj interface{}) (model.APITriggerDefinition, error) {
- var it model.APITriggerDefinition
+func (ec *executionContext) unmarshalInputTestFilterOptions(ctx context.Context, obj interface{}) (TestFilterOptions, error) {
+ var it TestFilterOptions
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"testName", "statuses", "groupID", "sort", "limit", "page"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "project":
+ case "testName":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project"))
- it.Project, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("testName"))
+ it.TestName, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "level":
+ case "statuses":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("level"))
- it.Level, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statuses"))
+ it.Statuses, err = ec.unmarshalOString2ástringá(ctx, v)
if err != nil {
return it, err
}
- case "buildVariantRegex":
+ case "groupID":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildVariantRegex"))
- it.BuildVariantRegex, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("groupID"))
+ it.GroupID, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "taskRegex":
+ case "sort":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskRegex"))
- it.TaskRegex, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sort"))
+ it.Sort, err = ec.unmarshalOTestSortOptions2áágithubácomáevergreenáciáevergreenágraphqláTestSortOptionsá(ctx, v)
if err != nil {
return it, err
}
- case "status":
+ case "limit":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
- it.Status, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
+ it.Limit, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "dateCutoff":
+ case "page":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dateCutoff"))
- it.DateCutoff, err = ec.unmarshalNInt2áint(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
+ it.Page, err = ec.unmarshalOInt2áint(ctx, v)
if err != nil {
return it, err
}
- case "configFile":
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputTestSortOptions(ctx context.Context, obj interface{}) (TestSortOptions, error) {
+ var it TestSortOptions
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"sortBy", "direction"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "sortBy":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("configFile"))
- it.ConfigFile, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortBy"))
+ it.SortBy, err = ec.unmarshalNTestSortCategory2githubácomáevergreenáciáevergreenágraphqláTestSortCategory(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "direction":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction"))
+ it.Direction, err = ec.unmarshalNSortDirection2githubácomáevergreenáciáevergreenágraphqláSortDirection(ctx, v)
if err != nil {
return it, err
}
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputTriggerAliasInput(ctx context.Context, obj interface{}) (model.APITriggerDefinition, error) {
+ var it model.APITriggerDefinition
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"alias", "buildVariantRegex", "configFile", "dateCutoff", "level", "project", "status", "taskRegex"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
case "alias":
var err error
@@ -42247,6 +61817,62 @@ func (ec *executionContext) unmarshalInputTriggerAliasInput(ctx context.Context,
if err != nil {
return it, err
}
+ case "buildVariantRegex":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("buildVariantRegex"))
+ it.BuildVariantRegex, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "configFile":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("configFile"))
+ it.ConfigFile, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "dateCutoff":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dateCutoff"))
+ it.DateCutoff, err = ec.unmarshalOInt2áint(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "level":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("level"))
+ it.Level, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "project":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project"))
+ it.Project, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "status":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
+ it.Status, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "taskRegex":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("taskRegex"))
+ it.TaskRegex, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
}
}
@@ -42260,7 +61886,12 @@ func (ec *executionContext) unmarshalInputUpdateVolumeInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"expiration", "name", "noExpiration", "volumeId"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "expiration":
var err error
@@ -42270,19 +61901,19 @@ func (ec *executionContext) unmarshalInputUpdateVolumeInput(ctx context.Context,
if err != nil {
return it, err
}
- case "noExpiration":
+ case "name":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
- it.NoExpiration, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
+ it.Name, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "name":
+ case "noExpiration":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
- it.Name, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("noExpiration"))
+ it.NoExpiration, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -42307,21 +61938,26 @@ func (ec *executionContext) unmarshalInputUseSpruceOptionsInput(ctx context.Cont
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"hasUsedMainlineCommitsBefore", "hasUsedSpruceBefore", "spruceV1"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "hasUsedSpruceBefore":
+ case "hasUsedMainlineCommitsBefore":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasUsedSpruceBefore"))
- it.HasUsedSpruceBefore, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasUsedMainlineCommitsBefore"))
+ it.HasUsedMainlineCommitsBefore, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
- case "hasUsedMainlineCommitsBefore":
+ case "hasUsedSpruceBefore":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasUsedMainlineCommitsBefore"))
- it.HasUsedMainlineCommitsBefore, err = ec.unmarshalOBoolean2ábool(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasUsedSpruceBefore"))
+ it.HasUsedSpruceBefore, err = ec.unmarshalOBoolean2ábool(ctx, v)
if err != nil {
return it, err
}
@@ -42346,29 +61982,34 @@ func (ec *executionContext) unmarshalInputUserSettingsInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"githubUser", "notifications", "region", "slackUsername", "slackMemberId", "timezone", "useSpruceOptions", "dateFormat"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "timezone":
+ case "githubUser":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timezone"))
- it.Timezone, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubUser"))
+ it.GithubUser, err = ec.unmarshalOGithubUserInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubUser(ctx, v)
if err != nil {
return it, err
}
- case "region":
+ case "notifications":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("region"))
- it.Region, err = ec.unmarshalOString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notifications"))
+ it.Notifications, err = ec.unmarshalONotificationsInput2ágithubácomáevergreenáciáevergreenárestámodeláAPINotificationPreferences(ctx, v)
if err != nil {
return it, err
}
- case "githubUser":
+ case "region":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("githubUser"))
- it.GithubUser, err = ec.unmarshalOGithubUserInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubUser(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("region"))
+ it.Region, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -42380,50 +62021,35 @@ func (ec *executionContext) unmarshalInputUserSettingsInput(ctx context.Context,
if err != nil {
return it, err
}
- case "notifications":
+ case "slackMemberId":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notifications"))
- it.Notifications, err = ec.unmarshalONotificationsInput2ágithubácomáevergreenáciáevergreenárestámodeláAPINotificationPreferences(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("slackMemberId"))
+ it.SlackMemberId, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- case "useSpruceOptions":
+ case "timezone":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("useSpruceOptions"))
- it.UseSpruceOptions, err = ec.unmarshalOUseSpruceOptionsInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIUseSpruceOptions(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timezone"))
+ it.Timezone, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
- }
- }
-
- return it, nil
-}
-
-func (ec *executionContext) unmarshalInputVariantTaskInput(ctx context.Context, obj interface{}) (model.VariantTask, error) {
- var it model.VariantTask
- asMap := map[string]interface{}{}
- for k, v := range obj.(map[string]interface{}) {
- asMap[k] = v
- }
-
- for k, v := range asMap {
- switch k {
- case "name":
+ case "useSpruceOptions":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
- it.Name, err = ec.unmarshalNString2ástring(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("useSpruceOptions"))
+ it.UseSpruceOptions, err = ec.unmarshalOUseSpruceOptionsInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIUseSpruceOptions(ctx, v)
if err != nil {
return it, err
}
- case "tasks":
+ case "dateFormat":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tasks"))
- it.Tasks, err = ec.unmarshalNString2áástringá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dateFormat"))
+ it.DateFormat, err = ec.unmarshalOString2ástring(ctx, v)
if err != nil {
return it, err
}
@@ -42440,13 +62066,18 @@ func (ec *executionContext) unmarshalInputVariantTasks(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"displayTasks", "tasks", "variant"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "variant":
+ case "displayTasks":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variant"))
- it.Variant, err = ec.unmarshalNString2string(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayTasks"))
+ it.DisplayTasks, err = ec.unmarshalNDisplayTask2áágithubácomáevergreenáciáevergreenágraphqláDisplayTaská(ctx, v)
if err != nil {
return it, err
}
@@ -42458,11 +62089,11 @@ func (ec *executionContext) unmarshalInputVariantTasks(ctx context.Context, obj
if err != nil {
return it, err
}
- case "displayTasks":
+ case "variant":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayTasks"))
- it.DisplayTasks, err = ec.unmarshalNDisplayTask2áágithubácomáevergreenáciáevergreenágraphqláDisplayTaská(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("variant"))
+ it.Variant, err = ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
@@ -42479,7 +62110,12 @@ func (ec *executionContext) unmarshalInputVersionToRestart(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"versionId", "taskIds"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "versionId":
var err error
@@ -42510,7 +62146,12 @@ func (ec *executionContext) unmarshalInputVolumeHost(ctx context.Context, obj in
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"volumeId", "hostId"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "volumeId":
var err error
@@ -42534,6 +62175,42 @@ func (ec *executionContext) unmarshalInputVolumeHost(ctx context.Context, obj in
return it, nil
}
+func (ec *executionContext) unmarshalInputWebhookHeaderInput(ctx context.Context, obj interface{}) (model.APIWebhookHeader, error) {
+ var it model.APIWebhookHeader
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"key", "value"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
+ case "key":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key"))
+ it.Key, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "value":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value"))
+ it.Value, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ }
+ }
+
+ return it, nil
+}
+
func (ec *executionContext) unmarshalInputWebhookInput(ctx context.Context, obj interface{}) (model.APIWebHook, error) {
var it model.APIWebHook
asMap := map[string]interface{}{}
@@ -42541,7 +62218,12 @@ func (ec *executionContext) unmarshalInputWebhookInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"endpoint", "secret"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "endpoint":
var err error
@@ -42565,23 +62247,98 @@ func (ec *executionContext) unmarshalInputWebhookInput(ctx context.Context, obj
return it, nil
}
-func (ec *executionContext) unmarshalInputWorkstationConfigInput(ctx context.Context, obj interface{}) (model.APIWorkstationConfig, error) {
- var it model.APIWorkstationConfig
+func (ec *executionContext) unmarshalInputWebhookSubscriberInput(ctx context.Context, obj interface{}) (model.APIWebhookSubscriber, error) {
+ var it model.APIWebhookSubscriber
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
- for k, v := range asMap {
+ if _, present := asMap["retries"]; !present {
+ asMap["retries"] = 0
+ }
+ if _, present := asMap["minDelayMs"]; !present {
+ asMap["minDelayMs"] = 0
+ }
+ if _, present := asMap["timeoutMs"]; !present {
+ asMap["timeoutMs"] = 0
+ }
+
+ fieldsInOrder := [...]string{"headers", "secret", "url", "retries", "minDelayMs", "timeoutMs"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
- case "setupCommands":
+ case "headers":
var err error
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("setupCommands"))
- it.SetupCommands, err = ec.unmarshalOWorkstationSetupCommandInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIWorkstationSetupCommandá(ctx, v)
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("headers"))
+ it.Headers, err = ec.unmarshalNWebhookHeaderInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookHeader(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "secret":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("secret"))
+ it.Secret, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "url":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url"))
+ it.URL, err = ec.unmarshalNString2ástring(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "retries":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("retries"))
+ it.Retries, err = ec.unmarshalOInt2int(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "minDelayMs":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minDelayMs"))
+ it.MinDelayMS, err = ec.unmarshalOInt2int(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ case "timeoutMs":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timeoutMs"))
+ it.TimeoutMS, err = ec.unmarshalOInt2int(ctx, v)
if err != nil {
return it, err
}
+ }
+ }
+
+ return it, nil
+}
+
+func (ec *executionContext) unmarshalInputWorkstationConfigInput(ctx context.Context, obj interface{}) (model.APIWorkstationConfig, error) {
+ var it model.APIWorkstationConfig
+ asMap := map[string]interface{}{}
+ for k, v := range obj.(map[string]interface{}) {
+ asMap[k] = v
+ }
+
+ fieldsInOrder := [...]string{"gitClone", "setupCommands"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
+ switch k {
case "gitClone":
var err error
@@ -42590,6 +62347,14 @@ func (ec *executionContext) unmarshalInputWorkstationConfigInput(ctx context.Con
if err != nil {
return it, err
}
+ case "setupCommands":
+ var err error
+
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("setupCommands"))
+ it.SetupCommands, err = ec.unmarshalOWorkstationSetupCommandInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIWorkstationSetupCommandá(ctx, v)
+ if err != nil {
+ return it, err
+ }
}
}
@@ -42603,7 +62368,12 @@ func (ec *executionContext) unmarshalInputWorkstationSetupCommandInput(ctx conte
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"command", "directory"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "command":
var err error
@@ -42639,7 +62409,6 @@ var aWSConfigImplementors = []string{"AWSConfig"}
func (ec *executionContext) _AWSConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIAWSConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, aWSConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -42647,7 +62416,38 @@ func (ec *executionContext) _AWSConfig(ctx context.Context, sel ast.SelectionSet
case "__typename":
out.Values[i] = graphql.MarshalString("AWSConfig")
case "maxVolumeSizePerUser":
+
out.Values[i] = ec._AWSConfig_maxVolumeSizePerUser(ctx, field, obj)
+
+ case "pod":
+
+ out.Values[i] = ec._AWSConfig_pod(ctx, field, obj)
+
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var aWSPodConfigImplementors = []string{"AWSPodConfig"}
+
+func (ec *executionContext) _AWSPodConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIAWSPodConfig) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, aWSPodConfigImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("AWSPodConfig")
+ case "ecs":
+
+ out.Values[i] = ec._AWSPodConfig_ecs(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -42663,40 +62463,51 @@ var abortInfoImplementors = []string{"AbortInfo"}
func (ec *executionContext) _AbortInfo(ctx context.Context, sel ast.SelectionSet, obj *AbortInfo) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, abortInfoImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("AbortInfo")
- case "user":
- out.Values[i] = ec._AbortInfo_user(ctx, field, obj)
+ case "buildVariantDisplayName":
+
+ out.Values[i] = ec._AbortInfo_buildVariantDisplayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "taskID":
- out.Values[i] = ec._AbortInfo_taskID(ctx, field, obj)
+ case "newVersion":
+
+ out.Values[i] = ec._AbortInfo_newVersion(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "taskDisplayName":
- out.Values[i] = ec._AbortInfo_taskDisplayName(ctx, field, obj)
+ case "prClosed":
+
+ out.Values[i] = ec._AbortInfo_prClosed(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "buildVariantDisplayName":
- out.Values[i] = ec._AbortInfo_buildVariantDisplayName(ctx, field, obj)
+ case "taskDisplayName":
+
+ out.Values[i] = ec._AbortInfo_taskDisplayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "newVersion":
- out.Values[i] = ec._AbortInfo_newVersion(ctx, field, obj)
+ case "taskID":
+
+ out.Values[i] = ec._AbortInfo_taskID(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "prClosed":
- out.Values[i] = ec._AbortInfo_prClosed(ctx, field, obj)
+ case "user":
+
+ out.Values[i] = ec._AbortInfo_user(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -42711,43 +62522,61 @@ func (ec *executionContext) _AbortInfo(ctx context.Context, sel ast.SelectionSet
return out
}
-var annotationImplementors = []string{"Annotation"}
+var annotationImplementors = []string{"Annotation"}
+
+func (ec *executionContext) _Annotation(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskAnnotation) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, annotationImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Annotation")
+ case "id":
+
+ out.Values[i] = ec._Annotation_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "createdIssues":
+
+ out.Values[i] = ec._Annotation_createdIssues(ctx, field, obj)
+
+ case "issues":
+
+ out.Values[i] = ec._Annotation_issues(ctx, field, obj)
+
+ case "note":
+
+ out.Values[i] = ec._Annotation_note(ctx, field, obj)
+
+ case "suspectedIssues":
+
+ out.Values[i] = ec._Annotation_suspectedIssues(ctx, field, obj)
-func (ec *executionContext) _Annotation(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskAnnotation) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, annotationImplementors)
+ case "metadataLinks":
+
+ out.Values[i] = ec._Annotation_metadataLinks(ctx, field, obj)
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Annotation")
- case "id":
- out.Values[i] = ec._Annotation_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
case "taskId":
+
out.Values[i] = ec._Annotation_taskId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "taskExecution":
+
out.Values[i] = ec._Annotation_taskExecution(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "note":
- out.Values[i] = ec._Annotation_note(ctx, field, obj)
- case "issues":
- out.Values[i] = ec._Annotation_issues(ctx, field, obj)
- case "suspectedIssues":
- out.Values[i] = ec._Annotation_suspectedIssues(ctx, field, obj)
- case "createdIssues":
- out.Values[i] = ec._Annotation_createdIssues(ctx, field, obj)
case "webhookConfigured":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -42758,65 +62587,12 @@ func (ec *executionContext) _Annotation(ctx context.Context, sel ast.SelectionSe
atomic.AddUint32(&invalids, 1)
}
return res
- })
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var baseTaskInfoImplementors = []string{"BaseTaskInfo"}
-
-func (ec *executionContext) _BaseTaskInfo(ctx context.Context, sel ast.SelectionSet, obj *model.APIBaseTaskInfo) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, baseTaskInfoImplementors)
-
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("BaseTaskInfo")
- case "id":
- out.Values[i] = ec._BaseTaskInfo_id(ctx, field, obj)
- case "status":
- out.Values[i] = ec._BaseTaskInfo_status(ctx, field, obj)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var baseTaskResultImplementors = []string{"BaseTaskResult"}
+ }
-func (ec *executionContext) _BaseTaskResult(ctx context.Context, sel ast.SelectionSet, obj *BaseTaskResult) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, baseTaskResultImplementors)
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("BaseTaskResult")
- case "id":
- out.Values[i] = ec._BaseTaskResult_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "status":
- out.Values[i] = ec._BaseTaskResult_status(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
+ })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -42832,7 +62608,6 @@ var buildImplementors = []string{"Build"}
func (ec *executionContext) _Build(ctx context.Context, sel ast.SelectionSet, obj *model.APIBuild) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, buildImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -42840,27 +62615,37 @@ func (ec *executionContext) _Build(ctx context.Context, sel ast.SelectionSet, ob
case "__typename":
out.Values[i] = graphql.MarshalString("Build")
case "id":
+
out.Values[i] = ec._Build_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "buildVariant":
- out.Values[i] = ec._Build_buildVariant(ctx, field, obj)
+ case "actualMakespan":
+
+ out.Values[i] = ec._Build_actualMakespan(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "status":
- out.Values[i] = ec._Build_status(ctx, field, obj)
+ case "buildVariant":
+
+ out.Values[i] = ec._Build_buildVariant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "predictedMakespan":
+
out.Values[i] = ec._Build_predictedMakespan(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "actualMakespan":
- out.Values[i] = ec._Build_actualMakespan(ctx, field, obj)
+ case "status":
+
+ out.Values[i] = ec._Build_status(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -42879,25 +62664,30 @@ var buildBaronImplementors = []string{"BuildBaron"}
func (ec *executionContext) _BuildBaron(ctx context.Context, sel ast.SelectionSet, obj *BuildBaron) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, buildBaronImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("BuildBaron")
- case "searchReturnInfo":
- out.Values[i] = ec._BuildBaron_searchReturnInfo(ctx, field, obj)
- case "buildBaronConfigured":
- out.Values[i] = ec._BuildBaron_buildBaronConfigured(ctx, field, obj)
+ case "bbTicketCreationDefined":
+
+ out.Values[i] = ec._BuildBaron_bbTicketCreationDefined(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "bbTicketCreationDefined":
- out.Values[i] = ec._BuildBaron_bbTicketCreationDefined(ctx, field, obj)
+ case "buildBaronConfigured":
+
+ out.Values[i] = ec._BuildBaron_buildBaronConfigured(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "searchReturnInfo":
+
+ out.Values[i] = ec._BuildBaron_searchReturnInfo(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -42913,30 +62703,43 @@ var buildBaronSettingsImplementors = []string{"BuildBaronSettings"}
func (ec *executionContext) _BuildBaronSettings(ctx context.Context, sel ast.SelectionSet, obj *model.APIBuildBaronSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, buildBaronSettingsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("BuildBaronSettings")
+ case "bfSuggestionFeaturesURL":
+
+ out.Values[i] = ec._BuildBaronSettings_bfSuggestionFeaturesURL(ctx, field, obj)
+
+ case "bfSuggestionPassword":
+
+ out.Values[i] = ec._BuildBaronSettings_bfSuggestionPassword(ctx, field, obj)
+
+ case "bfSuggestionServer":
+
+ out.Values[i] = ec._BuildBaronSettings_bfSuggestionServer(ctx, field, obj)
+
+ case "bfSuggestionTimeoutSecs":
+
+ out.Values[i] = ec._BuildBaronSettings_bfSuggestionTimeoutSecs(ctx, field, obj)
+
+ case "bfSuggestionUsername":
+
+ out.Values[i] = ec._BuildBaronSettings_bfSuggestionUsername(ctx, field, obj)
+
case "ticketCreateProject":
+
out.Values[i] = ec._BuildBaronSettings_ticketCreateProject(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "ticketSearchProjects":
+
out.Values[i] = ec._BuildBaronSettings_ticketSearchProjects(ctx, field, obj)
- case "bfSuggestionServer":
- out.Values[i] = ec._BuildBaronSettings_bfSuggestionServer(ctx, field, obj)
- case "bfSuggestionUsername":
- out.Values[i] = ec._BuildBaronSettings_bfSuggestionUsername(ctx, field, obj)
- case "bfSuggestionPassword":
- out.Values[i] = ec._BuildBaronSettings_bfSuggestionPassword(ctx, field, obj)
- case "bfSuggestionTimeoutSecs":
- out.Values[i] = ec._BuildBaronSettings_bfSuggestionTimeoutSecs(ctx, field, obj)
- case "bfSuggestionFeaturesURL":
- out.Values[i] = ec._BuildBaronSettings_bfSuggestionFeaturesURL(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -42952,7 +62755,6 @@ var buildVariantTupleImplementors = []string{"BuildVariantTuple"}
func (ec *executionContext) _BuildVariantTuple(ctx context.Context, sel ast.SelectionSet, obj *task.BuildVariantTuple) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, buildVariantTupleImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -42960,12 +62762,16 @@ func (ec *executionContext) _BuildVariantTuple(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("BuildVariantTuple")
case "buildVariant":
+
out.Values[i] = ec._BuildVariantTuple_buildVariant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "displayName":
+
out.Values[i] = ec._BuildVariantTuple_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -42984,7 +62790,6 @@ var childPatchAliasImplementors = []string{"ChildPatchAlias"}
func (ec *executionContext) _ChildPatchAlias(ctx context.Context, sel ast.SelectionSet, obj *model.APIChildPatchAlias) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, childPatchAliasImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -42992,12 +62797,16 @@ func (ec *executionContext) _ChildPatchAlias(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("ChildPatchAlias")
case "alias":
+
out.Values[i] = ec._ChildPatchAlias_alias(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "patchId":
+
out.Values[i] = ec._ChildPatchAlias_patchId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43016,7 +62825,6 @@ var clientBinaryImplementors = []string{"ClientBinary"}
func (ec *executionContext) _ClientBinary(ctx context.Context, sel ast.SelectionSet, obj *model.APIClientBinary) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, clientBinaryImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43024,13 +62832,21 @@ func (ec *executionContext) _ClientBinary(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("ClientBinary")
case "arch":
+
out.Values[i] = ec._ClientBinary_arch(ctx, field, obj)
+
+ case "displayName":
+
+ out.Values[i] = ec._ClientBinary_displayName(ctx, field, obj)
+
case "os":
+
out.Values[i] = ec._ClientBinary_os(ctx, field, obj)
+
case "url":
+
out.Values[i] = ec._ClientBinary_url(ctx, field, obj)
- case "displayName":
- out.Values[i] = ec._ClientBinary_displayName(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43046,7 +62862,6 @@ var clientConfigImplementors = []string{"ClientConfig"}
func (ec *executionContext) _ClientConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIClientConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, clientConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43054,9 +62869,13 @@ func (ec *executionContext) _ClientConfig(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("ClientConfig")
case "clientBinaries":
+
out.Values[i] = ec._ClientConfig_clientBinaries(ctx, field, obj)
+
case "latestRevision":
+
out.Values[i] = ec._ClientConfig_latestRevision(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43072,7 +62891,6 @@ var cloudProviderConfigImplementors = []string{"CloudProviderConfig"}
func (ec *executionContext) _CloudProviderConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APICloudProviders) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, cloudProviderConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43080,7 +62898,9 @@ func (ec *executionContext) _CloudProviderConfig(ctx context.Context, sel ast.Se
case "__typename":
out.Values[i] = graphql.MarshalString("CloudProviderConfig")
case "aws":
+
out.Values[i] = ec._CloudProviderConfig_aws(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43096,23 +62916,32 @@ var commitQueueImplementors = []string{"CommitQueue"}
func (ec *executionContext) _CommitQueue(ctx context.Context, sel ast.SelectionSet, obj *model.APICommitQueue) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, commitQueueImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("CommitQueue")
- case "projectId":
- out.Values[i] = ec._CommitQueue_projectId(ctx, field, obj)
case "message":
+
out.Values[i] = ec._CommitQueue_message(ctx, field, obj)
+
case "owner":
+
out.Values[i] = ec._CommitQueue_owner(ctx, field, obj)
- case "repo":
- out.Values[i] = ec._CommitQueue_repo(ctx, field, obj)
+
+ case "projectId":
+
+ out.Values[i] = ec._CommitQueue_projectId(ctx, field, obj)
+
case "queue":
+
out.Values[i] = ec._CommitQueue_queue(ctx, field, obj)
+
+ case "repo":
+
+ out.Values[i] = ec._CommitQueue_repo(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43128,25 +62957,36 @@ var commitQueueItemImplementors = []string{"CommitQueueItem"}
func (ec *executionContext) _CommitQueueItem(ctx context.Context, sel ast.SelectionSet, obj *model.APICommitQueueItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, commitQueueItemImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("CommitQueueItem")
- case "issue":
- out.Values[i] = ec._CommitQueueItem_issue(ctx, field, obj)
- case "version":
- out.Values[i] = ec._CommitQueueItem_version(ctx, field, obj)
case "enqueueTime":
+
out.Values[i] = ec._CommitQueueItem_enqueueTime(ctx, field, obj)
+
+ case "issue":
+
+ out.Values[i] = ec._CommitQueueItem_issue(ctx, field, obj)
+
+ case "modules":
+
+ out.Values[i] = ec._CommitQueueItem_modules(ctx, field, obj)
+
case "patch":
+
out.Values[i] = ec._CommitQueueItem_patch(ctx, field, obj)
+
case "source":
+
out.Values[i] = ec._CommitQueueItem_source(ctx, field, obj)
- case "modules":
- out.Values[i] = ec._CommitQueueItem_modules(ctx, field, obj)
+
+ case "version":
+
+ out.Values[i] = ec._CommitQueueItem_version(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43162,7 +63002,6 @@ var commitQueueParamsImplementors = []string{"CommitQueueParams"}
func (ec *executionContext) _CommitQueueParams(ctx context.Context, sel ast.SelectionSet, obj *model.APICommitQueueParams) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, commitQueueParamsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43170,16 +63009,62 @@ func (ec *executionContext) _CommitQueueParams(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("CommitQueueParams")
case "enabled":
+
out.Values[i] = ec._CommitQueueParams_enabled(ctx, field, obj)
- case "requireSigned":
- out.Values[i] = ec._CommitQueueParams_requireSigned(ctx, field, obj)
+
case "mergeMethod":
+
out.Values[i] = ec._CommitQueueParams_mergeMethod(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "message":
+
out.Values[i] = ec._CommitQueueParams_message(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var containerResourcesImplementors = []string{"ContainerResources"}
+
+func (ec *executionContext) _ContainerResources(ctx context.Context, sel ast.SelectionSet, obj *model.APIContainerResources) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, containerResourcesImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ContainerResources")
+ case "name":
+
+ out.Values[i] = ec._ContainerResources_name(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "cpu":
+
+ out.Values[i] = ec._ContainerResources_cpu(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "memoryMb":
+
+ out.Values[i] = ec._ContainerResources_memoryMb(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43198,35 +63083,44 @@ var dependencyImplementors = []string{"Dependency"}
func (ec *executionContext) _Dependency(ctx context.Context, sel ast.SelectionSet, obj *Dependency) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, dependencyImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Dependency")
- case "name":
- out.Values[i] = ec._Dependency_name(ctx, field, obj)
+ case "buildVariant":
+
+ out.Values[i] = ec._Dependency_buildVariant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "metStatus":
+
out.Values[i] = ec._Dependency_metStatus(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "requiredStatus":
- out.Values[i] = ec._Dependency_requiredStatus(ctx, field, obj)
+ case "name":
+
+ out.Values[i] = ec._Dependency_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "buildVariant":
- out.Values[i] = ec._Dependency_buildVariant(ctx, field, obj)
+ case "requiredStatus":
+
+ out.Values[i] = ec._Dependency_requiredStatus(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "taskId":
+
out.Values[i] = ec._Dependency_taskId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43245,26 +63139,35 @@ var distroImplementors = []string{"Distro"}
func (ec *executionContext) _Distro(ctx context.Context, sel ast.SelectionSet, obj *model.APIDistro) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, distroImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Distro")
+ case "isVirtualWorkStation":
+
+ out.Values[i] = ec._Distro_isVirtualWorkStation(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "name":
+
out.Values[i] = ec._Distro_name(ctx, field, obj)
+
+ case "user":
+
+ out.Values[i] = ec._Distro_user(ctx, field, obj)
+
case "userSpawnAllowed":
+
out.Values[i] = ec._Distro_userSpawnAllowed(ctx, field, obj)
+
case "workDir":
+
out.Values[i] = ec._Distro_workDir(ctx, field, obj)
- case "user":
- out.Values[i] = ec._Distro_user(ctx, field, obj)
- case "isVirtualWorkStation":
- out.Values[i] = ec._Distro_isVirtualWorkStation(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43280,7 +63183,6 @@ var distroInfoImplementors = []string{"DistroInfo"}
func (ec *executionContext) _DistroInfo(ctx context.Context, sel ast.SelectionSet, obj *model.DistroInfo) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, distroInfoImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43288,17 +63190,134 @@ func (ec *executionContext) _DistroInfo(ctx context.Context, sel ast.SelectionSe
case "__typename":
out.Values[i] = graphql.MarshalString("DistroInfo")
case "id":
+
out.Values[i] = ec._DistroInfo_id(ctx, field, obj)
- case "workDir":
- out.Values[i] = ec._DistroInfo_workDir(ctx, field, obj)
+
+ case "bootstrapMethod":
+
+ out.Values[i] = ec._DistroInfo_bootstrapMethod(ctx, field, obj)
+
case "isVirtualWorkStation":
+
out.Values[i] = ec._DistroInfo_isVirtualWorkStation(ctx, field, obj)
- case "user":
- out.Values[i] = ec._DistroInfo_user(ctx, field, obj)
+
case "isWindows":
+
out.Values[i] = ec._DistroInfo_isWindows(ctx, field, obj)
- case "bootstrapMethod":
- out.Values[i] = ec._DistroInfo_bootstrapMethod(ctx, field, obj)
+
+ case "user":
+
+ out.Values[i] = ec._DistroInfo_user(ctx, field, obj)
+
+ case "workDir":
+
+ out.Values[i] = ec._DistroInfo_workDir(ctx, field, obj)
+
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var eCSConfigImplementors = []string{"ECSConfig"}
+
+func (ec *executionContext) _ECSConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIECSConfig) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, eCSConfigImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ECSConfig")
+ case "maxCPU":
+
+ out.Values[i] = ec._ECSConfig_maxCPU(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "maxMemoryMb":
+
+ out.Values[i] = ec._ECSConfig_maxMemoryMb(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var externalLinkImplementors = []string{"ExternalLink"}
+
+func (ec *executionContext) _ExternalLink(ctx context.Context, sel ast.SelectionSet, obj *model.APIExternalLink) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, externalLinkImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ExternalLink")
+ case "displayName":
+
+ out.Values[i] = ec._ExternalLink_displayName(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "urlTemplate":
+
+ out.Values[i] = ec._ExternalLink_urlTemplate(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var externalLinkForMetadataImplementors = []string{"ExternalLinkForMetadata"}
+
+func (ec *executionContext) _ExternalLinkForMetadata(ctx context.Context, sel ast.SelectionSet, obj *ExternalLinkForMetadata) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, externalLinkForMetadataImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ExternalLinkForMetadata")
+ case "url":
+
+ out.Values[i] = ec._ExternalLinkForMetadata_url(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "displayName":
+
+ out.Values[i] = ec._ExternalLinkForMetadata_displayName(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43314,25 +63333,30 @@ var fileImplementors = []string{"File"}
func (ec *executionContext) _File(ctx context.Context, sel ast.SelectionSet, obj *model.APIFile) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, fileImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("File")
- case "name":
- out.Values[i] = ec._File_name(ctx, field, obj)
+ case "link":
+
+ out.Values[i] = ec._File_link(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "link":
- out.Values[i] = ec._File_link(ctx, field, obj)
+ case "name":
+
+ out.Values[i] = ec._File_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "visibility":
+
out.Values[i] = ec._File_visibility(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43351,38 +63375,118 @@ var fileDiffImplementors = []string{"FileDiff"}
func (ec *executionContext) _FileDiff(ctx context.Context, sel ast.SelectionSet, obj *model.FileDiff) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, fileDiffImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("FileDiff")
- case "fileName":
- out.Values[i] = ec._FileDiff_fileName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
case "additions":
+
out.Values[i] = ec._FileDiff_additions(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "deletions":
+
out.Values[i] = ec._FileDiff_deletions(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "description":
+
+ out.Values[i] = ec._FileDiff_description(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "diffLink":
+
out.Values[i] = ec._FileDiff_diffLink(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "fileName":
+
+ out.Values[i] = ec._FileDiff_fileName(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var generalSubscriptionImplementors = []string{"GeneralSubscription"}
+
+func (ec *executionContext) _GeneralSubscription(ctx context.Context, sel ast.SelectionSet, obj *model.APISubscription) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, generalSubscriptionImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("GeneralSubscription")
+ case "id":
+
+ out.Values[i] = ec._GeneralSubscription_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "ownerType":
+
+ out.Values[i] = ec._GeneralSubscription_ownerType(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "regexSelectors":
+
+ out.Values[i] = ec._GeneralSubscription_regexSelectors(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "resourceType":
+
+ out.Values[i] = ec._GeneralSubscription_resourceType(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "selectors":
+
+ out.Values[i] = ec._GeneralSubscription_selectors(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "description":
- out.Values[i] = ec._FileDiff_description(ctx, field, obj)
+ case "subscriber":
+
+ out.Values[i] = ec._GeneralSubscription_subscriber(ctx, field, obj)
+
+ case "trigger":
+
+ out.Values[i] = ec._GeneralSubscription_trigger(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "triggerData":
+
+ out.Values[i] = ec._GeneralSubscription_triggerData(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43398,7 +63502,6 @@ var githubCheckSubscriberImplementors = []string{"GithubCheckSubscriber"}
func (ec *executionContext) _GithubCheckSubscriber(ctx context.Context, sel ast.SelectionSet, obj *model.APIGithubCheckSubscriber) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, githubCheckSubscriberImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43406,17 +63509,23 @@ func (ec *executionContext) _GithubCheckSubscriber(ctx context.Context, sel ast.
case "__typename":
out.Values[i] = graphql.MarshalString("GithubCheckSubscriber")
case "owner":
+
out.Values[i] = ec._GithubCheckSubscriber_owner(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "repo":
- out.Values[i] = ec._GithubCheckSubscriber_repo(ctx, field, obj)
+ case "ref":
+
+ out.Values[i] = ec._GithubCheckSubscriber_ref(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "ref":
- out.Values[i] = ec._GithubCheckSubscriber_ref(ctx, field, obj)
+ case "repo":
+
+ out.Values[i] = ec._GithubCheckSubscriber_repo(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43435,7 +63544,6 @@ var githubPRSubscriberImplementors = []string{"GithubPRSubscriber"}
func (ec *executionContext) _GithubPRSubscriber(ctx context.Context, sel ast.SelectionSet, obj *model.APIGithubPRSubscriber) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, githubPRSubscriberImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43443,22 +63551,30 @@ func (ec *executionContext) _GithubPRSubscriber(ctx context.Context, sel ast.Sel
case "__typename":
out.Values[i] = graphql.MarshalString("GithubPRSubscriber")
case "owner":
+
out.Values[i] = ec._GithubPRSubscriber_owner(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "repo":
- out.Values[i] = ec._GithubPRSubscriber_repo(ctx, field, obj)
+ case "prNumber":
+
+ out.Values[i] = ec._GithubPRSubscriber_prNumber(ctx, field, obj)
+
+ case "ref":
+
+ out.Values[i] = ec._GithubPRSubscriber_ref(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "ref":
- out.Values[i] = ec._GithubPRSubscriber_ref(ctx, field, obj)
+ case "repo":
+
+ out.Values[i] = ec._GithubPRSubscriber_repo(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "prNumber":
- out.Values[i] = ec._GithubPRSubscriber_prNumber(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43474,19 +63590,24 @@ var githubProjectConflictsImplementors = []string{"GithubProjectConflicts"}
func (ec *executionContext) _GithubProjectConflicts(ctx context.Context, sel ast.SelectionSet, obj *model1.GithubProjectConflicts) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, githubProjectConflictsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("GithubProjectConflicts")
+ case "commitCheckIdentifiers":
+
+ out.Values[i] = ec._GithubProjectConflicts_commitCheckIdentifiers(ctx, field, obj)
+
case "commitQueueIdentifiers":
+
out.Values[i] = ec._GithubProjectConflicts_commitQueueIdentifiers(ctx, field, obj)
+
case "prTestingIdentifiers":
+
out.Values[i] = ec._GithubProjectConflicts_prTestingIdentifiers(ctx, field, obj)
- case "commitCheckIdentifiers":
- out.Values[i] = ec._GithubProjectConflicts_commitCheckIdentifiers(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43502,17 +63623,20 @@ var githubUserImplementors = []string{"GithubUser"}
func (ec *executionContext) _GithubUser(ctx context.Context, sel ast.SelectionSet, obj *model.APIGithubUser) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, githubUserImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("GithubUser")
- case "uid":
- out.Values[i] = ec._GithubUser_uid(ctx, field, obj)
case "lastKnownAs":
+
out.Values[i] = ec._GithubUser_lastKnownAs(ctx, field, obj)
+
+ case "uid":
+
+ out.Values[i] = ec._GithubUser_uid(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43528,25 +63652,30 @@ var groupedBuildVariantImplementors = []string{"GroupedBuildVariant"}
func (ec *executionContext) _GroupedBuildVariant(ctx context.Context, sel ast.SelectionSet, obj *GroupedBuildVariant) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, groupedBuildVariantImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("GroupedBuildVariant")
- case "variant":
- out.Values[i] = ec._GroupedBuildVariant_variant(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
case "displayName":
+
out.Values[i] = ec._GroupedBuildVariant_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "tasks":
+
out.Values[i] = ec._GroupedBuildVariant_tasks(ctx, field, obj)
+
+ case "variant":
+
+ out.Values[i] = ec._GroupedBuildVariant_variant(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43562,17 +63691,20 @@ var groupedFilesImplementors = []string{"GroupedFiles"}
func (ec *executionContext) _GroupedFiles(ctx context.Context, sel ast.SelectionSet, obj *GroupedFiles) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, groupedFilesImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("GroupedFiles")
- case "taskName":
- out.Values[i] = ec._GroupedFiles_taskName(ctx, field, obj)
case "files":
+
out.Values[i] = ec._GroupedFiles_files(ctx, field, obj)
+
+ case "taskName":
+
+ out.Values[i] = ec._GroupedFiles_taskName(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43588,7 +63720,6 @@ var groupedProjectsImplementors = []string{"GroupedProjects"}
func (ec *executionContext) _GroupedProjects(ctx context.Context, sel ast.SelectionSet, obj *GroupedProjects) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, groupedProjectsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43596,22 +63727,23 @@ func (ec *executionContext) _GroupedProjects(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("GroupedProjects")
case "groupDisplayName":
+
out.Values[i] = ec._GroupedProjects_groupDisplayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "name":
- out.Values[i] = ec._GroupedProjects_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "repo":
- out.Values[i] = ec._GroupedProjects_repo(ctx, field, obj)
case "projects":
+
out.Values[i] = ec._GroupedProjects_projects(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "repo":
+
+ out.Values[i] = ec._GroupedProjects_repo(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43627,25 +63759,30 @@ var groupedTaskStatusCountImplementors = []string{"GroupedTaskStatusCount"}
func (ec *executionContext) _GroupedTaskStatusCount(ctx context.Context, sel ast.SelectionSet, obj *task.GroupedTaskStatusCount) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, groupedTaskStatusCountImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("GroupedTaskStatusCount")
- case "variant":
- out.Values[i] = ec._GroupedTaskStatusCount_variant(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
case "displayName":
+
out.Values[i] = ec._GroupedTaskStatusCount_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "statusCounts":
+
out.Values[i] = ec._GroupedTaskStatusCount_statusCounts(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "variant":
+
+ out.Values[i] = ec._GroupedTaskStatusCount_variant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43664,42 +63801,52 @@ var hostImplementors = []string{"Host"}
func (ec *executionContext) _Host(ctx context.Context, sel ast.SelectionSet, obj *model.APIHost) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, hostImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Host")
- case "homeVolume":
+ case "id":
+
+ out.Values[i] = ec._Host_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "availabilityZone":
+
+ out.Values[i] = ec._Host_availabilityZone(ctx, field, obj)
+
+ case "ami":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Host_homeVolume(ctx, field, obj)
+ res = ec._Host_ami(ctx, field, obj)
return res
- })
- case "id":
- out.Values[i] = ec._Host_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "hostUrl":
- out.Values[i] = ec._Host_hostUrl(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "tag":
- out.Values[i] = ec._Host_tag(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "displayName":
+
+ out.Values[i] = ec._Host_displayName(ctx, field, obj)
+
+ case "distro":
+
+ out.Values[i] = ec._Host_distro(ctx, field, obj)
+
case "distroId":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -43707,62 +63854,144 @@ func (ec *executionContext) _Host(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Host_distroId(ctx, field, obj)
return res
- })
- case "status":
- out.Values[i] = ec._Host_status(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- case "runningTask":
- out.Values[i] = ec._Host_runningTask(ctx, field, obj)
- case "totalIdleTime":
- out.Values[i] = ec._Host_totalIdleTime(ctx, field, obj)
- case "uptime":
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "elapsed":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Host_uptime(ctx, field, obj)
+ res = ec._Host_elapsed(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "elapsed":
+ case "expiration":
+
+ out.Values[i] = ec._Host_expiration(ctx, field, obj)
+
+ case "hostUrl":
+
+ out.Values[i] = ec._Host_hostUrl(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "homeVolume":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Host_elapsed(ctx, field, obj)
+ res = ec._Host_homeVolume(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "startedBy":
- out.Values[i] = ec._Host_startedBy(ctx, field, obj)
+ case "homeVolumeID":
+
+ out.Values[i] = ec._Host_homeVolumeID(ctx, field, obj)
+
+ case "instanceType":
+
+ out.Values[i] = ec._Host_instanceType(ctx, field, obj)
+
+ case "instanceTags":
+
+ out.Values[i] = ec._Host_instanceTags(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "lastCommunicationTime":
+
+ out.Values[i] = ec._Host_lastCommunicationTime(ctx, field, obj)
+
+ case "noExpiration":
+
+ out.Values[i] = ec._Host_noExpiration(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "provider":
+
out.Values[i] = ec._Host_provider(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "lastCommunicationTime":
- out.Values[i] = ec._Host_lastCommunicationTime(ctx, field, obj)
- case "noExpiration":
- out.Values[i] = ec._Host_noExpiration(ctx, field, obj)
+ case "runningTask":
+
+ out.Values[i] = ec._Host_runningTask(ctx, field, obj)
+
+ case "startedBy":
+
+ out.Values[i] = ec._Host_startedBy(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "instanceType":
- out.Values[i] = ec._Host_instanceType(ctx, field, obj)
- case "homeVolumeID":
- out.Values[i] = ec._Host_homeVolumeID(ctx, field, obj)
+ case "status":
+
+ out.Values[i] = ec._Host_status(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "tag":
+
+ out.Values[i] = ec._Host_tag(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "totalIdleTime":
+
+ out.Values[i] = ec._Host_totalIdleTime(ctx, field, obj)
+
+ case "uptime":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Host_uptime(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "user":
+
+ out.Values[i] = ec._Host_user(ctx, field, obj)
+
case "volumes":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -43773,22 +64002,12 @@ func (ec *executionContext) _Host(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
- })
- case "user":
- out.Values[i] = ec._Host_user(ctx, field, obj)
- case "distro":
- out.Values[i] = ec._Host_distro(ctx, field, obj)
- case "availabilityZone":
- out.Values[i] = ec._Host_availabilityZone(ctx, field, obj)
- case "instanceTags":
- out.Values[i] = ec._Host_instanceTags(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- case "expiration":
- out.Values[i] = ec._Host_expiration(ctx, field, obj)
- case "displayName":
- out.Values[i] = ec._Host_displayName(ctx, field, obj)
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43804,90 +64023,121 @@ var hostEventLogDataImplementors = []string{"HostEventLogData"}
func (ec *executionContext) _HostEventLogData(ctx context.Context, sel ast.SelectionSet, obj *model.HostAPIEventData) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, hostEventLogDataImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("HostEventLogData")
+ case "agentBuild":
+
+ out.Values[i] = ec._HostEventLogData_agentBuild(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "agentRevision":
+
out.Values[i] = ec._HostEventLogData_agentRevision(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "agentBuild":
- out.Values[i] = ec._HostEventLogData_agentBuild(ctx, field, obj)
+ case "duration":
+
+ out.Values[i] = ec._HostEventLogData_duration(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "jasperRevision":
- out.Values[i] = ec._HostEventLogData_jasperRevision(ctx, field, obj)
+ case "execution":
+
+ out.Values[i] = ec._HostEventLogData_execution(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "oldStatus":
- out.Values[i] = ec._HostEventLogData_oldStatus(ctx, field, obj)
+ case "hostname":
+
+ out.Values[i] = ec._HostEventLogData_hostname(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "newStatus":
- out.Values[i] = ec._HostEventLogData_newStatus(ctx, field, obj)
+ case "jasperRevision":
+
+ out.Values[i] = ec._HostEventLogData_jasperRevision(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "logs":
+
out.Values[i] = ec._HostEventLogData_logs(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "hostname":
- out.Values[i] = ec._HostEventLogData_hostname(ctx, field, obj)
+ case "monitorOp":
+
+ out.Values[i] = ec._HostEventLogData_monitorOp(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "newStatus":
+
+ out.Values[i] = ec._HostEventLogData_newStatus(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "oldStatus":
+
+ out.Values[i] = ec._HostEventLogData_oldStatus(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "provisioningMethod":
+
out.Values[i] = ec._HostEventLogData_provisioningMethod(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "successful":
+
+ out.Values[i] = ec._HostEventLogData_successful(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "taskId":
+
out.Values[i] = ec._HostEventLogData_taskId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "taskPid":
+
out.Values[i] = ec._HostEventLogData_taskPid(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "taskStatus":
+
out.Values[i] = ec._HostEventLogData_taskStatus(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "execution":
- out.Values[i] = ec._HostEventLogData_execution(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "monitorOp":
- out.Values[i] = ec._HostEventLogData_monitorOp(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "user":
+
out.Values[i] = ec._HostEventLogData_user(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "successful":
- out.Values[i] = ec._HostEventLogData_successful(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "duration":
- out.Values[i] = ec._HostEventLogData_duration(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43906,7 +64156,6 @@ var hostEventLogEntryImplementors = []string{"HostEventLogEntry"}
func (ec *executionContext) _HostEventLogEntry(ctx context.Context, sel ast.SelectionSet, obj *model.HostAPIEventLogEntry) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, hostEventLogEntryImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43914,34 +64163,48 @@ func (ec *executionContext) _HostEventLogEntry(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("HostEventLogEntry")
case "id":
+
out.Values[i] = ec._HostEventLogEntry_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "resourceType":
- out.Values[i] = ec._HostEventLogEntry_resourceType(ctx, field, obj)
+ case "data":
+
+ out.Values[i] = ec._HostEventLogEntry_data(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "eventType":
+
+ out.Values[i] = ec._HostEventLogEntry_eventType(ctx, field, obj)
+
case "processedAt":
+
out.Values[i] = ec._HostEventLogEntry_processedAt(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "timestamp":
- out.Values[i] = ec._HostEventLogEntry_timestamp(ctx, field, obj)
- case "eventType":
- out.Values[i] = ec._HostEventLogEntry_eventType(ctx, field, obj)
- case "data":
- out.Values[i] = ec._HostEventLogEntry_data(ctx, field, obj)
+ case "resourceId":
+
+ out.Values[i] = ec._HostEventLogEntry_resourceId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "resourceId":
- out.Values[i] = ec._HostEventLogEntry_resourceId(ctx, field, obj)
+ case "resourceType":
+
+ out.Values[i] = ec._HostEventLogEntry_resourceType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "timestamp":
+
+ out.Values[i] = ec._HostEventLogEntry_timestamp(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -43957,20 +64220,23 @@ var hostEventsImplementors = []string{"HostEvents"}
func (ec *executionContext) _HostEvents(ctx context.Context, sel ast.SelectionSet, obj *HostEvents) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, hostEventsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("HostEvents")
- case "eventLogEntries":
- out.Values[i] = ec._HostEvents_eventLogEntries(ctx, field, obj)
+ case "count":
+
+ out.Values[i] = ec._HostEvents_count(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "count":
- out.Values[i] = ec._HostEvents_count(ctx, field, obj)
+ case "eventLogEntries":
+
+ out.Values[i] = ec._HostEvents_eventLogEntries(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -43989,7 +64255,6 @@ var hostsResponseImplementors = []string{"HostsResponse"}
func (ec *executionContext) _HostsResponse(ctx context.Context, sel ast.SelectionSet, obj *HostsResponse) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, hostsResponseImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -43997,14 +64262,20 @@ func (ec *executionContext) _HostsResponse(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("HostsResponse")
case "filteredHostsCount":
+
out.Values[i] = ec._HostsResponse_filteredHostsCount(ctx, field, obj)
- case "totalHostsCount":
- out.Values[i] = ec._HostsResponse_totalHostsCount(ctx, field, obj)
+
+ case "hosts":
+
+ out.Values[i] = ec._HostsResponse_hosts(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "hosts":
- out.Values[i] = ec._HostsResponse_hosts(ctx, field, obj)
+ case "totalHostsCount":
+
+ out.Values[i] = ec._HostsResponse_totalHostsCount(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44023,25 +64294,30 @@ var instanceTagImplementors = []string{"InstanceTag"}
func (ec *executionContext) _InstanceTag(ctx context.Context, sel ast.SelectionSet, obj *host.Tag) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, instanceTagImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("InstanceTag")
+ case "canBeModified":
+
+ out.Values[i] = ec._InstanceTag_canBeModified(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "key":
+
out.Values[i] = ec._InstanceTag_key(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "value":
+
out.Values[i] = ec._InstanceTag_value(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "canBeModified":
- out.Values[i] = ec._InstanceTag_canBeModified(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44060,22 +64336,24 @@ var issueLinkImplementors = []string{"IssueLink"}
func (ec *executionContext) _IssueLink(ctx context.Context, sel ast.SelectionSet, obj *model.APIIssueLink) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, issueLinkImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("IssueLink")
+ case "confidenceScore":
+
+ out.Values[i] = ec._IssueLink_confidenceScore(ctx, field, obj)
+
case "issueKey":
+
out.Values[i] = ec._IssueLink_issueKey(ctx, field, obj)
- case "url":
- out.Values[i] = ec._IssueLink_url(ctx, field, obj)
- case "source":
- out.Values[i] = ec._IssueLink_source(ctx, field, obj)
+
case "jiraTicket":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -44083,9 +64361,20 @@ func (ec *executionContext) _IssueLink(ctx context.Context, sel ast.SelectionSet
}()
res = ec._IssueLink_jiraTicket(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "confidenceScore":
- out.Values[i] = ec._IssueLink_confidenceScore(ctx, field, obj)
+ case "source":
+
+ out.Values[i] = ec._IssueLink_source(ctx, field, obj)
+
+ case "url":
+
+ out.Values[i] = ec._IssueLink_url(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44101,7 +64390,6 @@ var jiraConfigImplementors = []string{"JiraConfig"}
func (ec *executionContext) _JiraConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIJiraConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, jiraConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44109,7 +64397,9 @@ func (ec *executionContext) _JiraConfig(ctx context.Context, sel ast.SelectionSe
case "__typename":
out.Values[i] = graphql.MarshalString("JiraConfig")
case "host":
+
out.Values[i] = ec._JiraConfig_host(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44125,20 +64415,23 @@ var jiraFieldImplementors = []string{"JiraField"}
func (ec *executionContext) _JiraField(ctx context.Context, sel ast.SelectionSet, obj *model.APIJiraField) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, jiraFieldImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("JiraField")
- case "field":
- out.Values[i] = ec._JiraField_field(ctx, field, obj)
+ case "displayText":
+
+ out.Values[i] = ec._JiraField_displayText(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "displayText":
- out.Values[i] = ec._JiraField_displayText(ctx, field, obj)
+ case "field":
+
+ out.Values[i] = ec._JiraField_field(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44157,20 +64450,23 @@ var jiraIssueSubscriberImplementors = []string{"JiraIssueSubscriber"}
func (ec *executionContext) _JiraIssueSubscriber(ctx context.Context, sel ast.SelectionSet, obj *model.APIJIRAIssueSubscriber) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, jiraIssueSubscriberImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("JiraIssueSubscriber")
- case "project":
- out.Values[i] = ec._JiraIssueSubscriber_project(ctx, field, obj)
+ case "issueType":
+
+ out.Values[i] = ec._JiraIssueSubscriber_issueType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "issueType":
- out.Values[i] = ec._JiraIssueSubscriber_issueType(ctx, field, obj)
+ case "project":
+
+ out.Values[i] = ec._JiraIssueSubscriber_project(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44189,7 +64485,6 @@ var jiraStatusImplementors = []string{"JiraStatus"}
func (ec *executionContext) _JiraStatus(ctx context.Context, sel ast.SelectionSet, obj *thirdparty.JiraStatus) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, jiraStatusImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44197,12 +64492,16 @@ func (ec *executionContext) _JiraStatus(ctx context.Context, sel ast.SelectionSe
case "__typename":
out.Values[i] = graphql.MarshalString("JiraStatus")
case "id":
+
out.Values[i] = ec._JiraStatus_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "name":
+
out.Values[i] = ec._JiraStatus_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44221,20 +64520,23 @@ var jiraTicketImplementors = []string{"JiraTicket"}
func (ec *executionContext) _JiraTicket(ctx context.Context, sel ast.SelectionSet, obj *thirdparty.JiraTicket) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, jiraTicketImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("JiraTicket")
- case "key":
- out.Values[i] = ec._JiraTicket_key(ctx, field, obj)
+ case "fields":
+
+ out.Values[i] = ec._JiraTicket_fields(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "fields":
- out.Values[i] = ec._JiraTicket_fields(ctx, field, obj)
+ case "key":
+
+ out.Values[i] = ec._JiraTicket_key(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44253,23 +64555,185 @@ var logMessageImplementors = []string{"LogMessage"}
func (ec *executionContext) _LogMessage(ctx context.Context, sel ast.SelectionSet, obj *apimodels.LogMessage) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logMessageImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("LogMessage")
- case "type":
- out.Values[i] = ec._LogMessage_type(ctx, field, obj)
- case "severity":
- out.Values[i] = ec._LogMessage_severity(ctx, field, obj)
case "message":
+
out.Values[i] = ec._LogMessage_message(ctx, field, obj)
+
+ case "severity":
+
+ out.Values[i] = ec._LogMessage_severity(ctx, field, obj)
+
case "timestamp":
+
out.Values[i] = ec._LogMessage_timestamp(ctx, field, obj)
+
+ case "type":
+
+ out.Values[i] = ec._LogMessage_type(ctx, field, obj)
+
case "version":
+
out.Values[i] = ec._LogMessage_version(ctx, field, obj)
+
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var logkeeperBuildImplementors = []string{"LogkeeperBuild"}
+
+func (ec *executionContext) _LogkeeperBuild(ctx context.Context, sel ast.SelectionSet, obj *plank.Build) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, logkeeperBuildImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("LogkeeperBuild")
+ case "id":
+
+ out.Values[i] = ec._LogkeeperBuild_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "builder":
+
+ out.Values[i] = ec._LogkeeperBuild_builder(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "buildNum":
+
+ out.Values[i] = ec._LogkeeperBuild_buildNum(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "taskId":
+
+ out.Values[i] = ec._LogkeeperBuild_taskId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "taskExecution":
+
+ out.Values[i] = ec._LogkeeperBuild_taskExecution(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "tests":
+
+ out.Values[i] = ec._LogkeeperBuild_tests(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "task":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._LogkeeperBuild_task(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var logkeeperTestImplementors = []string{"LogkeeperTest"}
+
+func (ec *executionContext) _LogkeeperTest(ctx context.Context, sel ast.SelectionSet, obj *plank.Test) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, logkeeperTestImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("LogkeeperTest")
+ case "id":
+
+ out.Values[i] = ec._LogkeeperTest_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "name":
+
+ out.Values[i] = ec._LogkeeperTest_name(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "buildId":
+
+ out.Values[i] = ec._LogkeeperTest_buildId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "taskId":
+
+ out.Values[i] = ec._LogkeeperTest_taskId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "taskExecution":
+
+ out.Values[i] = ec._LogkeeperTest_taskExecution(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "phase":
+
+ out.Values[i] = ec._LogkeeperTest_phase(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "command":
+
+ out.Values[i] = ec._LogkeeperTest_command(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44285,17 +64749,20 @@ var mainlineCommitVersionImplementors = []string{"MainlineCommitVersion"}
func (ec *executionContext) _MainlineCommitVersion(ctx context.Context, sel ast.SelectionSet, obj *MainlineCommitVersion) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mainlineCommitVersionImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("MainlineCommitVersion")
- case "version":
- out.Values[i] = ec._MainlineCommitVersion_version(ctx, field, obj)
case "rolledUpVersions":
+
out.Values[i] = ec._MainlineCommitVersion_rolledUpVersions(ctx, field, obj)
+
+ case "version":
+
+ out.Values[i] = ec._MainlineCommitVersion_version(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44311,7 +64778,6 @@ var mainlineCommitsImplementors = []string{"MainlineCommits"}
func (ec *executionContext) _MainlineCommits(ctx context.Context, sel ast.SelectionSet, obj *MainlineCommits) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mainlineCommitsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44319,11 +64785,17 @@ func (ec *executionContext) _MainlineCommits(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("MainlineCommits")
case "nextPageOrderNumber":
+
out.Values[i] = ec._MainlineCommits_nextPageOrderNumber(ctx, field, obj)
+
case "prevPageOrderNumber":
+
out.Values[i] = ec._MainlineCommits_prevPageOrderNumber(ctx, field, obj)
+
case "versions":
+
out.Values[i] = ec._MainlineCommits_versions(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44342,7 +64814,6 @@ var manifestImplementors = []string{"Manifest"}
func (ec *executionContext) _Manifest(ctx context.Context, sel ast.SelectionSet, obj *Manifest) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, manifestImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44350,34 +64821,87 @@ func (ec *executionContext) _Manifest(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("Manifest")
case "id":
+
out.Values[i] = ec._Manifest_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "revision":
- out.Values[i] = ec._Manifest_revision(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "project":
- out.Values[i] = ec._Manifest_project(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "branch":
+
out.Values[i] = ec._Manifest_branch(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "isBase":
+
out.Values[i] = ec._Manifest_isBase(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "moduleOverrides":
+
out.Values[i] = ec._Manifest_moduleOverrides(ctx, field, obj)
+
case "modules":
+
out.Values[i] = ec._Manifest_modules(ctx, field, obj)
+
+ case "project":
+
+ out.Values[i] = ec._Manifest_project(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "revision":
+
+ out.Values[i] = ec._Manifest_revision(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var metadataLinkImplementors = []string{"MetadataLink"}
+
+func (ec *executionContext) _MetadataLink(ctx context.Context, sel ast.SelectionSet, obj *model.APIMetadataLink) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, metadataLinkImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("MetadataLink")
+ case "url":
+
+ out.Values[i] = ec._MetadataLink_url(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "text":
+
+ out.Values[i] = ec._MetadataLink_text(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "source":
+
+ out.Values[i] = ec._MetadataLink_source(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44393,17 +64917,20 @@ var moduleImplementors = []string{"Module"}
func (ec *executionContext) _Module(ctx context.Context, sel ast.SelectionSet, obj *model.APIModule) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, moduleImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Module")
- case "module":
- out.Values[i] = ec._Module_module(ctx, field, obj)
case "issue":
+
out.Values[i] = ec._Module_issue(ctx, field, obj)
+
+ case "module":
+
+ out.Values[i] = ec._Module_module(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44419,7 +64946,6 @@ var moduleCodeChangeImplementors = []string{"ModuleCodeChange"}
func (ec *executionContext) _ModuleCodeChange(ctx context.Context, sel ast.SelectionSet, obj *model.APIModulePatch) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, moduleCodeChangeImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44427,22 +64953,30 @@ func (ec *executionContext) _ModuleCodeChange(ctx context.Context, sel ast.Selec
case "__typename":
out.Values[i] = graphql.MarshalString("ModuleCodeChange")
case "branchName":
+
out.Values[i] = ec._ModuleCodeChange_branchName(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "fileDiffs":
+
+ out.Values[i] = ec._ModuleCodeChange_fileDiffs(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "htmlLink":
+
out.Values[i] = ec._ModuleCodeChange_htmlLink(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "rawLink":
+
out.Values[i] = ec._ModuleCodeChange_rawLink(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "fileDiffs":
- out.Values[i] = ec._ModuleCodeChange_fileDiffs(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44461,7 +64995,6 @@ var mutationImplementors = []string{"Mutation"}
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
-
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Mutation",
})
@@ -44469,228 +65002,452 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
+ innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
+ Object: field.Name,
+ Field: field,
+ })
+
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Mutation")
- case "addFavoriteProject":
- out.Values[i] = ec._Mutation_addFavoriteProject(ctx, field)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "removeFavoriteProject":
- out.Values[i] = ec._Mutation_removeFavoriteProject(ctx, field)
+ case "bbCreateTicket":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_bbCreateTicket(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "createProject":
- out.Values[i] = ec._Mutation_createProject(ctx, field)
+ case "addAnnotationIssue":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_addAnnotationIssue(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "copyProject":
- out.Values[i] = ec._Mutation_copyProject(ctx, field)
+ case "editAnnotationNote":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_editAnnotationNote(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "attachProjectToNewRepo":
- out.Values[i] = ec._Mutation_attachProjectToNewRepo(ctx, field)
+ case "moveAnnotationIssue":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_moveAnnotationIssue(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "saveProjectSettingsForSection":
- out.Values[i] = ec._Mutation_saveProjectSettingsForSection(ctx, field)
+ case "removeAnnotationIssue":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_removeAnnotationIssue(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "saveRepoSettingsForSection":
- out.Values[i] = ec._Mutation_saveRepoSettingsForSection(ctx, field)
+ case "setAnnotationMetadataLinks":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_setAnnotationMetadataLinks(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "defaultSectionToRepo":
- out.Values[i] = ec._Mutation_defaultSectionToRepo(ctx, field)
- case "attachProjectToRepo":
- out.Values[i] = ec._Mutation_attachProjectToRepo(ctx, field)
+ case "reprovisionToNew":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_reprovisionToNew(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "detachProjectFromRepo":
- out.Values[i] = ec._Mutation_detachProjectFromRepo(ctx, field)
+ case "restartJasper":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_restartJasper(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "forceRepotrackerRun":
- out.Values[i] = ec._Mutation_forceRepotrackerRun(ctx, field)
+ case "updateHostStatus":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_updateHostStatus(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "deactivateStepbackTasks":
- out.Values[i] = ec._Mutation_deactivateStepbackTasks(ctx, field)
+ case "enqueuePatch":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_enqueuePatch(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
case "schedulePatch":
- out.Values[i] = ec._Mutation_schedulePatch(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_schedulePatch(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
case "schedulePatchTasks":
- out.Values[i] = ec._Mutation_schedulePatchTasks(ctx, field)
- case "unschedulePatchTasks":
- out.Values[i] = ec._Mutation_unschedulePatchTasks(ctx, field)
- case "restartVersions":
- out.Values[i] = ec._Mutation_restartVersions(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_schedulePatchTasks(ctx, field)
+ })
+
case "scheduleUndispatchedBaseTasks":
- out.Values[i] = ec._Mutation_scheduleUndispatchedBaseTasks(ctx, field)
- case "enqueuePatch":
- out.Values[i] = ec._Mutation_enqueuePatch(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_scheduleUndispatchedBaseTasks(ctx, field)
+ })
+
+ case "setPatchPriority":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_setPatchPriority(ctx, field)
+ })
+
+ case "unschedulePatchTasks":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_unschedulePatchTasks(ctx, field)
+ })
+
+ case "addFavoriteProject":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_addFavoriteProject(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "setPatchPriority":
- out.Values[i] = ec._Mutation_setPatchPriority(ctx, field)
- case "scheduleTasks":
- out.Values[i] = ec._Mutation_scheduleTasks(ctx, field)
+ case "attachProjectToNewRepo":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_attachProjectToNewRepo(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "unscheduleTask":
- out.Values[i] = ec._Mutation_unscheduleTask(ctx, field)
+ case "attachProjectToRepo":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_attachProjectToRepo(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "abortTask":
- out.Values[i] = ec._Mutation_abortTask(ctx, field)
+ case "createProject":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_createProject(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "setTaskPriority":
- out.Values[i] = ec._Mutation_setTaskPriority(ctx, field)
+ case "copyProject":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_copyProject(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "restartTask":
- out.Values[i] = ec._Mutation_restartTask(ctx, field)
+ case "defaultSectionToRepo":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_defaultSectionToRepo(ctx, field)
+ })
+
+ case "detachProjectFromRepo":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_detachProjectFromRepo(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "saveSubscription":
- out.Values[i] = ec._Mutation_saveSubscription(ctx, field)
+ case "forceRepotrackerRun":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_forceRepotrackerRun(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "editAnnotationNote":
- out.Values[i] = ec._Mutation_editAnnotationNote(ctx, field)
+ case "promoteVarsToRepo":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_promoteVarsToRepo(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "moveAnnotationIssue":
- out.Values[i] = ec._Mutation_moveAnnotationIssue(ctx, field)
+ case "removeFavoriteProject":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_removeFavoriteProject(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "addAnnotationIssue":
- out.Values[i] = ec._Mutation_addAnnotationIssue(ctx, field)
+ case "saveProjectSettingsForSection":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_saveProjectSettingsForSection(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "removeAnnotationIssue":
- out.Values[i] = ec._Mutation_removeAnnotationIssue(ctx, field)
+ case "saveRepoSettingsForSection":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_saveRepoSettingsForSection(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "removeItemFromCommitQueue":
- out.Values[i] = ec._Mutation_removeItemFromCommitQueue(ctx, field)
- case "updateUserSettings":
- out.Values[i] = ec._Mutation_updateUserSettings(ctx, field)
+ case "deactivateStepbackTask":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_deactivateStepbackTask(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "restartJasper":
- out.Values[i] = ec._Mutation_restartJasper(ctx, field)
+ case "attachVolumeToHost":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_attachVolumeToHost(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "reprovisionToNew":
- out.Values[i] = ec._Mutation_reprovisionToNew(ctx, field)
+ case "detachVolumeFromHost":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_detachVolumeFromHost(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "updateHostStatus":
- out.Values[i] = ec._Mutation_updateHostStatus(ctx, field)
+ case "editSpawnHost":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_editSpawnHost(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "createPublicKey":
- out.Values[i] = ec._Mutation_createPublicKey(ctx, field)
+ case "migrateVolume":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_migrateVolume(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
case "spawnHost":
- out.Values[i] = ec._Mutation_spawnHost(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_spawnHost(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
case "spawnVolume":
- out.Values[i] = ec._Mutation_spawnVolume(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_spawnVolume(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "updateVolume":
- out.Values[i] = ec._Mutation_updateVolume(ctx, field)
+ case "removeVolume":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_removeVolume(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
case "updateSpawnHostStatus":
- out.Values[i] = ec._Mutation_updateSpawnHostStatus(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_updateSpawnHostStatus(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "removePublicKey":
- out.Values[i] = ec._Mutation_removePublicKey(ctx, field)
+ case "updateVolume":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_updateVolume(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "updatePublicKey":
- out.Values[i] = ec._Mutation_updatePublicKey(ctx, field)
+ case "abortTask":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_abortTask(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "attachVolumeToHost":
- out.Values[i] = ec._Mutation_attachVolumeToHost(ctx, field)
+ case "overrideTaskDependencies":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_overrideTaskDependencies(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "detachVolumeFromHost":
- out.Values[i] = ec._Mutation_detachVolumeFromHost(ctx, field)
+ case "restartTask":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_restartTask(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "removeVolume":
- out.Values[i] = ec._Mutation_removeVolume(ctx, field)
+ case "scheduleTasks":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_scheduleTasks(ctx, field)
+ })
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "setTaskPriority":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_setTaskPriority(ctx, field)
+ })
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "unscheduleTask":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_unscheduleTask(ctx, field)
+ })
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "clearMySubscriptions":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_clearMySubscriptions(ctx, field)
+ })
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "createPublicKey":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_createPublicKey(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "editSpawnHost":
- out.Values[i] = ec._Mutation_editSpawnHost(ctx, field)
+ case "removePublicKey":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_removePublicKey(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "bbCreateTicket":
- out.Values[i] = ec._Mutation_bbCreateTicket(ctx, field)
+ case "saveSubscription":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_saveSubscription(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "clearMySubscriptions":
- out.Values[i] = ec._Mutation_clearMySubscriptions(ctx, field)
+ case "updatePublicKey":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_updatePublicKey(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "overrideTaskDependencies":
- out.Values[i] = ec._Mutation_overrideTaskDependencies(ctx, field)
+ case "updateUserSettings":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_updateUserSettings(ctx, field)
+ })
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "removeItemFromCommitQueue":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_removeItemFromCommitQueue(ctx, field)
+ })
+
+ case "restartVersions":
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_restartVersions(ctx, field)
+ })
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44706,7 +65463,6 @@ var noteImplementors = []string{"Note"}
func (ec *executionContext) _Note(ctx context.Context, sel ast.SelectionSet, obj *model.APINote) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, noteImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44714,12 +65470,16 @@ func (ec *executionContext) _Note(ctx context.Context, sel ast.SelectionSet, obj
case "__typename":
out.Values[i] = graphql.MarshalString("Note")
case "message":
+
out.Values[i] = ec._Note_message(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "source":
+
out.Values[i] = ec._Note_source(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44738,7 +65498,6 @@ var notificationsImplementors = []string{"Notifications"}
func (ec *executionContext) _Notifications(ctx context.Context, sel ast.SelectionSet, obj *model.APINotificationPreferences) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, notificationsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44746,17 +65505,29 @@ func (ec *executionContext) _Notifications(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("Notifications")
case "buildBreak":
+
out.Values[i] = ec._Notifications_buildBreak(ctx, field, obj)
+
+ case "commitQueue":
+
+ out.Values[i] = ec._Notifications_commitQueue(ctx, field, obj)
+
case "patchFinish":
+
out.Values[i] = ec._Notifications_patchFinish(ctx, field, obj)
+
case "patchFirstFailure":
+
out.Values[i] = ec._Notifications_patchFirstFailure(ctx, field, obj)
+
case "spawnHostExpiration":
+
out.Values[i] = ec._Notifications_spawnHostExpiration(ctx, field, obj)
+
case "spawnHostOutcome":
+
out.Values[i] = ec._Notifications_spawnHostOutcome(ctx, field, obj)
- case "commitQueue":
- out.Values[i] = ec._Notifications_commitQueue(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44772,7 +65543,6 @@ var oomTrackerInfoImplementors = []string{"OomTrackerInfo"}
func (ec *executionContext) _OomTrackerInfo(ctx context.Context, sel ast.SelectionSet, obj *model.APIOomTrackerInfo) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, oomTrackerInfoImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44780,12 +65550,16 @@ func (ec *executionContext) _OomTrackerInfo(ctx context.Context, sel ast.Selecti
case "__typename":
out.Values[i] = graphql.MarshalString("OomTrackerInfo")
case "detected":
+
out.Values[i] = ec._OomTrackerInfo_detected(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "pids":
+
out.Values[i] = ec._OomTrackerInfo_pids(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -44801,7 +65575,6 @@ var parameterImplementors = []string{"Parameter"}
func (ec *executionContext) _Parameter(ctx context.Context, sel ast.SelectionSet, obj *model.APIParameter) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, parameterImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -44809,12 +65582,16 @@ func (ec *executionContext) _Parameter(ctx context.Context, sel ast.SelectionSet
case "__typename":
out.Values[i] = graphql.MarshalString("Parameter")
case "key":
+
out.Values[i] = ec._Parameter_key(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "value":
+
out.Values[i] = ec._Parameter_value(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -44833,53 +65610,41 @@ var patchImplementors = []string{"Patch"}
func (ec *executionContext) _Patch(ctx context.Context, sel ast.SelectionSet, obj *model.APIPatch) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, patchImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Patch")
- case "createTime":
- out.Values[i] = ec._Patch_createTime(ctx, field, obj)
case "id":
+
out.Values[i] = ec._Patch_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "description":
- out.Values[i] = ec._Patch_description(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "projectID":
- out.Values[i] = ec._Patch_projectID(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "projectIdentifier":
- out.Values[i] = ec._Patch_projectIdentifier(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "githash":
- out.Values[i] = ec._Patch_githash(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "patchNumber":
- out.Values[i] = ec._Patch_patchNumber(ctx, field, obj)
+ case "activated":
+
+ out.Values[i] = ec._Patch_activated(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
+ case "alias":
+
+ out.Values[i] = ec._Patch_alias(ctx, field, obj)
+
case "author":
+
out.Values[i] = ec._Patch_author(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "authorDisplayName":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -44890,142 +65655,256 @@ func (ec *executionContext) _Patch(ctx context.Context, sel ast.SelectionSet, ob
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "versionFull":
+ case "baseTaskStatuses":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_versionFull(ctx, field, obj)
+ res = ec._Patch_baseTaskStatuses(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
- })
- case "status":
- out.Values[i] = ec._Patch_status(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- case "variants":
- out.Values[i] = ec._Patch_variants(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "builds":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Patch_builds(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
}
- case "tasks":
- out.Values[i] = ec._Patch_tasks(ctx, field, obj)
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "canEnqueueToCommitQueue":
+
+ out.Values[i] = ec._Patch_canEnqueueToCommitQueue(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "childPatches":
- out.Values[i] = ec._Patch_childPatches(ctx, field, obj)
case "childPatchAliases":
+
out.Values[i] = ec._Patch_childPatchAliases(ctx, field, obj)
- case "variantsTasks":
- out.Values[i] = ec._Patch_variantsTasks(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "activated":
- out.Values[i] = ec._Patch_activated(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "alias":
- out.Values[i] = ec._Patch_alias(ctx, field, obj)
- case "duration":
+
+ case "childPatches":
+
+ out.Values[i] = ec._Patch_childPatches(ctx, field, obj)
+
+ case "commitQueuePosition":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_duration(ctx, field, obj)
+ res = ec._Patch_commitQueuePosition(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "time":
+ case "createTime":
+
+ out.Values[i] = ec._Patch_createTime(ctx, field, obj)
+
+ case "description":
+
+ out.Values[i] = ec._Patch_description(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "duration":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_time(ctx, field, obj)
+ res = ec._Patch_duration(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "taskCount":
+ case "githash":
+
+ out.Values[i] = ec._Patch_githash(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "moduleCodeChanges":
+
+ out.Values[i] = ec._Patch_moduleCodeChanges(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "parameters":
+
+ out.Values[i] = ec._Patch_parameters(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "patchNumber":
+
+ out.Values[i] = ec._Patch_patchNumber(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "patchTriggerAliases":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_taskCount(ctx, field, obj)
+ res = ec._Patch_patchTriggerAliases(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "baseVersionID":
+ case "project":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_baseVersionID(ctx, field, obj)
+ res = ec._Patch_project(ctx, field, obj)
return res
- })
- case "parameters":
- out.Values[i] = ec._Patch_parameters(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- case "moduleCodeChanges":
- out.Values[i] = ec._Patch_moduleCodeChanges(ctx, field, obj)
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "projectID":
+
+ out.Values[i] = ec._Patch_projectID(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "project":
+ case "projectIdentifier":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_project(ctx, field, obj)
+ res = ec._Patch_projectIdentifier(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "builds":
+ case "projectMetadata":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_builds(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Patch_projectMetadata(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "commitQueuePosition":
+ case "status":
+
+ out.Values[i] = ec._Patch_status(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "taskCount":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_commitQueuePosition(ctx, field, obj)
+ res = ec._Patch_taskCount(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "tasks":
+
+ out.Values[i] = ec._Patch_tasks(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
case "taskStatuses":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -45036,39 +65915,59 @@ func (ec *executionContext) _Patch(ctx context.Context, sel ast.SelectionSet, ob
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "baseTaskStatuses":
+ case "time":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_baseTaskStatuses(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Patch_time(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "canEnqueueToCommitQueue":
- out.Values[i] = ec._Patch_canEnqueueToCommitQueue(ctx, field, obj)
+ case "variants":
+
+ out.Values[i] = ec._Patch_variants(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "patchTriggerAliases":
+ case "variantsTasks":
+
+ out.Values[i] = ec._Patch_variantsTasks(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "versionFull":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Patch_patchTriggerAliases(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Patch_versionFull(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -45085,7 +65984,6 @@ var patchDurationImplementors = []string{"PatchDuration"}
func (ec *executionContext) _PatchDuration(ctx context.Context, sel ast.SelectionSet, obj *PatchDuration) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, patchDurationImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -45093,11 +65991,17 @@ func (ec *executionContext) _PatchDuration(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("PatchDuration")
case "makespan":
+
out.Values[i] = ec._PatchDuration_makespan(ctx, field, obj)
- case "timeTaken":
- out.Values[i] = ec._PatchDuration_timeTaken(ctx, field, obj)
+
case "time":
+
out.Values[i] = ec._PatchDuration_time(ctx, field, obj)
+
+ case "timeTaken":
+
+ out.Values[i] = ec._PatchDuration_timeTaken(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45113,7 +66017,6 @@ var patchProjectImplementors = []string{"PatchProject"}
func (ec *executionContext) _PatchProject(ctx context.Context, sel ast.SelectionSet, obj *PatchProject) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, patchProjectImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -45121,7 +66024,9 @@ func (ec *executionContext) _PatchProject(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("PatchProject")
case "variants":
+
out.Values[i] = ec._PatchProject_variants(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -45136,24 +66041,187 @@ func (ec *executionContext) _PatchProject(ctx context.Context, sel ast.Selection
return out
}
-var patchTasksImplementors = []string{"PatchTasks"}
+var patchTimeImplementors = []string{"PatchTime"}
+
+func (ec *executionContext) _PatchTime(ctx context.Context, sel ast.SelectionSet, obj *PatchTime) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, patchTimeImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("PatchTime")
+ case "finished":
+
+ out.Values[i] = ec._PatchTime_finished(ctx, field, obj)
+
+ case "started":
+
+ out.Values[i] = ec._PatchTime_started(ctx, field, obj)
+
+ case "submittedAt":
+
+ out.Values[i] = ec._PatchTime_submittedAt(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
-func (ec *executionContext) _PatchTasks(ctx context.Context, sel ast.SelectionSet, obj *PatchTasks) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, patchTasksImplementors)
+var patchTriggerAliasImplementors = []string{"PatchTriggerAlias"}
+func (ec *executionContext) _PatchTriggerAlias(ctx context.Context, sel ast.SelectionSet, obj *model.APIPatchTriggerDefinition) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, patchTriggerAliasImplementors)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("PatchTasks")
- case "tasks":
- out.Values[i] = ec._PatchTasks_tasks(ctx, field, obj)
+ out.Values[i] = graphql.MarshalString("PatchTriggerAlias")
+ case "alias":
+
+ out.Values[i] = ec._PatchTriggerAlias_alias(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "childProjectId":
+
+ out.Values[i] = ec._PatchTriggerAlias_childProjectId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "childProjectIdentifier":
+
+ out.Values[i] = ec._PatchTriggerAlias_childProjectIdentifier(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "parentAsModule":
+
+ out.Values[i] = ec._PatchTriggerAlias_parentAsModule(ctx, field, obj)
+
+ case "status":
+
+ out.Values[i] = ec._PatchTriggerAlias_status(ctx, field, obj)
+
+ case "taskSpecifiers":
+
+ out.Values[i] = ec._PatchTriggerAlias_taskSpecifiers(ctx, field, obj)
+
+ case "variantsTasks":
+
+ out.Values[i] = ec._PatchTriggerAlias_variantsTasks(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var patchesImplementors = []string{"Patches"}
+
+func (ec *executionContext) _Patches(ctx context.Context, sel ast.SelectionSet, obj *Patches) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, patchesImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Patches")
+ case "filteredPatchCount":
+
+ out.Values[i] = ec._Patches_filteredPatchCount(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "patches":
+
+ out.Values[i] = ec._Patches_patches(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var periodicBuildImplementors = []string{"PeriodicBuild"}
+
+func (ec *executionContext) _PeriodicBuild(ctx context.Context, sel ast.SelectionSet, obj *model.APIPeriodicBuildDefinition) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, periodicBuildImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("PeriodicBuild")
+ case "id":
+
+ out.Values[i] = ec._PeriodicBuild_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "alias":
+
+ out.Values[i] = ec._PeriodicBuild_alias(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "configFile":
+
+ out.Values[i] = ec._PeriodicBuild_configFile(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "intervalHours":
+
+ out.Values[i] = ec._PeriodicBuild_intervalHours(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "message":
+
+ out.Values[i] = ec._PeriodicBuild_message(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "count":
- out.Values[i] = ec._PatchTasks_count(ctx, field, obj)
+ case "nextRunTime":
+
+ out.Values[i] = ec._PeriodicBuild_nextRunTime(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -45168,25 +66236,42 @@ func (ec *executionContext) _PatchTasks(ctx context.Context, sel ast.SelectionSe
return out
}
-var patchTimeImplementors = []string{"PatchTime"}
-
-func (ec *executionContext) _PatchTime(ctx context.Context, sel ast.SelectionSet, obj *PatchTime) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, patchTimeImplementors)
+var permissionsImplementors = []string{"Permissions"}
+func (ec *executionContext) _Permissions(ctx context.Context, sel ast.SelectionSet, obj *Permissions) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, permissionsImplementors)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("PatchTime")
- case "started":
- out.Values[i] = ec._PatchTime_started(ctx, field, obj)
- case "finished":
- out.Values[i] = ec._PatchTime_finished(ctx, field, obj)
- case "submittedAt":
- out.Values[i] = ec._PatchTime_submittedAt(ctx, field, obj)
+ out.Values[i] = graphql.MarshalString("Permissions")
+ case "canCreateProject":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Permissions_canCreateProject(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "userId":
+
+ out.Values[i] = ec._Permissions_userId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- invalids++
+ atomic.AddUint32(&invalids, 1)
}
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -45199,43 +66284,107 @@ func (ec *executionContext) _PatchTime(ctx context.Context, sel ast.SelectionSet
return out
}
-var patchTriggerAliasImplementors = []string{"PatchTriggerAlias"}
-
-func (ec *executionContext) _PatchTriggerAlias(ctx context.Context, sel ast.SelectionSet, obj *model.APIPatchTriggerDefinition) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, patchTriggerAliasImplementors)
+var podImplementors = []string{"Pod"}
+func (ec *executionContext) _Pod(ctx context.Context, sel ast.SelectionSet, obj *model.APIPod) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, podImplementors)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("PatchTriggerAlias")
- case "alias":
- out.Values[i] = ec._PatchTriggerAlias_alias(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "childProjectId":
- out.Values[i] = ec._PatchTriggerAlias_childProjectId(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
+ out.Values[i] = graphql.MarshalString("Pod")
+ case "events":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Pod_events(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
}
- case "childProjectIdentifier":
- out.Values[i] = ec._PatchTriggerAlias_childProjectIdentifier(ctx, field, obj)
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "id":
+
+ out.Values[i] = ec._Pod_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- invalids++
+ atomic.AddUint32(&invalids, 1)
}
- case "taskSpecifiers":
- out.Values[i] = ec._PatchTriggerAlias_taskSpecifiers(ctx, field, obj)
case "status":
- out.Values[i] = ec._PatchTriggerAlias_status(ctx, field, obj)
- case "parentAsModule":
- out.Values[i] = ec._PatchTriggerAlias_parentAsModule(ctx, field, obj)
- case "variantsTasks":
- out.Values[i] = ec._PatchTriggerAlias_variantsTasks(ctx, field, obj)
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Pod_status(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "task":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Pod_task(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "taskContainerCreationOpts":
+
+ out.Values[i] = ec._Pod_taskContainerCreationOpts(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- invalids++
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "type":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Pod_type(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
}
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45247,27 +66396,57 @@ func (ec *executionContext) _PatchTriggerAlias(ctx context.Context, sel ast.Sele
return out
}
-var patchesImplementors = []string{"Patches"}
-
-func (ec *executionContext) _Patches(ctx context.Context, sel ast.SelectionSet, obj *Patches) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, patchesImplementors)
+var podEventLogDataImplementors = []string{"PodEventLogData"}
+func (ec *executionContext) _PodEventLogData(ctx context.Context, sel ast.SelectionSet, obj *model.PodAPIEventData) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, podEventLogDataImplementors)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("Patches")
- case "patches":
- out.Values[i] = ec._Patches_patches(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "filteredPatchCount":
- out.Values[i] = ec._Patches_filteredPatchCount(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
+ out.Values[i] = graphql.MarshalString("PodEventLogData")
+ case "oldStatus":
+
+ out.Values[i] = ec._PodEventLogData_oldStatus(ctx, field, obj)
+
+ case "newStatus":
+
+ out.Values[i] = ec._PodEventLogData_newStatus(ctx, field, obj)
+
+ case "reason":
+
+ out.Values[i] = ec._PodEventLogData_reason(ctx, field, obj)
+
+ case "taskID":
+
+ out.Values[i] = ec._PodEventLogData_taskID(ctx, field, obj)
+
+ case "taskExecution":
+
+ out.Values[i] = ec._PodEventLogData_taskExecution(ctx, field, obj)
+
+ case "taskStatus":
+
+ out.Values[i] = ec._PodEventLogData_taskStatus(ctx, field, obj)
+
+ case "task":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._PodEventLogData_task(ctx, field, obj)
+ return res
}
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45279,47 +66458,59 @@ func (ec *executionContext) _Patches(ctx context.Context, sel ast.SelectionSet,
return out
}
-var periodicBuildImplementors = []string{"PeriodicBuild"}
-
-func (ec *executionContext) _PeriodicBuild(ctx context.Context, sel ast.SelectionSet, obj *model.APIPeriodicBuildDefinition) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, periodicBuildImplementors)
+var podEventLogEntryImplementors = []string{"PodEventLogEntry"}
+func (ec *executionContext) _PodEventLogEntry(ctx context.Context, sel ast.SelectionSet, obj *model.PodAPIEventLogEntry) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, podEventLogEntryImplementors)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("PeriodicBuild")
+ out.Values[i] = graphql.MarshalString("PodEventLogEntry")
case "id":
- out.Values[i] = ec._PeriodicBuild_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "configFile":
- out.Values[i] = ec._PeriodicBuild_configFile(ctx, field, obj)
+
+ out.Values[i] = ec._PodEventLogEntry_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "intervalHours":
- out.Values[i] = ec._PeriodicBuild_intervalHours(ctx, field, obj)
+ case "data":
+
+ out.Values[i] = ec._PodEventLogEntry_data(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "alias":
- out.Values[i] = ec._PeriodicBuild_alias(ctx, field, obj)
+ case "eventType":
+
+ out.Values[i] = ec._PodEventLogEntry_eventType(ctx, field, obj)
+
+ case "processedAt":
+
+ out.Values[i] = ec._PodEventLogEntry_processedAt(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "message":
- out.Values[i] = ec._PeriodicBuild_message(ctx, field, obj)
+ case "resourceId":
+
+ out.Values[i] = ec._PodEventLogEntry_resourceId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "nextRunTime":
- out.Values[i] = ec._PeriodicBuild_nextRunTime(ctx, field, obj)
+ case "resourceType":
+
+ out.Values[i] = ec._PodEventLogEntry_resourceType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "timestamp":
+
+ out.Values[i] = ec._PodEventLogEntry_timestamp(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45331,36 +66522,30 @@ func (ec *executionContext) _PeriodicBuild(ctx context.Context, sel ast.Selectio
return out
}
-var permissionsImplementors = []string{"Permissions"}
-
-func (ec *executionContext) _Permissions(ctx context.Context, sel ast.SelectionSet, obj *Permissions) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, permissionsImplementors)
+var podEventsImplementors = []string{"PodEvents"}
+func (ec *executionContext) _PodEvents(ctx context.Context, sel ast.SelectionSet, obj *PodEvents) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, podEventsImplementors)
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("Permissions")
- case "userId":
- out.Values[i] = ec._Permissions_userId(ctx, field, obj)
+ out.Values[i] = graphql.MarshalString("PodEvents")
+ case "count":
+
+ out.Values[i] = ec._PodEvents_count(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
+ }
+ case "eventLogEntries":
+
+ out.Values[i] = ec._PodEvents_eventLogEntries(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
}
- case "canCreateProject":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Permissions_canCreateProject(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45376,7 +66561,6 @@ var projectImplementors = []string{"Project"}
func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectRef) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -45384,140 +66568,106 @@ func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("Project")
case "id":
+
out.Values[i] = ec._Project_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "identifier":
- out.Values[i] = ec._Project_identifier(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "displayName":
- out.Values[i] = ec._Project_displayName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "enabled":
- out.Values[i] = ec._Project_enabled(ctx, field, obj)
- case "private":
- out.Values[i] = ec._Project_private(ctx, field, obj)
- case "restricted":
- out.Values[i] = ec._Project_restricted(ctx, field, obj)
- case "owner":
- out.Values[i] = ec._Project_owner(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "repo":
- out.Values[i] = ec._Project_repo(ctx, field, obj)
+ case "admins":
+
+ out.Values[i] = ec._Project_admins(ctx, field, obj)
+
+ case "batchTime":
+
+ out.Values[i] = ec._Project_batchTime(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "branch":
+
out.Values[i] = ec._Project_branch(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "remotePath":
- out.Values[i] = ec._Project_remotePath(ctx, field, obj)
+ case "buildBaronSettings":
+
+ out.Values[i] = ec._Project_buildBaronSettings(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "patchingDisabled":
- out.Values[i] = ec._Project_patchingDisabled(ctx, field, obj)
- case "repotrackerDisabled":
- out.Values[i] = ec._Project_repotrackerDisabled(ctx, field, obj)
- case "dispatchingDisabled":
- out.Values[i] = ec._Project_dispatchingDisabled(ctx, field, obj)
- case "versionControlEnabled":
- out.Values[i] = ec._Project_versionControlEnabled(ctx, field, obj)
- case "prTestingEnabled":
- out.Values[i] = ec._Project_prTestingEnabled(ctx, field, obj)
- case "manualPrTestingEnabled":
- out.Values[i] = ec._Project_manualPrTestingEnabled(ctx, field, obj)
- case "githubChecksEnabled":
- out.Values[i] = ec._Project_githubChecksEnabled(ctx, field, obj)
- case "batchTime":
- out.Values[i] = ec._Project_batchTime(ctx, field, obj)
+ case "commitQueue":
+
+ out.Values[i] = ec._Project_commitQueue(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
+ case "containerSizeDefinitions":
+
+ out.Values[i] = ec._Project_containerSizeDefinitions(ctx, field, obj)
+
case "deactivatePrevious":
+
out.Values[i] = ec._Project_deactivatePrevious(ctx, field, obj)
- case "defaultLogger":
- out.Values[i] = ec._Project_defaultLogger(ctx, field, obj)
+
+ case "disabledStatsCache":
+
+ out.Values[i] = ec._Project_disabledStatsCache(ctx, field, obj)
+
+ case "dispatchingDisabled":
+
+ out.Values[i] = ec._Project_dispatchingDisabled(ctx, field, obj)
+
+ case "displayName":
+
+ out.Values[i] = ec._Project_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "notifyOnBuildFailure":
- out.Values[i] = ec._Project_notifyOnBuildFailure(ctx, field, obj)
- case "triggers":
- out.Values[i] = ec._Project_triggers(ctx, field, obj)
- case "patchTriggerAliases":
- out.Values[i] = ec._Project_patchTriggerAliases(ctx, field, obj)
+ case "enabled":
+
+ out.Values[i] = ec._Project_enabled(ctx, field, obj)
+
+ case "githubChecksEnabled":
+
+ out.Values[i] = ec._Project_githubChecksEnabled(ctx, field, obj)
+
case "githubTriggerAliases":
+
out.Values[i] = ec._Project_githubTriggerAliases(ctx, field, obj)
- case "periodicBuilds":
- out.Values[i] = ec._Project_periodicBuilds(ctx, field, obj)
- case "cedarTestResultsEnabled":
- out.Values[i] = ec._Project_cedarTestResultsEnabled(ctx, field, obj)
- case "commitQueue":
- out.Values[i] = ec._Project_commitQueue(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "admins":
- out.Values[i] = ec._Project_admins(ctx, field, obj)
- case "spawnHostScriptPath":
- out.Values[i] = ec._Project_spawnHostScriptPath(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "tracksPushEvents":
- out.Values[i] = ec._Project_tracksPushEvents(ctx, field, obj)
- case "taskSync":
- out.Values[i] = ec._Project_taskSync(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "gitTagAuthorizedUsers":
- out.Values[i] = ec._Project_gitTagAuthorizedUsers(ctx, field, obj)
+
case "gitTagAuthorizedTeams":
+
out.Values[i] = ec._Project_gitTagAuthorizedTeams(ctx, field, obj)
+
+ case "gitTagAuthorizedUsers":
+
+ out.Values[i] = ec._Project_gitTagAuthorizedUsers(ctx, field, obj)
+
case "gitTagVersionsEnabled":
+
out.Values[i] = ec._Project_gitTagVersionsEnabled(ctx, field, obj)
- case "filesIgnoredFromCache":
- out.Values[i] = ec._Project_filesIgnoredFromCache(ctx, field, obj)
- case "disabledStatsCache":
- out.Values[i] = ec._Project_disabledStatsCache(ctx, field, obj)
- case "workstationConfig":
- out.Values[i] = ec._Project_workstationConfig(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "perfEnabled":
- out.Values[i] = ec._Project_perfEnabled(ctx, field, obj)
- case "buildBaronSettings":
- out.Values[i] = ec._Project_buildBaronSettings(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "taskAnnotationSettings":
- out.Values[i] = ec._Project_taskAnnotationSettings(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+
case "hidden":
+
out.Values[i] = ec._Project_hidden(ctx, field, obj)
- case "repoRefId":
- out.Values[i] = ec._Project_repoRefId(ctx, field, obj)
+
+ case "identifier":
+
+ out.Values[i] = ec._Project_identifier(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "isFavorite":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -45528,24 +66678,31 @@ func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet,
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "validDefaultLoggers":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Project_validDefaultLoggers(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
+ case "manualPrTestingEnabled":
+
+ out.Values[i] = ec._Project_manualPrTestingEnabled(ctx, field, obj)
+
+ case "notifyOnBuildFailure":
+
+ out.Values[i] = ec._Project_notifyOnBuildFailure(ctx, field, obj)
+
+ case "owner":
+
+ out.Values[i] = ec._Project_owner(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
case "patches":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -45556,7 +66713,117 @@ func (ec *executionContext) _Project(ctx context.Context, sel ast.SelectionSet,
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "patchingDisabled":
+
+ out.Values[i] = ec._Project_patchingDisabled(ctx, field, obj)
+
+ case "patchTriggerAliases":
+
+ out.Values[i] = ec._Project_patchTriggerAliases(ctx, field, obj)
+
+ case "perfEnabled":
+
+ out.Values[i] = ec._Project_perfEnabled(ctx, field, obj)
+
+ case "periodicBuilds":
+
+ out.Values[i] = ec._Project_periodicBuilds(ctx, field, obj)
+
+ case "private":
+
+ out.Values[i] = ec._Project_private(ctx, field, obj)
+
+ case "prTestingEnabled":
+
+ out.Values[i] = ec._Project_prTestingEnabled(ctx, field, obj)
+
+ case "remotePath":
+
+ out.Values[i] = ec._Project_remotePath(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "repo":
+
+ out.Values[i] = ec._Project_repo(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "repoRefId":
+
+ out.Values[i] = ec._Project_repoRefId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "repotrackerDisabled":
+
+ out.Values[i] = ec._Project_repotrackerDisabled(ctx, field, obj)
+
+ case "restricted":
+
+ out.Values[i] = ec._Project_restricted(ctx, field, obj)
+
+ case "spawnHostScriptPath":
+
+ out.Values[i] = ec._Project_spawnHostScriptPath(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "stepbackDisabled":
+
+ out.Values[i] = ec._Project_stepbackDisabled(ctx, field, obj)
+
+ case "taskAnnotationSettings":
+
+ out.Values[i] = ec._Project_taskAnnotationSettings(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "taskSync":
+
+ out.Values[i] = ec._Project_taskSync(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "tracksPushEvents":
+
+ out.Values[i] = ec._Project_tracksPushEvents(ctx, field, obj)
+
+ case "triggers":
+
+ out.Values[i] = ec._Project_triggers(ctx, field, obj)
+
+ case "versionControlEnabled":
+
+ out.Values[i] = ec._Project_versionControlEnabled(ctx, field, obj)
+
+ case "workstationConfig":
+
+ out.Values[i] = ec._Project_workstationConfig(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "externalLinks":
+
+ out.Values[i] = ec._Project_externalLinks(ctx, field, obj)
+
+ case "banner":
+
+ out.Values[i] = ec._Project_banner(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45572,7 +66839,6 @@ var projectAliasImplementors = []string{"ProjectAlias"}
func (ec *executionContext) _ProjectAlias(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectAlias) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectAliasImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -45580,42 +66846,93 @@ func (ec *executionContext) _ProjectAlias(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectAlias")
case "id":
+
out.Values[i] = ec._ProjectAlias_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "alias":
+
out.Values[i] = ec._ProjectAlias_alias(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "gitTag":
+
out.Values[i] = ec._ProjectAlias_gitTag(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "variant":
- out.Values[i] = ec._ProjectAlias_variant(ctx, field, obj)
+ case "remotePath":
+
+ out.Values[i] = ec._ProjectAlias_remotePath(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "task":
+
out.Values[i] = ec._ProjectAlias_task(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "remotePath":
- out.Values[i] = ec._ProjectAlias_remotePath(ctx, field, obj)
+ case "taskTags":
+
+ out.Values[i] = ec._ProjectAlias_taskTags(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "variant":
+
+ out.Values[i] = ec._ProjectAlias_variant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "variantTags":
+
out.Values[i] = ec._ProjectAlias_variantTags(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "taskTags":
- out.Values[i] = ec._ProjectAlias_taskTags(ctx, field, obj)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var projectBannerImplementors = []string{"ProjectBanner"}
+
+func (ec *executionContext) _ProjectBanner(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectBanner) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, projectBannerImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("ProjectBanner")
+ case "text":
+
+ out.Values[i] = ec._ProjectBanner_text(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "theme":
+
+ out.Values[i] = ec._ProjectBanner_theme(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -45634,25 +66951,30 @@ var projectBuildVariantImplementors = []string{"ProjectBuildVariant"}
func (ec *executionContext) _ProjectBuildVariant(ctx context.Context, sel ast.SelectionSet, obj *ProjectBuildVariant) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectBuildVariantImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectBuildVariant")
- case "name":
- out.Values[i] = ec._ProjectBuildVariant_name(ctx, field, obj)
+ case "displayName":
+
+ out.Values[i] = ec._ProjectBuildVariant_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "displayName":
- out.Values[i] = ec._ProjectBuildVariant_displayName(ctx, field, obj)
+ case "name":
+
+ out.Values[i] = ec._ProjectBuildVariant_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "tasks":
+
out.Values[i] = ec._ProjectBuildVariant_tasks(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -45671,27 +66993,34 @@ var projectEventLogEntryImplementors = []string{"ProjectEventLogEntry"}
func (ec *executionContext) _ProjectEventLogEntry(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectEvent) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectEventLogEntryImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectEventLogEntry")
+ case "after":
+
+ out.Values[i] = ec._ProjectEventLogEntry_after(ctx, field, obj)
+
+ case "before":
+
+ out.Values[i] = ec._ProjectEventLogEntry_before(ctx, field, obj)
+
case "timestamp":
+
out.Values[i] = ec._ProjectEventLogEntry_timestamp(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "user":
+
out.Values[i] = ec._ProjectEventLogEntry_user(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "before":
- out.Values[i] = ec._ProjectEventLogEntry_before(ctx, field, obj)
- case "after":
- out.Values[i] = ec._ProjectEventLogEntry_after(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45707,26 +67036,52 @@ var projectEventSettingsImplementors = []string{"ProjectEventSettings"}
func (ec *executionContext) _ProjectEventSettings(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectEventSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectEventSettingsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectEventSettings")
+ case "aliases":
+
+ out.Values[i] = ec._ProjectEventSettings_aliases(ctx, field, obj)
+
case "githubWebhooksEnabled":
+
out.Values[i] = ec._ProjectEventSettings_githubWebhooksEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- invalids++
+ atomic.AddUint32(&invalids, 1)
}
case "projectRef":
+
out.Values[i] = ec._ProjectEventSettings_projectRef(ctx, field, obj)
- case "vars":
- out.Values[i] = ec._ProjectEventSettings_vars(ctx, field, obj)
- case "aliases":
- out.Values[i] = ec._ProjectEventSettings_aliases(ctx, field, obj)
+
+ case "projectSubscriptions":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._ProjectEventSettings_projectSubscriptions(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
case "subscriptions":
+
out.Values[i] = ec._ProjectEventSettings_subscriptions(ctx, field, obj)
+
+ case "vars":
+
+ out.Values[i] = ec._ProjectEventSettings_vars(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45742,20 +67097,23 @@ var projectEventsImplementors = []string{"ProjectEvents"}
func (ec *executionContext) _ProjectEvents(ctx context.Context, sel ast.SelectionSet, obj *ProjectEvents) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectEventsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectEvents")
- case "eventLogEntries":
- out.Values[i] = ec._ProjectEvents_eventLogEntries(ctx, field, obj)
+ case "count":
+
+ out.Values[i] = ec._ProjectEvents_count(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "count":
- out.Values[i] = ec._ProjectEvents_count(ctx, field, obj)
+ case "eventLogEntries":
+
+ out.Values[i] = ec._ProjectEvents_eventLogEntries(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -45774,54 +67132,74 @@ var projectSettingsImplementors = []string{"ProjectSettings"}
func (ec *executionContext) _ProjectSettings(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectSettingsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectSettings")
- case "githubWebhooksEnabled":
+ case "aliases":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._ProjectSettings_githubWebhooksEnabled(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._ProjectSettings_aliases(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "projectRef":
- out.Values[i] = ec._ProjectSettings_projectRef(ctx, field, obj)
- case "vars":
+ case "githubWebhooksEnabled":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._ProjectSettings_vars(ctx, field, obj)
+ res = ec._ProjectSettings_githubWebhooksEnabled(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "aliases":
+ case "projectRef":
+
+ out.Values[i] = ec._ProjectSettings_projectRef(ctx, field, obj)
+
+ case "projectSubscriptions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._ProjectSettings_aliases(ctx, field, obj)
+ res = ec._ProjectSettings_projectSubscriptions(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "subscriptions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -45829,47 +67207,28 @@ func (ec *executionContext) _ProjectSettings(ctx context.Context, sel ast.Select
}()
res = ec._ProjectSettings_subscriptions(ctx, field, obj)
return res
- })
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var projectSubscriberImplementors = []string{"ProjectSubscriber"}
+ }
-func (ec *executionContext) _ProjectSubscriber(ctx context.Context, sel ast.SelectionSet, obj *model.APISubscriber) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, projectSubscriberImplementors)
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("ProjectSubscriber")
- case "type":
- out.Values[i] = ec._ProjectSubscriber_type(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "subscriber":
+ })
+ case "vars":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._ProjectSubscriber_subscriber(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._ProjectSettings_vars(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -45886,7 +67245,6 @@ var projectSubscriptionImplementors = []string{"ProjectSubscription"}
func (ec *executionContext) _ProjectSubscription(ctx context.Context, sel ast.SelectionSet, obj *model.APISubscription) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectSubscriptionImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -45894,39 +67252,55 @@ func (ec *executionContext) _ProjectSubscription(ctx context.Context, sel ast.Se
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectSubscription")
case "id":
+
out.Values[i] = ec._ProjectSubscription_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "resourceType":
- out.Values[i] = ec._ProjectSubscription_resourceType(ctx, field, obj)
+ case "ownerType":
+
+ out.Values[i] = ec._ProjectSubscription_ownerType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "trigger":
- out.Values[i] = ec._ProjectSubscription_trigger(ctx, field, obj)
+ case "regexSelectors":
+
+ out.Values[i] = ec._ProjectSubscription_regexSelectors(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "selectors":
- out.Values[i] = ec._ProjectSubscription_selectors(ctx, field, obj)
+ case "resourceType":
+
+ out.Values[i] = ec._ProjectSubscription_resourceType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "regexSelectors":
- out.Values[i] = ec._ProjectSubscription_regexSelectors(ctx, field, obj)
+ case "selectors":
+
+ out.Values[i] = ec._ProjectSubscription_selectors(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "subscriber":
+
out.Values[i] = ec._ProjectSubscription_subscriber(ctx, field, obj)
- case "ownerType":
- out.Values[i] = ec._ProjectSubscription_ownerType(ctx, field, obj)
+
+ case "trigger":
+
+ out.Values[i] = ec._ProjectSubscription_trigger(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "triggerData":
+
out.Values[i] = ec._ProjectSubscription_triggerData(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45942,37 +67316,56 @@ var projectVarsImplementors = []string{"ProjectVars"}
func (ec *executionContext) _ProjectVars(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectVars) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, projectVarsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ProjectVars")
- case "vars":
- out.Values[i] = ec._ProjectVars_vars(ctx, field, obj)
- case "privateVars":
+ case "adminOnlyVars":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._ProjectVars_privateVars(ctx, field, obj)
+ res = ec._ProjectVars_adminOnlyVars(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "adminOnlyVars":
+ case "privateVars":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._ProjectVars_adminOnlyVars(ctx, field, obj)
+ res = ec._ProjectVars_privateVars(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "vars":
+
+ out.Values[i] = ec._ProjectVars_vars(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -45988,20 +67381,23 @@ var publicKeyImplementors = []string{"PublicKey"}
func (ec *executionContext) _PublicKey(ctx context.Context, sel ast.SelectionSet, obj *model.APIPubKey) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, publicKeyImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("PublicKey")
- case "name":
- out.Values[i] = ec._PublicKey_name(ctx, field, obj)
+ case "key":
+
+ out.Values[i] = ec._PublicKey_key(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "key":
- out.Values[i] = ec._PublicKey_key(ctx, field, obj)
+ case "name":
+
+ out.Values[i] = ec._PublicKey_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -46020,7 +67416,6 @@ var queryImplementors = []string{"Query"}
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
-
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
@@ -46028,324 +67423,535 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
+ innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
+ Object: field.Name,
+ Field: field,
+ })
+
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Query")
- case "task":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Query_task(ctx, field)
- return res
- })
- case "taskAllExecutions":
+ case "bbGetCreatedTickets":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskAllExecutions(ctx, field)
+ res = ec._Query_bbGetCreatedTickets(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "patch":
+ case "buildBaron":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_patch(ctx, field)
+ res = ec._Query_buildBaron(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "version":
+ case "awsRegions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_version(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_awsRegions(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "projects":
+ case "clientConfig":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_projects(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_clientConfig(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "viewableProjectRefs":
+ case "instanceTypes":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_viewableProjectRefs(ctx, field)
+ res = ec._Query_instanceTypes(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "githubProjectConflicts":
+ case "spruceConfig":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_githubProjectConflicts(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_spruceConfig(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "project":
+ case "subnetAvailabilityZones":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_project(ctx, field)
+ res = ec._Query_subnetAvailabilityZones(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "patchTasks":
+ case "distros":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_patchTasks(ctx, field)
+ res = ec._Query_distros(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "taskTests":
+ case "distroTaskQueue":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskTests(ctx, field)
+ res = ec._Query_distroTaskQueue(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "taskTestSample":
+ case "host":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskTestSample(ctx, field)
+ res = ec._Query_host(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "taskFiles":
+ case "hostEvents":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskFiles(ctx, field)
+ res = ec._Query_hostEvents(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "user":
+ case "hosts":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_user(ctx, field)
+ res = ec._Query_hosts(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "taskLogs":
+ case "taskQueueDistros":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskLogs(ctx, field)
+ res = ec._Query_taskQueueDistros(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "commitQueue":
+ case "pod":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_commitQueue(ctx, field)
+ res = ec._Query_pod(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "userSettings":
+ case "patch":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_userSettings(ctx, field)
+ res = ec._Query_patch(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "spruceConfig":
+ case "githubProjectConflicts":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_spruceConfig(ctx, field)
+ res = ec._Query_githubProjectConflicts(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "awsRegions":
+ case "project":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_awsRegions(ctx, field)
+ res = ec._Query_project(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "subnetAvailabilityZones":
+ case "projects":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_subnetAvailabilityZones(ctx, field)
+ res = ec._Query_projects(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "userConfig":
+ case "projectEvents":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_userConfig(ctx, field)
+ res = ec._Query_projectEvents(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "clientConfig":
+ case "projectSettings":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_clientConfig(ctx, field)
+ res = ec._Query_projectSettings(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "host":
+ case "repoEvents":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_host(ctx, field)
+ res = ec._Query_repoEvents(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "hostEvents":
+ case "repoSettings":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_hostEvents(ctx, field)
+ res = ec._Query_repoSettings(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "hosts":
+ case "viewableProjectRefs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_hosts(ctx, field)
+ res = ec._Query_viewableProjectRefs(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
case "myHosts":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -46356,10 +67962,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
case "myVolumes":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -46370,212 +67985,351 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "myPublicKeys":
+ case "logkeeperBuildMetadata":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_myPublicKeys(ctx, field)
+ res = ec._Query_logkeeperBuildMetadata(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "distros":
+ case "task":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_distros(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_task(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "instanceTypes":
+ case "taskAllExecutions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_instanceTypes(ctx, field)
+ res = ec._Query_taskAllExecutions(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "distroTaskQueue":
+ case "taskTests":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_distroTaskQueue(ctx, field)
+ res = ec._Query_taskTests(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "taskQueueDistros":
+ case "taskTestSample":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskQueueDistros(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_taskTestSample(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "buildBaron":
+ case "myPublicKeys":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_buildBaron(ctx, field)
+ res = ec._Query_myPublicKeys(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "bbGetCreatedTickets":
+ case "user":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_bbGetCreatedTickets(ctx, field)
+ res = ec._Query_user(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "mainlineCommits":
+ case "userConfig":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_mainlineCommits(ctx, field)
+ res = ec._Query_userConfig(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "taskNamesForBuildVariant":
+ case "userSettings":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_taskNamesForBuildVariant(ctx, field)
+ res = ec._Query_userSettings(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "buildVariantsForTaskName":
+ case "commitQueue":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_buildVariantsForTaskName(ctx, field)
+ res = ec._Query_commitQueue(ctx, field)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "projectSettings":
+ case "buildVariantsForTaskName":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_projectSettings(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_buildVariantsForTaskName(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "repoSettings":
+ case "mainlineCommits":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_repoSettings(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_mainlineCommits(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "projectEvents":
+ case "taskNamesForBuildVariant":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_projectEvents(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ res = ec._Query_taskNamesForBuildVariant(ctx, field)
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "repoEvents":
+ case "hasVersion":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_repoEvents(ctx, field)
+ res = ec._Query_hasVersion(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
- case "hasVersion":
+ case "version":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_hasVersion(ctx, field)
+ res = ec._Query_version(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ rrm := func(ctx context.Context) graphql.Marshaler {
+ return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return rrm(innerCtx)
})
case "__type":
- out.Values[i] = ec._Query___type(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Query___type(ctx, field)
+ })
+
case "__schema":
- out.Values[i] = ec._Query___schema(ctx, field)
+
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Query___schema(ctx, field)
+ })
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -46591,7 +68345,6 @@ var repoCommitQueueParamsImplementors = []string{"RepoCommitQueueParams"}
func (ec *executionContext) _RepoCommitQueueParams(ctx context.Context, sel ast.SelectionSet, obj *model.APICommitQueueParams) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, repoCommitQueueParamsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -46599,22 +68352,23 @@ func (ec *executionContext) _RepoCommitQueueParams(ctx context.Context, sel ast.
case "__typename":
out.Values[i] = graphql.MarshalString("RepoCommitQueueParams")
case "enabled":
+
out.Values[i] = ec._RepoCommitQueueParams_enabled(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "requireSigned":
- out.Values[i] = ec._RepoCommitQueueParams_requireSigned(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "mergeMethod":
+
out.Values[i] = ec._RepoCommitQueueParams_mergeMethod(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "message":
+
out.Values[i] = ec._RepoCommitQueueParams_message(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -46633,7 +68387,6 @@ var repoRefImplementors = []string{"RepoRef"}
func (ec *executionContext) _RepoRef(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectRef) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, repoRefImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -46641,196 +68394,257 @@ func (ec *executionContext) _RepoRef(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("RepoRef")
case "id":
+
out.Values[i] = ec._RepoRef_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "displayName":
- out.Values[i] = ec._RepoRef_displayName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "enabled":
- out.Values[i] = ec._RepoRef_enabled(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "private":
- out.Values[i] = ec._RepoRef_private(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "restricted":
- out.Values[i] = ec._RepoRef_restricted(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "owner":
- out.Values[i] = ec._RepoRef_owner(ctx, field, obj)
+ case "admins":
+
+ out.Values[i] = ec._RepoRef_admins(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "repo":
- out.Values[i] = ec._RepoRef_repo(ctx, field, obj)
+ case "batchTime":
+
+ out.Values[i] = ec._RepoRef_batchTime(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
case "branch":
+
out.Values[i] = ec._RepoRef_branch(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "remotePath":
- out.Values[i] = ec._RepoRef_remotePath(ctx, field, obj)
+ case "buildBaronSettings":
+
+ out.Values[i] = ec._RepoRef_buildBaronSettings(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "patchingDisabled":
- out.Values[i] = ec._RepoRef_patchingDisabled(ctx, field, obj)
+ case "commitQueue":
+
+ out.Values[i] = ec._RepoRef_commitQueue(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "repotrackerDisabled":
- out.Values[i] = ec._RepoRef_repotrackerDisabled(ctx, field, obj)
+ case "containerSizeDefinitions":
+
+ out.Values[i] = ec._RepoRef_containerSizeDefinitions(ctx, field, obj)
+
+ case "deactivatePrevious":
+
+ out.Values[i] = ec._RepoRef_deactivatePrevious(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "dispatchingDisabled":
- out.Values[i] = ec._RepoRef_dispatchingDisabled(ctx, field, obj)
+ case "disabledStatsCache":
+
+ out.Values[i] = ec._RepoRef_disabledStatsCache(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "versionControlEnabled":
- out.Values[i] = ec._RepoRef_versionControlEnabled(ctx, field, obj)
+ case "dispatchingDisabled":
+
+ out.Values[i] = ec._RepoRef_dispatchingDisabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "prTestingEnabled":
- out.Values[i] = ec._RepoRef_prTestingEnabled(ctx, field, obj)
+ case "displayName":
+
+ out.Values[i] = ec._RepoRef_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "manualPrTestingEnabled":
- out.Values[i] = ec._RepoRef_manualPrTestingEnabled(ctx, field, obj)
+ case "enabled":
+
+ out.Values[i] = ec._RepoRef_enabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
case "githubChecksEnabled":
+
out.Values[i] = ec._RepoRef_githubChecksEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "batchTime":
- out.Values[i] = ec._RepoRef_batchTime(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "deactivatePrevious":
- out.Values[i] = ec._RepoRef_deactivatePrevious(ctx, field, obj)
+ case "githubTriggerAliases":
+
+ out.Values[i] = ec._RepoRef_githubTriggerAliases(ctx, field, obj)
+
+ case "gitTagAuthorizedTeams":
+
+ out.Values[i] = ec._RepoRef_gitTagAuthorizedTeams(ctx, field, obj)
+
+ case "gitTagAuthorizedUsers":
+
+ out.Values[i] = ec._RepoRef_gitTagAuthorizedUsers(ctx, field, obj)
+
+ case "gitTagVersionsEnabled":
+
+ out.Values[i] = ec._RepoRef_gitTagVersionsEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "defaultLogger":
- out.Values[i] = ec._RepoRef_defaultLogger(ctx, field, obj)
+ case "manualPrTestingEnabled":
+
+ out.Values[i] = ec._RepoRef_manualPrTestingEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
case "notifyOnBuildFailure":
+
out.Values[i] = ec._RepoRef_notifyOnBuildFailure(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "triggers":
- out.Values[i] = ec._RepoRef_triggers(ctx, field, obj)
+ case "owner":
+
+ out.Values[i] = ec._RepoRef_owner(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
+ }
+ case "patchingDisabled":
+
+ out.Values[i] = ec._RepoRef_patchingDisabled(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
}
case "patchTriggerAliases":
+
out.Values[i] = ec._RepoRef_patchTriggerAliases(ctx, field, obj)
- case "githubTriggerAliases":
- out.Values[i] = ec._RepoRef_githubTriggerAliases(ctx, field, obj)
+
+ case "perfEnabled":
+
+ out.Values[i] = ec._RepoRef_perfEnabled(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "periodicBuilds":
+
out.Values[i] = ec._RepoRef_periodicBuilds(ctx, field, obj)
- case "cedarTestResultsEnabled":
- out.Values[i] = ec._RepoRef_cedarTestResultsEnabled(ctx, field, obj)
+
+ case "private":
+
+ out.Values[i] = ec._RepoRef_private(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "commitQueue":
- out.Values[i] = ec._RepoRef_commitQueue(ctx, field, obj)
+ case "prTestingEnabled":
+
+ out.Values[i] = ec._RepoRef_prTestingEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "admins":
- out.Values[i] = ec._RepoRef_admins(ctx, field, obj)
+ case "remotePath":
+
+ out.Values[i] = ec._RepoRef_remotePath(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "spawnHostScriptPath":
- out.Values[i] = ec._RepoRef_spawnHostScriptPath(ctx, field, obj)
+ case "repo":
+
+ out.Values[i] = ec._RepoRef_repo(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "tracksPushEvents":
- out.Values[i] = ec._RepoRef_tracksPushEvents(ctx, field, obj)
+ case "repotrackerDisabled":
+
+ out.Values[i] = ec._RepoRef_repotrackerDisabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "taskSync":
- out.Values[i] = ec._RepoRef_taskSync(ctx, field, obj)
+ case "restricted":
+
+ out.Values[i] = ec._RepoRef_restricted(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "gitTagAuthorizedUsers":
- out.Values[i] = ec._RepoRef_gitTagAuthorizedUsers(ctx, field, obj)
- case "gitTagAuthorizedTeams":
- out.Values[i] = ec._RepoRef_gitTagAuthorizedTeams(ctx, field, obj)
- case "gitTagVersionsEnabled":
- out.Values[i] = ec._RepoRef_gitTagVersionsEnabled(ctx, field, obj)
+ case "spawnHostScriptPath":
+
+ out.Values[i] = ec._RepoRef_spawnHostScriptPath(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "filesIgnoredFromCache":
- out.Values[i] = ec._RepoRef_filesIgnoredFromCache(ctx, field, obj)
- case "disabledStatsCache":
- out.Values[i] = ec._RepoRef_disabledStatsCache(ctx, field, obj)
+ case "stepbackDisabled":
+
+ out.Values[i] = ec._RepoRef_stepbackDisabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "workstationConfig":
- out.Values[i] = ec._RepoRef_workstationConfig(ctx, field, obj)
+ case "taskAnnotationSettings":
+
+ out.Values[i] = ec._RepoRef_taskAnnotationSettings(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "perfEnabled":
- out.Values[i] = ec._RepoRef_perfEnabled(ctx, field, obj)
+ case "taskSync":
+
+ out.Values[i] = ec._RepoRef_taskSync(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "buildBaronSettings":
- out.Values[i] = ec._RepoRef_buildBaronSettings(ctx, field, obj)
+ case "tracksPushEvents":
+
+ out.Values[i] = ec._RepoRef_tracksPushEvents(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "taskAnnotationSettings":
- out.Values[i] = ec._RepoRef_taskAnnotationSettings(ctx, field, obj)
+ case "triggers":
+
+ out.Values[i] = ec._RepoRef_triggers(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ invalids++
}
- case "validDefaultLoggers":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._RepoRef_validDefaultLoggers(ctx, field, obj)
- if res == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- return res
- })
+ case "versionControlEnabled":
+
+ out.Values[i] = ec._RepoRef_versionControlEnabled(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "workstationConfig":
+
+ out.Values[i] = ec._RepoRef_workstationConfig(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "externalLinks":
+
+ out.Values[i] = ec._RepoRef_externalLinks(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -46846,16 +68660,33 @@ var repoSettingsImplementors = []string{"RepoSettings"}
func (ec *executionContext) _RepoSettings(ctx context.Context, sel ast.SelectionSet, obj *model.APIProjectSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, repoSettingsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("RepoSettings")
+ case "aliases":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._RepoSettings_aliases(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
case "githubWebhooksEnabled":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -46866,41 +68697,66 @@ func (ec *executionContext) _RepoSettings(ctx context.Context, sel ast.Selection
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "projectRef":
+
out.Values[i] = ec._RepoSettings_projectRef(ctx, field, obj)
- case "vars":
+
+ case "projectSubscriptions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._RepoSettings_vars(ctx, field, obj)
+ res = ec._RepoSettings_projectSubscriptions(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "aliases":
+ case "subscriptions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._RepoSettings_aliases(ctx, field, obj)
+ res = ec._RepoSettings_subscriptions(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "subscriptions":
+ case "vars":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._RepoSettings_subscriptions(ctx, field, obj)
+ res = ec._RepoSettings_vars(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -46917,7 +68773,6 @@ var repoTaskSyncOptionsImplementors = []string{"RepoTaskSyncOptions"}
func (ec *executionContext) _RepoTaskSyncOptions(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskSyncOptions) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, repoTaskSyncOptionsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -46925,12 +68780,16 @@ func (ec *executionContext) _RepoTaskSyncOptions(ctx context.Context, sel ast.Se
case "__typename":
out.Values[i] = graphql.MarshalString("RepoTaskSyncOptions")
case "configEnabled":
+
out.Values[i] = ec._RepoTaskSyncOptions_configEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "patchEnabled":
+
out.Values[i] = ec._RepoTaskSyncOptions_patchEnabled(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -46949,20 +68808,23 @@ var repoWorkstationConfigImplementors = []string{"RepoWorkstationConfig"}
func (ec *executionContext) _RepoWorkstationConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIWorkstationConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, repoWorkstationConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("RepoWorkstationConfig")
- case "setupCommands":
- out.Values[i] = ec._RepoWorkstationConfig_setupCommands(ctx, field, obj)
case "gitClone":
+
out.Values[i] = ec._RepoWorkstationConfig_gitClone(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "setupCommands":
+
+ out.Values[i] = ec._RepoWorkstationConfig_setupCommands(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -46978,30 +68840,37 @@ var searchReturnInfoImplementors = []string{"SearchReturnInfo"}
func (ec *executionContext) _SearchReturnInfo(ctx context.Context, sel ast.SelectionSet, obj *thirdparty.SearchReturnInfo) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, searchReturnInfoImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("SearchReturnInfo")
+ case "featuresURL":
+
+ out.Values[i] = ec._SearchReturnInfo_featuresURL(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "issues":
+
out.Values[i] = ec._SearchReturnInfo_issues(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "search":
+
out.Values[i] = ec._SearchReturnInfo_search(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "source":
+
out.Values[i] = ec._SearchReturnInfo_source(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "featuresURL":
- out.Values[i] = ec._SearchReturnInfo_featuresURL(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47020,20 +68889,23 @@ var selectorImplementors = []string{"Selector"}
func (ec *executionContext) _Selector(ctx context.Context, sel ast.SelectionSet, obj *model.APISelector) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, selectorImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Selector")
- case "type":
- out.Values[i] = ec._Selector_type(ctx, field, obj)
+ case "data":
+
+ out.Values[i] = ec._Selector_data(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "data":
- out.Values[i] = ec._Selector_data(ctx, field, obj)
+ case "type":
+
+ out.Values[i] = ec._Selector_type(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47048,11 +68920,35 @@ func (ec *executionContext) _Selector(ctx context.Context, sel ast.SelectionSet,
return out
}
+var slackConfigImplementors = []string{"SlackConfig"}
+
+func (ec *executionContext) _SlackConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APISlackConfig) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, slackConfigImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SlackConfig")
+ case "name":
+
+ out.Values[i] = ec._SlackConfig_name(ctx, field, obj)
+
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
var sourceImplementors = []string{"Source"}
func (ec *executionContext) _Source(ctx context.Context, sel ast.SelectionSet, obj *model.APISource) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, sourceImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -47060,17 +68956,23 @@ func (ec *executionContext) _Source(ctx context.Context, sel ast.SelectionSet, o
case "__typename":
out.Values[i] = graphql.MarshalString("Source")
case "author":
+
out.Values[i] = ec._Source_author(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "time":
- out.Values[i] = ec._Source_time(ctx, field, obj)
+ case "requester":
+
+ out.Values[i] = ec._Source_requester(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "requester":
- out.Values[i] = ec._Source_requester(ctx, field, obj)
+ case "time":
+
+ out.Values[i] = ec._Source_time(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47089,25 +68991,30 @@ var spawnHostConfigImplementors = []string{"SpawnHostConfig"}
func (ec *executionContext) _SpawnHostConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APISpawnHostConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, spawnHostConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("SpawnHostConfig")
+ case "spawnHostsPerUser":
+
+ out.Values[i] = ec._SpawnHostConfig_spawnHostsPerUser(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "unexpirableHostsPerUser":
+
out.Values[i] = ec._SpawnHostConfig_unexpirableHostsPerUser(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "unexpirableVolumesPerUser":
+
out.Values[i] = ec._SpawnHostConfig_unexpirableVolumesPerUser(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "spawnHostsPerUser":
- out.Values[i] = ec._SpawnHostConfig_spawnHostsPerUser(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47126,33 +69033,50 @@ var spruceConfigImplementors = []string{"SpruceConfig"}
func (ec *executionContext) _SpruceConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIAdminSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, spruceConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("SpruceConfig")
- case "ui":
- out.Values[i] = ec._SpruceConfig_ui(ctx, field, obj)
- case "jira":
- out.Values[i] = ec._SpruceConfig_jira(ctx, field, obj)
case "banner":
+
out.Values[i] = ec._SpruceConfig_banner(ctx, field, obj)
+
case "bannerTheme":
+
out.Values[i] = ec._SpruceConfig_bannerTheme(ctx, field, obj)
+
case "githubOrgs":
+
out.Values[i] = ec._SpruceConfig_githubOrgs(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "jira":
+
+ out.Values[i] = ec._SpruceConfig_jira(ctx, field, obj)
+
case "providers":
+
out.Values[i] = ec._SpruceConfig_providers(ctx, field, obj)
+
case "spawnHost":
+
out.Values[i] = ec._SpruceConfig_spawnHost(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "ui":
+
+ out.Values[i] = ec._SpruceConfig_ui(ctx, field, obj)
+
+ case "slack":
+
+ out.Values[i] = ec._SpruceConfig_slack(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47168,20 +69092,23 @@ var statusCountImplementors = []string{"StatusCount"}
func (ec *executionContext) _StatusCount(ctx context.Context, sel ast.SelectionSet, obj *task.StatusCount) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, statusCountImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("StatusCount")
- case "status":
- out.Values[i] = ec._StatusCount_status(ctx, field, obj)
+ case "count":
+
+ out.Values[i] = ec._StatusCount_count(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "count":
- out.Values[i] = ec._StatusCount_count(ctx, field, obj)
+ case "status":
+
+ out.Values[i] = ec._StatusCount_status(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47200,27 +69127,88 @@ var subscriberImplementors = []string{"Subscriber"}
func (ec *executionContext) _Subscriber(ctx context.Context, sel ast.SelectionSet, obj *Subscriber) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, subscriberImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Subscriber")
- case "githubPRSubscriber":
- out.Values[i] = ec._Subscriber_githubPRSubscriber(ctx, field, obj)
+ case "emailSubscriber":
+
+ out.Values[i] = ec._Subscriber_emailSubscriber(ctx, field, obj)
+
case "githubCheckSubscriber":
+
out.Values[i] = ec._Subscriber_githubCheckSubscriber(ctx, field, obj)
- case "webhookSubscriber":
- out.Values[i] = ec._Subscriber_webhookSubscriber(ctx, field, obj)
- case "jiraIssueSubscriber":
- out.Values[i] = ec._Subscriber_jiraIssueSubscriber(ctx, field, obj)
+
+ case "githubPRSubscriber":
+
+ out.Values[i] = ec._Subscriber_githubPRSubscriber(ctx, field, obj)
+
case "jiraCommentSubscriber":
+
out.Values[i] = ec._Subscriber_jiraCommentSubscriber(ctx, field, obj)
- case "emailSubscriber":
- out.Values[i] = ec._Subscriber_emailSubscriber(ctx, field, obj)
+
+ case "jiraIssueSubscriber":
+
+ out.Values[i] = ec._Subscriber_jiraIssueSubscriber(ctx, field, obj)
+
case "slackSubscriber":
+
out.Values[i] = ec._Subscriber_slackSubscriber(ctx, field, obj)
+
+ case "webhookSubscriber":
+
+ out.Values[i] = ec._Subscriber_webhookSubscriber(ctx, field, obj)
+
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var subscriberWrapperImplementors = []string{"SubscriberWrapper"}
+
+func (ec *executionContext) _SubscriberWrapper(ctx context.Context, sel ast.SelectionSet, obj *model.APISubscriber) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, subscriberWrapperImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SubscriberWrapper")
+ case "subscriber":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._SubscriberWrapper_subscriber(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "type":
+
+ out.Values[i] = ec._SubscriberWrapper_type(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47236,21 +69224,30 @@ var taskImplementors = []string{"Task"}
func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj *model.APITask) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Task")
+ case "id":
+
+ out.Values[i] = ec._Task_id(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
case "aborted":
+
out.Values[i] = ec._Task_aborted(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "abortInfo":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47258,19 +69255,31 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_abortInfo(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "activated":
+
out.Values[i] = ec._Task_activated(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "activatedBy":
+
out.Values[i] = ec._Task_activatedBy(ctx, field, obj)
+
case "activatedTime":
+
out.Values[i] = ec._Task_activatedTime(ctx, field, obj)
+
case "ami":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47278,10 +69287,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_ami(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "annotation":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47289,47 +69304,71 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_annotation(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "baseTask":
+ case "baseStatus":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Task_baseTask(ctx, field, obj)
+ res = ec._Task_baseStatus(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "baseStatus":
+ case "baseTask":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Task_baseStatus(ctx, field, obj)
+ res = ec._Task_baseTask(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "blocked":
+
out.Values[i] = ec._Task_blocked(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "buildId":
+
out.Values[i] = ec._Task_buildId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "buildVariant":
+
out.Values[i] = ec._Task_buildVariant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "buildVariantDisplayName":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47337,10 +69376,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_buildVariantDisplayName(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "canAbort":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47351,10 +69396,36 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "canDisable":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Task_canDisable(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "canModifyAnnotation":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47365,10 +69436,36 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "canOverrideDependencies":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Task_canOverrideDependencies(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "canRestart":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47379,10 +69476,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "canSchedule":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47393,10 +69496,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "canSetPriority":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47407,15 +69516,23 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "canSync":
+
out.Values[i] = ec._Task_canSync(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "canUnschedule":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47426,23 +69543,60 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "containerAllocatedTime":
+
+ out.Values[i] = ec._Task_containerAllocatedTime(ctx, field, obj)
+
case "createTime":
+
out.Values[i] = ec._Task_createTime(ctx, field, obj)
+
+ case "dependsOn":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Task_dependsOn(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
case "details":
+
out.Values[i] = ec._Task_details(ctx, field, obj)
+
case "dispatchTime":
+
out.Values[i] = ec._Task_dispatchTime(ctx, field, obj)
+
case "displayName":
+
out.Values[i] = ec._Task_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "displayOnly":
+
out.Values[i] = ec._Task_displayOnly(ctx, field, obj)
+
case "displayTask":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47450,15 +69604,23 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_displayTask(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "distroId":
+
out.Values[i] = ec._Task_distroId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "estimatedStart":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47466,17 +69628,27 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_estimatedStart(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "execution":
+
out.Values[i] = ec._Task_execution(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "executionTasks":
+
out.Values[i] = ec._Task_executionTasks(ctx, field, obj)
+
case "executionTasksFull":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47484,12 +69656,20 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_executionTasksFull(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "expectedDuration":
+
out.Values[i] = ec._Task_expectedDuration(ctx, field, obj)
+
case "failedTestCount":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47500,14 +69680,24 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "finishTime":
+
out.Values[i] = ec._Task_finishTime(ctx, field, obj)
+
case "generatedBy":
+
out.Values[i] = ec._Task_generatedBy(ctx, field, obj)
+
case "generatedByName":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47515,21 +69705,28 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_generatedByName(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "generateTask":
+
out.Values[i] = ec._Task_generateTask(ctx, field, obj)
+
case "hostId":
+
out.Values[i] = ec._Task_hostId(ctx, field, obj)
- case "id":
- out.Values[i] = ec._Task_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+
case "ingestTime":
+
out.Values[i] = ec._Task_ingestTime(ctx, field, obj)
+
case "isPerfPluginEnabled":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47540,10 +69737,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "latestExecution":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47554,15 +69757,23 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "logs":
+
out.Values[i] = ec._Task_logs(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "minQueuePosition":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47573,10 +69784,23 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "order":
+
+ out.Values[i] = ec._Task_order(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
case "patch":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47584,10 +69808,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_patch(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "patchNumber":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47595,12 +69825,37 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_patchNumber(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "pod":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Task_pod(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "priority":
+
out.Values[i] = ec._Task_priority(ctx, field, obj)
+
case "project":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47608,15 +69863,23 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_project(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "projectId":
+
out.Values[i] = ec._Task_projectId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "projectIdentifier":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47624,79 +69887,151 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
}()
res = ec._Task_projectIdentifier(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "dependsOn":
+ case "requester":
+
+ out.Values[i] = ec._Task_requester(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "resetWhenFinished":
+
+ out.Values[i] = ec._Task_resetWhenFinished(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "revision":
+
+ out.Values[i] = ec._Task_revision(ctx, field, obj)
+
+ case "scheduledTime":
+
+ out.Values[i] = ec._Task_scheduledTime(ctx, field, obj)
+
+ case "spawnHostLink":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Task_spawnHostLink(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "startTime":
+
+ out.Values[i] = ec._Task_startTime(ctx, field, obj)
+
+ case "status":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Task_dependsOn(ctx, field, obj)
+ res = ec._Task_status(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "canOverrideDependencies":
+ case "taskFiles":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Task_canOverrideDependencies(ctx, field, obj)
+ res = ec._Task_taskFiles(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
- })
- case "requester":
- out.Values[i] = ec._Task_requester(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- case "revision":
- out.Values[i] = ec._Task_revision(ctx, field, obj)
- case "scheduledTime":
- out.Values[i] = ec._Task_scheduledTime(ctx, field, obj)
- case "containerAllocatedTime":
- out.Values[i] = ec._Task_containerAllocatedTime(ctx, field, obj)
- case "spawnHostLink":
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "taskGroup":
+
+ out.Values[i] = ec._Task_taskGroup(ctx, field, obj)
+
+ case "taskGroupMaxHosts":
+
+ out.Values[i] = ec._Task_taskGroupMaxHosts(ctx, field, obj)
+
+ case "taskLogs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Task_spawnHostLink(ctx, field, obj)
+ res = ec._Task_taskLogs(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "startTime":
- out.Values[i] = ec._Task_startTime(ctx, field, obj)
- case "status":
+ case "tests":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Task_status(ctx, field, obj)
+ res = ec._Task_tests(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "taskGroup":
- out.Values[i] = ec._Task_taskGroup(ctx, field, obj)
- case "taskGroupMaxHosts":
- out.Values[i] = ec._Task_taskGroupMaxHosts(ctx, field, obj)
case "timeTaken":
+
out.Values[i] = ec._Task_timeTaken(ctx, field, obj)
+
case "totalTestCount":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47707,10 +70042,16 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "versionMetadata":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -47721,12 +70062,12 @@ func (ec *executionContext) _Task(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
- })
- case "order":
- out.Values[i] = ec._Task_order(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47742,20 +70083,112 @@ var taskAnnotationSettingsImplementors = []string{"TaskAnnotationSettings"}
func (ec *executionContext) _TaskAnnotationSettings(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskAnnotationSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskAnnotationSettingsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TaskAnnotationSettings")
- case "jiraCustomFields":
- out.Values[i] = ec._TaskAnnotationSettings_jiraCustomFields(ctx, field, obj)
case "fileTicketWebhook":
+
out.Values[i] = ec._TaskAnnotationSettings_fileTicketWebhook(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "jiraCustomFields":
+
+ out.Values[i] = ec._TaskAnnotationSettings_jiraCustomFields(ctx, field, obj)
+
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var taskContainerCreationOptsImplementors = []string{"TaskContainerCreationOpts"}
+
+func (ec *executionContext) _TaskContainerCreationOpts(ctx context.Context, sel ast.SelectionSet, obj *model.APIPodTaskContainerCreationOptions) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, taskContainerCreationOptsImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("TaskContainerCreationOpts")
+ case "image":
+
+ out.Values[i] = ec._TaskContainerCreationOpts_image(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "memoryMB":
+
+ out.Values[i] = ec._TaskContainerCreationOpts_memoryMB(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "cpu":
+
+ out.Values[i] = ec._TaskContainerCreationOpts_cpu(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "os":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._TaskContainerCreationOpts_os(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "arch":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._TaskContainerCreationOpts_arch(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "workingDir":
+
+ out.Values[i] = ec._TaskContainerCreationOpts_workingDir(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47771,31 +70204,42 @@ var taskEndDetailImplementors = []string{"TaskEndDetail"}
func (ec *executionContext) _TaskEndDetail(ctx context.Context, sel ast.SelectionSet, obj *model.ApiTaskEndDetail) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskEndDetailImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TaskEndDetail")
- case "status":
- out.Values[i] = ec._TaskEndDetail_status(ctx, field, obj)
+ case "description":
+
+ out.Values[i] = ec._TaskEndDetail_description(ctx, field, obj)
+
+ case "oomTracker":
+
+ out.Values[i] = ec._TaskEndDetail_oomTracker(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "type":
- out.Values[i] = ec._TaskEndDetail_type(ctx, field, obj)
+ case "status":
+
+ out.Values[i] = ec._TaskEndDetail_status(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "description":
- out.Values[i] = ec._TaskEndDetail_description(ctx, field, obj)
case "timedOut":
+
out.Values[i] = ec._TaskEndDetail_timedOut(ctx, field, obj)
+
case "timeoutType":
+
out.Values[i] = ec._TaskEndDetail_timeoutType(ctx, field, obj)
- case "oomTracker":
- out.Values[i] = ec._TaskEndDetail_oomTracker(ctx, field, obj)
+
+ case "type":
+
+ out.Values[i] = ec._TaskEndDetail_type(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47814,7 +70258,6 @@ var taskEventLogDataImplementors = []string{"TaskEventLogData"}
func (ec *executionContext) _TaskEventLogData(ctx context.Context, sel ast.SelectionSet, obj *model.TaskEventData) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskEventLogDataImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -47822,19 +70265,37 @@ func (ec *executionContext) _TaskEventLogData(ctx context.Context, sel ast.Selec
case "__typename":
out.Values[i] = graphql.MarshalString("TaskEventLogData")
case "hostId":
+
out.Values[i] = ec._TaskEventLogData_hostId(ctx, field, obj)
+
+ case "podId":
+
+ out.Values[i] = ec._TaskEventLogData_podId(ctx, field, obj)
+
case "jiraIssue":
+
out.Values[i] = ec._TaskEventLogData_jiraIssue(ctx, field, obj)
+
case "jiraLink":
+
out.Values[i] = ec._TaskEventLogData_jiraLink(ctx, field, obj)
+
case "priority":
+
out.Values[i] = ec._TaskEventLogData_priority(ctx, field, obj)
+
case "status":
+
out.Values[i] = ec._TaskEventLogData_status(ctx, field, obj)
+
case "timestamp":
+
out.Values[i] = ec._TaskEventLogData_timestamp(ctx, field, obj)
+
case "userId":
+
out.Values[i] = ec._TaskEventLogData_userId(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47850,7 +70311,6 @@ var taskEventLogEntryImplementors = []string{"TaskEventLogEntry"}
func (ec *executionContext) _TaskEventLogEntry(ctx context.Context, sel ast.SelectionSet, obj *model.TaskAPIEventLogEntry) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskEventLogEntryImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -47858,34 +70318,48 @@ func (ec *executionContext) _TaskEventLogEntry(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("TaskEventLogEntry")
case "id":
+
out.Values[i] = ec._TaskEventLogEntry_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "resourceType":
- out.Values[i] = ec._TaskEventLogEntry_resourceType(ctx, field, obj)
+ case "data":
+
+ out.Values[i] = ec._TaskEventLogEntry_data(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "eventType":
+
+ out.Values[i] = ec._TaskEventLogEntry_eventType(ctx, field, obj)
+
case "processedAt":
+
out.Values[i] = ec._TaskEventLogEntry_processedAt(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "timestamp":
- out.Values[i] = ec._TaskEventLogEntry_timestamp(ctx, field, obj)
- case "eventType":
- out.Values[i] = ec._TaskEventLogEntry_eventType(ctx, field, obj)
- case "data":
- out.Values[i] = ec._TaskEventLogEntry_data(ctx, field, obj)
+ case "resourceId":
+
+ out.Values[i] = ec._TaskEventLogEntry_resourceId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "resourceId":
- out.Values[i] = ec._TaskEventLogEntry_resourceId(ctx, field, obj)
+ case "resourceType":
+
+ out.Values[i] = ec._TaskEventLogEntry_resourceType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "timestamp":
+
+ out.Values[i] = ec._TaskEventLogEntry_timestamp(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47901,7 +70375,6 @@ var taskFilesImplementors = []string{"TaskFiles"}
func (ec *executionContext) _TaskFiles(ctx context.Context, sel ast.SelectionSet, obj *TaskFiles) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskFilesImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -47909,12 +70382,16 @@ func (ec *executionContext) _TaskFiles(ctx context.Context, sel ast.SelectionSet
case "__typename":
out.Values[i] = graphql.MarshalString("TaskFiles")
case "fileCount":
+
out.Values[i] = ec._TaskFiles_fileCount(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "groupedFiles":
+
out.Values[i] = ec._TaskFiles_groupedFiles(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -47933,7 +70410,6 @@ var taskInfoImplementors = []string{"TaskInfo"}
func (ec *executionContext) _TaskInfo(ctx context.Context, sel ast.SelectionSet, obj *model.TaskInfo) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskInfoImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -47941,9 +70417,13 @@ func (ec *executionContext) _TaskInfo(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("TaskInfo")
case "id":
+
out.Values[i] = ec._TaskInfo_id(ctx, field, obj)
+
case "name":
+
out.Values[i] = ec._TaskInfo_name(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47959,23 +70439,32 @@ var taskLogLinksImplementors = []string{"TaskLogLinks"}
func (ec *executionContext) _TaskLogLinks(ctx context.Context, sel ast.SelectionSet, obj *model.LogLinks) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskLogLinksImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TaskLogLinks")
- case "allLogLink":
- out.Values[i] = ec._TaskLogLinks_allLogLink(ctx, field, obj)
case "agentLogLink":
+
out.Values[i] = ec._TaskLogLinks_agentLogLink(ctx, field, obj)
+
+ case "allLogLink":
+
+ out.Values[i] = ec._TaskLogLinks_allLogLink(ctx, field, obj)
+
+ case "eventLogLink":
+
+ out.Values[i] = ec._TaskLogLinks_eventLogLink(ctx, field, obj)
+
case "systemLogLink":
+
out.Values[i] = ec._TaskLogLinks_systemLogLink(ctx, field, obj)
+
case "taskLogLink":
+
out.Values[i] = ec._TaskLogLinks_taskLogLink(ctx, field, obj)
- case "eventLogLink":
- out.Values[i] = ec._TaskLogLinks_eventLogLink(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -47991,97 +70480,132 @@ var taskLogsImplementors = []string{"TaskLogs"}
func (ec *executionContext) _TaskLogs(ctx context.Context, sel ast.SelectionSet, obj *TaskLogs) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskLogsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TaskLogs")
- case "taskId":
- out.Values[i] = ec._TaskLogs_taskId(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "execution":
- out.Values[i] = ec._TaskLogs_execution(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "defaultLogger":
- out.Values[i] = ec._TaskLogs_defaultLogger(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "eventLogs":
+ case "agentLogs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._TaskLogs_eventLogs(ctx, field, obj)
+ res = ec._TaskLogs_agentLogs(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "taskLogs":
+ case "allLogs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._TaskLogs_taskLogs(ctx, field, obj)
+ res = ec._TaskLogs_allLogs(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "systemLogs":
+ case "defaultLogger":
+
+ out.Values[i] = ec._TaskLogs_defaultLogger(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "eventLogs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._TaskLogs_systemLogs(ctx, field, obj)
+ res = ec._TaskLogs_eventLogs(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "agentLogs":
+ case "execution":
+
+ out.Values[i] = ec._TaskLogs_execution(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "systemLogs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._TaskLogs_agentLogs(ctx, field, obj)
+ res = ec._TaskLogs_systemLogs(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "allLogs":
+ case "taskId":
+
+ out.Values[i] = ec._TaskLogs_taskId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "taskLogs":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._TaskLogs_allLogs(ctx, field, obj)
+ res = ec._TaskLogs_taskLogs(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -48098,7 +70622,6 @@ var taskQueueDistroImplementors = []string{"TaskQueueDistro"}
func (ec *executionContext) _TaskQueueDistro(ctx context.Context, sel ast.SelectionSet, obj *TaskQueueDistro) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskQueueDistroImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48106,17 +70629,23 @@ func (ec *executionContext) _TaskQueueDistro(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("TaskQueueDistro")
case "id":
+
out.Values[i] = ec._TaskQueueDistro_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "taskCount":
- out.Values[i] = ec._TaskQueueDistro_taskCount(ctx, field, obj)
+ case "hostCount":
+
+ out.Values[i] = ec._TaskQueueDistro_hostCount(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "hostCount":
- out.Values[i] = ec._TaskQueueDistro_hostCount(ctx, field, obj)
+ case "taskCount":
+
+ out.Values[i] = ec._TaskQueueDistro_taskCount(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -48135,7 +70664,6 @@ var taskQueueItemImplementors = []string{"TaskQueueItem"}
func (ec *executionContext) _TaskQueueItem(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskQueueItem) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskQueueItemImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48143,43 +70671,51 @@ func (ec *executionContext) _TaskQueueItem(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("TaskQueueItem")
case "id":
+
out.Values[i] = ec._TaskQueueItem_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "displayName":
- out.Values[i] = ec._TaskQueueItem_displayName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "project":
- out.Values[i] = ec._TaskQueueItem_project(ctx, field, obj)
+ case "buildVariant":
+
+ out.Values[i] = ec._TaskQueueItem_buildVariant(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "buildVariant":
- out.Values[i] = ec._TaskQueueItem_buildVariant(ctx, field, obj)
+ case "displayName":
+
+ out.Values[i] = ec._TaskQueueItem_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "expectedDuration":
+
out.Values[i] = ec._TaskQueueItem_expectedDuration(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "priority":
+
out.Values[i] = ec._TaskQueueItem_priority(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "revision":
- out.Values[i] = ec._TaskQueueItem_revision(ctx, field, obj)
+ case "project":
+
+ out.Values[i] = ec._TaskQueueItem_project(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "requester":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -48190,85 +70726,26 @@ func (ec *executionContext) _TaskQueueItem(ctx context.Context, sel ast.Selectio
atomic.AddUint32(&invalids, 1)
}
return res
- })
- case "version":
- out.Values[i] = ec._TaskQueueItem_version(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-var taskResultImplementors = []string{"TaskResult"}
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
-func (ec *executionContext) _TaskResult(ctx context.Context, sel ast.SelectionSet, obj *TaskResult) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, taskResultImplementors)
+ })
+ case "revision":
+
+ out.Values[i] = ec._TaskQueueItem_revision(ctx, field, obj)
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("TaskResult")
- case "id":
- out.Values[i] = ec._TaskResult_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "execution":
- out.Values[i] = ec._TaskResult_execution(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "aborted":
- out.Values[i] = ec._TaskResult_aborted(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "displayName":
- out.Values[i] = ec._TaskResult_displayName(ctx, field, obj)
if out.Values[i] == graphql.Null {
- invalids++
+ atomic.AddUint32(&invalids, 1)
}
case "version":
- out.Values[i] = ec._TaskResult_version(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "status":
- out.Values[i] = ec._TaskResult_status(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "baseStatus":
- out.Values[i] = ec._TaskResult_baseStatus(ctx, field, obj)
- case "baseTask":
- out.Values[i] = ec._TaskResult_baseTask(ctx, field, obj)
- case "buildVariant":
- out.Values[i] = ec._TaskResult_buildVariant(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "buildVariantDisplayName":
- out.Values[i] = ec._TaskResult_buildVariantDisplayName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "blocked":
- out.Values[i] = ec._TaskResult_blocked(ctx, field, obj)
+
+ out.Values[i] = ec._TaskQueueItem_version(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
- invalids++
+ atomic.AddUint32(&invalids, 1)
}
- case "executionTasksFull":
- out.Values[i] = ec._TaskResult_executionTasksFull(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48284,7 +70761,6 @@ var taskSpecifierImplementors = []string{"TaskSpecifier"}
func (ec *executionContext) _TaskSpecifier(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskSpecifier) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskSpecifierImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48292,17 +70768,23 @@ func (ec *executionContext) _TaskSpecifier(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("TaskSpecifier")
case "patchAlias":
+
out.Values[i] = ec._TaskSpecifier_patchAlias(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "taskRegex":
+
out.Values[i] = ec._TaskSpecifier_taskRegex(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "variantRegex":
+
out.Values[i] = ec._TaskSpecifier_variantRegex(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -48321,7 +70803,6 @@ var taskStatsImplementors = []string{"TaskStats"}
func (ec *executionContext) _TaskStats(ctx context.Context, sel ast.SelectionSet, obj *task.TaskStats) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskStatsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48329,9 +70810,13 @@ func (ec *executionContext) _TaskStats(ctx context.Context, sel ast.SelectionSet
case "__typename":
out.Values[i] = graphql.MarshalString("TaskStats")
case "counts":
+
out.Values[i] = ec._TaskStats_counts(ctx, field, obj)
+
case "eta":
+
out.Values[i] = ec._TaskStats_eta(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48347,7 +70832,6 @@ var taskSyncOptionsImplementors = []string{"TaskSyncOptions"}
func (ec *executionContext) _TaskSyncOptions(ctx context.Context, sel ast.SelectionSet, obj *model.APITaskSyncOptions) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskSyncOptionsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48355,9 +70839,13 @@ func (ec *executionContext) _TaskSyncOptions(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("TaskSyncOptions")
case "configEnabled":
+
out.Values[i] = ec._TaskSyncOptions_configEnabled(ctx, field, obj)
+
case "patchEnabled":
+
out.Values[i] = ec._TaskSyncOptions_patchEnabled(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48373,25 +70861,30 @@ var taskTestResultImplementors = []string{"TaskTestResult"}
func (ec *executionContext) _TaskTestResult(ctx context.Context, sel ast.SelectionSet, obj *TaskTestResult) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskTestResultImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TaskTestResult")
+ case "testResults":
+
+ out.Values[i] = ec._TaskTestResult_testResults(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
case "totalTestCount":
+
out.Values[i] = ec._TaskTestResult_totalTestCount(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "filteredTestCount":
+
out.Values[i] = ec._TaskTestResult_filteredTestCount(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "testResults":
- out.Values[i] = ec._TaskTestResult_testResults(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -48410,30 +70903,37 @@ var taskTestResultSampleImplementors = []string{"TaskTestResultSample"}
func (ec *executionContext) _TaskTestResultSample(ctx context.Context, sel ast.SelectionSet, obj *TaskTestResultSample) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, taskTestResultSampleImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TaskTestResultSample")
- case "taskId":
- out.Values[i] = ec._TaskTestResultSample_taskId(ctx, field, obj)
+ case "execution":
+
+ out.Values[i] = ec._TaskTestResultSample_execution(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "execution":
- out.Values[i] = ec._TaskTestResultSample_execution(ctx, field, obj)
+ case "matchingFailedTestNames":
+
+ out.Values[i] = ec._TaskTestResultSample_matchingFailedTestNames(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "totalTestCount":
- out.Values[i] = ec._TaskTestResultSample_totalTestCount(ctx, field, obj)
+ case "taskId":
+
+ out.Values[i] = ec._TaskTestResultSample_taskId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "matchingFailedTestNames":
- out.Values[i] = ec._TaskTestResultSample_matchingFailedTestNames(ctx, field, obj)
+ case "totalTestCount":
+
+ out.Values[i] = ec._TaskTestResultSample_totalTestCount(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -48452,21 +70952,32 @@ var testLogImplementors = []string{"TestLog"}
func (ec *executionContext) _TestLog(ctx context.Context, sel ast.SelectionSet, obj *model.TestLogs) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, testLogImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TestLog")
+ case "lineNum":
+
+ out.Values[i] = ec._TestLog_lineNum(ctx, field, obj)
+
case "url":
+
out.Values[i] = ec._TestLog_url(ctx, field, obj)
- case "urlRaw":
- out.Values[i] = ec._TestLog_urlRaw(ctx, field, obj)
+
case "urlLobster":
+
out.Values[i] = ec._TestLog_urlLobster(ctx, field, obj)
- case "lineNum":
- out.Values[i] = ec._TestLog_lineNum(ctx, field, obj)
+
+ case "urlParsley":
+
+ out.Values[i] = ec._TestLog_urlParsley(ctx, field, obj)
+
+ case "urlRaw":
+
+ out.Values[i] = ec._TestLog_urlRaw(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48482,7 +70993,6 @@ var testResultImplementors = []string{"TestResult"}
func (ec *executionContext) _TestResult(ctx context.Context, sel ast.SelectionSet, obj *model.APITest) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, testResultImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48490,41 +71000,65 @@ func (ec *executionContext) _TestResult(ctx context.Context, sel ast.SelectionSe
case "__typename":
out.Values[i] = graphql.MarshalString("TestResult")
case "id":
+
out.Values[i] = ec._TestResult_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "baseStatus":
+
+ out.Values[i] = ec._TestResult_baseStatus(ctx, field, obj)
+
+ case "duration":
+
+ out.Values[i] = ec._TestResult_duration(ctx, field, obj)
+
+ case "endTime":
+
+ out.Values[i] = ec._TestResult_endTime(ctx, field, obj)
+
+ case "execution":
+
+ out.Values[i] = ec._TestResult_execution(ctx, field, obj)
+
+ case "exitCode":
+
+ out.Values[i] = ec._TestResult_exitCode(ctx, field, obj)
+
case "groupID":
+
out.Values[i] = ec._TestResult_groupID(ctx, field, obj)
+
+ case "logs":
+
+ out.Values[i] = ec._TestResult_logs(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "startTime":
+
+ out.Values[i] = ec._TestResult_startTime(ctx, field, obj)
+
case "status":
+
out.Values[i] = ec._TestResult_status(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "baseStatus":
- out.Values[i] = ec._TestResult_baseStatus(ctx, field, obj)
+ case "taskId":
+
+ out.Values[i] = ec._TestResult_taskId(ctx, field, obj)
+
case "testFile":
+
out.Values[i] = ec._TestResult_testFile(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "logs":
- out.Values[i] = ec._TestResult_logs(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "exitCode":
- out.Values[i] = ec._TestResult_exitCode(ctx, field, obj)
- case "startTime":
- out.Values[i] = ec._TestResult_startTime(ctx, field, obj)
- case "duration":
- out.Values[i] = ec._TestResult_duration(ctx, field, obj)
- case "endTime":
- out.Values[i] = ec._TestResult_endTime(ctx, field, obj)
- case "taskId":
- out.Values[i] = ec._TestResult_taskId(ctx, field, obj)
- case "execution":
- out.Values[i] = ec._TestResult_execution(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48540,21 +71074,33 @@ var ticketFieldsImplementors = []string{"TicketFields"}
func (ec *executionContext) _TicketFields(ctx context.Context, sel ast.SelectionSet, obj *thirdparty.TicketFields) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, ticketFieldsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TicketFields")
- case "summary":
- out.Values[i] = ec._TicketFields_summary(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ case "assignedTeam":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._TicketFields_assignedTeam(ctx, field, obj)
+ return res
}
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
case "assigneeDisplayName":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -48562,10 +71108,23 @@ func (ec *executionContext) _TicketFields(ctx context.Context, sel ast.Selection
}()
res = ec._TicketFields_assigneeDisplayName(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "created":
+
+ out.Values[i] = ec._TicketFields_created(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
case "resolutionName":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -48573,33 +71132,33 @@ func (ec *executionContext) _TicketFields(ctx context.Context, sel ast.Selection
}()
res = ec._TicketFields_resolutionName(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "created":
- out.Values[i] = ec._TicketFields_created(ctx, field, obj)
+ case "status":
+
+ out.Values[i] = ec._TicketFields_status(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "updated":
- out.Values[i] = ec._TicketFields_updated(ctx, field, obj)
+ case "summary":
+
+ out.Values[i] = ec._TicketFields_summary(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "status":
- out.Values[i] = ec._TicketFields_status(ctx, field, obj)
+ case "updated":
+
+ out.Values[i] = ec._TicketFields_updated(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "assignedTeam":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._TicketFields_assignedTeam(ctx, field, obj)
- return res
- })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48615,50 +71174,62 @@ var triggerAliasImplementors = []string{"TriggerAlias"}
func (ec *executionContext) _TriggerAlias(ctx context.Context, sel ast.SelectionSet, obj *model.APITriggerDefinition) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, triggerAliasImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TriggerAlias")
- case "project":
- out.Values[i] = ec._TriggerAlias_project(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "level":
- out.Values[i] = ec._TriggerAlias_level(ctx, field, obj)
+ case "alias":
+
+ out.Values[i] = ec._TriggerAlias_alias(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "buildVariantRegex":
+
out.Values[i] = ec._TriggerAlias_buildVariantRegex(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "taskRegex":
- out.Values[i] = ec._TriggerAlias_taskRegex(ctx, field, obj)
+ case "configFile":
+
+ out.Values[i] = ec._TriggerAlias_configFile(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "status":
- out.Values[i] = ec._TriggerAlias_status(ctx, field, obj)
+ case "dateCutoff":
+
+ out.Values[i] = ec._TriggerAlias_dateCutoff(ctx, field, obj)
+
+ case "level":
+
+ out.Values[i] = ec._TriggerAlias_level(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "dateCutoff":
- out.Values[i] = ec._TriggerAlias_dateCutoff(ctx, field, obj)
+ case "project":
+
+ out.Values[i] = ec._TriggerAlias_project(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "configFile":
- out.Values[i] = ec._TriggerAlias_configFile(ctx, field, obj)
+ case "status":
+
+ out.Values[i] = ec._TriggerAlias_status(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "alias":
- out.Values[i] = ec._TriggerAlias_alias(ctx, field, obj)
+ case "taskRegex":
+
+ out.Values[i] = ec._TriggerAlias_taskRegex(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -48677,20 +71248,23 @@ var uIConfigImplementors = []string{"UIConfig"}
func (ec *executionContext) _UIConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIUIConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, uIConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("UIConfig")
- case "userVoice":
- out.Values[i] = ec._UIConfig_userVoice(ctx, field, obj)
case "defaultProject":
+
out.Values[i] = ec._UIConfig_defaultProject(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "userVoice":
+
+ out.Values[i] = ec._UIConfig_userVoice(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48706,7 +71280,6 @@ var upstreamProjectImplementors = []string{"UpstreamProject"}
func (ec *executionContext) _UpstreamProject(ctx context.Context, sel ast.SelectionSet, obj *UpstreamProject) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, upstreamProjectImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48714,44 +71287,62 @@ func (ec *executionContext) _UpstreamProject(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("UpstreamProject")
case "owner":
+
out.Values[i] = ec._UpstreamProject_owner(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "project":
+
+ out.Values[i] = ec._UpstreamProject_project(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "repo":
+
out.Values[i] = ec._UpstreamProject_repo(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "revision":
- out.Values[i] = ec._UpstreamProject_revision(ctx, field, obj)
+ case "resourceID":
+
+ out.Values[i] = ec._UpstreamProject_resourceID(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "project":
- out.Values[i] = ec._UpstreamProject_project(ctx, field, obj)
+ case "revision":
+
+ out.Values[i] = ec._UpstreamProject_revision(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "task":
+
+ out.Values[i] = ec._UpstreamProject_task(ctx, field, obj)
+
case "triggerID":
+
out.Values[i] = ec._UpstreamProject_triggerID(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "resourceID":
- out.Values[i] = ec._UpstreamProject_resourceID(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "task":
- out.Values[i] = ec._UpstreamProject_task(ctx, field, obj)
- case "version":
- out.Values[i] = ec._UpstreamProject_version(ctx, field, obj)
case "triggerType":
+
out.Values[i] = ec._UpstreamProject_triggerType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
+ case "version":
+
+ out.Values[i] = ec._UpstreamProject_version(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48767,19 +71358,24 @@ var useSpruceOptionsImplementors = []string{"UseSpruceOptions"}
func (ec *executionContext) _UseSpruceOptions(ctx context.Context, sel ast.SelectionSet, obj *model.APIUseSpruceOptions) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, useSpruceOptionsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("UseSpruceOptions")
- case "hasUsedSpruceBefore":
- out.Values[i] = ec._UseSpruceOptions_hasUsedSpruceBefore(ctx, field, obj)
case "hasUsedMainlineCommitsBefore":
+
out.Values[i] = ec._UseSpruceOptions_hasUsedMainlineCommitsBefore(ctx, field, obj)
+
+ case "hasUsedSpruceBefore":
+
+ out.Values[i] = ec._UseSpruceOptions_hasUsedSpruceBefore(ctx, field, obj)
+
case "spruceV1":
+
out.Values[i] = ec._UseSpruceOptions_spruceV1(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48795,7 +71391,6 @@ var userImplementors = []string{"User"}
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.APIDBUser) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48803,23 +71398,23 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
case "__typename":
out.Values[i] = graphql.MarshalString("User")
case "displayName":
+
out.Values[i] = ec._User_displayName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "userId":
- out.Values[i] = ec._User_userId(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "emailAddress":
+
out.Values[i] = ec._User_emailAddress(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "patches":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -48830,10 +71425,16 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "permissions":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -48844,7 +71445,36 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "subscriptions":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._User_subscriptions(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
+ case "userId":
+
+ out.Values[i] = ec._User_userId(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48860,62 +71490,37 @@ var userConfigImplementors = []string{"UserConfig"}
func (ec *executionContext) _UserConfig(ctx context.Context, sel ast.SelectionSet, obj *UserConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("UserConfig")
- case "user":
- out.Values[i] = ec._UserConfig_user(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
case "api_key":
+
out.Values[i] = ec._UserConfig_api_key(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "api_server_host":
+
out.Values[i] = ec._UserConfig_api_server_host(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "ui_server_host":
+
out.Values[i] = ec._UserConfig_ui_server_host(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 {
- return graphql.Null
- }
- return out
-}
-
-var userPatchesImplementors = []string{"UserPatches"}
+ case "user":
-func (ec *executionContext) _UserPatches(ctx context.Context, sel ast.SelectionSet, obj *UserPatches) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, userPatchesImplementors)
+ out.Values[i] = ec._UserConfig_user(ctx, field, obj)
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("UserPatches")
- case "patches":
- out.Values[i] = ec._UserPatches_patches(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalids++
- }
- case "filteredPatchCount":
- out.Values[i] = ec._UserPatches_filteredPatchCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
@@ -48934,25 +71539,44 @@ var userSettingsImplementors = []string{"UserSettings"}
func (ec *executionContext) _UserSettings(ctx context.Context, sel ast.SelectionSet, obj *model.APIUserSettings) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userSettingsImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("UserSettings")
- case "timezone":
- out.Values[i] = ec._UserSettings_timezone(ctx, field, obj)
- case "region":
- out.Values[i] = ec._UserSettings_region(ctx, field, obj)
case "githubUser":
+
out.Values[i] = ec._UserSettings_githubUser(ctx, field, obj)
- case "slackUsername":
- out.Values[i] = ec._UserSettings_slackUsername(ctx, field, obj)
+
case "notifications":
+
out.Values[i] = ec._UserSettings_notifications(ctx, field, obj)
+
+ case "region":
+
+ out.Values[i] = ec._UserSettings_region(ctx, field, obj)
+
+ case "slackUsername":
+
+ out.Values[i] = ec._UserSettings_slackUsername(ctx, field, obj)
+
+ case "slackMemberId":
+
+ out.Values[i] = ec._UserSettings_slackMemberId(ctx, field, obj)
+
+ case "timezone":
+
+ out.Values[i] = ec._UserSettings_timezone(ctx, field, obj)
+
case "useSpruceOptions":
+
out.Values[i] = ec._UserSettings_useSpruceOptions(ctx, field, obj)
+
+ case "dateFormat":
+
+ out.Values[i] = ec._UserSettings_dateFormat(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -48968,7 +71592,6 @@ var variantTaskImplementors = []string{"VariantTask"}
func (ec *executionContext) _VariantTask(ctx context.Context, sel ast.SelectionSet, obj *model.VariantTask) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, variantTaskImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -48976,12 +71599,16 @@ func (ec *executionContext) _VariantTask(ctx context.Context, sel ast.SelectionS
case "__typename":
out.Values[i] = graphql.MarshalString("VariantTask")
case "name":
+
out.Values[i] = ec._VariantTask_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "tasks":
+
out.Values[i] = ec._VariantTask_tasks(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49000,7 +71627,6 @@ var versionImplementors = []string{"Version"}
func (ec *executionContext) _Version(ctx context.Context, sel ast.SelectionSet, obj *model.APIVersion) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, versionImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49008,207 +71634,399 @@ func (ec *executionContext) _Version(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("Version")
case "id":
+
out.Values[i] = ec._Version_id(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "createTime":
- out.Values[i] = ec._Version_createTime(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "startTime":
- out.Values[i] = ec._Version_startTime(ctx, field, obj)
- case "finishTime":
- out.Values[i] = ec._Version_finishTime(ctx, field, obj)
- case "message":
- out.Values[i] = ec._Version_message(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "revision":
- out.Values[i] = ec._Version_revision(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
+ case "activated":
+
+ out.Values[i] = ec._Version_activated(ctx, field, obj)
+
case "author":
+
out.Values[i] = ec._Version_author(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "status":
+ case "baseTaskStatuses":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_status(ctx, field, obj)
+ res = ec._Version_baseTaskStatuses(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "order":
- out.Values[i] = ec._Version_order(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
+ case "baseVersion":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Version_baseVersion(ctx, field, obj)
+ return res
}
- case "repo":
- out.Values[i] = ec._Version_repo(ctx, field, obj)
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "branch":
+
+ out.Values[i] = ec._Version_branch(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "project":
- out.Values[i] = ec._Version_project(ctx, field, obj)
+ case "buildVariants":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Version_buildVariants(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "buildVariantStats":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Version_buildVariantStats(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "childVersions":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Version_childVersions(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "createTime":
+
+ out.Values[i] = ec._Version_createTime(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "projectIdentifier":
- out.Values[i] = ec._Version_projectIdentifier(ctx, field, obj)
+ case "errors":
+
+ out.Values[i] = ec._Version_errors(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "projectMetadata":
+ case "finishTime":
+
+ out.Values[i] = ec._Version_finishTime(ctx, field, obj)
+
+ case "isPatch":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_projectMetadata(ctx, field, obj)
+ res = ec._Version_isPatch(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "branch":
- out.Values[i] = ec._Version_branch(ctx, field, obj)
+ case "manifest":
+ field := field
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Version_manifest(ctx, field, obj)
+ return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "message":
+
+ out.Values[i] = ec._Version_message(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "order":
+
+ out.Values[i] = ec._Version_order(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "requester":
- out.Values[i] = ec._Version_requester(ctx, field, obj)
+ case "parameters":
+
+ out.Values[i] = ec._Version_parameters(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "activated":
- out.Values[i] = ec._Version_activated(ctx, field, obj)
- case "taskStatusCounts":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Version_taskStatusCounts(ctx, field, obj)
- return res
- })
- case "taskStatusStats":
+ case "patch":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_taskStatusStats(ctx, field, obj)
+ res = ec._Version_patch(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "buildVariants":
+ case "previousVersion":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_buildVariants(ctx, field, obj)
+ res = ec._Version_previousVersion(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "buildVariantStats":
+ case "project":
+
+ out.Values[i] = ec._Version_project(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "projectIdentifier":
+
+ out.Values[i] = ec._Version_projectIdentifier(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "projectMetadata":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_buildVariantStats(ctx, field, obj)
+ res = ec._Version_projectMetadata(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "isPatch":
+ case "repo":
+
+ out.Values[i] = ec._Version_repo(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "requester":
+
+ out.Values[i] = ec._Version_requester(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "revision":
+
+ out.Values[i] = ec._Version_revision(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "startTime":
+
+ out.Values[i] = ec._Version_startTime(ctx, field, obj)
+
+ case "status":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_isPatch(ctx, field, obj)
+ res = ec._Version_status(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "patch":
+ case "taskCount":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_patch(ctx, field, obj)
+ res = ec._Version_taskCount(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "childVersions":
+ case "tasks":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_childVersions(ctx, field, obj)
+ res = ec._Version_tasks(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "taskCount":
+ case "taskStatuses":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_taskCount(ctx, field, obj)
+ res = ec._Version_taskStatuses(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "baseVersion":
+ case "taskStatusStats":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_baseVersion(ctx, field, obj)
+ res = ec._Version_taskStatusStats(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "previousVersion":
+ case "upstreamProject":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_previousVersion(ctx, field, obj)
+ res = ec._Version_upstreamProject(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
case "versionTiming":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -49216,62 +72034,87 @@ func (ec *executionContext) _Version(ctx context.Context, sel ast.SelectionSet,
}()
res = ec._Version_versionTiming(ctx, field, obj)
return res
- })
- case "parameters":
- out.Values[i] = ec._Version_parameters(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
}
- case "taskStatuses":
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
+ })
+ case "externalLinksForMetadata":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_taskStatuses(ctx, field, obj)
+ res = ec._Version_externalLinksForMetadata(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "baseTaskStatuses":
+ case "warnings":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Version_baseTaskStatuses(ctx, field, obj)
+ res = ec._Version_warnings(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "manifest":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Version_manifest(ctx, field, obj)
- return res
- })
- case "upstreamProject":
- field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._Version_upstreamProject(ctx, field, obj)
- return res
- })
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch()
+ if invalids > 0 {
+ return graphql.Null
+ }
+ return out
+}
+
+var versionTasksImplementors = []string{"VersionTasks"}
+
+func (ec *executionContext) _VersionTasks(ctx context.Context, sel ast.SelectionSet, obj *VersionTasks) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, versionTasksImplementors)
+ out := graphql.NewFieldSet(fields)
+ var invalids uint32
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("VersionTasks")
+ case "count":
+
+ out.Values[i] = ec._VersionTasks_count(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "data":
+
+ out.Values[i] = ec._VersionTasks_data(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49287,7 +72130,6 @@ var versionTimingImplementors = []string{"VersionTiming"}
func (ec *executionContext) _VersionTiming(ctx context.Context, sel ast.SelectionSet, obj *VersionTiming) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, versionTimingImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49295,9 +72137,13 @@ func (ec *executionContext) _VersionTiming(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("VersionTiming")
case "makespan":
+
out.Values[i] = ec._VersionTiming_makespan(ctx, field, obj)
+
case "timeTaken":
+
out.Values[i] = ec._VersionTiming_timeTaken(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49313,7 +72159,6 @@ var volumeImplementors = []string{"Volume"}
func (ec *executionContext) _Volume(ctx context.Context, sel ast.SelectionSet, obj *model.APIVolume) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, volumeImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49321,57 +72166,56 @@ func (ec *executionContext) _Volume(ctx context.Context, sel ast.SelectionSet, o
case "__typename":
out.Values[i] = graphql.MarshalString("Volume")
case "id":
+
out.Values[i] = ec._Volume_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "displayName":
- out.Values[i] = ec._Volume_displayName(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "createdBy":
- out.Values[i] = ec._Volume_createdBy(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "type":
- out.Values[i] = ec._Volume_type(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "availabilityZone":
+
out.Values[i] = ec._Volume_availabilityZone(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "size":
- out.Values[i] = ec._Volume_size(ctx, field, obj)
+ case "createdBy":
+
+ out.Values[i] = ec._Volume_createdBy(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
- case "expiration":
- out.Values[i] = ec._Volume_expiration(ctx, field, obj)
+ case "creationTime":
+
+ out.Values[i] = ec._Volume_creationTime(ctx, field, obj)
+
case "deviceName":
+
out.Values[i] = ec._Volume_deviceName(ctx, field, obj)
- case "hostID":
- out.Values[i] = ec._Volume_hostID(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&invalids, 1)
- }
- case "noExpiration":
- out.Values[i] = ec._Volume_noExpiration(ctx, field, obj)
+
+ case "displayName":
+
+ out.Values[i] = ec._Volume_displayName(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
+ case "expiration":
+
+ out.Values[i] = ec._Volume_expiration(ctx, field, obj)
+
case "homeVolume":
+
out.Values[i] = ec._Volume_homeVolume(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "host":
field := field
- out.Concurrently(i, func() (res graphql.Marshaler) {
+
+ innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
@@ -49379,9 +72223,47 @@ func (ec *executionContext) _Volume(ctx context.Context, sel ast.SelectionSet, o
}()
res = ec._Volume_host(ctx, field, obj)
return res
+ }
+
+ out.Concurrently(i, func() graphql.Marshaler {
+ return innerFunc(ctx)
+
})
- case "creationTime":
- out.Values[i] = ec._Volume_creationTime(ctx, field, obj)
+ case "hostID":
+
+ out.Values[i] = ec._Volume_hostID(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "migrating":
+
+ out.Values[i] = ec._Volume_migrating(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "noExpiration":
+
+ out.Values[i] = ec._Volume_noExpiration(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "size":
+
+ out.Values[i] = ec._Volume_size(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
+ case "type":
+
+ out.Values[i] = ec._Volume_type(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&invalids, 1)
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49397,7 +72279,6 @@ var webhookImplementors = []string{"Webhook"}
func (ec *executionContext) _Webhook(ctx context.Context, sel ast.SelectionSet, obj *model.APIWebHook) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, webhookImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49405,12 +72286,16 @@ func (ec *executionContext) _Webhook(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("Webhook")
case "endpoint":
+
out.Values[i] = ec._Webhook_endpoint(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "secret":
+
out.Values[i] = ec._Webhook_secret(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49429,7 +72314,6 @@ var webhookHeaderImplementors = []string{"WebhookHeader"}
func (ec *executionContext) _WebhookHeader(ctx context.Context, sel ast.SelectionSet, obj *model.APIWebhookHeader) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, webhookHeaderImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49437,12 +72321,16 @@ func (ec *executionContext) _WebhookHeader(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("WebhookHeader")
case "key":
+
out.Values[i] = ec._WebhookHeader_key(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "value":
+
out.Values[i] = ec._WebhookHeader_value(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49461,25 +72349,51 @@ var webhookSubscriberImplementors = []string{"WebhookSubscriber"}
func (ec *executionContext) _WebhookSubscriber(ctx context.Context, sel ast.SelectionSet, obj *model.APIWebhookSubscriber) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, webhookSubscriberImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("WebhookSubscriber")
- case "url":
- out.Values[i] = ec._WebhookSubscriber_url(ctx, field, obj)
+ case "headers":
+
+ out.Values[i] = ec._WebhookSubscriber_headers(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "secret":
+
out.Values[i] = ec._WebhookSubscriber_secret(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
- case "headers":
- out.Values[i] = ec._WebhookSubscriber_headers(ctx, field, obj)
+ case "url":
+
+ out.Values[i] = ec._WebhookSubscriber_url(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "retries":
+
+ out.Values[i] = ec._WebhookSubscriber_retries(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "minDelayMs":
+
+ out.Values[i] = ec._WebhookSubscriber_minDelayMs(ctx, field, obj)
+
+ if out.Values[i] == graphql.Null {
+ invalids++
+ }
+ case "timeoutMs":
+
+ out.Values[i] = ec._WebhookSubscriber_timeoutMs(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49498,17 +72412,20 @@ var workstationConfigImplementors = []string{"WorkstationConfig"}
func (ec *executionContext) _WorkstationConfig(ctx context.Context, sel ast.SelectionSet, obj *model.APIWorkstationConfig) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, workstationConfigImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("WorkstationConfig")
- case "setupCommands":
- out.Values[i] = ec._WorkstationConfig_setupCommands(ctx, field, obj)
case "gitClone":
+
out.Values[i] = ec._WorkstationConfig_gitClone(ctx, field, obj)
+
+ case "setupCommands":
+
+ out.Values[i] = ec._WorkstationConfig_setupCommands(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49524,7 +72441,6 @@ var workstationSetupCommandImplementors = []string{"WorkstationSetupCommand"}
func (ec *executionContext) _WorkstationSetupCommand(ctx context.Context, sel ast.SelectionSet, obj *model.APIWorkstationSetupCommand) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, workstationSetupCommandImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49532,12 +72448,16 @@ func (ec *executionContext) _WorkstationSetupCommand(ctx context.Context, sel as
case "__typename":
out.Values[i] = graphql.MarshalString("WorkstationSetupCommand")
case "command":
+
out.Values[i] = ec._WorkstationSetupCommand_command(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "directory":
+
out.Values[i] = ec._WorkstationSetupCommand_directory(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49556,7 +72476,6 @@ var __DirectiveImplementors = []string{"__Directive"}
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49564,24 +72483,34 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS
case "__typename":
out.Values[i] = graphql.MarshalString("__Directive")
case "name":
+
out.Values[i] = ec.___Directive_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
+
out.Values[i] = ec.___Directive_description(ctx, field, obj)
+
case "locations":
+
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "args":
+
out.Values[i] = ec.___Directive_args(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "isRepeatable":
+
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49600,7 +72529,6 @@ var __EnumValueImplementors = []string{"__EnumValue"}
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49608,19 +72536,27 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
case "__typename":
out.Values[i] = graphql.MarshalString("__EnumValue")
case "name":
+
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
+
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
+
case "isDeprecated":
+
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "deprecationReason":
+
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49636,7 +72572,6 @@ var __FieldImplementors = []string{"__Field"}
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49644,29 +72579,41 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("__Field")
case "name":
+
out.Values[i] = ec.___Field_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
+
out.Values[i] = ec.___Field_description(ctx, field, obj)
+
case "args":
+
out.Values[i] = ec.___Field_args(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "type":
+
out.Values[i] = ec.___Field_type(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "isDeprecated":
+
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "deprecationReason":
+
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49682,7 +72629,6 @@ var __InputValueImplementors = []string{"__InputValue"}
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49690,19 +72636,27 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("__InputValue")
case "name":
+
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
+
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
+
case "type":
+
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "defaultValue":
+
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49718,29 +72672,42 @@ var __SchemaImplementors = []string{"__Schema"}
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__Schema")
+ case "description":
+
+ out.Values[i] = ec.___Schema_description(ctx, field, obj)
+
case "types":
+
out.Values[i] = ec.___Schema_types(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "queryType":
+
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "mutationType":
+
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
+
case "subscriptionType":
+
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
+
case "directives":
+
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
@@ -49759,7 +72726,6 @@ var __TypeImplementors = []string{"__Type"}
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
-
out := graphql.NewFieldSet(fields)
var invalids uint32
for i, field := range fields {
@@ -49767,26 +72733,48 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
case "__typename":
out.Values[i] = graphql.MarshalString("__Type")
case "kind":
+
out.Values[i] = ec.___Type_kind(ctx, field, obj)
+
if out.Values[i] == graphql.Null {
invalids++
}
case "name":
+
out.Values[i] = ec.___Type_name(ctx, field, obj)
+
case "description":
+
out.Values[i] = ec.___Type_description(ctx, field, obj)
+
case "fields":
+
out.Values[i] = ec.___Type_fields(ctx, field, obj)
+
case "interfaces":
+
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
+
case "possibleTypes":
+
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
+
case "enumValues":
+
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
+
case "inputFields":
+
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
+
case "ofType":
+
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
+
+ case "specifiedByURL":
+
+ out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
+
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -49802,6 +72790,22 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
// region ***************************** type.gotpl *****************************
+func (ec *executionContext) unmarshalNBannerTheme2githubácomáevergreenáciáevergreenáBannerTheme(ctx context.Context, v interface{}) (evergreen.BannerTheme, error) {
+ tmp, err := graphql.UnmarshalString(v)
+ res := evergreen.BannerTheme(tmp)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNBannerTheme2githubácomáevergreenáciáevergreenáBannerTheme(ctx context.Context, sel ast.SelectionSet, v evergreen.BannerTheme) graphql.Marshaler {
+ res := graphql.MarshalString(string(v))
+ if res == graphql.Null {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ }
+ return res
+}
+
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
res, err := graphql.UnmarshalBoolean(v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -49811,7 +72815,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
res := graphql.MarshalBoolean(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -49825,14 +72829,14 @@ func (ec *executionContext) unmarshalNBoolean2ábool(ctx context.Context, v int
func (ec *executionContext) marshalNBoolean2ábool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalBoolean(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -49885,7 +72889,7 @@ func (ec *executionContext) marshalNBuild2áágithubácomáevergreenáciá
func (ec *executionContext) marshalNBuild2ágithubácomáevergreenáciáevergreenárestámodeláAPIBuild(ctx context.Context, sel ast.SelectionSet, v *model.APIBuild) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -49899,7 +72903,7 @@ func (ec *executionContext) marshalNBuildBaron2githubácomáevergreenáciáe
func (ec *executionContext) marshalNBuildBaron2ágithubácomáevergreenáciáevergreenágraphqláBuildBaron(ctx context.Context, sel ast.SelectionSet, v *BuildBaron) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -49910,6 +72914,11 @@ func (ec *executionContext) marshalNBuildBaronSettings2githubácomáevergreen
return ec._BuildBaronSettings(ctx, sel, &v)
}
+func (ec *executionContext) unmarshalNBuildVariantOptions2githubácomáevergreenáciáevergreenágraphqláBuildVariantOptions(ctx context.Context, v interface{}) (BuildVariantOptions, error) {
+ res, err := ec.unmarshalInputBuildVariantOptions(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) marshalNChildPatchAlias2githubácomáevergreenáciáevergreenárestámodeláAPIChildPatchAlias(ctx context.Context, sel ast.SelectionSet, v model.APIChildPatchAlias) graphql.Marshaler {
return ec._ChildPatchAlias(ctx, sel, &v)
}
@@ -49925,7 +72934,7 @@ func (ec *executionContext) marshalNCommitQueue2githubácomáevergreenáciá
func (ec *executionContext) marshalNCommitQueue2ágithubácomáevergreenáciáevergreenárestámodeláAPICommitQueue(ctx context.Context, sel ast.SelectionSet, v *model.APICommitQueue) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -49940,6 +72949,15 @@ func (ec *executionContext) marshalNCommitQueueParams2githubácomáevergreen
return ec._CommitQueueParams(ctx, sel, &v)
}
+func (ec *executionContext) marshalNContainerResources2githubácomáevergreenáciáevergreenárestámodeláAPIContainerResources(ctx context.Context, sel ast.SelectionSet, v model.APIContainerResources) graphql.Marshaler {
+ return ec._ContainerResources(ctx, sel, &v)
+}
+
+func (ec *executionContext) unmarshalNContainerResourcesInput2githubácomáevergreenáciáevergreenárestámodeláAPIContainerResources(ctx context.Context, v interface{}) (model.APIContainerResources, error) {
+ res, err := ec.unmarshalInputContainerResourcesInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) unmarshalNCopyProjectInput2githubácomáevergreenáciáevergreenárestádataáCopyProjectOpts(ctx context.Context, v interface{}) (data.CopyProjectOpts, error) {
res, err := ec.unmarshalInputCopyProjectInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -49953,7 +72971,7 @@ func (ec *executionContext) unmarshalNCreateProjectInput2githubácomáevergree
func (ec *executionContext) marshalNDependency2ágithubácomáevergreenáciáevergreenágraphqláDependency(ctx context.Context, sel ast.SelectionSet, v *Dependency) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -49963,11 +72981,7 @@ func (ec *executionContext) marshalNDependency2ágithubácomáevergreenáci
func (ec *executionContext) unmarshalNDisplayTask2áágithubácomáevergreenáciáevergreenágraphqláDisplayTaská(ctx context.Context, v interface{}) ([]*DisplayTask, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*DisplayTask, len(vSlice))
@@ -50033,16 +73047,79 @@ func (ec *executionContext) marshalNDuration2githubácomáevergreenáciáeve
res := model.MarshalAPIDuration(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
}
+func (ec *executionContext) marshalNExternalLink2githubácomáevergreenáciáevergreenárestámodeláAPIExternalLink(ctx context.Context, sel ast.SelectionSet, v model.APIExternalLink) graphql.Marshaler {
+ return ec._ExternalLink(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNExternalLinkForMetadata2áágithubácomáevergreenáciáevergreenágraphqláExternalLinkForMetadataá(ctx context.Context, sel ast.SelectionSet, v []*ExternalLinkForMetadata) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNExternalLinkForMetadata2ágithubácomáevergreenáciáevergreenágraphqláExternalLinkForMetadata(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNExternalLinkForMetadata2ágithubácomáevergreenáciáevergreenágraphqláExternalLinkForMetadata(ctx context.Context, sel ast.SelectionSet, v *ExternalLinkForMetadata) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._ExternalLinkForMetadata(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalNExternalLinkInput2githubácomáevergreenáciáevergreenárestámodeláAPIExternalLink(ctx context.Context, v interface{}) (model.APIExternalLink, error) {
+ res, err := ec.unmarshalInputExternalLinkInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) marshalNFile2ágithubácomáevergreenáciáevergreenárestámodeláAPIFile(ctx context.Context, sel ast.SelectionSet, v *model.APIFile) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50097,6 +73174,16 @@ func (ec *executionContext) marshalNFileDiff2ágithubácomáevergreenáciá
return ret
}
+func (ec *executionContext) marshalNGeneralSubscription2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscription(ctx context.Context, sel ast.SelectionSet, v *model.APISubscription) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._GeneralSubscription(ctx, sel, v)
+}
+
func (ec *executionContext) marshalNGithubProjectConflicts2githubácomáevergreenáciáevergreenámodeláGithubProjectConflicts(ctx context.Context, sel ast.SelectionSet, v model1.GithubProjectConflicts) graphql.Marshaler {
return ec._GithubProjectConflicts(ctx, sel, &v)
}
@@ -50104,7 +73191,7 @@ func (ec *executionContext) marshalNGithubProjectConflicts2githubácomáevergr
func (ec *executionContext) marshalNGithubProjectConflicts2ágithubácomáevergreenáciáevergreenámodeláGithubProjectConflicts(ctx context.Context, sel ast.SelectionSet, v *model1.GithubProjectConflicts) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50158,7 +73245,7 @@ func (ec *executionContext) marshalNGroupedFiles2áágithubácomáevergreen
func (ec *executionContext) marshalNGroupedFiles2ágithubácomáevergreenáciáevergreenágraphqláGroupedFiles(ctx context.Context, sel ast.SelectionSet, v *GroupedFiles) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50206,7 +73293,7 @@ func (ec *executionContext) marshalNGroupedProjects2áágithubácomáevergre
func (ec *executionContext) marshalNGroupedTaskStatusCount2ágithubácomáevergreenáciáevergreenámodelátaskáGroupedTaskStatusCount(ctx context.Context, sel ast.SelectionSet, v *task.GroupedTaskStatusCount) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50264,7 +73351,7 @@ func (ec *executionContext) marshalNHost2áágithubácomáevergreenáciáe
func (ec *executionContext) marshalNHost2ágithubácomáevergreenáciáevergreenárestámodeláAPIHost(ctx context.Context, sel ast.SelectionSet, v *model.APIHost) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50274,7 +73361,7 @@ func (ec *executionContext) marshalNHost2ágithubácomáevergreenáciáever
func (ec *executionContext) marshalNHostEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláHostAPIEventData(ctx context.Context, sel ast.SelectionSet, v *model.HostAPIEventData) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50328,7 +73415,7 @@ func (ec *executionContext) marshalNHostEventLogEntry2áágithubácomáeverg
func (ec *executionContext) marshalNHostEventLogEntry2ágithubácomáevergreenáciáevergreenárestámodeláHostAPIEventLogEntry(ctx context.Context, sel ast.SelectionSet, v *model.HostAPIEventLogEntry) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50342,7 +73429,7 @@ func (ec *executionContext) marshalNHostEvents2githubácomáevergreenáciáe
func (ec *executionContext) marshalNHostEvents2ágithubácomáevergreenáciáevergreenágraphqláHostEvents(ctx context.Context, sel ast.SelectionSet, v *HostEvents) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50356,7 +73443,7 @@ func (ec *executionContext) marshalNHostsResponse2githubácomáevergreenáci
func (ec *executionContext) marshalNHostsResponse2ágithubácomáevergreenáciáevergreenágraphqláHostsResponse(ctx context.Context, sel ast.SelectionSet, v *HostsResponse) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50372,7 +73459,7 @@ func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.Selec
res := graphql.MarshalID(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -50386,14 +73473,14 @@ func (ec *executionContext) unmarshalNID2ástring(ctx context.Context, v interf
func (ec *executionContext) marshalNID2ástring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalID(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -50461,7 +73548,7 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti
res := graphql.MarshalInt(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -50476,7 +73563,7 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec
res := graphql.MarshalInt64(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -50490,14 +73577,14 @@ func (ec *executionContext) unmarshalNInt2áint(ctx context.Context, v interfac
func (ec *executionContext) marshalNInt2áint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalInt(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -50520,7 +73607,7 @@ func (ec *executionContext) unmarshalNJiraFieldInput2githubácomáevergreená
func (ec *executionContext) marshalNJiraStatus2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraStatus(ctx context.Context, sel ast.SelectionSet, v *thirdparty.JiraStatus) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50622,7 +73709,7 @@ func (ec *executionContext) marshalNJiraTicket2áágithubácomáevergreená
func (ec *executionContext) marshalNJiraTicket2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicket(ctx context.Context, sel ast.SelectionSet, v *thirdparty.JiraTicket) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -50653,7 +73740,279 @@ func (ec *executionContext) marshalNLogMessage2áágithubácomáevergreená
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNLogMessage2ágithubácomáevergreenáciáevergreenáapimodelsáLogMessage(ctx, sel, v[i])
+ ret[i] = ec.marshalNLogMessage2ágithubácomáevergreenáciáevergreenáapimodelsáLogMessage(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNLogMessage2ágithubácomáevergreenáciáevergreenáapimodelsáLogMessage(ctx context.Context, sel ast.SelectionSet, v *apimodels.LogMessage) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._LogMessage(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNLogkeeperBuild2githubácomáevergreenáciáplankáBuild(ctx context.Context, sel ast.SelectionSet, v plank.Build) graphql.Marshaler {
+ return ec._LogkeeperBuild(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNLogkeeperBuild2ágithubácomáevergreenáciáplankáBuild(ctx context.Context, sel ast.SelectionSet, v *plank.Build) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._LogkeeperBuild(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNLogkeeperTest2githubácomáevergreenáciáplankáTest(ctx context.Context, sel ast.SelectionSet, v plank.Test) graphql.Marshaler {
+ return ec._LogkeeperTest(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNLogkeeperTest2ágithubácomáevergreenáciáplankáTestá(ctx context.Context, sel ast.SelectionSet, v []plank.Test) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNLogkeeperTest2githubácomáevergreenáciáplankáTest(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNMainlineCommitVersion2áágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersioná(ctx context.Context, sel ast.SelectionSet, v []*MainlineCommitVersion) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNMainlineCommitVersion2ágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersion(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNMainlineCommitVersion2ágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersion(ctx context.Context, sel ast.SelectionSet, v *MainlineCommitVersion) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._MainlineCommitVersion(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalNMainlineCommitsOptions2githubácomáevergreenáciáevergreenágraphqláMainlineCommitsOptions(ctx context.Context, v interface{}) (MainlineCommitsOptions, error) {
+ res, err := ec.unmarshalInputMainlineCommitsOptions(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) unmarshalNMetStatus2githubácomáevergreenáciáevergreenágraphqláMetStatus(ctx context.Context, v interface{}) (MetStatus, error) {
+ var res MetStatus
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNMetStatus2githubácomáevergreenáciáevergreenágraphqláMetStatus(ctx context.Context, sel ast.SelectionSet, v MetStatus) graphql.Marshaler {
+ return v
+}
+
+func (ec *executionContext) unmarshalNMetadataLinkInput2áágithubácomáevergreenáciáevergreenárestámodeláAPIMetadataLinká(ctx context.Context, v interface{}) ([]*model.APIMetadataLink, error) {
+ var vSlice []interface{}
+ if v != nil {
+ vSlice = graphql.CoerceList(v)
+ }
+ var err error
+ res := make([]*model.APIMetadataLink, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNMetadataLinkInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIMetadataLink(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) unmarshalNMetadataLinkInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIMetadataLink(ctx context.Context, v interface{}) (*model.APIMetadataLink, error) {
+ res, err := ec.unmarshalInputMetadataLinkInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNModule2githubácomáevergreenáciáevergreenárestámodeláAPIModule(ctx context.Context, sel ast.SelectionSet, v model.APIModule) graphql.Marshaler {
+ return ec._Module(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNModuleCodeChange2githubácomáevergreenáciáevergreenárestámodeláAPIModulePatch(ctx context.Context, sel ast.SelectionSet, v model.APIModulePatch) graphql.Marshaler {
+ return ec._ModuleCodeChange(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNModuleCodeChange2ágithubácomáevergreenáciáevergreenárestámodeláAPIModulePatchá(ctx context.Context, sel ast.SelectionSet, v []model.APIModulePatch) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNModuleCodeChange2githubácomáevergreenáciáevergreenárestámodeláAPIModulePatch(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) unmarshalNMoveProjectInput2githubácomáevergreenáciáevergreenágraphqláMoveProjectInput(ctx context.Context, v interface{}) (MoveProjectInput, error) {
+ res, err := ec.unmarshalInputMoveProjectInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNOomTrackerInfo2githubácomáevergreenáciáevergreenárestámodeláAPIOomTrackerInfo(ctx context.Context, sel ast.SelectionSet, v model.APIOomTrackerInfo) graphql.Marshaler {
+ return ec._OomTrackerInfo(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNParameter2githubácomáevergreenáciáevergreenárestámodeláAPIParameter(ctx context.Context, sel ast.SelectionSet, v model.APIParameter) graphql.Marshaler {
+ return ec._Parameter(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNParameter2ágithubácomáevergreenáciáevergreenárestámodeláAPIParameterá(ctx context.Context, sel ast.SelectionSet, v []model.APIParameter) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNParameter2githubácomáevergreenáciáevergreenárestámodeláAPIParameter(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -50673,17 +74032,11 @@ func (ec *executionContext) marshalNLogMessage2áágithubácomáevergreená
return ret
}
-func (ec *executionContext) marshalNLogMessage2ágithubácomáevergreenáciáevergreenáapimodelsáLogMessage(ctx context.Context, sel ast.SelectionSet, v *apimodels.LogMessage) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- return ec._LogMessage(ctx, sel, v)
+func (ec *executionContext) marshalNPatch2githubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx context.Context, sel ast.SelectionSet, v model.APIPatch) graphql.Marshaler {
+ return ec._Patch(ctx, sel, &v)
}
-func (ec *executionContext) marshalNMainlineCommitVersion2áágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersioná(ctx context.Context, sel ast.SelectionSet, v []*MainlineCommitVersion) graphql.Marshaler {
+func (ec *executionContext) marshalNPatch2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx context.Context, sel ast.SelectionSet, v []*model.APIPatch) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@@ -50707,7 +74060,7 @@ func (ec *executionContext) marshalNMainlineCommitVersion2áágithubácomáe
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNMainlineCommitVersion2ágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersion(ctx, sel, v[i])
+ ret[i] = ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -50727,40 +74080,26 @@ func (ec *executionContext) marshalNMainlineCommitVersion2áágithubácomáe
return ret
}
-func (ec *executionContext) marshalNMainlineCommitVersion2ágithubácomáevergreenáciáevergreenágraphqláMainlineCommitVersion(ctx context.Context, sel ast.SelectionSet, v *MainlineCommitVersion) graphql.Marshaler {
+func (ec *executionContext) marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx context.Context, sel ast.SelectionSet, v *model.APIPatch) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
- return ec._MainlineCommitVersion(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalNMainlineCommitsOptions2githubácomáevergreenáciáevergreenágraphqláMainlineCommitsOptions(ctx context.Context, v interface{}) (MainlineCommitsOptions, error) {
- res, err := ec.unmarshalInputMainlineCommitsOptions(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
+ return ec._Patch(ctx, sel, v)
}
-func (ec *executionContext) unmarshalNMetStatus2githubácomáevergreenáciáevergreenágraphqláMetStatus(ctx context.Context, v interface{}) (MetStatus, error) {
- var res MetStatus
- err := res.UnmarshalGQL(v)
+func (ec *executionContext) unmarshalNPatchConfigure2githubácomáevergreenáciáevergreenágraphqláPatchConfigure(ctx context.Context, v interface{}) (PatchConfigure, error) {
+ res, err := ec.unmarshalInputPatchConfigure(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalNMetStatus2githubácomáevergreenáciáevergreenágraphqláMetStatus(ctx context.Context, sel ast.SelectionSet, v MetStatus) graphql.Marshaler {
- return v
-}
-
-func (ec *executionContext) marshalNModule2githubácomáevergreenáciáevergreenárestámodeláAPIModule(ctx context.Context, sel ast.SelectionSet, v model.APIModule) graphql.Marshaler {
- return ec._Module(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNModuleCodeChange2githubácomáevergreenáciáevergreenárestámodeláAPIModulePatch(ctx context.Context, sel ast.SelectionSet, v model.APIModulePatch) graphql.Marshaler {
- return ec._ModuleCodeChange(ctx, sel, &v)
+func (ec *executionContext) marshalNPatchTriggerAlias2githubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx context.Context, sel ast.SelectionSet, v model.APIPatchTriggerDefinition) graphql.Marshaler {
+ return ec._PatchTriggerAlias(ctx, sel, &v)
}
-func (ec *executionContext) marshalNModuleCodeChange2ágithubácomáevergreenáciáevergreenárestámodeláAPIModulePatchá(ctx context.Context, sel ast.SelectionSet, v []model.APIModulePatch) graphql.Marshaler {
+func (ec *executionContext) marshalNPatchTriggerAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx context.Context, sel ast.SelectionSet, v []*model.APIPatchTriggerDefinition) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@@ -50784,7 +74123,7 @@ func (ec *executionContext) marshalNModuleCodeChange2ágithubácomáevergreen
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNModuleCodeChange2githubácomáevergreenáciáevergreenárestámodeláAPIModulePatch(ctx, sel, v[i])
+ ret[i] = ec.marshalNPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -50804,145 +74143,88 @@ func (ec *executionContext) marshalNModuleCodeChange2ágithubácomáevergreen
return ret
}
-func (ec *executionContext) unmarshalNMoveProjectInput2githubácomáevergreenáciáevergreenágraphqláMoveProjectInput(ctx context.Context, v interface{}) (MoveProjectInput, error) {
- res, err := ec.unmarshalInputMoveProjectInput(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
+func (ec *executionContext) marshalNPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx context.Context, sel ast.SelectionSet, v *model.APIPatchTriggerDefinition) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._PatchTriggerAlias(ctx, sel, v)
}
-func (ec *executionContext) marshalNOomTrackerInfo2githubácomáevergreenáciáevergreenárestámodeláAPIOomTrackerInfo(ctx context.Context, sel ast.SelectionSet, v model.APIOomTrackerInfo) graphql.Marshaler {
- return ec._OomTrackerInfo(ctx, sel, &v)
+func (ec *executionContext) unmarshalNPatchTriggerAliasInput2githubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx context.Context, v interface{}) (model.APIPatchTriggerDefinition, error) {
+ res, err := ec.unmarshalInputPatchTriggerAliasInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalNParameter2githubácomáevergreenáciáevergreenárestámodeláAPIParameter(ctx context.Context, sel ast.SelectionSet, v model.APIParameter) graphql.Marshaler {
- return ec._Parameter(ctx, sel, &v)
+func (ec *executionContext) marshalNPatches2githubácomáevergreenáciáevergreenágraphqláPatches(ctx context.Context, sel ast.SelectionSet, v Patches) graphql.Marshaler {
+ return ec._Patches(ctx, sel, &v)
}
-func (ec *executionContext) marshalNParameter2ágithubácomáevergreenáciáevergreenárestámodeláAPIParameterá(ctx context.Context, sel ast.SelectionSet, v []model.APIParameter) graphql.Marshaler {
- ret := make(graphql.Array, len(v))
- var wg sync.WaitGroup
- isLen1 := len(v) == 1
- if !isLen1 {
- wg.Add(len(v))
- }
- for i := range v {
- i := i
- fc := &graphql.FieldContext{
- Index: &i,
- Result: &v[i],
- }
- ctx := graphql.WithFieldContext(ctx, fc)
- f := func(i int) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = nil
- }
- }()
- if !isLen1 {
- defer wg.Done()
- }
- ret[i] = ec.marshalNParameter2githubácomáevergreenáciáevergreenárestámodeláAPIParameter(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
-
- }
- wg.Wait()
-
- for _, e := range ret {
- if e == graphql.Null {
- return graphql.Null
+func (ec *executionContext) marshalNPatches2ágithubácomáevergreenáciáevergreenágraphqláPatches(ctx context.Context, sel ast.SelectionSet, v *Patches) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
+ return graphql.Null
}
-
- return ret
+ return ec._Patches(ctx, sel, v)
}
-func (ec *executionContext) marshalNPatch2githubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx context.Context, sel ast.SelectionSet, v model.APIPatch) graphql.Marshaler {
- return ec._Patch(ctx, sel, &v)
+func (ec *executionContext) unmarshalNPatchesInput2githubácomáevergreenáciáevergreenágraphqláPatchesInput(ctx context.Context, v interface{}) (PatchesInput, error) {
+ res, err := ec.unmarshalInputPatchesInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalNPatch2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchá(ctx context.Context, sel ast.SelectionSet, v []*model.APIPatch) graphql.Marshaler {
- ret := make(graphql.Array, len(v))
- var wg sync.WaitGroup
- isLen1 := len(v) == 1
- if !isLen1 {
- wg.Add(len(v))
- }
- for i := range v {
- i := i
- fc := &graphql.FieldContext{
- Index: &i,
- Result: &v[i],
- }
- ctx := graphql.WithFieldContext(ctx, fc)
- f := func(i int) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = nil
- }
- }()
- if !isLen1 {
- defer wg.Done()
- }
- ret[i] = ec.marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
-
- }
- wg.Wait()
+func (ec *executionContext) marshalNPeriodicBuild2githubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinition(ctx context.Context, sel ast.SelectionSet, v model.APIPeriodicBuildDefinition) graphql.Marshaler {
+ return ec._PeriodicBuild(ctx, sel, &v)
+}
- for _, e := range ret {
- if e == graphql.Null {
- return graphql.Null
- }
- }
+func (ec *executionContext) unmarshalNPeriodicBuildInput2githubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinition(ctx context.Context, v interface{}) (model.APIPeriodicBuildDefinition, error) {
+ res, err := ec.unmarshalInputPeriodicBuildInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
- return ret
+func (ec *executionContext) marshalNPermissions2githubácomáevergreenáciáevergreenágraphqláPermissions(ctx context.Context, sel ast.SelectionSet, v Permissions) graphql.Marshaler {
+ return ec._Permissions(ctx, sel, &v)
}
-func (ec *executionContext) marshalNPatch2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatch(ctx context.Context, sel ast.SelectionSet, v *model.APIPatch) graphql.Marshaler {
+func (ec *executionContext) marshalNPermissions2ágithubácomáevergreenáciáevergreenágraphqláPermissions(ctx context.Context, sel ast.SelectionSet, v *Permissions) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
- return ec._Patch(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalNPatchConfigure2githubácomáevergreenáciáevergreenágraphqláPatchConfigure(ctx context.Context, v interface{}) (PatchConfigure, error) {
- res, err := ec.unmarshalInputPatchConfigure(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
+ return ec._Permissions(ctx, sel, v)
}
-func (ec *executionContext) marshalNPatchTasks2githubácomáevergreenáciáevergreenágraphqláPatchTasks(ctx context.Context, sel ast.SelectionSet, v PatchTasks) graphql.Marshaler {
- return ec._PatchTasks(ctx, sel, &v)
+func (ec *executionContext) marshalNPod2githubácomáevergreenáciáevergreenárestámodeláAPIPod(ctx context.Context, sel ast.SelectionSet, v model.APIPod) graphql.Marshaler {
+ return ec._Pod(ctx, sel, &v)
}
-func (ec *executionContext) marshalNPatchTasks2ágithubácomáevergreenáciáevergreenágraphqláPatchTasks(ctx context.Context, sel ast.SelectionSet, v *PatchTasks) graphql.Marshaler {
+func (ec *executionContext) marshalNPod2ágithubácomáevergreenáciáevergreenárestámodeláAPIPod(ctx context.Context, sel ast.SelectionSet, v *model.APIPod) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
- return ec._PatchTasks(ctx, sel, v)
+ return ec._Pod(ctx, sel, v)
}
-func (ec *executionContext) marshalNPatchTriggerAlias2githubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx context.Context, sel ast.SelectionSet, v model.APIPatchTriggerDefinition) graphql.Marshaler {
- return ec._PatchTriggerAlias(ctx, sel, &v)
+func (ec *executionContext) marshalNPodEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláPodAPIEventData(ctx context.Context, sel ast.SelectionSet, v *model.PodAPIEventData) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._PodEventLogData(ctx, sel, v)
}
-func (ec *executionContext) marshalNPatchTriggerAlias2áágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinitioná(ctx context.Context, sel ast.SelectionSet, v []*model.APIPatchTriggerDefinition) graphql.Marshaler {
+func (ec *executionContext) marshalNPodEventLogEntry2áágithubácomáevergreenáciáevergreenárestámodeláPodAPIEventLogEntryá(ctx context.Context, sel ast.SelectionSet, v []*model.PodAPIEventLogEntry) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@@ -50966,7 +74248,7 @@ func (ec *executionContext) marshalNPatchTriggerAlias2áágithubácomáeverg
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx, sel, v[i])
+ ret[i] = ec.marshalNPodEventLogEntry2ágithubácomáevergreenáciáevergreenárestámodeláPodAPIEventLogEntry(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -50986,61 +74268,28 @@ func (ec *executionContext) marshalNPatchTriggerAlias2áágithubácomáeverg
return ret
}
-func (ec *executionContext) marshalNPatchTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx context.Context, sel ast.SelectionSet, v *model.APIPatchTriggerDefinition) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- return ec._PatchTriggerAlias(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalNPatchTriggerAliasInput2githubácomáevergreenáciáevergreenárestámodeláAPIPatchTriggerDefinition(ctx context.Context, v interface{}) (model.APIPatchTriggerDefinition, error) {
- res, err := ec.unmarshalInputPatchTriggerAliasInput(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
-}
-
-func (ec *executionContext) marshalNPatches2githubácomáevergreenáciáevergreenágraphqláPatches(ctx context.Context, sel ast.SelectionSet, v Patches) graphql.Marshaler {
- return ec._Patches(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNPatches2ágithubácomáevergreenáciáevergreenágraphqláPatches(ctx context.Context, sel ast.SelectionSet, v *Patches) graphql.Marshaler {
+func (ec *executionContext) marshalNPodEventLogEntry2ágithubácomáevergreenáciáevergreenárestámodeláPodAPIEventLogEntry(ctx context.Context, sel ast.SelectionSet, v *model.PodAPIEventLogEntry) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
- return ec._Patches(ctx, sel, v)
-}
-
-func (ec *executionContext) unmarshalNPatchesInput2githubácomáevergreenáciáevergreenágraphqláPatchesInput(ctx context.Context, v interface{}) (PatchesInput, error) {
- res, err := ec.unmarshalInputPatchesInput(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
-}
-
-func (ec *executionContext) marshalNPeriodicBuild2githubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinition(ctx context.Context, sel ast.SelectionSet, v model.APIPeriodicBuildDefinition) graphql.Marshaler {
- return ec._PeriodicBuild(ctx, sel, &v)
-}
-
-func (ec *executionContext) unmarshalNPeriodicBuildInput2githubácomáevergreenáciáevergreenárestámodeláAPIPeriodicBuildDefinition(ctx context.Context, v interface{}) (model.APIPeriodicBuildDefinition, error) {
- res, err := ec.unmarshalInputPeriodicBuildInput(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
+ return ec._PodEventLogEntry(ctx, sel, v)
}
-func (ec *executionContext) marshalNPermissions2githubácomáevergreenáciáevergreenágraphqláPermissions(ctx context.Context, sel ast.SelectionSet, v Permissions) graphql.Marshaler {
- return ec._Permissions(ctx, sel, &v)
+func (ec *executionContext) marshalNPodEvents2githubácomáevergreenáciáevergreenágraphqláPodEvents(ctx context.Context, sel ast.SelectionSet, v PodEvents) graphql.Marshaler {
+ return ec._PodEvents(ctx, sel, &v)
}
-func (ec *executionContext) marshalNPermissions2ágithubácomáevergreenáciáevergreenágraphqláPermissions(ctx context.Context, sel ast.SelectionSet, v *Permissions) graphql.Marshaler {
+func (ec *executionContext) marshalNPodEvents2ágithubácomáevergreenáciáevergreenágraphqláPodEvents(ctx context.Context, sel ast.SelectionSet, v *PodEvents) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
- return ec._Permissions(ctx, sel, v)
+ return ec._PodEvents(ctx, sel, v)
}
func (ec *executionContext) marshalNProject2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx context.Context, sel ast.SelectionSet, v model.APIProjectRef) graphql.Marshaler {
@@ -51094,7 +74343,7 @@ func (ec *executionContext) marshalNProject2áágithubácomáevergreenáci
func (ec *executionContext) marshalNProject2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx context.Context, sel ast.SelectionSet, v *model.APIProjectRef) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51108,7 +74357,7 @@ func (ec *executionContext) marshalNProjectAlias2githubácomáevergreenáci
func (ec *executionContext) marshalNProjectAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectAlias(ctx context.Context, sel ast.SelectionSet, v *model.APIProjectAlias) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51167,7 +74416,7 @@ func (ec *executionContext) marshalNProjectBuildVariant2áágithubácomáeve
func (ec *executionContext) marshalNProjectBuildVariant2ágithubácomáevergreenáciáevergreenágraphqláProjectBuildVariant(ctx context.Context, sel ast.SelectionSet, v *ProjectBuildVariant) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51221,7 +74470,7 @@ func (ec *executionContext) marshalNProjectEventLogEntry2áágithubácomáev
func (ec *executionContext) marshalNProjectEventLogEntry2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectEvent(ctx context.Context, sel ast.SelectionSet, v *model.APIProjectEvent) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51235,7 +74484,7 @@ func (ec *executionContext) marshalNProjectEvents2githubácomáevergreenáci
func (ec *executionContext) marshalNProjectEvents2ágithubácomáevergreenáciáevergreenágraphqláProjectEvents(ctx context.Context, sel ast.SelectionSet, v *ProjectEvents) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51249,7 +74498,7 @@ func (ec *executionContext) marshalNProjectSettings2githubácomáevergreenác
func (ec *executionContext) marshalNProjectSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx context.Context, sel ast.SelectionSet, v *model.APIProjectSettings) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51283,7 +74532,7 @@ func (ec *executionContext) marshalNProjectSubscription2githubácomáevergreen
func (ec *executionContext) marshalNProjectSubscription2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscription(ctx context.Context, sel ast.SelectionSet, v *model.APISubscription) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51337,7 +74586,7 @@ func (ec *executionContext) marshalNPublicKey2áágithubácomáevergreenác
func (ec *executionContext) marshalNPublicKey2ágithubácomáevergreenáciáevergreenárestámodeláAPIPubKey(ctx context.Context, sel ast.SelectionSet, v *model.APIPubKey) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51365,7 +74614,7 @@ func (ec *executionContext) marshalNRepoSettings2githubácomáevergreenáci
func (ec *executionContext) marshalNRepoSettings2ágithubácomáevergreenáciáevergreenárestámodeláAPIProjectSettings(ctx context.Context, sel ast.SelectionSet, v *model.APIProjectSettings) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51446,11 +74695,7 @@ func (ec *executionContext) unmarshalNSelectorInput2githubácomáevergreenác
func (ec *executionContext) unmarshalNSelectorInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISelectorá(ctx context.Context, v interface{}) ([]model.APISelector, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APISelector, len(vSlice))
@@ -51482,7 +74727,7 @@ func (ec *executionContext) unmarshalNSortOrder2ágithubácomáevergreenáci
func (ec *executionContext) marshalNSource2ágithubácomáevergreenáciáevergreenárestámodeláAPISource(ctx context.Context, sel ast.SelectionSet, v *model.APISource) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51492,7 +74737,7 @@ func (ec *executionContext) marshalNSource2ágithubácomáevergreenáciáev
func (ec *executionContext) marshalNSpawnHostConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPISpawnHostConfig(ctx context.Context, sel ast.SelectionSet, v *model.APISpawnHostConfig) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51565,7 +74810,7 @@ func (ec *executionContext) marshalNStatusCount2áágithubácomáevergreen
func (ec *executionContext) marshalNStatusCount2ágithubácomáevergreenáciáevergreenámodelátaskáStatusCount(ctx context.Context, sel ast.SelectionSet, v *task.StatusCount) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51581,7 +74826,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -51590,11 +74835,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
func (ec *executionContext) unmarshalNString2ástringá(ctx context.Context, v interface{}) ([]string, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]string, len(vSlice))
@@ -51626,11 +74867,7 @@ func (ec *executionContext) marshalNString2ástringá(ctx context.Context, sel
func (ec *executionContext) unmarshalNString2áástringá(ctx context.Context, v interface{}) ([]*string, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*string, len(vSlice))
@@ -51667,14 +74904,14 @@ func (ec *executionContext) unmarshalNString2ástring(ctx context.Context, v in
func (ec *executionContext) marshalNString2ástring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalString(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -51688,14 +74925,14 @@ func (ec *executionContext) unmarshalNStringMap2map(ctx context.Context, v inter
func (ec *executionContext) marshalNStringMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]string) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := MarshalStringMap(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -51708,7 +74945,7 @@ func (ec *executionContext) marshalNSubscriber2githubácomáevergreenáciáe
func (ec *executionContext) marshalNSubscriber2ágithubácomáevergreenáciáevergreenágraphqláSubscriber(ctx context.Context, sel ast.SelectionSet, v *Subscriber) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51776,7 +75013,7 @@ func (ec *executionContext) marshalNTask2áágithubácomáevergreenáciáe
func (ec *executionContext) marshalNTask2ágithubácomáevergreenáciáevergreenárestámodeláAPITask(ctx context.Context, sel ast.SelectionSet, v *model.APITask) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51787,10 +75024,14 @@ func (ec *executionContext) marshalNTaskAnnotationSettings2githubácomáevergr
return ec._TaskAnnotationSettings(ctx, sel, &v)
}
+func (ec *executionContext) marshalNTaskContainerCreationOpts2githubácomáevergreenáciáevergreenárestámodeláAPIPodTaskContainerCreationOptions(ctx context.Context, sel ast.SelectionSet, v model.APIPodTaskContainerCreationOptions) graphql.Marshaler {
+ return ec._TaskContainerCreationOpts(ctx, sel, &v)
+}
+
func (ec *executionContext) marshalNTaskEventLogData2ágithubácomáevergreenáciáevergreenárestámodeláTaskEventData(ctx context.Context, sel ast.SelectionSet, v *model.TaskEventData) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51844,7 +75085,7 @@ func (ec *executionContext) marshalNTaskEventLogEntry2áágithubácomáeverg
func (ec *executionContext) marshalNTaskEventLogEntry2ágithubácomáevergreenáciáevergreenárestámodeláTaskAPIEventLogEntry(ctx context.Context, sel ast.SelectionSet, v *model.TaskAPIEventLogEntry) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51858,13 +75099,18 @@ func (ec *executionContext) marshalNTaskFiles2githubácomáevergreenáciáev
func (ec *executionContext) marshalNTaskFiles2ágithubácomáevergreenáciáevergreenágraphqláTaskFiles(ctx context.Context, sel ast.SelectionSet, v *TaskFiles) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._TaskFiles(ctx, sel, v)
}
+func (ec *executionContext) unmarshalNTaskFilterOptions2githubácomáevergreenáciáevergreenágraphqláTaskFilterOptions(ctx context.Context, v interface{}) (TaskFilterOptions, error) {
+ res, err := ec.unmarshalInputTaskFilterOptions(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) marshalNTaskLogLinks2githubácomáevergreenáciáevergreenárestámodeláLogLinks(ctx context.Context, sel ast.SelectionSet, v model.LogLinks) graphql.Marshaler {
return ec._TaskLogLinks(ctx, sel, &v)
}
@@ -51876,7 +75122,7 @@ func (ec *executionContext) marshalNTaskLogs2githubácomáevergreenáciáeve
func (ec *executionContext) marshalNTaskLogs2ágithubácomáevergreenáciáevergreenágraphqláTaskLogs(ctx context.Context, sel ast.SelectionSet, v *TaskLogs) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51930,7 +75176,7 @@ func (ec *executionContext) marshalNTaskQueueDistro2áágithubácomáevergre
func (ec *executionContext) marshalNTaskQueueDistro2ágithubácomáevergreenáciáevergreenágraphqláTaskQueueDistro(ctx context.Context, sel ast.SelectionSet, v *TaskQueueDistro) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -51984,7 +75230,7 @@ func (ec *executionContext) marshalNTaskQueueItem2áágithubácomáevergreen
func (ec *executionContext) marshalNTaskQueueItem2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskQueueItem(ctx context.Context, sel ast.SelectionSet, v *model.APITaskQueueItem) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52023,11 +75269,7 @@ func (ec *executionContext) unmarshalNTaskSpecifierInput2githubácomáevergree
func (ec *executionContext) unmarshalNTaskSpecifierInput2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskSpecifierá(ctx context.Context, v interface{}) ([]model.APITaskSpecifier, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APITaskSpecifier, len(vSlice))
@@ -52052,7 +75294,7 @@ func (ec *executionContext) marshalNTaskTestResult2githubácomáevergreenáci
func (ec *executionContext) marshalNTaskTestResult2ágithubácomáevergreenáciáevergreenágraphqláTaskTestResult(ctx context.Context, sel ast.SelectionSet, v *TaskTestResult) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52062,7 +75304,7 @@ func (ec *executionContext) marshalNTaskTestResult2ágithubácomáevergreen
func (ec *executionContext) marshalNTaskTestResultSample2ágithubácomáevergreenáciáevergreenágraphqláTaskTestResultSample(ctx context.Context, sel ast.SelectionSet, v *TaskTestResultSample) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52072,11 +75314,7 @@ func (ec *executionContext) marshalNTaskTestResultSample2ágithubácomáeverg
func (ec *executionContext) unmarshalNTestFilter2áágithubácomáevergreenáciáevergreenágraphqláTestFilterá(ctx context.Context, v interface{}) ([]*TestFilter, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*TestFilter, len(vSlice))
@@ -52146,17 +75384,32 @@ func (ec *executionContext) marshalNTestResult2áágithubácomáevergreená
func (ec *executionContext) marshalNTestResult2ágithubácomáevergreenáciáevergreenárestámodeláAPITest(ctx context.Context, sel ast.SelectionSet, v *model.APITest) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._TestResult(ctx, sel, v)
}
+func (ec *executionContext) unmarshalNTestSortCategory2githubácomáevergreenáciáevergreenágraphqláTestSortCategory(ctx context.Context, v interface{}) (TestSortCategory, error) {
+ var res TestSortCategory
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNTestSortCategory2githubácomáevergreenáciáevergreenágraphqláTestSortCategory(ctx context.Context, sel ast.SelectionSet, v TestSortCategory) graphql.Marshaler {
+ return v
+}
+
+func (ec *executionContext) unmarshalNTestSortOptions2ágithubácomáevergreenáciáevergreenágraphqláTestSortOptions(ctx context.Context, v interface{}) (*TestSortOptions, error) {
+ res, err := ec.unmarshalInputTestSortOptions(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) marshalNTicketFields2ágithubácomáevergreenáciáevergreenáthirdpartyáTicketFields(ctx context.Context, sel ast.SelectionSet, v *thirdparty.TicketFields) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52171,14 +75424,14 @@ func (ec *executionContext) unmarshalNTime2átimeáTime(ctx context.Context, v
func (ec *executionContext) marshalNTime2átimeáTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalTime(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -52249,7 +75502,7 @@ func (ec *executionContext) marshalNUser2githubácomáevergreenáciáevergre
func (ec *executionContext) marshalNUser2ágithubácomáevergreenáciáevergreenárestámodeláAPIDBUser(ctx context.Context, sel ast.SelectionSet, v *model.APIDBUser) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52345,11 +75598,7 @@ func (ec *executionContext) marshalNVariantTask2ágithubácomáevergreenáci
func (ec *executionContext) unmarshalNVariantTasks2áágithubácomáevergreenáciáevergreenágraphqláVariantTasksá(ctx context.Context, v interface{}) ([]*VariantTasks, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*VariantTasks, len(vSlice))
@@ -52375,21 +75624,31 @@ func (ec *executionContext) marshalNVersion2githubácomáevergreenáciáever
func (ec *executionContext) marshalNVersion2ágithubácomáevergreenáciáevergreenárestámodeláAPIVersion(ctx context.Context, sel ast.SelectionSet, v *model.APIVersion) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._Version(ctx, sel, v)
}
+func (ec *executionContext) marshalNVersionTasks2githubácomáevergreenáciáevergreenágraphqláVersionTasks(ctx context.Context, sel ast.SelectionSet, v VersionTasks) graphql.Marshaler {
+ return ec._VersionTasks(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNVersionTasks2ágithubácomáevergreenáciáevergreenágraphqláVersionTasks(ctx context.Context, sel ast.SelectionSet, v *VersionTasks) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._VersionTasks(ctx, sel, v)
+}
+
func (ec *executionContext) unmarshalNVersionToRestart2áágithubácomáevergreenáciáevergreenámodeláVersionToRestartá(ctx context.Context, v interface{}) ([]*model1.VersionToRestart, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*model1.VersionToRestart, len(vSlice))
@@ -52455,7 +75714,7 @@ func (ec *executionContext) marshalNVolume2áágithubácomáevergreenáci
func (ec *executionContext) marshalNVolume2ágithubácomáevergreenáciáevergreenárestámodeláAPIVolume(ctx context.Context, sel ast.SelectionSet, v *model.APIVolume) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52509,6 +75768,23 @@ func (ec *executionContext) marshalNWebhookHeader2ágithubácomáevergreená
return ret
}
+func (ec *executionContext) unmarshalNWebhookHeaderInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookHeader(ctx context.Context, v interface{}) ([]model.APIWebhookHeader, error) {
+ var vSlice []interface{}
+ if v != nil {
+ vSlice = graphql.CoerceList(v)
+ }
+ var err error
+ res := make([]model.APIWebhookHeader, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalOWebhookHeaderInput2githubácomáevergreenáciáevergreenárestámodeláAPIWebhookHeader(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
func (ec *executionContext) marshalNWorkstationConfig2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx context.Context, sel ast.SelectionSet, v model.APIWorkstationConfig) graphql.Marshaler {
return ec._WorkstationConfig(ctx, sel, &v)
}
@@ -52579,7 +75855,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -52588,11 +75864,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte
func (ec *executionContext) unmarshalN__DirectiveLocation2ástringá(ctx context.Context, v interface{}) ([]string, error) {
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]string, len(vSlice))
@@ -52757,7 +76029,7 @@ func (ec *executionContext) marshalN__Type2ágithubácomá99designságqlgen
func (ec *executionContext) marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -52773,7 +76045,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -52786,25 +76058,25 @@ func (ec *executionContext) marshalOAWSConfig2ágithubácomáevergreenáci
return ec._AWSConfig(ctx, sel, v)
}
-func (ec *executionContext) marshalOAbortInfo2ágithubácomáevergreenáciáevergreenágraphqláAbortInfo(ctx context.Context, sel ast.SelectionSet, v *AbortInfo) graphql.Marshaler {
+func (ec *executionContext) marshalOAWSPodConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIAWSPodConfig(ctx context.Context, sel ast.SelectionSet, v *model.APIAWSPodConfig) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- return ec._AbortInfo(ctx, sel, v)
+ return ec._AWSPodConfig(ctx, sel, v)
}
-func (ec *executionContext) marshalOAnnotation2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotation(ctx context.Context, sel ast.SelectionSet, v *model.APITaskAnnotation) graphql.Marshaler {
+func (ec *executionContext) marshalOAbortInfo2ágithubácomáevergreenáciáevergreenágraphqláAbortInfo(ctx context.Context, sel ast.SelectionSet, v *AbortInfo) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- return ec._Annotation(ctx, sel, v)
+ return ec._AbortInfo(ctx, sel, v)
}
-func (ec *executionContext) marshalOBaseTaskResult2ágithubácomáevergreenáciáevergreenágraphqláBaseTaskResult(ctx context.Context, sel ast.SelectionSet, v *BaseTaskResult) graphql.Marshaler {
+func (ec *executionContext) marshalOAnnotation2ágithubácomáevergreenáciáevergreenárestámodeláAPITaskAnnotation(ctx context.Context, sel ast.SelectionSet, v *model.APITaskAnnotation) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- return ec._BaseTaskResult(ctx, sel, v)
+ return ec._Annotation(ctx, sel, v)
}
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
@@ -52813,7 +76085,8 @@ func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interf
}
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
- return graphql.MarshalBoolean(v)
+ res := graphql.MarshalBoolean(v)
+ return res
}
func (ec *executionContext) unmarshalOBoolean2ábool(ctx context.Context, v interface{}) (*bool, error) {
@@ -52828,7 +76101,8 @@ func (ec *executionContext) marshalOBoolean2ábool(ctx context.Context, sel ast
if v == nil {
return graphql.Null
}
- return graphql.MarshalBoolean(*v)
+ res := graphql.MarshalBoolean(*v)
+ return res
}
func (ec *executionContext) unmarshalOBuildBaronSettingsInput2githubácomáevergreenáciáevergreenárestámodeláAPIBuildBaronSettings(ctx context.Context, v interface{}) (model.APIBuildBaronSettings, error) {
@@ -53027,7 +76301,225 @@ func (ec *executionContext) marshalOCommitQueueItem2ágithubácomáevergreen
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNCommitQueueItem2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueItem(ctx, sel, v[i])
+ ret[i] = ec.marshalNCommitQueueItem2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueItem(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) unmarshalOCommitQueueParamsInput2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx context.Context, v interface{}) (model.APICommitQueueParams, error) {
+ res, err := ec.unmarshalInputCommitQueueParamsInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOContainerResources2ágithubácomáevergreenáciáevergreenárestámodeláAPIContainerResourcesá(ctx context.Context, sel ast.SelectionSet, v []model.APIContainerResources) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNContainerResources2githubácomáevergreenáciáevergreenárestámodeláAPIContainerResources(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) unmarshalOContainerResourcesInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIContainerResourcesá(ctx context.Context, v interface{}) ([]model.APIContainerResources, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var vSlice []interface{}
+ if v != nil {
+ vSlice = graphql.CoerceList(v)
+ }
+ var err error
+ res := make([]model.APIContainerResources, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNContainerResourcesInput2githubácomáevergreenáciáevergreenárestámodeláAPIContainerResources(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) marshalODependency2áágithubácomáevergreenáciáevergreenágraphqláDependencyá(ctx context.Context, sel ast.SelectionSet, v []*Dependency) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNDependency2ágithubácomáevergreenáciáevergreenágraphqláDependency(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalODistro2ágithubácomáevergreenáciáevergreenárestámodeláAPIDistro(ctx context.Context, sel ast.SelectionSet, v *model.APIDistro) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Distro(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalODistroInfo2githubácomáevergreenáciáevergreenárestámodeláDistroInfo(ctx context.Context, sel ast.SelectionSet, v model.DistroInfo) graphql.Marshaler {
+ return ec._DistroInfo(ctx, sel, &v)
+}
+
+func (ec *executionContext) unmarshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, v interface{}) (model.APIDuration, error) {
+ res, err := model.UnmarshalAPIDuration(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, sel ast.SelectionSet, v model.APIDuration) graphql.Marshaler {
+ res := model.MarshalAPIDuration(v)
+ return res
+}
+
+func (ec *executionContext) unmarshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, v interface{}) (*model.APIDuration, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := model.UnmarshalAPIDuration(v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, sel ast.SelectionSet, v *model.APIDuration) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ res := model.MarshalAPIDuration(*v)
+ return res
+}
+
+func (ec *executionContext) marshalOECSConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPIECSConfig(ctx context.Context, sel ast.SelectionSet, v *model.APIECSConfig) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._ECSConfig(ctx, sel, v)
+}
+
+func (ec *executionContext) unmarshalOEditSpawnHostInput2ágithubácomáevergreenáciáevergreenágraphqláEditSpawnHostInput(ctx context.Context, v interface{}) (*EditSpawnHostInput, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputEditSpawnHostInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalOExternalLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIExternalLinká(ctx context.Context, sel ast.SelectionSet, v []model.APIExternalLink) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNExternalLink2githubácomáevergreenáciáevergreenárestámodeláAPIExternalLink(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -53047,12 +76539,27 @@ func (ec *executionContext) marshalOCommitQueueItem2ágithubácomáevergreen
return ret
}
-func (ec *executionContext) unmarshalOCommitQueueParamsInput2githubácomáevergreenáciáevergreenárestámodeláAPICommitQueueParams(ctx context.Context, v interface{}) (model.APICommitQueueParams, error) {
- res, err := ec.unmarshalInputCommitQueueParamsInput(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
+func (ec *executionContext) unmarshalOExternalLinkInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIExternalLinká(ctx context.Context, v interface{}) ([]model.APIExternalLink, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var vSlice []interface{}
+ if v != nil {
+ vSlice = graphql.CoerceList(v)
+ }
+ var err error
+ res := make([]model.APIExternalLink, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNExternalLinkInput2githubácomáevergreenáciáevergreenárestámodeláAPIExternalLink(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
}
-func (ec *executionContext) marshalODependency2áágithubácomáevergreenáciáevergreenágraphqláDependencyá(ctx context.Context, sel ast.SelectionSet, v []*Dependency) graphql.Marshaler {
+func (ec *executionContext) marshalOFile2áágithubácomáevergreenáciáevergreenárestámodeláAPIFileá(ctx context.Context, sel ast.SelectionSet, v []*model.APIFile) graphql.Marshaler {
if v == nil {
return graphql.Null
}
@@ -53079,7 +76586,7 @@ func (ec *executionContext) marshalODependency2áágithubácomáevergreená
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNDependency2ágithubácomáevergreenáciáevergreenágraphqláDependency(ctx, sel, v[i])
+ ret[i] = ec.marshalNFile2ágithubácomáevergreenáciáevergreenárestámodeláAPIFile(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -53099,50 +76606,33 @@ func (ec *executionContext) marshalODependency2áágithubácomáevergreená
return ret
}
-func (ec *executionContext) marshalODistro2ágithubácomáevergreenáciáevergreenárestámodeláAPIDistro(ctx context.Context, sel ast.SelectionSet, v *model.APIDistro) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return ec._Distro(ctx, sel, v)
-}
-
-func (ec *executionContext) marshalODistroInfo2githubácomáevergreenáciáevergreenárestámodeláDistroInfo(ctx context.Context, sel ast.SelectionSet, v model.DistroInfo) graphql.Marshaler {
- return ec._DistroInfo(ctx, sel, &v)
-}
-
-func (ec *executionContext) unmarshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, v interface{}) (model.APIDuration, error) {
- res, err := model.UnmarshalAPIDuration(v)
+func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) {
+ res, err := graphql.UnmarshalFloatContext(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalODuration2githubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, sel ast.SelectionSet, v model.APIDuration) graphql.Marshaler {
- return model.MarshalAPIDuration(v)
+func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
+ res := graphql.MarshalFloatContext(v)
+ return graphql.WrapContextMarshaler(ctx, res)
}
-func (ec *executionContext) unmarshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, v interface{}) (*model.APIDuration, error) {
+func (ec *executionContext) unmarshalOFloat2áfloat64(ctx context.Context, v interface{}) (*float64, error) {
if v == nil {
return nil, nil
}
- res, err := model.UnmarshalAPIDuration(v)
+ res, err := graphql.UnmarshalFloatContext(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalODuration2ágithubácomáevergreenáciáevergreenárestámodeláAPIDuration(ctx context.Context, sel ast.SelectionSet, v *model.APIDuration) graphql.Marshaler {
+func (ec *executionContext) marshalOFloat2áfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
if v == nil {
return graphql.Null
}
- return model.MarshalAPIDuration(*v)
+ res := graphql.MarshalFloatContext(*v)
+ return graphql.WrapContextMarshaler(ctx, res)
}
-func (ec *executionContext) unmarshalOEditSpawnHostInput2ágithubácomáevergreenáciáevergreenágraphqláEditSpawnHostInput(ctx context.Context, v interface{}) (*EditSpawnHostInput, error) {
- if v == nil {
- return nil, nil
- }
- res, err := ec.unmarshalInputEditSpawnHostInput(ctx, v)
- return &res, graphql.ErrorOnPath(ctx, err)
-}
-
-func (ec *executionContext) marshalOFile2áágithubácomáevergreenáciáevergreenárestámodeláAPIFileá(ctx context.Context, sel ast.SelectionSet, v []*model.APIFile) graphql.Marshaler {
+func (ec *executionContext) marshalOGeneralSubscription2áágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx context.Context, sel ast.SelectionSet, v []*model.APISubscription) graphql.Marshaler {
if v == nil {
return graphql.Null
}
@@ -53169,7 +76659,7 @@ func (ec *executionContext) marshalOFile2áágithubácomáevergreenáciáe
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNFile2ágithubácomáevergreenáciáevergreenárestámodeláAPIFile(ctx, sel, v[i])
+ ret[i] = ec.marshalNGeneralSubscription2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscription(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -53189,30 +76679,6 @@ func (ec *executionContext) marshalOFile2áágithubácomáevergreenáciáe
return ret
}
-func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) {
- res, err := graphql.UnmarshalFloat(v)
- return res, graphql.ErrorOnPath(ctx, err)
-}
-
-func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
- return graphql.MarshalFloat(v)
-}
-
-func (ec *executionContext) unmarshalOFloat2áfloat64(ctx context.Context, v interface{}) (*float64, error) {
- if v == nil {
- return nil, nil
- }
- res, err := graphql.UnmarshalFloat(v)
- return &res, graphql.ErrorOnPath(ctx, err)
-}
-
-func (ec *executionContext) marshalOFloat2áfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- return graphql.MarshalFloat(*v)
-}
-
func (ec *executionContext) marshalOGithubCheckSubscriber2ágithubácomáevergreenáciáevergreenárestámodeláAPIGithubCheckSubscriber(ctx context.Context, sel ast.SelectionSet, v *model.APIGithubCheckSubscriber) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ -53379,7 +76845,8 @@ func (ec *executionContext) marshalOID2ástring(ctx context.Context, sel ast.Se
if v == nil {
return graphql.Null
}
- return graphql.MarshalID(*v)
+ res := graphql.MarshalID(*v)
+ return res
}
func (ec *executionContext) unmarshalOInstanceTagInput2áágithubácomáevergreenáciáevergreenámodeláhostáTagá(ctx context.Context, v interface{}) ([]*host.Tag, error) {
@@ -53388,11 +76855,7 @@ func (ec *executionContext) unmarshalOInstanceTagInput2áágithubácomáever
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*host.Tag, len(vSlice))
@@ -53412,7 +76875,8 @@ func (ec *executionContext) unmarshalOInt2int(ctx context.Context, v interface{}
}
func (ec *executionContext) marshalOInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
- return graphql.MarshalInt(v)
+ res := graphql.MarshalInt(v)
+ return res
}
func (ec *executionContext) unmarshalOInt2int64(ctx context.Context, v interface{}) (int64, error) {
@@ -53421,7 +76885,8 @@ func (ec *executionContext) unmarshalOInt2int64(ctx context.Context, v interface
}
func (ec *executionContext) marshalOInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler {
- return graphql.MarshalInt64(v)
+ res := graphql.MarshalInt64(v)
+ return res
}
func (ec *executionContext) unmarshalOInt2áint(ctx context.Context, v interface{}) ([]int, error) {
@@ -53430,11 +76895,7 @@ func (ec *executionContext) unmarshalOInt2áint(ctx context.Context, v interfac
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]int, len(vSlice))
@@ -53472,7 +76933,8 @@ func (ec *executionContext) marshalOInt2áint(ctx context.Context, sel ast.Sele
if v == nil {
return graphql.Null
}
- return graphql.MarshalInt(*v)
+ res := graphql.MarshalInt(*v)
+ return res
}
func (ec *executionContext) marshalOIssueLink2githubácomáevergreenáciáevergreenárestámodeláAPIIssueLink(ctx context.Context, sel ast.SelectionSet, v model.APIIssueLink) graphql.Marshaler {
@@ -53580,11 +77042,7 @@ func (ec *executionContext) unmarshalOJiraFieldInput2ágithubácomáevergreen
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APIJiraField, len(vSlice))
@@ -53605,6 +77063,14 @@ func (ec *executionContext) marshalOJiraIssueSubscriber2ágithubácomáevergr
return ec._JiraIssueSubscriber(ctx, sel, v)
}
+func (ec *executionContext) unmarshalOJiraIssueSubscriberInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIJIRAIssueSubscriber(ctx context.Context, v interface{}) (*model.APIJIRAIssueSubscriber, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputJiraIssueSubscriberInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) marshalOJiraTicket2ágithubácomáevergreenáciáevergreenáthirdpartyáJiraTicket(ctx context.Context, sel ast.SelectionSet, v *thirdparty.JiraTicket) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ -53638,7 +77104,53 @@ func (ec *executionContext) marshalOMap2map(ctx context.Context, sel ast.Selecti
if v == nil {
return graphql.Null
}
- return graphql.MarshalMap(v)
+ res := graphql.MarshalMap(v)
+ return res
+}
+
+func (ec *executionContext) marshalOMetadataLink2githubácomáevergreenáciáevergreenárestámodeláAPIMetadataLink(ctx context.Context, sel ast.SelectionSet, v model.APIMetadataLink) graphql.Marshaler {
+ return ec._MetadataLink(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalOMetadataLink2ágithubácomáevergreenáciáevergreenárestámodeláAPIMetadataLink(ctx context.Context, sel ast.SelectionSet, v []model.APIMetadataLink) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalOMetadataLink2githubácomáevergreenáciáevergreenárestámodeláAPIMetadataLink(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ return ret
}
func (ec *executionContext) marshalOModule2ágithubácomáevergreenáciáevergreenárestámodeláAPIModuleá(ctx context.Context, sel ast.SelectionSet, v []model.APIModule) graphql.Marshaler {
@@ -53716,11 +77228,7 @@ func (ec *executionContext) unmarshalOParameterInput2áágithubácomáevergr
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*model.APIParameter, len(vSlice))
@@ -53870,11 +77378,7 @@ func (ec *executionContext) unmarshalOPatchTriggerAliasInput2ágithubácomáe
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APIPatchTriggerDefinition, len(vSlice))
@@ -53941,11 +77445,7 @@ func (ec *executionContext) unmarshalOPeriodicBuildInput2ágithubácomáeverg
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APIPeriodicBuildDefinition, len(vSlice))
@@ -53959,6 +77459,13 @@ func (ec *executionContext) unmarshalOPeriodicBuildInput2ágithubácomáeverg
return res, nil
}
+func (ec *executionContext) marshalOPod2ágithubácomáevergreenáciáevergreenárestámodeláAPIPod(ctx context.Context, sel ast.SelectionSet, v *model.APIPod) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._Pod(ctx, sel, v)
+}
+
func (ec *executionContext) marshalOProject2githubácomáevergreenáciáevergreenárestámodeláAPIProjectRef(ctx context.Context, sel ast.SelectionSet, v model.APIProjectRef) graphql.Marshaler {
return ec._Project(ctx, sel, &v)
}
@@ -54070,11 +77577,7 @@ func (ec *executionContext) unmarshalOProjectAliasInput2ágithubácomáevergr
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APIProjectAlias, len(vSlice))
@@ -54088,6 +77591,15 @@ func (ec *executionContext) unmarshalOProjectAliasInput2ágithubácomáevergr
return res, nil
}
+func (ec *executionContext) marshalOProjectBanner2githubácomáevergreenáciáevergreenárestámodeláAPIProjectBanner(ctx context.Context, sel ast.SelectionSet, v model.APIProjectBanner) graphql.Marshaler {
+ return ec._ProjectBanner(ctx, sel, &v)
+}
+
+func (ec *executionContext) unmarshalOProjectBannerInput2githubácomáevergreenáciáevergreenárestámodeláAPIProjectBanner(ctx context.Context, v interface{}) (model.APIProjectBanner, error) {
+ res, err := ec.unmarshalInputProjectBannerInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) marshalOProjectEventSettings2githubácomáevergreenáciáevergreenárestámodeláAPIProjectEventSettings(ctx context.Context, sel ast.SelectionSet, v model.APIProjectEventSettings) graphql.Marshaler {
return ec._ProjectEventSettings(ctx, sel, &v)
}
@@ -54105,10 +77617,6 @@ func (ec *executionContext) unmarshalOProjectSettingsInput2ágithubácomáeve
return &res, graphql.ErrorOnPath(ctx, err)
}
-func (ec *executionContext) marshalOProjectSubscriber2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx context.Context, sel ast.SelectionSet, v model.APISubscriber) graphql.Marshaler {
- return ec._ProjectSubscriber(ctx, sel, &v)
-}
-
func (ec *executionContext) marshalOProjectSubscription2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx context.Context, sel ast.SelectionSet, v []model.APISubscription) graphql.Marshaler {
if v == nil {
return graphql.Null
@@ -54258,6 +77766,13 @@ func (ec *executionContext) marshalOSearchReturnInfo2ágithubácomáevergreen
return ec._SearchReturnInfo(ctx, sel, v)
}
+func (ec *executionContext) marshalOSlackConfig2ágithubácomáevergreenáciáevergreenárestámodeláAPISlackConfig(ctx context.Context, sel ast.SelectionSet, v *model.APISlackConfig) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._SlackConfig(ctx, sel, v)
+}
+
func (ec *executionContext) unmarshalOSortDirection2ágithubácomáevergreenáciáevergreenágraphqláSortDirection(ctx context.Context, v interface{}) (*SortDirection, error) {
if v == nil {
return nil, nil
@@ -54280,11 +77795,7 @@ func (ec *executionContext) unmarshalOSortOrder2áágithubácomáevergreen
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*SortOrder, len(vSlice))
@@ -54367,60 +77878,14 @@ func (ec *executionContext) marshalOStatusCount2ágithubácomáevergreenáci
return ret
}
-func (ec *executionContext) marshalOStatusCount2áágithubácomáevergreenáciáevergreenámodelátaskáStatusCountá(ctx context.Context, sel ast.SelectionSet, v []*task.StatusCount) graphql.Marshaler {
- if v == nil {
- return graphql.Null
- }
- ret := make(graphql.Array, len(v))
- var wg sync.WaitGroup
- isLen1 := len(v) == 1
- if !isLen1 {
- wg.Add(len(v))
- }
- for i := range v {
- i := i
- fc := &graphql.FieldContext{
- Index: &i,
- Result: &v[i],
- }
- ctx := graphql.WithFieldContext(ctx, fc)
- f := func(i int) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = nil
- }
- }()
- if !isLen1 {
- defer wg.Done()
- }
- ret[i] = ec.marshalNStatusCount2ágithubácomáevergreenáciáevergreenámodelátaskáStatusCount(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
-
- }
- wg.Wait()
-
- for _, e := range ret {
- if e == graphql.Null {
- return graphql.Null
- }
- }
-
- return ret
-}
-
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
res, err := graphql.UnmarshalString(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
- return graphql.MarshalString(v)
+ res := graphql.MarshalString(v)
+ return res
}
func (ec *executionContext) unmarshalOString2ástring(ctx context.Context, v interface{}) ([]string, error) {
@@ -54429,11 +77894,7 @@ func (ec *executionContext) unmarshalOString2ástring(ctx context.Context, v in
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]string, len(vSlice))
@@ -54465,11 +77926,7 @@ func (ec *executionContext) unmarshalOString2ástringá(ctx context.Context, v
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]string, len(vSlice))
@@ -54507,11 +77964,7 @@ func (ec *executionContext) unmarshalOString2áástring(ctx context.Context, v
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*string, len(vSlice))
@@ -54543,11 +77996,7 @@ func (ec *executionContext) unmarshalOString2áástringá(ctx context.Context
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]*string, len(vSlice))
@@ -54591,7 +78040,8 @@ func (ec *executionContext) marshalOString2ástring(ctx context.Context, sel as
if v == nil {
return graphql.Null
}
- return graphql.MarshalString(*v)
+ res := graphql.MarshalString(*v)
+ return res
}
func (ec *executionContext) unmarshalOStringMap2map(ctx context.Context, v interface{}) (map[string]string, error) {
@@ -54606,7 +78056,12 @@ func (ec *executionContext) marshalOStringMap2map(ctx context.Context, sel ast.S
if v == nil {
return graphql.Null
}
- return MarshalStringMap(v)
+ res := MarshalStringMap(v)
+ return res
+}
+
+func (ec *executionContext) marshalOSubscriberWrapper2githubácomáevergreenáciáevergreenárestámodeláAPISubscriber(ctx context.Context, sel ast.SelectionSet, v model.APISubscriber) graphql.Marshaler {
+ return ec._SubscriberWrapper(ctx, sel, &v)
}
func (ec *executionContext) unmarshalOSubscriptionInput2ágithubácomáevergreenáciáevergreenárestámodeláAPISubscriptioná(ctx context.Context, v interface{}) ([]model.APISubscription, error) {
@@ -54615,11 +78070,7 @@ func (ec *executionContext) unmarshalOSubscriptionInput2ágithubácomáevergr
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APISubscription, len(vSlice))
@@ -54847,6 +78298,14 @@ func (ec *executionContext) marshalOTaskTestResultSample2áágithubácomáev
return ret
}
+func (ec *executionContext) unmarshalOTestFilterOptions2ágithubácomáevergreenáciáevergreenágraphqláTestFilterOptions(ctx context.Context, v interface{}) (*TestFilterOptions, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputTestFilterOptions(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) unmarshalOTestSortCategory2ágithubácomáevergreenáciáevergreenágraphqláTestSortCategory(ctx context.Context, v interface{}) (*TestSortCategory, error) {
if v == nil {
return nil, nil
@@ -54863,13 +78322,34 @@ func (ec *executionContext) marshalOTestSortCategory2ágithubácomáevergreen
return v
}
+func (ec *executionContext) unmarshalOTestSortOptions2áágithubácomáevergreenáciáevergreenágraphqláTestSortOptionsá(ctx context.Context, v interface{}) ([]*TestSortOptions, error) {
+ if v == nil {
+ return nil, nil
+ }
+ var vSlice []interface{}
+ if v != nil {
+ vSlice = graphql.CoerceList(v)
+ }
+ var err error
+ res := make([]*TestSortOptions, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNTestSortOptions2ágithubácomáevergreenáciáevergreenágraphqláTestSortOptions(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
func (ec *executionContext) unmarshalOTime2timeáTime(ctx context.Context, v interface{}) (time.Time, error) {
res, err := graphql.UnmarshalTime(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOTime2timeáTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
- return graphql.MarshalTime(v)
+ res := graphql.MarshalTime(v)
+ return res
}
func (ec *executionContext) unmarshalOTime2átimeáTime(ctx context.Context, v interface{}) (*time.Time, error) {
@@ -54884,7 +78364,8 @@ func (ec *executionContext) marshalOTime2átimeáTime(ctx context.Context, sel
if v == nil {
return graphql.Null
}
- return graphql.MarshalTime(*v)
+ res := graphql.MarshalTime(*v)
+ return res
}
func (ec *executionContext) marshalOTriggerAlias2ágithubácomáevergreenáciáevergreenárestámodeláAPITriggerDefinitioná(ctx context.Context, sel ast.SelectionSet, v []model.APITriggerDefinition) graphql.Marshaler {
@@ -54940,11 +78421,7 @@ func (ec *executionContext) unmarshalOTriggerAliasInput2ágithubácomáevergr
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APITriggerDefinition, len(vSlice))
@@ -55126,6 +78603,11 @@ func (ec *executionContext) marshalOWebhookHeader2githubácomáevergreenáci
return ec._WebhookHeader(ctx, sel, &v)
}
+func (ec *executionContext) unmarshalOWebhookHeaderInput2githubácomáevergreenáciáevergreenárestámodeláAPIWebhookHeader(ctx context.Context, v interface{}) (model.APIWebhookHeader, error) {
+ res, err := ec.unmarshalInputWebhookHeaderInput(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) unmarshalOWebhookInput2githubácomáevergreenáciáevergreenárestámodeláAPIWebHook(ctx context.Context, v interface{}) (model.APIWebHook, error) {
res, err := ec.unmarshalInputWebhookInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -55138,6 +78620,14 @@ func (ec *executionContext) marshalOWebhookSubscriber2ágithubácomáevergree
return ec._WebhookSubscriber(ctx, sel, v)
}
+func (ec *executionContext) unmarshalOWebhookSubscriberInput2ágithubácomáevergreenáciáevergreenárestámodeláAPIWebhookSubscriber(ctx context.Context, v interface{}) (*model.APIWebhookSubscriber, error) {
+ if v == nil {
+ return nil, nil
+ }
+ res, err := ec.unmarshalInputWebhookSubscriberInput(ctx, v)
+ return &res, graphql.ErrorOnPath(ctx, err)
+}
+
func (ec *executionContext) unmarshalOWorkstationConfigInput2githubácomáevergreenáciáevergreenárestámodeláAPIWorkstationConfig(ctx context.Context, v interface{}) (model.APIWorkstationConfig, error) {
res, err := ec.unmarshalInputWorkstationConfigInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -55196,11 +78686,7 @@ func (ec *executionContext) unmarshalOWorkstationSetupCommandInput2ágithubác
}
var vSlice []interface{}
if v != nil {
- if tmp1, ok := v.([]interface{}); ok {
- vSlice = tmp1
- } else {
- vSlice = []interface{}{v}
- }
+ vSlice = graphql.CoerceList(v)
}
var err error
res := make([]model.APIWorkstationSetupCommand, len(vSlice))
diff --git a/graphql/host_resolver.go b/graphql/host_resolver.go
new file mode 100644
index 00000000000..0ace91562bc
--- /dev/null
+++ b/graphql/host_resolver.go
@@ -0,0 +1,91 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/evergreen-ci/evergreen/model/host"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
+)
+
+// Ami is the resolver for the ami field.
+func (r *hostResolver) Ami(ctx context.Context, obj *restModel.APIHost) (*string, error) {
+ host, err := host.FindOneId(utility.FromStringPtr(obj.Id))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding host %s: %s", utility.FromStringPtr(obj.Id), err.Error()))
+ }
+ if host == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not find host %s", utility.FromStringPtr(obj.Id)))
+ }
+ return utility.ToStringPtr(host.GetAMI()), nil
+}
+
+// DistroID is the resolver for the distroId field.
+func (r *hostResolver) DistroID(ctx context.Context, obj *restModel.APIHost) (*string, error) {
+ return obj.Distro.Id, nil
+}
+
+// Elapsed is the resolver for the elapsed field.
+func (r *hostResolver) Elapsed(ctx context.Context, obj *restModel.APIHost) (*time.Time, error) {
+ return obj.RunningTask.StartTime, nil
+}
+
+// HomeVolume is the resolver for the homeVolume field.
+func (r *hostResolver) HomeVolume(ctx context.Context, obj *restModel.APIHost) (*restModel.APIVolume, error) {
+ if utility.FromStringPtr(obj.HomeVolumeID) != "" {
+ volId := utility.FromStringPtr(obj.HomeVolumeID)
+ volume, err := host.FindVolumeByID(volId)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting volume %s: %s", volId, err.Error()))
+ }
+ if volume == nil {
+ grip.Error(message.Fields{
+ "message": "could not find the volume associated with this host",
+ "ticket": "EVG-16149",
+ "host_id": obj.Id,
+ "volume_id": volId,
+ })
+ return nil, nil
+ }
+ apiVolume := &restModel.APIVolume{}
+ apiVolume.BuildFromService(*volume)
+ return apiVolume, nil
+ }
+ return nil, nil
+}
+
+// Uptime is the resolver for the uptime field.
+func (r *hostResolver) Uptime(ctx context.Context, obj *restModel.APIHost) (*time.Time, error) {
+ return obj.CreationTime, nil
+}
+
+// Volumes is the resolver for the volumes field.
+func (r *hostResolver) Volumes(ctx context.Context, obj *restModel.APIHost) ([]*restModel.APIVolume, error) {
+ volumes := make([]*restModel.APIVolume, 0, len(obj.AttachedVolumeIDs))
+ for _, volId := range obj.AttachedVolumeIDs {
+ volume, err := host.FindVolumeByID(volId)
+ if err != nil {
+ return volumes, InternalServerError.Send(ctx, fmt.Sprintf("Error getting volume %s", volId))
+ }
+ if volume == nil {
+ continue
+ }
+ apiVolume := &restModel.APIVolume{}
+ apiVolume.BuildFromService(*volume)
+ volumes = append(volumes, apiVolume)
+ }
+
+ return volumes, nil
+}
+
+// Host returns HostResolver implementation.
+func (r *Resolver) Host() HostResolver { return &hostResolver{r} }
+
+type hostResolver struct{ *Resolver }
diff --git a/graphql/http_handler.go b/graphql/http_handler.go
index e5d7c195b3f..cec659fbde7 100644
--- a/graphql/http_handler.go
+++ b/graphql/http_handler.go
@@ -12,12 +12,20 @@ import (
"github.com/evergreen-ci/gimlet"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
+ "github.com/ravilushqa/otelgqlgen"
"github.com/vektah/gqlparser/v2/gqlerror"
)
// Handler returns a gimlet http handler func used as the gql route handler
func Handler(apiURL string) func(w http.ResponseWriter, r *http.Request) {
srv := handler.NewDefaultServer(NewExecutableSchema(New(apiURL)))
+
+ // Send OTEL traces for each request.
+ // Only create spans for resolved fields.
+ srv.Use(otelgqlgen.Middleware(
+ otelgqlgen.WithCreateSpanFromFields(func(fieldCtx *graphql.FieldContext) bool { return fieldCtx.IsResolver }),
+ ))
+
// Apollo tracing support https://github.com/apollographql/apollo-tracing
srv.Use(apollotracing.Tracer{})
diff --git a/graphql/integration_atomic_test_util.go b/graphql/integration_atomic_test_util.go
index d43ea1d9cdb..7b7e6d2e3f4 100644
--- a/graphql/integration_atomic_test_util.go
+++ b/graphql/integration_atomic_test_util.go
@@ -3,10 +3,10 @@ package graphql
// This test takes a specification and runs GraphQL queries, comparing the output of the query to what is expected.
// To add a new test:
// 1. Add a new directory in the tests directory. Name it after the query/mutation you are testing.
-// 2. Add a data.json file to the dir you created. The data for your tests goes here. See tests/patchTasks/data.json for example.
+// 2. Add a data.json file to the dir you created. The data for your tests goes here. See tests/versionTasks/data.json for example.
// 3. (Optional) Add directory specific test setup within the directorySpecificTestSetup function.
// 4. (Optional) Add directory specific test cleanup within the directorySpecificTestCleanup function.
-// 5. Add a results.json file to the dir you created. The results that your queries will be asserts against go here. See tests/patchTasks/results.json for example.
+// 5. Add a results.json file to the dir you created. The results that your queries will be asserts against go here. See tests/versionTasks/results.json for example.
// 6. Create a queries dir in the dir you created. All the queries/mutations for your tests go in this dir.
// 7. That's all! Start testing.
@@ -15,14 +15,16 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
+ "os"
"path/filepath"
"strings"
"testing"
"time"
"github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/cloud"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/build"
@@ -30,7 +32,6 @@ import (
"github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/host"
"github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/model/testresult"
"github.com/evergreen-ci/evergreen/model/user"
"github.com/evergreen-ci/gimlet"
"github.com/mongodb/grip"
@@ -57,6 +58,7 @@ const apiKey = "testapikey"
func setup(t *testing.T, state *AtomicGraphQLState) {
const slackUsername = "testslackuser"
+ const slackMemberId = "12345member"
const email = "testuser@mongodb.com"
const accessToken = "access_token"
const refreshToken = "refresh_token"
@@ -67,19 +69,38 @@ func setup(t *testing.T, state *AtomicGraphQLState) {
{Name: "a", Key: "aKey", CreatedAt: time.Time{}},
{Name: "b", Key: "bKey", CreatedAt: time.Time{}},
}
- systemRoles := []string{"unrestrictedTaskAccess", "modify_host", "modify_project_tasks", "superuser"}
+ systemRoles := []string{"unrestrictedTaskAccess", "modify_host", "modify_project_tasks", "superuser", "project_grumpyCat", "project_happyAbyssinian"}
env := evergreen.GetEnvironment()
ctx := context.Background()
require.NoError(t, env.DB().Drop(ctx))
- usr, err := user.GetOrCreateUser(apiUser, apiUser, email, accessToken, refreshToken, []string{})
- require.NoError(t, err)
+ require.NoError(t, db.Clear(user.Collection),
+ "unable to clear user collection")
+
+ usr := user.DBUser{
+ Id: apiUser,
+ DispName: apiUser,
+ EmailAddress: email,
+ Settings: user.UserSettings{
+ SlackUsername: "testuser",
+ SlackMemberId: "testuser",
+ UseSpruceOptions: user.UseSpruceOptions{
+ SpruceV1: true,
+ },
+ },
+ LoginCache: user.LoginCache{
+ AccessToken: accessToken,
+ RefreshToken: refreshToken,
+ },
+ APIKey: apiKey,
+ }
+ assert.NoError(t, usr.Insert())
for _, pk := range pubKeys {
- err = usr.AddPublicKey(pk.Name, pk.Key)
+ err := usr.AddPublicKey(pk.Name, pk.Key)
require.NoError(t, err)
}
- err = usr.UpdateSettings(user.UserSettings{Timezone: "America/New_York", SlackUsername: slackUsername})
+ err := usr.UpdateSettings(user.UserSettings{Timezone: "America/New_York", SlackUsername: slackUsername, SlackMemberId: slackMemberId})
require.NoError(t, err)
for _, role := range systemRoles {
@@ -88,14 +109,6 @@ func setup(t *testing.T, state *AtomicGraphQLState) {
}
require.NoError(t, usr.UpdateAPIKey(apiKey))
- require.NoError(t, db.CreateCollections(testresult.Collection))
- require.NoError(t, db.EnsureIndex(testresult.Collection, mongo.IndexModel{
- Keys: testresult.TestResultsIndex}))
-
- // TODO (EVG-15499): Create scope and role collection because the
- // RoleManager will try creating them in a transaction, which is not allowed
- // for FCV < 4.4.
- require.NoError(t, db.CreateCollections(evergreen.ScopeCollection, evergreen.RoleCollection))
require.NoError(t, setupData(*env.DB(), *env.Client().Database(state.TaskLogDB), state.TestData, *state))
roleManager := env.RoleManager()
@@ -158,6 +171,45 @@ func setup(t *testing.T, state *AtomicGraphQLState) {
err = roleManager.AddScope(superUserScope)
require.NoError(t, err)
+ // Scopes and roles for testing viewable projects for testuser
+ projectGrumpyCatScope := gimlet.Scope{
+ ID: "project_grumpyCat_scope",
+ Name: "grumpyCat",
+ Type: evergreen.ProjectResourceType,
+ Resources: []string{"grumpyCat"},
+ }
+ err = roleManager.AddScope(projectGrumpyCatScope)
+ require.NoError(t, err)
+
+ projectGrumpyCatRole := gimlet.Role{
+ ID: "project_grumpyCat",
+ Name: "grumpyCat",
+ Scope: projectGrumpyCatScope.ID,
+ Permissions: map[string]int{"project_settings": 20, "project_tasks": 30, "project_patches": 10, "project_logs": 10},
+ Owners: []string{"testuser"},
+ }
+ err = roleManager.UpdateRole(projectGrumpyCatRole)
+ require.NoError(t, err)
+
+ projectHappyAbyssinianScope := gimlet.Scope{
+ ID: "project_happyAbyssinian_scope",
+ Name: "happyAbyssinian",
+ Type: evergreen.ProjectResourceType,
+ Resources: []string{"happyAbyssinian"},
+ }
+ err = roleManager.AddScope(projectHappyAbyssinianScope)
+ require.NoError(t, err)
+
+ projectHappyAbyssinianRole := gimlet.Role{
+ ID: "project_happyAbyssinian",
+ Name: "happyAbyssinian",
+ Scope: projectHappyAbyssinianScope.ID,
+ Permissions: map[string]int{"project_settings": 20, "project_tasks": 30, "project_patches": 10, "project_logs": 10},
+ Owners: []string{"testuser"},
+ }
+ err = roleManager.UpdateRole(projectHappyAbyssinianRole)
+ require.NoError(t, err)
+
state.ApiKey = apiKey
state.ApiUser = apiUser
@@ -180,20 +232,22 @@ func escapeGQLQuery(in string) string {
func MakeTestsInDirectory(state *AtomicGraphQLState, pathToTests string) func(t *testing.T) {
return func(t *testing.T) {
- dataFile, err := ioutil.ReadFile(filepath.Join(pathToTests, "tests", state.Directory, "data.json"))
- require.NoError(t, err)
+ dataFilePath := filepath.Join(pathToTests, "tests", state.Directory, "data.json")
+ dataFile, err := os.ReadFile(filepath.Join(pathToTests, "tests", state.Directory, "data.json"))
+ require.NoError(t, errors.Wrapf(err, "reading data file for %s", dataFilePath))
- resultsFile, err := ioutil.ReadFile(filepath.Join(pathToTests, "tests", state.Directory, "results.json"))
- require.NoError(t, err)
+ resultsFilePath := filepath.Join(pathToTests, "tests", state.Directory, "results.json")
+ resultsFile, err := os.ReadFile(resultsFilePath)
+ require.NoError(t, errors.Wrapf(err, "reading results file for %s", resultsFilePath))
var testData map[string]json.RawMessage
err = json.Unmarshal(dataFile, &testData)
- require.NoError(t, err)
+ require.NoError(t, errors.Wrapf(err, "unmarshalling data file for %s", dataFilePath))
state.TestData = testData
var tests testsCases
err = json.Unmarshal(resultsFile, &tests)
- require.NoError(t, err)
+ require.NoError(t, errors.Wrapf(err, "unmarshalling results file for %s", resultsFilePath))
// Delete exactly the documents added to the task_logg coll instead of dropping task log db
// we do this to minimize deleting data that was not added from this test suite
@@ -212,7 +266,7 @@ func MakeTestsInDirectory(state *AtomicGraphQLState, pathToTests string) func(t
setup(t, state)
for _, testCase := range tests.Tests {
singleTest := func(t *testing.T) {
- f, err := ioutil.ReadFile(filepath.Join(pathToTests, "tests", state.Directory, "queries", testCase.QueryFile))
+ f, err := os.ReadFile(filepath.Join(pathToTests, "tests", state.Directory, "queries", testCase.QueryFile))
require.NoError(t, err)
jsonQuery := fmt.Sprintf(`{"operationName":null,"variables":{},"query":"%s"}`, escapeGQLQuery(string(f)))
body := bytes.NewBuffer([]byte(jsonQuery))
@@ -224,7 +278,7 @@ func MakeTestsInDirectory(state *AtomicGraphQLState, pathToTests string) func(t
r.Header.Add("content-type", "application/json")
resp, err := client.Do(r)
require.NoError(t, err)
- b, err := ioutil.ReadAll(resp.Body)
+ b, err := io.ReadAll(resp.Body)
require.NoError(t, err)
// Remove apollo tracing data from test responses
@@ -262,12 +316,12 @@ func setupData(db mongo.Database, logsDb mongo.Database, data map[string]json.Ra
ctx := context.Background()
catcher := grip.NewBasicCatcher()
for coll, d := range data {
- var docs []interface{}
// the docs to insert as part of setup need to be deserialized as extended JSON, whereas the rest of the
// test spec is normal JSON
+ var docs []interface{}
catcher.Add(bson.UnmarshalExtJSON(d, false, &docs))
- // task_logg collection belongs to the logs db
if coll == state.TaskLogColl {
+ // task_logg collection belongs to the logs db
_, err := logsDb.Collection(coll).InsertMany(ctx, docs)
catcher.Add(err)
} else {
@@ -290,12 +344,12 @@ func directorySpecificTestSetup(t *testing.T, state AtomicGraphQLState) {
type setupFn func(*testing.T)
// Map the directory name to the test setup function
m := map[string][]setupFn{
- "attachVolumeToHost": {spawnTestHostAndVolume},
- "detachVolumeFromHost": {spawnTestHostAndVolume},
- "removeVolume": {spawnTestHostAndVolume},
- "spawnVolume": {spawnTestHostAndVolume, addSubnets},
- "updateVolume": {spawnTestHostAndVolume},
- "schedulePatch": {persistTestSettings},
+ "mutation/attachVolumeToHost": {spawnTestHostAndVolume},
+ "mutation/detachVolumeFromHost": {spawnTestHostAndVolume},
+ "mutation/removeVolume": {spawnTestHostAndVolume},
+ "mutation/spawnVolume": {spawnTestHostAndVolume, addSubnets},
+ "mutation/updateVolume": {spawnTestHostAndVolume},
+ "mutation/schedulePatch": {persistTestSettings},
}
if m[state.Directory] != nil {
for _, exec := range m[state.Directory] {
@@ -308,7 +362,7 @@ func directorySpecificTestCleanup(t *testing.T, directory string) {
type cleanupFn func(*testing.T)
// Map the directory name to the test cleanup function
m := map[string][]cleanupFn{
- "spawnVolume": {clearSubnets},
+ "mutation/spawnVolume": {clearSubnets},
}
if m[directory] != nil {
for _, exec := range m[directory] {
@@ -364,10 +418,26 @@ func spawnTestHostAndVolume(t *testing.T) {
}
require.NoError(t, h.Insert())
ctx := context.Background()
- err = SpawnHostForTestCode(ctx, &mountedVolume, &h)
+ err = spawnHostForTestCode(ctx, &mountedVolume, &h)
require.NoError(t, err)
}
+func spawnHostForTestCode(ctx context.Context, vol *host.Volume, h *host.Host) error {
+ mgr, err := cloud.GetEC2ManagerForVolume(ctx, vol)
+ if err != nil {
+ return err
+ }
+ if os.Getenv("SETTINGS_OVERRIDE") != "" {
+ // The mock manager needs to spawn the host specified in our test data.
+ // The host should already be spawned in a non-test scenario.
+ _, err := mgr.SpawnHost(ctx, h)
+ if err != nil {
+ return errors.Wrapf(err, "error spawning host in test code")
+ }
+ }
+ return nil
+}
+
func addSubnets(t *testing.T) {
evergreen.GetEnvironment().Settings().Providers.AWS.Subnets = []evergreen.Subnet{{AZ: "us-east-1a", SubnetID: "new_id"}}
}
diff --git a/graphql/integration_spec.json b/graphql/integration_spec.json
index 8857a896077..4147702e18d 100644
--- a/graphql/integration_spec.json
+++ b/graphql/integration_spec.json
@@ -378,7 +378,6 @@
"depends_on": [],
"display_name": "display name",
"host_id": "host",
-
"execution": 0,
"order": 5,
"r": "something",
@@ -434,7 +433,6 @@
"depends_on": [],
"display_name": "exec 1 display!!",
"host_id": "host",
-
"execution": 0,
"order": 5,
"r": "something",
@@ -450,7 +448,8 @@
"exec1"
],
"generate_task": false,
- "generated_by": "something"
+ "generated_by": "something",
+ "results_service": "local"
},
{
"_id": "exec2",
@@ -489,7 +488,6 @@
"depends_on": [],
"display_name": "exec 2 display!!",
"host_id": "host",
-
"execution": 0,
"order": 5,
"r": "merge_test",
@@ -544,7 +542,6 @@
"depends_on": [],
"display_name": "exec1 display name",
"host_id": "host",
-
"execution": 0,
"order": 5,
"r": "patch_request",
@@ -675,67 +672,59 @@
"testresults": [
{
"_id": {
- "$oid": "19ef7a20a7798219e191d00e"
- },
- "status": "a",
- "test_file": "b",
- "log_id": "59ef7a2097b1d3148d0004f1",
- "line_num": 126,
- "exit_code": 0,
- "start": 0,
- "end": 10,
- "task_id": "exec1",
- "task_execution": 0,
- "url": "https://original-url.com",
- "url_raw": "https://original-raw-url.com"
- },
- {
- "_id": {
- "$oid": "29ef7a20a7798219e191d00e"
- },
- "status": "c",
- "test_file": "apple",
- "log_id": "",
- "line_num": 126,
- "exit_code": 0,
- "start": 0,
- "end": 20,
- "task_id": "exec1",
- "task_execution": 0,
- "url": "",
- "url_raw": ""
- },
- {
- "_id": {
- "$oid": "39ef7a20a7798219e191d00e"
- },
- "status": "b",
- "test_file": "d",
- "log_id": "59ef7a2097b1d3148d0004f1",
- "line_num": 126,
- "exit_code": 0,
- "start": 0,
- "end": 40,
- "task_id": "exec1",
- "task_execution": 0,
- "url": "",
- "url_raw": ""
- },
- {
- "_id": {
- "$oid": "49ef7a20a7798219e191d00e"
- },
- "status": "dog",
- "test_file": "c",
- "log_id": "59ef7a2097b1d3148d0004f1",
- "line_num": 126,
- "exit_code": 0,
- "start": 0,
- "end": 30,
- "task_id": "exec1",
- "task_execution": 0,
- "url": "/url/without/scheme/host",
- "url_raw": "/raw/url/without/scheme/host"
+ "task_id": "exec1",
+ "execution": 0
+ },
+ "stats": {
+ "total_count": 4,
+ "failed_count": 0
+ },
+ "results": [
+ {
+ "test_name": "b",
+ "task_id": "exec1",
+ "execution": 0,
+ "status": "a",
+ "line_num": 126,
+ "log_url": "https://logkeeper.mongodb.org/build/59ef7a2097b1d3148d0004f1/test/123",
+ "raw_log_url": "https://logkeeper.mongodb.org/build/59ef7a2097b1d3148d0004f1/test/123?raw=true",
+ "test_start_time": { "$date": "2020-02-14T22:22:24Z" },
+ "test_end_time": { "$date": "2020-02-14T22:22:44Z" }
+ },
+ {
+ "test_name": "apple",
+ "task_id": "exec1",
+ "execution": 0,
+ "status": "c",
+ "line_num": 126,
+ "url": "",
+ "url_raw": "",
+ "test_start_time": { "$date": "2020-02-14T22:22:44Z" },
+ "test_end_time": { "$date": "2020-02-14T22:22:54Z" }
+ },
+ {
+ "test_name": "d",
+ "task_id": "exec1",
+ "execution": 0,
+ "status": "b",
+ "line_num": 126,
+ "url": "",
+ "url_raw": "",
+ "test_start_time": { "$date": "2020-02-14T22:22:54Z" },
+ "test_end_time": { "$date": "2020-02-14T22:23:34Z" }
+ },
+ {
+ "test_name": "c",
+ "task_id": "exec1",
+ "execution": 0,
+ "status": "dog",
+ "line_num": 126,
+ "url": "/url/without/scheme/host",
+ "url_raw": "/raw/url/without/scheme/host",
+ "test_start_time": { "$date": "2020-02-14T22:23:34Z" },
+ "test_end_time": { "$date": "2020-02-14T22:24:04Z" }
+ }
+ ]
}
],
"project_ref": [
@@ -2211,43 +2200,6 @@
}
}
},
- {
- "query_file": "task-files-query-display.graphql",
- "result": {
- "data": {
- "taskFiles": {
- "fileCount": 3,
- "groupedFiles": [
- {
- "taskName": "exec 1 display!!",
- "files": [
- {
- "name": "awesome_test!!!",
- "link": "www.wikipedia.com",
- "visibility": "the whole world"
- }
- ]
- },
- {
- "taskName": "exec 2 display!!",
- "files": [
- {
- "name": "THIS IS REALLY COOL",
- "link": "www.wikipedia.com",
- "visibility": "the whole world"
- },
- {
- "name": "really cool test file",
- "link": "www.wikipedia.com",
- "visibility": "the whole world"
- }
- ]
- }
- ]
- }
- }
- }
- },
{
"query_file": "patch-time-1.graphql",
"result": {
@@ -2280,65 +2232,93 @@
"query_file": "task-files-query-exec.graphql",
"result": {
"data": {
- "taskFiles": {
- "fileCount": 1,
- "groupedFiles": [
- {
- "taskName": "exec 1 display!!",
- "files": [
- {
- "name": "awesome_test!!!",
- "link": "www.wikipedia.com",
- "visibility": "the whole world"
- }
- ]
- }
- ]
+ "task": {
+ "taskFiles": {
+ "fileCount": 1,
+ "groupedFiles": [
+ {
+ "taskName": "exec 1 display!!",
+ "files": [
+ {
+ "name": "awesome_test!!!",
+ "link": "www.wikipedia.com",
+ "visibility": "the whole world"
+ }
+ ]
+ }
+ ]
+ }
}
}
}
},
{
- "query_file": "task-files-query-err1.graphql",
+ "query_file": "task-files-query-display.graphql",
"result": {
- "errors": [
- {
- "message": "cannot find task with id NOT-A-REAL-TASKID",
- "path": [
- "taskFiles"
- ],
- "extensions": {
- "code": "RESOURCE_NOT_FOUND"
+ "data": {
+ "task": {
+ "taskFiles": {
+ "fileCount": 3,
+ "groupedFiles": [
+ {
+ "taskName": "exec 1 display!!",
+ "files": [
+ {
+ "name": "awesome_test!!!",
+ "link": "www.wikipedia.com",
+ "visibility": "the whole world"
+ }
+ ]
+ },
+ {
+ "taskName": "exec 2 display!!",
+ "files": [
+ {
+ "name": "THIS IS REALLY COOL",
+ "link": "www.wikipedia.com",
+ "visibility": "the whole world"
+ },
+ {
+ "name": "really cool test file",
+ "link": "www.wikipedia.com",
+ "visibility": "the whole world"
+ }
+ ]
+ }
+ ]
}
}
- ],
- "data": null
+ }
}
},
{
- "query_file": "task-files-query-err2.graphql",
+ "query_file": "task-files-query-err.graphql",
"result": {
"errors": [
{
- "message": "cannot find task with id task-does-not-exist",
+ "message": "task not found",
"path": [
- "taskFiles"
+ "task"
],
"extensions": {
"code": "RESOURCE_NOT_FOUND"
}
}
],
- "data": null
+ "data": {
+ "task": null
+ }
}
},
{
"query_file": "task-files-query-empty.graphql",
"result": {
"data": {
- "taskFiles": {
- "fileCount": 0,
- "groupedFiles": []
+ "task": {
+ "taskFiles": {
+ "fileCount": 0,
+ "groupedFiles": []
+ }
}
}
}
@@ -2363,28 +2343,10 @@
"logs": {
"url": "https://localhost:8443/test_log/exec1/0?test_name=apple&group_id=#L126",
"urlRaw": "https://localhost:8443/test_log/exec1/0?test_name=apple&group_id=&text=true",
- "urlLobster": "https://localhost:8443/lobster/evergreen/test/exec1/0/apple/#shareLine=126"
- },
- "id": "29ef7a20a7798219e191d00e"
- }
- ]
- }
- }
- }
- },
- {
- "query_file": "task_test-logs-use-original-url-when-provided.graphql",
- "result": {
- "data": {
- "taskTests": {
- "testResults": [
- {
- "logs": {
- "url": "https://original-url.com",
- "urlRaw": "https://original-raw-url.com",
- "urlLobster": null
+ "urlLobster": "https://localhost:8443/lobster/evergreen/test/exec1/0/apple/#shareLine=126",
+ "urlParsley": "https://localhost:4173/test/exec1/0/apple?shareLine=126"
},
- "id": "19ef7a20a7798219e191d00e"
+ "id": "apple"
}
]
}
@@ -2392,18 +2354,19 @@
}
},
{
- "query_file": "task_test-formats-url-with-line-num-and-log-id-when-url-empty.graphql",
+ "query_file": "task_test-logs-overwrite-legacy-resmoke-url.graphql",
"result": {
"data": {
"taskTests": {
"testResults": [
{
"logs": {
- "url": "https://localhost:8443/test_log/59ef7a2097b1d3148d0004f1#L126",
- "urlRaw": "https://localhost:8443/test_log/59ef7a2097b1d3148d0004f1?text=true",
- "urlLobster": null
+ "url": "",
+ "urlRaw": "https://logkeeper.mongodb.org/build/59ef7a2097b1d3148d0004f1/test/123?raw=true",
+ "urlLobster": "https://localhost:8443/lobster/build/59ef7a2097b1d3148d0004f1/test/123",
+ "urlParsley": "https://localhost:4173/resmoke/59ef7a2097b1d3148d0004f1/test/123?shareLine=126"
},
- "id": "39ef7a20a7798219e191d00e"
+ "id": "b"
}
]
}
@@ -2415,7 +2378,7 @@
"result": {
"errors": [
{
- "message": "finding task with id THIS-TASK-DOES-NOT-EXIST-!!!!",
+ "message": "finding task with id 'THIS-TASK-DOES-NOT-EXIST-!!!!' and execution 0",
"path": [
"taskTests"
],
diff --git a/graphql/integration_test_util.go b/graphql/integration_test_util.go
index 41e72d01b74..69afece658d 100644
--- a/graphql/integration_test_util.go
+++ b/graphql/integration_test_util.go
@@ -13,8 +13,9 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
+ "os"
"path/filepath"
"testing"
@@ -27,7 +28,7 @@ import (
)
func TestQueries(t *testing.T, serverURL, pathToTests string) {
- f, err := ioutil.ReadFile(filepath.Join(pathToTests, "integration_spec.json"))
+ f, err := os.ReadFile(filepath.Join(pathToTests, "integration_spec.json"))
require.NoError(t, err)
var spec spec
err = json.Unmarshal(f, &spec)
@@ -36,7 +37,7 @@ func TestQueries(t *testing.T, serverURL, pathToTests string) {
for _, testCase := range spec.Tests {
singleTest := func(t *testing.T) {
- f, err := ioutil.ReadFile(filepath.Join(pathToTests, "testdata", testCase.QueryFile))
+ f, err := os.ReadFile(filepath.Join(pathToTests, "testdata", testCase.QueryFile))
require.NoError(t, err)
jsonQuery := fmt.Sprintf(`{"operationName":null,"variables":{},"query":"%s"}`, escapeGQLQuery(string(f)))
body := bytes.NewBuffer([]byte(jsonQuery))
@@ -48,7 +49,7 @@ func TestQueries(t *testing.T, serverURL, pathToTests string) {
r.Header.Add("content-type", "application/json")
resp, err := client.Do(r)
require.NoError(t, err)
- b, err := ioutil.ReadAll(resp.Body)
+ b, err := io.ReadAll(resp.Body)
require.NoError(t, err)
// Remove apollo tracing data from test responses
diff --git a/graphql/issue_link_resolver.go b/graphql/issue_link_resolver.go
new file mode 100644
index 00000000000..0e95e6bb7ae
--- /dev/null
+++ b/graphql/issue_link_resolver.go
@@ -0,0 +1,21 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/evergreen/thirdparty"
+)
+
+// JiraTicket is the resolver for the jiraTicket field.
+func (r *issueLinkResolver) JiraTicket(ctx context.Context, obj *restModel.APIIssueLink) (*thirdparty.JiraTicket, error) {
+ return restModel.GetJiraTicketFromURL(*obj.URL)
+}
+
+// IssueLink returns IssueLinkResolver implementation.
+func (r *Resolver) IssueLink() IssueLinkResolver { return &issueLinkResolver{r} }
+
+type issueLinkResolver struct{ *Resolver }
diff --git a/graphql/logkeeper_resolver.go b/graphql/logkeeper_resolver.go
new file mode 100644
index 00000000000..78150a6f199
--- /dev/null
+++ b/graphql/logkeeper_resolver.go
@@ -0,0 +1,26 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/plank"
+)
+
+// Task is the resolver for the task field.
+func (r *logkeeperBuildResolver) Task(ctx context.Context, obj *plank.Build) (*model.APITask, error) {
+ task, err := getTask(ctx, obj.TaskID, &obj.TaskExecution, r.sc.GetURL())
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Finding task %s for buildId: %s: %s", obj.TaskID, obj.ID, err.Error()))
+ }
+ return task, nil
+}
+
+// LogkeeperBuild returns LogkeeperBuildResolver implementation.
+func (r *Resolver) LogkeeperBuild() LogkeeperBuildResolver { return &logkeeperBuildResolver{r} }
+
+type logkeeperBuildResolver struct{ *Resolver }
diff --git a/graphql/models_gen.go b/graphql/models_gen.go
index 2aa8c7f9894..251b4f5504e 100644
--- a/graphql/models_gen.go
+++ b/graphql/models_gen.go
@@ -15,319 +15,389 @@ import (
)
type AbortInfo struct {
- User string `json:"user"`
- TaskID string `json:"taskID"`
- TaskDisplayName string `json:"taskDisplayName"`
BuildVariantDisplayName string `json:"buildVariantDisplayName"`
NewVersion string `json:"newVersion"`
PrClosed bool `json:"prClosed"`
+ TaskDisplayName string `json:"taskDisplayName"`
+ TaskID string `json:"taskID"`
+ User string `json:"user"`
}
-type BaseTaskResult struct {
- ID string `json:"id"`
- Status string `json:"status"`
-}
-
+// Build Baron is a service that can be integrated into a project (see Confluence Wiki for more details).
+// This type is returned from the buildBaron query, and contains information about Build Baron configurations and suggested
+// tickets from JIRA for a given task on a given execution.
type BuildBaron struct {
- SearchReturnInfo *thirdparty.SearchReturnInfo `json:"searchReturnInfo"`
- BuildBaronConfigured bool `json:"buildBaronConfigured"`
BbTicketCreationDefined bool `json:"bbTicketCreationDefined"`
+ BuildBaronConfigured bool `json:"buildBaronConfigured"`
+ SearchReturnInfo *thirdparty.SearchReturnInfo `json:"searchReturnInfo"`
}
+// BuildVariantOptions is an input to the mainlineCommits query.
+// It stores values for statuses, tasks, and variants which are used to filter for matching versions.
type BuildVariantOptions struct {
- Variants []string `json:"variants"`
- Tasks []string `json:"tasks"`
- Statuses []string `json:"statuses"`
IncludeBaseTasks *bool `json:"includeBaseTasks"`
+ Statuses []string `json:"statuses"`
+ Tasks []string `json:"tasks"`
+ Variants []string `json:"variants"`
}
type Dependency struct {
- Name string `json:"name"`
+ BuildVariant string `json:"buildVariant"`
MetStatus MetStatus `json:"metStatus"`
+ Name string `json:"name"`
RequiredStatus RequiredStatus `json:"requiredStatus"`
- BuildVariant string `json:"buildVariant"`
TaskID string `json:"taskId"`
}
type DisplayTask struct {
- Name string `json:"Name"`
ExecTasks []string `json:"ExecTasks"`
+ Name string `json:"Name"`
}
+// EditSpawnHostInput is the input to the editSpawnHost mutation.
+// Its fields determine how a given host will be modified.
type EditSpawnHostInput struct {
- HostID string `json:"hostId"`
+ AddedInstanceTags []*host.Tag `json:"addedInstanceTags"`
+ DeletedInstanceTags []*host.Tag `json:"deletedInstanceTags"`
DisplayName *string `json:"displayName"`
Expiration *time.Time `json:"expiration"`
- NoExpiration *bool `json:"noExpiration"`
+ HostID string `json:"hostId"`
InstanceType *string `json:"instanceType"`
- AddedInstanceTags []*host.Tag `json:"addedInstanceTags"`
- DeletedInstanceTags []*host.Tag `json:"deletedInstanceTags"`
- Volume *string `json:"volume"`
- ServicePassword *string `json:"servicePassword"`
+ NoExpiration *bool `json:"noExpiration"`
PublicKey *PublicKeyInput `json:"publicKey"`
SavePublicKey *bool `json:"savePublicKey"`
+ ServicePassword *string `json:"servicePassword"`
+ Volume *string `json:"volume"`
+}
+
+type ExternalLinkForMetadata struct {
+ URL string `json:"url"`
+ DisplayName string `json:"displayName"`
}
type GroupedBuildVariant struct {
- Variant string `json:"variant"`
DisplayName string `json:"displayName"`
Tasks []*model.APITask `json:"tasks"`
+ Variant string `json:"variant"`
}
type GroupedFiles struct {
- TaskName *string `json:"taskName"`
Files []*model.APIFile `json:"files"`
+ TaskName *string `json:"taskName"`
}
+// GroupedProjects is the return value for the projects & viewableProjectRefs queries.
+// It contains an array of projects which are grouped under a groupDisplayName.
type GroupedProjects struct {
GroupDisplayName string `json:"groupDisplayName"`
- Name string `json:"name"`
- Repo *model.APIProjectRef `json:"repo"`
Projects []*model.APIProjectRef `json:"projects"`
+ Repo *model.APIProjectRef `json:"repo"`
}
+// HostEvents is the return value for the hostEvents query.
+// It contains the event log entries for a given host.
type HostEvents struct {
- EventLogEntries []*model.HostAPIEventLogEntry `json:"eventLogEntries"`
Count int `json:"count"`
+ EventLogEntries []*model.HostAPIEventLogEntry `json:"eventLogEntries"`
}
+// HostsResponse is the return value for the hosts query.
+// It contains an array of Hosts matching the filter conditions, as well as some count information.
type HostsResponse struct {
FilteredHostsCount *int `json:"filteredHostsCount"`
- TotalHostsCount int `json:"totalHostsCount"`
Hosts []*model.APIHost `json:"hosts"`
+ TotalHostsCount int `json:"totalHostsCount"`
}
type MainlineCommitVersion struct {
- Version *model.APIVersion `json:"version"`
RolledUpVersions []*model.APIVersion `json:"rolledUpVersions"`
+ Version *model.APIVersion `json:"version"`
}
+// MainlineCommits is returned by the mainline commits query.
+// It contains information about versions (both unactivated and activated) which is surfaced on the Project Health page.
type MainlineCommits struct {
NextPageOrderNumber *int `json:"nextPageOrderNumber"`
PrevPageOrderNumber *int `json:"prevPageOrderNumber"`
Versions []*MainlineCommitVersion `json:"versions"`
}
+// MainlineCommitsOptions is an input to the mainlineCommits query.
+// Its fields determine what mainline commits we fetch for a given projectID.
type MainlineCommitsOptions struct {
- ProjectID string `json:"projectID"`
- Limit *int `json:"limit"`
- SkipOrderNumber *int `json:"skipOrderNumber"`
- ShouldCollapse *bool `json:"shouldCollapse"`
- Requesters []string `json:"requesters"`
+ Limit *int `json:"limit"`
+ ProjectIdentifier string `json:"projectIdentifier"`
+ Requesters []string `json:"requesters"`
+ ShouldCollapse *bool `json:"shouldCollapse"`
+ SkipOrderNumber *int `json:"skipOrderNumber"`
}
type Manifest struct {
ID string `json:"id"`
- Revision string `json:"revision"`
- Project string `json:"project"`
Branch string `json:"branch"`
IsBase bool `json:"isBase"`
ModuleOverrides map[string]string `json:"moduleOverrides"`
Modules map[string]interface{} `json:"modules"`
+ Project string `json:"project"`
+ Revision string `json:"revision"`
}
+// MoveProjectInput is the input to the attachProjectToNewRepo mutation.
+// It contains information used to move a project to a a new owner and repo.
type MoveProjectInput struct {
- ProjectID string `json:"projectId"`
NewOwner string `json:"newOwner"`
NewRepo string `json:"newRepo"`
+ ProjectID string `json:"projectId"`
}
+// PatchConfigure is the input to the schedulePatch mutation.
+// It contains information about how a user has configured their patch (e.g. name, tasks to run, etc).
type PatchConfigure struct {
Description string `json:"description"`
- VariantsTasks []*VariantTasks `json:"variantsTasks"`
Parameters []*model.APIParameter `json:"parameters"`
PatchTriggerAliases []string `json:"patchTriggerAliases"`
+ VariantsTasks []*VariantTasks `json:"variantsTasks"`
}
type PatchDuration struct {
Makespan *string `json:"makespan"`
- TimeTaken *string `json:"timeTaken"`
Time *PatchTime `json:"time"`
+ TimeTaken *string `json:"timeTaken"`
}
type PatchProject struct {
Variants []*ProjectBuildVariant `json:"variants"`
}
-type PatchTasks struct {
- Tasks []*model.APITask `json:"tasks"`
- Count int `json:"count"`
-}
-
type PatchTime struct {
- Started *string `json:"started"`
Finished *string `json:"finished"`
+ Started *string `json:"started"`
SubmittedAt string `json:"submittedAt"`
}
+// Patches is the return value of the patches field for the User and Project types.
+// It contains an array Patches for either an individual user or a project.
type Patches struct {
- Patches []*model.APIPatch `json:"patches"`
FilteredPatchCount int `json:"filteredPatchCount"`
+ Patches []*model.APIPatch `json:"patches"`
}
+// PatchesInput is the input value to the patches field for the User and Project types.
+// Based on the information in PatchesInput, we return a list of Patches for either an individual user or a project.
type PatchesInput struct {
+ IncludeCommitQueue *bool `json:"includeCommitQueue"`
Limit int `json:"limit"`
+ OnlyCommitQueue *bool `json:"onlyCommitQueue"`
Page int `json:"page"`
PatchName string `json:"patchName"`
Statuses []string `json:"statuses"`
- IncludeCommitQueue *bool `json:"includeCommitQueue"`
- OnlyCommitQueue *bool `json:"onlyCommitQueue"`
}
type Permissions struct {
- UserID string `json:"userId"`
CanCreateProject bool `json:"canCreateProject"`
+ UserID string `json:"userId"`
+}
+
+// PodEvents is the return value for the events query.
+// It contains the event log entries for a pod.
+type PodEvents struct {
+ Count int `json:"count"`
+ EventLogEntries []*model.PodAPIEventLogEntry `json:"eventLogEntries"`
}
type ProjectBuildVariant struct {
- Name string `json:"name"`
DisplayName string `json:"displayName"`
+ Name string `json:"name"`
Tasks []string `json:"tasks"`
}
+// ProjectEvents contains project event log entries that concern the history of changes related to project
+// settings.
+// Although RepoSettings uses RepoRef in practice to have stronger types, this can't be enforced
+// or event logs because new fields could always be introduced that don't exist in the old event logs.
type ProjectEvents struct {
- EventLogEntries []*model.APIProjectEvent `json:"eventLogEntries"`
Count int `json:"count"`
+ EventLogEntries []*model.APIProjectEvent `json:"eventLogEntries"`
}
+// PublicKeyInput is an input to the createPublicKey and updatePublicKey mutations.
type PublicKeyInput struct {
- Name string `json:"name"`
Key string `json:"key"`
+ Name string `json:"name"`
}
+// SortOrder[] is an input value for version.tasks. It is used to define whether to sort by ASC/DEC for a given sort key.
type SortOrder struct {
- Key TaskSortCategory `json:"Key"`
Direction SortDirection `json:"Direction"`
+ Key TaskSortCategory `json:"Key"`
}
+// SpawnHostInput is the input to the spawnHost mutation.
+// Its fields determine the properties of the host that will be spawned.
type SpawnHostInput struct {
DistroID string `json:"distroId"`
- Region string `json:"region"`
- SavePublicKey bool `json:"savePublicKey"`
- PublicKey *PublicKeyInput `json:"publicKey"`
- UserDataScript *string `json:"userDataScript"`
Expiration *time.Time `json:"expiration"`
+ HomeVolumeSize *int `json:"homeVolumeSize"`
+ IsVirtualWorkStation bool `json:"isVirtualWorkStation"`
NoExpiration bool `json:"noExpiration"`
+ PublicKey *PublicKeyInput `json:"publicKey"`
+ Region string `json:"region"`
+ SavePublicKey bool `json:"savePublicKey"`
SetUpScript *string `json:"setUpScript"`
- IsVirtualWorkStation bool `json:"isVirtualWorkStation"`
- HomeVolumeSize *int `json:"homeVolumeSize"`
- VolumeID *string `json:"volumeId"`
+ SpawnHostsStartedByTask *bool `json:"spawnHostsStartedByTask"`
TaskID *string `json:"taskId"`
+ TaskSync *bool `json:"taskSync"`
UseProjectSetupScript *bool `json:"useProjectSetupScript"`
+ UserDataScript *string `json:"userDataScript"`
UseTaskConfig *bool `json:"useTaskConfig"`
- SpawnHostsStartedByTask *bool `json:"spawnHostsStartedByTask"`
- TaskSync *bool `json:"taskSync"`
+ VolumeID *string `json:"volumeId"`
}
+// SpawnVolumeInput is the input to the spawnVolume mutation.
+// Its fields determine the properties of the volume that will be spawned.
type SpawnVolumeInput struct {
AvailabilityZone string `json:"availabilityZone"`
- Size int `json:"size"`
- Type string `json:"type"`
Expiration *time.Time `json:"expiration"`
- NoExpiration *bool `json:"noExpiration"`
Host *string `json:"host"`
+ NoExpiration *bool `json:"noExpiration"`
+ Size int `json:"size"`
+ Type string `json:"type"`
}
type Subscriber struct {
- GithubPRSubscriber *model.APIGithubPRSubscriber `json:"githubPRSubscriber"`
+ EmailSubscriber *string `json:"emailSubscriber"`
GithubCheckSubscriber *model.APIGithubCheckSubscriber `json:"githubCheckSubscriber"`
- WebhookSubscriber *model.APIWebhookSubscriber `json:"webhookSubscriber"`
- JiraIssueSubscriber *model.APIJIRAIssueSubscriber `json:"jiraIssueSubscriber"`
+ GithubPRSubscriber *model.APIGithubPRSubscriber `json:"githubPRSubscriber"`
JiraCommentSubscriber *string `json:"jiraCommentSubscriber"`
- EmailSubscriber *string `json:"emailSubscriber"`
+ JiraIssueSubscriber *model.APIJIRAIssueSubscriber `json:"jiraIssueSubscriber"`
SlackSubscriber *string `json:"slackSubscriber"`
+ WebhookSubscriber *model.APIWebhookSubscriber `json:"webhookSubscriber"`
}
+// TaskFiles is the return value for the taskFiles query.
+// Some tasks generate files which are represented by this type.
type TaskFiles struct {
FileCount int `json:"fileCount"`
GroupedFiles []*GroupedFiles `json:"groupedFiles"`
}
+// TaskFilterOptions defines the parameters that are used when fetching tasks from a Version.
+type TaskFilterOptions struct {
+ BaseStatuses []string `json:"baseStatuses"`
+ IncludeEmptyActivation *bool `json:"includeEmptyActivation"`
+ IncludeNeverActivatedTasks *bool `json:"includeNeverActivatedTasks"`
+ Limit *int `json:"limit"`
+ Page *int `json:"page"`
+ Sorts []*SortOrder `json:"sorts"`
+ Statuses []string `json:"statuses"`
+ TaskName *string `json:"taskName"`
+ Variant *string `json:"variant"`
+}
+
+// TaskLogs is the return value for the task.taskLogs query.
+// It contains the logs for a given task on a given execution.
type TaskLogs struct {
- TaskID string `json:"taskId"`
- Execution int `json:"execution"`
+ AgentLogs []*apimodels.LogMessage `json:"agentLogs"`
+ AllLogs []*apimodels.LogMessage `json:"allLogs"`
DefaultLogger string `json:"defaultLogger"`
EventLogs []*model.TaskAPIEventLogEntry `json:"eventLogs"`
- TaskLogs []*apimodels.LogMessage `json:"taskLogs"`
+ Execution int `json:"execution"`
SystemLogs []*apimodels.LogMessage `json:"systemLogs"`
- AgentLogs []*apimodels.LogMessage `json:"agentLogs"`
- AllLogs []*apimodels.LogMessage `json:"allLogs"`
+ TaskID string `json:"taskId"`
+ TaskLogs []*apimodels.LogMessage `json:"taskLogs"`
}
+// TaskQueueDistro[] is the return value for the taskQueueDistros query.
+// It contains information about how many tasks and hosts are running on on a particular distro.
type TaskQueueDistro struct {
ID string `json:"id"`
- TaskCount int `json:"taskCount"`
HostCount int `json:"hostCount"`
+ TaskCount int `json:"taskCount"`
}
-type TaskResult struct {
- ID string `json:"id"`
- Execution int `json:"execution"`
- Aborted bool `json:"aborted"`
- DisplayName string `json:"displayName"`
- Version string `json:"version"`
- Status string `json:"status"`
- BaseStatus *string `json:"baseStatus"`
- BaseTask *BaseTaskResult `json:"baseTask"`
- BuildVariant string `json:"buildVariant"`
- BuildVariantDisplayName string `json:"buildVariantDisplayName"`
- Blocked bool `json:"blocked"`
- ExecutionTasksFull []*model.APITask `json:"executionTasksFull"`
-}
-
+// TaskTestResult is the return value for the taskTests query.
+// It contains the test results for a task. For example, if there is a task to run all unit tests, then the test results
+// could be the result of each individual unit test.
type TaskTestResult struct {
+ TestResults []*model.APITest `json:"testResults"`
TotalTestCount int `json:"totalTestCount"`
FilteredTestCount int `json:"filteredTestCount"`
- TestResults []*model.APITest `json:"testResults"`
}
+// TaskTestResultSample is the return value for the taskTestSample query.
+// It is used to represent failing test results on the task history pages.
type TaskTestResultSample struct {
- TaskID string `json:"taskId"`
Execution int `json:"execution"`
- TotalTestCount int `json:"totalTestCount"`
MatchingFailedTestNames []string `json:"matchingFailedTestNames"`
+ TaskID string `json:"taskId"`
+ TotalTestCount int `json:"totalTestCount"`
}
+// TestFilter is an input value for the taskTestSample query.
+// It's used to filter for tests with testName and status testStatus.
type TestFilter struct {
TestName string `json:"testName"`
TestStatus string `json:"testStatus"`
}
+// TestFilterOptions is an input for the task.Tests query.
+// It's used to filter, sort, and paginate test results of a task.
+type TestFilterOptions struct {
+ TestName *string `json:"testName"`
+ Statuses []string `json:"statuses"`
+ GroupID *string `json:"groupID"`
+ Sort []*TestSortOptions `json:"sort"`
+ Limit *int `json:"limit"`
+ Page *int `json:"page"`
+}
+
+// TestSortOptions is an input for the task.Tests query.
+// It's used to define sort criteria for test results of a task.
+type TestSortOptions struct {
+ SortBy TestSortCategory `json:"sortBy"`
+ Direction SortDirection `json:"direction"`
+}
+
+// UpdateVolumeInput is the input to the updateVolume mutation.
+// Its fields determine how a given volume will be modified.
type UpdateVolumeInput struct {
Expiration *time.Time `json:"expiration"`
- NoExpiration *bool `json:"noExpiration"`
Name *string `json:"name"`
+ NoExpiration *bool `json:"noExpiration"`
VolumeID string `json:"volumeId"`
}
type UpstreamProject struct {
Owner string `json:"owner"`
- Repo string `json:"repo"`
- Revision string `json:"revision"`
Project string `json:"project"`
- TriggerID string `json:"triggerID"`
+ Repo string `json:"repo"`
ResourceID string `json:"resourceID"`
+ Revision string `json:"revision"`
Task *model.APITask `json:"task"`
- Version *model.APIVersion `json:"version"`
+ TriggerID string `json:"triggerID"`
TriggerType string `json:"triggerType"`
+ Version *model.APIVersion `json:"version"`
}
+// UserConfig is returned by the userConfig query.
+// It contains configuration information such as the user's api key for the Evergreen CLI and a user's
+// preferred UI (legacy vs Spruce).
type UserConfig struct {
- User string `json:"user"`
APIKey string `json:"api_key"`
APIServerHost string `json:"api_server_host"`
UIServerHost string `json:"ui_server_host"`
-}
-
-type UserPatches struct {
- Patches []*model.APIPatch `json:"patches"`
- FilteredPatchCount int `json:"filteredPatchCount"`
+ User string `json:"user"`
}
type VariantTasks struct {
- Variant string `json:"variant"`
- Tasks []string `json:"tasks"`
DisplayTasks []*DisplayTask `json:"displayTasks"`
+ Tasks []string `json:"tasks"`
+ Variant string `json:"variant"`
+}
+
+type VersionTasks struct {
+ Count int `json:"count"`
+ Data []*model.APITask `json:"data"`
}
type VersionTiming struct {
@@ -335,6 +405,8 @@ type VersionTiming struct {
TimeTaken *model.APIDuration `json:"timeTaken"`
}
+// VolumeHost is the input to the attachVolumeToHost mutation.
+// Its fields are used to attach the volume with volumeId to the host with hostId.
type VolumeHost struct {
VolumeID string `json:"volumeId"`
HostID string `json:"hostId"`
@@ -344,29 +416,29 @@ type HostSortBy string
const (
HostSortByID HostSortBy = "ID"
- HostSortByDistro HostSortBy = "DISTRO"
HostSortByCurrentTask HostSortBy = "CURRENT_TASK"
- HostSortByStatus HostSortBy = "STATUS"
+ HostSortByDistro HostSortBy = "DISTRO"
HostSortByElapsed HostSortBy = "ELAPSED"
- HostSortByUptime HostSortBy = "UPTIME"
HostSortByIDLeTime HostSortBy = "IDLE_TIME"
HostSortByOwner HostSortBy = "OWNER"
+ HostSortByStatus HostSortBy = "STATUS"
+ HostSortByUptime HostSortBy = "UPTIME"
)
var AllHostSortBy = []HostSortBy{
HostSortByID,
- HostSortByDistro,
HostSortByCurrentTask,
- HostSortByStatus,
+ HostSortByDistro,
HostSortByElapsed,
- HostSortByUptime,
HostSortByIDLeTime,
HostSortByOwner,
+ HostSortByStatus,
+ HostSortByUptime,
}
func (e HostSortBy) IsValid() bool {
switch e {
- case HostSortByID, HostSortByDistro, HostSortByCurrentTask, HostSortByStatus, HostSortByElapsed, HostSortByUptime, HostSortByIDLeTime, HostSortByOwner:
+ case HostSortByID, HostSortByCurrentTask, HostSortByDistro, HostSortByElapsed, HostSortByIDLeTime, HostSortByOwner, HostSortByStatus, HostSortByUptime:
return true
}
return false
@@ -492,6 +564,7 @@ const (
ProjectSettingsSectionTriggers ProjectSettingsSection = "TRIGGERS"
ProjectSettingsSectionPeriodicBuilds ProjectSettingsSection = "PERIODIC_BUILDS"
ProjectSettingsSectionPlugins ProjectSettingsSection = "PLUGINS"
+ ProjectSettingsSectionContainers ProjectSettingsSection = "CONTAINERS"
)
var AllProjectSettingsSection = []ProjectSettingsSection{
@@ -505,11 +578,12 @@ var AllProjectSettingsSection = []ProjectSettingsSection{
ProjectSettingsSectionTriggers,
ProjectSettingsSectionPeriodicBuilds,
ProjectSettingsSectionPlugins,
+ ProjectSettingsSectionContainers,
}
func (e ProjectSettingsSection) IsValid() bool {
switch e {
- case ProjectSettingsSectionGeneral, ProjectSettingsSectionAccess, ProjectSettingsSectionVariables, ProjectSettingsSectionGithubAndCommitQueue, ProjectSettingsSectionNotifications, ProjectSettingsSectionPatchAliases, ProjectSettingsSectionWorkstation, ProjectSettingsSectionTriggers, ProjectSettingsSectionPeriodicBuilds, ProjectSettingsSectionPlugins:
+ case ProjectSettingsSectionGeneral, ProjectSettingsSectionAccess, ProjectSettingsSectionVariables, ProjectSettingsSectionGithubAndCommitQueue, ProjectSettingsSectionNotifications, ProjectSettingsSectionPatchAliases, ProjectSettingsSectionWorkstation, ProjectSettingsSectionTriggers, ProjectSettingsSectionPeriodicBuilds, ProjectSettingsSectionPlugins, ProjectSettingsSectionContainers:
return true
}
return false
diff --git a/graphql/mutation_resolver.go b/graphql/mutation_resolver.go
new file mode 100644
index 00000000000..f56d56cc923
--- /dev/null
+++ b/graphql/mutation_resolver.go
@@ -0,0 +1,1174 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "net/url"
+ "runtime/debug"
+ "sort"
+ "time"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/api"
+ "github.com/evergreen-ci/evergreen/cloud"
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/annotations"
+ "github.com/evergreen-ci/evergreen/model/build"
+ "github.com/evergreen-ci/evergreen/model/commitqueue"
+ "github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/model/host"
+ "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/user"
+ "github.com/evergreen-ci/evergreen/rest/data"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/evergreen/units"
+ "github.com/evergreen-ci/evergreen/util"
+ "github.com/evergreen-ci/gimlet"
+ "github.com/evergreen-ci/utility"
+ "github.com/mongodb/amboy"
+ adb "github.com/mongodb/anser/db"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
+ werrors "github.com/pkg/errors"
+)
+
+// BbCreateTicket is the resolver for the bbCreateTicket field.
+func (r *mutationResolver) BbCreateTicket(ctx context.Context, taskID string, execution *int) (bool, error) {
+ httpStatus, err := data.BbFileTicket(ctx, taskID, *execution)
+ if err != nil {
+ return false, mapHTTPStatusToGqlError(ctx, httpStatus, err)
+ }
+ return true, nil
+}
+
+// AddAnnotationIssue is the resolver for the addAnnotationIssue field.
+func (r *mutationResolver) AddAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue restModel.APIIssueLink, isIssue bool) (bool, error) {
+ usr := mustHaveUser(ctx)
+ issue := restModel.APIIssueLinkToService(apiIssue)
+ if err := util.CheckURL(issue.URL); err != nil {
+ return false, InputValidationError.Send(ctx, fmt.Sprintf("issue does not have valid URL: %s", err.Error()))
+ }
+ if isIssue {
+ if err := annotations.AddIssueToAnnotation(taskID, execution, *issue, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't add issue: %s", err.Error()))
+ }
+ return true, nil
+ } else {
+ if err := annotations.AddSuspectedIssueToAnnotation(taskID, execution, *issue, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't add suspected issue: %s", err.Error()))
+ }
+ return true, nil
+ }
+}
+
+// EditAnnotationNote is the resolver for the editAnnotationNote field.
+func (r *mutationResolver) EditAnnotationNote(ctx context.Context, taskID string, execution int, originalMessage string, newMessage string) (bool, error) {
+ usr := mustHaveUser(ctx)
+ if err := annotations.UpdateAnnotationNote(taskID, execution, originalMessage, newMessage, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't update note: %s", err.Error()))
+ }
+ return true, nil
+}
+
+// MoveAnnotationIssue is the resolver for the moveAnnotationIssue field.
+func (r *mutationResolver) MoveAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue restModel.APIIssueLink, isIssue bool) (bool, error) {
+ usr := mustHaveUser(ctx)
+ issue := restModel.APIIssueLinkToService(apiIssue)
+ if isIssue {
+ if err := annotations.MoveIssueToSuspectedIssue(taskID, execution, *issue, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't move issue to suspected issues: %s", err.Error()))
+ }
+ return true, nil
+ } else {
+ if err := annotations.MoveSuspectedIssueToIssue(taskID, execution, *issue, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't move issue to suspected issues: %s", err.Error()))
+ }
+ return true, nil
+ }
+}
+
+// RemoveAnnotationIssue is the resolver for the removeAnnotationIssue field.
+func (r *mutationResolver) RemoveAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue restModel.APIIssueLink, isIssue bool) (bool, error) {
+ issue := restModel.APIIssueLinkToService(apiIssue)
+ if isIssue {
+ if err := annotations.RemoveIssueFromAnnotation(taskID, execution, *issue); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't delete issue: %s", err.Error()))
+ }
+ return true, nil
+ } else {
+ if err := annotations.RemoveSuspectedIssueFromAnnotation(taskID, execution, *issue); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't delete suspected issue: %s", err.Error()))
+ }
+ return true, nil
+ }
+}
+
+// SetAnnotationMetadataLinks is the resolver for the setAnnotationMetadataLinks field.
+func (r *mutationResolver) SetAnnotationMetadataLinks(ctx context.Context, taskID string, execution int, metadataLinks []*restModel.APIMetadataLink) (bool, error) {
+ usr := mustHaveUser(ctx)
+ modelMetadataLinks := restModel.APIMetadataLinksToService(metadataLinks)
+ if err := annotations.ValidateMetadataLinks(modelMetadataLinks...); err != nil {
+ return false, InputValidationError.Send(ctx, fmt.Sprintf("invalid metadata link: %s", err.Error()))
+ }
+ if err := annotations.SetAnnotationMetadataLinks(ctx, taskID, execution, usr.Username(), modelMetadataLinks...); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't add issue: %s", err.Error()))
+ }
+ return true, nil
+}
+
+// ReprovisionToNew is the resolver for the reprovisionToNew field.
+func (r *mutationResolver) ReprovisionToNew(ctx context.Context, hostIds []string) (int, error) {
+ user := mustHaveUser(ctx)
+
+ hosts, permissions, httpStatus, err := api.GetHostsAndUserPermissions(user, hostIds)
+ if err != nil {
+ return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
+ }
+
+ hostsUpdated, httpStatus, err := api.ModifyHostsWithPermissions(hosts, permissions, api.GetReprovisionToNewCallback(ctx, evergreen.GetEnvironment(), user.Username()))
+ if err != nil {
+ return 0, mapHTTPStatusToGqlError(ctx, httpStatus, werrors.Errorf("Error marking selected hosts as needing to reprovision: %s", err.Error()))
+ }
+
+ return hostsUpdated, nil
+}
+
+// RestartJasper is the resolver for the restartJasper field.
+func (r *mutationResolver) RestartJasper(ctx context.Context, hostIds []string) (int, error) {
+ user := mustHaveUser(ctx)
+
+ hosts, permissions, httpStatus, err := api.GetHostsAndUserPermissions(user, hostIds)
+ if err != nil {
+ return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
+ }
+
+ hostsUpdated, httpStatus, err := api.ModifyHostsWithPermissions(hosts, permissions, api.GetRestartJasperCallback(ctx, evergreen.GetEnvironment(), user.Username()))
+ if err != nil {
+ return 0, mapHTTPStatusToGqlError(ctx, httpStatus, werrors.Errorf("Error marking selected hosts as needing Jasper service restarted: %s", err.Error()))
+ }
+
+ return hostsUpdated, nil
+}
+
+// UpdateHostStatus is the resolver for the updateHostStatus field.
+func (r *mutationResolver) UpdateHostStatus(ctx context.Context, hostIds []string, status string, notes *string) (int, error) {
+ user := mustHaveUser(ctx)
+
+ hosts, permissions, httpStatus, err := api.GetHostsAndUserPermissions(user, hostIds)
+ if err != nil {
+ return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
+ }
+
+ rq := evergreen.GetEnvironment().RemoteQueue()
+ hostsUpdated, httpStatus, err := api.ModifyHostsWithPermissions(hosts, permissions, api.GetUpdateHostStatusCallback(ctx, evergreen.GetEnvironment(), rq, status, *notes, user))
+ if err != nil {
+ return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
+ }
+
+ return hostsUpdated, nil
+}
+
+// EnqueuePatch is the resolver for the enqueuePatch field.
+func (r *mutationResolver) EnqueuePatch(ctx context.Context, patchID string, commitMessage *string) (*restModel.APIPatch, error) {
+ user := mustHaveUser(ctx)
+ existingPatch, err := data.FindPatchById(patchID)
+ if err != nil {
+ gimletErr, ok := err.(gimlet.ErrorResponse)
+ if ok {
+ return nil, mapHTTPStatusToGqlError(ctx, gimletErr.StatusCode, err)
+ }
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting patch '%s'", patchID))
+ }
+
+ if !hasEnqueuePatchPermission(user, existingPatch) {
+ return nil, Forbidden.Send(ctx, "can't enqueue another user's patch")
+ }
+
+ if commitMessage == nil {
+ commitMessage = existingPatch.Description
+ }
+
+ if utility.FromStringPtr(existingPatch.Requester) == evergreen.GithubPRRequester {
+ info := commitqueue.EnqueuePRInfo{
+ PR: existingPatch.GithubPatchData.PRNumber,
+ Repo: utility.FromStringPtr(existingPatch.GithubPatchData.BaseRepo),
+ Owner: utility.FromStringPtr(existingPatch.GithubPatchData.BaseOwner),
+ CommitMessage: utility.FromStringPtr(commitMessage),
+ Username: utility.FromStringPtr(existingPatch.GithubPatchData.Author),
+ }
+ newPatch, err := data.EnqueuePRToCommitQueue(ctx, evergreen.GetEnvironment(), r.sc, info)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("enqueueing patch '%s': %s", patchID, err.Error()))
+ }
+ return newPatch, nil
+ }
+
+ newPatch, err := data.CreatePatchForMerge(ctx, evergreen.GetEnvironment().Settings(), patchID, utility.FromStringPtr(commitMessage))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error creating new patch: %s", err.Error()))
+ }
+ item := restModel.APICommitQueueItem{
+ Issue: newPatch.Id,
+ PatchId: newPatch.Id,
+ Source: utility.ToStringPtr(commitqueue.SourceDiff)}
+ _, err = data.EnqueueItem(utility.FromStringPtr(newPatch.ProjectId), item, false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error enqueuing new patch: %s", err.Error()))
+ }
+ return newPatch, nil
+}
+
+// SchedulePatch is the resolver for the schedulePatch field.
+func (r *mutationResolver) SchedulePatch(ctx context.Context, patchID string, configure PatchConfigure) (*restModel.APIPatch, error) {
+ patchUpdateReq := buildFromGqlInput(configure)
+ version, err := model.VersionFindOneId(patchID)
+ if err != nil && !adb.ResultsNotFound(err) {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error occurred fetching patch `%s`: %s", patchID, err.Error()))
+ }
+ statusCode, err := units.SchedulePatch(ctx, evergreen.GetEnvironment(), patchID, version, patchUpdateReq)
+ if err != nil {
+ return nil, mapHTTPStatusToGqlError(ctx, statusCode, werrors.Errorf("Error scheduling patch `%s`: %s", patchID, err.Error()))
+ }
+ scheduledPatch, err := data.FindPatchById(patchID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting scheduled patch `%s`: %s", patchID, err))
+ }
+ return scheduledPatch, nil
+}
+
+// SchedulePatchTasks is the resolver for the schedulePatchTasks field.
+func (r *mutationResolver) SchedulePatchTasks(ctx context.Context, patchID string) (*string, error) {
+ modifications := model.VersionModification{
+ Action: evergreen.SetActiveAction,
+ Active: true,
+ Abort: false,
+ }
+ err := modifyVersionHandler(ctx, patchID, modifications)
+ if err != nil {
+ return nil, err
+ }
+ return &patchID, nil
+}
+
+// ScheduleUndispatchedBaseTasks is the resolver for the scheduleUndispatchedBaseTasks field.
+func (r *mutationResolver) ScheduleUndispatchedBaseTasks(ctx context.Context, patchID string) ([]*restModel.APITask, error) {
+ opts := task.GetTasksByVersionOptions{
+ Statuses: evergreen.TaskFailureStatuses,
+ IncludeExecutionTasks: true,
+ IncludeBaseTasks: false,
+ IncludeBuildVariantDisplayName: false,
+ }
+ tasks, _, err := task.GetTasksByVersion(ctx, patchID, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not fetch tasks for patch: %s ", err.Error()))
+ }
+
+ scheduledTasks := []*restModel.APITask{}
+ tasksToSchedule := make(map[string]bool)
+
+ for _, t := range tasks {
+ // If a task is a generated task don't schedule it until we get all of the generated tasks we want to generate
+ if t.GeneratedBy == "" {
+ // We can ignore an error while fetching tasks because this could just mean the task didn't exist on the base commit.
+ baseTask, _ := t.FindTaskOnBaseCommit()
+ if baseTask != nil && baseTask.Status == evergreen.TaskUndispatched {
+ tasksToSchedule[baseTask.Id] = true
+ }
+ // If a task is generated lets find its base task if it exists otherwise we need to generate it
+ } else if t.GeneratedBy != "" {
+ baseTask, _ := t.FindTaskOnBaseCommit()
+ // If the task is undispatched or doesn't exist on the base commit then we want to schedule
+ if baseTask == nil {
+ generatorTask, err := task.FindByIdExecution(t.GeneratedBy, nil)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Experienced an error trying to find the generator task: %s", err.Error()))
+ }
+ if generatorTask != nil {
+ baseGeneratorTask, _ := generatorTask.FindTaskOnBaseCommit()
+ // If baseGeneratorTask is nil then it didn't exist on the base task and we can't do anything
+ if baseGeneratorTask != nil && baseGeneratorTask.Status == evergreen.TaskUndispatched {
+ err = baseGeneratorTask.SetGeneratedTasksToActivate(t.BuildVariant, t.DisplayName)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not activate generated task: %s", err.Error()))
+ }
+ tasksToSchedule[baseGeneratorTask.Id] = true
+
+ }
+ }
+ } else if baseTask.Status == evergreen.TaskUndispatched {
+ tasksToSchedule[baseTask.Id] = true
+ }
+
+ }
+ }
+
+ taskIDs := []string{}
+ for taskId := range tasksToSchedule {
+ taskIDs = append(taskIDs, taskId)
+ }
+ scheduled, err := setManyTasksScheduled(ctx, r.sc.GetURL(), true, taskIDs...)
+ if err != nil {
+ return nil, err
+ }
+ scheduledTasks = append(scheduledTasks, scheduled...)
+ // sort scheduledTasks by display name to guarantee the order of the tasks
+ sort.Slice(scheduledTasks, func(i, j int) bool {
+ return utility.FromStringPtr(scheduledTasks[i].DisplayName) < utility.FromStringPtr(scheduledTasks[j].DisplayName)
+ })
+
+ return scheduledTasks, nil
+}
+
+// SetPatchPriority is the resolver for the setPatchPriority field.
+func (r *mutationResolver) SetPatchPriority(ctx context.Context, patchID string, priority int) (*string, error) {
+ modifications := model.VersionModification{
+ Action: evergreen.SetPriorityAction,
+ Priority: int64(priority),
+ }
+ err := modifyVersionHandler(ctx, patchID, modifications)
+ if err != nil {
+ return nil, err
+ }
+ return &patchID, nil
+}
+
+// UnschedulePatchTasks is the resolver for the unschedulePatchTasks field.
+func (r *mutationResolver) UnschedulePatchTasks(ctx context.Context, patchID string, abort bool) (*string, error) {
+ modifications := model.VersionModification{
+ Action: evergreen.SetActiveAction,
+ Active: false,
+ Abort: abort,
+ }
+ err := modifyVersionHandler(ctx, patchID, modifications)
+ if err != nil {
+ return nil, err
+ }
+ return &patchID, nil
+}
+
+// AddFavoriteProject is the resolver for the addFavoriteProject field.
+func (r *mutationResolver) AddFavoriteProject(ctx context.Context, identifier string) (*restModel.APIProjectRef, error) {
+ p, err := model.FindBranchProjectRef(identifier)
+ if err != nil || p == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find project '%s'", identifier))
+ }
+
+ usr := mustHaveUser(ctx)
+ err = usr.AddFavoritedProject(identifier)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ apiProjectRef := restModel.APIProjectRef{}
+ err = apiProjectRef.BuildFromService(*p)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
+ }
+ return &apiProjectRef, nil
+}
+
+// AttachProjectToNewRepo is the resolver for the attachProjectToNewRepo field.
+func (r *mutationResolver) AttachProjectToNewRepo(ctx context.Context, project MoveProjectInput) (*restModel.APIProjectRef, error) {
+ usr := mustHaveUser(ctx)
+ pRef, err := data.FindProjectById(project.ProjectID, false, false)
+ if err != nil || pRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s : %s", project.ProjectID, err.Error()))
+ }
+ pRef.Owner = project.NewOwner
+ pRef.Repo = project.NewRepo
+
+ if err = pRef.AttachToNewRepo(usr); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error updating owner/repo: %s", err.Error()))
+ }
+
+ res := &restModel.APIProjectRef{}
+ if err = res.BuildFromService(*pRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIProjectRef: %s", err.Error()))
+ }
+ return res, nil
+}
+
+// AttachProjectToRepo is the resolver for the attachProjectToRepo field.
+func (r *mutationResolver) AttachProjectToRepo(ctx context.Context, projectID string) (*restModel.APIProjectRef, error) {
+ usr := mustHaveUser(ctx)
+ pRef, err := data.FindProjectById(projectID, false, false)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding project %s: %s", projectID, err.Error()))
+ }
+ if pRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find project %s", projectID))
+ }
+ if err = pRef.AttachToRepo(usr); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error attaching to repo: %s", err.Error()))
+ }
+
+ res := &restModel.APIProjectRef{}
+ if err := res.BuildFromService(*pRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building project from service: %s", err.Error()))
+ }
+ return res, nil
+}
+
+// CreateProject is the resolver for the createProject field.
+func (r *mutationResolver) CreateProject(ctx context.Context, project restModel.APIProjectRef, requestS3Creds *bool) (*restModel.APIProjectRef, error) {
+ dbProjectRef, err := project.ToService()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error converting project ref to service model: %s", err.Error()))
+ }
+ u := gimlet.GetUser(ctx).(*user.DBUser)
+
+ if created, err := data.CreateProject(ctx, evergreen.GetEnvironment(), dbProjectRef, u); err != nil {
+ if !created {
+ apiErr, ok := err.(gimlet.ErrorResponse)
+ if ok {
+ if apiErr.StatusCode == http.StatusBadRequest {
+ return nil, InputValidationError.Send(ctx, apiErr.Message)
+ }
+ }
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ graphql.AddError(ctx, PartialError.Send(ctx, err.Error()))
+ }
+
+ projectRef, err := model.FindBranchProjectRef(*project.Identifier)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error looking in project collection: %s", err.Error()))
+ }
+ if projectRef == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding project: %s", err.Error()))
+ }
+ apiProjectRef := restModel.APIProjectRef{}
+ if err = apiProjectRef.BuildFromService(*projectRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
+ }
+
+ if utility.FromBoolPtr(requestS3Creds) {
+ if err = data.RequestS3Creds(*apiProjectRef.Identifier, u.EmailAddress); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error creating jira ticket to request S3 credentials: %s", err.Error()))
+ }
+ }
+ return &apiProjectRef, nil
+}
+
+// CopyProject is the resolver for the copyProject field.
+func (r *mutationResolver) CopyProject(ctx context.Context, project data.CopyProjectOpts, requestS3Creds *bool) (*restModel.APIProjectRef, error) {
+ projectRef, err := data.CopyProject(ctx, evergreen.GetEnvironment(), project)
+ if projectRef == nil && err != nil {
+ apiErr, ok := err.(gimlet.ErrorResponse) // make sure bad request errors are handled correctly; all else should be treated as internal server error
+ if ok {
+ if apiErr.StatusCode == http.StatusBadRequest {
+ return nil, InputValidationError.Send(ctx, apiErr.Message)
+ }
+ // StatusNotFound and other error codes are really internal errors bc we determine this input
+ return nil, InternalServerError.Send(ctx, apiErr.Message)
+ }
+ return nil, InternalServerError.Send(ctx, err.Error())
+
+ }
+ if err != nil {
+ // Use AddError to bypass gqlgen restriction that data and errors cannot be returned in the same response
+ // https://github.com/99designs/gqlgen/issues/1191
+ graphql.AddError(ctx, PartialError.Send(ctx, err.Error()))
+ }
+ if utility.FromBoolPtr(requestS3Creds) {
+ usr := mustHaveUser(ctx)
+ if err = data.RequestS3Creds(*projectRef.Identifier, usr.EmailAddress); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error creating jira ticket to request AWS access: %s", err.Error()))
+ }
+ }
+ return projectRef, nil
+}
+
+// DefaultSectionToRepo is the resolver for the defaultSectionToRepo field.
+func (r *mutationResolver) DefaultSectionToRepo(ctx context.Context, projectID string, section ProjectSettingsSection) (*string, error) {
+ usr := mustHaveUser(ctx)
+ if err := model.DefaultSectionToRepo(projectID, model.ProjectPageSection(section), usr.Username()); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error defaulting to repo for section: %s", err.Error()))
+ }
+ return &projectID, nil
+}
+
+// DetachProjectFromRepo is the resolver for the detachProjectFromRepo field.
+func (r *mutationResolver) DetachProjectFromRepo(ctx context.Context, projectID string) (*restModel.APIProjectRef, error) {
+ usr := mustHaveUser(ctx)
+ pRef, err := data.FindProjectById(projectID, false, false)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding project %s: %s", projectID, err.Error()))
+ }
+ if pRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find project %s", projectID))
+ }
+ if err = pRef.DetachFromRepo(usr); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error detaching from repo: %s", err.Error()))
+ }
+
+ res := &restModel.APIProjectRef{}
+ if err := res.BuildFromService(*pRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building project from service: %s", err.Error()))
+ }
+ return res, nil
+}
+
+// ForceRepotrackerRun is the resolver for the forceRepotrackerRun field.
+func (r *mutationResolver) ForceRepotrackerRun(ctx context.Context, projectID string) (bool, error) {
+ ts := utility.RoundPartOfHour(1).Format(units.TSFormat)
+ j := units.NewRepotrackerJob(fmt.Sprintf("catchup-%s", ts), projectID)
+ if err := amboy.EnqueueUniqueJob(ctx, evergreen.GetEnvironment().RemoteQueue(), j); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error creating Repotracker job: %s", err.Error()))
+ }
+ return true, nil
+}
+
+// PromoteVarsToRepo is the resolver for the promoteVarsToRepo field.
+func (r *mutationResolver) PromoteVarsToRepo(ctx context.Context, projectID string, varNames []string) (bool, error) {
+ usr := mustHaveUser(ctx)
+ if err := data.PromoteVarsToRepo(projectID, varNames, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("promoting variables to repo for project '%s': %s", projectID, err.Error()))
+
+ }
+ return true, nil
+}
+
+// RemoveFavoriteProject is the resolver for the removeFavoriteProject field.
+func (r *mutationResolver) RemoveFavoriteProject(ctx context.Context, identifier string) (*restModel.APIProjectRef, error) {
+ p, err := model.FindBranchProjectRef(identifier)
+ if err != nil || p == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s", identifier))
+ }
+
+ usr := mustHaveUser(ctx)
+ err = usr.RemoveFavoriteProject(identifier)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error removing project : %s : %s", identifier, err))
+ }
+ apiProjectRef := restModel.APIProjectRef{}
+ err = apiProjectRef.BuildFromService(*p)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
+ }
+ return &apiProjectRef, nil
+}
+
+// SaveProjectSettingsForSection is the resolver for the saveProjectSettingsForSection field.
+func (r *mutationResolver) SaveProjectSettingsForSection(ctx context.Context, projectSettings *restModel.APIProjectSettings, section ProjectSettingsSection) (*restModel.APIProjectSettings, error) {
+ projectId := utility.FromStringPtr(projectSettings.ProjectRef.Id)
+ usr := mustHaveUser(ctx)
+ changes, err := data.SaveProjectSettingsForSection(ctx, projectId, projectSettings, model.ProjectPageSection(section), false, usr.Username())
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ return changes, nil
+}
+
+// SaveRepoSettingsForSection is the resolver for the saveRepoSettingsForSection field.
+func (r *mutationResolver) SaveRepoSettingsForSection(ctx context.Context, repoSettings *restModel.APIProjectSettings, section ProjectSettingsSection) (*restModel.APIProjectSettings, error) {
+ projectId := utility.FromStringPtr(repoSettings.ProjectRef.Id)
+ usr := mustHaveUser(ctx)
+ changes, err := data.SaveProjectSettingsForSection(ctx, projectId, repoSettings, model.ProjectPageSection(section), true, usr.Username())
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ return changes, nil
+}
+
+// DeactivateStepbackTask is the resolver for the deactivateStepbackTask field.
+func (r *mutationResolver) DeactivateStepbackTask(ctx context.Context, projectID string, buildVariantName string, taskName string) (bool, error) {
+ usr := mustHaveUser(ctx)
+ if err := task.DeactivateStepbackTask(projectID, buildVariantName, taskName, usr.Username()); err != nil {
+ return false, InternalServerError.Send(ctx, err.Error())
+ }
+ return true, nil
+}
+
+// AttachVolumeToHost is the resolver for the attachVolumeToHost field.
+func (r *mutationResolver) AttachVolumeToHost(ctx context.Context, volumeAndHost VolumeHost) (bool, error) {
+ statusCode, err := cloud.AttachVolume(ctx, volumeAndHost.VolumeID, volumeAndHost.HostID)
+ if err != nil {
+ return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
+ }
+ return statusCode == http.StatusOK, nil
+}
+
+// DetachVolumeFromHost is the resolver for the detachVolumeFromHost field.
+func (r *mutationResolver) DetachVolumeFromHost(ctx context.Context, volumeID string) (bool, error) {
+ statusCode, err := cloud.DetachVolume(ctx, volumeID)
+ if err != nil {
+ return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
+ }
+ return statusCode == http.StatusOK, nil
+}
+
+// EditSpawnHost is the resolver for the editSpawnHost field.
+func (r *mutationResolver) EditSpawnHost(ctx context.Context, spawnHost *EditSpawnHostInput) (*restModel.APIHost, error) {
+ var v *host.Volume
+ usr := mustHaveUser(ctx)
+ h, err := host.FindOneByIdOrTag(spawnHost.HostID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding host by id: %s", err))
+ }
+ if h == nil {
+ return nil, ResourceNotFound.Send(ctx, "Host not found")
+ }
+
+ if !host.CanUpdateSpawnHost(h, usr) {
+ return nil, Forbidden.Send(ctx, "You are not authorized to modify this host")
+ }
+
+ opts := host.HostModifyOptions{}
+ if spawnHost.DisplayName != nil {
+ opts.NewName = *spawnHost.DisplayName
+ }
+ if spawnHost.NoExpiration != nil {
+ opts.NoExpiration = spawnHost.NoExpiration
+ }
+ if spawnHost.Expiration != nil {
+ opts.AddHours = (*spawnHost.Expiration).Sub(h.ExpirationTime)
+ }
+ if spawnHost.InstanceType != nil {
+ var config *evergreen.Settings
+ config, err = evergreen.GetConfig()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, "unable to retrieve server config")
+ }
+ allowedTypes := config.Providers.AWS.AllowedInstanceTypes
+
+ err = cloud.CheckInstanceTypeValid(ctx, h.Distro, *spawnHost.InstanceType, allowedTypes)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error validating instance type: %s", err))
+ }
+ opts.InstanceType = *spawnHost.InstanceType
+ }
+ if spawnHost.AddedInstanceTags != nil || spawnHost.DeletedInstanceTags != nil {
+ addedTags := []host.Tag{}
+ deletedTags := []string{}
+ for _, tag := range spawnHost.AddedInstanceTags {
+ tag.CanBeModified = true
+ addedTags = append(addedTags, *tag)
+ }
+ for _, tag := range spawnHost.DeletedInstanceTags {
+ deletedTags = append(deletedTags, tag.Key)
+ }
+ opts.AddInstanceTags = addedTags
+ opts.DeleteInstanceTags = deletedTags
+ }
+ if spawnHost.Volume != nil {
+ v, err = host.FindVolumeByID(*spawnHost.Volume)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error finding requested volume id: %s", err))
+ }
+ if v.AvailabilityZone != h.Zone {
+ return nil, InputValidationError.Send(ctx, "Error mounting volume to spawn host, They must be in the same availability zone.")
+ }
+ opts.AttachVolume = *spawnHost.Volume
+ }
+ if spawnHost.PublicKey != nil {
+ if h.Status != evergreen.HostRunning {
+ return nil, InputValidationError.Send(ctx, fmt.Sprintf("Host must be running to add a public key but is '%s'", h.Status))
+ }
+ if utility.FromBoolPtr(spawnHost.SavePublicKey) {
+ if err = savePublicKey(ctx, *spawnHost.PublicKey); err != nil {
+ return nil, err
+ }
+ }
+ opts.AddKey = spawnHost.PublicKey.Key
+ if opts.AddKey == "" {
+ opts.AddKey, err = usr.GetPublicKey(spawnHost.PublicKey.Name)
+ if err != nil {
+ return nil, InputValidationError.Send(ctx, fmt.Sprintf("No matching key found for name '%s'", spawnHost.PublicKey.Name))
+ }
+ }
+ }
+ if err = cloud.ModifySpawnHost(ctx, evergreen.GetEnvironment(), h, opts); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error modifying spawn host: %s", err))
+ }
+ if spawnHost.ServicePassword != nil {
+ _, err = cloud.SetHostRDPPassword(ctx, evergreen.GetEnvironment(), h, *spawnHost.ServicePassword)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting spawn host password: %s", err))
+ }
+ }
+
+ apiHost := restModel.APIHost{}
+ apiHost.BuildFromService(h, nil)
+ return &apiHost, nil
+}
+
+// MigrateVolume is the resolver for the migrateVolume field.
+func (r *mutationResolver) MigrateVolume(ctx context.Context, volumeID string, spawnHostInput *SpawnHostInput) (bool, error) {
+ usr := mustHaveUser(ctx)
+ options, err := getHostRequestOptions(ctx, usr, spawnHostInput)
+ if err != nil {
+ return false, err
+ }
+ return data.MigrateVolume(ctx, volumeID, options, usr, evergreen.GetEnvironment())
+}
+
+// SpawnHost is the resolver for the spawnHost field.
+func (r *mutationResolver) SpawnHost(ctx context.Context, spawnHostInput *SpawnHostInput) (*restModel.APIHost, error) {
+ usr := mustHaveUser(ctx)
+ options, err := getHostRequestOptions(ctx, usr, spawnHostInput)
+ if err != nil {
+ return nil, err
+ }
+
+ spawnHost, err := data.NewIntentHost(ctx, options, usr, evergreen.GetEnvironment().Settings())
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error spawning host: %s", err))
+ }
+ if spawnHost == nil {
+ return nil, InternalServerError.Send(ctx, "An error occurred Spawn host is nil")
+ }
+ apiHost := restModel.APIHost{}
+ apiHost.BuildFromService(spawnHost, nil)
+ return &apiHost, nil
+}
+
+// SpawnVolume is the resolver for the spawnVolume field.
+func (r *mutationResolver) SpawnVolume(ctx context.Context, spawnVolumeInput SpawnVolumeInput) (bool, error) {
+ err := validateVolumeExpirationInput(ctx, spawnVolumeInput.Expiration, spawnVolumeInput.NoExpiration)
+ if err != nil {
+ return false, err
+ }
+ volumeRequest := host.Volume{
+ AvailabilityZone: spawnVolumeInput.AvailabilityZone,
+ Size: spawnVolumeInput.Size,
+ Type: spawnVolumeInput.Type,
+ CreatedBy: mustHaveUser(ctx).Id,
+ }
+ vol, statusCode, err := cloud.RequestNewVolume(ctx, volumeRequest)
+ if err != nil {
+ return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
+ }
+ if vol == nil {
+ return false, InternalServerError.Send(ctx, "Unable to create volume")
+ }
+ errorTemplate := "Volume %s has been created but an error occurred."
+ var additionalOptions restModel.VolumeModifyOptions
+ if spawnVolumeInput.Expiration != nil {
+ var newExpiration time.Time
+ newExpiration, err = restModel.FromTimePtr(spawnVolumeInput.Expiration)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Volume '%s' has been created but an error occurred: %s", vol.ID, err.Error()))
+ }
+ additionalOptions.Expiration = newExpiration
+ } else if spawnVolumeInput.NoExpiration != nil && *spawnVolumeInput.NoExpiration {
+ // this value should only ever be true or nil
+ additionalOptions.NoExpiration = true
+ }
+ err = applyVolumeOptions(ctx, *vol, additionalOptions)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Unable to apply expiration options to volume %s: %s", vol.ID, err.Error()))
+ }
+ if spawnVolumeInput.Host != nil {
+ statusCode, err := cloud.AttachVolume(ctx, vol.ID, *spawnVolumeInput.Host)
+ if err != nil {
+ return false, mapHTTPStatusToGqlError(ctx, statusCode, werrors.Wrapf(err, errorTemplate, vol.ID))
+ }
+ }
+ return true, nil
+}
+
+// RemoveVolume is the resolver for the removeVolume field.
+func (r *mutationResolver) RemoveVolume(ctx context.Context, volumeID string) (bool, error) {
+ statusCode, err := cloud.DeleteVolume(ctx, volumeID)
+ if err != nil {
+ return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
+ }
+ return statusCode == http.StatusOK, nil
+}
+
+// UpdateSpawnHostStatus is the resolver for the updateSpawnHostStatus field.
+func (r *mutationResolver) UpdateSpawnHostStatus(ctx context.Context, hostID string, action SpawnHostStatusActions) (*restModel.APIHost, error) {
+ h, err := host.FindOneByIdOrTag(hostID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error finding host by id: %s", err))
+ }
+ usr := mustHaveUser(ctx)
+ env := evergreen.GetEnvironment()
+
+ if !host.CanUpdateSpawnHost(h, usr) {
+ return nil, Forbidden.Send(ctx, "You are not authorized to modify this host")
+ }
+
+ var httpStatus int
+ switch action {
+ case SpawnHostStatusActionsStart:
+ httpStatus, err = data.StartSpawnHost(ctx, env, usr, h)
+ case SpawnHostStatusActionsStop:
+ httpStatus, err = data.StopSpawnHost(ctx, env, usr, h)
+ case SpawnHostStatusActionsTerminate:
+ httpStatus, err = data.TerminateSpawnHost(ctx, env, usr, h)
+ default:
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find matching status for action : %s", action))
+ }
+ if err != nil {
+ if httpStatus == http.StatusInternalServerError {
+ var parsedUrl, _ = url.Parse("/graphql/query")
+ grip.Error(message.WrapError(err, message.Fields{
+ "method": "POST",
+ "url": parsedUrl,
+ "code": httpStatus,
+ "action": action,
+ "request": gimlet.GetRequestID(ctx),
+ "stack": string(debug.Stack()),
+ }))
+ }
+ return nil, mapHTTPStatusToGqlError(ctx, httpStatus, err)
+ }
+ apiHost := restModel.APIHost{}
+ apiHost.BuildFromService(h, nil)
+ return &apiHost, nil
+}
+
+// UpdateVolume is the resolver for the updateVolume field.
+func (r *mutationResolver) UpdateVolume(ctx context.Context, updateVolumeInput UpdateVolumeInput) (bool, error) {
+ volume, err := host.FindVolumeByID(updateVolumeInput.VolumeID)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Error finding volume by id %s: %s", updateVolumeInput.VolumeID, err.Error()))
+ }
+ if volume == nil {
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find volume %s", updateVolumeInput.VolumeID))
+ }
+ err = validateVolumeExpirationInput(ctx, updateVolumeInput.Expiration, updateVolumeInput.NoExpiration)
+ if err != nil {
+ return false, err
+ }
+ err = validateVolumeName(ctx, updateVolumeInput.Name)
+ if err != nil {
+ return false, err
+ }
+ var updateOptions restModel.VolumeModifyOptions
+ if updateVolumeInput.NoExpiration != nil {
+ if *updateVolumeInput.NoExpiration {
+ // this value should only ever be true or nil
+ updateOptions.NoExpiration = true
+ } else {
+ // this value should only ever be true or nil
+ updateOptions.HasExpiration = true
+ }
+ }
+ if updateVolumeInput.Expiration != nil {
+ var newExpiration time.Time
+ newExpiration, err = restModel.FromTimePtr(updateVolumeInput.Expiration)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Error parsing time %s", err))
+ }
+ updateOptions.Expiration = newExpiration
+ }
+ if updateVolumeInput.Name != nil {
+ updateOptions.NewName = *updateVolumeInput.Name
+ }
+ err = applyVolumeOptions(ctx, *volume, updateOptions)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Unable to update volume %s: %s", volume.ID, err.Error()))
+ }
+
+ return true, nil
+}
+
+// AbortTask is the resolver for the abortTask field.
+func (r *mutationResolver) AbortTask(ctx context.Context, taskID string) (*restModel.APITask, error) {
+ t, err := task.FindOneId(taskID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
+ }
+ user := gimlet.GetUser(ctx).DisplayName()
+ err = model.AbortTask(taskID, user)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error aborting task %s: %s", taskID, err.Error()))
+ }
+ t, err = task.FindOneId(taskID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
+ }
+ apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
+ return apiTask, err
+}
+
+// OverrideTaskDependencies is the resolver for the overrideTaskDependencies field.
+func (r *mutationResolver) OverrideTaskDependencies(ctx context.Context, taskID string) (*restModel.APITask, error) {
+ currentUser := mustHaveUser(ctx)
+ t, err := task.FindByIdExecution(taskID, nil)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding task %s: %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
+ }
+ if err = t.SetOverrideDependencies(currentUser.Username()); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error overriding dependencies for task %s: %s", taskID, err.Error()))
+ }
+ return getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
+}
+
+// RestartTask is the resolver for the restartTask field.
+func (r *mutationResolver) RestartTask(ctx context.Context, taskID string, failedOnly bool) (*restModel.APITask, error) {
+ usr := mustHaveUser(ctx)
+ username := usr.Username()
+ t, err := task.FindOneId(taskID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task '%s': %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id '%s'", taskID))
+ }
+ if err := model.ResetTaskOrDisplayTask(evergreen.GetEnvironment().Settings(), t, username, evergreen.UIPackage, failedOnly, nil); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error restarting task '%s': %s", taskID, err.Error()))
+ }
+ t, err = task.FindOneIdAndExecutionWithDisplayStatus(taskID, nil)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id '%s': %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id '%s'", taskID))
+ }
+ apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
+ return apiTask, err
+}
+
+// ScheduleTasks is the resolver for the scheduleTasks field.
+func (r *mutationResolver) ScheduleTasks(ctx context.Context, taskIds []string) ([]*restModel.APITask, error) {
+ scheduledTasks := []*restModel.APITask{}
+ scheduled, err := setManyTasksScheduled(ctx, r.sc.GetURL(), true, taskIds...)
+ if err != nil {
+ return scheduledTasks, InternalServerError.Send(ctx, fmt.Sprintf("Failed to schedule tasks : %s", err.Error()))
+ }
+ scheduledTasks = append(scheduledTasks, scheduled...)
+ return scheduledTasks, nil
+}
+
+// SetTaskPriority is the resolver for the setTaskPriority field.
+func (r *mutationResolver) SetTaskPriority(ctx context.Context, taskID string, priority int) (*restModel.APITask, error) {
+ t, err := task.FindOneId(taskID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task %s: %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
+ }
+ authUser := gimlet.GetUser(ctx)
+ if priority > evergreen.MaxTaskPriority {
+ requiredPermission := gimlet.PermissionOpts{
+ Resource: t.Project,
+ ResourceType: evergreen.ProjectResourceType,
+ Permission: evergreen.PermissionTasks,
+ RequiredLevel: evergreen.TasksAdmin.Value,
+ }
+ isTaskAdmin := authUser.HasPermission(requiredPermission)
+ if !isTaskAdmin {
+ return nil, Forbidden.Send(ctx, fmt.Sprintf("Insufficient access to set priority %v, can only set priority less than or equal to %v", priority, evergreen.MaxTaskPriority))
+ }
+ }
+ if err = model.SetTaskPriority(*t, int64(priority), authUser.Username()); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting task priority %v: %v", taskID, err.Error()))
+ }
+
+ t, err = task.FindOneId(taskID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
+ }
+ if t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
+ }
+ apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
+ return apiTask, err
+}
+
+// UnscheduleTask is the resolver for the unscheduleTask field.
+func (r *mutationResolver) UnscheduleTask(ctx context.Context, taskID string) (*restModel.APITask, error) {
+ scheduled, err := setManyTasksScheduled(ctx, r.sc.GetURL(), false, taskID)
+ if err != nil {
+ return nil, err
+ }
+ if len(scheduled) == 0 {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find task: %s", taskID))
+ }
+ return scheduled[0], nil
+}
+
+// ClearMySubscriptions is the resolver for the clearMySubscriptions field.
+func (r *mutationResolver) ClearMySubscriptions(ctx context.Context) (int, error) {
+ usr := mustHaveUser(ctx)
+ username := usr.Username()
+ subs, err := event.FindSubscriptionsByOwner(username, event.OwnerTypePerson)
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error retrieving subscriptions %s", err.Error()))
+ }
+ subIDs := removeGeneralSubscriptions(usr, subs)
+ err = data.DeleteSubscriptions(username, subIDs)
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error deleting subscriptions %s", err.Error()))
+ }
+ return len(subIDs), nil
+}
+
+// CreatePublicKey is the resolver for the createPublicKey field.
+func (r *mutationResolver) CreatePublicKey(ctx context.Context, publicKeyInput PublicKeyInput) ([]*restModel.APIPubKey, error) {
+ err := savePublicKey(ctx, publicKeyInput)
+ if err != nil {
+ return nil, err
+ }
+ myPublicKeys := getMyPublicKeys(ctx)
+ return myPublicKeys, nil
+}
+
+// RemovePublicKey is the resolver for the removePublicKey field.
+func (r *mutationResolver) RemovePublicKey(ctx context.Context, keyName string) ([]*restModel.APIPubKey, error) {
+ if !doesPublicKeyNameAlreadyExist(ctx, keyName) {
+ return nil, InputValidationError.Send(ctx, fmt.Sprintf("Error deleting public key. Provided key name, %s, does not exist.", keyName))
+ }
+ err := mustHaveUser(ctx).DeletePublicKey(keyName)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error deleting public key: %s", err.Error()))
+ }
+ myPublicKeys := getMyPublicKeys(ctx)
+ return myPublicKeys, nil
+}
+
+// SaveSubscription is the resolver for the saveSubscription field.
+func (r *mutationResolver) SaveSubscription(ctx context.Context, subscription restModel.APISubscription) (bool, error) {
+ usr := mustHaveUser(ctx)
+ username := usr.Username()
+ idType, id, err := getResourceTypeAndIdFromSubscriptionSelectors(ctx, subscription.Selectors)
+ if err != nil {
+ return false, err
+ }
+ switch idType {
+ case "task":
+ t, taskErr := task.FindOneId(id)
+ if taskErr != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", id, taskErr.Error()))
+ }
+ if t == nil {
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", id))
+ }
+ case "build":
+ b, buildErr := build.FindOneId(id)
+ if buildErr != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding build by id %s: %s", id, buildErr.Error()))
+ }
+ if b == nil {
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find build with id %s", id))
+ }
+ case "version":
+ v, versionErr := model.VersionFindOneId(id)
+ if versionErr != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding version by id %s: %s", id, versionErr.Error()))
+ }
+ if v == nil {
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find version with id %s", id))
+ }
+ case "project":
+ p, projectErr := data.FindProjectById(id, false, false)
+ if projectErr != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding project by id %s: %s", id, projectErr.Error()))
+ }
+ if p == nil {
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find project with id %s", id))
+ }
+ default:
+ return false, InputValidationError.Send(ctx, "Selectors do not indicate a target version, build, project, or task ID")
+ }
+ err = data.SaveSubscriptions(username, []restModel.APISubscription{subscription}, false)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error saving subscription: %s", err.Error()))
+ }
+ return true, nil
+}
+
+// UpdatePublicKey is the resolver for the updatePublicKey field.
+func (r *mutationResolver) UpdatePublicKey(ctx context.Context, targetKeyName string, updateInfo PublicKeyInput) ([]*restModel.APIPubKey, error) {
+ if !doesPublicKeyNameAlreadyExist(ctx, targetKeyName) {
+ return nil, InputValidationError.Send(ctx, fmt.Sprintf("Error updating public key. The target key name, %s, does not exist.", targetKeyName))
+ }
+ if updateInfo.Name != targetKeyName && doesPublicKeyNameAlreadyExist(ctx, updateInfo.Name) {
+ return nil, InputValidationError.Send(ctx, fmt.Sprintf("Error updating public key. The updated key name, %s, already exists.", targetKeyName))
+ }
+ err := verifyPublicKey(ctx, updateInfo)
+ if err != nil {
+ return nil, err
+ }
+ usr := mustHaveUser(ctx)
+ err = usr.UpdatePublicKey(targetKeyName, updateInfo.Name, updateInfo.Key)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error updating public key, %s: %s", targetKeyName, err.Error()))
+ }
+ myPublicKeys := getMyPublicKeys(ctx)
+ return myPublicKeys, nil
+}
+
+// UpdateUserSettings is the resolver for the updateUserSettings field.
+func (r *mutationResolver) UpdateUserSettings(ctx context.Context, userSettings *restModel.APIUserSettings) (bool, error) {
+ usr := mustHaveUser(ctx)
+
+ updatedUserSettings, err := restModel.UpdateUserSettings(ctx, usr, *userSettings)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, err.Error())
+ }
+ err = data.UpdateSettings(usr, *updatedUserSettings)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Error saving userSettings : %s", err.Error()))
+ }
+ return true, nil
+}
+
+// RemoveItemFromCommitQueue is the resolver for the removeItemFromCommitQueue field.
+func (r *mutationResolver) RemoveItemFromCommitQueue(ctx context.Context, commitQueueID string, issue string) (*string, error) {
+ username := gimlet.GetUser(ctx).DisplayName()
+ result, err := data.CommitQueueRemoveItem(commitQueueID, issue, username, fmt.Sprintf("removed by user '%s'", username))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error removing item %s from commit queue %s: %s",
+ issue, commitQueueID, err.Error()))
+ }
+ if result == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("couldn't remove item %s from commit queue %s", issue, commitQueueID))
+ }
+ return &issue, nil
+}
+
+// RestartVersions is the resolver for the restartVersions field.
+func (r *mutationResolver) RestartVersions(ctx context.Context, versionID string, abort bool, versionsToRestart []*model.VersionToRestart) ([]*restModel.APIVersion, error) {
+ if len(versionsToRestart) == 0 {
+ return nil, InputValidationError.Send(ctx, "No versions provided. You must provide at least one version to restart")
+ }
+ modifications := model.VersionModification{
+ Action: evergreen.RestartAction,
+ Abort: abort,
+ VersionsToRestart: versionsToRestart,
+ }
+ err := modifyVersionHandler(ctx, versionID, modifications)
+ if err != nil {
+ return nil, err
+ }
+ versions := []*restModel.APIVersion{}
+ for _, version := range versionsToRestart {
+ if version.VersionId != nil {
+ v, versionErr := model.VersionFindOneId(*version.VersionId)
+ if versionErr != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding version by id %s: %s", *version.VersionId, versionErr.Error()))
+ }
+ if v == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find version with id %s", *version.VersionId))
+ }
+ apiVersion := restModel.APIVersion{}
+ apiVersion.BuildFromService(*v)
+ versions = append(versions, &apiVersion)
+ }
+ }
+ return versions, nil
+}
+
+// Mutation returns MutationResolver implementation.
+func (r *Resolver) Mutation() MutationResolver { return &mutationResolver{r} }
+
+type mutationResolver struct{ *Resolver }
diff --git a/graphql/patch_resolver.go b/graphql/patch_resolver.go
new file mode 100644
index 00000000000..d00bd24f0e3
--- /dev/null
+++ b/graphql/patch_resolver.go
@@ -0,0 +1,241 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/build"
+ "github.com/evergreen-ci/evergreen/model/patch"
+ "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/user"
+ "github.com/evergreen-ci/evergreen/rest/data"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+)
+
+// AuthorDisplayName is the resolver for the authorDisplayName field.
+func (r *patchResolver) AuthorDisplayName(ctx context.Context, obj *restModel.APIPatch) (string, error) {
+ usr, err := user.FindOneById(*obj.Author)
+ if err != nil {
+ return "", ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting user from user ID: %s", err.Error()))
+ }
+ if usr == nil {
+ return "", ResourceNotFound.Send(ctx, "Could not find user from user ID")
+ }
+ return usr.DisplayName(), nil
+}
+
+// BaseTaskStatuses is the resolver for the baseTaskStatuses field.
+func (r *patchResolver) BaseTaskStatuses(ctx context.Context, obj *restModel.APIPatch) ([]string, error) {
+ baseTasks, err := getVersionBaseTasks(*obj.Id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version base tasks: %s", err.Error()))
+ }
+ return getAllTaskStatuses(baseTasks), nil
+}
+
+// Builds is the resolver for the builds field.
+func (r *patchResolver) Builds(ctx context.Context, obj *restModel.APIPatch) ([]*restModel.APIBuild, error) {
+ builds, err := build.FindBuildsByVersions([]string{*obj.Version})
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding build by version %s: %s", *obj.Version, err.Error()))
+ }
+ var apiBuilds []*restModel.APIBuild
+ for _, build := range builds {
+ apiBuild := restModel.APIBuild{}
+ apiBuild.BuildFromService(build, nil)
+ apiBuilds = append(apiBuilds, &apiBuild)
+ }
+ return apiBuilds, nil
+}
+
+// CommitQueuePosition is the resolver for the commitQueuePosition field.
+func (r *patchResolver) CommitQueuePosition(ctx context.Context, obj *restModel.APIPatch) (*int, error) {
+ if err := obj.GetCommitQueuePosition(); err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ return obj.CommitQueuePosition, nil
+}
+
+// Duration is the resolver for the duration field.
+func (r *patchResolver) Duration(ctx context.Context, obj *restModel.APIPatch) (*PatchDuration, error) {
+ query := db.Query(task.ByVersion(*obj.Id)).WithFields(task.TimeTakenKey, task.StartTimeKey, task.FinishTimeKey, task.DisplayOnlyKey, task.ExecutionKey)
+ tasks, err := task.FindAllFirstExecution(query)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ if tasks == nil {
+ return nil, ResourceNotFound.Send(ctx, "Could not find any tasks for patch")
+ }
+ timeTaken, makespan := task.GetTimeSpent(tasks)
+
+ // return nil if rounded timeTaken/makespan == 0s
+ t := timeTaken.Round(time.Second).String()
+ var tPointer *string
+ if t != "0s" {
+ tFormated := formatDuration(t)
+ tPointer = &tFormated
+ }
+ m := makespan.Round(time.Second).String()
+ var mPointer *string
+ if m != "0s" {
+ mFormated := formatDuration(m)
+ mPointer = &mFormated
+ }
+
+ return &PatchDuration{
+ Makespan: mPointer,
+ TimeTaken: tPointer,
+ }, nil
+}
+
+// PatchTriggerAliases is the resolver for the patchTriggerAliases field.
+func (r *patchResolver) PatchTriggerAliases(ctx context.Context, obj *restModel.APIPatch) ([]*restModel.APIPatchTriggerDefinition, error) {
+ projectRef, err := data.FindProjectById(*obj.ProjectId, true, true)
+ if err != nil || projectRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s : %s", *obj.ProjectId, err))
+ }
+
+ if len(projectRef.PatchTriggerAliases) == 0 {
+ return nil, nil
+ }
+
+ projectCache := map[string]*model.Project{}
+ aliases := []*restModel.APIPatchTriggerDefinition{}
+ for _, alias := range projectRef.PatchTriggerAliases {
+ project, projectCached := projectCache[alias.ChildProject]
+ if !projectCached {
+ _, project, _, err = model.FindLatestVersionWithValidProject(alias.ChildProject)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting last known project for '%s': %s", alias.ChildProject, err.Error()))
+ }
+ projectCache[alias.ChildProject] = project
+ }
+
+ matchingTasks, err := project.VariantTasksForSelectors([]patch.PatchTriggerDefinition{alias}, *obj.Requester)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem matching tasks to alias definitions: %v", err.Error()))
+ }
+
+ variantsTasks := []restModel.VariantTask{}
+ for _, vt := range matchingTasks {
+ variantsTasks = append(variantsTasks, restModel.VariantTask{
+ Name: utility.ToStringPtr(vt.Variant),
+ Tasks: utility.ToStringPtrSlice(vt.Tasks),
+ })
+ }
+
+ identifier, err := model.GetIdentifierForProject(alias.ChildProject)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem getting child project identifier: %v", err.Error()))
+ }
+
+ aliases = append(aliases, &restModel.APIPatchTriggerDefinition{
+ Alias: utility.ToStringPtr(alias.Alias),
+ ChildProjectId: utility.ToStringPtr(alias.ChildProject),
+ ChildProjectIdentifier: utility.ToStringPtr(identifier),
+ VariantsTasks: variantsTasks,
+ })
+ }
+
+ return aliases, nil
+}
+
+// Project is the resolver for the project field.
+func (r *patchResolver) Project(ctx context.Context, obj *restModel.APIPatch) (*PatchProject, error) {
+ patchProject, err := getPatchProjectVariantsAndTasksForUI(ctx, obj)
+ if err != nil {
+ return nil, err
+ }
+ return patchProject, nil
+}
+
+// ProjectIdentifier is the resolver for the projectIdentifier field.
+func (r *patchResolver) ProjectIdentifier(ctx context.Context, obj *restModel.APIPatch) (string, error) {
+ obj.GetIdentifier()
+ return utility.FromStringPtr(obj.ProjectIdentifier), nil
+}
+
+// ProjectMetadata is the resolver for the projectMetadata field.
+func (r *patchResolver) ProjectMetadata(ctx context.Context, obj *restModel.APIPatch) (*restModel.APIProjectRef, error) {
+ apiProjectRef, err := getProjectMetadata(ctx, obj.ProjectId, obj.Id)
+ return apiProjectRef, err
+}
+
+// TaskCount is the resolver for the taskCount field.
+func (r *patchResolver) TaskCount(ctx context.Context, obj *restModel.APIPatch) (*int, error) {
+ taskCount, err := task.Count(db.Query(task.DisplayTasksByVersion(*obj.Id, false)))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting task count for patch %s: %s", *obj.Id, err.Error()))
+ }
+ return &taskCount, nil
+}
+
+// TaskStatuses is the resolver for the taskStatuses field.
+func (r *patchResolver) TaskStatuses(ctx context.Context, obj *restModel.APIPatch) ([]string, error) {
+ defaultSort := []task.TasksSortOrder{
+ {Key: task.DisplayNameKey, Order: 1},
+ }
+ opts := task.GetTasksByVersionOptions{
+ Sorts: defaultSort,
+ IncludeBaseTasks: false,
+ IncludeBuildVariantDisplayName: false,
+ }
+ tasks, _, err := task.GetTasksByVersion(ctx, *obj.Id, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version tasks: %s", err.Error()))
+ }
+ return getAllTaskStatuses(tasks), nil
+}
+
+// Time is the resolver for the time field.
+func (r *patchResolver) Time(ctx context.Context, obj *restModel.APIPatch) (*PatchTime, error) {
+ usr := mustHaveUser(ctx)
+
+ started, err := getFormattedDate(obj.StartTime, usr.Settings.Timezone)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ finished, err := getFormattedDate(obj.FinishTime, usr.Settings.Timezone)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ submittedAt, err := getFormattedDate(obj.CreateTime, usr.Settings.Timezone)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+
+ return &PatchTime{
+ Started: started,
+ Finished: finished,
+ SubmittedAt: *submittedAt,
+ }, nil
+}
+
+// VersionFull is the resolver for the versionFull field.
+func (r *patchResolver) VersionFull(ctx context.Context, obj *restModel.APIPatch) (*restModel.APIVersion, error) {
+ if utility.FromStringPtr(obj.Version) == "" {
+ return nil, nil
+ }
+ v, err := model.VersionFindOneId(*obj.Version)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while finding version with id: `%s`: %s", *obj.Version, err.Error()))
+ }
+ if v == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", *obj.Version))
+ }
+ apiVersion := restModel.APIVersion{}
+ apiVersion.BuildFromService(*v)
+ return &apiVersion, nil
+}
+
+// Patch returns PatchResolver implementation.
+func (r *Resolver) Patch() PatchResolver { return &patchResolver{r} }
+
+type patchResolver struct{ *Resolver }
diff --git a/graphql/permissions_resolver.go b/graphql/permissions_resolver.go
new file mode 100644
index 00000000000..e0625d5667f
--- /dev/null
+++ b/graphql/permissions_resolver.go
@@ -0,0 +1,29 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model/user"
+)
+
+// CanCreateProject is the resolver for the canCreateProject field.
+func (r *permissionsResolver) CanCreateProject(ctx context.Context, obj *Permissions) (bool, error) {
+ usr, err := user.FindOneById(obj.UserID)
+ if err != nil {
+ return false, ResourceNotFound.Send(ctx, "user not found")
+ }
+ canCreate, err := usr.HasProjectCreatePermission()
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Error checking user permission: %s", err.Error()))
+ }
+ return canCreate, nil
+}
+
+// Permissions returns PermissionsResolver implementation.
+func (r *Resolver) Permissions() PermissionsResolver { return &permissionsResolver{r} }
+
+type permissionsResolver struct{ *Resolver }
diff --git a/graphql/pod_resolver.go b/graphql/pod_resolver.go
new file mode 100644
index 00000000000..55a0aca5fa5
--- /dev/null
+++ b/graphql/pod_resolver.go
@@ -0,0 +1,98 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+)
+
+// Events is the resolver for the events field.
+func (r *podResolver) Events(ctx context.Context, obj *model.APIPod, limit *int, page *int) (*PodEvents, error) {
+ events, count, err := event.MostRecentPaginatedPodEvents(utility.FromStringPtr(obj.ID), *limit, *page)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("fetching pod events: %s", err.Error()))
+ }
+ apiEventLogEntries := []*model.PodAPIEventLogEntry{}
+ for _, e := range events {
+ apiEventLog := model.PodAPIEventLogEntry{}
+ err = apiEventLog.BuildFromService(e)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("building APIEventLogEntry from EventLog: %s", err.Error()))
+ }
+ apiEventLogEntries = append(apiEventLogEntries, &apiEventLog)
+ }
+ podEvents := PodEvents{
+ EventLogEntries: apiEventLogEntries,
+ Count: count,
+ }
+ return &podEvents, nil
+}
+
+// Status is the resolver for the status field.
+func (r *podResolver) Status(ctx context.Context, obj *model.APIPod) (string, error) {
+ return string(obj.Status), nil
+}
+
+// Task is the resolver for the task field.
+func (r *podResolver) Task(ctx context.Context, obj *model.APIPod) (*model.APITask, error) {
+ task, err := task.FindByIdExecution(utility.FromStringPtr(obj.TaskRuntimeInfo.RunningTaskID), obj.TaskRuntimeInfo.RunningTaskExecution)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s: %s", utility.FromStringPtr(obj.TaskRuntimeInfo.RunningTaskID), err.Error()))
+ }
+ if task == nil {
+ return nil, nil
+ }
+ apiTask := &model.APITask{}
+ err = apiTask.BuildFromService(task, &model.APITaskArgs{
+ LogURL: r.sc.GetURL(),
+ })
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building API task from service: %s", err.Error()))
+ }
+ return apiTask, nil
+}
+
+// Type is the resolver for the type field.
+func (r *podResolver) Type(ctx context.Context, obj *model.APIPod) (string, error) {
+ return string(obj.Type), nil
+}
+
+// Task is the resolver for the task field.
+func (r *podEventLogDataResolver) Task(ctx context.Context, obj *model.PodAPIEventData) (*model.APITask, error) {
+ if utility.FromStringPtr(obj.TaskID) == "" || obj.TaskExecution == nil {
+ return nil, nil
+ }
+ return getTask(ctx, *obj.TaskID, obj.TaskExecution, r.sc.GetURL())
+}
+
+// Os is the resolver for the os field.
+func (r *taskContainerCreationOptsResolver) Os(ctx context.Context, obj *model.APIPodTaskContainerCreationOptions) (string, error) {
+ return string(obj.OS), nil
+}
+
+// Arch is the resolver for the arch field.
+func (r *taskContainerCreationOptsResolver) Arch(ctx context.Context, obj *model.APIPodTaskContainerCreationOptions) (string, error) {
+ return string(obj.Arch), nil
+}
+
+// Pod returns PodResolver implementation.
+func (r *Resolver) Pod() PodResolver { return &podResolver{r} }
+
+// PodEventLogData returns PodEventLogDataResolver implementation.
+func (r *Resolver) PodEventLogData() PodEventLogDataResolver { return &podEventLogDataResolver{r} }
+
+// TaskContainerCreationOpts returns TaskContainerCreationOptsResolver implementation.
+func (r *Resolver) TaskContainerCreationOpts() TaskContainerCreationOptsResolver {
+ return &taskContainerCreationOptsResolver{r}
+}
+
+type podResolver struct{ *Resolver }
+type podEventLogDataResolver struct{ *Resolver }
+type taskContainerCreationOptsResolver struct{ *Resolver }
diff --git a/graphql/project_resolver.go b/graphql/project_resolver.go
new file mode 100644
index 00000000000..b91c3505247
--- /dev/null
+++ b/graphql/project_resolver.go
@@ -0,0 +1,59 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/patch"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+)
+
+// IsFavorite is the resolver for the isFavorite field.
+func (r *projectResolver) IsFavorite(ctx context.Context, obj *restModel.APIProjectRef) (bool, error) {
+ p, err := model.FindBranchProjectRef(*obj.Identifier)
+ if err != nil || p == nil {
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s : %s", *obj.Identifier, err))
+ }
+ usr := mustHaveUser(ctx)
+ if utility.StringSliceContains(usr.FavoriteProjects, *obj.Identifier) {
+ return true, nil
+ }
+ return false, nil
+}
+
+// Patches is the resolver for the patches field.
+func (r *projectResolver) Patches(ctx context.Context, obj *restModel.APIProjectRef, patchesInput PatchesInput) (*Patches, error) {
+ opts := patch.ByPatchNameStatusesCommitQueuePaginatedOptions{
+ Project: obj.Id,
+ PatchName: patchesInput.PatchName,
+ Statuses: patchesInput.Statuses,
+ Page: patchesInput.Page,
+ Limit: patchesInput.Limit,
+ OnlyCommitQueue: patchesInput.OnlyCommitQueue,
+ }
+
+ patches, count, err := patch.ByPatchNameStatusesCommitQueuePaginated(opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while fetching patches for this project : %s", err.Error()))
+ }
+ apiPatches := []*restModel.APIPatch{}
+ for _, p := range patches {
+ apiPatch := restModel.APIPatch{}
+ err = apiPatch.BuildFromService(p, nil) // Injecting DB info into APIPatch is handled by the resolvers.
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building APIPatch from service for patch: %s : %s", p.Id.Hex(), err.Error()))
+ }
+ apiPatches = append(apiPatches, &apiPatch)
+ }
+ return &Patches{Patches: apiPatches, FilteredPatchCount: count}, nil
+}
+
+// Project returns ProjectResolver implementation.
+func (r *Resolver) Project() ProjectResolver { return &projectResolver{r} }
+
+type projectResolver struct{ *Resolver }
diff --git a/graphql/project_settings_resolver.go b/graphql/project_settings_resolver.go
new file mode 100644
index 00000000000..38d59dedc78
--- /dev/null
+++ b/graphql/project_settings_resolver.go
@@ -0,0 +1,63 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/event"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+)
+
+// ProjectSubscriptions is the resolver for the projectSubscriptions field.
+func (r *projectEventSettingsResolver) ProjectSubscriptions(ctx context.Context, obj *restModel.APIProjectEventSettings) ([]*restModel.APISubscription, error) {
+ res := []*restModel.APISubscription{}
+ for _, sub := range obj.Subscriptions {
+ res = append(res, &sub)
+ }
+ return res, nil
+}
+
+// Aliases is the resolver for the aliases field.
+func (r *projectSettingsResolver) Aliases(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APIProjectAlias, error) {
+ return getAPIAliasesForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
+}
+
+// GithubWebhooksEnabled is the resolver for the githubWebhooksEnabled field.
+func (r *projectSettingsResolver) GithubWebhooksEnabled(ctx context.Context, obj *restModel.APIProjectSettings) (bool, error) {
+ hook, err := model.FindGithubHook(utility.FromStringPtr(obj.ProjectRef.Owner), utility.FromStringPtr(obj.ProjectRef.Repo))
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Database error finding github hook for project '%s': %s", *obj.ProjectRef.Id, err.Error()))
+ }
+ return hook != nil, nil
+}
+
+// ProjectSubscriptions is the resolver for the projectSubscriptions field.
+func (r *projectSettingsResolver) ProjectSubscriptions(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APISubscription, error) {
+ return getAPISubscriptionsForOwner(ctx, utility.FromStringPtr(obj.ProjectRef.Id), event.OwnerTypeProject)
+}
+
+// Subscriptions is the resolver for the subscriptions field.
+func (r *projectSettingsResolver) Subscriptions(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APISubscription, error) {
+ return getAPISubscriptionsForOwner(ctx, utility.FromStringPtr(obj.ProjectRef.Id), event.OwnerTypeProject)
+}
+
+// Vars is the resolver for the vars field.
+func (r *projectSettingsResolver) Vars(ctx context.Context, obj *restModel.APIProjectSettings) (*restModel.APIProjectVars, error) {
+ return getRedactedAPIVarsForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
+}
+
+// ProjectEventSettings returns ProjectEventSettingsResolver implementation.
+func (r *Resolver) ProjectEventSettings() ProjectEventSettingsResolver {
+ return &projectEventSettingsResolver{r}
+}
+
+// ProjectSettings returns ProjectSettingsResolver implementation.
+func (r *Resolver) ProjectSettings() ProjectSettingsResolver { return &projectSettingsResolver{r} }
+
+type projectEventSettingsResolver struct{ *Resolver }
+type projectSettingsResolver struct{ *Resolver }
diff --git a/graphql/project_vars_resolver.go b/graphql/project_vars_resolver.go
new file mode 100644
index 00000000000..a015b6df4b5
--- /dev/null
+++ b/graphql/project_vars_resolver.go
@@ -0,0 +1,40 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "sort"
+
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+)
+
+// AdminOnlyVars is the resolver for the adminOnlyVars field.
+func (r *projectVarsResolver) AdminOnlyVars(ctx context.Context, obj *restModel.APIProjectVars) ([]string, error) {
+ res := []string{}
+ for varAlias, isAdminOnly := range obj.AdminOnlyVars {
+ if isAdminOnly {
+ res = append(res, varAlias)
+ }
+ }
+ sort.Strings(res)
+ return res, nil
+}
+
+// PrivateVars is the resolver for the privateVars field.
+func (r *projectVarsResolver) PrivateVars(ctx context.Context, obj *restModel.APIProjectVars) ([]string, error) {
+ res := []string{}
+ for privateAlias, isPrivate := range obj.PrivateVars {
+ if isPrivate {
+ res = append(res, privateAlias)
+ }
+ }
+ sort.Strings(res)
+ return res, nil
+}
+
+// ProjectVars returns ProjectVarsResolver implementation.
+func (r *Resolver) ProjectVars() ProjectVarsResolver { return &projectVarsResolver{r} }
+
+type projectVarsResolver struct{ *Resolver }
diff --git a/graphql/query_resolver.go b/graphql/query_resolver.go
new file mode 100644
index 00000000000..f070b7957de
--- /dev/null
+++ b/graphql/query_resolver.go
@@ -0,0 +1,1037 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+ "sort"
+ "strconv"
+ "time"
+
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/distro"
+ "github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/model/host"
+ "github.com/evergreen-ci/evergreen/model/patch"
+ "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/model/testresult"
+ "github.com/evergreen-ci/evergreen/model/user"
+ "github.com/evergreen-ci/evergreen/rest/data"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/plank"
+ "github.com/evergreen-ci/utility"
+ "github.com/mongodb/anser/bsonutil"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
+ werrors "github.com/pkg/errors"
+)
+
+// BbGetCreatedTickets is the resolver for the bbGetCreatedTickets field.
+func (r *queryResolver) BbGetCreatedTickets(ctx context.Context, taskID string) ([]*thirdparty.JiraTicket, error) {
+ createdTickets, err := bbGetCreatedTicketsPointers(taskID)
+ if err != nil {
+ return nil, err
+ }
+
+ return createdTickets, nil
+}
+
+// BuildBaron is the resolver for the buildBaron field.
+func (r *queryResolver) BuildBaron(ctx context.Context, taskID string, execution int) (*BuildBaron, error) {
+ execString := strconv.Itoa(execution)
+
+ searchReturnInfo, bbConfig, err := model.GetSearchReturnInfo(taskID, execString)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+
+ return &BuildBaron{
+ SearchReturnInfo: searchReturnInfo,
+ BuildBaronConfigured: bbConfig.ProjectFound && bbConfig.SearchConfigured,
+ BbTicketCreationDefined: bbConfig.TicketCreationDefined,
+ }, nil
+}
+
+// AwsRegions is the resolver for the awsRegions field.
+func (r *queryResolver) AwsRegions(ctx context.Context) ([]string, error) {
+ return evergreen.GetEnvironment().Settings().Providers.AWS.AllowedRegions, nil
+}
+
+// ClientConfig is the resolver for the clientConfig field.
+func (r *queryResolver) ClientConfig(ctx context.Context) (*restModel.APIClientConfig, error) {
+ envClientConfig := evergreen.GetEnvironment().ClientConfig()
+ clientConfig := restModel.APIClientConfig{}
+ clientConfig.BuildFromService(*envClientConfig)
+ return &clientConfig, nil
+}
+
+// InstanceTypes is the resolver for the instanceTypes field.
+func (r *queryResolver) InstanceTypes(ctx context.Context) ([]string, error) {
+ config, err := evergreen.GetConfig()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, "unable to retrieve server config")
+ }
+ return config.Providers.AWS.AllowedInstanceTypes, nil
+}
+
+// SpruceConfig is the resolver for the spruceConfig field.
+func (r *queryResolver) SpruceConfig(ctx context.Context) (*restModel.APIAdminSettings, error) {
+ config, err := evergreen.GetConfig()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error Fetching evergreen settings: %s", err.Error()))
+ }
+
+ spruceConfig := restModel.APIAdminSettings{}
+ err = spruceConfig.BuildFromService(config)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building api admin settings from service: %s", err.Error()))
+ }
+ return &spruceConfig, nil
+}
+
+// SubnetAvailabilityZones is the resolver for the subnetAvailabilityZones field.
+func (r *queryResolver) SubnetAvailabilityZones(ctx context.Context) ([]string, error) {
+ zones := []string{}
+ for _, subnet := range evergreen.GetEnvironment().Settings().Providers.AWS.Subnets {
+ zones = append(zones, subnet.AZ)
+ }
+ return zones, nil
+}
+
+// Distros is the resolver for the distros field.
+func (r *queryResolver) Distros(ctx context.Context, onlySpawnable bool) ([]*restModel.APIDistro, error) {
+ apiDistros := []*restModel.APIDistro{}
+
+ var distros []distro.Distro
+ if onlySpawnable {
+ d, err := distro.Find(distro.BySpawnAllowed())
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while fetching spawnable distros: %s", err.Error()))
+ }
+ distros = d
+ } else {
+ d, err := distro.FindAll()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while fetching distros: %s", err.Error()))
+ }
+ distros = d
+ }
+ for _, d := range distros {
+ apiDistro := restModel.APIDistro{}
+ apiDistro.BuildFromService(d)
+ apiDistros = append(apiDistros, &apiDistro)
+ }
+ return apiDistros, nil
+}
+
+// DistroTaskQueue is the resolver for the distroTaskQueue field.
+func (r *queryResolver) DistroTaskQueue(ctx context.Context, distroID string) ([]*restModel.APITaskQueueItem, error) {
+ distroQueue, err := model.LoadTaskQueue(distroID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting task queue for distro %v: %v", distroID, err.Error()))
+ }
+ if distroQueue == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find queue with distro ID `%s`", distroID))
+ }
+
+ taskQueue := []*restModel.APITaskQueueItem{}
+
+ for _, taskQueueItem := range distroQueue.Queue {
+ apiTaskQueueItem := restModel.APITaskQueueItem{}
+ apiTaskQueueItem.BuildFromService(taskQueueItem)
+ taskQueue = append(taskQueue, &apiTaskQueueItem)
+ }
+
+ return taskQueue, nil
+}
+
+// Host is the resolver for the host field.
+func (r *queryResolver) Host(ctx context.Context, hostID string) (*restModel.APIHost, error) {
+ host, err := host.GetHostByIdOrTagWithTask(hostID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error Fetching host: %s", err.Error()))
+ }
+ if host == nil {
+ return nil, werrors.Errorf("unable to find host %s", hostID)
+ }
+
+ apiHost := &restModel.APIHost{}
+ apiHost.BuildFromService(host, host.RunningTaskFull)
+ return apiHost, nil
+}
+
+// HostEvents is the resolver for the hostEvents field.
+func (r *queryResolver) HostEvents(ctx context.Context, hostID string, hostTag *string, limit *int, page *int) (*HostEvents, error) {
+ h, err := host.FindOneByIdOrTag(hostID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding host '%s': %s", hostID, err.Error()))
+ }
+ if h == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("host '%s' not found", hostID))
+ }
+ events, count, err := event.MostRecentPaginatedHostEvents(h.Id, h.Tag, *limit, *page)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("fetching host events: %s", err.Error()))
+ }
+ // populate eventlogs pointer arrays
+ apiEventLogPointers := []*restModel.HostAPIEventLogEntry{}
+ for _, e := range events {
+ apiEventLog := restModel.HostAPIEventLogEntry{}
+ err = apiEventLog.BuildFromService(e)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("building APIEventLogEntry from EventLog: %s", err.Error()))
+ }
+ apiEventLogPointers = append(apiEventLogPointers, &apiEventLog)
+ }
+ hostevents := HostEvents{
+ EventLogEntries: apiEventLogPointers,
+ Count: count,
+ }
+ return &hostevents, nil
+}
+
+// Hosts is the resolver for the hosts field.
+func (r *queryResolver) Hosts(ctx context.Context, hostID *string, distroID *string, currentTaskID *string, statuses []string, startedBy *string, sortBy *HostSortBy, sortDir *SortDirection, page *int, limit *int) (*HostsResponse, error) {
+ hostIDParam := ""
+ if hostID != nil {
+ hostIDParam = *hostID
+ }
+ distroParam := ""
+ if distroID != nil {
+ distroParam = *distroID
+ }
+ currentTaskParam := ""
+ if currentTaskID != nil {
+ currentTaskParam = *currentTaskID
+ }
+ startedByParam := ""
+ if startedBy != nil {
+ startedByParam = *startedBy
+ }
+ sorter := host.StatusKey
+ if sortBy != nil {
+ switch *sortBy {
+ case HostSortByCurrentTask:
+ sorter = host.RunningTaskKey
+ case HostSortByDistro:
+ sorter = bsonutil.GetDottedKeyName(host.DistroKey, distro.IdKey)
+ case HostSortByElapsed:
+ sorter = "task_full.start_time"
+ case HostSortByID:
+ sorter = host.IdKey
+ case HostSortByIDLeTime:
+ sorter = host.TotalIdleTimeKey
+ case HostSortByOwner:
+ sorter = host.StartedByKey
+ case HostSortByStatus:
+ sorter = host.StatusKey
+ case HostSortByUptime:
+ sorter = host.CreateTimeKey
+ default:
+ sorter = host.StatusKey
+ }
+
+ }
+ sortDirParam := 1
+ if *sortDir == SortDirectionDesc {
+ sortDirParam = -1
+ }
+ pageParam := 0
+ if page != nil {
+ pageParam = *page
+ }
+ limitParam := 0
+ if limit != nil {
+ limitParam = *limit
+ }
+
+ hosts, filteredHostsCount, totalHostsCount, err := host.GetPaginatedRunningHosts(hostIDParam, distroParam, currentTaskParam, statuses, startedByParam, sorter, sortDirParam, pageParam, limitParam)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting hosts: %s", err.Error()))
+ }
+
+ apiHosts := []*restModel.APIHost{}
+
+ for _, h := range hosts {
+ apiHost := restModel.APIHost{}
+ apiHost.BuildFromService(&h, h.RunningTaskFull)
+ apiHosts = append(apiHosts, &apiHost)
+ }
+
+ return &HostsResponse{
+ Hosts: apiHosts,
+ FilteredHostsCount: filteredHostsCount,
+ TotalHostsCount: totalHostsCount,
+ }, nil
+}
+
+// TaskQueueDistros is the resolver for the taskQueueDistros field.
+func (r *queryResolver) TaskQueueDistros(ctx context.Context) ([]*TaskQueueDistro, error) {
+ queues, err := model.FindAllTaskQueues()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting all task queues: %v", err.Error()))
+ }
+
+ distros := []*TaskQueueDistro{}
+
+ for _, distro := range queues {
+ numHosts, err := host.CountRunningHosts(distro.Distro)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting associated hosts: %s", err.Error()))
+ }
+ tqd := TaskQueueDistro{
+ ID: distro.Distro,
+ TaskCount: len(distro.Queue),
+ HostCount: numHosts,
+ }
+ distros = append(distros, &tqd)
+ }
+
+ // sort distros by task count in descending order
+ sort.SliceStable(distros, func(i, j int) bool {
+ return distros[i].TaskCount > distros[j].TaskCount
+ })
+
+ return distros, nil
+}
+
+// Pod is the resolver for the pod field.
+func (r *queryResolver) Pod(ctx context.Context, podID string) (*restModel.APIPod, error) {
+ pod, err := data.FindAPIPodByID(podID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding pod: %s", err.Error()))
+ }
+ return pod, nil
+}
+
+// Patch is the resolver for the patch field.
+func (r *queryResolver) Patch(ctx context.Context, id string) (*restModel.APIPatch, error) {
+ patch, err := data.FindPatchById(id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+
+ if evergreen.IsFinishedPatchStatus(*patch.Status) {
+ failedAndAbortedStatuses := append(evergreen.TaskFailureStatuses, evergreen.TaskAborted)
+ opts := task.GetTasksByVersionOptions{
+ Statuses: failedAndAbortedStatuses,
+ FieldsToProject: []string{task.DisplayStatusKey},
+ IncludeBaseTasks: false,
+ IncludeBuildVariantDisplayName: false,
+ }
+ tasks, _, err := task.GetTasksByVersion(ctx, id, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not fetch tasks for patch: %s ", err.Error()))
+ }
+
+ if len(patch.ChildPatches) > 0 {
+ for _, cp := range patch.ChildPatches {
+ // add the child patch tasks to tasks so that we can consider their status
+ childPatchTasks, _, err := task.GetTasksByVersion(ctx, *cp.Id, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not fetch tasks for child patch: %s ", err.Error()))
+ }
+ tasks = append(tasks, childPatchTasks...)
+ }
+ }
+ statuses := getAllTaskStatuses(tasks)
+
+ // If theres an aborted task we should set the patch status to aborted if there are no other failures
+ if utility.StringSliceContains(statuses, evergreen.TaskAborted) {
+ if len(utility.StringSliceIntersection(statuses, evergreen.TaskFailureStatuses)) == 0 {
+ patch.Status = utility.ToStringPtr(evergreen.PatchAborted)
+ }
+ }
+ }
+ return patch, nil
+}
+
+// GithubProjectConflicts is the resolver for the githubProjectConflicts field.
+func (r *queryResolver) GithubProjectConflicts(ctx context.Context, projectID string) (*model.GithubProjectConflicts, error) {
+ pRef, err := model.FindMergedProjectRef(projectID, "", false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting project: %v", err.Error()))
+ }
+ if pRef == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("project '%s' not found", projectID))
+ }
+
+ conflicts, err := pRef.GetGithubProjectConflicts()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting project conflicts: %v", err.Error()))
+ }
+ return &conflicts, nil
+}
+
+// Project is the resolver for the project field.
+func (r *queryResolver) Project(ctx context.Context, projectIdentifier string) (*restModel.APIProjectRef, error) {
+ project, err := data.FindProjectById(projectIdentifier, true, false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding project by id %s: %s", projectIdentifier, err.Error()))
+ }
+ apiProjectRef := restModel.APIProjectRef{}
+ err = apiProjectRef.BuildFromService(*project)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProject from service: %s", err.Error()))
+ }
+ return &apiProjectRef, nil
+}
+
+// Projects is the resolver for the projects field.
+func (r *queryResolver) Projects(ctx context.Context) ([]*GroupedProjects, error) {
+ allProjects, err := model.FindAllMergedTrackedProjectRefs()
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, err.Error())
+ }
+ // We have to iterate over the merged project refs to verify if they are enabled
+ enabledProjects := []model.ProjectRef{}
+ for _, p := range allProjects {
+ if p.Enabled {
+ enabledProjects = append(enabledProjects, p)
+ }
+ }
+ groupedProjects, err := groupProjects(enabledProjects, false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error grouping project: %s", err.Error()))
+ }
+ return groupedProjects, nil
+}
+
+// ProjectEvents is the resolver for the projectEvents field.
+func (r *queryResolver) ProjectEvents(ctx context.Context, identifier string, limit *int, before *time.Time) (*ProjectEvents, error) {
+ timestamp := time.Now()
+ if before != nil {
+ timestamp = *before
+ }
+ events, err := data.GetProjectEventLog(identifier, timestamp, utility.FromIntPtr(limit))
+ res := &ProjectEvents{
+ EventLogEntries: getPointerEventList(events),
+ Count: len(events),
+ }
+ return res, err
+}
+
+// ProjectSettings is the resolver for the projectSettings field.
+func (r *queryResolver) ProjectSettings(ctx context.Context, identifier string) (*restModel.APIProjectSettings, error) {
+ projectRef, err := model.FindBranchProjectRef(identifier)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error looking in project collection: %s", err.Error()))
+ }
+ if projectRef == nil {
+ return nil, ResourceNotFound.Send(ctx, "project doesn't exist")
+ }
+
+ res := &restModel.APIProjectSettings{
+ ProjectRef: restModel.APIProjectRef{},
+ }
+ if err = res.ProjectRef.BuildFromService(*projectRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
+ }
+ if !projectRef.UseRepoSettings() {
+ // Default values so the UI understands what to do with nil values.
+ res.ProjectRef.DefaultUnsetBooleans()
+ }
+ return res, nil
+}
+
+// RepoEvents is the resolver for the repoEvents field.
+func (r *queryResolver) RepoEvents(ctx context.Context, id string, limit *int, before *time.Time) (*ProjectEvents, error) {
+ timestamp := time.Now()
+ if before != nil {
+ timestamp = *before
+ }
+ events, err := data.GetEventsById(id, timestamp, utility.FromIntPtr(limit))
+ res := &ProjectEvents{
+ EventLogEntries: getPointerEventList(events),
+ Count: len(events),
+ }
+ return res, err
+}
+
+// RepoSettings is the resolver for the repoSettings field.
+func (r *queryResolver) RepoSettings(ctx context.Context, id string) (*restModel.APIProjectSettings, error) {
+ repoRef, err := model.FindOneRepoRef(id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error looking in repo collection: %s", err.Error()))
+ }
+ if repoRef == nil {
+ return nil, ResourceNotFound.Send(ctx, "repo doesn't exist")
+ }
+
+ res := &restModel.APIProjectSettings{
+ ProjectRef: restModel.APIProjectRef{},
+ }
+ if err = res.ProjectRef.BuildFromService(repoRef.ProjectRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
+ }
+
+ // Default values so the UI understands what to do with nil values.
+ res.ProjectRef.DefaultUnsetBooleans()
+ return res, nil
+}
+
+// ViewableProjectRefs is the resolver for the viewableProjectRefs field.
+func (r *queryResolver) ViewableProjectRefs(ctx context.Context) ([]*GroupedProjects, error) {
+ usr := mustHaveUser(ctx)
+ projectIds, err := usr.GetViewableProjectSettings()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting viewable projects for '%s': '%s'", usr.DispName, err.Error()))
+ }
+
+ projects, err := model.FindProjectRefsByIds(projectIds...)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting projects: %v", err.Error()))
+ }
+
+ groupedProjects, err := groupProjects(projects, true)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error grouping project: %s", err.Error()))
+ }
+ return groupedProjects, nil
+}
+
+// MyHosts is the resolver for the myHosts field.
+func (r *queryResolver) MyHosts(ctx context.Context) ([]*restModel.APIHost, error) {
+ usr := mustHaveUser(ctx)
+ hosts, err := host.Find(host.ByUserWithRunningStatus(usr.Username()))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx,
+ fmt.Sprintf("Error finding running hosts for user %s : %s", usr.Username(), err))
+ }
+ duration := time.Duration(5) * time.Minute
+ timestamp := time.Now().Add(-duration) // within last 5 minutes
+ recentlyTerminatedHosts, err := host.Find(host.ByUserRecentlyTerminated(usr.Username(), timestamp))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx,
+ fmt.Sprintf("Error finding recently terminated hosts for user %s : %s", usr.Username(), err))
+ }
+ hosts = append(hosts, recentlyTerminatedHosts...)
+
+ var apiHosts []*restModel.APIHost
+ for _, h := range hosts {
+ apiHost := restModel.APIHost{}
+ apiHost.BuildFromService(&h, nil)
+ apiHosts = append(apiHosts, &apiHost)
+ }
+ return apiHosts, nil
+}
+
+// MyVolumes is the resolver for the myVolumes field.
+func (r *queryResolver) MyVolumes(ctx context.Context) ([]*restModel.APIVolume, error) {
+ usr := mustHaveUser(ctx)
+ volumes, err := host.FindSortedVolumesByUser(usr.Username())
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ return getAPIVolumeList(volumes)
+}
+
+// LogkeeperBuildMetadata is the resolver for the logkeeperBuildMetadata field.
+func (r *queryResolver) LogkeeperBuildMetadata(ctx context.Context, buildID string) (*plank.Build, error) {
+ client := plank.NewLogkeeperClient(plank.NewLogkeeperClientOptions{
+ BaseURL: evergreen.GetEnvironment().Settings().LoggerConfig.LogkeeperURL,
+ })
+ build, err := client.GetBuildMetadata(ctx, buildID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ return &build, nil
+}
+
+// Task is the resolver for the task field.
+func (r *queryResolver) Task(ctx context.Context, taskID string, execution *int) (*restModel.APITask, error) {
+ return getTask(ctx, taskID, execution, r.sc.GetURL())
+}
+
+// TaskAllExecutions is the resolver for the taskAllExecutions field.
+func (r *queryResolver) TaskAllExecutions(ctx context.Context, taskID string) ([]*restModel.APITask, error) {
+ latestTask, err := task.FindOneId(taskID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, err.Error())
+ }
+ if latestTask == nil {
+ return nil, werrors.Errorf("unable to find task %s", taskID)
+ }
+ allTasks := []*restModel.APITask{}
+ for i := 0; i < latestTask.Execution; i++ {
+ var dbTask *task.Task
+ dbTask, err = task.FindByIdExecution(taskID, &i)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, err.Error())
+ }
+ if dbTask == nil {
+ return nil, werrors.Errorf("unable to find task %s", taskID)
+ }
+ var apiTask *restModel.APITask
+ apiTask, err = getAPITaskFromTask(ctx, r.sc.GetURL(), *dbTask)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, "error converting task")
+ }
+ allTasks = append(allTasks, apiTask)
+ }
+ apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *latestTask)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, "error converting task")
+ }
+ allTasks = append(allTasks, apiTask)
+ return allTasks, nil
+}
+
+// TaskTests is the resolver for the taskTests field.
+func (r *queryResolver) TaskTests(ctx context.Context, taskID string, execution *int, sortCategory *TestSortCategory, sortDirection *SortDirection, page *int, limit *int, testName *string, statuses []string, groupID *string) (*TaskTestResult, error) {
+ dbTask, err := task.FindByIdExecution(taskID, execution)
+ if dbTask == nil || err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("finding task with id '%s' and execution %d", taskID, utility.FromIntPtr(execution)))
+ }
+ baseTaskOpts, err := getBaseTaskTestResultsOptions(ctx, dbTask)
+ if err != nil {
+ return nil, err
+ }
+
+ var sortBy string
+ if sortCategory != nil {
+ switch *sortCategory {
+ case TestSortCategoryStatus:
+ sortBy = testresult.SortByStatusKey
+ case TestSortCategoryDuration:
+ sortBy = testresult.SortByDurationKey
+ case TestSortCategoryTestName:
+ sortBy = testresult.SortByTestNameKey
+ case TestSortCategoryStartTime:
+ sortBy = testresult.SortByStartKey
+ case TestSortCategoryBaseStatus:
+ if len(baseTaskOpts) > 0 {
+ // Only sort by base status if we know there
+ // are base task options we can send to the
+ // results service.
+ sortBy = testresult.SortByBaseStatusKey
+ }
+ }
+ }
+ var sort []testresult.SortBy
+ if sortBy != "" {
+ sort = []testresult.SortBy{{Key: sortBy, OrderDSC: sortDirection != nil && *sortDirection == SortDirectionDesc}}
+ }
+
+ taskResults, err := dbTask.GetTestResults(
+ ctx,
+ evergreen.GetEnvironment(),
+ &testresult.FilterOptions{
+ TestName: utility.FromStringPtr(testName),
+ Statuses: statuses,
+ GroupID: utility.FromStringPtr(groupID),
+ Sort: sort,
+ Limit: utility.FromIntPtr(limit),
+ Page: utility.FromIntPtr(page),
+ BaseTasks: baseTaskOpts,
+ },
+ )
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding test results for task '%s': %s", taskID, err))
+ }
+
+ apiResults := make([]*restModel.APITest, len(taskResults.Results))
+ for i, t := range taskResults.Results {
+ apiTest := &restModel.APITest{}
+ if err = apiTest.BuildFromService(t.TaskID); err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ if err = apiTest.BuildFromService(&t); err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+
+ apiResults[i] = apiTest
+ }
+
+ return &TaskTestResult{
+ TestResults: apiResults,
+ TotalTestCount: taskResults.Stats.TotalCount,
+ FilteredTestCount: utility.FromIntPtr(taskResults.Stats.FilteredCount),
+ }, nil
+}
+
+// TaskTestSample is the resolver for the taskTestSample field.
+func (r *queryResolver) TaskTestSample(ctx context.Context, tasks []string, filters []*TestFilter) ([]*TaskTestResultSample, error) {
+ if len(tasks) == 0 {
+ return nil, nil
+ }
+ dbTasks, err := task.FindAll(db.Query(task.ByIds(tasks)))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding tasks %s: %s", tasks, err))
+ }
+ if len(dbTasks) == 0 {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Tasks %s not found", tasks))
+ }
+
+ failingTests := []string{}
+ for _, f := range filters {
+ failingTests = append(failingTests, f.TestName)
+ }
+
+ var allTaskOpts []testresult.TaskOptions
+ apiSamples := make([]*TaskTestResultSample, len(dbTasks))
+ apiSamplesByTaskID := map[string]*TaskTestResultSample{}
+ for i, dbTask := range dbTasks {
+ taskOpts, err := dbTask.CreateTestResultsTaskOptions()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error creating test results task options for task '%s': %s", dbTask.Id, err))
+ }
+
+ apiSamples[i] = &TaskTestResultSample{TaskID: dbTask.Id, Execution: dbTask.Execution}
+ for _, o := range taskOpts {
+ apiSamplesByTaskID[o.TaskID] = apiSamples[i]
+ }
+ allTaskOpts = append(allTaskOpts, taskOpts...)
+ }
+
+ if len(allTaskOpts) > 0 {
+ samples, err := testresult.GetFailedTestSamples(ctx, evergreen.GetEnvironment(), allTaskOpts, failingTests)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting test results sample: %s", err))
+ }
+
+ for _, sample := range samples {
+ apiSample, ok := apiSamplesByTaskID[sample.TaskID]
+ if !ok {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error: unexpected task '%s' in task test sample result", sample.TaskID))
+ }
+
+ apiSample.MatchingFailedTestNames = append(apiSample.MatchingFailedTestNames, sample.MatchingFailedTestNames...)
+ apiSample.TotalTestCount += sample.TotalFailedNames
+ }
+ }
+
+ return apiSamples, nil
+}
+
+// MyPublicKeys is the resolver for the myPublicKeys field.
+func (r *queryResolver) MyPublicKeys(ctx context.Context) ([]*restModel.APIPubKey, error) {
+ publicKeys := getMyPublicKeys(ctx)
+ return publicKeys, nil
+}
+
+// User is the resolver for the user field.
+func (r *queryResolver) User(ctx context.Context, userID *string) (*restModel.APIDBUser, error) {
+ usr := mustHaveUser(ctx)
+ var err error
+ if userID != nil {
+ usr, err = user.FindOneById(*userID)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting user from user ID: %s", err.Error()))
+ }
+ if usr == nil {
+ return nil, ResourceNotFound.Send(ctx, "Could not find user from user ID")
+ }
+ }
+ displayName := usr.DisplayName()
+ username := usr.Username()
+ email := usr.Email()
+ user := restModel.APIDBUser{
+ DisplayName: &displayName,
+ UserID: &username,
+ EmailAddress: &email,
+ }
+ return &user, nil
+}
+
+// UserConfig is the resolver for the userConfig field.
+func (r *queryResolver) UserConfig(ctx context.Context) (*UserConfig, error) {
+ usr := mustHaveUser(ctx)
+ settings := evergreen.GetEnvironment().Settings()
+ config := &UserConfig{
+ User: usr.Username(),
+ APIKey: usr.GetAPIKey(),
+ UIServerHost: settings.Ui.Url,
+ APIServerHost: settings.ApiUrl + "/api",
+ }
+ return config, nil
+}
+
+// UserSettings is the resolver for the userSettings field.
+func (r *queryResolver) UserSettings(ctx context.Context) (*restModel.APIUserSettings, error) {
+ usr := mustHaveUser(ctx)
+ userSettings := restModel.APIUserSettings{}
+ userSettings.BuildFromService(usr.Settings)
+ return &userSettings, nil
+}
+
+// CommitQueue is the resolver for the commitQueue field.
+func (r *queryResolver) CommitQueue(ctx context.Context, projectIdentifier string) (*restModel.APICommitQueue, error) {
+ commitQueue, err := data.FindCommitQueueForProject(projectIdentifier)
+ if err != nil {
+ if werrors.Cause(err) == err {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding commit queue for %s: %s", projectIdentifier, err.Error()))
+ }
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding commit queue for %s: %s", projectIdentifier, err.Error()))
+ }
+ project, err := data.FindProjectById(projectIdentifier, true, true)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding project %s: %s", projectIdentifier, err.Error()))
+ }
+ if project.CommitQueue.Message != "" {
+ commitQueue.Message = &project.CommitQueue.Message
+ }
+ commitQueue.Owner = &project.Owner
+ commitQueue.Repo = &project.Repo
+
+ for i, item := range commitQueue.Queue {
+ patchId := ""
+ if utility.FromStringPtr(item.Version) != "" {
+ patchId = utility.FromStringPtr(item.Version)
+ } else if utility.FromStringPtr(item.PatchId) != "" {
+ patchId = utility.FromStringPtr(item.PatchId)
+ }
+
+ if patchId != "" {
+ p, err := data.FindPatchById(patchId)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding patch: %s", err.Error()))
+ }
+ commitQueue.Queue[i].Patch = p
+ }
+ }
+ return commitQueue, nil
+}
+
+// BuildVariantsForTaskName is the resolver for the buildVariantsForTaskName field.
+func (r *queryResolver) BuildVariantsForTaskName(ctx context.Context, projectIdentifier string, taskName string) ([]*task.BuildVariantTuple, error) {
+ pid, err := model.GetIdForProject(projectIdentifier)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with id: %s", projectIdentifier))
+ }
+ repo, err := model.FindRepository(pid)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting repository for '%s': %s", pid, err.Error()))
+ }
+ if repo == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find repository '%s'", pid))
+ }
+ taskBuildVariants, err := task.FindUniqueBuildVariantNamesByTask(pid, taskName, repo.RevisionOrderNumber, false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting build variant tasks for task '%s': %s", taskName, err.Error()))
+ }
+ // use legacy lookup pipeline if no results are found
+ if len(taskBuildVariants) == 0 {
+ taskBuildVariants, err = task.FindUniqueBuildVariantNamesByTask(pid, taskName, repo.RevisionOrderNumber, true)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting build variant tasks using legacy pipeline for task '%s': %s", taskName, err.Error()))
+ }
+ }
+ if taskBuildVariants == nil {
+ return nil, nil
+ }
+ return taskBuildVariants, nil
+}
+
+// MainlineCommits is the resolver for the mainlineCommits field.
+func (r *queryResolver) MainlineCommits(ctx context.Context, options MainlineCommitsOptions, buildVariantOptions *BuildVariantOptions) (*MainlineCommits, error) {
+ projectId, err := model.GetIdForProject(options.ProjectIdentifier)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with id: %s", options.ProjectIdentifier))
+ }
+ limit := model.DefaultMainlineCommitVersionLimit
+ if utility.FromIntPtr(options.Limit) != 0 {
+ limit = utility.FromIntPtr(options.Limit)
+ }
+ requesters := options.Requesters
+ if len(requesters) == 0 {
+ requesters = evergreen.SystemVersionRequesterTypes
+ }
+ opts := model.MainlineCommitVersionOptions{
+ Limit: limit,
+ SkipOrderNumber: utility.FromIntPtr(options.SkipOrderNumber),
+ Requesters: requesters,
+ }
+
+ versions, err := model.GetMainlineCommitVersionsWithOptions(ctx, projectId, opts)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting activated versions: %s", err.Error()))
+ }
+
+ var mainlineCommits MainlineCommits
+ matchingVersionCount := 0
+
+ // We only want to return the PrevPageOrderNumber if a user is not on the first page
+ if options.SkipOrderNumber != nil {
+ prevPageCommit, err := model.GetPreviousPageCommitOrderNumber(ctx, projectId, utility.FromIntPtr(options.SkipOrderNumber), limit, requesters)
+
+ if err != nil {
+ // This shouldn't really happen, but if it does, we should return an error and log it
+ grip.Warning(message.WrapError(err, message.Fields{
+ "message": "Error getting most recent version",
+ "project_id": projectId,
+ }))
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting most recent mainline commit: %s", err.Error()))
+ }
+
+ if prevPageCommit != nil {
+ mainlineCommits.PrevPageOrderNumber = prevPageCommit
+ }
+ }
+
+ index := 0
+ versionsCheckedCount := 0
+
+ // We will loop through each version returned from GetMainlineCommitVersionsWithOptions and see if there is a commit that matches the filter parameters (if any).
+ // If there is a match, we will add it to the array of versions to be returned to the user.
+ // If there are not enough matches to satisfy our limit, we will call GetMainlineCommitVersionsWithOptions again with the next order number to check and repeat the process.
+ for matchingVersionCount < limit {
+ // If we no longer have any more versions to check break out and return what we have.
+ if len(versions) == 0 {
+ break
+ }
+ // If we have checked more versions than the MaxMainlineCommitVersionLimit then break out and return what we have.
+ if versionsCheckedCount >= model.MaxMainlineCommitVersionLimit {
+ // Return an error if we did not find any versions that match.
+ if matchingVersionCount == 0 {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Matching version not found in %d most recent versions", model.MaxMainlineCommitVersionLimit))
+ }
+ break
+ }
+ versionsCheckedCount++
+ v := versions[index]
+ apiVersion := restModel.APIVersion{}
+ apiVersion.BuildFromService(v)
+
+ // If the version was created before we started caching activation status we must manually verify it and cache that value.
+ if v.Activated == nil {
+ err = setVersionActivationStatus(ctx, &v)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting version activation status: %s", err.Error()))
+ }
+ }
+ mainlineCommitVersion := MainlineCommitVersion{}
+ shouldCollapse := false
+ if !utility.FromBoolPtr(v.Activated) {
+ shouldCollapse = true
+ } else if isPopulated(buildVariantOptions) && utility.FromBoolPtr(options.ShouldCollapse) {
+ opts := task.HasMatchingTasksOptions{
+ TaskNames: buildVariantOptions.Tasks,
+ Variants: buildVariantOptions.Variants,
+ Statuses: getValidTaskStatusesFilter(buildVariantOptions.Statuses),
+ IncludeNeverActivatedTasks: true,
+ }
+ hasTasks, err := task.HasMatchingTasks(ctx, v.Id, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error checking if version has tasks: %s", err.Error()))
+ }
+ if !hasTasks {
+ shouldCollapse = true
+ }
+ }
+ // If a version matches our filter criteria we append it directly to our returned list of mainlineCommits
+ if !shouldCollapse {
+ matchingVersionCount++
+ mainlineCommits.NextPageOrderNumber = utility.ToIntPtr(v.RevisionOrderNumber)
+ mainlineCommitVersion.Version = &apiVersion
+
+ } else {
+ // If a version does not match our filter criteria roll up all the unactivated versions that are sequentially near each other into a single MainlineCommitVersion,
+ // and then append it to our returned list.
+ // If we have any versions already we should check the most recent one first otherwise create a new one
+ if len(mainlineCommits.Versions) > 0 {
+ lastMainlineCommit := mainlineCommits.Versions[len(mainlineCommits.Versions)-1]
+
+ // If the previous mainlineCommit contains rolled up unactivated versions append the latest RolledUp unactivated version
+ if lastMainlineCommit.RolledUpVersions != nil {
+ lastMainlineCommit.RolledUpVersions = append(lastMainlineCommit.RolledUpVersions, &apiVersion)
+ } else {
+ mainlineCommitVersion.RolledUpVersions = []*restModel.APIVersion{&apiVersion}
+ }
+ } else {
+ mainlineCommitVersion.RolledUpVersions = []*restModel.APIVersion{&apiVersion}
+ }
+ }
+
+ // Only add a mainlineCommit if a new one was added and it's not a modified existing RolledUpVersion
+ if mainlineCommitVersion.Version != nil || mainlineCommitVersion.RolledUpVersions != nil {
+ mainlineCommits.Versions = append(mainlineCommits.Versions, &mainlineCommitVersion)
+ }
+ index++
+ // If we have exhausted all of our versions we should fetch some more.
+ if index == len(versions) && matchingVersionCount < limit {
+ skipOrderNumber := versions[len(versions)-1].RevisionOrderNumber
+ opts := model.MainlineCommitVersionOptions{
+ Limit: limit,
+ SkipOrderNumber: skipOrderNumber,
+ Requesters: requesters,
+ }
+
+ versions, err = model.GetMainlineCommitVersionsWithOptions(ctx, projectId, opts)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting activated versions: %s", err.Error()))
+ }
+ index = 0
+ }
+ }
+ return &mainlineCommits, nil
+}
+
+// TaskNamesForBuildVariant is the resolver for the taskNamesForBuildVariant field.
+func (r *queryResolver) TaskNamesForBuildVariant(ctx context.Context, projectIdentifier string, buildVariant string) ([]string, error) {
+ pid, err := model.GetIdForProject(projectIdentifier)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with id: %s", projectIdentifier))
+ }
+ repo, err := model.FindRepository(pid)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while getting repository for '%s': %s", pid, err.Error()))
+ }
+ if repo == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find repository '%s'", pid))
+ }
+ buildVariantTasks, err := task.FindTaskNamesByBuildVariant(pid, buildVariant, repo.RevisionOrderNumber)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while getting tasks for '%s': %s", buildVariant, err.Error()))
+ }
+ if buildVariantTasks == nil {
+ return []string{}, nil
+ }
+ return buildVariantTasks, nil
+}
+
+// HasVersion is the resolver for the hasVersion field.
+func (r *queryResolver) HasVersion(ctx context.Context, id string) (bool, error) {
+ v, err := model.VersionFindOne(model.VersionById(id))
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Error finding version %s: %s", id, err.Error()))
+ }
+ if v != nil {
+ return true, nil
+ }
+
+ if patch.IsValidId(id) {
+ p, err := patch.FindOneId(id)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Error finding patch %s: %s", id, err.Error()))
+ }
+ if p != nil {
+ return false, nil
+ }
+ }
+ return false, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find patch or version %s", id))
+}
+
+// Version is the resolver for the version field.
+func (r *queryResolver) Version(ctx context.Context, id string) (*restModel.APIVersion, error) {
+ v, err := model.VersionFindOneId(id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while finding version with id: `%s`: %s", id, err.Error()))
+ }
+ if v == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", id))
+ }
+ apiVersion := restModel.APIVersion{}
+ apiVersion.BuildFromService(*v)
+ return &apiVersion, nil
+}
+
+// Query returns QueryResolver implementation.
+func (r *Resolver) Query() QueryResolver { return &queryResolver{r} }
+
+type queryResolver struct{ *Resolver }
diff --git a/graphql/query_test.go b/graphql/query_test.go
index 06f4f2a0756..077dae6b9d7 100644
--- a/graphql/query_test.go
+++ b/graphql/query_test.go
@@ -24,6 +24,16 @@ func init() {
const projectId = "evergreen"
func getContext(t *testing.T) context.Context {
+ require.NoError(t, db.Clear(user.Collection),
+ "unable to clear user collection")
+ dbUser := &user.DBUser{
+ Id: apiUser,
+ Settings: user.UserSettings{
+ SlackUsername: "testuser",
+ SlackMemberId: "testuser",
+ },
+ }
+ require.NoError(t, dbUser.Insert())
const email = "testuser@mongodb.com"
const accessToken = "access_token"
const refreshToken = "refresh_token"
@@ -91,10 +101,10 @@ func TestMainlineCommits(t *testing.T) {
// Should return all mainline commits while folding up inactive ones when there are no filters
mainlineCommitOptions := MainlineCommitsOptions{
- ProjectID: projectId,
- SkipOrderNumber: nil,
- Limit: utility.ToIntPtr(2),
- ShouldCollapse: utility.FalsePtr(),
+ ProjectIdentifier: "evergreen",
+ SkipOrderNumber: nil,
+ Limit: utility.ToIntPtr(2),
+ ShouldCollapse: utility.FalsePtr(),
}
buildVariantOptions := BuildVariantOptions{}
res, err := config.Resolvers.Query().MainlineCommits(ctx, mainlineCommitOptions, &buildVariantOptions)
diff --git a/graphql/repo_settings_resolver.go b/graphql/repo_settings_resolver.go
new file mode 100644
index 00000000000..a426483629c
--- /dev/null
+++ b/graphql/repo_settings_resolver.go
@@ -0,0 +1,48 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/event"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+)
+
+// Aliases is the resolver for the aliases field.
+func (r *repoSettingsResolver) Aliases(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APIProjectAlias, error) {
+ return getAPIAliasesForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
+}
+
+// GithubWebhooksEnabled is the resolver for the githubWebhooksEnabled field.
+func (r *repoSettingsResolver) GithubWebhooksEnabled(ctx context.Context, obj *restModel.APIProjectSettings) (bool, error) {
+ hook, err := model.FindGithubHook(utility.FromStringPtr(obj.ProjectRef.Owner), utility.FromStringPtr(obj.ProjectRef.Repo))
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("Database error finding github hook for project '%s': %s", *obj.ProjectRef.Id, err.Error()))
+ }
+ return hook != nil, nil
+}
+
+// ProjectSubscriptions is the resolver for the projectSubscriptions field.
+func (r *repoSettingsResolver) ProjectSubscriptions(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APISubscription, error) {
+ return getAPISubscriptionsForOwner(ctx, utility.FromStringPtr(obj.ProjectRef.Id), event.OwnerTypeProject)
+}
+
+// Subscriptions is the resolver for the subscriptions field.
+func (r *repoSettingsResolver) Subscriptions(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APISubscription, error) {
+ return getAPISubscriptionsForOwner(ctx, utility.FromStringPtr(obj.ProjectRef.Id), event.OwnerTypeProject)
+}
+
+// Vars is the resolver for the vars field.
+func (r *repoSettingsResolver) Vars(ctx context.Context, obj *restModel.APIProjectSettings) (*restModel.APIProjectVars, error) {
+ return getRedactedAPIVarsForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
+}
+
+// RepoSettings returns RepoSettingsResolver implementation.
+func (r *Resolver) RepoSettings() RepoSettingsResolver { return &repoSettingsResolver{r} }
+
+type repoSettingsResolver struct{ *Resolver }
diff --git a/graphql/resolver.go b/graphql/resolver.go
new file mode 100644
index 00000000000..a17d05e08ac
--- /dev/null
+++ b/graphql/resolver.go
@@ -0,0 +1,127 @@
+package graphql
+
+// This file will always be generated when running gqlgen.
+// werrors imports in the resolvers are due to https://github.com/99designs/gqlgen/issues/1171.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/rest/data"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/gimlet"
+ "github.com/evergreen-ci/utility"
+)
+
+type Resolver struct {
+ sc data.Connector
+}
+
+func New(apiURL string) Config {
+ c := Config{
+ Resolvers: &Resolver{
+ sc: &data.DBConnector{URL: apiURL},
+ },
+ }
+ c.Directives.CanCreateProject = func(ctx context.Context, obj interface{}, next graphql.Resolver) (interface{}, error) {
+ // Allow if user is superuser
+ user := mustHaveUser(ctx)
+ opts := gimlet.PermissionOpts{
+ Resource: evergreen.SuperUserPermissionsID,
+ ResourceType: evergreen.SuperUserResourceType,
+ Permission: evergreen.PermissionProjectCreate,
+ RequiredLevel: evergreen.ProjectCreate.Value,
+ }
+ if user.HasPermission(opts) {
+ return next(ctx)
+ }
+
+ // Check if this call is for create or copy project
+ args, isStringMap := obj.(map[string]interface{})
+ if !isStringMap {
+ return nil, ResourceNotFound.Send(ctx, "Project not specified")
+ }
+ projectIdToCopy, hasProjectId := args["project"].(map[string]interface{})["projectIdToCopy"].(string)
+ if hasProjectId {
+ // Check if the user has permission to copy the project
+ opts := gimlet.PermissionOpts{
+ Resource: projectIdToCopy,
+ ResourceType: evergreen.ProjectResourceType,
+ Permission: evergreen.PermissionProjectSettings,
+ RequiredLevel: evergreen.ProjectSettingsEdit.Value,
+ }
+ if user.HasPermission(opts) {
+ return next(ctx)
+ }
+ } else {
+ canCreate, err := user.HasProjectCreatePermission()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error checking user permissions: %s", err.Error()))
+ }
+ if canCreate {
+ return next(ctx)
+ }
+ }
+ return nil, Forbidden.Send(ctx, fmt.Sprintf("user %s does not have permission to access this resolver", user.Username()))
+ }
+ c.Directives.RequireProjectAccess = func(ctx context.Context, obj interface{}, next graphql.Resolver, access ProjectSettingsAccess) (res interface{}, err error) {
+ user := mustHaveUser(ctx)
+
+ var permissionLevel int
+ if access == ProjectSettingsAccessEdit {
+ permissionLevel = evergreen.ProjectSettingsEdit.Value
+ } else if access == ProjectSettingsAccessView {
+ permissionLevel = evergreen.ProjectSettingsView.Value
+ } else {
+ return nil, Forbidden.Send(ctx, "Permission not specified")
+ }
+
+ args, isStringMap := obj.(map[string]interface{})
+ if !isStringMap {
+ return nil, ResourceNotFound.Send(ctx, "Project not specified")
+ }
+
+ projectId, err := getProjectIdFromArgs(ctx, args)
+ if err != nil {
+ return nil, err
+ }
+
+ opts := gimlet.PermissionOpts{
+ Resource: projectId,
+ ResourceType: evergreen.ProjectResourceType,
+ Permission: evergreen.PermissionProjectSettings,
+ RequiredLevel: permissionLevel,
+ }
+ if user.HasPermission(opts) {
+ return next(ctx)
+ }
+ return nil, Forbidden.Send(ctx, fmt.Sprintf("user %s does not have permission to access settings for the project %s", user.Username(), projectId))
+ }
+ c.Directives.RequireProjectFieldAccess = func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) {
+ user := mustHaveUser(ctx)
+
+ projectRef, isProjectRef := obj.(*restModel.APIProjectRef)
+ if !isProjectRef {
+ return nil, InternalServerError.Send(ctx, "project not valid")
+ }
+
+ projectId := utility.FromStringPtr(projectRef.Id)
+ if projectId == "" {
+ return nil, ResourceNotFound.Send(ctx, "project not specified")
+ }
+
+ opts := gimlet.PermissionOpts{
+ Resource: projectId,
+ ResourceType: evergreen.ProjectResourceType,
+ Permission: evergreen.PermissionProjectSettings,
+ RequiredLevel: evergreen.ProjectSettingsView.Value,
+ }
+ if user.HasPermission(opts) {
+ return next(ctx)
+ }
+ return nil, Forbidden.Send(ctx, fmt.Sprintf("user does not have permission to access the field '%s' for project with ID '%s'", graphql.GetFieldContext(ctx).Path(), projectId))
+ }
+ return c
+}
diff --git a/graphql/resolvers.go b/graphql/resolvers.go
deleted file mode 100644
index 86e4c345147..00000000000
--- a/graphql/resolvers.go
+++ /dev/null
@@ -1,4185 +0,0 @@
-package graphql
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
- "runtime/debug"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/99designs/gqlgen/graphql"
-
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/api"
- "github.com/evergreen-ci/evergreen/apimodels"
- "github.com/evergreen-ci/evergreen/cloud"
- "github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/db/mgo/bson"
- "github.com/evergreen-ci/evergreen/model"
- "github.com/evergreen-ci/evergreen/model/annotations"
- "github.com/evergreen-ci/evergreen/model/build"
- "github.com/evergreen-ci/evergreen/model/commitqueue"
- "github.com/evergreen-ci/evergreen/model/distro"
- "github.com/evergreen-ci/evergreen/model/event"
- "github.com/evergreen-ci/evergreen/model/host"
- "github.com/evergreen-ci/evergreen/model/manifest"
- "github.com/evergreen-ci/evergreen/model/patch"
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/evergreen-ci/evergreen/model/testresult"
- "github.com/evergreen-ci/evergreen/model/user"
- "github.com/evergreen-ci/evergreen/rest/data"
- restModel "github.com/evergreen-ci/evergreen/rest/model"
- "github.com/evergreen-ci/evergreen/thirdparty"
- "github.com/evergreen-ci/evergreen/units"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/evergreen-ci/gimlet"
- "github.com/evergreen-ci/utility"
- "github.com/mitchellh/mapstructure"
- adb "github.com/mongodb/anser/db"
- "github.com/mongodb/grip"
- "github.com/mongodb/grip/message"
- "github.com/pkg/errors"
-)
-
-type Resolver struct {
- sc data.Connector
-}
-
-func (r *Resolver) Mutation() MutationResolver {
- return &mutationResolver{r}
-}
-func (r *Resolver) Patch() PatchResolver {
- return &patchResolver{r}
-}
-func (r *Resolver) Query() QueryResolver {
- return &queryResolver{r}
-}
-func (r *Resolver) Task() TaskResolver {
- return &taskResolver{r}
-}
-func (r *Resolver) Host() HostResolver {
- return &hostResolver{r}
-}
-func (r *Resolver) Volume() VolumeResolver {
- return &volumeResolver{r}
-}
-func (r *Resolver) TaskQueueItem() TaskQueueItemResolver {
- return &taskQueueItemResolver{r}
-}
-func (r *Resolver) User() UserResolver {
- return &userResolver{r}
-}
-func (r *Resolver) Project() ProjectResolver {
- return &projectResolver{r}
-}
-
-func (r *Resolver) RepoRef() RepoRefResolver {
- return &repoRefResolver{r}
-}
-
-func (r *Resolver) Annotation() AnnotationResolver {
- return &annotationResolver{r}
-}
-
-func (r *Resolver) TaskLogs() TaskLogsResolver {
- return &taskLogsResolver{r}
-}
-
-func (r *Resolver) ProjectSettings() ProjectSettingsResolver {
- return &projectSettingsResolver{r}
-}
-
-func (r *Resolver) RepoSettings() RepoSettingsResolver {
- return &repoSettingsResolver{r}
-}
-
-func (r *Resolver) ProjectSubscriber() ProjectSubscriberResolver {
- return &projectSubscriberResolver{r}
-}
-
-func (r *Resolver) Permissions() PermissionsResolver {
- return &permissionsResolver{r}
-}
-
-// IssueLink returns IssueLinkResolver implementation.
-func (r *Resolver) IssueLink() IssueLinkResolver {
- return &issueLinkResolver{r}
-}
-
-func (r *Resolver) ProjectVars() ProjectVarsResolver {
- return &projectVarsResolver{r}
-}
-
-type annotationResolver struct{ *Resolver }
-type hostResolver struct{ *Resolver }
-type issueLinkResolver struct{ *Resolver }
-type mutationResolver struct{ *Resolver }
-type permissionsResolver struct{ *Resolver }
-type projectResolver struct{ *Resolver }
-type projectSettingsResolver struct{ *Resolver }
-type projectSubscriberResolver struct{ *Resolver }
-type projectVarsResolver struct{ *Resolver }
-type repoRefResolver struct{ *Resolver }
-type repoSettingsResolver struct{ *Resolver }
-type taskLogsResolver struct{ *Resolver }
-type taskQueueItemResolver struct{ *Resolver }
-type userResolver struct{ *Resolver }
-type volumeResolver struct{ *Resolver }
-
-func (r *hostResolver) DistroID(ctx context.Context, obj *restModel.APIHost) (*string, error) {
- return obj.Distro.Id, nil
-}
-
-func (r *hostResolver) HomeVolume(ctx context.Context, obj *restModel.APIHost) (*restModel.APIVolume, error) {
- if utility.FromStringPtr(obj.HomeVolumeID) != "" {
- volId := utility.FromStringPtr(obj.HomeVolumeID)
- volume, err := host.FindVolumeByID(volId)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting volume %s: %s", volId, err.Error()))
- }
- if volume == nil {
- grip.Error(message.Fields{
- "message": "could not find the volume associated with this host",
- "ticket": "EVG-16149",
- "host_id": obj.Id,
- "volume_id": volId,
- })
- return nil, nil
- }
- apiVolume := &restModel.APIVolume{}
- err = apiVolume.BuildFromService(volume)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building volume '%s' from service: %s", volId, err.Error()))
- }
- return apiVolume, nil
- }
- return nil, nil
-}
-
-func (r *hostResolver) Uptime(ctx context.Context, obj *restModel.APIHost) (*time.Time, error) {
- return obj.CreationTime, nil
-}
-
-func (r *hostResolver) Elapsed(ctx context.Context, obj *restModel.APIHost) (*time.Time, error) {
- return obj.RunningTask.StartTime, nil
-}
-
-func (r *hostResolver) Volumes(ctx context.Context, obj *restModel.APIHost) ([]*restModel.APIVolume, error) {
- volumes := make([]*restModel.APIVolume, 0, len(obj.AttachedVolumeIDs))
- for _, volId := range obj.AttachedVolumeIDs {
- volume, err := host.FindVolumeByID(volId)
- if err != nil {
- return volumes, InternalServerError.Send(ctx, fmt.Sprintf("Error getting volume %s", volId))
- }
- if volume == nil {
- continue
- }
- apiVolume := &restModel.APIVolume{}
- err = apiVolume.BuildFromService(volume)
- if err != nil {
- return nil, InternalServerError.Send(ctx, errors.Wrapf(err, "error building volume '%s' from service", volId).Error())
- }
- volumes = append(volumes, apiVolume)
- }
-
- return volumes, nil
-}
-
-func (r *volumeResolver) Host(ctx context.Context, obj *restModel.APIVolume) (*restModel.APIHost, error) {
- if obj.HostID == nil || *obj.HostID == "" {
- return nil, nil
- }
- host, err := host.FindOneId(*obj.HostID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding host %s: %s", *obj.HostID, err.Error()))
- }
- if host == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find host %s", *obj.HostID))
- }
- apiHost := restModel.APIHost{}
- err = apiHost.BuildFromService(host)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building apiHost %s from service: %s", host.Id, err))
- }
- return &apiHost, nil
-}
-
-func (r *queryResolver) HasVersion(ctx context.Context, id string) (bool, error) {
- v, err := model.VersionFindOne(model.VersionById(id))
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Error finding version %s: %s", id, err.Error()))
- }
- if v != nil {
- return true, nil
- }
-
- if patch.IsValidId(id) {
- p, err := patch.FindOneId(id)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Error finding patch %s: %s", id, err.Error()))
- }
- if p != nil {
- return false, nil
- }
- }
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find patch or version %s", id))
-}
-
-func (r *queryResolver) MyPublicKeys(ctx context.Context) ([]*restModel.APIPubKey, error) {
- publicKeys := getMyPublicKeys(ctx)
- return publicKeys, nil
-}
-
-func (r *taskResolver) Project(ctx context.Context, obj *restModel.APITask) (*restModel.APIProjectRef, error) {
- pRef, err := data.FindProjectById(*obj.ProjectId, true, false)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding project ref for project %s: %s", *obj.ProjectId, err.Error()))
- }
- if pRef == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find a ProjectRef for project %s", *obj.ProjectId))
- }
- apiProjectRef := restModel.APIProjectRef{}
- if err = apiProjectRef.BuildFromService(pRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIProject from service: %s", err.Error()))
- }
-
- return &apiProjectRef, nil
-}
-
-func (r *taskResolver) ProjectIdentifier(ctx context.Context, obj *restModel.APITask) (*string, error) {
- obj.GetProjectIdentifier()
- return obj.ProjectIdentifier, nil
-}
-
-func (r *taskResolver) AbortInfo(ctx context.Context, at *restModel.APITask) (*AbortInfo, error) {
- if !at.Aborted {
- return nil, nil
- }
-
- info := AbortInfo{
- User: at.AbortInfo.User,
- TaskID: at.AbortInfo.TaskID,
- NewVersion: at.AbortInfo.NewVersion,
- PrClosed: at.AbortInfo.PRClosed,
- }
-
- if len(at.AbortInfo.TaskID) > 0 {
- abortedTask, err := task.FindOneId(at.AbortInfo.TaskID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem getting aborted task %s: %s", *at.Id, err.Error()))
- }
- if abortedTask == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find aborted task %s: %s", at.AbortInfo.TaskID, err.Error()))
- }
- abortedTaskBuild, err := build.FindOneId(abortedTask.BuildId)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem getting build for aborted task %s: %s", abortedTask.BuildId, err.Error()))
- }
- if abortedTaskBuild == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find build %s for aborted task: %s", abortedTask.BuildId, err.Error()))
- }
- info.TaskDisplayName = abortedTask.DisplayName
- info.BuildVariantDisplayName = abortedTaskBuild.DisplayName
- }
-
- return &info, nil
-}
-
-func (r *taskResolver) DependsOn(ctx context.Context, at *restModel.APITask) ([]*Dependency, error) {
- dependencies := []*Dependency{}
- if len(at.DependsOn) == 0 {
- return nil, nil
- }
- depIds := []string{}
- for _, dep := range at.DependsOn {
- depIds = append(depIds, dep.TaskId)
- }
-
- dependencyTasks, err := task.FindWithFields(task.ByIds(depIds), task.DisplayNameKey, task.StatusKey,
- task.ActivatedKey, task.BuildVariantKey, task.DetailsKey, task.DependsOnKey)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Cannot find dependency tasks for task %s: %s", *at.Id, err.Error()))
- }
-
- taskMap := map[string]*task.Task{}
- for i := range dependencyTasks {
- taskMap[dependencyTasks[i].Id] = &dependencyTasks[i]
- }
-
- t, err := at.ToService()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *at.Id, err.Error()))
- }
-
- for _, dep := range at.DependsOn {
- depTask, ok := taskMap[dep.TaskId]
- if !ok {
- continue
- }
- var metStatus MetStatus
- if depTask.Status == evergreen.TaskStarted {
- metStatus = "STARTED"
- } else if !depTask.IsFinished() {
- metStatus = "PENDING"
- } else if t.SatisfiesDependency(depTask) {
- metStatus = "MET"
- } else {
- metStatus = "UNMET"
- }
- var requiredStatus RequiredStatus
- switch dep.Status {
- case model.AllStatuses:
- requiredStatus = "MUST_FINISH"
- case evergreen.TaskFailed:
- requiredStatus = "MUST_FAIL"
- default:
- requiredStatus = "MUST_SUCCEED"
- }
-
- dependency := Dependency{
- Name: depTask.DisplayName,
- BuildVariant: depTask.BuildVariant,
- MetStatus: metStatus,
- RequiredStatus: requiredStatus,
- TaskID: dep.TaskId,
- }
-
- dependencies = append(dependencies, &dependency)
- }
- return dependencies, nil
-}
-
-func (r *taskResolver) CanOverrideDependencies(ctx context.Context, at *restModel.APITask) (bool, error) {
- currentUser := mustHaveUser(ctx)
- if at.OverrideDependencies {
- return false, nil
- }
- // if the task is not the latest execution of the task, it can't be overridden
- if at.Archived {
- return false, nil
- }
- requiredPermission := gimlet.PermissionOpts{
- ResourceType: evergreen.ProjectResourceType,
- Permission: evergreen.PermissionTasks,
- RequiredLevel: evergreen.TasksAdmin.Value,
- Resource: *at.ProjectId,
- }
- overrideRequesters := []string{
- evergreen.PatchVersionRequester,
- evergreen.GithubPRRequester,
- }
- if len(at.DependsOn) > 0 && (utility.StringSliceContains(overrideRequesters, utility.FromStringPtr(at.Requester)) ||
- currentUser.HasPermission(requiredPermission)) {
- return true, nil
- }
- return false, nil
-}
-
-func (r *permissionsResolver) CanCreateProject(ctx context.Context, permissions *Permissions) (bool, error) {
- usr, err := user.FindOneById(permissions.UserID)
- if err != nil {
- return false, ResourceNotFound.Send(ctx, "user not found")
- }
- return usr.HasPermission(gimlet.PermissionOpts{
- Resource: evergreen.SuperUserPermissionsID,
- ResourceType: evergreen.SuperUserResourceType,
- Permission: evergreen.PermissionProjectCreate,
- RequiredLevel: evergreen.ProjectCreate.Value,
- }), nil
-}
-
-func (r *projectResolver) IsFavorite(ctx context.Context, at *restModel.APIProjectRef) (bool, error) {
- p, err := model.FindBranchProjectRef(*at.Identifier)
- if err != nil || p == nil {
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s : %s", *at.Identifier, err))
- }
- usr := mustHaveUser(ctx)
- if utility.StringSliceContains(usr.FavoriteProjects, *at.Identifier) {
- return true, nil
- }
- return false, nil
-}
-
-func (r *projectResolver) ValidDefaultLoggers(ctx context.Context, obj *restModel.APIProjectRef) ([]string, error) {
- return model.ValidDefaultLoggers, nil
-}
-
-func (r *repoRefResolver) ValidDefaultLoggers(ctx context.Context, obj *restModel.APIProjectRef) ([]string, error) {
- return model.ValidDefaultLoggers, nil
-}
-
-func (r *projectSettingsResolver) GithubWebhooksEnabled(ctx context.Context, obj *restModel.APIProjectSettings) (bool, error) {
- hook, err := model.FindGithubHook(utility.FromStringPtr(obj.ProjectRef.Owner), utility.FromStringPtr(obj.ProjectRef.Repo))
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Database error finding github hook for project '%s': %s", *obj.ProjectRef.Id, err.Error()))
- }
- return hook != nil, nil
-}
-
-func (r *projectSettingsResolver) Vars(ctx context.Context, obj *restModel.APIProjectSettings) (*restModel.APIProjectVars, error) {
- return getRedactedAPIVarsForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
-}
-
-func (r *projectSettingsResolver) Aliases(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APIProjectAlias, error) {
- return getAPIAliasesForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
-}
-func (r *projectSettingsResolver) Subscriptions(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APISubscription, error) {
- return getAPISubscriptionsForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
-}
-
-func (r *repoSettingsResolver) GithubWebhooksEnabled(ctx context.Context, obj *restModel.APIProjectSettings) (bool, error) {
- hook, err := model.FindGithubHook(utility.FromStringPtr(obj.ProjectRef.Owner), utility.FromStringPtr(obj.ProjectRef.Repo))
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Database error finding github hook for project '%s': %s", *obj.ProjectRef.Id, err.Error()))
- }
- return hook != nil, nil
-}
-
-func (r *repoSettingsResolver) Vars(ctx context.Context, obj *restModel.APIProjectSettings) (*restModel.APIProjectVars, error) {
- return getRedactedAPIVarsForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
-}
-
-func (r *repoSettingsResolver) Aliases(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APIProjectAlias, error) {
- return getAPIAliasesForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
-}
-
-func (r *repoSettingsResolver) Subscriptions(ctx context.Context, obj *restModel.APIProjectSettings) ([]*restModel.APISubscription, error) {
- return getAPISubscriptionsForProject(ctx, utility.FromStringPtr(obj.ProjectRef.Id))
-}
-
-func (r *projectVarsResolver) PrivateVars(ctx context.Context, obj *restModel.APIProjectVars) ([]*string, error) {
- res := []*string{}
- for privateAlias, isPrivate := range obj.PrivateVars {
- if isPrivate {
- res = append(res, utility.ToStringPtr(privateAlias))
- }
- }
- return res, nil
-}
-
-func (r *projectVarsResolver) AdminOnlyVars(ctx context.Context, obj *restModel.APIProjectVars) ([]*string, error) {
- res := []*string{}
- for varAlias, isAdminOnly := range obj.AdminOnlyVars {
- if isAdminOnly {
- res = append(res, utility.ToStringPtr(varAlias))
- }
- }
- return res, nil
-}
-
-func (r *projectSubscriberResolver) Subscriber(ctx context.Context, obj *restModel.APISubscriber) (*Subscriber, error) {
- res := &Subscriber{}
- subscriberType := utility.FromStringPtr(obj.Type)
-
- switch subscriberType {
- case event.GithubPullRequestSubscriberType:
- sub := restModel.APIGithubPRSubscriber{}
- if err := mapstructure.Decode(obj.Target, &sub); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem converting %s subscriber: %s",
- event.GithubPullRequestSubscriberType, err.Error()))
- }
- res.GithubPRSubscriber = &sub
- case event.GithubCheckSubscriberType:
- sub := restModel.APIGithubCheckSubscriber{}
- if err := mapstructure.Decode(obj.Target, &sub); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building %s subscriber from service: %s",
- event.GithubCheckSubscriberType, err.Error()))
- }
- res.GithubCheckSubscriber = &sub
-
- case event.EvergreenWebhookSubscriberType:
- sub := restModel.APIWebhookSubscriber{}
- if err := mapstructure.Decode(obj.Target, &sub); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building %s subscriber from service: %s",
- event.EvergreenWebhookSubscriberType, err.Error()))
- }
- res.WebhookSubscriber = &sub
-
- case event.JIRAIssueSubscriberType:
- sub := &restModel.APIJIRAIssueSubscriber{}
- if err := mapstructure.Decode(obj.Target, &sub); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building %s subscriber from service: %s",
- event.JIRAIssueSubscriberType, err.Error()))
- }
- res.JiraIssueSubscriber = sub
- case event.JIRACommentSubscriberType:
- res.JiraCommentSubscriber = obj.Target.(*string)
- case event.EmailSubscriberType:
- res.EmailSubscriber = obj.Target.(*string)
- case event.SlackSubscriberType:
- res.SlackSubscriber = obj.Target.(*string)
- case event.EnqueuePatchSubscriberType:
- // We don't store information in target for this case, so do nothing.
- default:
- return nil, errors.Errorf("unknown subscriber type: '%s'", subscriberType)
- }
-
- return res, nil
-}
-
-func (r *mutationResolver) AddFavoriteProject(ctx context.Context, identifier string) (*restModel.APIProjectRef, error) {
- p, err := model.FindBranchProjectRef(identifier)
- if err != nil || p == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find project '%s'", identifier))
- }
-
- usr := mustHaveUser(ctx)
-
- err = usr.AddFavoritedProject(identifier)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- apiProjectRef := restModel.APIProjectRef{}
- err = apiProjectRef.BuildFromService(p)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
- }
- return &apiProjectRef, nil
-}
-
-func (r *mutationResolver) RemoveFavoriteProject(ctx context.Context, identifier string) (*restModel.APIProjectRef, error) {
- p, err := model.FindBranchProjectRef(identifier)
- if err != nil || p == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s", identifier))
- }
-
- usr := mustHaveUser(ctx)
-
- err = usr.RemoveFavoriteProject(identifier)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error removing project : %s : %s", identifier, err))
- }
- apiProjectRef := restModel.APIProjectRef{}
- err = apiProjectRef.BuildFromService(p)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
- }
- return &apiProjectRef, nil
-}
-
-func (r *mutationResolver) SpawnVolume(ctx context.Context, spawnVolumeInput SpawnVolumeInput) (bool, error) {
- err := validateVolumeExpirationInput(ctx, spawnVolumeInput.Expiration, spawnVolumeInput.NoExpiration)
- if err != nil {
- return false, err
- }
- volumeRequest := host.Volume{
- AvailabilityZone: spawnVolumeInput.AvailabilityZone,
- Size: spawnVolumeInput.Size,
- Type: spawnVolumeInput.Type,
- CreatedBy: mustHaveUser(ctx).Id,
- }
- vol, statusCode, err := cloud.RequestNewVolume(ctx, volumeRequest)
- if err != nil {
- return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
- }
- if vol == nil {
- return false, InternalServerError.Send(ctx, "Unable to create volume")
- }
- errorTemplate := "Volume %s has been created but an error occurred."
- var additionalOptions restModel.VolumeModifyOptions
- if spawnVolumeInput.Expiration != nil {
- var newExpiration time.Time
- newExpiration, err = restModel.FromTimePtr(spawnVolumeInput.Expiration)
- if err != nil {
- return false, InternalServerError.Send(ctx, errors.Wrapf(err, errorTemplate, vol.ID).Error())
- }
- additionalOptions.Expiration = newExpiration
- } else if spawnVolumeInput.NoExpiration != nil && *spawnVolumeInput.NoExpiration {
- // this value should only ever be true or nil
- additionalOptions.NoExpiration = true
- }
- err = applyVolumeOptions(ctx, *vol, additionalOptions)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Unable to apply expiration options to volume %s: %s", vol.ID, err.Error()))
- }
- if spawnVolumeInput.Host != nil {
- statusCode, err := cloud.AttachVolume(ctx, vol.ID, *spawnVolumeInput.Host)
- if err != nil {
- return false, mapHTTPStatusToGqlError(ctx, statusCode, errors.Wrapf(err, errorTemplate, vol.ID))
- }
- }
-
- return true, nil
-}
-
-func (r *mutationResolver) UpdateVolume(ctx context.Context, updateVolumeInput UpdateVolumeInput) (bool, error) {
- volume, err := host.FindVolumeByID(updateVolumeInput.VolumeID)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Error finding volume by id %s: %s", updateVolumeInput.VolumeID, err.Error()))
- }
- if volume == nil {
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find volume %s", volume.ID))
- }
- err = validateVolumeExpirationInput(ctx, updateVolumeInput.Expiration, updateVolumeInput.NoExpiration)
- if err != nil {
- return false, err
- }
- err = validateVolumeName(ctx, updateVolumeInput.Name)
- if err != nil {
- return false, err
- }
- var updateOptions restModel.VolumeModifyOptions
- if updateVolumeInput.NoExpiration != nil {
- if *updateVolumeInput.NoExpiration {
- // this value should only ever be true or nil
- updateOptions.NoExpiration = true
- } else {
- // this value should only ever be true or nil
- updateOptions.HasExpiration = true
- }
- }
- if updateVolumeInput.Expiration != nil {
- var newExpiration time.Time
- newExpiration, err = restModel.FromTimePtr(updateVolumeInput.Expiration)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Error parsing time %s", err))
- }
- updateOptions.Expiration = newExpiration
- }
- if updateVolumeInput.Name != nil {
- updateOptions.NewName = *updateVolumeInput.Name
- }
- err = applyVolumeOptions(ctx, *volume, updateOptions)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Unable to update volume %s: %s", volume.ID, err.Error()))
- }
-
- return true, nil
-}
-
-func (r *mutationResolver) SpawnHost(ctx context.Context, spawnHostInput *SpawnHostInput) (*restModel.APIHost, error) {
- usr := mustHaveUser(ctx)
- if spawnHostInput.SavePublicKey {
- if err := savePublicKey(ctx, *spawnHostInput.PublicKey); err != nil {
- return nil, err
- }
- }
- dist, err := distro.FindOneId(spawnHostInput.DistroID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while trying to find distro with id: %s, err: `%s`", spawnHostInput.DistroID, err))
- }
- if dist == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find Distro with id: %s", spawnHostInput.DistroID))
- }
-
- options := &restModel.HostRequestOptions{
- DistroID: spawnHostInput.DistroID,
- Region: spawnHostInput.Region,
- KeyName: spawnHostInput.PublicKey.Key,
- IsVirtualWorkstation: spawnHostInput.IsVirtualWorkStation,
- NoExpiration: spawnHostInput.NoExpiration,
- }
- if spawnHostInput.SetUpScript != nil {
- options.SetupScript = *spawnHostInput.SetUpScript
- }
- if spawnHostInput.UserDataScript != nil {
- options.UserData = *spawnHostInput.UserDataScript
- }
- if spawnHostInput.HomeVolumeSize != nil {
- options.HomeVolumeSize = *spawnHostInput.HomeVolumeSize
- }
- if spawnHostInput.VolumeID != nil {
- options.HomeVolumeID = *spawnHostInput.VolumeID
- }
- if spawnHostInput.Expiration != nil {
- options.Expiration = spawnHostInput.Expiration
- }
-
- // passing an empty string taskId is okay as long as a
- // taskId is not required by other spawnHostInput parameters
- var t *task.Task
- if spawnHostInput.TaskID != nil && *spawnHostInput.TaskID != "" {
- options.TaskID = *spawnHostInput.TaskID
- if t, err = task.FindOneId(*spawnHostInput.TaskID); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error occurred finding task %s: %s", *spawnHostInput.TaskID, err.Error()))
- }
- }
-
- if utility.FromBoolPtr(spawnHostInput.UseProjectSetupScript) {
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, "A valid task id must be supplied when useProjectSetupScript is set to true")
- }
- options.UseProjectSetupScript = *spawnHostInput.UseProjectSetupScript
- }
- if utility.FromBoolPtr(spawnHostInput.TaskSync) {
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, "A valid task id must be supplied when taskSync is set to true")
- }
- options.TaskSync = *spawnHostInput.TaskSync
- }
-
- if utility.FromBoolPtr(spawnHostInput.SpawnHostsStartedByTask) {
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, "A valid task id must be supplied when SpawnHostsStartedByTask is set to true")
- }
- if err = data.CreateHostsFromTask(t, *usr, spawnHostInput.PublicKey.Key); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error spawning hosts from task: %s : %s", *spawnHostInput.TaskID, err))
- }
- }
-
- spawnHost, err := data.NewIntentHost(ctx, options, usr, evergreen.GetEnvironment().Settings())
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error spawning host: %s", err))
- }
- if spawnHost == nil {
- return nil, InternalServerError.Send(ctx, "An error occurred Spawn host is nil")
- }
- apiHost := restModel.APIHost{}
- if err := apiHost.BuildFromService(spawnHost); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building apiHost from service: %s", err))
- }
- return &apiHost, nil
-}
-
-func (r *mutationResolver) EditSpawnHost(ctx context.Context, editSpawnHostInput *EditSpawnHostInput) (*restModel.APIHost, error) {
- var v *host.Volume
- usr := mustHaveUser(ctx)
- h, err := host.FindOneByIdOrTag(editSpawnHostInput.HostID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding host by id: %s", err))
- }
-
- if !host.CanUpdateSpawnHost(h, usr) {
- return nil, Forbidden.Send(ctx, "You are not authorized to modify this host")
- }
-
- opts := host.HostModifyOptions{}
- if editSpawnHostInput.DisplayName != nil {
- opts.NewName = *editSpawnHostInput.DisplayName
- }
- if editSpawnHostInput.NoExpiration != nil {
- opts.NoExpiration = editSpawnHostInput.NoExpiration
- }
- if editSpawnHostInput.Expiration != nil {
- err = h.SetExpirationTime(*editSpawnHostInput.Expiration)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while modifying spawnhost expiration time: %s", err))
- }
- }
- if editSpawnHostInput.InstanceType != nil {
- var config *evergreen.Settings
- config, err = evergreen.GetConfig()
- if err != nil {
- return nil, InternalServerError.Send(ctx, "unable to retrieve server config")
- }
- allowedTypes := config.Providers.AWS.AllowedInstanceTypes
-
- err = cloud.CheckInstanceTypeValid(ctx, h.Distro, *editSpawnHostInput.InstanceType, allowedTypes)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error validating instance type: %s", err))
- }
- opts.InstanceType = *editSpawnHostInput.InstanceType
- }
- if editSpawnHostInput.AddedInstanceTags != nil || editSpawnHostInput.DeletedInstanceTags != nil {
- addedTags := []host.Tag{}
- deletedTags := []string{}
- for _, tag := range editSpawnHostInput.AddedInstanceTags {
- tag.CanBeModified = true
- addedTags = append(addedTags, *tag)
- }
- for _, tag := range editSpawnHostInput.DeletedInstanceTags {
- deletedTags = append(deletedTags, tag.Key)
- }
- opts.AddInstanceTags = addedTags
- opts.DeleteInstanceTags = deletedTags
- }
- if editSpawnHostInput.Volume != nil {
- v, err = host.FindVolumeByID(*editSpawnHostInput.Volume)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error finding requested volume id: %s", err))
- }
- if v.AvailabilityZone != h.Zone {
- return nil, InputValidationError.Send(ctx, "Error mounting volume to spawn host, They must be in the same availability zone.")
- }
- opts.AttachVolume = *editSpawnHostInput.Volume
- }
- if editSpawnHostInput.PublicKey != nil {
- if utility.FromBoolPtr(editSpawnHostInput.SavePublicKey) {
- if err = savePublicKey(ctx, *editSpawnHostInput.PublicKey); err != nil {
- return nil, err
- }
- }
- opts.AddKey = editSpawnHostInput.PublicKey.Key
- if opts.AddKey == "" {
- opts.AddKey, err = usr.GetPublicKey(editSpawnHostInput.PublicKey.Name)
- if err != nil {
- return nil, InputValidationError.Send(ctx, fmt.Sprintf("No matching key found for name '%s'", editSpawnHostInput.PublicKey.Name))
- }
- }
- }
- if err = cloud.ModifySpawnHost(ctx, evergreen.GetEnvironment(), h, opts); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error modifying spawn host: %s", err))
- }
- if editSpawnHostInput.ServicePassword != nil {
- _, err = cloud.SetHostRDPPassword(ctx, evergreen.GetEnvironment(), h, *editSpawnHostInput.ServicePassword)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting spawn host password: %s", err))
- }
- }
-
- apiHost := restModel.APIHost{}
- err = apiHost.BuildFromService(h)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building apiHost from service: %s", err))
- }
- return &apiHost, nil
-}
-
-func (r *mutationResolver) UpdateSpawnHostStatus(ctx context.Context, hostID string, action SpawnHostStatusActions) (*restModel.APIHost, error) {
- h, err := host.FindOneByIdOrTag(hostID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error finding host by id: %s", err))
- }
- usr := mustHaveUser(ctx)
- env := evergreen.GetEnvironment()
-
- if !host.CanUpdateSpawnHost(h, usr) {
- return nil, Forbidden.Send(ctx, "You are not authorized to modify this host")
- }
-
- var httpStatus int
- switch action {
- case SpawnHostStatusActionsStart:
- httpStatus, err = data.StartSpawnHost(ctx, env, usr, h)
- case SpawnHostStatusActionsStop:
- httpStatus, err = data.StopSpawnHost(ctx, env, usr, h)
- case SpawnHostStatusActionsTerminate:
- httpStatus, err = data.TerminateSpawnHost(ctx, env, usr, h)
- default:
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find matching status for action : %s", action))
- }
- if err != nil {
- if httpStatus == http.StatusInternalServerError {
- var parsedUrl, _ = url.Parse("/graphql/query")
- grip.Error(message.WrapError(err, message.Fields{
- "method": "POST",
- "url": parsedUrl,
- "code": httpStatus,
- "action": action,
- "request": gimlet.GetRequestID(ctx),
- "stack": string(debug.Stack()),
- }))
- }
- return nil, mapHTTPStatusToGqlError(ctx, httpStatus, err)
- }
- apiHost := restModel.APIHost{}
- err = apiHost.BuildFromService(h)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building apiHost from service: %s", err))
- }
- return &apiHost, nil
-
-}
-
-type queryResolver struct{ *Resolver }
-
-func (r *queryResolver) Hosts(ctx context.Context, hostID *string, distroID *string, currentTaskID *string, statuses []string, startedBy *string, sortBy *HostSortBy, sortDir *SortDirection, page *int, limit *int) (*HostsResponse, error) {
- hostIDParam := ""
- if hostID != nil {
- hostIDParam = *hostID
- }
- distroParam := ""
- if distroID != nil {
- distroParam = *distroID
- }
- currentTaskParam := ""
- if currentTaskID != nil {
- currentTaskParam = *currentTaskID
- }
- startedByParam := ""
- if startedBy != nil {
- startedByParam = *startedBy
- }
- sorter := host.StatusKey
- if sortBy != nil {
- switch *sortBy {
- case HostSortByCurrentTask:
- sorter = host.RunningTaskKey
- case HostSortByDistro:
- sorter = host.DistroKey
- case HostSortByElapsed:
- sorter = "task_full.start_time"
- case HostSortByID:
- sorter = host.IdKey
- case HostSortByIDLeTime:
- sorter = host.TotalIdleTimeKey
- case HostSortByOwner:
- sorter = host.StartedByKey
- case HostSortByStatus:
- sorter = host.StatusKey
- case HostSortByUptime:
- sorter = host.CreateTimeKey
- default:
- sorter = host.StatusKey
- }
-
- }
- sortDirParam := 1
- if *sortDir == SortDirectionDesc {
- sortDirParam = -1
- }
- pageParam := 0
- if page != nil {
- pageParam = *page
- }
- limitParam := 0
- if limit != nil {
- limitParam = *limit
- }
-
- hosts, filteredHostsCount, totalHostsCount, err := host.GetPaginatedRunningHosts(hostIDParam, distroParam, currentTaskParam, statuses, startedByParam, sorter, sortDirParam, pageParam, limitParam)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting hosts: %s", err.Error()))
- }
-
- apiHosts := []*restModel.APIHost{}
-
- for _, host := range hosts {
- apiHost := restModel.APIHost{}
-
- err = apiHost.BuildFromService(host)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building API Host from Service: %s", err.Error()))
- }
-
- if host.RunningTask != "" {
- // Add the task information to the host document.
- if err = apiHost.BuildFromService(host.RunningTaskFull); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error converting from host.Host to model.APIHost: %s", err.Error()))
- }
- }
-
- apiHosts = append(apiHosts, &apiHost)
- }
-
- return &HostsResponse{
- Hosts: apiHosts,
- FilteredHostsCount: filteredHostsCount,
- TotalHostsCount: totalHostsCount,
- }, nil
-}
-
-func (r *queryResolver) Host(ctx context.Context, hostID string) (*restModel.APIHost, error) {
- host, err := host.GetHostByIdOrTagWithTask(hostID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error Fetching host: %s", err.Error()))
- }
- if host == nil {
- return nil, errors.Errorf("unable to find host %s", hostID)
- }
-
- apiHost := &restModel.APIHost{}
- err = apiHost.BuildFromService(host)
- if err != nil || apiHost == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error converting from host.Host to model.APIHost: %s", err.Error()))
- }
-
- if host.RunningTask != "" {
- // Add the task information to the host document.
- if err = apiHost.BuildFromService(host.RunningTaskFull); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error converting from host.Host to model.APIHost: %s", err.Error()))
- }
- }
-
- return apiHost, nil
-}
-
-func (r *queryResolver) MyVolumes(ctx context.Context) ([]*restModel.APIVolume, error) {
- usr := mustHaveUser(ctx)
- volumes, err := host.FindSortedVolumesByUser(usr.Username())
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- return getAPIVolumeList(volumes)
-}
-
-func (r *queryResolver) MyHosts(ctx context.Context) ([]*restModel.APIHost, error) {
- usr := mustHaveUser(ctx)
- hosts, err := host.Find(host.ByUserWithRunningStatus(usr.Username()))
- if err != nil {
- return nil, InternalServerError.Send(ctx,
- fmt.Sprintf("Error finding running hosts for user %s : %s", usr.Username(), err))
- }
- duration := time.Duration(5) * time.Minute
- timestamp := time.Now().Add(-duration) // within last 5 minutes
- recentlyTerminatedHosts, err := host.Find(host.ByUserRecentlyTerminated(usr.Username(), timestamp))
- if err != nil {
- return nil, InternalServerError.Send(ctx,
- fmt.Sprintf("Error finding recently terminated hosts for user %s : %s", usr.Username(), err))
- }
- hosts = append(hosts, recentlyTerminatedHosts...)
-
- var apiHosts []*restModel.APIHost
- for _, host := range hosts {
- apiHost := restModel.APIHost{}
- err = apiHost.BuildFromService(host)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIHost from service: %s", err.Error()))
- }
- apiHosts = append(apiHosts, &apiHost)
- }
- return apiHosts, nil
-}
-
-func (r *queryResolver) ProjectSettings(ctx context.Context, identifier string) (*restModel.APIProjectSettings, error) {
- projectRef, err := model.FindBranchProjectRef(identifier)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error looking in project collection: %s", err.Error()))
- }
- if projectRef == nil {
- return nil, ResourceNotFound.Send(ctx, "project doesn't exist")
- }
-
- res := &restModel.APIProjectSettings{
- ProjectRef: restModel.APIProjectRef{},
- }
- if err = res.ProjectRef.BuildFromService(projectRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
- }
- if !projectRef.UseRepoSettings() {
- // Default values so the UI understands what to do with nil values.
- res.ProjectRef.DefaultUnsetBooleans()
- }
- return res, nil
-}
-
-func (r *queryResolver) RepoSettings(ctx context.Context, id string) (*restModel.APIProjectSettings, error) {
- repoRef, err := model.FindOneRepoRef(id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error looking in repo collection: %s", err.Error()))
- }
- if repoRef == nil {
- return nil, ResourceNotFound.Send(ctx, "repo doesn't exist")
- }
-
- res := &restModel.APIProjectSettings{
- ProjectRef: restModel.APIProjectRef{},
- }
- if err = res.ProjectRef.BuildFromService(repoRef.ProjectRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
- }
-
- // Default values so the UI understands what to do with nil values.
- res.ProjectRef.DefaultUnsetBooleans()
- return res, nil
-}
-
-func (r *queryResolver) ProjectEvents(ctx context.Context, identifier string, limit *int, before *time.Time) (*ProjectEvents, error) {
- timestamp := time.Now()
- if before != nil {
- timestamp = *before
- }
- events, err := data.GetProjectEventLog(identifier, timestamp, utility.FromIntPtr(limit))
- res := &ProjectEvents{
- EventLogEntries: getPointerEventList(events),
- Count: len(events),
- }
- return res, err
-}
-
-func (r *queryResolver) RepoEvents(ctx context.Context, id string, limit *int, before *time.Time) (*ProjectEvents, error) {
- timestamp := time.Now()
- if before != nil {
- timestamp = *before
- }
- events, err := data.GetEventsById(id, timestamp, utility.FromIntPtr(limit))
- res := &ProjectEvents{
- EventLogEntries: getPointerEventList(events),
- Count: len(events),
- }
- return res, err
-}
-
-func (r *mutationResolver) CreateProject(ctx context.Context, project restModel.APIProjectRef) (*restModel.APIProjectRef, error) {
- i, err := project.ToService()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("API error converting from model.APIProjectRef to model.ProjectRef: %s ", err.Error()))
- }
- dbProjectRef, ok := i.(*model.ProjectRef)
- if !ok {
- return nil, InternalServerError.Send(ctx, errors.Wrapf(err, "Unexpected type %T for model.ProjectRef", i).Error())
- }
-
- u := gimlet.GetUser(ctx).(*user.DBUser)
- if err = data.CreateProject(dbProjectRef, u); err != nil {
- apiErr, ok := err.(gimlet.ErrorResponse)
- if ok {
- if apiErr.StatusCode == http.StatusBadRequest {
- return nil, InputValidationError.Send(ctx, apiErr.Message)
- }
- // StatusNotFound and other error codes are really internal errors bc we determine this input
- return nil, InternalServerError.Send(ctx, apiErr.Message)
- }
- return nil, InternalServerError.Send(ctx, err.Error())
- }
-
- projectRef, err := model.FindBranchProjectRef(*project.Identifier)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error looking in project collection: %s", err.Error()))
- }
- if projectRef == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding project: %s", err.Error()))
- }
- apiProjectRef := restModel.APIProjectRef{}
- if err = apiProjectRef.BuildFromService(projectRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProjectRef from service: %s", err.Error()))
- }
-
- return &apiProjectRef, nil
-}
-
-func (r *mutationResolver) CopyProject(ctx context.Context, opts data.CopyProjectOpts) (*restModel.APIProjectRef, error) {
- projectRef, err := data.CopyProject(ctx, opts)
- if projectRef == nil && err != nil {
- apiErr, ok := err.(gimlet.ErrorResponse) // make sure bad request errors are handled correctly; all else should be treated as internal server error
- if ok {
- if apiErr.StatusCode == http.StatusBadRequest {
- return nil, InputValidationError.Send(ctx, apiErr.Message)
- }
- // StatusNotFound and other error codes are really internal errors bc we determine this input
- return nil, InternalServerError.Send(ctx, apiErr.Message)
- }
- return nil, InternalServerError.Send(ctx, err.Error())
-
- }
- if err != nil {
- // Use AddError to bypass gqlgen restriction that data and errors cannot be returned in the same response
- // https://github.com/99designs/gqlgen/issues/1191
- graphql.AddError(ctx, PartialError.Send(ctx, err.Error()))
- }
- return projectRef, nil
-}
-
-func (r *mutationResolver) AttachProjectToNewRepo(ctx context.Context, obj MoveProjectInput) (*restModel.APIProjectRef, error) {
- usr := mustHaveUser(ctx)
- pRef, err := data.FindProjectById(obj.ProjectID, false, false)
- if err != nil || pRef == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s : %s", obj.ProjectID, err.Error()))
- }
- pRef.Owner = obj.NewOwner
- pRef.Repo = obj.NewRepo
-
- if err = pRef.AttachToNewRepo(usr); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error updating owner/repo: %s", err.Error()))
- }
-
- res := &restModel.APIProjectRef{}
- if err = res.BuildFromService(pRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIProjectRef: %s", err.Error()))
- }
- return res, nil
-}
-
-func (r *mutationResolver) AttachVolumeToHost(ctx context.Context, volumeAndHost VolumeHost) (bool, error) {
- statusCode, err := cloud.AttachVolume(ctx, volumeAndHost.VolumeID, volumeAndHost.HostID)
- if err != nil {
- return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
- }
- return statusCode == http.StatusOK, nil
-}
-
-func (r *mutationResolver) DetachVolumeFromHost(ctx context.Context, volumeID string) (bool, error) {
- statusCode, err := cloud.DetachVolume(ctx, volumeID)
- if err != nil {
- return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
- }
- return statusCode == http.StatusOK, nil
-}
-
-type patchResolver struct{ *Resolver }
-
-func (r *patchResolver) VersionFull(ctx context.Context, obj *restModel.APIPatch) (*restModel.APIVersion, error) {
- if utility.FromStringPtr(obj.Version) == "" {
- return nil, nil
- }
- v, err := model.VersionFindOneId(*obj.Version)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while finding version with id: `%s`: %s", *obj.Version, err.Error()))
- }
- if v == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", *obj.Version))
- }
- apiVersion := restModel.APIVersion{}
- if err = apiVersion.BuildFromService(v); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIVersion from service for `%s`: %s", *obj.Version, err.Error()))
- }
- return &apiVersion, nil
-}
-
-func (r *patchResolver) CommitQueuePosition(ctx context.Context, apiPatch *restModel.APIPatch) (*int, error) {
- var commitQueuePosition *int
- if *apiPatch.Alias == evergreen.CommitQueueAlias {
- cq, err := commitqueue.FindOneId(*apiPatch.ProjectId)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting commit queue position for patch %s: %s", *apiPatch.Id, err.Error()))
- }
- if cq != nil {
- position := cq.FindItem(*apiPatch.Id)
- commitQueuePosition = &position
- }
- }
- return commitQueuePosition, nil
-}
-
-func (r *patchResolver) ProjectIdentifier(ctx context.Context, apiPatch *restModel.APIPatch) (*string, error) {
- identifier, err := model.GetIdentifierForProject(*apiPatch.ProjectId)
- if err != nil {
- return apiPatch.ProjectId, nil
- }
- return utility.ToStringPtr(identifier), nil
-}
-
-func (r *patchResolver) AuthorDisplayName(ctx context.Context, obj *restModel.APIPatch) (string, error) {
- usr, err := user.FindOneById(*obj.Author)
- if err != nil {
- return "", ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting user from user ID: %s", err.Error()))
- }
- if usr == nil {
- return "", ResourceNotFound.Send(ctx, "Could not find user from user ID")
- }
- return usr.DisplayName(), nil
-}
-
-func (r *patchResolver) TaskStatuses(ctx context.Context, obj *restModel.APIPatch) ([]string, error) {
- defaultSort := []task.TasksSortOrder{
- {Key: task.DisplayNameKey, Order: 1},
- }
- opts := task.GetTasksByVersionOptions{
- Sorts: defaultSort,
- IncludeBaseTasks: false,
- IncludeBuildVariantDisplayName: false,
- }
- tasks, _, err := task.GetTasksByVersion(*obj.Id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version tasks: %s", err.Error()))
- }
- return getAllTaskStatuses(tasks), nil
-}
-
-func (r *patchResolver) BaseTaskStatuses(ctx context.Context, obj *restModel.APIPatch) ([]string, error) {
- baseTasks, err := getVersionBaseTasks(*obj.Id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version base tasks: %s", err.Error()))
- }
- return getAllTaskStatuses(baseTasks), nil
-}
-
-func (r *patchResolver) Builds(ctx context.Context, obj *restModel.APIPatch) ([]*restModel.APIBuild, error) {
- builds, err := build.FindBuildsByVersions([]string{*obj.Version})
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding build by version %s: %s", *obj.Version, err.Error()))
- }
- var apiBuilds []*restModel.APIBuild
- for _, build := range builds {
- apiBuild := restModel.APIBuild{}
- err = apiBuild.BuildFromService(build)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIBuild from service: %s", err.Error()))
- }
- apiBuilds = append(apiBuilds, &apiBuild)
- }
- return apiBuilds, nil
-}
-
-func (r *patchResolver) Duration(ctx context.Context, obj *restModel.APIPatch) (*PatchDuration, error) {
- query := db.Query(task.ByVersion(*obj.Id)).WithFields(task.TimeTakenKey, task.StartTimeKey, task.FinishTimeKey, task.DisplayOnlyKey, task.ExecutionKey)
- tasks, err := task.FindAllFirstExecution(query)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- if tasks == nil {
- return nil, ResourceNotFound.Send(ctx, "Could not find any tasks for patch")
- }
- timeTaken, makespan := task.GetTimeSpent(tasks)
-
- // return nil if rounded timeTaken/makespan == 0s
- t := timeTaken.Round(time.Second).String()
- var tPointer *string
- if t != "0s" {
- tFormated := formatDuration(t)
- tPointer = &tFormated
- }
- m := makespan.Round(time.Second).String()
- var mPointer *string
- if m != "0s" {
- mFormated := formatDuration(m)
- mPointer = &mFormated
- }
-
- return &PatchDuration{
- Makespan: mPointer,
- TimeTaken: tPointer,
- }, nil
-}
-
-func (r *patchResolver) Time(ctx context.Context, obj *restModel.APIPatch) (*PatchTime, error) {
- usr := mustHaveUser(ctx)
-
- started, err := getFormattedDate(obj.StartTime, usr.Settings.Timezone)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- finished, err := getFormattedDate(obj.FinishTime, usr.Settings.Timezone)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- submittedAt, err := getFormattedDate(obj.CreateTime, usr.Settings.Timezone)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
-
- return &PatchTime{
- Started: started,
- Finished: finished,
- SubmittedAt: *submittedAt,
- }, nil
-}
-
-func (r *patchResolver) TaskCount(ctx context.Context, obj *restModel.APIPatch) (*int, error) {
- taskCount, err := task.Count(db.Query(task.DisplayTasksByVersion(*obj.Id)))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting task count for patch %s: %s", *obj.Id, err.Error()))
- }
- return &taskCount, nil
-}
-
-func (r *patchResolver) BaseVersionID(ctx context.Context, obj *restModel.APIPatch) (*string, error) {
- baseVersion, err := model.VersionFindOne(model.BaseVersionByProjectIdAndRevision(*obj.ProjectId, *obj.Githash).Project(bson.M{model.VersionIdentifierKey: 1}))
- if baseVersion == nil || err != nil {
- return nil, nil
- }
- return &baseVersion.Id, nil
-}
-
-func (r *patchResolver) Project(ctx context.Context, apiPatch *restModel.APIPatch) (*PatchProject, error) {
- patchProject, err := getPatchProjectVariantsAndTasksForUI(ctx, apiPatch)
- if err != nil {
- return nil, err
- }
- return patchProject, nil
-}
-
-func (r *patchResolver) ID(ctx context.Context, obj *restModel.APIPatch) (string, error) {
- return *obj.Id, nil
-}
-
-func (r *patchResolver) PatchTriggerAliases(ctx context.Context, obj *restModel.APIPatch) ([]*restModel.APIPatchTriggerDefinition, error) {
- projectRef, err := data.FindProjectById(*obj.ProjectId, true, true)
- if err != nil || projectRef == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project: %s : %s", *obj.ProjectId, err))
- }
-
- if len(projectRef.PatchTriggerAliases) == 0 {
- return nil, nil
- }
-
- projectCache := map[string]*model.Project{}
- aliases := []*restModel.APIPatchTriggerDefinition{}
- for _, alias := range projectRef.PatchTriggerAliases {
- project, projectCached := projectCache[alias.ChildProject]
- if !projectCached {
- _, project, err = model.FindLatestVersionWithValidProject(alias.ChildProject)
- if err != nil {
- return nil, InternalServerError.Send(ctx, errors.Wrapf(err, "Problem getting last known project for '%s'", alias.ChildProject).Error())
- }
- projectCache[alias.ChildProject] = project
- }
-
- matchingTasks, err := project.VariantTasksForSelectors([]patch.PatchTriggerDefinition{alias}, *obj.Requester)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem matching tasks to alias definitions: %v", err.Error()))
- }
-
- variantsTasks := []restModel.VariantTask{}
- for _, vt := range matchingTasks {
- variantsTasks = append(variantsTasks, restModel.VariantTask{
- Name: utility.ToStringPtr(vt.Variant),
- Tasks: utility.ToStringPtrSlice(vt.Tasks),
- })
- }
-
- identifier, err := model.GetIdentifierForProject(alias.ChildProject)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem getting child project identifier: %v", err.Error()))
- }
-
- aliases = append(aliases, &restModel.APIPatchTriggerDefinition{
- Alias: utility.ToStringPtr(alias.Alias),
- ChildProjectId: utility.ToStringPtr(alias.ChildProject),
- ChildProjectIdentifier: utility.ToStringPtr(identifier),
- VariantsTasks: variantsTasks,
- })
- }
-
- return aliases, nil
-}
-
-func (r *queryResolver) Patch(ctx context.Context, id string) (*restModel.APIPatch, error) {
- patch, err := data.FindPatchById(id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
-
- if evergreen.IsFinishedPatchStatus(*patch.Status) {
- failedAndAbortedStatuses := append(evergreen.TaskFailureStatuses, evergreen.TaskAborted)
- opts := task.GetTasksByVersionOptions{
- Statuses: failedAndAbortedStatuses,
- FieldsToProject: []string{task.DisplayStatusKey},
- IncludeBaseTasks: false,
- IncludeBuildVariantDisplayName: false,
- }
- tasks, _, err := task.GetTasksByVersion(id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not fetch tasks for patch: %s ", err.Error()))
- }
-
- if len(patch.ChildPatches) > 0 {
- for _, cp := range patch.ChildPatches {
- // add the child patch tasks to tasks so that we can consider their status
- childPatchTasks, _, err := task.GetTasksByVersion(*cp.Id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not fetch tasks for child patch: %s ", err.Error()))
- }
- tasks = append(tasks, childPatchTasks...)
- }
- }
- statuses := getAllTaskStatuses(tasks)
-
- // If theres an aborted task we should set the patch status to aborted if there are no other failures
- if utility.StringSliceContains(statuses, evergreen.TaskAborted) {
- if len(utility.StringSliceIntersection(statuses, evergreen.TaskFailureStatuses)) == 0 {
- patch.Status = utility.ToStringPtr(evergreen.PatchAborted)
- }
- }
- }
-
- return patch, nil
-}
-
-func (r *queryResolver) Version(ctx context.Context, id string) (*restModel.APIVersion, error) {
- v, err := model.VersionFindOneId(id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while finding version with id: `%s`: %s", id, err.Error()))
- }
- if v == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", id))
- }
- apiVersion := restModel.APIVersion{}
- if err = apiVersion.BuildFromService(v); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIVersion from service for `%s`: %s", id, err.Error()))
- }
- return &apiVersion, nil
-}
-
-func (r *queryResolver) Project(ctx context.Context, id string) (*restModel.APIProjectRef, error) {
- project, err := data.FindProjectById(id, true, false)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding project by id %s: %s", id, err.Error()))
- }
- apiProjectRef := restModel.APIProjectRef{}
- err = apiProjectRef.BuildFromService(project)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building APIProject from service: %s", err.Error()))
- }
- return &apiProjectRef, nil
-}
-
-func (r *projectResolver) Patches(ctx context.Context, obj *restModel.APIProjectRef, patchesInput PatchesInput) (*Patches, error) {
- opts := patch.ByPatchNameStatusesCommitQueuePaginatedOptions{
- Project: obj.Id,
- PatchName: patchesInput.PatchName,
- Statuses: patchesInput.Statuses,
- Page: patchesInput.Page,
- Limit: patchesInput.Limit,
- OnlyCommitQueue: patchesInput.OnlyCommitQueue,
- }
-
- patches, count, err := patch.ByPatchNameStatusesCommitQueuePaginated(opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while fetching patches for this project : %s", err.Error()))
- }
- apiPatches := []*restModel.APIPatch{}
- for _, p := range patches {
- apiPatch := restModel.APIPatch{}
- err = apiPatch.BuildFromService(p)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building APIPatch from service for patch: %s : %s", p.Id.Hex(), err.Error()))
- }
- apiPatches = append(apiPatches, &apiPatch)
- }
- return &Patches{Patches: apiPatches, FilteredPatchCount: count}, nil
-}
-
-func (r *queryResolver) UserSettings(ctx context.Context) (*restModel.APIUserSettings, error) {
- usr := mustHaveUser(ctx)
- userSettings := restModel.APIUserSettings{}
- err := userSettings.BuildFromService(usr.Settings)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- return &userSettings, nil
-}
-
-func (r *queryResolver) Task(ctx context.Context, taskID string, execution *int) (*restModel.APITask, error) {
- dbTask, err := task.FindOneIdAndExecutionWithDisplayStatus(taskID, execution)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, err.Error())
- }
- if dbTask == nil {
- return nil, errors.Errorf("unable to find task %s", taskID)
- }
- apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *dbTask)
- if err != nil {
- return nil, InternalServerError.Send(ctx, "error converting task")
- }
-
- return apiTask, err
-}
-
-func (r *queryResolver) TaskAllExecutions(ctx context.Context, taskID string) ([]*restModel.APITask, error) {
- latestTask, err := task.FindOneId(taskID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, err.Error())
- }
- if latestTask == nil {
- return nil, errors.Errorf("unable to find task %s", taskID)
- }
- allTasks := []*restModel.APITask{}
- for i := 0; i < latestTask.Execution; i++ {
- var dbTask *task.Task
- dbTask, err = task.FindByIdExecution(taskID, &i)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, err.Error())
- }
- if dbTask == nil {
- return nil, errors.Errorf("unable to find task %s", taskID)
- }
- var apiTask *restModel.APITask
- apiTask, err = getAPITaskFromTask(ctx, r.sc.GetURL(), *dbTask)
- if err != nil {
- return nil, InternalServerError.Send(ctx, "error converting task")
- }
- allTasks = append(allTasks, apiTask)
- }
- apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *latestTask)
- if err != nil {
- return nil, InternalServerError.Send(ctx, "error converting task")
- }
- allTasks = append(allTasks, apiTask)
- return allTasks, nil
-}
-
-func (r *queryResolver) Projects(ctx context.Context) ([]*GroupedProjects, error) {
- allProjects, err := model.FindAllMergedTrackedProjectRefs()
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, err.Error())
- }
- // We have to iterate over the merged project refs to verify if they are enabled
- enabledProjects := []model.ProjectRef{}
- for _, p := range allProjects {
- if p.IsEnabled() {
- enabledProjects = append(enabledProjects, p)
- }
- }
- groupedProjects, err := groupProjects(enabledProjects, false)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error grouping project: %s", err.Error()))
- }
- return groupedProjects, nil
-}
-
-func (r *queryResolver) ViewableProjectRefs(ctx context.Context) ([]*GroupedProjects, error) {
- usr := mustHaveUser(ctx)
- projectIds, err := usr.GetViewableProjectSettings()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting viewable projects for '%s': '%s'", usr.DispName, err.Error()))
- }
-
- projects, err := model.FindProjectRefsByIds(projectIds...)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting projects: %v", err.Error()))
- }
-
- groupedProjects, err := groupProjects(projects, true)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error grouping project: %s", err.Error()))
- }
- return groupedProjects, nil
-}
-
-func (r *queryResolver) GithubProjectConflicts(ctx context.Context, projectID string) (*model.GithubProjectConflicts, error) {
- pRef, err := model.FindMergedProjectRef(projectID, "", false)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting project: %v", err.Error()))
- }
- if pRef == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("project '%s' not found", projectID))
- }
-
- conflicts, err := pRef.GetGithubProjectConflicts()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting project conflicts: %v", err.Error()))
- }
- return &conflicts, nil
-}
-
-func (r *queryResolver) PatchTasks(ctx context.Context, patchID string, sorts []*SortOrder, page *int, limit *int, statuses []string, baseStatuses []string, variant *string, taskName *string, includeEmptyActivation *bool) (*PatchTasks, error) {
- pageParam := 0
- if page != nil {
- pageParam = *page
- }
- limitParam := 0
- if limit != nil {
- limitParam = *limit
- }
- variantParam := ""
- if variant != nil {
- variantParam = *variant
- }
- taskNameParam := ""
- if taskName != nil {
- taskNameParam = *taskName
- }
- var taskSorts []task.TasksSortOrder
- if len(sorts) > 0 {
- taskSorts = []task.TasksSortOrder{}
- for _, singleSort := range sorts {
- key := ""
- switch singleSort.Key {
- // the keys here should be the keys for the column headers of the tasks table
- case TaskSortCategoryName:
- key = task.DisplayNameKey
- case TaskSortCategoryStatus:
- key = task.DisplayStatusKey
- case TaskSortCategoryBaseStatus:
- key = task.BaseTaskStatusKey
- case TaskSortCategoryVariant:
- key = task.BuildVariantKey
- case TaskSortCategoryDuration:
- key = task.TimeTakenKey
- default:
- return nil, InputValidationError.Send(ctx, fmt.Sprintf("invalid sort key: %s", singleSort.Key))
- }
- order := 1
- if singleSort.Direction == SortDirectionDesc {
- order = -1
- }
- taskSorts = append(taskSorts, task.TasksSortOrder{Key: key, Order: order})
- }
- }
- v, err := model.VersionFindOne(model.VersionById(patchID).WithFields(model.VersionRequesterKey))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while finding version with id: `%s`: %s", patchID, err.Error()))
- }
- if v == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", patchID))
- }
-
- opts := task.GetTasksByVersionOptions{
- Statuses: getValidTaskStatusesFilter(statuses),
- BaseStatuses: getValidTaskStatusesFilter(baseStatuses),
- Variants: []string{variantParam},
- TaskNames: []string{taskNameParam},
- Page: pageParam,
- Limit: limitParam,
- Sorts: taskSorts,
- IncludeBaseTasks: true,
- IncludeEmptyActivation: utility.FromBoolPtr(includeEmptyActivation),
- IncludeBuildVariantDisplayName: true,
- IsMainlineCommit: !evergreen.IsPatchRequester(v.Requester),
- }
- tasks, count, err := task.GetTasksByVersion(patchID, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting patch tasks for %s: %s", patchID, err.Error()))
- }
-
- var apiTasks []*restModel.APITask
- for _, t := range tasks {
- apiTask := restModel.APITask{}
- err := apiTask.BuildFromArgs(&t, nil)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error converting task item db model to api model: %v", err.Error()))
- }
- apiTasks = append(apiTasks, &apiTask)
- }
- patchTasks := PatchTasks{
- Count: count,
- Tasks: apiTasks,
- }
- return &patchTasks, nil
-}
-
-func (r *queryResolver) TaskTests(ctx context.Context, taskID string, execution *int, sortCategory *TestSortCategory,
- sortDirection *SortDirection, page *int, limit *int, testName *string, statuses []string, groupID *string) (*TaskTestResult, error) {
- dbTask, err := task.FindByIdExecution(taskID, execution)
- if dbTask == nil || err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("finding task with id %s", taskID))
- }
- baseTask, err := dbTask.FindTaskOnBaseCommit()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding base task for task %s: %s", taskID, err))
- }
-
- limitNum := utility.FromIntPtr(limit)
- var sortBy, cedarSortBy string
- if sortCategory != nil {
- switch *sortCategory {
- case TestSortCategoryStatus:
- cedarSortBy = apimodels.CedarTestResultsSortByStatus
- sortBy = testresult.StatusKey
- case TestSortCategoryDuration:
- cedarSortBy = apimodels.CedarTestResultsSortByDuration
- sortBy = "duration"
- case TestSortCategoryTestName:
- cedarSortBy = apimodels.CedarTestResultsSortByTestName
- sortBy = testresult.TestFileKey
- case TestSortCategoryStartTime:
- cedarSortBy = apimodels.CedarTestResultsSortByStart
- sortBy = testresult.StartTimeKey
- case TestSortCategoryBaseStatus:
- cedarSortBy = apimodels.CedarTestResultsSortByBaseStatus
- sortBy = "base_status"
- }
- } else if limitNum > 0 { // Don't sort TaskID if unlimited EVG-13965.
- sortBy = testresult.TaskIDKey
- }
-
- if dbTask.HasCedarResults {
- opts := apimodels.GetCedarTestResultsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: taskID,
- Execution: utility.ToIntPtr(dbTask.Execution),
- DisplayTask: dbTask.DisplayOnly,
- TestName: utility.FromStringPtr(testName),
- Statuses: statuses,
- GroupID: utility.FromStringPtr(groupID),
- SortBy: cedarSortBy,
- SortOrderDSC: sortDirection != nil && *sortDirection == SortDirectionDesc,
- Limit: limitNum,
- Page: utility.FromIntPtr(page),
- }
- if baseTask != nil && baseTask.HasCedarResults {
- opts.BaseTaskID = baseTask.Id
- }
- cedarTestResults, err := apimodels.GetCedarTestResultsWithStatusError(ctx, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding test results for task %s: %s", taskID, err))
- }
-
- apiTestResults := make([]*restModel.APITest, len(cedarTestResults.Results))
- for i, t := range cedarTestResults.Results {
- apiTest := &restModel.APITest{}
- if err = apiTest.BuildFromService(t.TaskID); err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- if err = apiTest.BuildFromService(&t); err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
-
- apiTestResults[i] = apiTest
- }
-
- return &TaskTestResult{
- TestResults: apiTestResults,
- TotalTestCount: cedarTestResults.Stats.TotalCount,
- FilteredTestCount: utility.FromIntPtr(cedarTestResults.Stats.FilteredCount),
- }, nil
- }
-
- baseTestStatusMap := map[string]string{}
- if baseTask != nil {
- baseTestResults, _ := r.sc.FindTestsByTaskId(data.FindTestsByTaskIdOpts{
- TaskID: baseTask.Id,
- Execution: baseTask.Execution,
- ExecutionTasks: baseTask.ExecutionTasks,
- })
- for _, t := range baseTestResults {
- baseTestStatusMap[t.TestFile] = t.Status
- }
- }
- sortDir := 1
- if sortDirection != nil && *sortDirection == SortDirectionDesc {
- sortDir = -1
- }
- filteredTestResults, err := r.sc.FindTestsByTaskId(data.FindTestsByTaskIdOpts{
- TaskID: taskID,
- Execution: dbTask.Execution,
- ExecutionTasks: dbTask.ExecutionTasks,
- TestName: utility.FromStringPtr(testName),
- Statuses: statuses,
- SortBy: sortBy,
- SortDir: sortDir,
- GroupID: utility.FromStringPtr(groupID),
- Limit: limitNum,
- Page: utility.FromIntPtr(page),
- })
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, err.Error())
- }
-
- apiTestResults := make([]*restModel.APITest, len(filteredTestResults))
- for i, t := range filteredTestResults {
- apiTest := &restModel.APITest{}
- if err = apiTest.BuildFromService(t.TaskID); err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- if err = apiTest.BuildFromService(&t); err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- apiTest.BaseStatus = utility.ToStringPtr(baseTestStatusMap[utility.FromStringPtr(apiTest.TestFile)])
-
- apiTestResults[i] = apiTest
- }
- totalTestCount, err := task.GetTestCountByTaskIdAndFilters(taskID, "", []string{}, dbTask.Execution)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting total test count: %s", err))
- }
- filteredTestCount, err := task.GetTestCountByTaskIdAndFilters(taskID, utility.FromStringPtr(testName), statuses, dbTask.Execution)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting filtered test count: %s", err))
- }
-
- return &TaskTestResult{
- TestResults: apiTestResults,
- TotalTestCount: totalTestCount,
- FilteredTestCount: filteredTestCount,
- }, nil
-}
-
-func (r *queryResolver) TaskTestSample(ctx context.Context, tasks []string, testFilters []*TestFilter) ([]*TaskTestResultSample, error) {
- const testSampleLimit = 10
- if len(tasks) == 0 {
- return nil, nil
- }
- dbTasks, err := task.FindAll(db.Query(task.ByIds(tasks)))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding tasks %s: %s", tasks, err))
- }
- if len(dbTasks) == 0 {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("tasks %s not found", tasks))
- }
- testResultsToReturn := []*TaskTestResultSample{}
-
- // We can assume that if one of the tasks has cedar results, all of them do.
- if dbTasks[0].HasCedarResults {
- failingTests := []string{}
- for _, f := range testFilters {
- failingTests = append(failingTests, f.TestName)
- }
-
- results, err := getCedarFailedTestResultsSample(ctx, dbTasks, failingTests)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting test results sample: %s", err))
- }
- for _, r := range results {
- tr := &TaskTestResultSample{
- TaskID: utility.FromStringPtr(r.TaskID),
- Execution: r.Execution,
- MatchingFailedTestNames: r.MatchingFailedTestNames,
- TotalTestCount: r.TotalFailedNames,
- }
- testResultsToReturn = append(testResultsToReturn, tr)
- }
- } else {
- filters := []string{}
- for _, f := range testFilters {
- filters = append(filters, f.TestName)
- }
- regexFilter := strings.Join(filters, "|")
- for _, t := range dbTasks {
- filteredTestResults, err := r.sc.FindTestsByTaskId(data.FindTestsByTaskIdOpts{
- TaskID: t.Id,
- Execution: t.Execution,
- ExecutionTasks: t.ExecutionTasks,
- TestName: regexFilter,
- Statuses: []string{evergreen.TestFailedStatus},
- SortBy: testresult.TaskIDKey,
- Limit: testSampleLimit,
- SortDir: 1,
- Page: 0,
- })
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting test results sample: %s", err))
- }
- failedTestCount, err := task.GetTestCountByTaskIdAndFilters(t.Id, "", []string{evergreen.TestFailedStatus}, t.Execution)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting failed test count: %s", err))
- }
- tr := &TaskTestResultSample{
- TaskID: t.Id,
- Execution: t.Execution,
- TotalTestCount: failedTestCount,
- }
- matchingFailingTestNames := []string{}
- for _, r := range filteredTestResults {
- matchingFailingTestNames = append(matchingFailingTestNames, r.TestFile)
- }
- tr.MatchingFailedTestNames = matchingFailingTestNames
- testResultsToReturn = append(testResultsToReturn, tr)
- }
-
- }
- return testResultsToReturn, nil
-}
-
-func (r *queryResolver) TaskFiles(ctx context.Context, taskID string, execution *int) (*TaskFiles, error) {
- emptyTaskFiles := TaskFiles{
- FileCount: 0,
- GroupedFiles: []*GroupedFiles{},
- }
- t, err := task.FindByIdExecution(taskID, execution)
- if t == nil {
- return &emptyTaskFiles, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- if err != nil {
- return &emptyTaskFiles, ResourceNotFound.Send(ctx, err.Error())
- }
- groupedFilesList := []*GroupedFiles{}
- fileCount := 0
- if t.DisplayOnly {
- execTasks, err := task.Find(task.ByIds(t.ExecutionTasks))
- if err != nil {
- return &emptyTaskFiles, ResourceNotFound.Send(ctx, err.Error())
- }
- for _, execTask := range execTasks {
- groupedFiles, err := getGroupedFiles(ctx, execTask.DisplayName, execTask.Id, t.Execution)
- if err != nil {
- return &emptyTaskFiles, err
- }
- fileCount += len(groupedFiles.Files)
- groupedFilesList = append(groupedFilesList, groupedFiles)
- }
- } else {
- groupedFiles, err := getGroupedFiles(ctx, t.DisplayName, taskID, t.Execution)
- if err != nil {
- return &emptyTaskFiles, err
- }
- fileCount += len(groupedFiles.Files)
- groupedFilesList = append(groupedFilesList, groupedFiles)
- }
- taskFiles := TaskFiles{
- FileCount: fileCount,
- GroupedFiles: groupedFilesList,
- }
- return &taskFiles, nil
-}
-
-func (r *queryResolver) TaskLogs(ctx context.Context, taskID string, execution *int) (*TaskLogs, error) {
- t, err := task.FindByIdExecution(taskID, execution)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- // need project to get default logger
- p, err := data.FindProjectById(t.Project, true, true)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding project '%s': %s", t.Project, err.Error()))
- }
- if p == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find project '%s'", t.Project))
- }
- defaultLogger := p.DefaultLogger
- if defaultLogger == "" {
- defaultLogger = evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger
- }
-
- // Let the individual TaskLogs resolvers handle fetching logs for the task
- // We can avoid the overhead of fetching task logs that we will not view
- // and we can avoid handling errors that we will not see
- return &TaskLogs{TaskID: taskID, Execution: t.Execution, DefaultLogger: defaultLogger}, nil
-}
-
-func (r *taskLogsResolver) SystemLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
- const logMessageCount = 100
-
- var systemLogs []apimodels.LogMessage
-
- // get logs from cedar
- if obj.DefaultLogger == model.BuildloggerLogSender {
- opts := apimodels.GetBuildloggerLogsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: obj.TaskID,
- Execution: utility.ToIntPtr(obj.Execution),
- PrintPriority: true,
- Tail: logMessageCount,
- LogType: apimodels.TaskLogPrefix,
- }
-
- // system logs
- opts.LogType = apimodels.SystemLogPrefix
- systemLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- systemLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, systemLogReader)
- } else {
- var err error
-
- systemLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{},
- []string{apimodels.SystemLogPrefix})
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding system logs for task %s: %s", obj.TaskID, err.Error()))
- }
- }
- systemLogPointers := []*apimodels.LogMessage{}
- for i := range systemLogs {
- systemLogPointers = append(systemLogPointers, &systemLogs[i])
- }
-
- return systemLogPointers, nil
-}
-func (r *taskLogsResolver) EventLogs(ctx context.Context, obj *TaskLogs) ([]*restModel.TaskAPIEventLogEntry, error) {
- const logMessageCount = 100
- var loggedEvents []event.EventLogEntry
- // loggedEvents is ordered ts descending
- loggedEvents, err := event.Find(event.AllLogCollection, event.MostRecentTaskEvents(obj.TaskID, logMessageCount))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find EventLogs for task %s: %s", obj.TaskID, err.Error()))
- }
-
- // TODO (EVG-16969) remove once TaskScheduled events TTL
- // remove all scheduled events except the youngest and push to filteredEvents
- filteredEvents := []event.EventLogEntry{}
- foundScheduled := false
- for i := 0; i < len(loggedEvents); i++ {
- if !foundScheduled || loggedEvents[i].EventType != event.TaskScheduled {
- filteredEvents = append(filteredEvents, loggedEvents[i])
- }
- if loggedEvents[i].EventType == event.TaskScheduled {
- foundScheduled = true
- }
- }
-
- // reverse order so it is ascending
- for i := len(filteredEvents)/2 - 1; i >= 0; i-- {
- opp := len(filteredEvents) - 1 - i
- filteredEvents[i], filteredEvents[opp] = filteredEvents[opp], filteredEvents[i]
- }
-
- // populate eventlogs pointer arrays
- apiEventLogPointers := []*restModel.TaskAPIEventLogEntry{}
- for _, e := range filteredEvents {
- apiEventLog := restModel.TaskAPIEventLogEntry{}
- err = apiEventLog.BuildFromService(&e)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to build APIEventLogEntry from EventLog: %s", err.Error()))
- }
- apiEventLogPointers = append(apiEventLogPointers, &apiEventLog)
- }
- return apiEventLogPointers, nil
-}
-func (r *taskLogsResolver) AgentLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
- const logMessageCount = 100
-
- var agentLogs []apimodels.LogMessage
- // get logs from cedar
- if obj.DefaultLogger == model.BuildloggerLogSender {
- opts := apimodels.GetBuildloggerLogsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: obj.TaskID,
- Execution: utility.ToIntPtr(obj.Execution),
- PrintPriority: true,
- Tail: logMessageCount,
- LogType: apimodels.AgentLogPrefix,
- }
- // agent logs
- agentLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- agentLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, agentLogReader)
- } else {
- var err error
- // agent logs
- agentLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{},
- []string{apimodels.AgentLogPrefix})
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding agent logs for task %s: %s", obj.TaskID, err.Error()))
- }
- }
-
- agentLogPointers := []*apimodels.LogMessage{}
-
- for i := range agentLogs {
- agentLogPointers = append(agentLogPointers, &agentLogs[i])
- }
- return agentLogPointers, nil
-}
-func (r *taskLogsResolver) TaskLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
- const logMessageCount = 100
-
- var taskLogs []apimodels.LogMessage
-
- // get logs from cedar
- if obj.DefaultLogger == model.BuildloggerLogSender {
-
- opts := apimodels.GetBuildloggerLogsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: obj.TaskID,
- Execution: utility.ToIntPtr(obj.Execution),
- PrintPriority: true,
- Tail: logMessageCount,
- LogType: apimodels.TaskLogPrefix,
- }
- // task logs
- taskLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
-
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Encountered an error while fetching build logger logs: %s", err.Error()))
- }
-
- taskLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, taskLogReader)
-
- } else {
- var err error
-
- // task logs
- taskLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{},
- []string{apimodels.TaskLogPrefix})
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task logs for task %s: %s", obj.TaskID, err.Error()))
- }
- }
-
- taskLogPointers := []*apimodels.LogMessage{}
- for i := range taskLogs {
- taskLogPointers = append(taskLogPointers, &taskLogs[i])
- }
-
- return taskLogPointers, nil
-}
-func (r *taskLogsResolver) AllLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
- const logMessageCount = 100
-
- var allLogs []apimodels.LogMessage
-
- // get logs from cedar
- if obj.DefaultLogger == model.BuildloggerLogSender {
-
- opts := apimodels.GetBuildloggerLogsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: obj.TaskID,
- Execution: utility.ToIntPtr(obj.Execution),
- PrintPriority: true,
- Tail: logMessageCount,
- LogType: apimodels.AllTaskLevelLogs,
- }
-
- // all logs
- allLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
-
- allLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, allLogReader)
-
- } else {
- var err error
- // all logs
- allLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{}, []string{})
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding all logs for task %s: %s", obj.TaskID, err.Error()))
- }
- }
-
- allLogPointers := []*apimodels.LogMessage{}
- for i := range allLogs {
- allLogPointers = append(allLogPointers, &allLogs[i])
- }
- return allLogPointers, nil
-}
-
-func (r *queryResolver) CommitQueue(ctx context.Context, id string) (*restModel.APICommitQueue, error) {
- commitQueue, err := data.FindCommitQueueForProject(id)
- if err != nil {
- if errors.Cause(err) == err {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding commit queue for %s: %s", id, err.Error()))
- }
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding commit queue for %s: %s", id, err.Error()))
- }
- project, err := data.FindProjectById(id, true, true)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding project %s: %s", id, err.Error()))
- }
- if project.CommitQueue.Message != "" {
- commitQueue.Message = &project.CommitQueue.Message
- }
- commitQueue.Owner = &project.Owner
- commitQueue.Repo = &project.Repo
-
- for i, item := range commitQueue.Queue {
- patchId := ""
- if utility.FromStringPtr(item.Version) != "" {
- patchId = utility.FromStringPtr(item.Version)
- } else if utility.FromStringPtr(item.PatchId) != "" {
- patchId = utility.FromStringPtr(item.PatchId)
- }
-
- if patchId != "" {
- p, err := data.FindPatchById(patchId)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding patch: %s", err.Error()))
- }
- commitQueue.Queue[i].Patch = p
- }
- }
-
- return commitQueue, nil
-}
-
-func (r *queryResolver) UserConfig(ctx context.Context) (*UserConfig, error) {
- usr := mustHaveUser(ctx)
- settings := evergreen.GetEnvironment().Settings()
- config := &UserConfig{
- User: usr.Username(),
- APIKey: usr.GetAPIKey(),
- UIServerHost: settings.Ui.Url,
- APIServerHost: settings.ApiUrl + "/api",
- }
-
- return config, nil
-}
-
-func (r *queryResolver) ClientConfig(ctx context.Context) (*restModel.APIClientConfig, error) {
- envClientConfig := evergreen.GetEnvironment().ClientConfig()
- clientConfig := restModel.APIClientConfig{}
- err := clientConfig.BuildFromService(*envClientConfig)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIClientConfig from service: %s", err.Error()))
- }
-
- return &clientConfig, nil
-}
-
-func (r *queryResolver) AwsRegions(ctx context.Context) ([]string, error) {
- return evergreen.GetEnvironment().Settings().Providers.AWS.AllowedRegions, nil
-}
-
-func (r *queryResolver) SubnetAvailabilityZones(ctx context.Context) ([]string, error) {
- zones := []string{}
- for _, subnet := range evergreen.GetEnvironment().Settings().Providers.AWS.Subnets {
- zones = append(zones, subnet.AZ)
- }
- return zones, nil
-}
-
-func (r *queryResolver) SpruceConfig(ctx context.Context) (*restModel.APIAdminSettings, error) {
- config, err := evergreen.GetConfig()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error Fetching evergreen settings: %s", err.Error()))
- }
-
- spruceConfig := restModel.APIAdminSettings{}
- err = spruceConfig.BuildFromService(config)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building api admin settings from service: %s", err.Error()))
- }
- return &spruceConfig, nil
-}
-
-func (r *queryResolver) HostEvents(ctx context.Context, hostID string, hostTag *string, limit *int, page *int) (*HostEvents, error) {
- h, err := host.FindOneByIdOrTag(hostID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding host %s: %s", hostID, err.Error()))
- }
- if h == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Host %s not found", hostID))
- }
- events, err := event.FindPaginated(h.Id, h.Tag, event.AllLogCollection, *limit, *page)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error Fetching host events: %s", err.Error()))
- }
- // populate eventlogs pointer arrays
- apiEventLogPointers := []*restModel.HostAPIEventLogEntry{}
- for _, e := range events {
- apiEventLog := restModel.HostAPIEventLogEntry{}
- err = apiEventLog.BuildFromService(&e)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to build APIEventLogEntry from EventLog: %s", err.Error()))
- }
- apiEventLogPointers = append(apiEventLogPointers, &apiEventLog)
- }
- hostevents := HostEvents{
- EventLogEntries: apiEventLogPointers,
- Count: len(events),
- }
- return &hostevents, nil
-}
-
-func (r *queryResolver) Distros(ctx context.Context, onlySpawnable bool) ([]*restModel.APIDistro, error) {
- apiDistros := []*restModel.APIDistro{}
-
- var distros []distro.Distro
- if onlySpawnable {
- d, err := distro.Find(distro.BySpawnAllowed())
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while fetching spawnable distros: %s", err.Error()))
- }
- distros = d
- } else {
- d, err := distro.FindAll()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while fetching distros: %s", err.Error()))
- }
- distros = d
- }
- for _, d := range distros {
- apiDistro := restModel.APIDistro{}
- err := apiDistro.BuildFromService(d)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to build APIDistro from distro: %s", err.Error()))
- }
- apiDistros = append(apiDistros, &apiDistro)
- }
- return apiDistros, nil
-}
-
-func (r *queryResolver) DistroTaskQueue(ctx context.Context, distroID string) ([]*restModel.APITaskQueueItem, error) {
- distroQueue, err := model.LoadTaskQueue(distroID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting task queue for distro %v: %v", distroID, err.Error()))
- }
- if distroQueue == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find queue with distro ID `%s`", distroID))
- }
-
- taskQueue := []*restModel.APITaskQueueItem{}
-
- for _, taskQueueItem := range distroQueue.Queue {
- apiTaskQueueItem := restModel.APITaskQueueItem{}
-
- err := apiTaskQueueItem.BuildFromService(taskQueueItem)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error converting task queue item db model to api model: %v", err.Error()))
- }
-
- taskQueue = append(taskQueue, &apiTaskQueueItem)
- }
-
- return taskQueue, nil
-}
-
-func (r *queryResolver) TaskQueueDistros(ctx context.Context) ([]*TaskQueueDistro, error) {
- queues, err := model.FindAllTaskQueues()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting all task queues: %v", err.Error()))
- }
-
- distros := []*TaskQueueDistro{}
-
- for _, distro := range queues {
- numHosts, err := host.CountRunningHosts(distro.Distro)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting associated hosts: %s", err.Error()))
- }
- tqd := TaskQueueDistro{
- ID: distro.Distro,
- TaskCount: len(distro.Queue),
- HostCount: numHosts,
- }
- distros = append(distros, &tqd)
- }
-
- // sort distros by task count in descending order
- sort.SliceStable(distros, func(i, j int) bool {
- return distros[i].TaskCount > distros[j].TaskCount
- })
-
- return distros, nil
-}
-
-func (r *taskQueueItemResolver) Requester(ctx context.Context, obj *restModel.APITaskQueueItem) (TaskQueueItemType, error) {
- if *obj.Requester != evergreen.RepotrackerVersionRequester {
- return TaskQueueItemTypePatch, nil
- }
- return TaskQueueItemTypeCommit, nil
-}
-
-func (r *mutationResolver) SaveProjectSettingsForSection(ctx context.Context, obj *restModel.APIProjectSettings, section ProjectSettingsSection) (*restModel.APIProjectSettings, error) {
- projectId := utility.FromStringPtr(obj.ProjectRef.Id)
- usr := mustHaveUser(ctx)
- changes, err := data.SaveProjectSettingsForSection(ctx, projectId, obj, model.ProjectPageSection(section), false, usr.Username())
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- return changes, nil
-}
-
-func (r *mutationResolver) SaveRepoSettingsForSection(ctx context.Context, obj *restModel.APIProjectSettings, section ProjectSettingsSection) (*restModel.APIProjectSettings, error) {
- projectId := utility.FromStringPtr(obj.ProjectRef.Id)
- usr := mustHaveUser(ctx)
- changes, err := data.SaveProjectSettingsForSection(ctx, projectId, obj, model.ProjectPageSection(section), true, usr.Username())
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- return changes, nil
-}
-
-func (r *mutationResolver) DefaultSectionToRepo(ctx context.Context, projectId string, section ProjectSettingsSection) (*string, error) {
- usr := mustHaveUser(ctx)
- if err := model.DefaultSectionToRepo(projectId, model.ProjectPageSection(section), usr.Username()); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error defaulting to repo for section: %s", err.Error()))
- }
-
- return &projectId, nil
-}
-
-func (r *mutationResolver) AttachProjectToRepo(ctx context.Context, projectID string) (*restModel.APIProjectRef, error) {
- usr := mustHaveUser(ctx)
- pRef, err := data.FindProjectById(projectID, false, false)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding project %s: %s", projectID, err.Error()))
- }
- if pRef == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find project %s", projectID))
- }
- if err = pRef.AttachToRepo(usr); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error attaching to repo: %s", err.Error()))
- }
-
- res := &restModel.APIProjectRef{}
- if err := res.BuildFromService(pRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building project from service: %s", err.Error()))
- }
- return res, nil
-}
-
-func (r *mutationResolver) DetachProjectFromRepo(ctx context.Context, projectID string) (*restModel.APIProjectRef, error) {
- usr := mustHaveUser(ctx)
- pRef, err := data.FindProjectById(projectID, false, false)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding project %s: %s", projectID, err.Error()))
- }
- if pRef == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find project %s", projectID))
- }
- if err = pRef.DetachFromRepo(usr); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error detaching from repo: %s", err.Error()))
- }
-
- res := &restModel.APIProjectRef{}
- if err := res.BuildFromService(pRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error building project from service: %s", err.Error()))
- }
- return res, nil
-}
-
-func (r *mutationResolver) ForceRepotrackerRun(ctx context.Context, projectID string) (bool, error) {
- ts := utility.RoundPartOfHour(1).Format(units.TSFormat)
- j := units.NewRepotrackerJob(fmt.Sprintf("catchup-%s", ts), projectID)
- if err := evergreen.GetEnvironment().RemoteQueue().Put(ctx, j); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error creating Repotracker job: %s", err.Error()))
- }
- return true, nil
-}
-
-func (r *mutationResolver) DeactivateStepbackTasks(ctx context.Context, projectID string) (bool, error) {
- usr := mustHaveUser(ctx)
- if err := task.DeactivateStepbackTasksForProject(projectID, usr.Username()); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("deactivating current stepback tasks: %s", err.Error()))
- }
- return true, nil
-}
-
-func (r *mutationResolver) SetTaskPriority(ctx context.Context, taskID string, priority int) (*restModel.APITask, error) {
- t, err := task.FindOneId(taskID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- authUser := gimlet.GetUser(ctx)
- if priority > evergreen.MaxTaskPriority {
- requiredPermission := gimlet.PermissionOpts{
- Resource: t.Project,
- ResourceType: evergreen.ProjectResourceType,
- Permission: evergreen.PermissionTasks,
- RequiredLevel: evergreen.TasksAdmin.Value,
- }
- isTaskAdmin := authUser.HasPermission(requiredPermission)
- if !isTaskAdmin {
- return nil, Forbidden.Send(ctx, fmt.Sprintf("Insufficient access to set priority %v, can only set priority less than or equal to %v", priority, evergreen.MaxTaskPriority))
- }
- }
- if err = model.SetTaskPriority(*t, int64(priority), authUser.Username()); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting task priority %v: %v", taskID, err.Error()))
- }
-
- t, err = task.FindOneId(taskID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
- return apiTask, err
-}
-
-func (r *mutationResolver) OverrideTaskDependencies(ctx context.Context, taskID string) (*restModel.APITask, error) {
- currentUser := mustHaveUser(ctx)
- t, err := task.FindByIdExecution(taskID, nil)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding task %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- if err = t.SetOverrideDependencies(currentUser.Username()); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error overriding dependencies for task %s: %s", taskID, err.Error()))
- }
- t.DisplayStatus = t.GetDisplayStatus()
- return getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
-}
-
-func (r *mutationResolver) SchedulePatch(ctx context.Context, patchID string, configure PatchConfigure) (*restModel.APIPatch, error) {
- patchUpdateReq := buildFromGqlInput(configure)
- version, err := model.VersionFindOneId(patchID)
- if err != nil && !adb.ResultsNotFound(err) {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error occurred fetching patch `%s`: %s", patchID, err.Error()))
- }
- statusCode, err := units.SchedulePatch(ctx, patchID, version, patchUpdateReq)
- if err != nil {
- return nil, mapHTTPStatusToGqlError(ctx, statusCode, errors.Errorf("Error scheduling patch `%s`: %s", patchID, err.Error()))
- }
- scheduledPatch, err := data.FindPatchById(patchID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting scheduled patch `%s`: %s", patchID, err))
- }
- return scheduledPatch, nil
-}
-
-func (r *mutationResolver) SchedulePatchTasks(ctx context.Context, patchID string) (*string, error) {
- modifications := model.VersionModification{
- Action: evergreen.SetActiveAction,
- Active: true,
- Abort: false,
- }
- err := modifyVersionHandler(ctx, patchID, modifications)
- if err != nil {
- return nil, err
- }
- return &patchID, nil
-}
-
-func (r *mutationResolver) UnschedulePatchTasks(ctx context.Context, patchID string, abort bool) (*string, error) {
- modifications := model.VersionModification{
- Action: evergreen.SetActiveAction,
- Active: false,
- Abort: abort,
- }
- err := modifyVersionHandler(ctx, patchID, modifications)
- if err != nil {
- return nil, err
- }
- return &patchID, nil
-}
-
-// ScheduleUndispatchedBaseTasks only allows scheduling undispatched base tasks for tasks that are failing on the current patch
-func (r *mutationResolver) ScheduleUndispatchedBaseTasks(ctx context.Context, patchID string) ([]*restModel.APITask, error) {
- opts := task.GetTasksByVersionOptions{
- Statuses: evergreen.TaskFailureStatuses,
- IncludeExecutionTasks: true,
- IncludeBaseTasks: false,
- IncludeBuildVariantDisplayName: false,
- }
- tasks, _, err := task.GetTasksByVersion(patchID, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not fetch tasks for patch: %s ", err.Error()))
- }
-
- scheduledTasks := []*restModel.APITask{}
- tasksToSchedule := make(map[string]bool)
-
- for _, t := range tasks {
- // If a task is a generated task don't schedule it until we get all of the generated tasks we want to generate
- if t.GeneratedBy == "" {
- // We can ignore an error while fetching tasks because this could just mean the task didn't exist on the base commit.
- baseTask, _ := t.FindTaskOnBaseCommit()
- if baseTask != nil && baseTask.Status == evergreen.TaskUndispatched {
- tasksToSchedule[baseTask.Id] = true
- }
- // If a task is generated lets find its base task if it exists otherwise we need to generate it
- } else if t.GeneratedBy != "" {
- baseTask, _ := t.FindTaskOnBaseCommit()
- // If the task is undispatched or doesn't exist on the base commit then we want to schedule
- if baseTask == nil {
- generatorTask, err := task.FindByIdExecution(t.GeneratedBy, nil)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Experienced an error trying to find the generator task: %s", err.Error()))
- }
- if generatorTask != nil {
- baseGeneratorTask, _ := generatorTask.FindTaskOnBaseCommit()
- // If baseGeneratorTask is nil then it didn't exist on the base task and we can't do anything
- if baseGeneratorTask != nil && baseGeneratorTask.Status == evergreen.TaskUndispatched {
- err = baseGeneratorTask.SetGeneratedTasksToActivate(t.BuildVariant, t.DisplayName)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Could not activate generated task: %s", err.Error()))
- }
- tasksToSchedule[baseGeneratorTask.Id] = true
-
- }
- }
- } else if baseTask.Status == evergreen.TaskUndispatched {
- tasksToSchedule[baseTask.Id] = true
- }
-
- }
- }
-
- taskIDs := []string{}
- for taskId := range tasksToSchedule {
- taskIDs = append(taskIDs, taskId)
- }
- scheduled, err := setManyTasksScheduled(ctx, r.sc.GetURL(), true, taskIDs...)
- if err != nil {
- return nil, err
- }
- scheduledTasks = append(scheduledTasks, scheduled...)
- // sort scheduledTasks by display name to guarantee the order of the tasks
- sort.Slice(scheduledTasks, func(i, j int) bool {
- return utility.FromStringPtr(scheduledTasks[i].DisplayName) < utility.FromStringPtr(scheduledTasks[j].DisplayName)
- })
-
- return scheduledTasks, nil
-}
-
-func (r *mutationResolver) RestartVersions(ctx context.Context, patchID string, abort bool, versionsToRestart []*model.VersionToRestart) ([]*restModel.APIVersion, error) {
- if len(versionsToRestart) == 0 {
- return nil, InputValidationError.Send(ctx, "No versions provided. You must provide at least one version to restart")
- }
- modifications := model.VersionModification{
- Action: evergreen.RestartAction,
- Abort: abort,
- VersionsToRestart: versionsToRestart,
- }
- err := modifyVersionHandler(ctx, patchID, modifications)
- if err != nil {
- return nil, err
- }
- versions := []*restModel.APIVersion{}
- for _, version := range versionsToRestart {
- if version.VersionId != nil {
- v, versionErr := model.VersionFindOneId(*version.VersionId)
- if versionErr != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding version by id %s: %s", *version.VersionId, versionErr.Error()))
- }
- if v == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find version with id %s", *version.VersionId))
- }
- apiVersion := restModel.APIVersion{}
- if err = apiVersion.BuildFromService(v); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIVersion from service for `%s`: %s", *version.VersionId, err.Error()))
- }
- versions = append(versions, &apiVersion)
- }
- }
-
- return versions, nil
-}
-
-func (r *mutationResolver) SetPatchPriority(ctx context.Context, patchID string, priority int) (*string, error) {
- modifications := model.VersionModification{
- Action: evergreen.SetPriorityAction,
- Priority: int64(priority),
- }
- err := modifyVersionHandler(ctx, patchID, modifications)
- if err != nil {
- return nil, err
- }
- return &patchID, nil
-}
-
-func (r *mutationResolver) EnqueuePatch(ctx context.Context, patchID string, commitMessage *string) (*restModel.APIPatch, error) {
- user := mustHaveUser(ctx)
- existingPatch, err := data.FindPatchById(patchID)
- if err != nil {
- gimletErr, ok := err.(gimlet.ErrorResponse)
- if ok {
- return nil, mapHTTPStatusToGqlError(ctx, gimletErr.StatusCode, err)
- }
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error getting patch '%s'", patchID))
- }
-
- if !hasEnqueuePatchPermission(user, existingPatch) {
- return nil, Forbidden.Send(ctx, "can't enqueue another user's patch")
- }
-
- if commitMessage == nil {
- commitMessage = existingPatch.Description
- }
-
- newPatch, err := data.CreatePatchForMerge(ctx, patchID, utility.FromStringPtr(commitMessage))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error creating new patch: %s", err.Error()))
- }
- item := restModel.APICommitQueueItem{
- Issue: newPatch.Id,
- PatchId: newPatch.Id,
- Source: utility.ToStringPtr(commitqueue.SourceDiff)}
- _, err = data.EnqueueItem(utility.FromStringPtr(newPatch.ProjectId), item, false)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error enqueuing new patch: %s", err.Error()))
- }
-
- return newPatch, nil
-}
-
-func (r *mutationResolver) ScheduleTasks(ctx context.Context, taskIds []string) ([]*restModel.APITask, error) {
- scheduledTasks := []*restModel.APITask{}
- scheduled, err := setManyTasksScheduled(ctx, r.sc.GetURL(), true, taskIds...)
- if err != nil {
- return scheduledTasks, InternalServerError.Send(ctx, fmt.Sprintf("Failed to schedule tasks : %s", err.Error()))
- }
- scheduledTasks = append(scheduledTasks, scheduled...)
- return scheduledTasks, nil
-}
-
-func (r *mutationResolver) UnscheduleTask(ctx context.Context, taskID string) (*restModel.APITask, error) {
- scheduled, err := setManyTasksScheduled(ctx, r.sc.GetURL(), false, taskID)
- if err != nil {
- return nil, err
- }
- if len(scheduled) == 0 {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find task: %s", taskID))
- }
- return scheduled[0], nil
-}
-
-func (r *mutationResolver) AbortTask(ctx context.Context, taskID string) (*restModel.APITask, error) {
- t, err := task.FindOneId(taskID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- user := gimlet.GetUser(ctx).DisplayName()
- err = model.AbortTask(taskID, user)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error aborting task %s: %s", taskID, err.Error()))
- }
- t, err = task.FindOneId(taskID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
- return apiTask, err
-}
-
-func (r *mutationResolver) RestartTask(ctx context.Context, taskID string) (*restModel.APITask, error) {
- usr := mustHaveUser(ctx)
- username := usr.Username()
- if err := model.TryResetTask(taskID, username, evergreen.UIPackage, nil); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error restarting task %s: %s", taskID, err.Error()))
- }
- t, err := task.FindOneIdAndExecutionWithDisplayStatus(taskID, nil)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding task %s: %s", taskID, err.Error()))
- }
- if t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", taskID))
- }
- apiTask, err := getAPITaskFromTask(ctx, r.sc.GetURL(), *t)
- return apiTask, err
-}
-
-// EditAnnotationNote updates the note for the annotation, assuming it hasn't been updated in the meantime.
-func (r *mutationResolver) EditAnnotationNote(ctx context.Context, taskID string, execution int, originalMessage, newMessage string) (bool, error) {
- usr := mustHaveUser(ctx)
- if err := annotations.UpdateAnnotationNote(taskID, execution, originalMessage, newMessage, usr.Username()); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't update note: %s", err.Error()))
- }
- return true, nil
-}
-
-// MoveAnnotationIssue moves an issue for the annotation. If isIssue is set, it removes the issue from Issues and adds it
-// to Suspected Issues, otherwise vice versa.
-func (r *mutationResolver) MoveAnnotationIssue(ctx context.Context, taskID string, execution int, apiIssue restModel.APIIssueLink, isIssue bool) (bool, error) {
- usr := mustHaveUser(ctx)
- issue := restModel.APIIssueLinkToService(apiIssue)
- if isIssue {
- if err := annotations.MoveIssueToSuspectedIssue(taskID, execution, *issue, usr.Username()); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't move issue to suspected issues: %s", err.Error()))
- }
- return true, nil
- } else {
- if err := annotations.MoveSuspectedIssueToIssue(taskID, execution, *issue, usr.Username()); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't move issue to suspected issues: %s", err.Error()))
- }
- return true, nil
- }
-}
-
-// AddAnnotationIssue adds to the annotation for that taskID/execution.
-// If isIssue is set, it adds to Issues, otherwise it adds to Suspected Issues.
-func (r *mutationResolver) AddAnnotationIssue(ctx context.Context, taskID string, execution int,
- apiIssue restModel.APIIssueLink, isIssue bool) (bool, error) {
- usr := mustHaveUser(ctx)
- issue := restModel.APIIssueLinkToService(apiIssue)
- if err := util.CheckURL(issue.URL); err != nil {
- return false, InputValidationError.Send(ctx, fmt.Sprintf("issue does not have valid URL: %s", err.Error()))
- }
- if isIssue {
- if err := annotations.AddIssueToAnnotation(taskID, execution, *issue, usr.Username()); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't add issue: %s", err.Error()))
- }
- return true, nil
- } else {
- if err := annotations.AddSuspectedIssueToAnnotation(taskID, execution, *issue, usr.Username()); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't add suspected issue: %s", err.Error()))
- }
- return true, nil
- }
-}
-
-// RemoveAnnotationIssue adds to the annotation for that taskID/execution.
-// If isIssue is set, it adds to Issues, otherwise it adds to Suspected Issues.
-func (r *mutationResolver) RemoveAnnotationIssue(ctx context.Context, taskID string, execution int,
- apiIssue restModel.APIIssueLink, isIssue bool) (bool, error) {
- issue := restModel.APIIssueLinkToService(apiIssue)
- if isIssue {
- if err := annotations.RemoveIssueFromAnnotation(taskID, execution, *issue); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't delete issue: %s", err.Error()))
- }
- return true, nil
- } else {
- if err := annotations.RemoveSuspectedIssueFromAnnotation(taskID, execution, *issue); err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("couldn't delete suspected issue: %s", err.Error()))
- }
- return true, nil
- }
-}
-
-func (r *mutationResolver) RemoveItemFromCommitQueue(ctx context.Context, commitQueueID string, issue string) (*string, error) {
- result, err := data.CommitQueueRemoveItem(commitQueueID, issue, gimlet.GetUser(ctx).DisplayName())
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error removing item %s from commit queue %s: %s",
- issue, commitQueueID, err.Error()))
- }
- if result == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("couldn't remove item %s from commit queue %s", issue, commitQueueID))
- }
-
- return &issue, nil
-}
-
-func (r *mutationResolver) ClearMySubscriptions(ctx context.Context) (int, error) {
- usr := mustHaveUser(ctx)
- username := usr.Username()
- subs, err := event.FindSubscriptionsByOwner(username, event.OwnerTypePerson)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error retrieving subscriptions %s", err.Error()))
- }
- subIDs := removeGeneralSubscriptions(usr, subs)
- err = data.DeleteSubscriptions(username, subIDs)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error deleting subscriptions %s", err.Error()))
- }
-
- return len(subIDs), nil
-}
-
-func (r *mutationResolver) SaveSubscription(ctx context.Context, subscription restModel.APISubscription) (bool, error) {
- usr := mustHaveUser(ctx)
- username := usr.Username()
- idType, id, err := getResourceTypeAndIdFromSubscriptionSelectors(ctx, subscription.Selectors)
- if err != nil {
- return false, err
- }
- switch idType {
- case "task":
- t, taskErr := task.FindOneId(id)
- if taskErr != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding task by id %s: %s", id, taskErr.Error()))
- }
- if t == nil {
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find task with id %s", id))
- }
- case "build":
- b, buildErr := build.FindOneId(id)
- if buildErr != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding build by id %s: %s", id, buildErr.Error()))
- }
- if b == nil {
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find build with id %s", id))
- }
- case "version":
- v, versionErr := model.VersionFindOneId(id)
- if versionErr != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding version by id %s: %s", id, versionErr.Error()))
- }
- if v == nil {
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find version with id %s", id))
- }
- case "project":
- p, projectErr := data.FindProjectById(id, false, false)
- if projectErr != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding project by id %s: %s", id, projectErr.Error()))
- }
- if p == nil {
- return false, ResourceNotFound.Send(ctx, fmt.Sprintf("cannot find project with id %s", id))
- }
- default:
- return false, InputValidationError.Send(ctx, "Selectors do not indicate a target version, build, project, or task ID")
- }
- err = data.SaveSubscriptions(username, []restModel.APISubscription{subscription}, false)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error saving subscription: %s", err.Error()))
- }
- return true, nil
-}
-
-func (r *mutationResolver) UpdateUserSettings(ctx context.Context, userSettings *restModel.APIUserSettings) (bool, error) {
- usr := mustHaveUser(ctx)
-
- updatedUserSettings, err := restModel.UpdateUserSettings(ctx, usr, *userSettings)
- if err != nil {
- return false, InternalServerError.Send(ctx, err.Error())
- }
- err = data.UpdateSettings(usr, *updatedUserSettings)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("Error saving userSettings : %s", err.Error()))
- }
- return true, nil
-}
-
-func (r *mutationResolver) RestartJasper(ctx context.Context, hostIds []string) (int, error) {
- user := mustHaveUser(ctx)
-
- hosts, permissions, httpStatus, err := api.GetHostsAndUserPermissions(user, hostIds)
- if err != nil {
- return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
- }
-
- hostsUpdated, httpStatus, err := api.ModifyHostsWithPermissions(hosts, permissions, api.GetRestartJasperCallback(ctx, evergreen.GetEnvironment(), user.Username()))
- if err != nil {
- return 0, mapHTTPStatusToGqlError(ctx, httpStatus, errors.Errorf("Error marking selected hosts as needing Jasper service restarted: %s", err.Error()))
- }
-
- return hostsUpdated, nil
-}
-
-func (r *mutationResolver) ReprovisionToNew(ctx context.Context, hostIds []string) (int, error) {
- user := mustHaveUser(ctx)
-
- hosts, permissions, httpStatus, err := api.GetHostsAndUserPermissions(user, hostIds)
- if err != nil {
- return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
- }
-
- hostsUpdated, httpStatus, err := api.ModifyHostsWithPermissions(hosts, permissions, api.GetReprovisionToNewCallback(ctx, evergreen.GetEnvironment(), user.Username()))
- if err != nil {
- return 0, mapHTTPStatusToGqlError(ctx, httpStatus, errors.Errorf("Error marking selected hosts as needing to reprovision: %s", err.Error()))
- }
-
- return hostsUpdated, nil
-}
-
-func (r *mutationResolver) UpdateHostStatus(ctx context.Context, hostIds []string, status string, notes *string) (int, error) {
- user := mustHaveUser(ctx)
-
- hosts, permissions, httpStatus, err := api.GetHostsAndUserPermissions(user, hostIds)
- if err != nil {
- return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
- }
-
- rq := evergreen.GetEnvironment().RemoteQueue()
-
- hostsUpdated, httpStatus, err := api.ModifyHostsWithPermissions(hosts, permissions, api.GetUpdateHostStatusCallback(ctx, evergreen.GetEnvironment(), rq, status, *notes, user))
- if err != nil {
- return 0, mapHTTPStatusToGqlError(ctx, httpStatus, err)
- }
-
- return hostsUpdated, nil
-}
-
-func (r *mutationResolver) CreatePublicKey(ctx context.Context, publicKeyInput PublicKeyInput) ([]*restModel.APIPubKey, error) {
- err := savePublicKey(ctx, publicKeyInput)
- if err != nil {
- return nil, err
- }
- myPublicKeys := getMyPublicKeys(ctx)
- return myPublicKeys, nil
-}
-
-func (r *mutationResolver) RemovePublicKey(ctx context.Context, keyName string) ([]*restModel.APIPubKey, error) {
- if !doesPublicKeyNameAlreadyExist(ctx, keyName) {
- return nil, InputValidationError.Send(ctx, fmt.Sprintf("Error deleting public key. Provided key name, %s, does not exist.", keyName))
- }
- err := mustHaveUser(ctx).DeletePublicKey(keyName)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error deleting public key: %s", err.Error()))
- }
- myPublicKeys := getMyPublicKeys(ctx)
- return myPublicKeys, nil
-}
-
-func (r *mutationResolver) RemoveVolume(ctx context.Context, volumeID string) (bool, error) {
- statusCode, err := cloud.DeleteVolume(ctx, volumeID)
- if err != nil {
- return false, mapHTTPStatusToGqlError(ctx, statusCode, err)
- }
- return statusCode == http.StatusOK, nil
-}
-
-func (r *mutationResolver) UpdatePublicKey(ctx context.Context, targetKeyName string, updateInfo PublicKeyInput) ([]*restModel.APIPubKey, error) {
- if !doesPublicKeyNameAlreadyExist(ctx, targetKeyName) {
- return nil, InputValidationError.Send(ctx, fmt.Sprintf("Error updating public key. The target key name, %s, does not exist.", targetKeyName))
- }
- if updateInfo.Name != targetKeyName && doesPublicKeyNameAlreadyExist(ctx, updateInfo.Name) {
- return nil, InputValidationError.Send(ctx, fmt.Sprintf("Error updating public key. The updated key name, %s, already exists.", targetKeyName))
- }
- err := verifyPublicKey(ctx, updateInfo)
- if err != nil {
- return nil, err
- }
- usr := mustHaveUser(ctx)
- err = usr.UpdatePublicKey(targetKeyName, updateInfo.Name, updateInfo.Key)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error updating public key, %s: %s", targetKeyName, err.Error()))
- }
- myPublicKeys := getMyPublicKeys(ctx)
- return myPublicKeys, nil
-}
-
-func (r *queryResolver) User(ctx context.Context, userIdParam *string) (*restModel.APIDBUser, error) {
- usr := mustHaveUser(ctx)
- var err error
- if userIdParam != nil {
- usr, err = user.FindOneById(*userIdParam)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting user from user ID: %s", err.Error()))
- }
- if usr == nil {
- return nil, ResourceNotFound.Send(ctx, "Could not find user from user ID")
- }
- }
- displayName := usr.DisplayName()
- userID := usr.Username()
- email := usr.Email()
- user := restModel.APIDBUser{
- DisplayName: &displayName,
- UserID: &userID,
- EmailAddress: &email,
- }
- return &user, nil
-}
-
-func (r *userResolver) Patches(ctx context.Context, obj *restModel.APIDBUser, patchesInput PatchesInput) (*Patches, error) {
- opts := patch.ByPatchNameStatusesCommitQueuePaginatedOptions{
- Author: obj.UserID,
- PatchName: patchesInput.PatchName,
- Statuses: patchesInput.Statuses,
- Page: patchesInput.Page,
- Limit: patchesInput.Limit,
- IncludeCommitQueue: patchesInput.IncludeCommitQueue,
- }
- patches, count, err := patch.ByPatchNameStatusesCommitQueuePaginated(opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting patches for user %s: %s", utility.FromStringPtr(obj.UserID), err.Error()))
- }
-
- apiPatches := []*restModel.APIPatch{}
- for _, p := range patches {
- apiPatch := restModel.APIPatch{}
- if err = apiPatch.BuildFromService(p); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error converting patch to APIPatch for patch %s : %s", p.Id, err.Error()))
- }
- apiPatches = append(apiPatches, &apiPatch)
- }
- return &Patches{Patches: apiPatches, FilteredPatchCount: count}, nil
-}
-
-func (r *userResolver) Permissions(ctx context.Context, obj *restModel.APIDBUser) (*Permissions, error) {
- return &Permissions{UserID: utility.FromStringPtr(obj.UserID)}, nil
-}
-
-func (r *queryResolver) InstanceTypes(ctx context.Context) ([]string, error) {
- config, err := evergreen.GetConfig()
- if err != nil {
- return nil, InternalServerError.Send(ctx, "unable to retrieve server config")
- }
- return config.Providers.AWS.AllowedInstanceTypes, nil
-}
-
-type taskResolver struct{ *Resolver }
-
-func (r *taskResolver) DisplayTask(ctx context.Context, obj *restModel.APITask) (*restModel.APITask, error) {
- t, err := task.FindOneId(*obj.Id)
- if err != nil || t == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find task with id: %s", *obj.Id))
- }
- dt, err := t.GetDisplayTask()
- if dt == nil || err != nil {
- return nil, nil
- }
- apiTask := &restModel.APITask{}
- if err = apiTask.BuildFromArgs(dt, nil); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert display task: %s to APITask", dt.Id))
- }
- return apiTask, nil
-}
-
-func (r *taskResolver) EstimatedStart(ctx context.Context, obj *restModel.APITask) (*restModel.APIDuration, error) {
- t, err := obj.ToService()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while converting task %s to service", *obj.Id))
- }
- start, err := model.GetEstimatedStartTime(*t)
- if err != nil {
- return nil, InternalServerError.Send(ctx, "error getting estimated start time")
- }
- duration := restModel.NewAPIDuration(start)
- return &duration, nil
-}
-
-func (r *taskResolver) TotalTestCount(ctx context.Context, obj *restModel.APITask) (int, error) {
- if obj.HasCedarResults {
- opts := apimodels.GetCedarTestResultsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: utility.FromStringPtr(obj.Id),
- Execution: utility.ToIntPtr(obj.Execution),
- DisplayTask: obj.DisplayOnly,
- }
- stats, err := apimodels.GetCedarTestResultsStatsWithStatusError(ctx, opts)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("getting test count: %s", err))
- }
-
- return stats.TotalCount, nil
- }
- testCount, err := task.GetTestCountByTaskIdAndFilters(*obj.Id, "", nil, obj.Execution)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("getting test count: %s", err))
- }
-
- return testCount, nil
-}
-
-func (r *taskResolver) FailedTestCount(ctx context.Context, obj *restModel.APITask) (int, error) {
- if obj.HasCedarResults {
- opts := apimodels.GetCedarTestResultsOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: utility.FromStringPtr(obj.Id),
- Execution: utility.ToIntPtr(obj.Execution),
- DisplayTask: obj.DisplayOnly,
- }
- stats, err := apimodels.GetCedarTestResultsStatsWithStatusError(ctx, opts)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("getting failed test count: %s", err))
- }
-
- return stats.FailedCount, nil
- }
-
- failedTestCount, err := task.GetTestCountByTaskIdAndFilters(*obj.Id, "", []string{evergreen.TestFailedStatus}, obj.Execution)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("getting failed test count: %s", err))
- }
-
- return failedTestCount, nil
-}
-
-func (r *taskResolver) SpawnHostLink(ctx context.Context, at *restModel.APITask) (*string, error) {
- host, err := host.FindOne(host.ById(*at.HostId))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding host for task %s", *at.Id))
- }
- if host == nil {
- return nil, nil
- }
- if host.Distro.SpawnAllowed && utility.StringSliceContains(evergreen.ProviderUserSpawnable, host.Distro.Provider) {
- link := fmt.Sprintf("%s/spawn?distro_id=%s&task_id=%s", evergreen.GetEnvironment().Settings().Ui.Url, host.Distro.Id, *at.Id)
- return &link, nil
- }
- return nil, nil
-}
-
-func (r *taskResolver) PatchNumber(ctx context.Context, obj *restModel.APITask) (*int, error) {
- order := obj.Order
- return &order, nil
-}
-
-func (r *taskResolver) CanRestart(ctx context.Context, obj *restModel.APITask) (bool, error) {
- t, err := obj.ToService()
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("converting task '%s' to service", *obj.Id))
- }
- return canRestartTask(t), nil
-}
-
-func (r *taskResolver) CanAbort(ctx context.Context, obj *restModel.APITask) (bool, error) {
- return *obj.Status == evergreen.TaskDispatched || *obj.Status == evergreen.TaskStarted, nil
-}
-
-func (r *taskResolver) CanSchedule(ctx context.Context, obj *restModel.APITask) (bool, error) {
- t, err := obj.ToService()
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("converting task '%s' to service", *obj.Id))
- }
- return canScheduleTask(t), nil
-}
-
-func (r *taskResolver) CanUnschedule(ctx context.Context, obj *restModel.APITask) (bool, error) {
- return (obj.Activated && *obj.Status == evergreen.TaskUndispatched), nil
-}
-
-func (r *taskResolver) CanSetPriority(ctx context.Context, obj *restModel.APITask) (bool, error) {
- return *obj.Status == evergreen.TaskUndispatched, nil
-}
-
-func (r *taskResolver) Status(ctx context.Context, obj *restModel.APITask) (string, error) {
- return *obj.DisplayStatus, nil
-}
-
-func (r *taskResolver) LatestExecution(ctx context.Context, obj *restModel.APITask) (int, error) {
- return task.GetLatestExecution(*obj.Id)
-}
-
-func (r *taskResolver) GeneratedByName(ctx context.Context, obj *restModel.APITask) (*string, error) {
- if obj.GeneratedBy == "" {
- return nil, nil
- }
- generator, err := task.FindOneIdWithFields(obj.GeneratedBy, task.DisplayNameKey)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("unable to find generator: %s", err.Error()))
- }
- if generator == nil {
- return nil, nil
- }
- name := generator.DisplayName
-
- return &name, nil
-}
-
-func (r *taskResolver) IsPerfPluginEnabled(ctx context.Context, obj *restModel.APITask) (bool, error) {
- if !evergreen.IsFinishedTaskStatus(utility.FromStringPtr(obj.Status)) {
- return false, nil
- }
- if !model.IsPerfEnabledForProject(*obj.ProjectId) {
- return false, nil
- }
- opts := apimodels.GetCedarPerfCountOptions{
- BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
- TaskID: utility.FromStringPtr(obj.Id),
- Execution: obj.Execution,
- }
- if opts.BaseURL == "" {
- return false, nil
- }
- result, err := apimodels.CedarPerfResultsCount(ctx, opts)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error requesting perf data from cedar: %s", err))
- }
- if result.NumberOfResults == 0 {
- return false, nil
- }
- return true, nil
-}
-
-func (r *taskResolver) MinQueuePosition(ctx context.Context, obj *restModel.APITask) (int, error) {
- position, err := model.FindMinimumQueuePositionForTask(*obj.Id)
- if err != nil {
- return 0, InternalServerError.Send(ctx, fmt.Sprintf("error queue position for task: %s", err.Error()))
- }
- if position < 0 {
- return 0, nil
- }
- return position, nil
-}
-func (r *taskResolver) BaseStatus(ctx context.Context, obj *restModel.APITask) (*string, error) {
- t, err := obj.ToService()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
- }
- baseStatus := t.BaseTask.Status
- if baseStatus == "" {
- return nil, nil
- }
- return &baseStatus, nil
-}
-
-func (r *taskResolver) BaseTask(ctx context.Context, obj *restModel.APITask) (*restModel.APITask, error) {
- t, err := obj.ToService()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
- }
- var baseTask *task.Task
- // BaseTask is sometimes added via aggregation when Task is resolved via GetTasksByVersion.
- if t.BaseTask.Id != "" {
- baseTask, err = task.FindOneId(t.BaseTask.Id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s: %s", t.BaseTask.Id, err.Error()))
- }
- if baseTask == nil {
- return nil, gimlet.ErrorResponse{
- StatusCode: http.StatusNotFound,
- Message: fmt.Sprintf("task with id '%s' not found", t.BaseTask.Id),
- }
- }
- } else {
- if evergreen.IsPatchRequester(t.Requester) {
- baseTask, err = t.FindTaskOnBaseCommit()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s on base commit: %s", *obj.Id, err.Error()))
- }
- } else {
- baseTask, err = t.FindTaskOnPreviousCommit()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s on previous commit: %s", *obj.Id, err.Error()))
- }
- }
- }
-
- if baseTask == nil {
- return nil, nil
- }
- apiTask := &restModel.APITask{}
- err = apiTask.BuildFromArgs(baseTask, nil)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert baseTask %s to APITask : %s", baseTask.Id, err))
- }
- return apiTask, nil
-}
-
-func (r *taskResolver) ExecutionTasksFull(ctx context.Context, obj *restModel.APITask) ([]*restModel.APITask, error) {
- if len(obj.ExecutionTasks) == 0 {
- return nil, nil
- }
- tasks, err := task.FindByExecutionTasksAndMaxExecution(obj.ExecutionTasks, obj.Execution)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding execution tasks for task: %s : %s", *obj.Id, err.Error()))
- }
- apiTasks := []*restModel.APITask{}
- for _, t := range tasks {
- apiTask := &restModel.APITask{}
- err = apiTask.BuildFromArgs(&t, nil)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert task %s to APITask : %s", t.Id, err.Error()))
- }
- apiTasks = append(apiTasks, apiTask)
- }
- return apiTasks, nil
-}
-
-func (r *taskResolver) BuildVariantDisplayName(ctx context.Context, obj *restModel.APITask) (*string, error) {
- if obj.BuildId == nil {
- return nil, nil
- }
- buildID := utility.FromStringPtr(obj.BuildId)
- b, err := build.FindOneId(buildID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find build id: %s for task: %s, '%s'", buildID, utility.FromStringPtr(obj.Id), err.Error()))
- }
- if b == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find build id: %s for task: %s", buildID, utility.FromStringPtr(obj.Id)))
- }
- displayName := b.DisplayName
- return &displayName, nil
-
-}
-
-func (r *taskResolver) VersionMetadata(ctx context.Context, obj *restModel.APITask) (*restModel.APIVersion, error) {
- v, err := model.VersionFindOneId(utility.FromStringPtr(obj.Version))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find version id: %s for task: %s", *obj.Version, utility.FromStringPtr(obj.Id)))
- }
- if v == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", *obj.Version))
- }
- apiVersion := &restModel.APIVersion{}
- if err = apiVersion.BuildFromService(v); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert version: %s to APIVersion", v.Id))
- }
- return apiVersion, nil
-}
-
-func (r *taskResolver) Patch(ctx context.Context, obj *restModel.APITask) (*restModel.APIPatch, error) {
- if !evergreen.IsPatchRequester(*obj.Requester) {
- return nil, nil
- }
- apiPatch, err := data.FindPatchById(*obj.Version)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Couldn't find a patch with id: `%s` %s", *obj.Version, err.Error()))
- }
- return apiPatch, nil
-}
-
-func (r *queryResolver) BuildBaron(ctx context.Context, taskID string, exec int) (*BuildBaron, error) {
- execString := strconv.Itoa(exec)
-
- searchReturnInfo, bbConfig, err := model.GetSearchReturnInfo(taskID, execString)
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
-
- return &BuildBaron{
- SearchReturnInfo: searchReturnInfo,
- BuildBaronConfigured: bbConfig.ProjectFound && bbConfig.SearchConfigured,
- BbTicketCreationDefined: bbConfig.TicketCreationDefined,
- }, nil
-}
-
-func (r *mutationResolver) BbCreateTicket(ctx context.Context, taskID string, execution *int) (bool, error) {
- httpStatus, err := data.BbFileTicket(ctx, taskID, *execution)
- if err != nil {
- return false, mapHTTPStatusToGqlError(ctx, httpStatus, err)
- }
-
- return true, nil
-}
-
-func (r *queryResolver) BbGetCreatedTickets(ctx context.Context, taskID string) ([]*thirdparty.JiraTicket, error) {
- createdTickets, err := bbGetCreatedTicketsPointers(taskID)
- if err != nil {
- return nil, err
- }
-
- return createdTickets, nil
-}
-
-func (r *queryResolver) TaskNamesForBuildVariant(ctx context.Context, projectId string, buildVariant string) ([]string, error) {
- pid, err := model.GetIdForProject(projectId)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with id: %s", projectId))
- }
- repo, err := model.FindRepository(pid)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while getting repository for '%s': %s", projectId, err.Error()))
- }
- if repo == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find repository '%s'", pid))
- }
- buildVariantTasks, err := task.FindTaskNamesByBuildVariant(pid, buildVariant, repo.RevisionOrderNumber)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while getting tasks for '%s': %s", buildVariant, err.Error()))
- }
- if buildVariantTasks == nil {
- return []string{}, nil
- }
- return buildVariantTasks, nil
-}
-
-func (r *queryResolver) BuildVariantsForTaskName(ctx context.Context, projectId string, taskName string) ([]*task.BuildVariantTuple, error) {
- pid, err := model.GetIdForProject(projectId)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with id: %s", projectId))
- }
- repo, err := model.FindRepository(pid)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while getting repository for '%s': %s", projectId, err.Error()))
- }
- if repo == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find repository '%s'", projectId))
- }
- taskBuildVariants, err := task.FindUniqueBuildVariantNamesByTask(pid, taskName, repo.RevisionOrderNumber)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while getting build variant tasks for task '%s': %s", taskName, err.Error()))
- }
- if taskBuildVariants == nil {
- return nil, nil
- }
- return taskBuildVariants, nil
-
-}
-
-// Will return an array of activated and unactivated versions
-func (r *queryResolver) MainlineCommits(ctx context.Context, options MainlineCommitsOptions, buildVariantOptions *BuildVariantOptions) (*MainlineCommits, error) {
- projectId, err := model.GetIdForProject(options.ProjectID)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with id: %s", options.ProjectID))
- }
- limit := model.DefaultMainlineCommitVersionLimit
- if utility.FromIntPtr(options.Limit) != 0 {
- limit = utility.FromIntPtr(options.Limit)
- }
- requesters := options.Requesters
- if len(requesters) == 0 {
- requesters = evergreen.SystemVersionRequesterTypes
- }
- opts := model.MainlineCommitVersionOptions{
- Limit: limit,
- SkipOrderNumber: utility.FromIntPtr(options.SkipOrderNumber),
- Requesters: requesters,
- }
-
- versions, err := model.GetMainlineCommitVersionsWithOptions(projectId, opts)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting activated versions: %s", err.Error()))
- }
-
- var mainlineCommits MainlineCommits
- matchingVersionCount := 0
-
- // We only want to return the PrevPageOrderNumber if a user is not on the first page
- if options.SkipOrderNumber != nil {
- prevPageCommit, err := model.GetPreviousPageCommitOrderNumber(projectId, utility.FromIntPtr(options.SkipOrderNumber), limit, requesters)
-
- if err != nil {
- // This shouldn't really happen, but if it does, we should return an error and log it
- grip.Warning(message.WrapError(err, message.Fields{
- "message": "Error getting most recent version",
- "project_id": projectId,
- }))
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting most recent mainline commit: %s", err.Error()))
- }
-
- if prevPageCommit != nil {
- mainlineCommits.PrevPageOrderNumber = prevPageCommit
- }
- }
-
- index := 0
- versionsCheckedCount := 0
-
- // We will loop through each version returned from GetMainlineCommitVersionsWithOptions and see if there is a commit that matches the filter parameters (if any).
- // If there is a match, we will add it to the array of versions to be returned to the user.
- // If there are not enough matches to satisfy our limit, we will call GetMainlineCommitVersionsWithOptions again with the next order number to check and repeat the process.
- for matchingVersionCount < limit {
- // If we no longer have any more versions to check break out and return what we have.
- if len(versions) == 0 {
- break
- }
- // If we have checked more versions than the MaxMainlineCommitVersionLimit then break out and return what we have.
- if versionsCheckedCount >= model.MaxMainlineCommitVersionLimit {
- // Return an error if we did not find any versions that match.
- if matchingVersionCount == 0 {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Matching version not found in %d most recent versions", model.MaxMainlineCommitVersionLimit))
- }
- break
- }
- versionsCheckedCount++
- v := versions[index]
- apiVersion := restModel.APIVersion{}
- err = apiVersion.BuildFromService(&v)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIVersion from service: %s", err.Error()))
- }
-
- // If the version was created before we started caching activation status we must manually verify it and cache that value.
- if v.Activated == nil {
- err = setVersionActivationStatus(&v)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting version activation status: %s", err.Error()))
- }
- }
- mainlineCommitVersion := MainlineCommitVersion{}
- shouldCollapse := false
- if !utility.FromBoolPtr(v.Activated) {
- shouldCollapse = true
- } else if buildVariantOptions.isPopulated() && utility.FromBoolPtr(options.ShouldCollapse) {
- opts := task.HasMatchingTasksOptions{
- TaskNames: buildVariantOptions.Tasks,
- Variants: buildVariantOptions.Variants,
- Statuses: getValidTaskStatusesFilter(buildVariantOptions.Statuses),
- }
- hasTasks, err := task.HasMatchingTasks(v.Id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error checking if version has tasks: %s", err.Error()))
- }
- if !hasTasks {
- shouldCollapse = true
- }
- }
- // If a version matches our filter criteria we append it directly to our returned list of mainlineCommits
- if !shouldCollapse {
- matchingVersionCount++
- mainlineCommits.NextPageOrderNumber = utility.ToIntPtr(v.RevisionOrderNumber)
- mainlineCommitVersion.Version = &apiVersion
-
- } else {
- // If a version does not match our filter criteria roll up all the unactivated versions that are sequentially near each other into a single MainlineCommitVersion,
- // and then append it to our returned list.
- // If we have any versions already we should check the most recent one first otherwise create a new one
- if len(mainlineCommits.Versions) > 0 {
- lastMainlineCommit := mainlineCommits.Versions[len(mainlineCommits.Versions)-1]
-
- // If the previous mainlineCommit contains rolled up unactivated versions append the latest RolledUp unactivated version
- if lastMainlineCommit.RolledUpVersions != nil {
- lastMainlineCommit.RolledUpVersions = append(lastMainlineCommit.RolledUpVersions, &apiVersion)
- } else {
- mainlineCommitVersion.RolledUpVersions = []*restModel.APIVersion{&apiVersion}
- }
-
- } else {
- mainlineCommitVersion.RolledUpVersions = []*restModel.APIVersion{&apiVersion}
-
- }
-
- }
-
- // Only add a mainlineCommit if a new one was added and it's not a modified existing RolledUpVersion
- if mainlineCommitVersion.Version != nil || mainlineCommitVersion.RolledUpVersions != nil {
- mainlineCommits.Versions = append(mainlineCommits.Versions, &mainlineCommitVersion)
- }
- index++
- // If we have exhausted all of our versions we should fetch some more.
- if index == len(versions) && matchingVersionCount < limit {
- skipOrderNumber := versions[len(versions)-1].RevisionOrderNumber
- opts := model.MainlineCommitVersionOptions{
- Limit: limit,
- SkipOrderNumber: skipOrderNumber,
- Requesters: requesters,
- }
-
- versions, err = model.GetMainlineCommitVersionsWithOptions(projectId, opts)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Error getting activated versions: %s", err.Error()))
- }
- index = 0
- }
- }
-
- return &mainlineCommits, nil
-}
-
-type versionResolver struct{ *Resolver }
-
-func (r *versionResolver) Manifest(ctx context.Context, v *restModel.APIVersion) (*Manifest, error) {
- m, err := manifest.FindFromVersion(*v.Id, *v.Project, *v.Revision, *v.Requester)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error fetching manifest for version %s : %s", *v.Id, err.Error()))
- }
- if m == nil {
- return nil, nil
- }
- versionManifest := Manifest{
- ID: m.Id,
- Revision: m.Revision,
- Project: m.ProjectName,
- Branch: m.Branch,
- IsBase: m.IsBase,
- ModuleOverrides: m.ModuleOverrides,
- }
- modules := map[string]interface{}{}
- for key, module := range m.Modules {
- modules[key] = module
- }
- versionManifest.Modules = modules
-
- return &versionManifest, nil
-}
-
-func (r *versionResolver) TaskStatuses(ctx context.Context, v *restModel.APIVersion) ([]string, error) {
- defaultSort := []task.TasksSortOrder{
- {Key: task.DisplayNameKey, Order: 1},
- }
- opts := task.GetTasksByVersionOptions{
- Sorts: defaultSort,
- IncludeBaseTasks: false,
- FieldsToProject: []string{task.DisplayStatusKey},
- IncludeBuildVariantDisplayName: false,
- }
- tasks, _, err := task.GetTasksByVersion(*v.Id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version tasks: %s", err.Error()))
- }
- return getAllTaskStatuses(tasks), nil
-}
-
-func (r *versionResolver) BaseTaskStatuses(ctx context.Context, v *restModel.APIVersion) ([]string, error) {
- var baseVersion *model.Version
- var err error
-
- if evergreen.IsPatchRequester(utility.FromStringPtr(v.Requester)) || utility.FromStringPtr(v.Requester) == evergreen.AdHocRequester {
- // Get base commit if patch or periodic build.
- baseVersion, err = model.VersionFindOne(model.BaseVersionByProjectIdAndRevision(utility.FromStringPtr(v.Project), utility.FromStringPtr(v.Revision)))
- } else {
- // Get previous commit if mainline commit.
- baseVersion, err = model.VersionFindOne(model.VersionByProjectIdAndOrder(utility.FromStringPtr(v.Project), v.Order-1))
- }
- if baseVersion == nil || err != nil {
- return nil, nil
- }
- statuses, err := task.GetBaseStatusesForActivatedTasks(*v.Id, baseVersion.Id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting base version tasks: '%s'", err.Error()))
- }
- return statuses, nil
-}
-
-// Returns task status counts (a mapping between status and the number of tasks with that status) for a version.
-func (r *versionResolver) TaskStatusCounts(ctx context.Context, v *restModel.APIVersion, options *BuildVariantOptions) ([]*task.StatusCount, error) {
- opts := task.GetTasksByVersionOptions{
- IncludeBaseTasks: false,
- IncludeExecutionTasks: false,
- TaskNames: options.Tasks,
- Variants: options.Variants,
- Statuses: getValidTaskStatusesFilter(options.Statuses),
- }
- if len(options.Variants) != 0 {
- opts.IncludeBuildVariantDisplayName = true // we only need the buildVariantDisplayName if we plan on filtering on it.
- }
- stats, err := task.GetTaskStatsByVersion(*v.Id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version task stats: %s", err.Error()))
- }
- result := []*task.StatusCount{}
- for _, c := range stats.Counts {
- count := c
- result = append(result, &count)
- }
- return result, nil
-}
-
-func (r *versionResolver) TaskStatusStats(ctx context.Context, v *restModel.APIVersion, options *BuildVariantOptions) (*task.TaskStats, error) {
- opts := task.GetTasksByVersionOptions{
- IncludeBaseTasks: false,
- IncludeExecutionTasks: false,
- TaskNames: options.Tasks,
- Variants: options.Variants,
- Statuses: getValidTaskStatusesFilter(options.Statuses),
- }
- if len(options.Variants) != 0 {
- opts.IncludeBuildVariantDisplayName = true // we only need the buildVariantDisplayName if we plan on filtering on it.
- }
- stats, err := task.GetTaskStatsByVersion(*v.Id, opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting version task status stats: %s", err.Error()))
- }
-
- return stats, nil
-}
-
-// Returns grouped build variants for a version. Will not return build variants for unactivated versions
-func (r *versionResolver) BuildVariants(ctx context.Context, v *restModel.APIVersion, options *BuildVariantOptions) ([]*GroupedBuildVariant, error) {
- // If activated is nil in the db we should resolve it and cache it for subsequent queries. There is a very low likely hood of this field being hit
- if v.Activated == nil {
- version, err := model.VersionFindOne(model.VersionById(*v.Id))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error fetching version: %s : %s", *v.Id, err.Error()))
- }
- if err = setVersionActivationStatus(version); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error setting version activation status: %s", err.Error()))
- }
- v.Activated = version.Activated
- }
-
- if !utility.FromBoolPtr(v.Activated) {
- return nil, nil
- }
- groupedBuildVariants, err := generateBuildVariants(utility.FromStringPtr(v.Id), *options)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error generating build variants for version %s : %s", *v.Id, err.Error()))
- }
- return groupedBuildVariants, nil
-}
-
-func (r *versionResolver) BuildVariantStats(ctx context.Context, v *restModel.APIVersion, options *BuildVariantOptions) ([]*task.GroupedTaskStatusCount, error) {
- opts := task.GetTasksByVersionOptions{
- TaskNames: options.Tasks,
- Variants: options.Variants,
- Statuses: options.Statuses,
- IncludeBuildVariantDisplayName: true,
- }
-
- stats, err := task.GetGroupedTaskStatsByVersion(utility.FromStringPtr(v.Id), opts)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version task stats: %s", err.Error()))
- }
-
- return stats, nil
-}
-
-func (r *versionResolver) IsPatch(ctx context.Context, v *restModel.APIVersion) (bool, error) {
- return evergreen.IsPatchRequester(*v.Requester), nil
-}
-
-func (r *versionResolver) Patch(ctx context.Context, v *restModel.APIVersion) (*restModel.APIPatch, error) {
- if !evergreen.IsPatchRequester(*v.Requester) {
- return nil, nil
- }
- apiPatch, err := data.FindPatchById(*v.Id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Couldn't find a patch with id: `%s` %s", *v.Id, err.Error()))
- }
- return apiPatch, nil
-}
-
-func (r *versionResolver) ChildVersions(ctx context.Context, v *restModel.APIVersion) ([]*restModel.APIVersion, error) {
- if !evergreen.IsPatchRequester(*v.Requester) {
- return nil, nil
- }
- if err := data.ValidatePatchID(*v.Id); err != nil {
- return nil, errors.WithStack(err)
- }
- foundPatch, err := patch.FindOneId(*v.Id)
- if err != nil {
- return nil, err
- }
- if foundPatch == nil {
- return nil, gimlet.ErrorResponse{
- StatusCode: http.StatusNotFound,
- Message: fmt.Sprintf("patch with id %s not found", *v.Id),
- }
- }
- childPatchIds := foundPatch.Triggers.ChildPatches
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Couldn't find a patch with id: `%s` %s", *v.Id, err.Error()))
- }
- if len(childPatchIds) > 0 {
- childVersions := []*restModel.APIVersion{}
- for _, cp := range childPatchIds {
- // this calls the graphql Version query resolver
- cv, err := r.Query().Version(ctx, cp)
- if err != nil {
- //before erroring due to the version being nil or not found,
- // fetch the child patch to see if it's activated
- p, err := patch.FindOneId(cp)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Encountered an error while fetching a child patch: %s", err.Error()))
- }
- if p == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to child patch %s", cp))
- }
- if p.Version != "" {
- //only return the error if the version is activated (and we therefore expect it to be there)
- return nil, InternalServerError.Send(ctx, "An unexpected error occurred. Could not find a child version and expected one.")
- }
- }
- if cv != nil {
- childVersions = append(childVersions, cv)
- }
- }
- return childVersions, nil
- }
- return nil, nil
-}
-
-func (r *versionResolver) TaskCount(ctx context.Context, obj *restModel.APIVersion) (*int, error) {
- taskCount, err := task.Count(db.Query(task.DisplayTasksByVersion(*obj.Id)))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting task count for version `%s`: %s", *obj.Id, err.Error()))
- }
- return &taskCount, nil
-}
-
-func (r *versionResolver) VersionTiming(ctx context.Context, obj *restModel.APIVersion) (*VersionTiming, error) {
- v, err := model.VersionFindOneId(*obj.Id)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding version `%s`: %s", *obj.Id, err.Error()))
- }
- if v == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding version `%s`: %s", *obj.Id, "Version not found"))
- }
- timeTaken, makespan, err := v.GetTimeSpent()
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting timing for version `%s`: %s", *obj.Id, err.Error()))
- }
- // return nil if rounded timeTaken/makespan == 0s
- t := timeTaken.Round(time.Second)
- m := makespan.Round(time.Second)
-
- var apiTimeTaken restModel.APIDuration
- var apiMakespan restModel.APIDuration
- if t.Seconds() != 0 {
- apiTimeTaken = restModel.NewAPIDuration(t)
- }
- if m.Seconds() != 0 {
- apiMakespan = restModel.NewAPIDuration(m)
- }
-
- return &VersionTiming{
- TimeTaken: &apiTimeTaken,
- Makespan: &apiMakespan,
- }, nil
-}
-
-func (r *versionResolver) BaseVersion(ctx context.Context, obj *restModel.APIVersion) (*restModel.APIVersion, error) {
- baseVersion, err := model.VersionFindOne(model.BaseVersionByProjectIdAndRevision(*obj.Project, *obj.Revision))
- if baseVersion == nil || err != nil {
- return nil, nil
- }
- apiVersion := restModel.APIVersion{}
- if err = apiVersion.BuildFromService(baseVersion); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIVersion from service for `%s`: %s", baseVersion.Id, err.Error()))
- }
- return &apiVersion, nil
-}
-
-func (r *versionResolver) PreviousVersion(ctx context.Context, obj *restModel.APIVersion) (*restModel.APIVersion, error) {
- if !evergreen.IsPatchRequester(utility.FromStringPtr(obj.Requester)) {
- previousVersion, err := model.VersionFindOne(model.VersionByProjectIdAndOrder(utility.FromStringPtr(obj.Project), obj.Order-1))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding previous version for `%s`: %s", *obj.Id, err.Error()))
- }
- if previousVersion == nil {
- return nil, nil
- }
- apiVersion := restModel.APIVersion{}
- if err = apiVersion.BuildFromService(previousVersion); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIVersion from service for `%s`: %s", previousVersion.Id, err.Error()))
- }
- return &apiVersion, nil
- } else {
- return nil, nil
- }
-}
-
-func (r *versionResolver) Status(ctx context.Context, obj *restModel.APIVersion) (string, error) {
- collectiveStatusArray, err := getCollectiveStatusArray(*obj)
- if err != nil {
- return "", InternalServerError.Send(ctx, fmt.Sprintf("getting collective status array: %s", err.Error()))
- }
-
- status := patch.GetCollectiveStatus(collectiveStatusArray)
-
- return status, nil
-}
-func (*versionResolver) ProjectMetadata(ctx context.Context, obj *restModel.APIVersion) (*restModel.APIProjectRef, error) {
- projectRef, err := model.FindMergedProjectRef(*obj.Project, *obj.Id, false)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding project ref for project `%s`: %s", *obj.Project, err.Error()))
- }
- if projectRef == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding project ref for project `%s`: %s", *obj.Project, "Project not found"))
- }
- apiProjectRef := restModel.APIProjectRef{}
- if err = apiProjectRef.BuildFromService(projectRef); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("building APIProjectRef from service for `%s`: %s", projectRef.Id, err.Error()))
- }
- return &apiProjectRef, nil
-}
-
-func (*versionResolver) UpstreamProject(ctx context.Context, obj *restModel.APIVersion) (*UpstreamProject, error) {
- v, err := model.VersionFindOneId(utility.FromStringPtr(obj.Id))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding version %s: '%s'", *obj.Id, err.Error()))
- }
- if v == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Version %s not found", *obj.Id))
- }
- if v.TriggerID == "" || v.TriggerType == "" {
- return nil, nil
- }
-
- var projectID string
- var upstreamProject *UpstreamProject
- if v.TriggerType == model.ProjectTriggerLevelTask {
- upstreamTask, err := task.FindOneId(v.TriggerID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream task %s: '%s'", v.TriggerID, err.Error()))
- }
- if upstreamTask == nil {
- return nil, ResourceNotFound.Send(ctx, "upstream task not found")
- }
-
- apiTask := restModel.APITask{}
- if err = apiTask.BuildFromArgs(upstreamTask, nil); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APITask from service for `%s`: %s", upstreamTask.Id, err.Error()))
- }
-
- projectID = upstreamTask.Project
- upstreamProject = &UpstreamProject{
- Revision: upstreamTask.Revision,
- Task: &apiTask,
- }
- } else if v.TriggerType == model.ProjectTriggerLevelBuild {
- upstreamBuild, err := build.FindOneId(v.TriggerID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream build %s: '%s'", v.TriggerID, err.Error()))
- }
- if upstreamBuild == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Upstream build %s not found", v.TriggerID))
- }
-
- upstreamVersion, err := model.VersionFindOneId(utility.FromStringPtr(&upstreamBuild.Version))
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream version %s: '%s'", *obj.Id, err.Error()))
- }
- if v == nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("upstream version %s not found", *obj.Id))
- }
-
- apiVersion := restModel.APIVersion{}
- if err = apiVersion.BuildFromService(upstreamVersion); err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("building APIVersion from service for `%s`: %s", upstreamVersion.Id, err.Error()))
- }
-
- projectID = upstreamVersion.Identifier
- upstreamProject = &UpstreamProject{
- Revision: upstreamBuild.Revision,
- Version: &apiVersion,
- }
- }
- upstreamProjectRef, err := model.FindBranchProjectRef(projectID)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream project, project: %s, error: '%s'", projectID, err.Error()))
- }
- if upstreamProjectRef == nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Upstream project %s not found", projectID))
- }
-
- upstreamProject.Owner = upstreamProjectRef.Owner
- upstreamProject.Repo = upstreamProjectRef.Repo
- upstreamProject.Project = upstreamProjectRef.Identifier
- upstreamProject.TriggerID = v.TriggerID
- upstreamProject.TriggerType = v.TriggerType
- return upstreamProject, nil
-
-}
-
-func (r *Resolver) Version() VersionResolver { return &versionResolver{r} }
-
-type ticketFieldsResolver struct{ *Resolver }
-
-func (r *ticketFieldsResolver) AssigneeDisplayName(ctx context.Context, obj *thirdparty.TicketFields) (*string, error) {
- if obj.Assignee == nil {
- return nil, nil
- }
- return &obj.Assignee.DisplayName, nil
-}
-
-func (r *ticketFieldsResolver) AssignedTeam(ctx context.Context, obj *thirdparty.TicketFields) (*string, error) {
- if obj.AssignedTeam == nil {
- return nil, nil
- }
- if len(obj.AssignedTeam) != 0 {
- return &obj.AssignedTeam[0].Value, nil
- }
- return nil, nil
-}
-
-func (r *ticketFieldsResolver) JiraStatus(ctx context.Context, obj *thirdparty.TicketFields) (*string, error) {
- if obj.Status == nil {
- return nil, nil
- }
- return &obj.Status.Name, nil
-}
-
-func (r *ticketFieldsResolver) ResolutionName(ctx context.Context, obj *thirdparty.TicketFields) (*string, error) {
- if obj.Resolution == nil {
- return nil, nil
- }
- return &obj.Resolution.Name, nil
-}
-
-func (r *Resolver) TicketFields() TicketFieldsResolver { return &ticketFieldsResolver{r} }
-
-func (r *taskResolver) Ami(ctx context.Context, obj *restModel.APITask) (*string, error) {
- err := obj.GetAMI()
- if err != nil {
- return nil, InternalServerError.Send(ctx, err.Error())
- }
- return obj.AMI, nil
-}
-
-func (r *taskResolver) Annotation(ctx context.Context, obj *restModel.APITask) (*restModel.APITaskAnnotation, error) {
- annotation, err := annotations.FindOneByTaskIdAndExecution(*obj.Id, obj.Execution)
- if err != nil {
- return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding annotation: %s", err.Error()))
- }
- if annotation == nil {
- return nil, nil
- }
- apiAnnotation := restModel.APITaskAnnotationBuildFromService(*annotation)
- return apiAnnotation, nil
-}
-
-func (r *taskResolver) CanModifyAnnotation(ctx context.Context, obj *restModel.APITask) (bool, error) {
- authUser := gimlet.GetUser(ctx)
- permissions := gimlet.PermissionOpts{
- Resource: *obj.ProjectId,
- ResourceType: evergreen.ProjectResourceType,
- Permission: evergreen.PermissionAnnotations,
- RequiredLevel: evergreen.AnnotationsModify.Value,
- }
- if authUser.HasPermission(permissions) {
- return true, nil
- }
- if utility.StringSliceContains(evergreen.PatchRequesters, utility.FromStringPtr(obj.Requester)) {
- p, err := patch.FindOneId(utility.FromStringPtr(obj.Version))
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding patch for task: %s", err.Error()))
- }
- if p == nil {
- return false, InternalServerError.Send(ctx, "patch for task doesn't exist")
- }
- if p.Author == authUser.Username() {
- return true, nil
- }
- }
- return false, nil
-}
-
-func (r *annotationResolver) WebhookConfigured(ctx context.Context, obj *restModel.APITaskAnnotation) (bool, error) {
- t, err := task.FindOneId(*obj.TaskId)
- if err != nil {
- return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding task: %s", err.Error()))
- }
- if t == nil {
- return false, ResourceNotFound.Send(ctx, "error finding task for the task annotation")
- }
- _, ok, _ := model.IsWebhookConfigured(t.Project, t.Version)
- return ok, nil
-}
-
-func (r *issueLinkResolver) JiraTicket(ctx context.Context, obj *restModel.APIIssueLink) (*thirdparty.JiraTicket, error) {
- return restModel.GetJiraTicketFromURL(*obj.URL)
-
-}
-
-// New injects resources into the resolvers, such as the data connector
-func New(apiURL string) Config {
- c := Config{
- Resolvers: &Resolver{
- sc: &data.DBConnector{URL: apiURL},
- },
- }
- c.Directives.RequireSuperUser = func(ctx context.Context, obj interface{}, next graphql.Resolver) (interface{}, error) {
- user := gimlet.GetUser(ctx)
- if user == nil {
- return nil, Forbidden.Send(ctx, "user not logged in")
- }
- opts := gimlet.PermissionOpts{
- Resource: evergreen.SuperUserPermissionsID,
- ResourceType: evergreen.SuperUserResourceType,
- Permission: evergreen.PermissionAdminSettings,
- RequiredLevel: evergreen.AdminSettingsEdit.Value,
- }
- if user.HasPermission(opts) {
- return next(ctx)
- }
- return nil, Forbidden.Send(ctx, fmt.Sprintf("user %s does not have permission to access this resolver", user.Username()))
- }
- c.Directives.RequireProjectAccess = func(ctx context.Context, obj interface{}, next graphql.Resolver, access ProjectSettingsAccess) (res interface{}, err error) {
- var permissionLevel int
- if access == ProjectSettingsAccessEdit {
- permissionLevel = evergreen.ProjectSettingsEdit.Value
- } else if access == ProjectSettingsAccessView {
- permissionLevel = evergreen.ProjectSettingsView.Value
- } else {
- return nil, Forbidden.Send(ctx, "Permission not specified")
- }
-
- args, isStringMap := obj.(map[string]interface{})
- if !isStringMap {
- return nil, ResourceNotFound.Send(ctx, "Project not specified")
- }
-
- if id, hasId := args["id"].(string); hasId {
- return hasProjectPermission(ctx, id, next, permissionLevel)
- } else if projectId, hasProjectId := args["projectId"].(string); hasProjectId {
- return hasProjectPermission(ctx, projectId, next, permissionLevel)
- } else if identifier, hasIdentifier := args["identifier"].(string); hasIdentifier {
- pid, err := model.GetIdForProject(identifier)
- if err != nil {
- return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find project with identifier: %s", identifier))
- }
- return hasProjectPermission(ctx, pid, next, permissionLevel)
- }
- return nil, ResourceNotFound.Send(ctx, "Could not find project")
- }
- return c
-}
diff --git a/graphql/schema.graphql b/graphql/schema.graphql
deleted file mode 100644
index 51966ced1c1..00000000000
--- a/graphql/schema.graphql
+++ /dev/null
@@ -1,1728 +0,0 @@
-directive @requireSuperUser on FIELD_DEFINITION
-directive @requireProjectAccess(access: ProjectSettingsAccess!) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
-
-type Query {
- task(taskId: String!, execution: Int): Task
- taskAllExecutions(taskId: String!): [Task!]!
- patch(id: String!): Patch!
- version(id: String!): Version!
- projects: [GroupedProjects]!
- viewableProjectRefs: [GroupedProjects]!
- githubProjectConflicts(projectId: String!): GithubProjectConflicts!
- project(projectId: String!): Project!
- patchTasks(
- patchId: String!
- sorts: [SortOrder!]
- page: Int = 0
- limit: Int = 0
- statuses: [String!] = []
- baseStatuses: [String!] = []
- variant: String
- taskName: String
- includeEmptyActivation: Boolean = false
- ): PatchTasks!
- taskTests(
- taskId: String!
- execution: Int
- sortCategory: TestSortCategory = TEST_NAME
- sortDirection: SortDirection = ASC
- page: Int = 0
- limit: Int = 0
- testName: String = ""
- statuses: [String!]! = []
- groupId: String = ""
- ): TaskTestResult!
- taskTestSample(
- tasks: [String!]!
- filters: [TestFilter!]!
- ): [TaskTestResultSample!]
- taskFiles(taskId: String!, execution: Int): TaskFiles!
- user(userId: String): User!
- taskLogs(taskId: String!, execution: Int): TaskLogs!
- commitQueue(id: String!): CommitQueue!
- userSettings: UserSettings
- spruceConfig: SpruceConfig
- awsRegions: [String!]
- subnetAvailabilityZones: [String!]!
- userConfig: UserConfig
- clientConfig: ClientConfig
- host(hostId: String!): Host
- hostEvents(
- hostId: String!
- hostTag: String = ""
- limit: Int = 0
- page: Int = 0
- ): HostEvents!
- hosts(
- hostId: String = ""
- distroId: String = ""
- currentTaskId: String = ""
- statuses: [String!] = []
- startedBy: String = ""
- sortBy: HostSortBy = STATUS
- sortDir: SortDirection = ASC
- page: Int = 0
- limit: Int = 10
- ): HostsResponse!
- myHosts: [Host!]!
- myVolumes: [Volume!]!
- myPublicKeys: [PublicKey!]!
- distros(onlySpawnable: Boolean!): [Distro]!
- instanceTypes: [String!]!
- distroTaskQueue(distroId: String!): [TaskQueueItem!]!
- taskQueueDistros: [TaskQueueDistro!]!
- buildBaron(taskId: String!, execution: Int!): BuildBaron!
- bbGetCreatedTickets(taskId: String!): [JiraTicket!]!
- mainlineCommits(options: MainlineCommitsOptions!, buildVariantOptions: BuildVariantOptions): MainlineCommits
- taskNamesForBuildVariant(projectId: String!, buildVariant: String!): [String!]
- buildVariantsForTaskName(projectId: String!, taskName: String!): [BuildVariantTuple]
- projectSettings(identifier: String! @requireProjectAccess(access: VIEW)): ProjectSettings!
- repoSettings(id: String! @requireProjectAccess(access: VIEW)): RepoSettings!
- projectEvents(
- identifier: String!
- limit: Int = 0
- before: Time
- @requireProjectAccess(access: VIEW)
- ): ProjectEvents!
- repoEvents(
- id: String!
- limit: Int = 0
- before: Time
- @requireProjectAccess(access: VIEW)
- ): ProjectEvents!
- hasVersion(id: String!): Boolean!
-}
-
-type Mutation {
- addFavoriteProject(identifier: String!): Project!
- removeFavoriteProject(identifier: String!): Project!
- createProject(project: CreateProjectInput!): Project! @requireSuperUser
- copyProject(project: CopyProjectInput!): Project! @requireSuperUser
- attachProjectToNewRepo(project: MoveProjectInput!): Project!
- saveProjectSettingsForSection(projectSettings: ProjectSettingsInput, section: ProjectSettingsSection!): ProjectSettings!
- saveRepoSettingsForSection(repoSettings: RepoSettingsInput, section: ProjectSettingsSection!): RepoSettings!
- defaultSectionToRepo(projectId: String! @requireProjectAccess(access: EDIT), section: ProjectSettingsSection!): String
- attachProjectToRepo(projectId: String! @requireProjectAccess(access: EDIT)): Project!
- detachProjectFromRepo(projectId: String! @requireProjectAccess(access: EDIT)): Project!
- forceRepotrackerRun(projectId: String! @requireProjectAccess(access: EDIT)): Boolean!
- deactivateStepbackTasks(projectId: String! @requireProjectAccess(access: EDIT)): Boolean!
- schedulePatch(patchId: String!, configure: PatchConfigure!): Patch!
- schedulePatchTasks(patchId: String!): String
- unschedulePatchTasks(patchId: String!, abort: Boolean!): String
- restartVersions(versionId: String!, abort: Boolean!, versionsToRestart: [VersionToRestart!]!): [Version!]
- scheduleUndispatchedBaseTasks(patchId: String!): [Task!]
- enqueuePatch(patchId: String!, commitMessage: String): Patch!
- setPatchPriority(patchId: String!, priority: Int!): String
- scheduleTasks(taskIds: [String!]!): [Task!]!
- unscheduleTask(taskId: String!): Task!
- abortTask(taskId: String!): Task!
- setTaskPriority(taskId: String!, priority: Int!): Task!
- restartTask(taskId: String!): Task!
- saveSubscription(subscription: SubscriptionInput!): Boolean!
- editAnnotationNote(
- taskId: String!
- execution: Int!
- originalMessage: String!
- newMessage: String!
- ): Boolean!
- moveAnnotationIssue(
- taskId: String!
- execution: Int!
- apiIssue: IssueLinkInput!
- isIssue: Boolean!
- ): Boolean!
- addAnnotationIssue(
- taskId: String!
- execution: Int!
- apiIssue: IssueLinkInput!
- isIssue: Boolean!
- ): Boolean!
- removeAnnotationIssue(
- taskId: String!
- execution: Int!
- apiIssue: IssueLinkInput!
- isIssue: Boolean!
- ): Boolean!
- removeItemFromCommitQueue(commitQueueId: String!, issue: String!): String
- updateUserSettings(userSettings: UserSettingsInput): Boolean!
- restartJasper(hostIds: [String!]!): Int!
- reprovisionToNew(hostIds: [String!]!): Int!
- updateHostStatus(
- hostIds: [String!]!
- status: String!
- notes: String = ""
- ): Int!
- createPublicKey(publicKeyInput: PublicKeyInput!): [PublicKey!]!
- spawnHost(spawnHostInput: SpawnHostInput): Host!
- spawnVolume(spawnVolumeInput: SpawnVolumeInput!): Boolean!
- updateVolume(updateVolumeInput: UpdateVolumeInput!): Boolean!
- updateSpawnHostStatus(hostId: String!, action: SpawnHostStatusActions!): Host!
- removePublicKey(keyName: String!): [PublicKey!]!
- updatePublicKey(
- targetKeyName: String!
- updateInfo: PublicKeyInput!
- ): [PublicKey!]!
- attachVolumeToHost(volumeAndHost: VolumeHost!): Boolean!
- detachVolumeFromHost(volumeId: String!): Boolean!
- removeVolume(volumeId: String!): Boolean!
- editSpawnHost(spawnHost: EditSpawnHostInput): Host!
- bbCreateTicket(taskId: String!, execution: Int): Boolean!
- clearMySubscriptions: Int!
- overrideTaskDependencies(taskId: String!): Task!
-}
-
-input VersionToRestart {
- versionId: String!
- taskIds: [String!]!
-}
-
-input TestFilter {
- testName: String!
- testStatus: String!
-}
-
-# This will represent failing test results on the task history pages.
-type TaskTestResultSample {
- taskId: String!
- execution: Int!
- totalTestCount: Int!
- matchingFailedTestNames: [String!]!
-}
-
-# Array of activated and unactivated versions
-# nextPageOrderNumber represents the last order number returned and is used for pagination
-# prevPageOrderNumber represents the order number of the previous page and is also used for pagination
-type MainlineCommits {
- nextPageOrderNumber: Int
- prevPageOrderNumber: Int
- versions: [MainlineCommitVersion!]!
-}
-
-type MainlineCommitVersion {
- version: Version
- rolledUpVersions: [Version!]
-}
-
-type Version {
- id: String!
- createTime: Time!
- startTime: Time
- finishTime: Time
- message: String!
- revision: String!
- author: String!
- status: String!
- order: Int!
- repo: String!
- project: String!
- projectIdentifier: String!
- projectMetadata: Project
- branch: String!
- requester: String!
- activated: Boolean
- taskStatusCounts(options: BuildVariantOptions): [StatusCount!] @deprecated(reason: "Use taskStatusStats instead")
- taskStatusStats(options: BuildVariantOptions): TaskStats
- buildVariants(options: BuildVariantOptions): [GroupedBuildVariant]
- buildVariantStats(options: BuildVariantOptions): [GroupedTaskStatusCount!]
- isPatch: Boolean!
- patch: Patch
- childVersions: [Version]
- taskCount: Int
- baseVersion: Version
- previousVersion: Version
- versionTiming: VersionTiming
- parameters: [Parameter!]!
- taskStatuses: [String!]!
- baseTaskStatuses: [String!]!
- manifest: Manifest
- upstreamProject: UpstreamProject
-}
-
-type UpstreamProject {
- owner: String!
- repo: String!
- revision: String!
- project: String!
- triggerID: String! # This is the ID of the trigger that created the upstream version (corresponds to a task ID or build ID)
- resourceID: String! # This is the ID of the UI linkable resource that triggered the upstream version (corresponds to a task ID or version ID)
- task: Task
- version: Version
- triggerType: String!
-}
-
-type Manifest {
- id: String!
- revision: String!
- project: String!
- branch: String!
- isBase: Boolean!
- moduleOverrides: StringMap
- modules: Map
-}
-
-type VersionTiming {
- makespan: Duration
- timeTaken: Duration
-}
-
-type TaskStats {
- counts: [StatusCount!]
- eta: Time
-}
-
-type StatusCount {
- status: String!
- count: Int!
-}
-
-# Returns task counts grouped by status for a build variant
-type GroupedTaskStatusCount {
- variant: String!
- displayName: String!
- statusCounts: [StatusCount!]!
-}
-
-input BuildVariantOptions {
- variants: [String!]
- tasks: [String!]
- statuses: [String!]
- includeBaseTasks: Boolean
-}
-input MainlineCommitsOptions {
- projectID: String!
- limit: Int = 7
- skipOrderNumber: Int = 0
- # shouldCollapse is used to determine if unmatching active versions should be collapsed
- shouldCollapse: Boolean = false
- requesters: [String!]
-}
-
-type BuildVariantTuple {
- buildVariant: String!
- displayName: String!
-}
-
-enum ProjectSettingsAccess {
- EDIT
- VIEW
-}
-
-enum SpawnHostStatusActions {
- START
- STOP
- TERMINATE
-}
-enum TaskSortCategory {
- NAME
- STATUS
- BASE_STATUS
- VARIANT
- DURATION
-}
-
-enum TestSortCategory {
- BASE_STATUS
- STATUS
- START_TIME
- DURATION
- TEST_NAME
-}
-
-enum SortDirection {
- ASC
- DESC
-}
-
-enum MetStatus {
- UNMET
- MET
- PENDING
- STARTED
-}
-
-enum RequiredStatus {
- MUST_FAIL
- MUST_FINISH
- MUST_SUCCEED
-}
-
-enum HostSortBy {
- ID
- DISTRO
- CURRENT_TASK
- STATUS
- ELAPSED
- UPTIME
- IDLE_TIME
- OWNER
-}
-
-enum TaskQueueItemType {
- COMMIT
- PATCH
-}
-
-enum ProjectSettingsSection {
- GENERAL
- ACCESS
- VARIABLES
- GITHUB_AND_COMMIT_QUEUE
- NOTIFICATIONS
- PATCH_ALIASES
- WORKSTATION
- TRIGGERS
- PERIODIC_BUILDS
- PLUGINS
-}
-
-input VolumeHost {
- volumeId: String!
- hostId: String!
-}
-input PatchConfigure {
- description: String!
- variantsTasks: [VariantTasks!]!
- parameters: [ParameterInput]
- patchTriggerAliases: [String!]
-}
-input VariantTasks {
- variant: String!
- tasks: [String!]!
- displayTasks: [DisplayTask!]!
-}
-input DisplayTask {
- Name: String!
- ExecTasks: [String!]!
-}
-
-input SubscriptionInput {
- id: String
- resource_type: String
- trigger: String
- selectors: [SelectorInput!]!
- regex_selectors: [SelectorInput!]!
- subscriber: SubscriberInput!
- owner_type: String
- owner: String
- trigger_data: StringMap!
-}
-
-input UserSettingsInput {
- timezone: String
- region: String
- githubUser: GithubUserInput
- slackUsername: String
- notifications: NotificationsInput
- useSpruceOptions: UseSpruceOptionsInput
-}
-input SelectorInput {
- type: String!
- data: String!
-}
-
-input SubscriberInput {
- type: String!
- target: String!
-}
-
-input UseSpruceOptionsInput {
- hasUsedSpruceBefore: Boolean
- hasUsedMainlineCommitsBefore: Boolean
- spruceV1: Boolean
-}
-
-input PatchesInput {
- limit: Int! = 0
- page: Int! = 0
- patchName: String! = ""
- statuses: [String!]! = []
- includeCommitQueue: Boolean = false
- onlyCommitQueue: Boolean = false
-}
-
-input CreateProjectInput {
- identifier: String!
- owner: String!
- repo: String!
- repoRefId: String
- id: String
-}
-
-input CopyProjectInput {
- projectIdToCopy: String!
- newProjectIdentifier: String!
- newProjectId: String
-}
-
-input MoveProjectInput {
- projectId: String! @requireProjectAccess(access: EDIT)
- newOwner: String!
- newRepo: String!
-}
-
-input ProjectSettingsInput {
- githubWebhooksEnabled: Boolean
- projectRef: ProjectInput
- vars: ProjectVarsInput
- aliases: [ProjectAliasInput!]
- subscriptions: [SubscriptionInput!]
-}
-
-input ProjectInput {
- id: String! @requireProjectAccess(access: EDIT)
- identifier: String
- displayName: String
- enabled: Boolean
- private: Boolean
- restricted: Boolean
- owner: String
- repo: String
- branch: String
- remotePath: String
- patchingDisabled: Boolean
- repotrackerDisabled: Boolean
- dispatchingDisabled: Boolean
- versionControlEnabled: Boolean
- prTestingEnabled: Boolean
- manualPrTestingEnabled: Boolean
- githubChecksEnabled: Boolean
- batchTime: Int
- deactivatePrevious: Boolean
- defaultLogger: String
- notifyOnBuildFailure: Boolean
- triggers: [TriggerAliasInput!]
- patchTriggerAliases: [PatchTriggerAliasInput!]
- githubTriggerAliases: [String]
- periodicBuilds: [PeriodicBuildInput!]
- cedarTestResultsEnabled: Boolean
- commitQueue: CommitQueueParamsInput
- admins: [String!]
- spawnHostScriptPath: String
- tracksPushEvents: Boolean
- taskSync: TaskSyncOptionsInput
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean
- workstationConfig: WorkstationConfigInput
- perfEnabled: Boolean
- buildBaronSettings: BuildBaronSettingsInput
- taskAnnotationSettings: TaskAnnotationSettingsInput
-}
-
-
-input RepoSettingsInput {
- githubWebhooksEnabled: Boolean
- projectRef: RepoRefInput ## use the repo ref here in order to have stronger types
- vars: ProjectVarsInput
- aliases: [ProjectAliasInput!]
- subscriptions: [SubscriptionInput!]
-}
-
-input RepoRefInput {
- id: String! @requireProjectAccess(access: EDIT)
- displayName: String
- enabled: Boolean
- private: Boolean
- restricted: Boolean
- owner: String
- repo: String
- branch: String
- remotePath: String
- patchingDisabled: Boolean
- repotrackerDisabled: Boolean
- dispatchingDisabled: Boolean
- versionControlEnabled: Boolean
- prTestingEnabled: Boolean
- manualPrTestingEnabled: Boolean
- githubChecksEnabled: Boolean
- batchTime: Int
- deactivatePrevious: Boolean
- defaultLogger: String
- notifyOnBuildFailure: Boolean
- triggers: [TriggerAliasInput!]
- patchTriggerAliases: [PatchTriggerAliasInput!]
- githubTriggerAliases: [String!]
- periodicBuilds: [PeriodicBuildInput!]
- cedarTestResultsEnabled: Boolean
- commitQueue: CommitQueueParamsInput
- admins: [String!]
- spawnHostScriptPath: String
- tracksPushEvents: Boolean
- taskSync: TaskSyncOptionsInput
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean
- workstationConfig: WorkstationConfigInput
- perfEnabled: Boolean
- buildBaronSettings: BuildBaronSettingsInput
- taskAnnotationSettings: TaskAnnotationSettingsInput
-}
-
-input TriggerAliasInput {
- project: String!
- level: String!
- buildVariantRegex: String!
- taskRegex: String!
- status: String!
- dateCutoff: Int!
- configFile: String!
- alias: String!
-}
-
-input PeriodicBuildInput {
- id: String!
- configFile: String!
- intervalHours: Int!
- alias: String!
- message: String!
- nextRunTime: Time!
-}
-
-input CommitQueueParamsInput {
- enabled: Boolean
- requireSigned: Boolean
- mergeMethod: String
- message: String
-}
-
-input TaskSyncOptionsInput {
- configEnabled: Boolean
- patchEnabled: Boolean
-}
-
-input BuildBaronSettingsInput {
- ticketCreateProject: String!
- ticketSearchProjects: [String!]
- bfSuggestionServer: String
- bfSuggestionUsername: String
- bfSuggestionPassword: String
- bfSuggestionTimeoutSecs: Int
- bfSuggestionFeaturesURL: String
-}
-
-input TaskAnnotationSettingsInput {
- jiraCustomFields: [JiraFieldInput!]
- fileTicketWebhook: WebhookInput
-}
-
-input JiraFieldInput {
- field: String!
- displayText: String!
-}
-
-input WebhookInput {
- endpoint: String!
- secret: String!
-}
-
-input WorkstationConfigInput {
- setupCommands: [WorkstationSetupCommandInput!]
- gitClone: Boolean
-}
-
-input WorkstationSetupCommandInput {
- command: String!
- directory: String
-}
-
-input PatchTriggerAliasInput {
- alias: String!
- childProjectIdentifier: String!
- taskSpecifiers: [TaskSpecifierInput!]!
- status: String
- parentAsModule: String
-}
-
-input TaskSpecifierInput {
- patchAlias: String!
- taskRegex: String!
- variantRegex: String!
-}
-
-input ProjectVarsInput {
- vars: StringMap
- privateVarsList: [String]
- adminOnlyVarsList: [String]
-}
-
-input VariantTaskInput {
- name: String!
- tasks: [String!]!
-}
-
-input ProjectAliasInput {
- id: String!
- alias: String!
- gitTag: String!
- variant: String!
- task: String!
- remotePath: String!
- variantTags: [String!]!
- taskTags: [String!]!
-}
-
-input SpawnHostInput {
- distroId: String!
- region: String!
- savePublicKey: Boolean!
- publicKey: PublicKeyInput!
- userDataScript: String
- expiration: Time
- noExpiration: Boolean!
- setUpScript: String
- isVirtualWorkStation: Boolean!
- homeVolumeSize: Int
- volumeId: String
- taskId: String
- useProjectSetupScript: Boolean
- useTaskConfig: Boolean
- spawnHostsStartedByTask: Boolean
- taskSync: Boolean
-}
-
-input EditSpawnHostInput {
- hostId: String!
- displayName: String
- expiration: Time
- noExpiration: Boolean
- instanceType: String
- addedInstanceTags: [InstanceTagInput!]
- deletedInstanceTags: [InstanceTagInput!]
- volume: String
- servicePassword: String
- publicKey: PublicKeyInput
- savePublicKey: Boolean
-}
-
-input SpawnVolumeInput {
- availabilityZone: String!
- size: Int!
- type: String!
- expiration: Time
- noExpiration: Boolean
- host: String
-}
-
-input UpdateVolumeInput {
- expiration: Time
- noExpiration: Boolean
- name: String
- volumeId: String!
-}
-
-input IssueLinkInput {
- url: String!
- issueKey: String!
- confidenceScore: Float
-}
-
-input SortOrder {
- Key: TaskSortCategory!
- Direction: SortDirection!
-}
-
-type TaskQueueItem {
- id: ID!
- displayName: String!
- project: String!
- buildVariant: String!
- expectedDuration: Duration!
- priority: Int!
- revision: String!
- requester: TaskQueueItemType!
- version: String!
-}
-
-type TaskQueueDistro {
- id: ID!
- taskCount: Int!
- hostCount: Int!
-}
-
-type Host {
- homeVolume: Volume
- id: ID!
- hostUrl: String!
- tag: String!
- distroId: String
- status: String!
- runningTask: TaskInfo
- totalIdleTime: Duration
- uptime: Time # host creation time
- elapsed: Time # running task start time
- startedBy: String!
- provider: String!
- lastCommunicationTime: Time
- noExpiration: Boolean!
- instanceType: String
- homeVolumeID: String
- volumes: [Volume!]!
- user: String
- distro: DistroInfo
- availabilityZone: String
- instanceTags: [InstanceTag!]!
- expiration: Time
- displayName: String
-}
-
-type InstanceTag {
- key: String!
- value: String!
- canBeModified: Boolean!
-}
-
-input InstanceTagInput {
- key: String!
- value: String!
-}
-type DistroInfo {
- id: String
- workDir: String
- isVirtualWorkStation: Boolean
- user: String
- isWindows: Boolean
- bootstrapMethod: String
-}
-
-type Distro {
- name: String
- userSpawnAllowed: Boolean
- workDir: String
- user: String
- isVirtualWorkStation: Boolean!
-}
-
-type TaskInfo {
- id: ID
- name: String
-}
-
-type HostsResponse {
- filteredHostsCount: Int
- totalHostsCount: Int!
- hosts: [Host!]!
-}
-
-type PatchTasks {
- tasks: [Task!]!
- count: Int!
-}
-
-type GroupedBuildVariant {
- variant: String!
- displayName: String!
- tasks: [Task]
-}
-
-type TaskFiles {
- fileCount: Int!
- groupedFiles: [GroupedFiles!]!
-}
-
-type GroupedFiles {
- taskName: String
- files: [File!]
-}
-
-type ModuleCodeChange {
- branchName: String!
- htmlLink: String!
- rawLink: String!
- fileDiffs: [FileDiff!]!
-}
-
-type FileDiff {
- fileName: String!
- additions: Int!
- deletions: Int!
- diffLink: String!
- description: String!
-}
-
-type ChildPatchAlias {
- alias: String!
- patchId: String!
-}
-
-type PatchTriggerAlias {
- alias: String!
- childProjectId: String!
- childProjectIdentifier: String!
- taskSpecifiers: [TaskSpecifier!]
- status: String
- parentAsModule: String
- variantsTasks: [VariantTask!]!
-}
-
-type UserPatches {
- patches: [Patch!]!
- filteredPatchCount: Int!
-}
-
-type Patches {
- patches: [Patch!]!
- filteredPatchCount: Int!
-}
-
-type Patch {
- createTime: Time
- id: ID!
- description: String!
- projectID: String!
- projectIdentifier: String!
- githash: String!
- patchNumber: Int!
- author: String!
- authorDisplayName: String!
- versionFull: Version
- status: String!
- variants: [String!]!
- tasks: [String!]!
- childPatches: [Patch!]
- childPatchAliases: [ChildPatchAlias!]
- variantsTasks: [VariantTask]!
- activated: Boolean!
- alias: String
- duration: PatchDuration
- time: PatchTime
- taskCount: Int
- baseVersionID: String @deprecated(reason: "Use versionFull.baseVersion.id instead")
- parameters: [Parameter!]!
- moduleCodeChanges: [ModuleCodeChange!]!
- project: PatchProject
- builds: [Build!]!
- commitQueuePosition: Int
- taskStatuses: [String!]!
- baseTaskStatuses: [String!]!
- canEnqueueToCommitQueue: Boolean!
- patchTriggerAliases: [PatchTriggerAlias!]!
-}
-
-type Build {
- id: String!
- buildVariant: String!
- status: String!
- predictedMakespan: Duration!
- actualMakespan: Duration!
-}
-
-type Volume {
- id: String!
- displayName: String!
- createdBy: String!
- type: String!
- availabilityZone: String!
- size: Int!
- expiration: Time
- deviceName: String
- hostID: String!
- noExpiration: Boolean!
- homeVolume: Boolean!
- host: Host
- creationTime: Time
-}
-
-type PatchProject {
- variants: [ProjectBuildVariant!]!
-}
-type ProjectBuildVariant {
- name: String!
- displayName: String!
- tasks: [String!]!
-}
-
-type Parameter {
- key: String!
- value: String!
-}
-
-input ParameterInput {
- key: String!
- value: String!
-}
-
-type TaskResult {
- id: ID!
- execution: Int!
- aborted: Boolean!
- displayName: String!
- version: String!
- status: String!
- baseStatus: String
- baseTask: BaseTaskResult
- buildVariant: String!
- buildVariantDisplayName: String!
- blocked: Boolean!
- executionTasksFull: [Task!]
-}
-
-type BaseTaskResult {
- id: ID!
- status: String!
-}
-
-type PatchDuration {
- makespan: String
- timeTaken: String
- time: PatchTime
-}
-
-type PatchTime {
- started: String
- finished: String
- submittedAt: String!
-}
-
-type VariantTask {
- name: String!
- tasks: [String!]!
-}
-
-type TaskLogLinks {
- allLogLink: String
- agentLogLink: String
- systemLogLink: String
- taskLogLink: String
- eventLogLink: String
-}
-
-type TaskEndDetail {
- status: String!
- type: String!
- description: String
- timedOut: Boolean
- timeoutType: String
- oomTracker: OomTrackerInfo!
-}
-
-type OomTrackerInfo {
- detected: Boolean!
- pids: [Int]
-}
-
-type TaskTestResult {
- totalTestCount: Int!
- filteredTestCount: Int!
- testResults: [TestResult!]!
-}
-
-type TestResult {
- id: String!
- groupID: String
- status: String!
- baseStatus: String
- testFile: String!
- logs: TestLog!
- exitCode: Int
- startTime: Time
- duration: Float
- endTime: Time
- taskId: String
- execution: Int
-}
-
-type TestLog {
- url: String
- urlRaw: String
- urlLobster: String
- lineNum: Int
-}
-
-type Dependency {
- name: String!
- metStatus: MetStatus!
- requiredStatus: RequiredStatus!
- buildVariant: String!
- taskId: String!
-}
-
-
-type AbortInfo {
- user: String!
- taskID: String!
- taskDisplayName: String!
- buildVariantDisplayName: String!
- newVersion: String!
- prClosed: Boolean!
-}
-
-type Task {
- aborted: Boolean!
- abortInfo: AbortInfo
- activated: Boolean!
- activatedBy: String
- activatedTime: Time
- ami: String
- annotation: Annotation
- baseTask: Task
- baseStatus: String
- blocked: Boolean!
- buildId: String!
- buildVariant: String!
- buildVariantDisplayName: String
- canAbort: Boolean!
- canModifyAnnotation: Boolean!
- canRestart: Boolean!
- canSchedule: Boolean!
- canSetPriority: Boolean!
- canSync: Boolean!
- canUnschedule: Boolean!
- createTime: Time
- details: TaskEndDetail
- dispatchTime: Time
- displayName: String!
- displayOnly: Boolean
- displayTask: Task
- distroId: String!
- estimatedStart: Duration
- execution: Int!
- executionTasks: [String!]
- executionTasksFull: [Task!]
- expectedDuration: Duration
- failedTestCount: Int!
- finishTime: Time
- generatedBy: String
- generatedByName: String
- generateTask: Boolean
- hostId: String
- id: String!
- ingestTime: Time
- isPerfPluginEnabled: Boolean!
- latestExecution: Int!
- logs: TaskLogLinks!
- minQueuePosition: Int!
- patch: Patch
- patchNumber: Int
- priority: Int
- project: Project
- projectId: String!
- projectIdentifier: String
- dependsOn: [Dependency!]
- canOverrideDependencies: Boolean!
- requester: String!
- revision: String
- scheduledTime: Time
- containerAllocatedTime: Time
- spawnHostLink: String
- startTime: Time
- status: String!
- taskGroup: String
- taskGroupMaxHosts: Int
- timeTaken: Duration
- totalTestCount: Int!
- versionMetadata: Version!
- order: Int!
-}
-
-type BaseTaskInfo {
- id: String
- status: String
-}
-
-type GroupedProjects {
- groupDisplayName: String!
- name: String! @deprecated(reason: "name is deprecated. Use groupDisplayName instead.")
- repo: RepoRef
- projects: [Project!]!
-}
-
-type Permissions {
- userId: String!
- canCreateProject: Boolean!
-}
-
-type GithubProjectConflicts {
- commitQueueIdentifiers: [String!]
- prTestingIdentifiers: [String!]
- commitCheckIdentifiers: [String!]
-}
-
-type ProjectSettings {
- githubWebhooksEnabled: Boolean!
- projectRef: Project
- vars: ProjectVars
- aliases: [ProjectAlias!]
- subscriptions: [ProjectSubscription!]
-}
-
-type ProjectEventSettings{
- githubWebhooksEnabled: Boolean!
- projectRef: Project
- vars: ProjectVars
- aliases: [ProjectAlias!]
- subscriptions: [ProjectSubscription!]
-}
-
-type RepoSettings {
- githubWebhooksEnabled: Boolean!
- projectRef: RepoRef ## use the repo ref here in order to have stronger types
- vars: ProjectVars
- aliases: [ProjectAlias!]
- subscriptions: [ProjectSubscription!]
-}
-
-## ProjectEvents is used for any event that has the PROJECT type.
-## Although RepoSettings uses RepoRef in practice to have stronger types, this can't be enforced
-## for event logs because new fields could always be introduced that don't exist in the old event logs.
-type ProjectEvents {
- eventLogEntries: [ProjectEventLogEntry!]!
- count: Int!
-}
-
-type ProjectEventLogEntry {
- timestamp: Time!
- user: String!
- before: ProjectEventSettings
- after: ProjectEventSettings
-}
-
-type ProjectVars {
- vars: StringMap
- privateVars: [String]
- adminOnlyVars: [String]
-}
-
-type ProjectAlias {
- id: String!
- alias: String!
- gitTag: String!
- variant: String!
- task: String!
- remotePath: String!
- variantTags: [String!]!
- taskTags: [String!]!
-}
-
-type ProjectSubscription {
- id: String!
- resourceType: String!
- trigger: String!
- selectors: [Selector!]!
- regexSelectors: [Selector!]!
- subscriber: ProjectSubscriber
- ownerType: String!
- triggerData: StringMap
- }
-
-type Selector {
- type: String!
- data: String!
-}
-
-type ProjectSubscriber {
- type: String!
- subscriber: Subscriber!
-
-}
-
-type Subscriber {
- githubPRSubscriber: GithubPRSubscriber
- githubCheckSubscriber: GithubCheckSubscriber
- webhookSubscriber: WebhookSubscriber
- jiraIssueSubscriber: JiraIssueSubscriber
- jiraCommentSubscriber: String
- emailSubscriber: String
- slackSubscriber: String
-}
-
-type GithubPRSubscriber {
- owner: String!
- repo: String!
- ref: String!
- prNumber: Int
-}
-
-type GithubCheckSubscriber {
- owner: String!
- repo: String!
- ref: String!
-}
-
-type JiraIssueSubscriber {
- project: String!
- issueType: String!
-}
-
-type WebhookSubscriber {
- url: String!
- secret: String!
- headers: [WebhookHeader]!
-}
-
-type WebhookHeader {
- key: String!
- value: String!
-}
-
-type Project {
- id: String!
- identifier: String!
- displayName: String!
- enabled: Boolean
- private: Boolean
- restricted: Boolean
- owner: String!
- repo: String!
- branch: String!
- remotePath: String!
- patchingDisabled: Boolean
- repotrackerDisabled: Boolean
- dispatchingDisabled: Boolean
- versionControlEnabled: Boolean
- prTestingEnabled: Boolean
- manualPrTestingEnabled: Boolean
- githubChecksEnabled: Boolean
- batchTime: Int!
- deactivatePrevious: Boolean
- defaultLogger: String!
- notifyOnBuildFailure: Boolean
- triggers: [TriggerAlias!]
- patchTriggerAliases: [PatchTriggerAlias!]
- githubTriggerAliases: [String!]
- periodicBuilds: [PeriodicBuild!]
- cedarTestResultsEnabled: Boolean
- commitQueue: CommitQueueParams!
- admins: [String]
- spawnHostScriptPath: String!
- tracksPushEvents: Boolean
- taskSync: TaskSyncOptions!
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean
- workstationConfig: WorkstationConfig!
- perfEnabled: Boolean
- buildBaronSettings: BuildBaronSettings!
- taskAnnotationSettings: TaskAnnotationSettings!
-
- hidden: Boolean
- repoRefId: String!
-
- isFavorite: Boolean!
- validDefaultLoggers: [String!]!
- patches(patchesInput: PatchesInput!): Patches!
-}
-
-## repo types have booleans defaulted, and so these are required.
-
-type RepoRef {
- id: String!
-
- displayName: String!
- enabled: Boolean!
- private: Boolean!
- restricted: Boolean!
- owner: String!
- repo: String!
- branch: String!
- remotePath: String!
- patchingDisabled: Boolean!
- repotrackerDisabled: Boolean!
- dispatchingDisabled: Boolean!
- versionControlEnabled: Boolean!
- prTestingEnabled: Boolean!
- manualPrTestingEnabled: Boolean!
- githubChecksEnabled: Boolean!
- batchTime: Int!
- deactivatePrevious: Boolean!
- defaultLogger: String!
- notifyOnBuildFailure: Boolean!
- triggers: [TriggerAlias!]!
- patchTriggerAliases: [PatchTriggerAlias!]
- githubTriggerAliases: [String!]
- periodicBuilds: [PeriodicBuild!]
- cedarTestResultsEnabled: Boolean!
- commitQueue: RepoCommitQueueParams!
- admins: [String!]!
- spawnHostScriptPath: String!
- tracksPushEvents: Boolean!
- taskSync: RepoTaskSyncOptions!
- gitTagAuthorizedUsers: [String!]
- gitTagAuthorizedTeams: [String!]
- gitTagVersionsEnabled: Boolean!
-
- filesIgnoredFromCache: [String!]
- disabledStatsCache: Boolean!
- workstationConfig: RepoWorkstationConfig!
- perfEnabled: Boolean!
- buildBaronSettings: BuildBaronSettings!
- taskAnnotationSettings: TaskAnnotationSettings!
-
- validDefaultLoggers: [String!]!
-}
-
-type TriggerAlias {
- project: String!
- level: String!
- buildVariantRegex: String!
- taskRegex: String!
- status: String!
- dateCutoff: Int!
- configFile: String!
- alias: String!
-}
-
-
-type PeriodicBuild {
- id: String!
- configFile: String!
- intervalHours: Int!
- alias: String!
- message: String!
- nextRunTime: Time!
-}
-
-type CommitQueueParams {
- enabled: Boolean
- requireSigned: Boolean
- mergeMethod: String!
- message: String!
-}
-
-type RepoCommitQueueParams {
- enabled: Boolean!
- requireSigned: Boolean!
- mergeMethod: String!
- message: String!
-}
-
-type TaskSyncOptions {
- configEnabled: Boolean
- patchEnabled: Boolean
-}
-
-type RepoTaskSyncOptions {
- configEnabled: Boolean!
- patchEnabled: Boolean!
-}
-
-type WorkstationConfig {
- setupCommands: [WorkstationSetupCommand!]
- gitClone: Boolean
-}
-
-type BuildBaronSettings {
- ticketCreateProject: String!
- ticketSearchProjects: [String!]
- bfSuggestionServer: String
- bfSuggestionUsername: String
- bfSuggestionPassword: String
- bfSuggestionTimeoutSecs: Int
- bfSuggestionFeaturesURL: String
-}
-
-type TaskAnnotationSettings {
- jiraCustomFields: [JiraField!]
- fileTicketWebhook: Webhook!
-}
-
-type JiraField {
- field: String!
- displayText: String!
-}
-
-type Webhook {
- endpoint: String!
- secret: String!
-}
-
-type RepoWorkstationConfig {
- setupCommands: [WorkstationSetupCommand!]
- gitClone: Boolean!
-}
-
-type WorkstationSetupCommand {
- command: String!
- directory: String!
-}
-
-type TaskSpecifier {
- patchAlias: String!
- taskRegex: String!
- variantRegex: String!
-}
-
-type File {
- name: String!
- link: String!
- visibility: String!
-}
-
-type User {
- displayName: String!
- userId: String!
- emailAddress: String!
- patches(patchesInput: PatchesInput!): Patches!
- permissions: Permissions!
-}
-
-type TaskLogs {
- taskId: String!
- execution: Int!
- defaultLogger: String!
- eventLogs: [TaskEventLogEntry!]!
- taskLogs: [LogMessage!]!
- systemLogs: [LogMessage!]!
- agentLogs: [LogMessage!]!
- allLogs: [LogMessage!]!
-}
-
-type TaskEventLogData {
- hostId: String
- jiraIssue: String
- jiraLink: String
- priority: Int
- status: String
- timestamp: Time
- userId: String
-}
-
-type TaskEventLogEntry {
- id: String!
- resourceType: String!
- processedAt: Time!
- timestamp: Time
- eventType: String
- data: TaskEventLogData!
- resourceId: String!
-}
-
-type LogMessage {
- type: String
- severity: String
- message: String
- timestamp: Time
- version: Int
-}
-
-type CommitQueue {
- projectId: String
- message: String
- owner: String
- repo: String
- queue: [CommitQueueItem!]
-}
-
-type CommitQueueItem {
- issue: String
- version: String
- enqueueTime: Time
- patch: Patch
- source: String
- modules: [Module!]
-}
-
-type Module {
- module: String
- issue: String
-}
-
-type UserSettings {
- timezone: String
- region: String
- githubUser: GithubUser
- slackUsername: String
- notifications: Notifications
- useSpruceOptions: UseSpruceOptions
-}
-
-type UseSpruceOptions {
- hasUsedSpruceBefore: Boolean
- hasUsedMainlineCommitsBefore: Boolean
- spruceV1: Boolean
-}
-
-input GithubUserInput {
- lastKnownAs: String
-}
-type GithubUser {
- uid: Int
- lastKnownAs: String
-}
-input NotificationsInput {
- buildBreak: String
- patchFinish: String
- patchFirstFailure: String
- spawnHostExpiration: String
- spawnHostOutcome: String
- commitQueue: String
-}
-type Notifications {
- buildBreak: String
- patchFinish: String
- patchFirstFailure: String
- spawnHostExpiration: String
- spawnHostOutcome: String
- commitQueue: String
-}
-type UserConfig {
- user: String!
- api_key: String!
- api_server_host: String!
- ui_server_host: String!
-}
-
-input PublicKeyInput {
- name: String!
- key: String!
-}
-
-type PublicKey {
- name: String!
- key: String!
-}
-
-type ClientConfig {
- clientBinaries: [ClientBinary!]
- latestRevision: String
-}
-
-type ClientBinary {
- arch: String
- os: String
- url: String
- displayName: String
-}
-
-type SpruceConfig {
- ui: UIConfig
- jira: JiraConfig
- banner: String
- bannerTheme: String
- githubOrgs: [String!]!
- providers: CloudProviderConfig
- spawnHost: SpawnHostConfig!
-}
-
-type JiraConfig {
- host: String
-}
-
-type UIConfig {
- userVoice: String
- defaultProject: String!
-}
-
-type CloudProviderConfig {
- aws: AWSConfig
-}
-
-type AWSConfig {
- maxVolumeSizePerUser: Int
-}
-
-type SpawnHostConfig {
- unexpirableHostsPerUser: Int!
- unexpirableVolumesPerUser: Int!
- spawnHostsPerUser: Int!
-}
-
-type HostEvents {
- eventLogEntries: [HostEventLogEntry!]!
- count: Int!
-}
-
-type HostEventLogEntry {
- id: String!
- resourceType: String!
- processedAt: Time!
- timestamp: Time
- eventType: String
- data: HostEventLogData!
- resourceId: String!
-}
-
-type HostEventLogData {
- agentRevision: String!
- agentBuild: String!
- jasperRevision: String!
- oldStatus: String!
- newStatus: String!
- logs: String!
- hostname: String!
- provisioningMethod: String!
- taskId: String!
- taskPid: String!
- taskStatus: String!
- execution: String!
- monitorOp: String!
- user: String!
- successful: Boolean!
- duration: Duration!
-}
-
-type BuildBaron {
- searchReturnInfo: SearchReturnInfo
- buildBaronConfigured: Boolean!
- bbTicketCreationDefined: Boolean!
-}
-
-# build baron plugin
-type SearchReturnInfo {
- issues: [JiraTicket!]!
- search: String!
- source: String!
- featuresURL: String!
-}
-type JiraTicket {
- key: String!
- fields: TicketFields!
-}
-
-type TicketFields {
- summary: String!
- assigneeDisplayName: String
- resolutionName: String
- created: String!
- updated: String!
- status: JiraStatus!
- assignedTeam: String
-}
-
-type JiraStatus {
- id: String!
- name: String!
-}
-
-type Annotation {
- id: String!
- taskId: String!
- taskExecution: Int!
- note: Note
- issues: [IssueLink]
- suspectedIssues: [IssueLink]
- createdIssues: [IssueLink]
- webhookConfigured: Boolean!
-}
-
-type Note {
- message: String!
- source: Source!
-}
-
-type IssueLink {
- issueKey: String
- url: String
- source: Source
- jiraTicket: JiraTicket
- confidenceScore: Float
-}
-
-type Source {
- author: String!
- time: Time!
- requester: String!
-}
-
-scalar Time
-scalar Duration
-scalar StringMap
-scalar Map
diff --git a/graphql/schema/directives.graphql b/graphql/schema/directives.graphql
new file mode 100644
index 00000000000..7033ae220ab
--- /dev/null
+++ b/graphql/schema/directives.graphql
@@ -0,0 +1,14 @@
+"""
+canCreateProject is used to restrict certain actions to admins.
+"""
+directive @canCreateProject on ARGUMENT_DEFINITION
+
+"""
+requireProjectAccess is used to restrict view and edit access for project settings.
+"""
+directive @requireProjectAccess(access: ProjectSettingsAccess!) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION
+
+"""
+requireProjectFieldAccess is used to restrict view access for certain project fields.
+"""
+directive @requireProjectFieldAccess on FIELD_DEFINITION
diff --git a/graphql/schema/mutation.graphql b/graphql/schema/mutation.graphql
new file mode 100644
index 00000000000..7aa71239c2f
--- /dev/null
+++ b/graphql/schema/mutation.graphql
@@ -0,0 +1,102 @@
+# This file lists all of the mutations. The mutation definitions can be found in the corresponding files in the resolvers folder.
+type Mutation {
+ # annotations
+ bbCreateTicket(taskId: String!, execution: Int): Boolean!
+ addAnnotationIssue(
+ taskId: String!
+ execution: Int!
+ apiIssue: IssueLinkInput!
+ isIssue: Boolean!
+ ): Boolean!
+ editAnnotationNote(
+ taskId: String!
+ execution: Int!
+ originalMessage: String!
+ newMessage: String!
+ ): Boolean!
+ moveAnnotationIssue(
+ taskId: String!
+ execution: Int!
+ apiIssue: IssueLinkInput!
+ isIssue: Boolean!
+ ): Boolean!
+ removeAnnotationIssue(
+ taskId: String!
+ execution: Int!
+ apiIssue: IssueLinkInput!
+ isIssue: Boolean!
+ ): Boolean!
+ setAnnotationMetadataLinks(
+ taskId: String!
+ execution: Int!
+ metadataLinks: [MetadataLinkInput!]!
+ ): Boolean!
+
+ # hosts
+ reprovisionToNew(hostIds: [String!]!): Int!
+ restartJasper(hostIds: [String!]!): Int!
+ updateHostStatus(
+ hostIds: [String!]!
+ status: String!
+ notes: String = ""
+ ): Int!
+
+ # patch
+ enqueuePatch(patchId: String!, commitMessage: String): Patch!
+ schedulePatch(patchId: String!, configure: PatchConfigure!): Patch!
+ schedulePatchTasks(patchId: String!): String
+ scheduleUndispatchedBaseTasks(patchId: String!): [Task!]
+ setPatchPriority(patchId: String!, priority: Int!): String
+ unschedulePatchTasks(patchId: String!, abort: Boolean!): String
+
+ # project
+ addFavoriteProject(identifier: String!): Project!
+ attachProjectToNewRepo(project: MoveProjectInput!): Project!
+ attachProjectToRepo(projectId: String! @requireProjectAccess(access: EDIT)): Project!
+ createProject(project: CreateProjectInput! @canCreateProject, requestS3Creds: Boolean): Project!
+ copyProject(project: CopyProjectInput! @canCreateProject, requestS3Creds: Boolean): Project!
+ defaultSectionToRepo(projectId: String! @requireProjectAccess(access: EDIT), section: ProjectSettingsSection!): String
+ detachProjectFromRepo(projectId: String! @requireProjectAccess(access: EDIT)): Project!
+ forceRepotrackerRun(projectId: String! @requireProjectAccess(access: EDIT)): Boolean!
+ promoteVarsToRepo(projectId: String! @requireProjectAccess(access: EDIT), varNames: [String!]!): Boolean!
+ removeFavoriteProject(identifier: String!): Project!
+ saveProjectSettingsForSection(projectSettings: ProjectSettingsInput, section: ProjectSettingsSection!): ProjectSettings!
+ saveRepoSettingsForSection(repoSettings: RepoSettingsInput, section: ProjectSettingsSection!): RepoSettings!
+ deactivateStepbackTask(projectId: String!, buildVariantName: String!, taskName: String! @requireProjectAccess(access: EDIT)): Boolean!
+
+ # spawn
+ attachVolumeToHost(volumeAndHost: VolumeHost!): Boolean!
+ detachVolumeFromHost(volumeId: String!): Boolean!
+ editSpawnHost(spawnHost: EditSpawnHostInput): Host!
+ migrateVolume(volumeId: String!, spawnHostInput: SpawnHostInput): Boolean!
+ spawnHost(spawnHostInput: SpawnHostInput): Host!
+ spawnVolume(spawnVolumeInput: SpawnVolumeInput!): Boolean!
+ removeVolume(volumeId: String!): Boolean!
+ updateSpawnHostStatus(hostId: String!, action: SpawnHostStatusActions!): Host!
+ updateVolume(updateVolumeInput: UpdateVolumeInput!): Boolean!
+
+ # task
+ abortTask(taskId: String!): Task!
+ overrideTaskDependencies(taskId: String!): Task!
+ restartTask(taskId: String!, failedOnly: Boolean!): Task!
+ scheduleTasks(taskIds: [String!]!): [Task!]!
+ setTaskPriority(taskId: String!, priority: Int!): Task!
+ unscheduleTask(taskId: String!): Task!
+
+ # user
+ clearMySubscriptions: Int!
+ createPublicKey(publicKeyInput: PublicKeyInput!): [PublicKey!]!
+ removePublicKey(keyName: String!): [PublicKey!]!
+ saveSubscription(subscription: SubscriptionInput!): Boolean!
+ updatePublicKey(
+ targetKeyName: String!
+ updateInfo: PublicKeyInput!
+ ): [PublicKey!]!
+ updateUserSettings(userSettings: UserSettingsInput): Boolean!
+
+ # commit queue
+ removeItemFromCommitQueue(commitQueueId: String!, issue: String!): String
+
+ # version
+ restartVersions(versionId: String!, abort: Boolean!, versionsToRestart: [VersionToRestart!]!): [Version!]
+}
diff --git a/graphql/schema/query.graphql b/graphql/schema/query.graphql
new file mode 100644
index 00000000000..70d56c45e88
--- /dev/null
+++ b/graphql/schema/query.graphql
@@ -0,0 +1,106 @@
+# This file lists all of the queries. The query definitions can be found in the corresponding files in the resolvers folder.
+type Query {
+ # annotations
+ bbGetCreatedTickets(taskId: String!): [JiraTicket!]!
+ buildBaron(taskId: String!, execution: Int!): BuildBaron!
+
+ # config
+ awsRegions: [String!]
+ clientConfig: ClientConfig
+ instanceTypes: [String!]!
+ spruceConfig: SpruceConfig
+ subnetAvailabilityZones: [String!]!
+
+ # hosts
+ distros(onlySpawnable: Boolean!): [Distro]!
+ distroTaskQueue(distroId: String!): [TaskQueueItem!]!
+ host(hostId: String!): Host
+ hostEvents(
+ hostId: String!
+ hostTag: String = ""
+ limit: Int = 0
+ page: Int = 0
+ ): HostEvents!
+ hosts(
+ hostId: String = ""
+ distroId: String = ""
+ currentTaskId: String = ""
+ statuses: [String!] = []
+ startedBy: String = ""
+ sortBy: HostSortBy = STATUS
+ sortDir: SortDirection = ASC
+ page: Int = 0
+ limit: Int = 10
+ ): HostsResponse!
+ taskQueueDistros: [TaskQueueDistro!]!
+
+ # containers
+ pod(podId: String!): Pod!
+
+ # patch
+ patch(id: String!): Patch!
+
+ # project
+ githubProjectConflicts(projectId: String!): GithubProjectConflicts!
+ project(projectIdentifier: String!): Project!
+ projects: [GroupedProjects]!
+ projectEvents(
+ identifier: String!
+ limit: Int = 0
+ before: Time
+ @requireProjectAccess(access: VIEW)
+ ): ProjectEvents!
+ projectSettings(identifier: String! @requireProjectAccess(access: VIEW)): ProjectSettings!
+ repoEvents(
+ id: String!
+ limit: Int = 0
+ before: Time
+ @requireProjectAccess(access: VIEW)
+ ): ProjectEvents!
+ repoSettings(id: String! @requireProjectAccess(access: VIEW)): RepoSettings!
+ viewableProjectRefs: [GroupedProjects]!
+
+ # spawn
+ myHosts: [Host!]!
+ myVolumes: [Volume!]!
+
+ # logkeeper
+ logkeeperBuildMetadata(buildId: String!): LogkeeperBuild!
+
+ # task
+ task(taskId: String!, execution: Int): Task
+ taskAllExecutions(taskId: String!): [Task!]!
+ taskTests(
+ taskId: String!
+ execution: Int
+ sortCategory: TestSortCategory = TEST_NAME
+ sortDirection: SortDirection = ASC
+ page: Int = 0
+ limit: Int = 0
+ testName: String = ""
+ statuses: [String!]! = []
+ groupId: String = ""
+ ): TaskTestResult!
+ taskTestSample(
+ tasks: [String!]!
+ filters: [TestFilter!]!
+ ): [TaskTestResultSample!]
+
+ # user
+ myPublicKeys: [PublicKey!]!
+ user(userId: String): User!
+ userConfig: UserConfig
+ userSettings: UserSettings
+
+ # commit queue
+ commitQueue(projectIdentifier: String!): CommitQueue!
+
+ # mainline commits
+ buildVariantsForTaskName(projectIdentifier: String!, taskName: String!): [BuildVariantTuple]
+ mainlineCommits(options: MainlineCommitsOptions!, buildVariantOptions: BuildVariantOptions): MainlineCommits
+ taskNamesForBuildVariant(projectIdentifier: String!, buildVariant: String!): [String!]
+
+ # version
+ hasVersion(id: String!): Boolean!
+ version(id: String!): Version!
+}
diff --git a/graphql/schema/scalars.graphql b/graphql/schema/scalars.graphql
new file mode 100644
index 00000000000..0ac73b8c29d
--- /dev/null
+++ b/graphql/schema/scalars.graphql
@@ -0,0 +1,5 @@
+# Define scalars used in other files.
+scalar Time
+scalar Duration
+scalar StringMap
+scalar Map
\ No newline at end of file
diff --git a/graphql/schema/types/annotation.graphql b/graphql/schema/types/annotation.graphql
new file mode 100644
index 00000000000..594654242a6
--- /dev/null
+++ b/graphql/schema/types/annotation.graphql
@@ -0,0 +1,51 @@
+###### TYPES ######
+"""
+Annotation models the metadata that a user can add to a task.
+It is used as a field within the Task type.
+"""
+type Annotation {
+ id: String!
+ createdIssues: [IssueLink]
+ issues: [IssueLink]
+ note: Note
+ suspectedIssues: [IssueLink]
+ metadataLinks: [MetadataLink]
+ taskId: String!
+ taskExecution: Int!
+ webhookConfigured: Boolean!
+}
+
+type Note {
+ message: String!
+ source: Source!
+}
+
+type Source {
+ author: String!
+ requester: String!
+ time: Time!
+}
+
+"""
+Build Baron is a service that can be integrated into a project (see Confluence Wiki for more details).
+This type is returned from the buildBaron query, and contains information about Build Baron configurations and suggested
+tickets from JIRA for a given task on a given execution.
+"""
+type BuildBaron {
+ bbTicketCreationDefined: Boolean!
+ buildBaronConfigured: Boolean!
+ searchReturnInfo: SearchReturnInfo # contains array of suggested tickets from JIRA
+}
+
+type SearchReturnInfo {
+ featuresURL: String!
+ issues: [JiraTicket!]!
+ search: String!
+ source: String!
+}
+
+type JiraTicket {
+ fields: TicketFields!
+ key: String!
+}
+
diff --git a/graphql/schema/types/commit_queue.graphql b/graphql/schema/types/commit_queue.graphql
new file mode 100644
index 00000000000..3fefc8393fc
--- /dev/null
+++ b/graphql/schema/types/commit_queue.graphql
@@ -0,0 +1,26 @@
+###### TYPES ######
+"""
+CommitQueue is returned by the commitQueue query.
+It contains information about the patches on the commit queue (e.g. author, code changes) for a given project.
+"""
+type CommitQueue {
+ message: String
+ owner: String
+ projectId: String
+ queue: [CommitQueueItem!]
+ repo: String
+}
+
+type CommitQueueItem {
+ enqueueTime: Time
+ issue: String
+ modules: [Module!]
+ patch: Patch
+ source: String
+ version: String
+}
+
+type Module {
+ issue: String
+ module: String
+}
diff --git a/graphql/schema/types/config.graphql b/graphql/schema/types/config.graphql
new file mode 100644
index 00000000000..5dfe1b21bba
--- /dev/null
+++ b/graphql/schema/types/config.graphql
@@ -0,0 +1,68 @@
+###### TYPES ######
+"""
+SpruceConfig defines settings that apply to all users of Evergreen.
+For example, if the banner field is populated, then a sitewide banner will be shown to all users.
+"""
+type SpruceConfig {
+ banner: String
+ bannerTheme: String
+ githubOrgs: [String!]!
+ jira: JiraConfig
+ providers: CloudProviderConfig
+ spawnHost: SpawnHostConfig!
+ ui: UIConfig
+ slack: SlackConfig
+}
+
+type UIConfig {
+ defaultProject: String!
+ userVoice: String
+}
+
+type SlackConfig {
+ name: String
+}
+
+type JiraConfig {
+ host: String
+}
+
+type CloudProviderConfig {
+ aws: AWSConfig
+}
+
+type AWSConfig {
+ maxVolumeSizePerUser: Int
+ pod: AWSPodConfig
+}
+
+type AWSPodConfig {
+ ecs: ECSConfig
+}
+
+type ECSConfig {
+ maxCPU: Int!
+ maxMemoryMb: Int!
+}
+
+type SpawnHostConfig {
+ spawnHostsPerUser: Int!
+ unexpirableHostsPerUser: Int!
+ unexpirableVolumesPerUser: Int!
+}
+
+"""
+ClientConfig stores information about the binaries for the Evergreen Command-Line Client that are available for
+download on Evergreen.
+"""
+type ClientConfig {
+ clientBinaries: [ClientBinary!]
+ latestRevision: String
+}
+
+type ClientBinary {
+ arch: String
+ displayName: String
+ os: String
+ url: String
+}
diff --git a/graphql/schema/types/host.graphql b/graphql/schema/types/host.graphql
new file mode 100644
index 00000000000..981b964e376
--- /dev/null
+++ b/graphql/schema/types/host.graphql
@@ -0,0 +1,122 @@
+enum HostSortBy {
+ ID
+ CURRENT_TASK
+ DISTRO
+ ELAPSED
+ IDLE_TIME
+ OWNER
+ STATUS
+ UPTIME
+}
+
+enum SortDirection {
+ ASC
+ DESC
+}
+
+enum TaskQueueItemType {
+ COMMIT
+ PATCH
+}
+
+###### TYPES ######
+"""
+Host models a host, which are used for things like running tasks or as virtual workstations.
+"""
+type Host {
+ id: ID!
+ availabilityZone: String
+ ami: String
+ displayName: String
+ distro: DistroInfo
+ distroId: String
+ elapsed: Time # running task start time
+ expiration: Time
+ hostUrl: String!
+ homeVolume: Volume
+ homeVolumeID: String
+ instanceType: String
+ instanceTags: [InstanceTag!]!
+ lastCommunicationTime: Time
+ noExpiration: Boolean!
+ provider: String!
+ runningTask: TaskInfo
+ startedBy: String!
+ status: String!
+ tag: String!
+ totalIdleTime: Duration
+ uptime: Time # host creation time
+ user: String
+ volumes: [Volume!]!
+}
+
+type TaskInfo {
+ id: ID
+ name: String
+}
+
+type DistroInfo {
+ id: String
+ bootstrapMethod: String
+ isVirtualWorkStation: Boolean
+ isWindows: Boolean
+ user: String
+ workDir: String
+}
+
+type InstanceTag {
+ canBeModified: Boolean!
+ key: String!
+ value: String!
+}
+
+"""
+HostsResponse is the return value for the hosts query.
+It contains an array of Hosts matching the filter conditions, as well as some count information.
+"""
+type HostsResponse {
+ filteredHostsCount: Int
+ hosts: [Host!]!
+ totalHostsCount: Int!
+}
+
+"""
+HostEvents is the return value for the hostEvents query.
+It contains the event log entries for a given host.
+"""
+type HostEvents {
+ count: Int!
+ eventLogEntries: [HostEventLogEntry!]!
+}
+
+type HostEventLogEntry {
+ id: String!
+ data: HostEventLogData!
+ eventType: String
+ processedAt: Time!
+ resourceId: String!
+ resourceType: String!
+ timestamp: Time
+}
+
+type HostEventLogData {
+ agentBuild: String!
+ agentRevision: String!
+ duration: Duration!
+ execution: String!
+ hostname: String!
+ jasperRevision: String!
+ logs: String!
+ monitorOp: String!
+ newStatus: String!
+ oldStatus: String!
+ provisioningMethod: String!
+ successful: Boolean!
+ taskId: String!
+ taskPid: String!
+ taskStatus: String!
+ user: String!
+}
+
+
+
diff --git a/graphql/schema/types/issue_link.graphql b/graphql/schema/types/issue_link.graphql
new file mode 100644
index 00000000000..e66cb769f2d
--- /dev/null
+++ b/graphql/schema/types/issue_link.graphql
@@ -0,0 +1,29 @@
+###### INPUTS ######
+"""
+IssueLinkInput is an input parameter to the annotation mutations.
+"""
+input IssueLinkInput {
+ confidenceScore: Float
+ issueKey: String!
+ url: String!
+}
+
+input MetadataLinkInput {
+ text: String!
+ url: String!
+}
+
+###### TYPES ######
+type IssueLink {
+ confidenceScore: Float
+ issueKey: String
+ jiraTicket: JiraTicket
+ source: Source
+ url: String
+}
+
+type MetadataLink {
+ url: String!
+ text: String!
+ source: Source
+}
diff --git a/graphql/schema/types/logkeeper.graphql b/graphql/schema/types/logkeeper.graphql
new file mode 100644
index 00000000000..ac594f5166f
--- /dev/null
+++ b/graphql/schema/types/logkeeper.graphql
@@ -0,0 +1,19 @@
+type LogkeeperTest {
+ id: String!
+ name: String!
+ buildId: String!
+ taskId: String!
+ taskExecution: Int!
+ phase: String!
+ command: String!
+}
+
+type LogkeeperBuild {
+ id: String!
+ builder: String!
+ buildNum: Int!
+ taskId: String!
+ taskExecution: Int!
+ tests: [LogkeeperTest!]!
+ task: Task!
+}
diff --git a/graphql/schema/types/mainline_commits.graphql b/graphql/schema/types/mainline_commits.graphql
new file mode 100644
index 00000000000..0721e41fb07
--- /dev/null
+++ b/graphql/schema/types/mainline_commits.graphql
@@ -0,0 +1,44 @@
+###### INPUTS ######
+"""
+BuildVariantOptions is an input to the mainlineCommits query.
+It stores values for statuses, tasks, and variants which are used to filter for matching versions.
+"""
+input BuildVariantOptions {
+ includeBaseTasks: Boolean
+ statuses: [String!]
+ tasks: [String!]
+ variants: [String!]
+}
+
+"""
+MainlineCommitsOptions is an input to the mainlineCommits query.
+Its fields determine what mainline commits we fetch for a given projectID.
+"""
+input MainlineCommitsOptions {
+ limit: Int = 7
+ projectIdentifier: String!
+ requesters: [String!]
+ shouldCollapse: Boolean = false # used to determine if unmatching active versions should be collapsed
+ skipOrderNumber: Int
+}
+
+###### TYPES ######
+"""
+MainlineCommits is returned by the mainline commits query.
+It contains information about versions (both unactivated and activated) which is surfaced on the Project Health page.
+"""
+type MainlineCommits {
+ nextPageOrderNumber: Int # represents the last order number returned and is used for pagination
+ prevPageOrderNumber: Int # represents the order number of the previous page and is also used for pagination
+ versions: [MainlineCommitVersion!]! # array of unactivated and activated versions
+}
+
+type MainlineCommitVersion {
+ rolledUpVersions: [Version!]
+ version: Version
+}
+
+type BuildVariantTuple {
+ buildVariant: String!
+ displayName: String!
+}
diff --git a/graphql/schema/types/patch.graphql b/graphql/schema/types/patch.graphql
new file mode 100644
index 00000000000..9d83a8c0552
--- /dev/null
+++ b/graphql/schema/types/patch.graphql
@@ -0,0 +1,174 @@
+enum TaskSortCategory {
+ NAME
+ STATUS
+ BASE_STATUS
+ VARIANT
+ DURATION
+}
+
+###### INPUTS ######
+"""
+PatchesInput is the input value to the patches field for the User and Project types.
+Based on the information in PatchesInput, we return a list of Patches for either an individual user or a project.
+"""
+input PatchesInput {
+ includeCommitQueue: Boolean
+ limit: Int! = 0
+ onlyCommitQueue: Boolean
+ page: Int! = 0
+ patchName: String! = ""
+ statuses: [String!]! = []
+}
+
+"""
+PatchConfigure is the input to the schedulePatch mutation.
+It contains information about how a user has configured their patch (e.g. name, tasks to run, etc).
+"""
+input PatchConfigure {
+ description: String!
+ parameters: [ParameterInput]
+ patchTriggerAliases: [String!]
+ variantsTasks: [VariantTasks!]!
+}
+
+input VariantTasks {
+ displayTasks: [DisplayTask!]!
+ tasks: [String!]!
+ variant: String!
+}
+
+input DisplayTask {
+ ExecTasks: [String!]!
+ Name: String!
+}
+
+input ParameterInput {
+ key: String!
+ value: String!
+}
+
+###### TYPES ######
+"""
+Patch is a manually initiated version submitted to test local code changes.
+"""
+type Patch {
+ id: ID!
+ activated: Boolean!
+ alias: String
+ author: String!
+ authorDisplayName: String!
+ baseTaskStatuses: [String!]!
+ builds: [Build!]!
+ canEnqueueToCommitQueue: Boolean!
+ childPatchAliases: [ChildPatchAlias!]
+ childPatches: [Patch!]
+ commitQueuePosition: Int
+ createTime: Time
+ description: String!
+ duration: PatchDuration
+ githash: String!
+ moduleCodeChanges: [ModuleCodeChange!]!
+ parameters: [Parameter!]!
+ patchNumber: Int!
+ patchTriggerAliases: [PatchTriggerAlias!]!
+ project: PatchProject
+ projectID: String!
+ projectIdentifier: String!
+ projectMetadata: Project
+ status: String!
+ taskCount: Int
+ tasks: [String!]!
+ taskStatuses: [String!]!
+ time: PatchTime
+ variants: [String!]!
+ variantsTasks: [VariantTask]!
+ versionFull: Version
+}
+
+type ChildPatchAlias {
+ alias: String!
+ patchId: String!
+}
+
+# This is also used by the Project type
+type PatchTriggerAlias {
+ alias: String!
+ childProjectId: String!
+ childProjectIdentifier: String!
+ parentAsModule: String
+ status: String
+ taskSpecifiers: [TaskSpecifier!]
+ variantsTasks: [VariantTask!]!
+}
+
+# This is also used by the Project type
+type VariantTask {
+ name: String!
+ tasks: [String!]!
+}
+
+# This is also used by the Project type
+type TaskSpecifier {
+ patchAlias: String!
+ taskRegex: String!
+ variantRegex: String!
+}
+
+type PatchProject {
+ variants: [ProjectBuildVariant!]!
+}
+
+type ProjectBuildVariant {
+ displayName: String!
+ name: String!
+ tasks: [String!]!
+}
+
+type ModuleCodeChange {
+ branchName: String!
+ fileDiffs: [FileDiff!]!
+ htmlLink: String!
+ rawLink: String!
+}
+
+type FileDiff {
+ additions: Int!
+ deletions: Int!
+ description: String!
+ diffLink: String!
+ fileName: String!
+}
+
+type Parameter {
+ key: String!
+ value: String!
+}
+
+type PatchDuration {
+ makespan: String
+ time: PatchTime
+ timeTaken: String
+}
+
+type PatchTime {
+ finished: String
+ started: String
+ submittedAt: String!
+}
+
+type Build {
+ id: String!
+ actualMakespan: Duration!
+ buildVariant: String!
+ predictedMakespan: Duration!
+ status: String!
+}
+
+"""
+Patches is the return value of the patches field for the User and Project types.
+It contains an array Patches for either an individual user or a project.
+"""
+type Patches {
+ filteredPatchCount: Int!
+ patches: [Patch!]!
+}
diff --git a/graphql/schema/types/permissions.graphql b/graphql/schema/types/permissions.graphql
new file mode 100644
index 00000000000..15e881b5827
--- /dev/null
+++ b/graphql/schema/types/permissions.graphql
@@ -0,0 +1,5 @@
+###### TYPES ######
+type Permissions {
+ canCreateProject: Boolean!
+ userId: String!
+}
diff --git a/graphql/schema/types/pod.graphql b/graphql/schema/types/pod.graphql
new file mode 100644
index 00000000000..99b4acd4607
--- /dev/null
+++ b/graphql/schema/types/pod.graphql
@@ -0,0 +1,46 @@
+type Pod {
+ events(limit: Int = 0, page: Int = 0): PodEvents!
+ id: String!
+ status: String!
+ task: Task
+ taskContainerCreationOpts: TaskContainerCreationOpts!
+ type: String!
+}
+
+type TaskContainerCreationOpts {
+ image: String!
+ memoryMB: Int!
+ cpu: Int!
+ os: String!
+ arch: String!
+ workingDir: String!
+}
+
+"""
+PodEvents is the return value for the events query.
+It contains the event log entries for a pod.
+"""
+type PodEvents {
+ count: Int!
+ eventLogEntries: [PodEventLogEntry!]!
+}
+
+type PodEventLogEntry {
+ id: String!
+ data: PodEventLogData!
+ eventType: String
+ processedAt: Time!
+ resourceId: String!
+ resourceType: String!
+ timestamp: Time
+}
+
+type PodEventLogData {
+ oldStatus: String
+ newStatus: String
+ reason: String
+ taskID: String
+ taskExecution: Int
+ taskStatus: String
+ task: Task
+}
diff --git a/graphql/schema/types/project.graphql b/graphql/schema/types/project.graphql
new file mode 100644
index 00000000000..e9720e0e7e3
--- /dev/null
+++ b/graphql/schema/types/project.graphql
@@ -0,0 +1,244 @@
+###### INPUTS ######
+"""
+CreateProjectInput is the input to the createProject mutation.
+It contains information about a new project to be created.
+"""
+input CreateProjectInput {
+ id: String
+ identifier: String!
+ owner: String!
+ repo: String!
+ repoRefId: String
+}
+
+"""
+CopyProjectInput is the input to the copyProject mutation.
+It contains information about a project to be duplicated.
+"""
+input CopyProjectInput {
+ newProjectId: String
+ newProjectIdentifier: String!
+ projectIdToCopy: String!
+}
+
+"""
+MoveProjectInput is the input to the attachProjectToNewRepo mutation.
+It contains information used to move a project to a a new owner and repo.
+"""
+input MoveProjectInput {
+ newOwner: String!
+ newRepo: String!
+ projectId: String! @requireProjectAccess(access: EDIT)
+}
+
+input ProjectAliasInput {
+ id: String!
+ alias: String!
+ gitTag: String!
+ remotePath: String!
+ task: String!
+ taskTags: [String!]!
+ variant: String!
+ variantTags: [String!]!
+}
+
+input TaskSyncOptionsInput {
+ configEnabled: Boolean
+ patchEnabled: Boolean
+}
+
+input PeriodicBuildInput {
+ id: String!
+ alias: String!
+ configFile: String!
+ intervalHours: Int!
+ message: String!
+ nextRunTime: Time!
+}
+
+input ExternalLinkInput {
+ displayName: String!
+ urlTemplate: String!
+}
+
+enum BannerTheme {
+ ANNOUNCEMENT
+ INFORMATION
+ WARNING
+ IMPORTANT
+}
+
+input ProjectBannerInput {
+ text: String!
+ theme: BannerTheme!
+}
+
+input TaskAnnotationSettingsInput {
+ fileTicketWebhook: WebhookInput
+ jiraCustomFields: [JiraFieldInput!]
+}
+
+input JiraFieldInput {
+ displayText: String!
+ field: String!
+}
+
+input WebhookInput {
+ endpoint: String!
+ secret: String!
+}
+
+input BuildBaronSettingsInput {
+ bfSuggestionFeaturesURL: String
+ bfSuggestionPassword: String
+ bfSuggestionServer: String
+ bfSuggestionTimeoutSecs: Int
+ bfSuggestionUsername: String
+ ticketCreateProject: String!
+ ticketSearchProjects: [String!]
+}
+
+input TriggerAliasInput {
+ alias: String!
+ buildVariantRegex: String!
+ configFile: String!
+ dateCutoff: Int
+ level: String!
+ project: String!
+ status: String!
+ taskRegex: String!
+}
+
+input ContainerResourcesInput {
+ name: String!
+ cpu: Int!
+ memoryMb: Int!
+}
+
+input PatchTriggerAliasInput {
+ alias: String!
+ childProjectIdentifier: String!
+ parentAsModule: String
+ status: String
+ taskSpecifiers: [TaskSpecifierInput!]!
+}
+
+input TaskSpecifierInput {
+ patchAlias: String!
+ taskRegex: String!
+ variantRegex: String!
+}
+
+input CommitQueueParamsInput {
+ enabled: Boolean
+ mergeMethod: String
+ message: String
+}
+
+input WorkstationConfigInput {
+ gitClone: Boolean
+ setupCommands: [WorkstationSetupCommandInput!]
+}
+
+input WorkstationSetupCommandInput {
+ command: String!
+ directory: String
+}
+
+###### TYPES ######
+"""
+GroupedProjects is the return value for the projects & viewableProjectRefs queries.
+It contains an array of projects which are grouped under a groupDisplayName.
+"""
+type GroupedProjects {
+ groupDisplayName: String!
+ projects: [Project!]!
+ repo: RepoRef
+}
+
+"""
+GithubProjectConflicts is the return value for the githubProjectConflicts query.
+Its contains information about potential conflicts in the commit checks, the commit queue, and PR testing.
+"""
+type GithubProjectConflicts {
+ commitCheckIdentifiers: [String!]
+ commitQueueIdentifiers: [String!]
+ prTestingIdentifiers: [String!]
+}
+
+"""
+Project models single repository on GitHub.
+"""
+type Project {
+ id: String!
+ admins: [String] @requireProjectFieldAccess
+ batchTime: Int! @requireProjectFieldAccess
+ branch: String!
+ buildBaronSettings: BuildBaronSettings! @requireProjectFieldAccess
+ commitQueue: CommitQueueParams! @requireProjectFieldAccess
+ containerSizeDefinitions: [ContainerResources!] @requireProjectFieldAccess
+ deactivatePrevious: Boolean @requireProjectFieldAccess
+ disabledStatsCache: Boolean @requireProjectFieldAccess
+ dispatchingDisabled: Boolean @requireProjectFieldAccess
+ displayName: String!
+ enabled: Boolean
+ githubChecksEnabled: Boolean @requireProjectFieldAccess
+ githubTriggerAliases: [String!] @requireProjectFieldAccess
+ gitTagAuthorizedTeams: [String!] @requireProjectFieldAccess
+ gitTagAuthorizedUsers: [String!] @requireProjectFieldAccess
+ gitTagVersionsEnabled: Boolean @requireProjectFieldAccess
+ hidden: Boolean
+ identifier: String!
+ isFavorite: Boolean!
+ manualPrTestingEnabled: Boolean @requireProjectFieldAccess
+ notifyOnBuildFailure: Boolean @requireProjectFieldAccess
+ owner: String!
+ patches(patchesInput: PatchesInput!): Patches! # project patches
+ patchingDisabled: Boolean @requireProjectFieldAccess
+ patchTriggerAliases: [PatchTriggerAlias!] @requireProjectFieldAccess
+ perfEnabled: Boolean @requireProjectFieldAccess
+ periodicBuilds: [PeriodicBuild!] @requireProjectFieldAccess
+ private: Boolean
+ prTestingEnabled: Boolean @requireProjectFieldAccess
+ remotePath: String! @requireProjectFieldAccess
+ repo: String!
+ repoRefId: String!
+ repotrackerDisabled: Boolean @requireProjectFieldAccess
+ restricted: Boolean
+ spawnHostScriptPath: String!
+ stepbackDisabled: Boolean @requireProjectFieldAccess
+ taskAnnotationSettings: TaskAnnotationSettings! @requireProjectFieldAccess
+ taskSync: TaskSyncOptions! @requireProjectFieldAccess
+ tracksPushEvents: Boolean @requireProjectFieldAccess
+ triggers: [TriggerAlias!] @requireProjectFieldAccess
+ versionControlEnabled: Boolean @requireProjectFieldAccess
+ workstationConfig: WorkstationConfig! @requireProjectFieldAccess
+ externalLinks: [ExternalLink!]
+ banner: ProjectBanner
+}
+
+type CommitQueueParams {
+ enabled: Boolean
+ mergeMethod: String!
+ message: String!
+}
+
+type TaskSyncOptions {
+ configEnabled: Boolean
+ patchEnabled: Boolean
+}
+
+type WorkstationConfig {
+ gitClone: Boolean
+ setupCommands: [WorkstationSetupCommand!]
+}
+
+type ExternalLink {
+ displayName: String!
+ urlTemplate: String!
+}
+
+type ProjectBanner {
+ text: String!
+ theme: BannerTheme!
+}
diff --git a/graphql/schema/types/project_settings.graphql b/graphql/schema/types/project_settings.graphql
new file mode 100644
index 00000000000..5a7e66cead4
--- /dev/null
+++ b/graphql/schema/types/project_settings.graphql
@@ -0,0 +1,200 @@
+enum ProjectSettingsAccess {
+ EDIT
+ VIEW
+}
+
+enum ProjectSettingsSection {
+ GENERAL
+ ACCESS
+ VARIABLES
+ GITHUB_AND_COMMIT_QUEUE
+ NOTIFICATIONS
+ PATCH_ALIASES
+ WORKSTATION
+ TRIGGERS
+ PERIODIC_BUILDS
+ PLUGINS
+ CONTAINERS
+}
+
+###### INPUTS ######
+"""
+ProjectSettingsInput is the input to the saveProjectSettingsForSection mutation.
+It contains information about project settings (e.g. Build Baron configurations, subscriptions, etc) and is used to
+update the settings for a given project.
+"""
+input ProjectSettingsInput {
+ aliases: [ProjectAliasInput!]
+ githubWebhooksEnabled: Boolean
+ projectRef: ProjectInput
+ subscriptions: [SubscriptionInput!]
+ vars: ProjectVarsInput
+}
+
+input ProjectInput {
+ id: String! @requireProjectAccess(access: EDIT)
+ admins: [String!]
+ batchTime: Int
+ branch: String
+ buildBaronSettings: BuildBaronSettingsInput
+ commitQueue: CommitQueueParamsInput
+ deactivatePrevious: Boolean
+ disabledStatsCache: Boolean
+ dispatchingDisabled: Boolean
+ displayName: String
+ enabled: Boolean
+ githubChecksEnabled: Boolean
+ githubTriggerAliases: [String]
+ gitTagAuthorizedTeams: [String!]
+ gitTagAuthorizedUsers: [String!]
+ gitTagVersionsEnabled: Boolean
+ identifier: String
+ manualPrTestingEnabled: Boolean
+ notifyOnBuildFailure: Boolean
+ owner: String
+ patchingDisabled: Boolean
+ patchTriggerAliases: [PatchTriggerAliasInput!]
+ perfEnabled: Boolean
+ periodicBuilds: [PeriodicBuildInput!]
+ private: Boolean
+ prTestingEnabled: Boolean
+ remotePath: String
+ repo: String
+ repotrackerDisabled: Boolean
+ restricted: Boolean
+ spawnHostScriptPath: String
+ stepbackDisabled: Boolean
+ taskAnnotationSettings: TaskAnnotationSettingsInput
+ taskSync: TaskSyncOptionsInput
+ tracksPushEvents: Boolean
+ triggers: [TriggerAliasInput!]
+ versionControlEnabled: Boolean
+ workstationConfig: WorkstationConfigInput
+ containerSizeDefinitions: [ContainerResourcesInput!]
+ externalLinks: [ExternalLinkInput!]
+ banner: ProjectBannerInput
+}
+
+###### TYPES ######
+"""
+ProjectSettings models the settings for a given Project.
+"""
+type ProjectSettings {
+ aliases: [ProjectAlias!]
+ githubWebhooksEnabled: Boolean!
+ projectRef: Project
+ projectSubscriptions: [ProjectSubscription!] @deprecated(reason: "Use subscriptions instead")
+ subscriptions: [ProjectSubscription!]
+ vars: ProjectVars
+}
+
+# shared by Project and RepoRef
+type ProjectSubscription {
+ id: String!
+ ownerType: String!
+ regexSelectors: [Selector!]!
+ resourceType: String!
+ selectors: [Selector!]!
+ subscriber: SubscriberWrapper
+ trigger: String!
+ triggerData: StringMap
+}
+
+type Selector {
+ data: String!
+ type: String!
+}
+
+# shared by Project and RepoRef
+type TriggerAlias {
+ alias: String!
+ buildVariantRegex: String!
+ configFile: String!
+ dateCutoff: Int
+ level: String!
+ project: String!
+ status: String!
+ taskRegex: String!
+}
+
+# shared by Project and RepoRef
+type ContainerResources {
+ name: String!
+ cpu: Int!
+ memoryMb: Int!
+}
+
+# shared by Project and RepoRef
+type PeriodicBuild {
+ id: String!
+ alias: String!
+ configFile: String!
+ intervalHours: Int!
+ message: String!
+ nextRunTime: Time!
+}
+
+# shared by Project and RepoRef
+type BuildBaronSettings {
+ bfSuggestionFeaturesURL: String
+ bfSuggestionPassword: String
+ bfSuggestionServer: String
+ bfSuggestionTimeoutSecs: Int
+ bfSuggestionUsername: String
+ ticketCreateProject: String!
+ ticketSearchProjects: [String!]
+}
+
+# shared by Project and RepoRef
+type TaskAnnotationSettings {
+ fileTicketWebhook: Webhook!
+ jiraCustomFields: [JiraField!]
+}
+
+type JiraField {
+ displayText: String!
+ field: String!
+}
+
+type Webhook {
+ endpoint: String!
+ secret: String!
+}
+
+"""
+ProjectEvents contains project event log entries that concern the history of changes related to project
+settings.
+Although RepoSettings uses RepoRef in practice to have stronger types, this can't be enforced
+or event logs because new fields could always be introduced that don't exist in the old event logs.
+"""
+type ProjectEvents {
+ count: Int!
+ eventLogEntries: [ProjectEventLogEntry!]!
+}
+
+type ProjectEventLogEntry {
+ after: ProjectEventSettings
+ before: ProjectEventSettings
+ timestamp: Time!
+ user: String!
+}
+
+type ProjectEventSettings {
+ aliases: [ProjectAlias!]
+ githubWebhooksEnabled: Boolean!
+ projectRef: Project
+ projectSubscriptions: [ProjectSubscription!] @deprecated(reason: "Use subscriptions instead")
+ subscriptions: [ProjectSubscription!]
+ vars: ProjectVars
+}
+
+type ProjectAlias {
+ id: String!
+ alias: String!
+ gitTag: String!
+ remotePath: String!
+ task: String!
+ taskTags: [String!]!
+ variant: String!
+ variantTags: [String!]!
+}
diff --git a/graphql/schema/types/project_subscriber.graphql b/graphql/schema/types/project_subscriber.graphql
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/graphql/schema/types/project_vars.graphql b/graphql/schema/types/project_vars.graphql
new file mode 100644
index 00000000000..88ade52f2d9
--- /dev/null
+++ b/graphql/schema/types/project_vars.graphql
@@ -0,0 +1,13 @@
+###### INPUTS ######
+input ProjectVarsInput {
+ adminOnlyVarsList: [String]
+ privateVarsList: [String]
+ vars: StringMap
+}
+
+###### TYPES ######
+type ProjectVars {
+ adminOnlyVars: [String!]!
+ privateVars: [String!]!
+ vars: StringMap
+}
diff --git a/graphql/schema/types/repo_ref.graphql b/graphql/schema/types/repo_ref.graphql
new file mode 100644
index 00000000000..f6a9b8b9692
--- /dev/null
+++ b/graphql/schema/types/repo_ref.graphql
@@ -0,0 +1,111 @@
+###### INPUTS ######
+input RepoRefInput {
+ id: String! @requireProjectAccess(access: EDIT)
+ admins: [String!]
+ batchTime: Int
+ branch: String
+ buildBaronSettings: BuildBaronSettingsInput
+ commitQueue: CommitQueueParamsInput
+ deactivatePrevious: Boolean
+ disabledStatsCache: Boolean
+ dispatchingDisabled: Boolean
+ displayName: String
+ enabled: Boolean
+ externalLinks: [ExternalLinkInput!]
+ githubChecksEnabled: Boolean
+ githubTriggerAliases: [String!]
+ gitTagAuthorizedTeams: [String!]
+ gitTagAuthorizedUsers: [String!]
+ gitTagVersionsEnabled: Boolean
+ manualPrTestingEnabled: Boolean
+ notifyOnBuildFailure: Boolean
+ owner: String
+ patchingDisabled: Boolean
+ patchTriggerAliases: [PatchTriggerAliasInput!]
+ perfEnabled: Boolean
+ periodicBuilds: [PeriodicBuildInput!]
+ private: Boolean
+ prTestingEnabled: Boolean
+ remotePath: String
+ repo: String
+ repotrackerDisabled: Boolean
+ restricted: Boolean
+ spawnHostScriptPath: String
+ stepbackDisabled: Boolean
+ taskAnnotationSettings: TaskAnnotationSettingsInput
+ taskSync: TaskSyncOptionsInput
+ tracksPushEvents: Boolean
+ triggers: [TriggerAliasInput!]
+ versionControlEnabled: Boolean
+ workstationConfig: WorkstationConfigInput
+ containerSizeDefinitions: [ContainerResourcesInput!]
+}
+
+###### TYPES ######
+"""
+RepoRef is technically a special kind of Project.
+Repo types have booleans defaulted, which is why it is necessary to redeclare the types despite them matching nearly
+exactly.
+"""
+type RepoRef {
+ id: String!
+ admins: [String!]! @requireProjectFieldAccess
+ batchTime: Int! @requireProjectFieldAccess
+ branch: String!
+ buildBaronSettings: BuildBaronSettings! @requireProjectFieldAccess
+ commitQueue: RepoCommitQueueParams! @requireProjectFieldAccess
+ containerSizeDefinitions: [ContainerResources!] @requireProjectFieldAccess
+ deactivatePrevious: Boolean! @requireProjectFieldAccess
+ disabledStatsCache: Boolean! @requireProjectFieldAccess
+ dispatchingDisabled: Boolean! @requireProjectFieldAccess
+ displayName: String!
+ enabled: Boolean!
+ githubChecksEnabled: Boolean! @requireProjectFieldAccess
+ githubTriggerAliases: [String!] @requireProjectFieldAccess
+ gitTagAuthorizedTeams: [String!] @requireProjectFieldAccess
+ gitTagAuthorizedUsers: [String!] @requireProjectFieldAccess
+ gitTagVersionsEnabled: Boolean! @requireProjectFieldAccess
+ manualPrTestingEnabled: Boolean! @requireProjectFieldAccess
+ notifyOnBuildFailure: Boolean! @requireProjectFieldAccess
+ owner: String!
+ patchingDisabled: Boolean! @requireProjectFieldAccess
+ patchTriggerAliases: [PatchTriggerAlias!] @requireProjectFieldAccess
+ perfEnabled: Boolean! @requireProjectFieldAccess
+ periodicBuilds: [PeriodicBuild!] @requireProjectFieldAccess
+ private: Boolean!
+ prTestingEnabled: Boolean! @requireProjectFieldAccess
+ remotePath: String! @requireProjectFieldAccess
+ repo: String!
+ repotrackerDisabled: Boolean! @requireProjectFieldAccess
+ restricted: Boolean!
+ spawnHostScriptPath: String!
+ stepbackDisabled: Boolean! @requireProjectFieldAccess
+ taskAnnotationSettings: TaskAnnotationSettings! @requireProjectFieldAccess
+ taskSync: RepoTaskSyncOptions! @requireProjectFieldAccess
+ tracksPushEvents: Boolean! @requireProjectFieldAccess
+ triggers: [TriggerAlias!]! @requireProjectFieldAccess
+ versionControlEnabled: Boolean! @requireProjectFieldAccess
+ workstationConfig: RepoWorkstationConfig! @requireProjectFieldAccess
+ externalLinks: [ExternalLink!] @requireProjectFieldAccess
+}
+
+type RepoCommitQueueParams {
+ enabled: Boolean!
+ mergeMethod: String!
+ message: String!
+}
+
+type RepoTaskSyncOptions {
+ configEnabled: Boolean!
+ patchEnabled: Boolean!
+}
+
+type RepoWorkstationConfig {
+ gitClone: Boolean!
+ setupCommands: [WorkstationSetupCommand!]
+}
+
+type WorkstationSetupCommand {
+ command: String!
+ directory: String!
+}
diff --git a/graphql/schema/types/repo_settings.graphql b/graphql/schema/types/repo_settings.graphql
new file mode 100644
index 00000000000..606b069a72c
--- /dev/null
+++ b/graphql/schema/types/repo_settings.graphql
@@ -0,0 +1,26 @@
+###### INPUTS ######
+"""
+RepoSettingsInput is the input to the saveRepoSettingsForSection mutation.
+It contains information about repo settings (e.g. Build Baron configurations, subscriptions, etc) and is used to
+update the settings for a given project.
+"""
+input RepoSettingsInput {
+ aliases: [ProjectAliasInput!]
+ githubWebhooksEnabled: Boolean
+ projectRef: RepoRefInput ## use the repo ref here in order to have stronger types
+ subscriptions: [SubscriptionInput!]
+ vars: ProjectVarsInput
+}
+
+###### TYPES ######
+"""
+RepoSettings models the settings for a given RepoRef.
+"""
+type RepoSettings {
+ aliases: [ProjectAlias!]
+ githubWebhooksEnabled: Boolean!
+ projectRef: RepoRef ## use the repo ref here in order to have stronger types
+ projectSubscriptions: [ProjectSubscription!] @deprecated(reason: "Use subscriptions instead")
+ subscriptions: [ProjectSubscription!]
+ vars: ProjectVars
+}
diff --git a/graphql/schema/types/spawn.graphql b/graphql/schema/types/spawn.graphql
new file mode 100644
index 00000000000..28bfe789231
--- /dev/null
+++ b/graphql/schema/types/spawn.graphql
@@ -0,0 +1,87 @@
+enum SpawnHostStatusActions {
+ START
+ STOP
+ TERMINATE
+}
+
+###### INPUTS ######
+"""
+VolumeHost is the input to the attachVolumeToHost mutation.
+Its fields are used to attach the volume with volumeId to the host with hostId.
+"""
+input VolumeHost {
+ volumeId: String!
+ hostId: String!
+}
+
+"""
+SpawnHostInput is the input to the spawnHost mutation.
+Its fields determine the properties of the host that will be spawned.
+"""
+input SpawnHostInput {
+ distroId: String!
+ expiration: Time
+ homeVolumeSize: Int
+ isVirtualWorkStation: Boolean!
+ noExpiration: Boolean!
+ publicKey: PublicKeyInput!
+ region: String!
+ savePublicKey: Boolean!
+ setUpScript: String
+ spawnHostsStartedByTask: Boolean
+ taskId: String
+ taskSync: Boolean
+ useProjectSetupScript: Boolean
+ userDataScript: String
+ useTaskConfig: Boolean
+ volumeId: String
+}
+
+"""
+SpawnVolumeInput is the input to the spawnVolume mutation.
+Its fields determine the properties of the volume that will be spawned.
+"""
+input SpawnVolumeInput {
+ availabilityZone: String!
+ expiration: Time
+ host: String
+ noExpiration: Boolean
+ size: Int!
+ type: String!
+}
+
+"""
+UpdateVolumeInput is the input to the updateVolume mutation.
+Its fields determine how a given volume will be modified.
+"""
+input UpdateVolumeInput {
+ expiration: Time
+ name: String
+ noExpiration: Boolean
+ volumeId: String!
+}
+
+"""
+EditSpawnHostInput is the input to the editSpawnHost mutation.
+Its fields determine how a given host will be modified.
+"""
+input EditSpawnHostInput {
+ addedInstanceTags: [InstanceTagInput!]
+ deletedInstanceTags: [InstanceTagInput!]
+ displayName: String
+ expiration: Time
+ hostId: String!
+ instanceType: String
+ noExpiration: Boolean
+ publicKey: PublicKeyInput
+ savePublicKey: Boolean
+ servicePassword: String
+ volume: String
+}
+
+input InstanceTagInput {
+ key: String!
+ value: String!
+}
+
+
diff --git a/graphql/schema/types/subscriptions.graphql b/graphql/schema/types/subscriptions.graphql
new file mode 100644
index 00000000000..e7e542fe8b0
--- /dev/null
+++ b/graphql/schema/types/subscriptions.graphql
@@ -0,0 +1,76 @@
+type GeneralSubscription {
+ id: String!
+ ownerType: String!
+ regexSelectors: [Selector!]!
+ resourceType: String!
+ selectors: [Selector!]!
+ subscriber: SubscriberWrapper
+ trigger: String!
+ triggerData: StringMap
+}
+
+type SubscriberWrapper {
+ subscriber: Subscriber!
+ type: String!
+}
+
+type Subscriber {
+ emailSubscriber: String
+ githubCheckSubscriber: GithubCheckSubscriber
+ githubPRSubscriber: GithubPRSubscriber
+ jiraCommentSubscriber: String
+ jiraIssueSubscriber: JiraIssueSubscriber
+ slackSubscriber: String
+ webhookSubscriber: WebhookSubscriber
+}
+
+type GithubPRSubscriber {
+ owner: String!
+ prNumber: Int
+ ref: String!
+ repo: String!
+}
+
+type GithubCheckSubscriber {
+ owner: String!
+ ref: String!
+ repo: String!
+}
+
+type WebhookSubscriber {
+ headers: [WebhookHeader]!
+ secret: String!
+ url: String!
+ retries: Int!
+ minDelayMs: Int!
+ timeoutMs: Int!
+}
+
+type WebhookHeader {
+ key: String!
+ value: String!
+}
+
+type JiraIssueSubscriber {
+ issueType: String!
+ project: String!
+}
+
+input WebhookSubscriberInput {
+ headers: [WebhookHeaderInput]!
+ secret: String!
+ url: String!
+ retries: Int = 0
+ minDelayMs: Int = 0
+ timeoutMs: Int = 0
+}
+
+input WebhookHeaderInput {
+ key: String!
+ value: String!
+}
+
+input JiraIssueSubscriberInput {
+ issueType: String!
+ project: String!
+}
diff --git a/graphql/schema/types/task.graphql b/graphql/schema/types/task.graphql
new file mode 100644
index 00000000000..51e321b0b6f
--- /dev/null
+++ b/graphql/schema/types/task.graphql
@@ -0,0 +1,237 @@
+enum TestSortCategory {
+ BASE_STATUS
+ STATUS
+ START_TIME
+ DURATION
+ TEST_NAME
+}
+
+###### INPUTS ######
+"""
+TestFilterOptions is an input for the task.Tests query.
+It's used to filter, sort, and paginate test results of a task.
+"""
+input TestFilterOptions {
+ testName: String
+ statuses: [String!]
+ groupID: String
+ sort: [TestSortOptions!]
+ limit: Int
+ page: Int
+}
+
+"""
+TestSortOptions is an input for the task.Tests query.
+It's used to define sort criteria for test results of a task.
+"""
+input TestSortOptions {
+ sortBy: TestSortCategory!
+ direction: SortDirection!
+}
+
+"""
+TestFilter is an input value for the taskTestSample query.
+It's used to filter for tests with testName and status testStatus.
+"""
+input TestFilter {
+ testName: String!
+ testStatus: String!
+}
+
+###### TYPES ######
+"""
+Task models a task, the simplest unit of execution for Evergreen.
+"""
+type Task {
+ id: String!
+ aborted: Boolean!
+ abortInfo: AbortInfo
+ activated: Boolean!
+ activatedBy: String
+ activatedTime: Time
+ ami: String
+ annotation: Annotation
+ baseStatus: String
+ baseTask: Task
+ blocked: Boolean!
+ buildId: String!
+ buildVariant: String!
+ buildVariantDisplayName: String
+ canAbort: Boolean!
+ canDisable: Boolean!
+ canModifyAnnotation: Boolean!
+ canOverrideDependencies: Boolean!
+ canRestart: Boolean!
+ canSchedule: Boolean!
+ canSetPriority: Boolean!
+ canSync: Boolean!
+ canUnschedule: Boolean!
+ containerAllocatedTime: Time
+ createTime: Time
+ dependsOn: [Dependency!]
+ details: TaskEndDetail
+ dispatchTime: Time
+ displayName: String!
+ displayOnly: Boolean
+ displayTask: Task
+ distroId: String!
+ estimatedStart: Duration
+ execution: Int!
+ executionTasks: [String!]
+ executionTasksFull: [Task!]
+ expectedDuration: Duration
+ failedTestCount: Int!
+ finishTime: Time
+ generatedBy: String
+ generatedByName: String
+ generateTask: Boolean
+ hostId: String
+ ingestTime: Time
+ isPerfPluginEnabled: Boolean!
+ latestExecution: Int!
+ logs: TaskLogLinks!
+ minQueuePosition: Int!
+ order: Int!
+ patch: Patch
+ patchNumber: Int
+ pod: Pod
+ priority: Int
+ project: Project
+ projectId: String!
+ projectIdentifier: String
+ requester: String!
+ resetWhenFinished: Boolean!
+ revision: String
+ scheduledTime: Time
+ spawnHostLink: String
+ startTime: Time
+ status: String!
+ taskFiles: TaskFiles!
+ taskGroup: String
+ taskGroupMaxHosts: Int
+ """
+ taskLogs returns the tail 100 lines of the task's logs.
+ """
+ taskLogs: TaskLogs!
+ tests(opts: TestFilterOptions): TaskTestResult!
+ timeTaken: Duration
+ totalTestCount: Int!
+ versionMetadata: Version!
+}
+
+type AbortInfo {
+ buildVariantDisplayName: String!
+ newVersion: String!
+ prClosed: Boolean!
+ taskDisplayName: String!
+ taskID: String!
+ user: String!
+}
+
+type Dependency {
+ buildVariant: String!
+ metStatus: MetStatus!
+ name: String!
+ requiredStatus: RequiredStatus!
+ taskId: String!
+}
+
+enum MetStatus {
+ UNMET
+ MET
+ PENDING
+ STARTED
+}
+
+enum RequiredStatus {
+ MUST_FAIL
+ MUST_FINISH
+ MUST_SUCCEED
+}
+
+type TaskEndDetail {
+ description: String
+ oomTracker: OomTrackerInfo!
+ status: String!
+ timedOut: Boolean
+ timeoutType: String
+ type: String!
+}
+
+type OomTrackerInfo {
+ detected: Boolean!
+ pids: [Int]
+}
+
+type TaskLogLinks {
+ agentLogLink: String
+ allLogLink: String
+ eventLogLink: String
+ systemLogLink: String
+ taskLogLink: String
+}
+
+"""
+TaskFiles is the return value for the taskFiles query.
+Some tasks generate files which are represented by this type.
+"""
+type TaskFiles {
+ fileCount: Int!
+ groupedFiles: [GroupedFiles!]!
+}
+
+type GroupedFiles {
+ files: [File!]
+ taskName: String
+}
+
+type File {
+ link: String!
+ name: String!
+ visibility: String!
+}
+
+"""
+TaskTestResult is the return value for the taskTests query.
+It contains the test results for a task. For example, if there is a task to run all unit tests, then the test results
+could be the result of each individual unit test.
+"""
+type TaskTestResult {
+ testResults: [TestResult!]!
+ totalTestCount: Int!
+ filteredTestCount: Int!
+}
+
+type TestResult {
+ id: String!
+ baseStatus: String
+ duration: Float
+ endTime: Time
+ execution: Int
+ exitCode: Int
+ groupID: String
+ logs: TestLog!
+ startTime: Time
+ status: String!
+ taskId: String
+ testFile: String!
+}
+
+type TestLog {
+ lineNum: Int
+ url: String
+ urlLobster: String @deprecated(reason: "Use urlParsley instead")
+ urlParsley: String
+ urlRaw: String
+}
+
+"""
+TaskTestResultSample is the return value for the taskTestSample query.
+It is used to represent failing test results on the task history pages.
+"""
+type TaskTestResultSample {
+ execution: Int!
+ matchingFailedTestNames: [String!]!
+ taskId: String!
+ totalTestCount: Int!
+}
diff --git a/graphql/schema/types/task_logs.graphql b/graphql/schema/types/task_logs.graphql
new file mode 100644
index 00000000000..d5843846842
--- /dev/null
+++ b/graphql/schema/types/task_logs.graphql
@@ -0,0 +1,44 @@
+###### TYPES ######
+"""
+TaskLogs is the return value for the task.taskLogs query.
+It contains the logs for a given task on a given execution.
+"""
+type TaskLogs {
+ agentLogs: [LogMessage!]!
+ allLogs: [LogMessage!]!
+ defaultLogger: String!
+ eventLogs: [TaskEventLogEntry!]!
+ execution: Int!
+ systemLogs: [LogMessage!]!
+ taskId: String!
+ taskLogs: [LogMessage!]!
+}
+
+type TaskEventLogEntry {
+ id: String!
+ data: TaskEventLogData!
+ eventType: String
+ processedAt: Time!
+ resourceId: String!
+ resourceType: String!
+ timestamp: Time
+}
+
+type TaskEventLogData {
+ hostId: String
+ podId: String
+ jiraIssue: String
+ jiraLink: String
+ priority: Int
+ status: String
+ timestamp: Time
+ userId: String
+}
+
+type LogMessage {
+ message: String
+ severity: String
+ timestamp: Time
+ type: String
+ version: Int
+}
diff --git a/graphql/schema/types/task_queue_item.graphql b/graphql/schema/types/task_queue_item.graphql
new file mode 100644
index 00000000000..90de3468a35
--- /dev/null
+++ b/graphql/schema/types/task_queue_item.graphql
@@ -0,0 +1,40 @@
+"""
+Distro[] is the return value for the distros query.
+It models an environment configuration for a host.
+"""
+type Distro {
+ isVirtualWorkStation: Boolean!
+ name: String
+ user: String
+ userSpawnAllowed: Boolean
+ workDir: String
+}
+
+
+"""
+TaskQueueItem[] is the return value for the distroTaskQueue query.
+It contains information about any particular item on the task queue, such as the name of the task, the build variant of the task,
+and how long it's expected to take to finish running.
+"""
+type TaskQueueItem {
+ id: ID!
+ buildVariant: String!
+ displayName: String!
+ expectedDuration: Duration!
+ priority: Int!
+ project: String!
+ requester: TaskQueueItemType!
+ revision: String!
+ version: String!
+}
+
+"""
+TaskQueueDistro[] is the return value for the taskQueueDistros query.
+It contains information about how many tasks and hosts are running on on a particular distro.
+"""
+type TaskQueueDistro {
+ id: ID!
+ hostCount: Int!
+ taskCount: Int!
+}
+
diff --git a/graphql/schema/types/ticket_fields.graphql b/graphql/schema/types/ticket_fields.graphql
new file mode 100644
index 00000000000..67b45c95d5a
--- /dev/null
+++ b/graphql/schema/types/ticket_fields.graphql
@@ -0,0 +1,16 @@
+##### TYPES #####
+type TicketFields {
+ assignedTeam: String
+ assigneeDisplayName: String
+ created: String!
+ resolutionName: String
+ status: JiraStatus!
+ summary: String!
+ updated: String!
+}
+
+type JiraStatus {
+ id: String!
+ name: String!
+}
+
diff --git a/graphql/schema/types/user.graphql b/graphql/schema/types/user.graphql
new file mode 100644
index 00000000000..41b582b73a5
--- /dev/null
+++ b/graphql/schema/types/user.graphql
@@ -0,0 +1,140 @@
+###### INPUTS ######
+"""
+PublicKeyInput is an input to the createPublicKey and updatePublicKey mutations.
+"""
+input PublicKeyInput {
+ key: String!
+ name: String!
+}
+
+"""
+UserSettingsInput is the input to the updateUserSettings mutation.
+It is used to update user information such as GitHub or Slack username.
+"""
+input UserSettingsInput {
+ githubUser: GithubUserInput
+ notifications: NotificationsInput
+ region: String
+ slackUsername: String
+ slackMemberId: String
+ timezone: String
+ useSpruceOptions: UseSpruceOptionsInput
+ dateFormat: String
+}
+
+input GithubUserInput {
+ lastKnownAs: String
+}
+
+input NotificationsInput {
+ buildBreak: String
+ commitQueue: String
+ patchFinish: String
+ patchFirstFailure: String
+ spawnHostExpiration: String
+ spawnHostOutcome: String
+}
+
+input UseSpruceOptionsInput {
+ hasUsedMainlineCommitsBefore: Boolean
+ hasUsedSpruceBefore: Boolean
+ spruceV1: Boolean
+}
+
+"""
+SubscriptionInput is the input to the saveSubscription mutation.
+It stores information about a user's subscription to a version or task. For example, a user
+can have a subscription to send them a Slack message when a version finishes.
+"""
+input SubscriptionInput {
+ id: String
+ owner_type: String
+ owner: String
+ regex_selectors: [SelectorInput!]!
+ resource_type: String
+ selectors: [SelectorInput!]!
+ subscriber: SubscriberInput!
+ trigger_data: StringMap!
+ trigger: String
+}
+
+input SelectorInput {
+ data: String!
+ type: String!
+}
+
+input SubscriberInput {
+ target: String!
+ type: String!
+ webhookSubscriber: WebhookSubscriberInput
+ jiraIssueSubscriber: JiraIssueSubscriberInput
+}
+
+###### TYPES ######
+"""
+User is returned by the user query.
+It contains information about a user's id, name, email, and permissions.
+"""
+type User {
+ displayName: String!
+ emailAddress: String!
+ patches(patchesInput: PatchesInput!): Patches! # user patches
+ permissions: Permissions!
+ subscriptions: [GeneralSubscription!]
+ userId: String!
+}
+
+"""
+PublicKey models a public key. Users can save/modify/delete their public keys.
+"""
+type PublicKey {
+ key: String!
+ name: String!
+}
+
+"""
+UserConfig is returned by the userConfig query.
+It contains configuration information such as the user's api key for the Evergreen CLI and a user's
+preferred UI (legacy vs Spruce).
+"""
+type UserConfig {
+ api_key: String!
+ api_server_host: String!
+ ui_server_host: String!
+ user: String!
+}
+
+"""
+UserSettings is returned by the userSettings query.
+It contains information about a user's settings, such as their GitHub username or timezone.
+"""
+type UserSettings {
+ githubUser: GithubUser
+ notifications: Notifications
+ region: String
+ slackUsername: String
+ slackMemberId: String
+ timezone: String
+ useSpruceOptions: UseSpruceOptions
+ dateFormat: String
+}
+
+type GithubUser {
+ lastKnownAs: String
+ uid: Int
+}
+
+type Notifications {
+ buildBreak: String
+ commitQueue: String
+ patchFinish: String
+ patchFirstFailure: String
+ spawnHostExpiration: String
+ spawnHostOutcome: String
+}
+
+type UseSpruceOptions {
+ hasUsedMainlineCommitsBefore: Boolean
+ hasUsedSpruceBefore: Boolean
+ spruceV1: Boolean
+}
diff --git a/graphql/schema/types/version.graphql b/graphql/schema/types/version.graphql
new file mode 100644
index 00000000000..2d49d4e476a
--- /dev/null
+++ b/graphql/schema/types/version.graphql
@@ -0,0 +1,134 @@
+###### INPUTS ######
+"""
+VersionToRestart is the input to the restartVersions mutation.
+It contains an array of taskIds to restart for a given versionId.
+"""
+input VersionToRestart {
+ versionId: String!
+ taskIds: [String!]!
+}
+
+"""
+TaskFilterOptions defines the parameters that are used when fetching tasks from a Version.
+"""
+input TaskFilterOptions {
+ baseStatuses: [String!] = []
+ includeEmptyActivation: Boolean = false
+ @deprecated(reason: "Use includeNeverActivatedTasks instead")
+ includeNeverActivatedTasks: Boolean = false
+ limit: Int = 0
+ page: Int = 0
+ sorts: [SortOrder!]
+ statuses: [String!] = []
+ taskName: String
+ variant: String
+}
+
+"""
+SortOrder[] is an input value for version.tasks. It is used to define whether to sort by ASC/DEC for a given sort key.
+"""
+input SortOrder {
+ Direction: SortDirection!
+ Key: TaskSortCategory!
+}
+
+###### TYPES ######
+"""
+Version models a commit within a project.
+"""
+type Version {
+ id: String!
+ activated: Boolean
+ author: String!
+ baseTaskStatuses: [String!]!
+ baseVersion: Version
+ branch: String!
+ buildVariants(options: BuildVariantOptions!): [GroupedBuildVariant]
+ buildVariantStats(options: BuildVariantOptions!): [GroupedTaskStatusCount!]
+ childVersions: [Version]
+ createTime: Time!
+ errors: [String!]!
+ finishTime: Time
+ isPatch: Boolean!
+ manifest: Manifest
+ message: String!
+ order: Int!
+ parameters: [Parameter!]!
+ patch: Patch
+ previousVersion: Version
+ project: String!
+ projectIdentifier: String!
+ projectMetadata: Project
+ repo: String!
+ requester: String!
+ revision: String!
+ startTime: Time
+ status: String!
+ taskCount: Int
+ tasks(options: TaskFilterOptions!): VersionTasks!
+ taskStatuses: [String!]!
+ taskStatusStats(options: BuildVariantOptions!): TaskStats
+ upstreamProject: UpstreamProject
+ versionTiming: VersionTiming
+ externalLinksForMetadata: [ExternalLinkForMetadata!]!
+ warnings: [String!]!
+}
+
+type VersionTasks {
+ count: Int!
+ data: [Task!]!
+}
+
+type TaskStats {
+ counts: [StatusCount!]
+ eta: Time
+}
+
+type StatusCount {
+ count: Int!
+ status: String!
+}
+
+type GroupedBuildVariant {
+ displayName: String!
+ tasks: [Task]
+ variant: String!
+}
+
+type GroupedTaskStatusCount {
+ displayName: String!
+ statusCounts: [StatusCount!]!
+ variant: String!
+}
+
+type VersionTiming {
+ makespan: Duration
+ timeTaken: Duration
+}
+
+type Manifest {
+ id: String!
+ branch: String!
+ isBase: Boolean!
+ moduleOverrides: StringMap
+ modules: Map
+ project: String!
+ revision: String!
+}
+
+type UpstreamProject {
+ owner: String!
+ project: String!
+ repo: String!
+ resourceID: String! # ID of the UI linkable resource that triggered the upstream version (corresponds to a task ID or version ID)
+ revision: String!
+ task: Task
+ triggerID: String! # ID of the trigger that created the upstream version (corresponds to a task ID or build ID)
+ triggerType: String!
+ version: Version
+}
+
+type ExternalLinkForMetadata {
+ url: String!
+ displayName: String!
+}
diff --git a/graphql/schema/types/volume.graphql b/graphql/schema/types/volume.graphql
new file mode 100644
index 00000000000..72dcc76f0f3
--- /dev/null
+++ b/graphql/schema/types/volume.graphql
@@ -0,0 +1,16 @@
+type Volume {
+ id: String!
+ availabilityZone: String!
+ createdBy: String!
+ creationTime: Time
+ deviceName: String
+ displayName: String!
+ expiration: Time
+ homeVolume: Boolean!
+ host: Host
+ hostID: String!
+ migrating: Boolean!
+ noExpiration: Boolean!
+ size: Int!
+ type: String!
+}
diff --git a/graphql/splunktracing.go b/graphql/splunktracing.go
index 32f4c303306..345659c3a85 100644
--- a/graphql/splunktracing.go
+++ b/graphql/splunktracing.go
@@ -53,6 +53,7 @@ func (SplunkTracing) InterceptResponse(ctx context.Context, next graphql.Respons
"start": start,
"end": end,
"user": usr.Username(),
+ "origin": rc.Headers.Get("Origin"),
})
}()
diff --git a/graphql/subscriptions_resolver.go b/graphql/subscriptions_resolver.go
new file mode 100644
index 00000000000..c20775c7cb5
--- /dev/null
+++ b/graphql/subscriptions_resolver.go
@@ -0,0 +1,72 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+ "github.com/mitchellh/mapstructure"
+)
+
+// Subscriber is the resolver for the subscriber field.
+func (r *subscriberWrapperResolver) Subscriber(ctx context.Context, obj *model.APISubscriber) (*Subscriber, error) {
+ res := &Subscriber{}
+ subscriberType := utility.FromStringPtr(obj.Type)
+
+ switch subscriberType {
+ case event.GithubPullRequestSubscriberType:
+ sub := model.APIGithubPRSubscriber{}
+ if err := mapstructure.Decode(obj.Target, &sub); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem converting %s subscriber: %s",
+ event.GithubPullRequestSubscriberType, err.Error()))
+ }
+ res.GithubPRSubscriber = &sub
+ case event.GithubCheckSubscriberType:
+ sub := model.APIGithubCheckSubscriber{}
+ if err := mapstructure.Decode(obj.Target, &sub); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building %s subscriber from service: %s",
+ event.GithubCheckSubscriberType, err.Error()))
+ }
+ res.GithubCheckSubscriber = &sub
+
+ case event.EvergreenWebhookSubscriberType:
+ sub := model.APIWebhookSubscriber{}
+ if err := mapstructure.Decode(obj.Target, &sub); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building %s subscriber from service: %s",
+ event.EvergreenWebhookSubscriberType, err.Error()))
+ }
+ res.WebhookSubscriber = &sub
+
+ case event.JIRAIssueSubscriberType:
+ sub := &model.APIJIRAIssueSubscriber{}
+ if err := mapstructure.Decode(obj.Target, &sub); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("problem building %s subscriber from service: %s",
+ event.JIRAIssueSubscriberType, err.Error()))
+ }
+ res.JiraIssueSubscriber = sub
+ case event.JIRACommentSubscriberType:
+ res.JiraCommentSubscriber = obj.Target.(*string)
+ case event.EmailSubscriberType:
+ res.EmailSubscriber = obj.Target.(*string)
+ case event.SlackSubscriberType:
+ res.SlackSubscriber = obj.Target.(*string)
+ case event.EnqueuePatchSubscriberType:
+ // We don't store information in target for this case, so do nothing.
+ default:
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("encountered unknown subscriber type '%s'", subscriberType))
+ }
+
+ return res, nil
+}
+
+// SubscriberWrapper returns SubscriberWrapperResolver implementation.
+func (r *Resolver) SubscriberWrapper() SubscriberWrapperResolver {
+ return &subscriberWrapperResolver{r}
+}
+
+type subscriberWrapperResolver struct{ *Resolver }
diff --git a/graphql/task_logs_resolver.go b/graphql/task_logs_resolver.go
new file mode 100644
index 00000000000..d2627abf111
--- /dev/null
+++ b/graphql/task_logs_resolver.go
@@ -0,0 +1,241 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/apimodels"
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/model/task"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/utility"
+)
+
+// AgentLogs is the resolver for the agentLogs field.
+func (r *taskLogsResolver) AgentLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
+ const logMessageCount = 100
+ task, taskErr := task.FindOneIdAndExecution(obj.TaskID, obj.Execution)
+ if taskErr != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding task %s: %s", obj.TaskID, taskErr.Error()))
+ }
+ if evergreen.IsUnstartedTaskStatus(task.Status) {
+ return []*apimodels.LogMessage{}, nil
+ }
+ var agentLogs []apimodels.LogMessage
+ // get logs from cedar
+ if obj.DefaultLogger == model.BuildloggerLogSender {
+ opts := apimodels.GetBuildloggerLogsOptions{
+ BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
+ TaskID: obj.TaskID,
+ Execution: utility.ToIntPtr(obj.Execution),
+ PrintPriority: true,
+ Tail: logMessageCount,
+ LogType: apimodels.AgentLogPrefix,
+ }
+ // agent logs
+ agentLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ agentLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, agentLogReader)
+ } else {
+ var err error
+ // agent logs
+ agentLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{},
+ []string{apimodels.AgentLogPrefix})
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding agent logs for task %s: %s", obj.TaskID, err.Error()))
+ }
+ }
+
+ agentLogPointers := []*apimodels.LogMessage{}
+
+ for i := range agentLogs {
+ agentLogPointers = append(agentLogPointers, &agentLogs[i])
+ }
+ return agentLogPointers, nil
+}
+
+// AllLogs is the resolver for the allLogs field.
+func (r *taskLogsResolver) AllLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
+ const logMessageCount = 100
+ task, taskErr := task.FindOneIdAndExecutionWithDisplayStatus(obj.TaskID, &obj.Execution)
+ if taskErr != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding task %s: %s", obj.TaskID, taskErr.Error()))
+ }
+ if evergreen.IsUnstartedTaskStatus(task.Status) {
+ return []*apimodels.LogMessage{}, nil
+ }
+ var allLogs []apimodels.LogMessage
+
+ // get logs from cedar
+ if obj.DefaultLogger == model.BuildloggerLogSender {
+
+ opts := apimodels.GetBuildloggerLogsOptions{
+ BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
+ TaskID: obj.TaskID,
+ Execution: utility.ToIntPtr(obj.Execution),
+ PrintPriority: true,
+ Tail: logMessageCount,
+ LogType: apimodels.AllTaskLevelLogs,
+ }
+
+ // all logs
+ allLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+
+ allLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, allLogReader)
+
+ } else {
+ var err error
+ // all logs
+ allLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{}, []string{})
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding all logs for task %s: %s", obj.TaskID, err.Error()))
+ }
+ }
+
+ allLogPointers := []*apimodels.LogMessage{}
+ for i := range allLogs {
+ allLogPointers = append(allLogPointers, &allLogs[i])
+ }
+ return allLogPointers, nil
+}
+
+// EventLogs is the resolver for the eventLogs field.
+func (r *taskLogsResolver) EventLogs(ctx context.Context, obj *TaskLogs) ([]*restModel.TaskAPIEventLogEntry, error) {
+ const logMessageCount = 100
+ // loggedEvents is ordered ts descending
+ loggedEvents, err := event.Find(event.MostRecentTaskEvents(obj.TaskID, logMessageCount))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find EventLogs for task %s: %s", obj.TaskID, err.Error()))
+ }
+
+ // reverse order so it is ascending
+ for i := len(loggedEvents)/2 - 1; i >= 0; i-- {
+ opp := len(loggedEvents) - 1 - i
+ loggedEvents[i], loggedEvents[opp] = loggedEvents[opp], loggedEvents[i]
+ }
+
+ // populate eventlogs pointer arrays
+ apiEventLogPointers := []*restModel.TaskAPIEventLogEntry{}
+ for _, e := range loggedEvents {
+ apiEventLog := restModel.TaskAPIEventLogEntry{}
+ err = apiEventLog.BuildFromService(e)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to build APIEventLogEntry from EventLog: %s", err.Error()))
+ }
+ apiEventLogPointers = append(apiEventLogPointers, &apiEventLog)
+ }
+ return apiEventLogPointers, nil
+}
+
+// SystemLogs is the resolver for the systemLogs field.
+func (r *taskLogsResolver) SystemLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
+ const logMessageCount = 100
+
+ var systemLogs []apimodels.LogMessage
+ task, taskErr := task.FindOneIdAndExecutionWithDisplayStatus(obj.TaskID, &obj.Execution)
+ if taskErr != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding task %s: %s", obj.TaskID, taskErr.Error()))
+ }
+ if evergreen.IsUnstartedTaskStatus(task.Status) {
+ return []*apimodels.LogMessage{}, nil
+ }
+ // get logs from cedar
+ if obj.DefaultLogger == model.BuildloggerLogSender {
+ opts := apimodels.GetBuildloggerLogsOptions{
+ BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
+ TaskID: obj.TaskID,
+ Execution: utility.ToIntPtr(obj.Execution),
+ PrintPriority: true,
+ Tail: logMessageCount,
+ LogType: apimodels.TaskLogPrefix,
+ }
+
+ // system logs
+ opts.LogType = apimodels.SystemLogPrefix
+ systemLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ systemLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, systemLogReader)
+ } else {
+ var err error
+
+ systemLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{},
+ []string{apimodels.SystemLogPrefix})
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding system logs for task %s: %s", obj.TaskID, err.Error()))
+ }
+ }
+ systemLogPointers := []*apimodels.LogMessage{}
+ for i := range systemLogs {
+ systemLogPointers = append(systemLogPointers, &systemLogs[i])
+ }
+
+ return systemLogPointers, nil
+}
+
+// TaskLogs is the resolver for the taskLogs field.
+func (r *taskLogsResolver) TaskLogs(ctx context.Context, obj *TaskLogs) ([]*apimodels.LogMessage, error) {
+ const logMessageCount = 100
+ task, taskErr := task.FindOneIdAndExecutionWithDisplayStatus(obj.TaskID, &obj.Execution)
+ if taskErr != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding task %s: %s", obj.TaskID, taskErr.Error()))
+ }
+ if evergreen.IsUnstartedTaskStatus(task.Status) {
+ return []*apimodels.LogMessage{}, nil
+ }
+
+ var taskLogs []apimodels.LogMessage
+ // get logs from cedar
+ if obj.DefaultLogger == model.BuildloggerLogSender {
+
+ opts := apimodels.GetBuildloggerLogsOptions{
+ BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
+ TaskID: obj.TaskID,
+ Execution: utility.ToIntPtr(obj.Execution),
+ PrintPriority: true,
+ Tail: logMessageCount,
+ LogType: apimodels.TaskLogPrefix,
+ }
+ // task logs
+ taskLogReader, err := apimodels.GetBuildloggerLogs(ctx, opts)
+
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Encountered an error while fetching build logger logs: %s", err.Error()))
+ }
+
+ taskLogs = apimodels.ReadBuildloggerToSlice(ctx, obj.TaskID, taskLogReader)
+
+ } else {
+ var err error
+
+ // task logs
+ taskLogs, err = model.FindMostRecentLogMessages(obj.TaskID, obj.Execution, logMessageCount, []string{},
+ []string{apimodels.TaskLogPrefix})
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Finding task logs for task %s: %s", obj.TaskID, err.Error()))
+ }
+ }
+
+ taskLogPointers := []*apimodels.LogMessage{}
+ for i := range taskLogs {
+ taskLogPointers = append(taskLogPointers, &taskLogs[i])
+ }
+
+ return taskLogPointers, nil
+}
+
+// TaskLogs returns TaskLogsResolver implementation.
+func (r *Resolver) TaskLogs() TaskLogsResolver { return &taskLogsResolver{r} }
+
+type taskLogsResolver struct{ *Resolver }
diff --git a/graphql/task_queue_item_resolver.go b/graphql/task_queue_item_resolver.go
new file mode 100644
index 00000000000..7d28d7ca7af
--- /dev/null
+++ b/graphql/task_queue_item_resolver.go
@@ -0,0 +1,24 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+
+ "github.com/evergreen-ci/evergreen"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+)
+
+// Requester is the resolver for the requester field.
+func (r *taskQueueItemResolver) Requester(ctx context.Context, obj *restModel.APITaskQueueItem) (TaskQueueItemType, error) {
+ if *obj.Requester != evergreen.RepotrackerVersionRequester {
+ return TaskQueueItemTypePatch, nil
+ }
+ return TaskQueueItemTypeCommit, nil
+}
+
+// TaskQueueItem returns TaskQueueItemResolver implementation.
+func (r *Resolver) TaskQueueItem() TaskQueueItemResolver { return &taskQueueItemResolver{r} }
+
+type taskQueueItemResolver struct{ *Resolver }
diff --git a/graphql/task_resolver.go b/graphql/task_resolver.go
new file mode 100644
index 00000000000..cbbf9f73d39
--- /dev/null
+++ b/graphql/task_resolver.go
@@ -0,0 +1,643 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/apimodels"
+ "github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/annotations"
+ "github.com/evergreen-ci/evergreen/model/build"
+ "github.com/evergreen-ci/evergreen/model/host"
+ "github.com/evergreen-ci/evergreen/model/patch"
+ "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/rest/data"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+ "github.com/evergreen-ci/gimlet"
+ "github.com/evergreen-ci/utility"
+)
+
+// AbortInfo is the resolver for the abortInfo field.
+func (r *taskResolver) AbortInfo(ctx context.Context, obj *restModel.APITask) (*AbortInfo, error) {
+ if !obj.Aborted {
+ return nil, nil
+ }
+
+ info := AbortInfo{
+ User: obj.AbortInfo.User,
+ TaskID: obj.AbortInfo.TaskID,
+ NewVersion: obj.AbortInfo.NewVersion,
+ PrClosed: obj.AbortInfo.PRClosed,
+ }
+
+ if len(obj.AbortInfo.TaskID) > 0 {
+ abortedTask, err := task.FindOneId(obj.AbortInfo.TaskID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem getting aborted task %s: %s", *obj.Id, err.Error()))
+ }
+ if abortedTask == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find aborted task %s: %s", obj.AbortInfo.TaskID, err.Error()))
+ }
+ abortedTaskBuild, err := build.FindOneId(abortedTask.BuildId)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Problem getting build for aborted task %s: %s", abortedTask.BuildId, err.Error()))
+ }
+ if abortedTaskBuild == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find build %s for aborted task: %s", abortedTask.BuildId, err.Error()))
+ }
+ info.TaskDisplayName = abortedTask.DisplayName
+ info.BuildVariantDisplayName = abortedTaskBuild.DisplayName
+ }
+ return &info, nil
+}
+
+// Ami is the resolver for the ami field.
+func (r *taskResolver) Ami(ctx context.Context, obj *restModel.APITask) (*string, error) {
+ err := obj.GetAMI()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ return obj.AMI, nil
+}
+
+// Annotation is the resolver for the annotation field.
+func (r *taskResolver) Annotation(ctx context.Context, obj *restModel.APITask) (*restModel.APITaskAnnotation, error) {
+ annotation, err := annotations.FindOneByTaskIdAndExecution(*obj.Id, obj.Execution)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding annotation: %s", err.Error()))
+ }
+ if annotation == nil {
+ return nil, nil
+ }
+ apiAnnotation := restModel.APITaskAnnotationBuildFromService(*annotation)
+ return apiAnnotation, nil
+}
+
+// BaseStatus is the resolver for the baseStatus field.
+func (r *taskResolver) BaseStatus(ctx context.Context, obj *restModel.APITask) (*string, error) {
+ t, err := obj.ToService()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
+ }
+ baseStatus := t.BaseTask.Status
+ if baseStatus == "" {
+ return nil, nil
+ }
+ return &baseStatus, nil
+}
+
+// BaseTask is the resolver for the baseTask field.
+func (r *taskResolver) BaseTask(ctx context.Context, obj *restModel.APITask) (*restModel.APITask, error) {
+ t, err := obj.ToService()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
+ }
+
+ var baseTask *task.Task
+ // BaseTask is sometimes added via aggregation when Task is resolved via GetTasksByVersion.
+ if t.BaseTask.Id != "" {
+ baseTask, err = task.FindOneId(t.BaseTask.Id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s: %s", t.BaseTask.Id, err.Error()))
+ }
+ if baseTask == nil {
+ return nil, gimlet.ErrorResponse{
+ StatusCode: http.StatusNotFound,
+ Message: fmt.Sprintf("task with id '%s' not found", t.BaseTask.Id),
+ }
+ }
+ } else {
+ if evergreen.IsPatchRequester(t.Requester) {
+ baseTask, err = t.FindTaskOnBaseCommit()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s on base commit: %s", *obj.Id, err.Error()))
+ }
+ } else {
+ baseTask, err = t.FindTaskOnPreviousCommit()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding task %s on previous commit: %s", *obj.Id, err.Error()))
+ }
+ }
+ }
+
+ if baseTask == nil {
+ return nil, nil
+ }
+ apiTask := &restModel.APITask{}
+ err = apiTask.BuildFromService(baseTask, nil)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert baseTask %s to APITask : %s", baseTask.Id, err))
+ }
+ return apiTask, nil
+}
+
+// BuildVariantDisplayName is the resolver for the buildVariantDisplayName field.
+func (r *taskResolver) BuildVariantDisplayName(ctx context.Context, obj *restModel.APITask) (*string, error) {
+ if obj.BuildVariantDisplayName != nil {
+ return obj.BuildVariantDisplayName, nil
+ }
+ if obj.BuildId == nil {
+ return nil, nil
+ }
+ buildID := utility.FromStringPtr(obj.BuildId)
+ b, err := build.FindOneId(buildID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find build id: %s for task: %s, '%s'", buildID, utility.FromStringPtr(obj.Id), err.Error()))
+ }
+ if b == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find build id: %s for task: %s", buildID, utility.FromStringPtr(obj.Id)))
+ }
+ displayName := b.DisplayName
+ return &displayName, nil
+}
+
+// CanAbort is the resolver for the canAbort field.
+func (r *taskResolver) CanAbort(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ return *obj.Status == evergreen.TaskDispatched || *obj.Status == evergreen.TaskStarted, nil
+}
+
+// CanDisable is the resolver for the canDisable field.
+func (r *taskResolver) CanDisable(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ return obj.ParentTaskId == "", nil
+}
+
+// CanModifyAnnotation is the resolver for the canModifyAnnotation field.
+func (r *taskResolver) CanModifyAnnotation(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ authUser := gimlet.GetUser(ctx)
+ permissions := gimlet.PermissionOpts{
+ Resource: *obj.ProjectId,
+ ResourceType: evergreen.ProjectResourceType,
+ Permission: evergreen.PermissionAnnotations,
+ RequiredLevel: evergreen.AnnotationsModify.Value,
+ }
+ if authUser.HasPermission(permissions) {
+ return true, nil
+ }
+ if utility.StringSliceContains(evergreen.PatchRequesters, utility.FromStringPtr(obj.Requester)) {
+ p, err := patch.FindOneId(utility.FromStringPtr(obj.Version))
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error finding patch for task: %s", err.Error()))
+ }
+ if p == nil {
+ return false, InternalServerError.Send(ctx, "patch for task doesn't exist")
+ }
+ if p.Author == authUser.Username() {
+ return true, nil
+ }
+ }
+ return false, nil
+}
+
+// CanOverrideDependencies is the resolver for the canOverrideDependencies field.
+func (r *taskResolver) CanOverrideDependencies(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ currentUser := mustHaveUser(ctx)
+ if obj.OverrideDependencies {
+ return false, nil
+ }
+ // if the task is not the latest execution of the task, it can't be overridden
+ if obj.Archived {
+ return false, nil
+ }
+ requiredPermission := gimlet.PermissionOpts{
+ ResourceType: evergreen.ProjectResourceType,
+ Permission: evergreen.PermissionTasks,
+ RequiredLevel: evergreen.TasksAdmin.Value,
+ Resource: *obj.ProjectId,
+ }
+ overrideRequesters := []string{
+ evergreen.PatchVersionRequester,
+ evergreen.GithubPRRequester,
+ }
+ if len(obj.DependsOn) > 0 && (utility.StringSliceContains(overrideRequesters, utility.FromStringPtr(obj.Requester)) ||
+ currentUser.HasPermission(requiredPermission)) {
+ return true, nil
+ }
+ return false, nil
+}
+
+// CanRestart is the resolver for the canRestart field.
+func (r *taskResolver) CanRestart(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ t, err := obj.ToService()
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("converting task '%s' to service", *obj.Id))
+ }
+ return canRestartTask(t), nil
+}
+
+// CanSchedule is the resolver for the canSchedule field.
+func (r *taskResolver) CanSchedule(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ t, err := obj.ToService()
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("converting task '%s' to service", *obj.Id))
+ }
+ return canScheduleTask(t), nil
+}
+
+// CanSetPriority is the resolver for the canSetPriority field.
+func (r *taskResolver) CanSetPriority(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ return *obj.Status == evergreen.TaskUndispatched, nil
+}
+
+// CanUnschedule is the resolver for the canUnschedule field.
+func (r *taskResolver) CanUnschedule(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ return (obj.Activated && *obj.Status == evergreen.TaskUndispatched && obj.ParentTaskId == ""), nil
+}
+
+// DependsOn is the resolver for the dependsOn field.
+func (r *taskResolver) DependsOn(ctx context.Context, obj *restModel.APITask) ([]*Dependency, error) {
+ dependencies := []*Dependency{}
+ if len(obj.DependsOn) == 0 {
+ return nil, nil
+ }
+ depIds := []string{}
+ for _, dep := range obj.DependsOn {
+ depIds = append(depIds, dep.TaskId)
+ }
+
+ dependencyTasks, err := task.FindWithFields(task.ByIds(depIds), task.DisplayNameKey, task.StatusKey,
+ task.ActivatedKey, task.BuildVariantKey, task.DetailsKey, task.DependsOnKey)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Cannot find dependency tasks for task %s: %s", *obj.Id, err.Error()))
+ }
+
+ taskMap := map[string]*task.Task{}
+ for i := range dependencyTasks {
+ taskMap[dependencyTasks[i].Id] = &dependencyTasks[i]
+ }
+
+ t, err := obj.ToService()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
+ }
+
+ for _, dep := range obj.DependsOn {
+ depTask, ok := taskMap[dep.TaskId]
+ if !ok {
+ continue
+ }
+ var metStatus MetStatus
+ if depTask.Status == evergreen.TaskStarted {
+ metStatus = "STARTED"
+ } else if !depTask.IsFinished() {
+ metStatus = "PENDING"
+ } else if t.SatisfiesDependency(depTask) {
+ metStatus = "MET"
+ } else {
+ metStatus = "UNMET"
+ }
+ var requiredStatus RequiredStatus
+ switch dep.Status {
+ case model.AllStatuses:
+ requiredStatus = "MUST_FINISH"
+ case evergreen.TaskFailed:
+ requiredStatus = "MUST_FAIL"
+ default:
+ requiredStatus = "MUST_SUCCEED"
+ }
+
+ dependency := Dependency{
+ Name: depTask.DisplayName,
+ BuildVariant: depTask.BuildVariant,
+ MetStatus: metStatus,
+ RequiredStatus: requiredStatus,
+ TaskID: dep.TaskId,
+ }
+
+ dependencies = append(dependencies, &dependency)
+ }
+ return dependencies, nil
+}
+
+// DisplayTask is the resolver for the displayTask field.
+func (r *taskResolver) DisplayTask(ctx context.Context, obj *restModel.APITask) (*restModel.APITask, error) {
+ t, err := task.FindOneId(*obj.Id)
+ if err != nil || t == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Could not find task with id: %s", *obj.Id))
+ }
+ dt, err := t.GetDisplayTask()
+ if dt == nil || err != nil {
+ return nil, nil
+ }
+ apiTask := &restModel.APITask{}
+ if err = apiTask.BuildFromService(dt, nil); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert display task: %s to APITask", dt.Id))
+ }
+ return apiTask, nil
+}
+
+// EstimatedStart is the resolver for the estimatedStart field.
+func (r *taskResolver) EstimatedStart(ctx context.Context, obj *restModel.APITask) (*restModel.APIDuration, error) {
+ t, err := obj.ToService()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error while converting task %s to service", *obj.Id))
+ }
+ start, err := model.GetEstimatedStartTime(*t)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, "error getting estimated start time")
+ }
+ duration := restModel.NewAPIDuration(start)
+ return &duration, nil
+}
+
+// ExecutionTasksFull is the resolver for the executionTasksFull field.
+func (r *taskResolver) ExecutionTasksFull(ctx context.Context, obj *restModel.APITask) ([]*restModel.APITask, error) {
+ if len(obj.ExecutionTasks) == 0 {
+ return nil, nil
+ }
+ tasks, err := task.FindByExecutionTasksAndMaxExecution(utility.FromStringPtrSlice(obj.ExecutionTasks), obj.Execution)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding execution tasks for task: %s : %s", *obj.Id, err.Error()))
+ }
+ apiTasks := []*restModel.APITask{}
+ for _, t := range tasks {
+ apiTask := &restModel.APITask{}
+ err = apiTask.BuildFromService(&t, nil)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to convert task %s to APITask : %s", t.Id, err.Error()))
+ }
+ apiTasks = append(apiTasks, apiTask)
+ }
+ return apiTasks, nil
+}
+
+// FailedTestCount is the resolver for the failedTestCount field.
+func (r *taskResolver) FailedTestCount(ctx context.Context, obj *restModel.APITask) (int, error) {
+ dbTask, err := obj.ToService()
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
+ }
+
+ stats, err := dbTask.GetTestResultsStats(ctx, evergreen.GetEnvironment())
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("getting failed test count: %s", err))
+ }
+
+ return stats.FailedCount, nil
+}
+
+// GeneratedByName is the resolver for the generatedByName field.
+func (r *taskResolver) GeneratedByName(ctx context.Context, obj *restModel.APITask) (*string, error) {
+ if obj.GeneratedBy == "" {
+ return nil, nil
+ }
+ generator, err := task.FindOneIdWithFields(obj.GeneratedBy, task.DisplayNameKey)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("unable to find generator: %s", err.Error()))
+ }
+ if generator == nil {
+ return nil, nil
+ }
+ name := generator.DisplayName
+
+ return &name, nil
+}
+
+// IsPerfPluginEnabled is the resolver for the isPerfPluginEnabled field.
+func (r *taskResolver) IsPerfPluginEnabled(ctx context.Context, obj *restModel.APITask) (bool, error) {
+ if !evergreen.IsFinishedTaskStatus(utility.FromStringPtr(obj.Status)) {
+ return false, nil
+ }
+ if !model.IsPerfEnabledForProject(*obj.ProjectId) {
+ return false, nil
+ }
+ opts := apimodels.GetCedarPerfCountOptions{
+ BaseURL: evergreen.GetEnvironment().Settings().Cedar.BaseURL,
+ TaskID: utility.FromStringPtr(obj.Id),
+ Execution: obj.Execution,
+ }
+ if opts.BaseURL == "" {
+ return false, nil
+ }
+ result, err := apimodels.CedarPerfResultsCount(ctx, opts)
+ if err != nil {
+ return false, InternalServerError.Send(ctx, fmt.Sprintf("error requesting perf data from cedar: %s", err))
+ }
+ if result.NumberOfResults == 0 {
+ return false, nil
+ }
+ return true, nil
+}
+
+// LatestExecution is the resolver for the latestExecution field.
+func (r *taskResolver) LatestExecution(ctx context.Context, obj *restModel.APITask) (int, error) {
+ return task.GetLatestExecution(*obj.Id)
+}
+
+// MinQueuePosition is the resolver for the minQueuePosition field.
+func (r *taskResolver) MinQueuePosition(ctx context.Context, obj *restModel.APITask) (int, error) {
+ position, err := model.FindMinimumQueuePositionForTask(*obj.Id)
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("error queue position for task: %s", err.Error()))
+ }
+ if position < 0 {
+ return 0, nil
+ }
+ return position, nil
+}
+
+// Patch is the resolver for the patch field.
+func (r *taskResolver) Patch(ctx context.Context, obj *restModel.APITask) (*restModel.APIPatch, error) {
+ if !evergreen.IsPatchRequester(*obj.Requester) {
+ return nil, nil
+ }
+ apiPatch, err := data.FindPatchById(*obj.Version)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Couldn't find a patch with id: `%s` %s", *obj.Version, err.Error()))
+ }
+ return apiPatch, nil
+}
+
+// PatchNumber is the resolver for the patchNumber field.
+func (r *taskResolver) PatchNumber(ctx context.Context, obj *restModel.APITask) (*int, error) {
+ order := obj.Order
+ return &order, nil
+}
+
+// Pod is the resolver for the pod field.
+func (r *taskResolver) Pod(ctx context.Context, obj *restModel.APITask) (*restModel.APIPod, error) {
+ if utility.FromStringPtr(obj.PodID) == "" {
+ return nil, nil
+ }
+ pod, err := data.FindAPIPodByID(utility.FromStringPtr(obj.PodID))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding pod: %s", err.Error()))
+ }
+ return pod, nil
+}
+
+// Project is the resolver for the project field.
+func (r *taskResolver) Project(ctx context.Context, obj *restModel.APITask) (*restModel.APIProjectRef, error) {
+ pRef, err := data.FindProjectById(*obj.ProjectId, true, false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding project ref for project %s: %s", *obj.ProjectId, err.Error()))
+ }
+ if pRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find a ProjectRef for project %s", *obj.ProjectId))
+ }
+ apiProjectRef := restModel.APIProjectRef{}
+ if err = apiProjectRef.BuildFromService(*pRef); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APIProject from service: %s", err.Error()))
+ }
+ return &apiProjectRef, nil
+}
+
+// ProjectIdentifier is the resolver for the projectIdentifier field.
+func (r *taskResolver) ProjectIdentifier(ctx context.Context, obj *restModel.APITask) (*string, error) {
+ obj.GetProjectIdentifier()
+ return obj.ProjectIdentifier, nil
+}
+
+// SpawnHostLink is the resolver for the spawnHostLink field.
+func (r *taskResolver) SpawnHostLink(ctx context.Context, obj *restModel.APITask) (*string, error) {
+ host, err := host.FindOne(host.ById(*obj.HostId))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("error finding host for task %s", *obj.Id))
+ }
+ if host == nil {
+ return nil, nil
+ }
+ if host.Distro.SpawnAllowed && utility.StringSliceContains(evergreen.ProviderUserSpawnable, host.Distro.Provider) {
+ link := fmt.Sprintf("%s/spawn?distro_id=%s&task_id=%s", evergreen.GetEnvironment().Settings().Ui.Url, host.Distro.Id, *obj.Id)
+ return &link, nil
+ }
+ return nil, nil
+}
+
+// Status is the resolver for the status field.
+func (r *taskResolver) Status(ctx context.Context, obj *restModel.APITask) (string, error) {
+ return *obj.DisplayStatus, nil
+}
+
+// TaskFiles is the resolver for the taskFiles field.
+func (r *taskResolver) TaskFiles(ctx context.Context, obj *restModel.APITask) (*TaskFiles, error) {
+ emptyTaskFiles := TaskFiles{
+ FileCount: 0,
+ GroupedFiles: []*GroupedFiles{},
+ }
+ groupedFilesList := []*GroupedFiles{}
+ fileCount := 0
+
+ if obj.DisplayOnly {
+ execTasks, err := task.Find(task.ByIds(utility.FromStringPtrSlice(obj.ExecutionTasks)))
+ if err != nil {
+ return &emptyTaskFiles, ResourceNotFound.Send(ctx, err.Error())
+ }
+ for _, execTask := range execTasks {
+ groupedFiles, err := getGroupedFiles(ctx, execTask.DisplayName, execTask.Id, obj.Execution)
+ if err != nil {
+ return &emptyTaskFiles, err
+ }
+ fileCount += len(groupedFiles.Files)
+ groupedFilesList = append(groupedFilesList, groupedFiles)
+ }
+ } else {
+ groupedFiles, err := getGroupedFiles(ctx, *obj.DisplayName, *obj.Id, obj.Execution)
+ if err != nil {
+ return &emptyTaskFiles, err
+ }
+ fileCount += len(groupedFiles.Files)
+ groupedFilesList = append(groupedFilesList, groupedFiles)
+ }
+ taskFiles := TaskFiles{
+ FileCount: fileCount,
+ GroupedFiles: groupedFilesList,
+ }
+ return &taskFiles, nil
+}
+
+// TaskLogs is the resolver for the taskLogs field.
+func (r *taskResolver) TaskLogs(ctx context.Context, obj *restModel.APITask) (*TaskLogs, error) {
+ // need project to get default logger
+ p, err := data.FindProjectById(*obj.ProjectId, true, true)
+ if err != nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("error finding project '%s': %s", *obj.ProjectId, err.Error()))
+ }
+ if p == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("could not find project '%s'", *obj.ProjectId))
+ }
+ defaultLogger := p.DefaultLogger
+ if defaultLogger == "" {
+ defaultLogger = evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger
+ }
+
+ // Let the individual TaskLogs resolvers handle fetching logs for the task
+ // We can avoid the overhead of fetching task logs that we will not view
+ // and we can avoid handling errors that we will not see
+ return &TaskLogs{TaskID: *obj.Id, Execution: obj.Execution, DefaultLogger: defaultLogger}, nil
+}
+
+// Tests is the resolver for the tests field.
+func (r *taskResolver) Tests(ctx context.Context, obj *restModel.APITask, opts *TestFilterOptions) (*TaskTestResult, error) {
+ dbTask, err := obj.ToService()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
+ }
+
+ filterOpts, err := convertTestFilterOptions(ctx, dbTask, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ taskResults, err := dbTask.GetTestResults(ctx, evergreen.GetEnvironment(), filterOpts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting test results for APITask %s: %s", dbTask.Id, err.Error()))
+ }
+
+ apiResults := make([]*restModel.APITest, len(taskResults.Results))
+ for i, t := range taskResults.Results {
+ apiTest := &restModel.APITest{}
+ if err = apiTest.BuildFromService(t.TaskID); err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+ if err = apiTest.BuildFromService(&t); err != nil {
+ return nil, InternalServerError.Send(ctx, err.Error())
+ }
+
+ apiResults[i] = apiTest
+ }
+
+ return &TaskTestResult{
+ TestResults: apiResults,
+ TotalTestCount: taskResults.Stats.TotalCount,
+ FilteredTestCount: utility.FromIntPtr(taskResults.Stats.FilteredCount),
+ }, nil
+}
+
+// TotalTestCount is the resolver for the totalTestCount field.
+func (r *taskResolver) TotalTestCount(ctx context.Context, obj *restModel.APITask) (int, error) {
+ dbTask, err := obj.ToService()
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error getting service model for APITask %s: %s", *obj.Id, err.Error()))
+ }
+
+ stats, err := dbTask.GetTestResultsStats(ctx, evergreen.GetEnvironment())
+ if err != nil {
+ return 0, InternalServerError.Send(ctx, fmt.Sprintf("Error getting test count: %s", err))
+ }
+
+ return stats.TotalCount, nil
+}
+
+// VersionMetadata is the resolver for the versionMetadata field.
+func (r *taskResolver) VersionMetadata(ctx context.Context, obj *restModel.APITask) (*restModel.APIVersion, error) {
+ v, err := model.VersionFindOneId(utility.FromStringPtr(obj.Version))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Unable to find version id: %s for task: %s", *obj.Version, utility.FromStringPtr(obj.Id)))
+ }
+ if v == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: `%s`", *obj.Version))
+ }
+ apiVersion := &restModel.APIVersion{}
+ apiVersion.BuildFromService(*v)
+ return apiVersion, nil
+}
+
+// Task returns TaskResolver implementation.
+func (r *Resolver) Task() TaskResolver { return &taskResolver{r} }
+
+type taskResolver struct{ *Resolver }
diff --git a/graphql/testdata/task-files-query-display.graphql b/graphql/testdata/task-files-query-display.graphql
index c32c23641d6..a707bd557f8 100644
--- a/graphql/testdata/task-files-query-display.graphql
+++ b/graphql/testdata/task-files-query-display.graphql
@@ -1,12 +1,14 @@
query {
- taskFiles(taskId: "wuzzup-activated") {
- fileCount
- groupedFiles {
- taskName
- files {
- name
- link
- visibility
+ task(taskId: "wuzzup-activated") {
+ taskFiles {
+ fileCount
+ groupedFiles {
+ taskName
+ files {
+ name
+ link
+ visibility
+ }
}
}
}
diff --git a/graphql/testdata/task-files-query-empty.graphql b/graphql/testdata/task-files-query-empty.graphql
index f1bab82bb52..7d938c6609d 100644
--- a/graphql/testdata/task-files-query-empty.graphql
+++ b/graphql/testdata/task-files-query-empty.graphql
@@ -1,12 +1,14 @@
query {
- taskFiles(taskId: "task-without-legit-exec-tasks") {
- fileCount
- groupedFiles {
- taskName
- files {
- name
- link
- visibility
+ task(taskId: "task-without-legit-exec-tasks") {
+ taskFiles {
+ fileCount
+ groupedFiles {
+ taskName
+ files {
+ name
+ link
+ visibility
+ }
}
}
}
diff --git a/graphql/testdata/task-files-query-err.graphql b/graphql/testdata/task-files-query-err.graphql
new file mode 100644
index 00000000000..941c2c611f6
--- /dev/null
+++ b/graphql/testdata/task-files-query-err.graphql
@@ -0,0 +1,15 @@
+query {
+ task(taskId: "task-does-not-exist") {
+ taskFiles {
+ fileCount
+ groupedFiles {
+ taskName
+ files {
+ name
+ link
+ visibility
+ }
+ }
+ }
+ }
+}
diff --git a/graphql/testdata/task-files-query-err1.graphql b/graphql/testdata/task-files-query-err1.graphql
deleted file mode 100644
index c54543fcd13..00000000000
--- a/graphql/testdata/task-files-query-err1.graphql
+++ /dev/null
@@ -1,13 +0,0 @@
-query {
- taskFiles(taskId: "NOT-A-REAL-TASKID") {
- fileCount
- groupedFiles {
- taskName
- files {
- name
- link
- visibility
- }
- }
- }
-}
diff --git a/graphql/testdata/task-files-query-err2.graphql b/graphql/testdata/task-files-query-err2.graphql
deleted file mode 100644
index 5cfbd986812..00000000000
--- a/graphql/testdata/task-files-query-err2.graphql
+++ /dev/null
@@ -1,13 +0,0 @@
-query {
- taskFiles(taskId: "task-does-not-exist") {
- fileCount
- groupedFiles {
- taskName
- files {
- name
- link
- visibility
- }
- }
- }
-}
diff --git a/graphql/testdata/task-files-query-exec.graphql b/graphql/testdata/task-files-query-exec.graphql
index 9ffc238da1f..9c452c4edf5 100644
--- a/graphql/testdata/task-files-query-exec.graphql
+++ b/graphql/testdata/task-files-query-exec.graphql
@@ -1,12 +1,14 @@
query {
- taskFiles(taskId: "exec1") {
- fileCount
- groupedFiles {
- taskName
- files {
- name
- link
- visibility
+ task(taskId: "exec1") {
+ taskFiles {
+ fileCount
+ groupedFiles {
+ taskName
+ files {
+ name
+ link
+ visibility
+ }
}
}
}
diff --git a/graphql/testdata/task_test-formats-url-with-line-num-and-log-id-when-url-empty.graphql b/graphql/testdata/task_test-formats-url-with-line-num-and-log-id-when-url-empty.graphql
index 60be7615d9a..6700a990da2 100644
--- a/graphql/testdata/task_test-formats-url-with-line-num-and-log-id-when-url-empty.graphql
+++ b/graphql/testdata/task_test-formats-url-with-line-num-and-log-id-when-url-empty.graphql
@@ -5,6 +5,7 @@
url
urlRaw
urlLobster
+ urlParsley
}
id
}
diff --git a/graphql/testdata/task_test-logs-empty-str.graphql b/graphql/testdata/task_test-logs-empty-str.graphql
index e7c6ba975d6..9ee9b1d387e 100644
--- a/graphql/testdata/task_test-logs-empty-str.graphql
+++ b/graphql/testdata/task_test-logs-empty-str.graphql
@@ -5,6 +5,7 @@
url
urlRaw
urlLobster
+ urlParsley
}
id
}
diff --git a/graphql/testdata/task_test-logs-use-original-url-when-provided.graphql b/graphql/testdata/task_test-logs-overwrite-legacy-resmoke-url.graphql
similarity index 90%
rename from graphql/testdata/task_test-logs-use-original-url-when-provided.graphql
rename to graphql/testdata/task_test-logs-overwrite-legacy-resmoke-url.graphql
index d09d2b90c74..0b94241b8c1 100644
--- a/graphql/testdata/task_test-logs-use-original-url-when-provided.graphql
+++ b/graphql/testdata/task_test-logs-overwrite-legacy-resmoke-url.graphql
@@ -5,6 +5,7 @@
url
urlRaw
urlLobster
+ urlParsley
}
id
}
diff --git a/graphql/testdata/task_test-nonexistent-task_id.graphql b/graphql/testdata/task_test-nonexistent-task_id.graphql
index a5205077b20..b1c5a1eba13 100644
--- a/graphql/testdata/task_test-nonexistent-task_id.graphql
+++ b/graphql/testdata/task_test-nonexistent-task_id.graphql
@@ -5,6 +5,7 @@
url
urlRaw
urlLobster
+ urlParsley
}
id
}
diff --git a/graphql/tests/abortInfo/data.json b/graphql/tests/abortInfo/data.json
deleted file mode 100644
index b5b383086de..00000000000
--- a/graphql/tests/abortInfo/data.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "tasks": [
- {
- "_id": "1",
- "display_name": "generate-lint",
- "status": "failed",
- "abort" : true,
- "abort_info" : {
- "user" : "apiserver",
- "task_id" : "2"
- }
- },
- {
- "_id": "2",
- "build_id": "sys_perf_linux_3",
- "display_name" : "validate_commit_message"
- },
- {
- "_id": "3",
- "display_name": "generate-lint",
- "status": "success"
- }
- ],
- "builds": [
- {
- "_id": "sys_perf_linux_3",
- "status" : "failed",
- "build_variant": "commit-queue",
- "display_name": "~ Commit Queue"
- }
- ]
-}
diff --git a/graphql/tests/abortInfo/results.json b/graphql/tests/abortInfo/results.json
deleted file mode 100644
index 6a8b76d4ecb..00000000000
--- a/graphql/tests/abortInfo/results.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "tests": [
- {
- "query_file": "abort-info.graphql",
- "result": {
- "data": {
- "task": {
- "abortInfo": {
- "user": "apiserver",
- "taskID": "2",
- "taskDisplayName": "validate_commit_message",
- "buildVariantDisplayName": "~ Commit Queue"
- }
- }
- }
- }
- },
- {
- "query_file": "no-abort-info.graphql",
- "result": {
- "data": {
- "task": {
- "abortInfo": null
- }
- }
- }
- }
- ]
-}
diff --git a/graphql/tests/annotations/results.json b/graphql/tests/annotations/results.json
deleted file mode 100644
index 172ae84c9ce..00000000000
--- a/graphql/tests/annotations/results.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "tests": [
- {
- "query_file": "moveIssueToSuspectedIssue.graphql",
- "result": {
- "data": {
- "moveAnnotationIssue": true
- }
- }
- },
- {
- "query_file": "moveSuspectedIssueToIssue.graphql",
- "result": {
- "data": {
- "moveAnnotationIssue": true
- }
- }
- },
- {
- "query_file": "addIssue.graphql",
- "result": {
- "data": {
- "addAnnotationIssue": true
- }
- }
- },
- {
- "query_file": "addSuspectedIssue.graphql",
- "result": {
- "data": {
- "addAnnotationIssue": true
- }
- }
- },
- {
- "query_file": "removeIssue.graphql",
- "result": {
- "data": {
- "removeAnnotationIssue": true
- }
- }
- },
- {
- "query_file": "removeSuspectedIssue.graphql",
- "result": {
- "data": {
- "removeAnnotationIssue": true
- }
- }
- },
- {
- "query_file": "editNote.graphql",
- "result": {
- "data": {
- "editAnnotationNote": true
- }
- }
- },
- {
- "query_file": "editNoteInvalid.graphql",
- "result": {
- "errors": [
- {
- "message": "couldn't update note: note is out of sync, please try again",
- "path": [
- "editAnnotationNote"
- ],
- "extensions": {
- "code": "INTERNAL_SERVER_ERROR"
- }
- }
- ],
- "data": null
- }
- },
- {
- "query_file": "annotations.graphql",
- "result": {
- "data": {
- "task": {
- "annotation": {
- "taskId": "evergreen_ubuntu1604_test_db_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48",
- "taskExecution": 0,
- "note": {
- "source": {
- "author": "Some Smart Bot",
- "time": "2020-11-15T21:10:14Z",
- "requester": "api"
- },
- "message": "what happened in this note the second?"
- }
- }
- }
- }
- }
- }
- ]
-}
diff --git a/graphql/tests/buildVariantsForTaskName/queries/buildVariantsForTaskName.graphql b/graphql/tests/buildVariantsForTaskName/queries/buildVariantsForTaskName.graphql
deleted file mode 100644
index 83863b810c5..00000000000
--- a/graphql/tests/buildVariantsForTaskName/queries/buildVariantsForTaskName.graphql
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- buildVariantsForTaskName(projectId:"evergreen", taskName:"test-agent"){
- displayName
- buildVariant
- }
-}
\ No newline at end of file
diff --git a/graphql/tests/hasVersion/queries/doesNotExist.graphql b/graphql/tests/hasVersion/queries/doesNotExist.graphql
deleted file mode 100644
index 85b43b1e30c..00000000000
--- a/graphql/tests/hasVersion/queries/doesNotExist.graphql
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- hasVersion(id:"notARealId")
-}
\ No newline at end of file
diff --git a/graphql/tests/host/data.json b/graphql/tests/host/data.json
index fb552855656..697cdce2556 100644
--- a/graphql/tests/host/data.json
+++ b/graphql/tests/host/data.json
@@ -10,10 +10,15 @@
"home_volume_id": "crazy_volume",
"_id": "rhel71-ppc-1.pic.build.10gen.cc",
"container_images": null,
- "creation_time": { "$date": "2018-09-19T13:32:26.568Z" },
+ "creation_time": {
+ "$date": "2018-09-19T13:32:26.568Z"
+ },
"distro": {
"_id": "rhel71-power8-large",
- "aliases": ["rhel71-power8", "rhel71-power8-build"],
+ "aliases": [
+ "rhel71-power8",
+ "rhel71-power8-build"
+ ],
"arch": "linux_ppc64le",
"work_dir": "/data/mci",
"provider": "static",
@@ -71,13 +76,25 @@
},
"planner_settings": {
"version": "tunable",
- "target_time": { "$numberLong": "0" },
+ "target_time": {
+ "$numberLong": "0"
+ },
"group_versions": false,
- "patch_zipper_factor": { "$numberLong": "0" },
- "patch_time_in_queue_factor": { "$numberLong": "0" },
- "commit_queue_factor": { "$numberLong": "0" },
- "mainline_time_in_queue_factor": { "$numberLong": "0" },
- "expected_runtime_factor": { "$numberLong": "0" }
+ "patch_zipper_factor": {
+ "$numberLong": "0"
+ },
+ "patch_time_in_queue_factor": {
+ "$numberLong": "0"
+ },
+ "commit_queue_factor": {
+ "$numberLong": "0"
+ },
+ "mainline_time_in_queue_factor": {
+ "$numberLong": "0"
+ },
+ "expected_runtime_factor": {
+ "$numberLong": "0"
+ }
},
"dispatcher_settings": {
"version": "revised-with-dependencies"
@@ -86,7 +103,9 @@
"version": "utilization",
"minimum_hosts": 0,
"maximum_hosts": 0,
- "acceptable_host_idle_time": { "$numberLong": "0" }
+ "acceptable_host_idle_time": {
+ "$numberLong": "0"
+ }
},
"disable_shallow_clone": false,
"note": "",
@@ -97,7 +116,9 @@
},
"icecream_settings": {}
},
- "expiration_time": { "$date": "0001-01-01T00:00:00Z" },
+ "expiration_time": {
+ "$date": "0001-01-01T00:00:00Z"
+ },
"has_containers": false,
"host_id": "rhel71-ppc-1.pic.build.10gen.cc",
"host_type": "static",
@@ -106,26 +127,34 @@
"project": "",
"provision_options": null,
"provisioned": true,
- "start_time": { "$date": "0001-01-01T00:00:00Z" },
+ "start_time": {
+ "$date": "0001-01-01T00:00:00Z"
+ },
"started_by": "mci",
"status": "running",
"tag": "",
"user": "mci-exec",
"zone": "",
"agent_revision": "2020-07-18",
- "last_communication": { "$date": "2020-07-20T19:19:22.146Z" },
+ "last_communication": {
+ "$date": "2020-07-20T19:19:22.146Z"
+ },
"needs_agent": false,
"agent_deploy_attempt": 64,
"last_bv": "package_rpm_ppc",
"last_group": "",
"last_project": "mms",
"last_task": "mms_package_rpm_ppc_foliage_467b718c9ad2cc58b67198e917deb2f800713505_20_07_20_15_23_30",
- "last_task_completed_time": { "$date": "2020-07-20T19:16:17.279Z" },
+ "last_task_completed_time": {
+ "$date": "2020-07-20T19:16:17.279Z"
+ },
"last_version": "mms_467b718c9ad2cc58b67198e917deb2f800713505",
"needs_agent_monitor": false,
"jasper_credentials_id": "rhel71-ppc-1.pic.build.10gen.cc",
"jasper_deploy_attempts": 0,
- "agent_start_time": { "$date": "1970-01-01T00:00:00Z" },
+ "agent_start_time": {
+ "$date": "1970-01-01T00:00:00Z"
+ },
"jasper_restart_attempts": 0,
"running_task": "mms_package_rpm_ppc_foliage_7f9f33c48eba3790333bc4ed6ac72eba8dd9f459_20_07_20_14_37_05",
"running_task_bv": "package_rpm_ppc",
@@ -137,15 +166,21 @@
{
"_id": "ubuntu1604-ppc-1.pic.build.10gen.cc",
"container_images": null,
- "creation_time": { "$date": "2018-09-19T13:32:26.199Z" },
+ "creation_time": {
+ "$date": "2018-09-19T13:32:26.199Z"
+ },
"distro": {
"_id": "ubuntu1604-power8-large",
- "aliases": ["ubuntu1604-power8", "ubuntu1604-power8-build"],
+ "aliases": [
+ "ubuntu1604-power8",
+ "ubuntu1604-power8-build"
+ ],
"arch": "linux_ppc64le",
"work_dir": "/data/mci",
"provider": "static",
"provider_settings": [
{
+ "ami": "ami-0b69ea66ff7391e80",
"hosts": [
{
"name": "ubuntu1604-ppc-1.pic.build.10gen.cc"
@@ -189,13 +224,25 @@
},
"planner_settings": {
"version": "tunable",
- "target_time": { "$numberLong": "0" },
+ "target_time": {
+ "$numberLong": "0"
+ },
"group_versions": false,
- "patch_zipper_factor": { "$numberLong": "0" },
- "patch_time_in_queue_factor": { "$numberLong": "0" },
- "commit_queue_factor": { "$numberLong": "0" },
- "mainline_time_in_queue_factor": { "$numberLong": "0" },
- "expected_runtime_factor": { "$numberLong": "0" }
+ "patch_zipper_factor": {
+ "$numberLong": "0"
+ },
+ "patch_time_in_queue_factor": {
+ "$numberLong": "0"
+ },
+ "commit_queue_factor": {
+ "$numberLong": "0"
+ },
+ "mainline_time_in_queue_factor": {
+ "$numberLong": "0"
+ },
+ "expected_runtime_factor": {
+ "$numberLong": "0"
+ }
},
"dispatcher_settings": {
"version": "revised-with-dependencies"
@@ -204,7 +251,9 @@
"version": "utilization",
"minimum_hosts": 0,
"maximum_hosts": 0,
- "acceptable_host_idle_time": { "$numberLong": "0" }
+ "acceptable_host_idle_time": {
+ "$numberLong": "0"
+ }
},
"disable_shallow_clone": false,
"note": "",
@@ -215,7 +264,9 @@
},
"icecream_settings": {}
},
- "expiration_time": { "$date": "0001-01-01T00:00:00Z" },
+ "expiration_time": {
+ "$date": "0001-01-01T00:00:00Z"
+ },
"has_containers": false,
"host_id": "ubuntu1604-ppc-1.pic.build.10gen.cc",
"host_type": "static",
@@ -224,17 +275,23 @@
"project": "",
"provision_options": null,
"provisioned": true,
- "start_time": { "$date": "0001-01-01T00:00:00Z" },
+ "start_time": {
+ "$date": "0001-01-01T00:00:00Z"
+ },
"started_by": "mci",
"status": "running",
"tag": "",
"user": "mci-exec",
"zone": "",
"agent_revision": "2020-07-18",
- "last_communication": { "$date": "2020-07-20T19:19:29.576Z" },
+ "last_communication": {
+ "$date": "2020-07-20T19:19:29.576Z"
+ },
"needs_agent": false,
"agent_deploy_attempt": 91,
- "last_task_completed_time": { "$date": "2020-07-18T18:07:09.575Z" },
+ "last_task_completed_time": {
+ "$date": "2020-07-18T18:07:09.575Z"
+ },
"last_bv": "power8-ubuntu1604",
"last_group": "",
"last_project": "cxx-driver",
@@ -243,26 +300,46 @@
"needs_agent_monitor": false,
"jasper_credentials_id": "",
"jasper_deploy_attempts": 0,
- "agent_start_time": { "$date": "2019-08-15T12:58:20.426Z" },
+ "agent_start_time": {
+ "$date": "2019-08-15T12:58:20.426Z"
+ },
"jasper_restart_attempts": 0
}
],
"tasks": [
{
"_id": "mms_package_rpm_ppc_foliage_7f9f33c48eba3790333bc4ed6ac72eba8dd9f459_20_07_20_14_37_05",
- "create_time": { "$date": "2020-07-20T14:37:05Z" },
- "injest_time": { "$date": "2020-07-20T15:02:06.764Z" },
- "dispatch_time": { "$date": "2020-07-20T19:16:18.038Z" },
- "scheduled_time": { "$date": "2020-07-20T15:14:02.601Z" },
- "start_time": { "$date": "2020-07-20T19:16:22.151Z" },
- "finish_time": { "$date": "2020-07-20T19:23:52.419Z" },
- "activated_time": { "$date": "2020-07-20T15:02:06.764Z" },
+ "create_time": {
+ "$date": "2020-07-20T14:37:05Z"
+ },
+ "injest_time": {
+ "$date": "2020-07-20T15:02:06.764Z"
+ },
+ "dispatch_time": {
+ "$date": "2020-07-20T19:16:18.038Z"
+ },
+ "scheduled_time": {
+ "$date": "2020-07-20T15:14:02.601Z"
+ },
+ "start_time": {
+ "$date": "2020-07-20T19:16:22.151Z"
+ },
+ "finish_time": {
+ "$date": "2020-07-20T19:23:52.419Z"
+ },
+ "activated_time": {
+ "$date": "2020-07-20T15:02:06.764Z"
+ },
"version": "mms_7f9f33c48eba3790333bc4ed6ac72eba8dd9f459",
"branch": "mms",
"gitspec": "7f9f33c48eba3790333bc4ed6ac72eba8dd9f459",
- "priority": { "$numberLong": "0" },
+ "priority": {
+ "$numberLong": "0"
+ },
"task_group": "",
- "last_heartbeat": { "$date": "2020-07-20T19:23:52.149Z" },
+ "last_heartbeat": {
+ "$date": "2020-07-20T19:23:52.149Z"
+ },
"activated": true,
"activated_by": "",
"deactivated_for_dependency": false,
@@ -283,17 +360,31 @@
"order": 21366,
"r": "gitter_request",
"status": "success",
- "time_taken": { "$numberLong": "450268993353" },
+ "time_taken": {
+ "$numberLong": "450268993353"
+ },
"generated_by": "mms_evg_foliage_stat_check_init_7f9f33c48eba3790333bc4ed6ac72eba8dd9f459_20_07_20_14_37_05",
"can_sync": false,
"duration_prediction": {
- "value": { "$numberLong": "501281607308" },
- "std_dev": { "$numberLong": "58841204385" },
- "ttl": { "$numberLong": "30485900699035" },
- "collected_at": { "$date": "2020-07-20T15:14:02.385Z" }
+ "value": {
+ "$numberLong": "501281607308"
+ },
+ "std_dev": {
+ "$numberLong": "58841204385"
+ },
+ "ttl": {
+ "$numberLong": "30485900699035"
+ },
+ "collected_at": {
+ "$date": "2020-07-20T15:14:02.385Z"
+ }
+ },
+ "expected_duration": {
+ "$numberLong": "501281607308"
+ },
+ "expected_duration_std_dev": {
+ "$numberLong": "58841204385"
},
- "expected_duration": { "$numberLong": "501281607308" },
- "expected_duration_std_dev": { "$numberLong": "58841204385" },
"agent_version": "2020-07-18",
"details": {
"status": "success",
@@ -310,4 +401,4 @@
}
}
]
-}
+}
\ No newline at end of file
diff --git a/graphql/tests/host/queries/ami.graphql b/graphql/tests/host/queries/ami.graphql
new file mode 100644
index 00000000000..3d3f0ec7b96
--- /dev/null
+++ b/graphql/tests/host/queries/ami.graphql
@@ -0,0 +1,6 @@
+{
+ host(hostId: "ubuntu1604-ppc-1.pic.build.10gen.cc") {
+ id
+ ami
+ }
+}
diff --git a/graphql/tests/host/results.json b/graphql/tests/host/results.json
index e39b1b9b051..2ea3b8e2e6c 100644
--- a/graphql/tests/host/results.json
+++ b/graphql/tests/host/results.json
@@ -1,5 +1,16 @@
{
"tests": [
+ {
+ "query_file": "ami.graphql",
+ "result": {
+ "data": {
+ "host": {
+ "id": "ubuntu1604-ppc-1.pic.build.10gen.cc",
+ "ami": "ami-0b69ea66ff7391e80"
+ }
+ }
+ }
+ },
{
"query_file": "homeVolume.graphql",
"result": {
@@ -40,7 +51,7 @@
"id": null,
"name": null
},
- "lastCommunicationTime": "2020-07-20T15:19:29-04:00"
+ "lastCommunicationTime": "2020-07-20T15:19:29.576-04:00"
}
}
}
@@ -62,10 +73,10 @@
"id": "mms_package_rpm_ppc_foliage_7f9f33c48eba3790333bc4ed6ac72eba8dd9f459_20_07_20_14_37_05",
"name": "foliage"
},
- "lastCommunicationTime": "2020-07-20T15:19:22-04:00"
+ "lastCommunicationTime": "2020-07-20T15:19:22.146-04:00"
}
}
}
}
]
-}
+}
\ No newline at end of file
diff --git a/graphql/tests/mainlineCommits/queries/commit-taskStatusCounts-filter.graphql b/graphql/tests/mainlineCommits/queries/commit-taskStatusCounts-filter.graphql
deleted file mode 100644
index 3645dda2235..00000000000
--- a/graphql/tests/mainlineCommits/queries/commit-taskStatusCounts-filter.graphql
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- mainlineCommits(options: { projectID: "evergreen" }) {
- versions {
- version {
- id
- taskStatusCounts(
- options: {
- statuses: ["success"]
- tasks: ["Some Other Task"]
- variants: ["enterprise-ubuntu1604-64"]
- }
- ) {
- status
- count
- }
- }
- rolledUpVersions {
- id
- }
- }
- }
-}
diff --git a/graphql/tests/mainlineCommits/queries/commit-taskStatusCounts.graphql b/graphql/tests/mainlineCommits/queries/commit-taskStatusCounts.graphql
deleted file mode 100644
index 58cd5ab545c..00000000000
--- a/graphql/tests/mainlineCommits/queries/commit-taskStatusCounts.graphql
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- mainlineCommits(options: { projectID: "evergreen" }) {
- versions {
- version {
- id
- taskStatusCounts(options: {}) {
- status
- count
- }
- }
- rolledUpVersions {
- id
- taskStatusCounts(options: {}) {
- status
- count
- }
- }
- }
- }
-}
diff --git a/graphql/tests/abortTask/data.json b/graphql/tests/mutation/abortTask/data.json
similarity index 83%
rename from graphql/tests/abortTask/data.json
rename to graphql/tests/mutation/abortTask/data.json
index 62ec669bfa2..9d4a52042fa 100644
--- a/graphql/tests/abortTask/data.json
+++ b/graphql/tests/mutation/abortTask/data.json
@@ -8,7 +8,8 @@
"build_id": "b1",
"r": "merge_test",
"commit_queue_merge": true,
- "version": "123456789012345678901234"
+ "version": "123456789012345678901234",
+ "project": "p1"
}
],
"builds": [
@@ -29,7 +30,9 @@
{
"_id": {
"$oid": "123456789012345678901234"
- }
+ },
+ "version": "123456789012345678901234",
+ "branch": "p1"
}
],
"project_ref": [
@@ -49,6 +52,7 @@
{
"version": "123456789012345678901234",
"issue": "123456789012345678901234",
+ "patch_id": "123456789012345678901234",
"source": "diff"
}
]
diff --git a/graphql/tests/abortTask/queries/commit-queue-dequeue.graphql b/graphql/tests/mutation/abortTask/queries/commit_queue_dequeue.graphql
similarity index 100%
rename from graphql/tests/abortTask/queries/commit-queue-dequeue.graphql
rename to graphql/tests/mutation/abortTask/queries/commit_queue_dequeue.graphql
diff --git a/graphql/tests/abortTask/results.json b/graphql/tests/mutation/abortTask/results.json
similarity index 77%
rename from graphql/tests/abortTask/results.json
rename to graphql/tests/mutation/abortTask/results.json
index be0b0981843..1b73426dd6d 100644
--- a/graphql/tests/abortTask/results.json
+++ b/graphql/tests/mutation/abortTask/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "commit-queue-dequeue.graphql",
+ "query_file": "commit_queue_dequeue.graphql",
"result": {
"data": {
"abortTask": {
diff --git a/graphql/tests/createPublicKey/data.json b/graphql/tests/mutation/addAnnotationIssue/data.json
similarity index 100%
rename from graphql/tests/createPublicKey/data.json
rename to graphql/tests/mutation/addAnnotationIssue/data.json
diff --git a/graphql/tests/annotations/queries/addIssue.graphql b/graphql/tests/mutation/addAnnotationIssue/queries/add_issue.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/addIssue.graphql
rename to graphql/tests/mutation/addAnnotationIssue/queries/add_issue.graphql
diff --git a/graphql/tests/annotations/queries/addSuspectedIssue.graphql b/graphql/tests/mutation/addAnnotationIssue/queries/add_suspected_issue.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/addSuspectedIssue.graphql
rename to graphql/tests/mutation/addAnnotationIssue/queries/add_suspected_issue.graphql
diff --git a/graphql/tests/mutation/addAnnotationIssue/results.json b/graphql/tests/mutation/addAnnotationIssue/results.json
new file mode 100644
index 00000000000..2db25d99451
--- /dev/null
+++ b/graphql/tests/mutation/addAnnotationIssue/results.json
@@ -0,0 +1,20 @@
+{
+ "tests": [
+ {
+ "query_file": "add_issue.graphql",
+ "result": {
+ "data": {
+ "addAnnotationIssue": true
+ }
+ }
+ },
+ {
+ "query_file": "add_suspected_issue.graphql",
+ "result": {
+ "data": {
+ "addAnnotationIssue": true
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/attachProjectToNewRepo/data.json b/graphql/tests/mutation/attachProjectToNewRepo/data.json
similarity index 100%
rename from graphql/tests/attachProjectToNewRepo/data.json
rename to graphql/tests/mutation/attachProjectToNewRepo/data.json
diff --git a/graphql/tests/attachProjectToNewRepo/queries/attachProjectToNewRepo.graphql b/graphql/tests/mutation/attachProjectToNewRepo/queries/attach_project_to_new_repo.graphql
similarity index 100%
rename from graphql/tests/attachProjectToNewRepo/queries/attachProjectToNewRepo.graphql
rename to graphql/tests/mutation/attachProjectToNewRepo/queries/attach_project_to_new_repo.graphql
diff --git a/graphql/tests/attachProjectToNewRepo/results.json b/graphql/tests/mutation/attachProjectToNewRepo/results.json
similarity index 82%
rename from graphql/tests/attachProjectToNewRepo/results.json
rename to graphql/tests/mutation/attachProjectToNewRepo/results.json
index ece097d7a17..2c7d82644b5 100644
--- a/graphql/tests/attachProjectToNewRepo/results.json
+++ b/graphql/tests/mutation/attachProjectToNewRepo/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "attachProjectToNewRepo.graphql",
+ "query_file": "attach_project_to_new_repo.graphql",
"result": {
"data": {
"attachProjectToNewRepo": {
diff --git a/graphql/tests/attachProjectToRepo/data.json b/graphql/tests/mutation/attachProjectToRepo/data.json
similarity index 100%
rename from graphql/tests/attachProjectToRepo/data.json
rename to graphql/tests/mutation/attachProjectToRepo/data.json
diff --git a/graphql/tests/attachProjectToRepo/queries/attachProjectToRepo.graphql b/graphql/tests/mutation/attachProjectToRepo/queries/attach_project_to_repo.graphql
similarity index 100%
rename from graphql/tests/attachProjectToRepo/queries/attachProjectToRepo.graphql
rename to graphql/tests/mutation/attachProjectToRepo/queries/attach_project_to_repo.graphql
diff --git a/graphql/tests/attachProjectToRepo/queries/badProject.graphql b/graphql/tests/mutation/attachProjectToRepo/queries/bad_project.graphql
similarity index 100%
rename from graphql/tests/attachProjectToRepo/queries/badProject.graphql
rename to graphql/tests/mutation/attachProjectToRepo/queries/bad_project.graphql
diff --git a/graphql/tests/attachProjectToRepo/results.json b/graphql/tests/mutation/attachProjectToRepo/results.json
similarity index 85%
rename from graphql/tests/attachProjectToRepo/results.json
rename to graphql/tests/mutation/attachProjectToRepo/results.json
index 62e0de6590b..c1ee684f34c 100644
--- a/graphql/tests/attachProjectToRepo/results.json
+++ b/graphql/tests/mutation/attachProjectToRepo/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "attachProjectToRepo.graphql",
+ "query_file": "attach_project_to_repo.graphql",
"result": {
"data": {
"attachProjectToRepo": {
@@ -11,7 +11,7 @@
}
},
{
- "query_file": "badProject.graphql",
+ "query_file": "bad_project.graphql",
"result": {
"data": null,
"errors": [
diff --git a/graphql/tests/attachVolumeToHost/data.json b/graphql/tests/mutation/attachVolumeToHost/data.json
similarity index 100%
rename from graphql/tests/attachVolumeToHost/data.json
rename to graphql/tests/mutation/attachVolumeToHost/data.json
diff --git a/graphql/tests/attachVolumeToHost/queries/differentAvailabilityZones.graphql b/graphql/tests/mutation/attachVolumeToHost/queries/different_availability_zones.graphql
similarity index 100%
rename from graphql/tests/attachVolumeToHost/queries/differentAvailabilityZones.graphql
rename to graphql/tests/mutation/attachVolumeToHost/queries/different_availability_zones.graphql
diff --git a/graphql/tests/attachVolumeToHost/queries/emptyHost.graphql b/graphql/tests/mutation/attachVolumeToHost/queries/empty_host.graphql
similarity index 100%
rename from graphql/tests/attachVolumeToHost/queries/emptyHost.graphql
rename to graphql/tests/mutation/attachVolumeToHost/queries/empty_host.graphql
diff --git a/graphql/tests/attachVolumeToHost/queries/emptyVolume.graphql b/graphql/tests/mutation/attachVolumeToHost/queries/empty_volume.graphql
similarity index 100%
rename from graphql/tests/attachVolumeToHost/queries/emptyVolume.graphql
rename to graphql/tests/mutation/attachVolumeToHost/queries/empty_volume.graphql
diff --git a/graphql/tests/attachVolumeToHost/queries/nonexistentHost.graphql b/graphql/tests/mutation/attachVolumeToHost/queries/nonexistent_host.graphql
similarity index 100%
rename from graphql/tests/attachVolumeToHost/queries/nonexistentHost.graphql
rename to graphql/tests/mutation/attachVolumeToHost/queries/nonexistent_host.graphql
diff --git a/graphql/tests/attachVolumeToHost/queries/nonexistentVolume.graphql b/graphql/tests/mutation/attachVolumeToHost/queries/nonexistent_volume.graphql
similarity index 100%
rename from graphql/tests/attachVolumeToHost/queries/nonexistentVolume.graphql
rename to graphql/tests/mutation/attachVolumeToHost/queries/nonexistent_volume.graphql
diff --git a/graphql/tests/attachVolumeToHost/queries/success.graphql b/graphql/tests/mutation/attachVolumeToHost/queries/success.graphql
similarity index 100%
rename from graphql/tests/attachVolumeToHost/queries/success.graphql
rename to graphql/tests/mutation/attachVolumeToHost/queries/success.graphql
diff --git a/graphql/tests/attachVolumeToHost/results.json b/graphql/tests/mutation/attachVolumeToHost/results.json
similarity index 74%
rename from graphql/tests/attachVolumeToHost/results.json
rename to graphql/tests/mutation/attachVolumeToHost/results.json
index 157e5942b35..a585605a9ef 100644
--- a/graphql/tests/attachVolumeToHost/results.json
+++ b/graphql/tests/mutation/attachVolumeToHost/results.json
@@ -5,7 +5,7 @@
"result": { "data": { "attachVolumeToHost": true } }
},
{
- "query_file": "differentAvailabilityZones.graphql",
+ "query_file": "different_availability_zones.graphql",
"result": {
"errors": [
{
@@ -18,11 +18,11 @@
}
},
{
- "query_file": "emptyHost.graphql",
+ "query_file": "empty_host.graphql",
"result": {
"errors": [
{
- "message": "must specify host id",
+ "message": "must specify host ID",
"path": ["attachVolumeToHost"],
"extensions": { "code": "INPUT_VALIDATION_ERROR" }
}
@@ -31,11 +31,11 @@
}
},
{
- "query_file": "emptyVolume.graphql",
+ "query_file": "empty_volume.graphql",
"result": {
"errors": [
{
- "message": "must specify volume id",
+ "message": "must specify volume ID",
"path": ["attachVolumeToHost"],
"extensions": { "code": "INPUT_VALIDATION_ERROR" }
}
@@ -44,11 +44,11 @@
}
},
{
- "query_file": "nonexistentHost.graphql",
+ "query_file": "nonexistent_host.graphql",
"result": {
"errors": [
{
- "message": "host 'i-114astast943f' does not exist",
+ "message": "host 'i-114astast943f' not found",
"path": ["attachVolumeToHost"],
"extensions": { "code": "RESOURCE_NOT_FOUND" }
}
@@ -57,11 +57,11 @@
}
},
{
- "query_file": "nonexistentVolume.graphql",
+ "query_file": "nonexistent_volume.graphql",
"result": {
"errors": [
{
- "message": "volume 'vol-4db5' does not exist",
+ "message": "volume 'vol-4db5' not found",
"path": ["attachVolumeToHost"],
"extensions": { "code": "RESOURCE_NOT_FOUND" }
}
diff --git a/graphql/tests/clearMySubscriptions/data.json b/graphql/tests/mutation/clearMySubscriptions/data.json
similarity index 100%
rename from graphql/tests/clearMySubscriptions/data.json
rename to graphql/tests/mutation/clearMySubscriptions/data.json
diff --git a/graphql/tests/clearMySubscriptions/queries/success.graphql b/graphql/tests/mutation/clearMySubscriptions/queries/success.graphql
similarity index 100%
rename from graphql/tests/clearMySubscriptions/queries/success.graphql
rename to graphql/tests/mutation/clearMySubscriptions/queries/success.graphql
diff --git a/graphql/tests/clearMySubscriptions/results.json b/graphql/tests/mutation/clearMySubscriptions/results.json
similarity index 100%
rename from graphql/tests/clearMySubscriptions/results.json
rename to graphql/tests/mutation/clearMySubscriptions/results.json
diff --git a/graphql/tests/mutation/copyProject/data.json b/graphql/tests/mutation/copyProject/data.json
new file mode 100644
index 00000000000..eff2659a3a3
--- /dev/null
+++ b/graphql/tests/mutation/copyProject/data.json
@@ -0,0 +1,16 @@
+{
+ "project_ref": [
+ {
+ "_id": "evergreen",
+ "identifier": "evergreen",
+ "owner_name": "evergreen-ci",
+ "repo_name": "evergreen",
+ "enabled": true,
+ "repoRefId": "something"
+ },
+ {
+ "_id": "logkeeper",
+ "identifier": "keeperOfLogs"
+ }
+ ]
+}
diff --git a/graphql/tests/project/queries/copy-project.graphql b/graphql/tests/mutation/copyProject/queries/copy_project.graphql
similarity index 100%
rename from graphql/tests/project/queries/copy-project.graphql
rename to graphql/tests/mutation/copyProject/queries/copy_project.graphql
diff --git a/graphql/tests/project/queries/copy-project-dup-id.graphql b/graphql/tests/mutation/copyProject/queries/copy_project_dup_id.graphql
similarity index 100%
rename from graphql/tests/project/queries/copy-project-dup-id.graphql
rename to graphql/tests/mutation/copyProject/queries/copy_project_dup_id.graphql
diff --git a/graphql/tests/project/queries/copy-project-dup-identifier.graphql b/graphql/tests/mutation/copyProject/queries/copy_project_dup_identifier.graphql
similarity index 100%
rename from graphql/tests/project/queries/copy-project-dup-identifier.graphql
rename to graphql/tests/mutation/copyProject/queries/copy_project_dup_identifier.graphql
diff --git a/graphql/tests/mutation/copyProject/results.json b/graphql/tests/mutation/copyProject/results.json
new file mode 100644
index 00000000000..9fff5f4a582
--- /dev/null
+++ b/graphql/tests/mutation/copyProject/results.json
@@ -0,0 +1,51 @@
+{
+ "tests": [
+ {
+ "query_file": "copy_project.graphql",
+ "result": {
+ "data": {
+ "copyProject": {
+ "id": "newAndImproved",
+ "identifier": "spruce",
+ "owner": "evergreen-ci",
+ "enabled": false
+ }
+ }
+ }
+ },
+ {
+ "query_file": "copy_project_dup_identifier.graphql",
+ "result": {
+ "data": null,
+ "errors": [
+ {
+ "message": "cannot use existing project name 'logkeeper'",
+ "path": [
+ "copyProject"
+ ],
+ "extensions": {
+ "code": "INPUT_VALIDATION_ERROR"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "query_file": "copy_project_dup_id.graphql",
+ "result": {
+ "data": null,
+ "errors": [
+ {
+ "message": "cannot use existing project name 'keeperOfLogs'",
+ "path": [
+ "copyProject"
+ ],
+ "extensions": {
+ "code": "INPUT_VALIDATION_ERROR"
+ }
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/createProject/data.json b/graphql/tests/mutation/createProject/data.json
new file mode 100644
index 00000000000..185a23e840d
--- /dev/null
+++ b/graphql/tests/mutation/createProject/data.json
@@ -0,0 +1,23 @@
+{
+ "repo_ref": [
+ {
+ "_id": "animals",
+ "identifier": "animals",
+ "display_name": "animals_display"
+ }
+ ],
+ "project_ref": [
+ {
+ "_id": "evergreen",
+ "identifier": "evergreen",
+ "owner_name": "evergreen-ci",
+ "repo_name": "evergreen",
+ "enabled": true,
+ "repoRefId": "something"
+ },
+ {
+ "_id": "logkeeper",
+ "identifier": "keeperOfLogs"
+ }
+ ]
+}
diff --git a/graphql/tests/project/queries/create-project.graphql b/graphql/tests/mutation/createProject/queries/create_project.graphql
similarity index 100%
rename from graphql/tests/project/queries/create-project.graphql
rename to graphql/tests/mutation/createProject/queries/create_project.graphql
diff --git a/graphql/tests/project/queries/create-project_2.graphql b/graphql/tests/mutation/createProject/queries/create_project_2.graphql
similarity index 100%
rename from graphql/tests/project/queries/create-project_2.graphql
rename to graphql/tests/mutation/createProject/queries/create_project_2.graphql
diff --git a/graphql/tests/mutation/createProject/results.json b/graphql/tests/mutation/createProject/results.json
new file mode 100644
index 00000000000..d521944b680
--- /dev/null
+++ b/graphql/tests/mutation/createProject/results.json
@@ -0,0 +1,28 @@
+{
+ "tests": [
+ {
+ "query_file": "create_project.graphql",
+ "result": {
+ "data": {
+ "createProject": {
+ "id": "grumpyCat",
+ "identifier": "catVideos",
+ "repo": "catGenerator"
+ }
+ }
+ }
+ },
+ {
+ "query_file": "create_project_2.graphql",
+ "result": {
+ "data": {
+ "createProject": {
+ "id": "happyAbyssinian",
+ "identifier": "abyssinianVideos",
+ "repo": "catGenerator"
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/myPublicKeys/data.json b/graphql/tests/mutation/createPublicKey/data.json
similarity index 100%
rename from graphql/tests/myPublicKeys/data.json
rename to graphql/tests/mutation/createPublicKey/data.json
diff --git a/graphql/tests/createPublicKey/queries/invalid-key-err.graphql b/graphql/tests/mutation/createPublicKey/queries/invalid_key_err.graphql
similarity index 100%
rename from graphql/tests/createPublicKey/queries/invalid-key-err.graphql
rename to graphql/tests/mutation/createPublicKey/queries/invalid_key_err.graphql
diff --git a/graphql/tests/createPublicKey/queries/name-collision-err.graphql b/graphql/tests/mutation/createPublicKey/queries/name_collision_err.graphql
similarity index 100%
rename from graphql/tests/createPublicKey/queries/name-collision-err.graphql
rename to graphql/tests/mutation/createPublicKey/queries/name_collision_err.graphql
diff --git a/graphql/tests/createPublicKey/queries/success.graphql b/graphql/tests/mutation/createPublicKey/queries/success.graphql
similarity index 100%
rename from graphql/tests/createPublicKey/queries/success.graphql
rename to graphql/tests/mutation/createPublicKey/queries/success.graphql
diff --git a/graphql/tests/createPublicKey/results.json b/graphql/tests/mutation/createPublicKey/results.json
similarity index 93%
rename from graphql/tests/createPublicKey/results.json
rename to graphql/tests/mutation/createPublicKey/results.json
index 5bc59858a24..223b567b940 100644
--- a/graphql/tests/createPublicKey/results.json
+++ b/graphql/tests/mutation/createPublicKey/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "name-collision-err.graphql",
+ "query_file": "name_collision_err.graphql",
"result": {
"errors": [
{
@@ -14,7 +14,7 @@
}
},
{
- "query_file": "invalid-key-err.graphql",
+ "query_file": "invalid_key_err.graphql",
"result": {
"errors": [
{
diff --git a/graphql/tests/mutation/deactivateStepbackTask/data.json b/graphql/tests/mutation/deactivateStepbackTask/data.json
new file mode 100644
index 00000000000..ca84ed56dae
--- /dev/null
+++ b/graphql/tests/mutation/deactivateStepbackTask/data.json
@@ -0,0 +1,47 @@
+{
+ "tasks": [
+ {
+ "_id": "task_sandbox",
+ "activated": true,
+ "activated_by": "stepback",
+ "branch": "sandbox_project_id",
+ "build_variant": "ubuntu1604",
+ "display_name": "js-test",
+ "r": "gitter_request",
+ "status": "started",
+ "version": "1234567890123456789"
+ },
+ {
+ "_id": "task_evergreen",
+ "activated": true,
+ "activated_by": "stepback",
+ "branch": "evergreen_id",
+ "build_variant": "ubuntu1604",
+ "display_name": "js-test",
+ "r": "gitter_request",
+ "status": "started",
+ "version": "1234567890123456789"
+ }
+ ],
+ "project_ref": [
+ {
+ "_id" : "sandbox_project_id",
+ "identifier" : "sandbox",
+ "display_name" : "Sandbox",
+ "enabled" : null,
+ "owner_name" : "evergreen-ci",
+ "repo_name" : "commit-queue-sandbox",
+ "branch_name" : "main",
+ "admins": ["me"]
+ },
+ {
+ "_id" : "evergreen_id",
+ "identifier" : "evergreen",
+ "display_name" : "evergreem",
+ "enabled" : null,
+ "owner_name" : "evergreen-ci",
+ "repo_name" : "evergreen",
+ "branch_name" : "main"
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/deactivateStepbackTask/queries/no_admin.graphql b/graphql/tests/mutation/deactivateStepbackTask/queries/no_admin.graphql
new file mode 100644
index 00000000000..cf994e7e289
--- /dev/null
+++ b/graphql/tests/mutation/deactivateStepbackTask/queries/no_admin.graphql
@@ -0,0 +1,7 @@
+mutation {
+ deactivateStepbackTask(
+ projectId: "evergreen_id",
+ buildVariantName: "ubuntu1604",
+ taskName: "js-test"
+ )
+}
diff --git a/graphql/tests/mutation/deactivateStepbackTask/queries/not_found.graphql b/graphql/tests/mutation/deactivateStepbackTask/queries/not_found.graphql
new file mode 100644
index 00000000000..c2b425b47bb
--- /dev/null
+++ b/graphql/tests/mutation/deactivateStepbackTask/queries/not_found.graphql
@@ -0,0 +1,7 @@
+mutation {
+ deactivateStepbackTask(
+ projectId: "sandbox_project_id",
+ buildVariantName: "ubuntu1604",
+ taskName: "does-not-exist"
+ )
+}
diff --git a/graphql/tests/mutation/deactivateStepbackTask/queries/success.graphql b/graphql/tests/mutation/deactivateStepbackTask/queries/success.graphql
new file mode 100644
index 00000000000..4719f12c49c
--- /dev/null
+++ b/graphql/tests/mutation/deactivateStepbackTask/queries/success.graphql
@@ -0,0 +1,7 @@
+mutation {
+ deactivateStepbackTask(
+ projectId: "sandbox_project_id",
+ buildVariantName: "ubuntu1604",
+ taskName: "js-test"
+ )
+}
diff --git a/graphql/tests/mutation/deactivateStepbackTask/results.json b/graphql/tests/mutation/deactivateStepbackTask/results.json
new file mode 100644
index 00000000000..cf3fcb8625b
--- /dev/null
+++ b/graphql/tests/mutation/deactivateStepbackTask/results.json
@@ -0,0 +1,43 @@
+{
+ "tests": [
+ {
+ "query_file": "no_admin.graphql",
+ "result": {
+ "data": null,
+ "errors": [
+ {
+ "message": "user testuser does not have permission to access settings for the project evergreen_id",
+ "path": [
+ "deactivateStepbackTask",
+ "taskName"
+ ],
+ "extensions": {
+ "code": "FORBIDDEN"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "query_file": "not_found.graphql",
+ "result": {
+ "data": null,
+ "errors": [
+ {
+ "message": "no stepback task 'does-not-exist' for variant 'ubuntu1604' found",
+ "path": [
+ "deactivateStepbackTask"
+ ],
+ "extensions": {
+ "code": "INTERNAL_SERVER_ERROR"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "query_file": "success.graphql",
+ "result": { "data": { "deactivateStepbackTask": true } }
+ }
+ ]
+}
diff --git a/graphql/tests/defaultSectionToRepo/data.json b/graphql/tests/mutation/defaultSectionToRepo/data.json
similarity index 100%
rename from graphql/tests/defaultSectionToRepo/data.json
rename to graphql/tests/mutation/defaultSectionToRepo/data.json
diff --git a/graphql/tests/defaultSectionToRepo/queries/defaultSectionToRepo.graphql b/graphql/tests/mutation/defaultSectionToRepo/queries/default_section_to_repo.graphql
similarity index 100%
rename from graphql/tests/defaultSectionToRepo/queries/defaultSectionToRepo.graphql
rename to graphql/tests/mutation/defaultSectionToRepo/queries/default_section_to_repo.graphql
diff --git a/graphql/tests/defaultSectionToRepo/queries/noAdmin.graphql b/graphql/tests/mutation/defaultSectionToRepo/queries/no_admin.graphql
similarity index 100%
rename from graphql/tests/defaultSectionToRepo/queries/noAdmin.graphql
rename to graphql/tests/mutation/defaultSectionToRepo/queries/no_admin.graphql
diff --git a/graphql/tests/defaultSectionToRepo/queries/unattachedProject.graphql b/graphql/tests/mutation/defaultSectionToRepo/queries/unattached_project.graphql
similarity index 100%
rename from graphql/tests/defaultSectionToRepo/queries/unattachedProject.graphql
rename to graphql/tests/mutation/defaultSectionToRepo/queries/unattached_project.graphql
diff --git a/graphql/tests/defaultSectionToRepo/results.json b/graphql/tests/mutation/defaultSectionToRepo/results.json
similarity index 87%
rename from graphql/tests/defaultSectionToRepo/results.json
rename to graphql/tests/mutation/defaultSectionToRepo/results.json
index 97feedd0f32..d43aba8ee71 100644
--- a/graphql/tests/defaultSectionToRepo/results.json
+++ b/graphql/tests/mutation/defaultSectionToRepo/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "defaultSectionToRepo.graphql",
+ "query_file": "default_section_to_repo.graphql",
"result": {
"data": {
"defaultSectionToRepo": "sandbox_project_id"
@@ -9,7 +9,7 @@
}
},
{
- "query_file": "unattachedProject.graphql",
+ "query_file": "unattached_project.graphql",
"result": {
"data": {
"defaultSectionToRepo": null
@@ -28,7 +28,7 @@
}
},
{
- "query_file": "noAdmin.graphql",
+ "query_file": "no_admin.graphql",
"result": {
"data": {
"defaultSectionToRepo": null
diff --git a/graphql/tests/detachProjectFromRepo/data.json b/graphql/tests/mutation/detachProjectFromRepo/data.json
similarity index 100%
rename from graphql/tests/detachProjectFromRepo/data.json
rename to graphql/tests/mutation/detachProjectFromRepo/data.json
diff --git a/graphql/tests/detachProjectFromRepo/queries/badProject.graphql b/graphql/tests/mutation/detachProjectFromRepo/queries/bad_project.graphql
similarity index 100%
rename from graphql/tests/detachProjectFromRepo/queries/badProject.graphql
rename to graphql/tests/mutation/detachProjectFromRepo/queries/bad_project.graphql
diff --git a/graphql/tests/detachProjectFromRepo/queries/detachProjectFromRepo.graphql b/graphql/tests/mutation/detachProjectFromRepo/queries/detach_project_from_repo.graphql
similarity index 100%
rename from graphql/tests/detachProjectFromRepo/queries/detachProjectFromRepo.graphql
rename to graphql/tests/mutation/detachProjectFromRepo/queries/detach_project_from_repo.graphql
diff --git a/graphql/tests/detachProjectFromRepo/results.json b/graphql/tests/mutation/detachProjectFromRepo/results.json
similarity index 85%
rename from graphql/tests/detachProjectFromRepo/results.json
rename to graphql/tests/mutation/detachProjectFromRepo/results.json
index 4d99185ca58..ffc04cd238e 100644
--- a/graphql/tests/detachProjectFromRepo/results.json
+++ b/graphql/tests/mutation/detachProjectFromRepo/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "detachProjectFromRepo.graphql",
+ "query_file": "detach_project_from_repo.graphql",
"result": {
"data": {
"detachProjectFromRepo": {
@@ -11,7 +11,7 @@
}
},
{
- "query_file": "badProject.graphql",
+ "query_file": "bad_project.graphql",
"result": {
"data": null,
"errors": [
diff --git a/graphql/tests/detachVolumeFromHost/data.json b/graphql/tests/mutation/detachVolumeFromHost/data.json
similarity index 100%
rename from graphql/tests/detachVolumeFromHost/data.json
rename to graphql/tests/mutation/detachVolumeFromHost/data.json
diff --git a/graphql/tests/detachVolumeFromHost/queries/emptyVolume.graphql b/graphql/tests/mutation/detachVolumeFromHost/queries/empty_volume.graphql
similarity index 100%
rename from graphql/tests/detachVolumeFromHost/queries/emptyVolume.graphql
rename to graphql/tests/mutation/detachVolumeFromHost/queries/empty_volume.graphql
diff --git a/graphql/tests/detachVolumeFromHost/queries/noHostAttached.graphql b/graphql/tests/mutation/detachVolumeFromHost/queries/no_host_attached.graphql
similarity index 100%
rename from graphql/tests/detachVolumeFromHost/queries/noHostAttached.graphql
rename to graphql/tests/mutation/detachVolumeFromHost/queries/no_host_attached.graphql
diff --git a/graphql/tests/detachVolumeFromHost/queries/nonexistentHost.graphql b/graphql/tests/mutation/detachVolumeFromHost/queries/nonexistent_host.graphql
similarity index 100%
rename from graphql/tests/detachVolumeFromHost/queries/nonexistentHost.graphql
rename to graphql/tests/mutation/detachVolumeFromHost/queries/nonexistent_host.graphql
diff --git a/graphql/tests/detachVolumeFromHost/queries/nonexistentVolume.graphql b/graphql/tests/mutation/detachVolumeFromHost/queries/nonexistent_volume.graphql
similarity index 100%
rename from graphql/tests/detachVolumeFromHost/queries/nonexistentVolume.graphql
rename to graphql/tests/mutation/detachVolumeFromHost/queries/nonexistent_volume.graphql
diff --git a/graphql/tests/detachVolumeFromHost/queries/success.graphql b/graphql/tests/mutation/detachVolumeFromHost/queries/success.graphql
similarity index 100%
rename from graphql/tests/detachVolumeFromHost/queries/success.graphql
rename to graphql/tests/mutation/detachVolumeFromHost/queries/success.graphql
diff --git a/graphql/tests/detachVolumeFromHost/results.json b/graphql/tests/mutation/detachVolumeFromHost/results.json
similarity index 78%
rename from graphql/tests/detachVolumeFromHost/results.json
rename to graphql/tests/mutation/detachVolumeFromHost/results.json
index a8b26565e68..0ffa67dd18c 100644
--- a/graphql/tests/detachVolumeFromHost/results.json
+++ b/graphql/tests/mutation/detachVolumeFromHost/results.json
@@ -5,11 +5,11 @@
"result": { "data": { "detachVolumeFromHost": true } }
},
{
- "query_file": "emptyVolume.graphql",
+ "query_file": "empty_volume.graphql",
"result": {
"errors": [
{
- "message": "must specify volume id",
+ "message": "must specify volume ID",
"path": ["detachVolumeFromHost"],
"extensions": { "code": "INPUT_VALIDATION_ERROR" }
}
@@ -18,7 +18,7 @@
}
},
{
- "query_file": "nonexistentVolume.graphql",
+ "query_file": "nonexistent_volume.graphql",
"result": {
"errors": [
{
@@ -31,7 +31,7 @@
}
},
{
- "query_file": "noHostAttached.graphql",
+ "query_file": "no_host_attached.graphql",
"result": {
"errors": [
{
@@ -44,11 +44,11 @@
}
},
{
- "query_file": "nonexistentHost.graphql",
+ "query_file": "nonexistent_host.graphql",
"result": {
"errors": [
{
- "message": "host 'not-real' for volume 'vol-two' doesn't exist",
+ "message": "host 'not-real' for volume 'vol-two' not found",
"path": ["detachVolumeFromHost"],
"extensions": { "code": "INTERNAL_SERVER_ERROR" }
}
diff --git a/graphql/tests/mutation/editAnnotationNote/data.json b/graphql/tests/mutation/editAnnotationNote/data.json
new file mode 100644
index 00000000000..b1ce8deb435
--- /dev/null
+++ b/graphql/tests/mutation/editAnnotationNote/data.json
@@ -0,0 +1,48 @@
+{
+ "task_annotations": [
+ {
+ "_id": {
+ "$oid": "5e4aa5abe3c3317e35201abc"
+ },
+ "task_id": "task-1234",
+ "task_execution": 0,
+ "issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-1212",
+ "source": {
+ "author": "chaya.malik"
+ }
+ }
+ ],
+ "suspected_issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-2121",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ ],
+ "note": {
+ "message": "my message",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ },
+ {
+ "_id": {
+ "$oid": "5e3aa5bbe3c3317e35206abc"
+ },
+ "task_id": "task-5678",
+ "task_execution": 0,
+ "note": {
+ "message": "my other message",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/annotations/queries/editNote.graphql b/graphql/tests/mutation/editAnnotationNote/queries/edit_note.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/editNote.graphql
rename to graphql/tests/mutation/editAnnotationNote/queries/edit_note.graphql
diff --git a/graphql/tests/annotations/queries/editNoteInvalid.graphql b/graphql/tests/mutation/editAnnotationNote/queries/edit_note_invalid.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/editNoteInvalid.graphql
rename to graphql/tests/mutation/editAnnotationNote/queries/edit_note_invalid.graphql
diff --git a/graphql/tests/mutation/editAnnotationNote/results.json b/graphql/tests/mutation/editAnnotationNote/results.json
new file mode 100644
index 00000000000..8d10345560c
--- /dev/null
+++ b/graphql/tests/mutation/editAnnotationNote/results.json
@@ -0,0 +1,29 @@
+{
+ "tests": [
+ {
+ "query_file": "edit_note.graphql",
+ "result": {
+ "data": {
+ "editAnnotationNote": true
+ }
+ }
+ },
+ {
+ "query_file": "edit_note_invalid.graphql",
+ "result": {
+ "errors": [
+ {
+ "message": "couldn't update note: note is out of sync, please try again",
+ "path": [
+ "editAnnotationNote"
+ ],
+ "extensions": {
+ "code": "INTERNAL_SERVER_ERROR"
+ }
+ }
+ ],
+ "data": null
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/editSpawnHost/data.json b/graphql/tests/mutation/editSpawnHost/data.json
new file mode 100644
index 00000000000..2b18433f739
--- /dev/null
+++ b/graphql/tests/mutation/editSpawnHost/data.json
@@ -0,0 +1,71 @@
+{
+ "hosts": [
+ {
+ "_id": "i-06f80fa6e28f93b7d",
+ "host_id": "ec2-34-207-222-84.compute-1.amazonaws.com",
+ "user": "ubuntu",
+ "tag": "evg-ubuntu1604-small-20200720144805-8687799505734220270",
+ "distro": {
+ "_id": "ubuntu1604-small",
+ "aliases": [
+ "ubuntu1604",
+ "ubuntu1604-test"
+ ],
+ "arch": "linux_amd64",
+ "work_dir": "/data/mci",
+ "provider": "ec2-fleet",
+ "user": "ubuntu"
+ },
+ "host_type": "ec2-fleet",
+ "ext_identifier": "",
+ "display_name": "",
+ "project": "",
+ "zone": "us-east-1e",
+ "provisioned": true,
+ "priv_attempts": 1,
+ "last_task": "",
+ "no_expiration": false,
+ "creation_time": {
+ "$date": "2020-07-20T14:48:05.256Z"
+ },
+ "start_time": {
+ "$date": "2020-07-20T14:48:27Z"
+ },
+ "agent_start_time": {
+ "$date": "2020-07-20T14:49:20.449Z"
+ },
+ "termination_time": {
+ "$date": "1970-01-01T00:00:00Z"
+ },
+ "task_count": 1,
+ "last_task_completed_time": {
+ "$date": "0001-01-01T00:00:00Z"
+ },
+ "last_communication": {
+ "$date": "2020-07-20T18:58:51.025Z"
+ },
+ "status": "provisioning",
+ "started_by": "mci",
+ "user_host": false,
+ "agent_revision": "2020-07-18",
+ "needs_agent": false,
+ "needs_agent_monitor": false,
+ "instance_type": "",
+ "container_build_attempt": 0,
+ "spawn_options": {},
+ "docker_options": {},
+ "running_task": "mongo_tools_ubuntu1604_qa_dump_restore_with_archiving_current_patch_b7227e1b7aeaaa6283d53b32fc03968a46b19c2d_5f15ad3c3627e07772ab2d01_20_07_20_14_42_05",
+ "running_task_bv": "ubuntu1604",
+ "running_task_group": "",
+ "running_task_group_order": 0,
+ "running_task_project": "mongo-tools",
+ "running_task_version": "5f15ad3c3627e07772ab2d01",
+ "total_idle_time": {
+ "$numberLong": "54073000000"
+ },
+ "prov_time": {
+ "$date": "2020-07-20T14:49:30.784Z"
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/editSpawnHost/queries/error_adding_key.graphql b/graphql/tests/mutation/editSpawnHost/queries/error_adding_key.graphql
new file mode 100644
index 00000000000..de3b03c92b1
--- /dev/null
+++ b/graphql/tests/mutation/editSpawnHost/queries/error_adding_key.graphql
@@ -0,0 +1,22 @@
+mutation {
+ editSpawnHost(
+ spawnHost: {
+ hostId: "i-06f80fa6e28f93b7d"
+ publicKey: {
+ key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzj+xy4D9f2oOkyQS8B6OtIP6sFtzgAQuzU6zu5+UM9DJFO6T0W1g0Rb7L/L0y5e9h6HxY7fGc/hJluLGGwWvZjNi2I11oW6ap5MW59Z+PqkwI5RhQt50cg6wN7MTu7viS603uHOX9oA/60avr+DpgbpYG2vnN4ZlEAksO6VMmyqIX7m32fHUZB5cXKIzzUAElfJ4eRr44rWyo3kcbsSEaQUHv3mtp9BvLGvJwcNcxyc+kQwsm+/+mc5gm4ABe1C+9205orwE1gWHZ671Nsl/sRUUjqfAkH5kKAa8sye3d02SKLdXe2SeStKY26leD6Fv0Bsr9ZMfllAE2nFaKNfBS johndoe@Mohameds-MacBook-Pro.local"
+ name: "mykey.pub"
+ }
+ savePublicKey: false
+ noExpiration: false
+ expiration: "2020-08-06T17:42:12Z"
+ }
+ ) {
+ hostUrl
+ id
+ expiration
+ noExpiration
+ distro {
+ id
+ }
+ }
+}
diff --git a/graphql/tests/mutation/editSpawnHost/results.json b/graphql/tests/mutation/editSpawnHost/results.json
new file mode 100644
index 00000000000..17c3b5d85ca
--- /dev/null
+++ b/graphql/tests/mutation/editSpawnHost/results.json
@@ -0,0 +1,17 @@
+{
+ "tests": [
+ {
+ "query_file": "error_adding_key.graphql",
+ "result": {
+ "errors": [
+ {
+ "message": "Host must be running to add a public key but is 'provisioning'",
+ "path": ["editSpawnHost"],
+ "extensions": { "code": "INPUT_VALIDATION_ERROR" }
+ }
+ ],
+ "data": null
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/moveAnnotationIssue/data.json b/graphql/tests/mutation/moveAnnotationIssue/data.json
new file mode 100644
index 00000000000..ff78b4d5a05
--- /dev/null
+++ b/graphql/tests/mutation/moveAnnotationIssue/data.json
@@ -0,0 +1,35 @@
+{
+ "task_annotations": [
+ {
+ "_id": {
+ "$oid": "5e4aa5abe3c3317e35201abc"
+ },
+ "task_id": "task-1234",
+ "task_execution": 0,
+ "issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-1212",
+ "source": {
+ "author": "chaya.malik"
+ }
+ }
+ ],
+ "suspected_issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-2121",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ ],
+ "note": {
+ "message": "my message",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/annotations/queries/moveIssueToSuspectedIssue.graphql b/graphql/tests/mutation/moveAnnotationIssue/queries/move_issue_to_suspected_issue.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/moveIssueToSuspectedIssue.graphql
rename to graphql/tests/mutation/moveAnnotationIssue/queries/move_issue_to_suspected_issue.graphql
diff --git a/graphql/tests/annotations/queries/moveSuspectedIssueToIssue.graphql b/graphql/tests/mutation/moveAnnotationIssue/queries/move_suspected_issue_to_issue.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/moveSuspectedIssueToIssue.graphql
rename to graphql/tests/mutation/moveAnnotationIssue/queries/move_suspected_issue_to_issue.graphql
diff --git a/graphql/tests/mutation/moveAnnotationIssue/results.json b/graphql/tests/mutation/moveAnnotationIssue/results.json
new file mode 100644
index 00000000000..e84394f1132
--- /dev/null
+++ b/graphql/tests/mutation/moveAnnotationIssue/results.json
@@ -0,0 +1,20 @@
+{
+ "tests": [
+ {
+ "query_file": "move_issue_to_suspected_issue.graphql",
+ "result": {
+ "data": {
+ "moveAnnotationIssue": true
+ }
+ }
+ },
+ {
+ "query_file": "move_suspected_issue_to_issue.graphql",
+ "result": {
+ "data": {
+ "moveAnnotationIssue": true
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/overrideTaskDependencies/data.json b/graphql/tests/mutation/overrideTaskDependencies/data.json
new file mode 100644
index 00000000000..6a9d8c07384
--- /dev/null
+++ b/graphql/tests/mutation/overrideTaskDependencies/data.json
@@ -0,0 +1,29 @@
+{
+ "tasks": [
+ {
+ "_id": "t1",
+ "display_name": "cq merge",
+ "branch": "p1",
+ "status": "undispatched",
+ "build_id": "b1",
+ "r": "merge_test",
+ "commit_queue_merge": true,
+ "activated": true,
+ "version": "123456789012345678901234",
+ "depends_on": [
+ {
+ "_id": "dep1",
+ "status": "success",
+ "unattainable": true
+ }
+ ]
+ },
+ {
+ "_id": "dep1",
+ "status": "failed",
+ "display_name": "a dep",
+ "build_id": "b1",
+ "version": "123456789012345678901234"
+ }
+ ]
+}
diff --git a/graphql/tests/overrideTaskDependencies/queries/overrideTaskDependencies.graphql b/graphql/tests/mutation/overrideTaskDependencies/queries/override_task_dependencies.graphql
similarity index 99%
rename from graphql/tests/overrideTaskDependencies/queries/overrideTaskDependencies.graphql
rename to graphql/tests/mutation/overrideTaskDependencies/queries/override_task_dependencies.graphql
index 3fee3f0b9f2..65e54b9f970 100644
--- a/graphql/tests/overrideTaskDependencies/queries/overrideTaskDependencies.graphql
+++ b/graphql/tests/mutation/overrideTaskDependencies/queries/override_task_dependencies.graphql
@@ -9,4 +9,4 @@ mutation{
requiredStatus
}
}
-}
\ No newline at end of file
+}
diff --git a/graphql/tests/overrideTaskDependencies/results.json b/graphql/tests/mutation/overrideTaskDependencies/results.json
similarity index 90%
rename from graphql/tests/overrideTaskDependencies/results.json
rename to graphql/tests/mutation/overrideTaskDependencies/results.json
index af114583092..48038a7bac0 100644
--- a/graphql/tests/overrideTaskDependencies/results.json
+++ b/graphql/tests/mutation/overrideTaskDependencies/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "overrideTaskDependencies.graphql",
+ "query_file": "override_task_dependencies.graphql",
"result": {
"data": {
"overrideTaskDependencies": {
@@ -20,4 +20,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/graphql/tests/mutation/removeAnnotationIssue/data.json b/graphql/tests/mutation/removeAnnotationIssue/data.json
new file mode 100644
index 00000000000..9b8a7115378
--- /dev/null
+++ b/graphql/tests/mutation/removeAnnotationIssue/data.json
@@ -0,0 +1,35 @@
+{
+ "task_annotations": [
+ {
+ "_id": {
+ "$oid": "5e4aa5abe3c3317e35201abc"
+ },
+ "task_id": "task-1234",
+ "task_execution": 1,
+ "issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-1212",
+ "source": {
+ "author": "chaya.malik"
+ }
+ }
+ ],
+ "suspected_issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-2018",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ ],
+ "note": {
+ "message": "my message",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/annotations/queries/removeIssue.graphql b/graphql/tests/mutation/removeAnnotationIssue/queries/remove_issue.graphql
similarity index 61%
rename from graphql/tests/annotations/queries/removeIssue.graphql
rename to graphql/tests/mutation/removeAnnotationIssue/queries/remove_issue.graphql
index 1839a202828..45e59c68fed 100644
--- a/graphql/tests/annotations/queries/removeIssue.graphql
+++ b/graphql/tests/mutation/removeAnnotationIssue/queries/remove_issue.graphql
@@ -2,7 +2,7 @@ mutation {
removeAnnotationIssue(
taskId: "task-1234"
execution: 1
- apiIssue: { url: "https://link.com", issueKey: "EVG-2016" }
+ apiIssue: { url: "https://link.com", issueKey: "EVG-1212" }
isIssue: true
)
}
diff --git a/graphql/tests/annotations/queries/removeSuspectedIssue.graphql b/graphql/tests/mutation/removeAnnotationIssue/queries/remove_suspected_issue.graphql
similarity index 100%
rename from graphql/tests/annotations/queries/removeSuspectedIssue.graphql
rename to graphql/tests/mutation/removeAnnotationIssue/queries/remove_suspected_issue.graphql
diff --git a/graphql/tests/mutation/removeAnnotationIssue/results.json b/graphql/tests/mutation/removeAnnotationIssue/results.json
new file mode 100644
index 00000000000..634bbc24597
--- /dev/null
+++ b/graphql/tests/mutation/removeAnnotationIssue/results.json
@@ -0,0 +1,20 @@
+{
+ "tests": [
+ {
+ "query_file": "remove_issue.graphql",
+ "result": {
+ "data": {
+ "removeAnnotationIssue": true
+ }
+ }
+ },
+ {
+ "query_file": "remove_suspected_issue.graphql",
+ "result": {
+ "data": {
+ "removeAnnotationIssue": true
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/removeItemFromCommitQueue/data.json b/graphql/tests/mutation/removeItemFromCommitQueue/data.json
new file mode 100644
index 00000000000..b03ee0bf7ba
--- /dev/null
+++ b/graphql/tests/mutation/removeItemFromCommitQueue/data.json
@@ -0,0 +1,53 @@
+{
+ "commit_queue": [
+ {
+ "_id": "mongodb-mongo-master",
+ "processing": true,
+ "queue": [
+ {
+ "issue": "5e94c2dfe3c3312519b59480",
+ "patch_id": "5e94c2dfe3c3312519b59480",
+ "source": "diff",
+ "enqueue_time": { "$date": "2020-04-13T19:52:00.182Z" },
+ "modules": null
+ }
+ ],
+ "processing_updated_time": { "$date": "2020-04-13T19:52:10.216Z" }
+ },
+ {
+ "_id": "mongodb-evergreen-spruce",
+ "processing": true,
+ "queue": [
+ {
+ "issue": "1234",
+ "enqueue_time": { "$date": "2020-05-12T19:52:00.182Z" },
+ "modules": null,
+ "source": "PR",
+ "version": "5e6bb9e23066155a993e0f1a"
+ }
+ ],
+ "processing_updated_time": { "$date": "2020-04-13T19:52:10.216Z" }
+ },
+ {
+ "_id": "cli-queue",
+ "processing": true,
+ "queue": [
+ {
+ "issue": "5e6bb9e23066155a993effff",
+ "patch_id": "5e6bb9e23066155a993effff",
+ "enqueue_time": { "$date": "2020-05-12T19:52:00.182Z" }
+ }
+ ]
+ },
+ {
+ "_id": "pr-queue",
+ "processing": true,
+ "queue": [
+ {
+ "issue": "5678",
+ "enqueue_time": { "$date": "2020-05-12T19:52:00.182Z" }
+ }
+ ]
+ }
+ ]
+}
diff --git a/graphql/tests/commitQueue/queries/cli-remove-item-from-commit-queue.graphql b/graphql/tests/mutation/removeItemFromCommitQueue/queries/cli_remove_item_from_commit_queue.graphql
similarity index 100%
rename from graphql/tests/commitQueue/queries/cli-remove-item-from-commit-queue.graphql
rename to graphql/tests/mutation/removeItemFromCommitQueue/queries/cli_remove_item_from_commit_queue.graphql
diff --git a/graphql/tests/commitQueue/queries/pr-remove-item-from-commit-queue.graphql b/graphql/tests/mutation/removeItemFromCommitQueue/queries/pr_remove_item_from_commit_queue.graphql
similarity index 100%
rename from graphql/tests/commitQueue/queries/pr-remove-item-from-commit-queue.graphql
rename to graphql/tests/mutation/removeItemFromCommitQueue/queries/pr_remove_item_from_commit_queue.graphql
diff --git a/graphql/tests/mutation/removeItemFromCommitQueue/results.json b/graphql/tests/mutation/removeItemFromCommitQueue/results.json
new file mode 100644
index 00000000000..de33324fbcb
--- /dev/null
+++ b/graphql/tests/mutation/removeItemFromCommitQueue/results.json
@@ -0,0 +1,20 @@
+{
+ "tests": [
+ {
+ "query_file": "cli_remove_item_from_commit_queue.graphql",
+ "result": {
+ "data": {
+ "removeItemFromCommitQueue": "5e6bb9e23066155a993effff"
+ }
+ }
+ },
+ {
+ "query_file": "pr_remove_item_from_commit_queue.graphql",
+ "result": {
+ "data": {
+ "removeItemFromCommitQueue": "5678"
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/removePublicKey/data.json b/graphql/tests/mutation/removePublicKey/data.json
similarity index 100%
rename from graphql/tests/removePublicKey/data.json
rename to graphql/tests/mutation/removePublicKey/data.json
diff --git a/graphql/tests/removePublicKey/queries/error.graphql b/graphql/tests/mutation/removePublicKey/queries/error.graphql
similarity index 100%
rename from graphql/tests/removePublicKey/queries/error.graphql
rename to graphql/tests/mutation/removePublicKey/queries/error.graphql
diff --git a/graphql/tests/removePublicKey/queries/success.graphql b/graphql/tests/mutation/removePublicKey/queries/success.graphql
similarity index 100%
rename from graphql/tests/removePublicKey/queries/success.graphql
rename to graphql/tests/mutation/removePublicKey/queries/success.graphql
diff --git a/graphql/tests/removePublicKey/results.json b/graphql/tests/mutation/removePublicKey/results.json
similarity index 100%
rename from graphql/tests/removePublicKey/results.json
rename to graphql/tests/mutation/removePublicKey/results.json
diff --git a/graphql/tests/removeVolume/data.json b/graphql/tests/mutation/removeVolume/data.json
similarity index 100%
rename from graphql/tests/removeVolume/data.json
rename to graphql/tests/mutation/removeVolume/data.json
diff --git a/graphql/tests/removeVolume/queries/emptyVolume.graphql b/graphql/tests/mutation/removeVolume/queries/empty_volume.graphql
similarity index 100%
rename from graphql/tests/removeVolume/queries/emptyVolume.graphql
rename to graphql/tests/mutation/removeVolume/queries/empty_volume.graphql
diff --git a/graphql/tests/removeVolume/queries/mountedVolumeSuccess.graphql b/graphql/tests/mutation/removeVolume/queries/mounted_volume_success.graphql
similarity index 100%
rename from graphql/tests/removeVolume/queries/mountedVolumeSuccess.graphql
rename to graphql/tests/mutation/removeVolume/queries/mounted_volume_success.graphql
diff --git a/graphql/tests/removeVolume/queries/nonexistentVolume.graphql b/graphql/tests/mutation/removeVolume/queries/nonexistent_volume.graphql
similarity index 100%
rename from graphql/tests/removeVolume/queries/nonexistentVolume.graphql
rename to graphql/tests/mutation/removeVolume/queries/nonexistent_volume.graphql
diff --git a/graphql/tests/removeVolume/queries/unmountedVolumeSuccess.graphql b/graphql/tests/mutation/removeVolume/queries/unmounted_volume_success.graphql
similarity index 100%
rename from graphql/tests/removeVolume/queries/unmountedVolumeSuccess.graphql
rename to graphql/tests/mutation/removeVolume/queries/unmounted_volume_success.graphql
diff --git a/graphql/tests/removeVolume/results.json b/graphql/tests/mutation/removeVolume/results.json
similarity index 65%
rename from graphql/tests/removeVolume/results.json
rename to graphql/tests/mutation/removeVolume/results.json
index 9e7cdb0cca3..2542cad19ea 100644
--- a/graphql/tests/removeVolume/results.json
+++ b/graphql/tests/mutation/removeVolume/results.json
@@ -1,15 +1,15 @@
{
"tests": [
{
- "query_file": "mountedVolumeSuccess.graphql",
+ "query_file": "mounted_volume_success.graphql",
"result": { "data": { "removeVolume": true } }
},
{
- "query_file": "nonexistentVolume.graphql",
+ "query_file": "nonexistent_volume.graphql",
"result": {
"errors": [
{
- "message": "volume 'not-real' does not exist",
+ "message": "volume 'not-real' not found",
"path": ["removeVolume"],
"extensions": { "code": "RESOURCE_NOT_FOUND" }
}
@@ -18,11 +18,11 @@
}
},
{
- "query_file": "emptyVolume.graphql",
+ "query_file": "empty_volume.graphql",
"result": {
"errors": [
{
- "message": "must specify volume id",
+ "message": "must specify volume ID",
"path": ["removeVolume"],
"extensions": { "code": "INPUT_VALIDATION_ERROR" }
}
@@ -31,7 +31,7 @@
}
},
{
- "query_file": "unmountedVolumeSuccess.graphql",
+ "query_file": "unmounted_volume_success.graphql",
"result": { "data": { "removeVolume": true } }
}
]
diff --git a/graphql/tests/reprovisionToNew/data.json b/graphql/tests/mutation/reprovisionToNew/data.json
similarity index 100%
rename from graphql/tests/reprovisionToNew/data.json
rename to graphql/tests/mutation/reprovisionToNew/data.json
diff --git a/graphql/tests/reprovisionToNew/queries/empty-array.graphql b/graphql/tests/mutation/reprovisionToNew/queries/empty_array.graphql
similarity index 100%
rename from graphql/tests/reprovisionToNew/queries/empty-array.graphql
rename to graphql/tests/mutation/reprovisionToNew/queries/empty_array.graphql
diff --git a/graphql/tests/reprovisionToNew/queries/multiple-hosts.graphql b/graphql/tests/mutation/reprovisionToNew/queries/multiple_hosts.graphql
similarity index 100%
rename from graphql/tests/reprovisionToNew/queries/multiple-hosts.graphql
rename to graphql/tests/mutation/reprovisionToNew/queries/multiple_hosts.graphql
diff --git a/graphql/tests/reprovisionToNew/queries/no-hosts-found.graphql b/graphql/tests/mutation/reprovisionToNew/queries/no_hosts_found.graphql
similarity index 100%
rename from graphql/tests/reprovisionToNew/queries/no-hosts-found.graphql
rename to graphql/tests/mutation/reprovisionToNew/queries/no_hosts_found.graphql
diff --git a/graphql/tests/reprovisionToNew/queries/single-host.graphql b/graphql/tests/mutation/reprovisionToNew/queries/single_host.graphql
similarity index 100%
rename from graphql/tests/reprovisionToNew/queries/single-host.graphql
rename to graphql/tests/mutation/reprovisionToNew/queries/single_host.graphql
diff --git a/graphql/tests/reprovisionToNew/queries/user-has-no-permission-to-edit-host.graphql b/graphql/tests/mutation/reprovisionToNew/queries/user_has_no_permission_to_edit_host.graphql
similarity index 100%
rename from graphql/tests/reprovisionToNew/queries/user-has-no-permission-to-edit-host.graphql
rename to graphql/tests/mutation/reprovisionToNew/queries/user_has_no_permission_to_edit_host.graphql
diff --git a/graphql/tests/reprovisionToNew/results.json b/graphql/tests/mutation/reprovisionToNew/results.json
similarity index 78%
rename from graphql/tests/reprovisionToNew/results.json
rename to graphql/tests/mutation/reprovisionToNew/results.json
index 5eed9308287..fa44f9d4021 100644
--- a/graphql/tests/reprovisionToNew/results.json
+++ b/graphql/tests/mutation/reprovisionToNew/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "empty-array.graphql",
+ "query_file": "empty_array.graphql",
"result": {
"errors": [
{
@@ -16,7 +16,7 @@
}
},
{
- "query_file": "multiple-hosts.graphql",
+ "query_file": "multiple_hosts.graphql",
"result": {
"data": {
"reprovisionToNew": 2
@@ -24,7 +24,7 @@
}
},
{
- "query_file": "no-hosts-found.graphql",
+ "query_file": "no_hosts_found.graphql",
"result": {
"errors": [
{
@@ -39,7 +39,7 @@
}
},
{
- "query_file": "single-host.graphql",
+ "query_file": "single_host.graphql",
"result": {
"data": {
"reprovisionToNew": 1
@@ -47,7 +47,7 @@
}
},
{
- "query_file": "user-has-no-permission-to-edit-host.graphql",
+ "query_file": "user_has_no_permission_to_edit_host.graphql",
"result": {
"data": {
"reprovisionToNew": 0
diff --git a/graphql/tests/restartJasper/data.json b/graphql/tests/mutation/restartJasper/data.json
similarity index 100%
rename from graphql/tests/restartJasper/data.json
rename to graphql/tests/mutation/restartJasper/data.json
diff --git a/graphql/tests/restartJasper/queries/empty-array.graphql b/graphql/tests/mutation/restartJasper/queries/empty_array.graphql
similarity index 100%
rename from graphql/tests/restartJasper/queries/empty-array.graphql
rename to graphql/tests/mutation/restartJasper/queries/empty_array.graphql
diff --git a/graphql/tests/restartJasper/queries/multiple-hosts.graphql b/graphql/tests/mutation/restartJasper/queries/multiple_hosts.graphql
similarity index 100%
rename from graphql/tests/restartJasper/queries/multiple-hosts.graphql
rename to graphql/tests/mutation/restartJasper/queries/multiple_hosts.graphql
diff --git a/graphql/tests/restartJasper/queries/no-hosts-found.graphql b/graphql/tests/mutation/restartJasper/queries/no_hosts_found.graphql
similarity index 100%
rename from graphql/tests/restartJasper/queries/no-hosts-found.graphql
rename to graphql/tests/mutation/restartJasper/queries/no_hosts_found.graphql
diff --git a/graphql/tests/restartJasper/queries/single-host.graphql b/graphql/tests/mutation/restartJasper/queries/single_host.graphql
similarity index 100%
rename from graphql/tests/restartJasper/queries/single-host.graphql
rename to graphql/tests/mutation/restartJasper/queries/single_host.graphql
diff --git a/graphql/tests/restartJasper/queries/user-has-no-permission-to-edit-host.graphql b/graphql/tests/mutation/restartJasper/queries/user_has_no_permission_to_edit_host.graphql
similarity index 100%
rename from graphql/tests/restartJasper/queries/user-has-no-permission-to-edit-host.graphql
rename to graphql/tests/mutation/restartJasper/queries/user_has_no_permission_to_edit_host.graphql
diff --git a/graphql/tests/restartJasper/results.json b/graphql/tests/mutation/restartJasper/results.json
similarity index 78%
rename from graphql/tests/restartJasper/results.json
rename to graphql/tests/mutation/restartJasper/results.json
index 36592b1cbf4..152518ec189 100644
--- a/graphql/tests/restartJasper/results.json
+++ b/graphql/tests/mutation/restartJasper/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "empty-array.graphql",
+ "query_file": "empty_array.graphql",
"result": {
"errors": [
{
@@ -16,7 +16,7 @@
}
},
{
- "query_file": "multiple-hosts.graphql",
+ "query_file": "multiple_hosts.graphql",
"result": {
"data": {
"restartJasper": 2
@@ -24,7 +24,7 @@
}
},
{
- "query_file": "no-hosts-found.graphql",
+ "query_file": "no_hosts_found.graphql",
"result": {
"errors": [
{
@@ -39,7 +39,7 @@
}
},
{
- "query_file": "single-host.graphql",
+ "query_file": "single_host.graphql",
"result": {
"data": {
"restartJasper": 1
@@ -47,7 +47,7 @@
}
},
{
- "query_file": "user-has-no-permission-to-edit-host.graphql",
+ "query_file": "user_has_no_permission_to_edit_host.graphql",
"result": {
"data": {
"restartJasper": 0
diff --git a/graphql/tests/mutation/restartTask/data.json b/graphql/tests/mutation/restartTask/data.json
new file mode 100644
index 00000000000..60af7e96c61
--- /dev/null
+++ b/graphql/tests/mutation/restartTask/data.json
@@ -0,0 +1,47 @@
+{
+ "tasks": [
+ {
+ "_id": "task1",
+ "build_id": "build1",
+ "status": "success",
+ "version": "version1"
+ },
+ {
+ "_id": "task2",
+ "status": "success"
+ },
+ {
+ "_id": "task3",
+ "build_id": "build1",
+ "version": "version1",
+ "status": "success",
+ "display_only": true,
+ "execution_tasks": [
+ "execution_task_1",
+ "execution_task_2"
+ ]
+ },
+ {
+ "_id": "execution_task_1",
+ "execution": 0,
+ "status": "failed"
+ },
+ {
+ "_id": "execution_task_2",
+ "execution": 0,
+ "status": "success"
+ }
+ ],
+ "builds": [
+ {
+ "_id": "build1",
+ "tasks": [{ "id": "task1" }, { "id": "task3" }],
+ "version": "version1"
+ }
+ ],
+ "versions": [
+ {
+ "_id": "version1"
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/restartTask/queries/error_invalid_task_id.graphql b/graphql/tests/mutation/restartTask/queries/error_invalid_task_id.graphql
new file mode 100644
index 00000000000..7694dd41d6b
--- /dev/null
+++ b/graphql/tests/mutation/restartTask/queries/error_invalid_task_id.graphql
@@ -0,0 +1,6 @@
+mutation {
+ restartTask(taskId: "nonexistent", failedOnly: false) {
+ status
+ id
+ }
+}
diff --git a/graphql/tests/mutation/restartTask/queries/success.graphql b/graphql/tests/mutation/restartTask/queries/success.graphql
new file mode 100644
index 00000000000..f2b8b4bfd27
--- /dev/null
+++ b/graphql/tests/mutation/restartTask/queries/success.graphql
@@ -0,0 +1,6 @@
+mutation {
+ restartTask(taskId: "task1", failedOnly: false) {
+ status
+ id
+ }
+}
diff --git a/graphql/tests/mutation/restartTask/queries/success_failed_only.graphql b/graphql/tests/mutation/restartTask/queries/success_failed_only.graphql
new file mode 100644
index 00000000000..1635d57d5a3
--- /dev/null
+++ b/graphql/tests/mutation/restartTask/queries/success_failed_only.graphql
@@ -0,0 +1,10 @@
+mutation {
+ restartTask(taskId: "task3", failedOnly: true) {
+ id
+ status
+ executionTasksFull {
+ id
+ status
+ }
+ }
+}
diff --git a/graphql/tests/mutation/restartTask/results.json b/graphql/tests/mutation/restartTask/results.json
new file mode 100644
index 00000000000..461428f1bdb
--- /dev/null
+++ b/graphql/tests/mutation/restartTask/results.json
@@ -0,0 +1,44 @@
+{
+ "tests": [
+ {
+ "query_file": "success.graphql",
+ "result": {
+ "data": { "restartTask": { "status": "will-run", "id": "task1" } }
+ }
+ },
+ {
+ "query_file": "error_invalid_task_id.graphql",
+ "result": {
+ "errors": [
+ {
+ "message": "cannot find task with id 'nonexistent'",
+ "path": ["restartTask"],
+ "extensions": { "code": "RESOURCE_NOT_FOUND" }
+ }
+ ],
+ "data": null
+ }
+ },
+ {
+ "query_file": "success_failed_only.graphql",
+ "result": {
+ "data": {
+ "restartTask": {
+ "id": "task3",
+ "status": "will-run",
+ "executionTasksFull": [
+ {
+ "id": "execution_task_1",
+ "status": "will-run"
+ },
+ {
+ "id": "execution_task_2",
+ "status": "success"
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/saveProjectSettingsForSection/data.json b/graphql/tests/mutation/saveProjectSettingsForSection/data.json
similarity index 100%
rename from graphql/tests/saveProjectSettingsForSection/data.json
rename to graphql/tests/mutation/saveProjectSettingsForSection/data.json
diff --git a/graphql/tests/saveProjectSettingsForSection/queries/changeIdentifier.graphql b/graphql/tests/mutation/saveProjectSettingsForSection/queries/change_identifier.graphql
similarity index 100%
rename from graphql/tests/saveProjectSettingsForSection/queries/changeIdentifier.graphql
rename to graphql/tests/mutation/saveProjectSettingsForSection/queries/change_identifier.graphql
diff --git a/graphql/tests/mutation/saveProjectSettingsForSection/queries/commit_queue_section.graphql b/graphql/tests/mutation/saveProjectSettingsForSection/queries/commit_queue_section.graphql
new file mode 100644
index 00000000000..11d14739c4b
--- /dev/null
+++ b/graphql/tests/mutation/saveProjectSettingsForSection/queries/commit_queue_section.graphql
@@ -0,0 +1,34 @@
+mutation {
+ saveProjectSettingsForSection(
+ projectSettings: {
+ projectRef: {
+ id: "sandbox_project_id"
+ commitQueue: {
+ enabled: true
+ }
+ }
+ aliases: [
+ {
+ id: "5ffe393097b1d3759dd3c1aa"
+ alias: "__commit_queue"
+ task: "unit_tests"
+ variant: "ubuntu1604"
+ gitTag: ""
+ taskTags: []
+ variantTags: []
+ remotePath: ""
+ }
+ ]
+ }
+ section: GITHUB_AND_COMMIT_QUEUE
+ ) {
+ projectRef {
+ commitQueue {
+ enabled ## unchanged
+ }
+ }
+ vars {
+ vars ## should be unchanged
+ }
+ }
+}
diff --git a/graphql/tests/saveProjectSettingsForSection/queries/generalSection.graphql b/graphql/tests/mutation/saveProjectSettingsForSection/queries/general_section.graphql
similarity index 81%
rename from graphql/tests/saveProjectSettingsForSection/queries/generalSection.graphql
rename to graphql/tests/mutation/saveProjectSettingsForSection/queries/general_section.graphql
index d897293b44a..c1f482ecf74 100644
--- a/graphql/tests/saveProjectSettingsForSection/queries/generalSection.graphql
+++ b/graphql/tests/mutation/saveProjectSettingsForSection/queries/general_section.graphql
@@ -6,6 +6,9 @@ mutation {
identifier: "sandbox",
enabled: true,
remotePath: "my_path_is_new"
+ owner: "evergreen-ci"
+ repo: "commit-queue-sandbox"
+ branch: "main"
}
},
section: GENERAL
diff --git a/graphql/tests/mutation/saveProjectSettingsForSection/queries/notifications_section.graphql b/graphql/tests/mutation/saveProjectSettingsForSection/queries/notifications_section.graphql
new file mode 100644
index 00000000000..2e357be0a72
--- /dev/null
+++ b/graphql/tests/mutation/saveProjectSettingsForSection/queries/notifications_section.graphql
@@ -0,0 +1,62 @@
+mutation {
+ saveProjectSettingsForSection(
+ projectSettings: {
+ projectRef: {
+ id: "sandbox_project_id"
+ banner: { theme: WARNING, text: "banner text!!" }
+ }
+ subscriptions: [
+ {
+ id: "12345",
+ owner_type: "project",
+ regex_selectors: [],
+ resource_type: "VERSION",
+ selectors: [
+ {
+ type: "project",
+ data: "sandbox_project_id"
+ },
+ {
+ type: "requester",
+ data: "gitter_request"
+ }
+ ],
+ subscriber: {
+ type: "evergreen-webhook",
+ target: "https://fake-website.com",
+ webhookSubscriber: {
+ url: "https://fake-website.com",
+ secret: "secret",
+ headers: []
+ }
+ },
+ trigger: "family-outcome",
+ trigger_data: {
+ requester: "gitter_request"
+ }
+ }
+ ]
+ }
+ section: NOTIFICATIONS
+ ) {
+ projectRef {
+ id
+ banner {
+ text
+ theme
+ }
+ }
+ subscriptions {
+ subscriber {
+ subscriber{
+ webhookSubscriber {
+ url
+ retries
+ minDelayMs
+ timeoutMs
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/graphql/tests/saveProjectSettingsForSection/queries/varsSection.graphql b/graphql/tests/mutation/saveProjectSettingsForSection/queries/vars_section.graphql
similarity index 100%
rename from graphql/tests/saveProjectSettingsForSection/queries/varsSection.graphql
rename to graphql/tests/mutation/saveProjectSettingsForSection/queries/vars_section.graphql
diff --git a/graphql/tests/mutation/saveProjectSettingsForSection/results.json b/graphql/tests/mutation/saveProjectSettingsForSection/results.json
new file mode 100644
index 00000000000..4c0a2197dc9
--- /dev/null
+++ b/graphql/tests/mutation/saveProjectSettingsForSection/results.json
@@ -0,0 +1,96 @@
+{
+ "tests": [
+ {
+ "query_file": "general_section.graphql",
+ "result": {
+ "data": {
+ "saveProjectSettingsForSection": {
+ "projectRef": {
+ "enabled": true,
+ "remotePath": "my_path_is_new",
+ "spawnHostScriptPath": ""
+ },
+ "vars": {
+ "vars": { "hello": "", "foo": "bar" }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_file": "commit_queue_section.graphql",
+ "result": {
+ "data": {
+ "saveProjectSettingsForSection": {
+ "projectRef": {
+ "commitQueue": {
+ "enabled": true
+ }
+ },
+ "vars": {
+ "vars": { "hello": "", "foo": "bar" }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_file": "vars_section.graphql",
+ "result": {
+ "data": {
+ "saveProjectSettingsForSection": {
+ "vars": {
+ "vars": { "goodbye": "" },
+ "privateVars": ["goodbye"]
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_file": "change_identifier.graphql",
+ "result": {
+ "data": null,
+ "errors": [
+ {
+ "message": "identifier 'sandbox_project_id' is already being used for another project",
+ "path": ["saveProjectSettingsForSection"],
+ "extensions": {
+ "code": "INTERNAL_SERVER_ERROR"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "query_file": "notifications_section.graphql",
+ "result": {
+ "data": {
+ "saveProjectSettingsForSection": {
+ "projectRef": {
+ "id": "sandbox_project_id",
+ "banner": {
+ "text": "banner text!!",
+ "theme": "WARNING"
+ }
+ },
+ "subscriptions": [
+ {
+ "subscriber": {
+ "subscriber": {
+ "webhookSubscriber": {
+ "url": "https://fake-website.com",
+ "retries": 0,
+ "minDelayMs": 0,
+ "timeoutMs": 0
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/saveRepoSettingsForSection/data.json b/graphql/tests/mutation/saveRepoSettingsForSection/data.json
similarity index 100%
rename from graphql/tests/saveRepoSettingsForSection/data.json
rename to graphql/tests/mutation/saveRepoSettingsForSection/data.json
diff --git a/graphql/tests/mutation/saveRepoSettingsForSection/queries/commit_queue_section.graphql b/graphql/tests/mutation/saveRepoSettingsForSection/queries/commit_queue_section.graphql
new file mode 100644
index 00000000000..276f70e8cb6
--- /dev/null
+++ b/graphql/tests/mutation/saveRepoSettingsForSection/queries/commit_queue_section.graphql
@@ -0,0 +1,36 @@
+mutation {
+ saveRepoSettingsForSection(
+ repoSettings: {
+ projectRef: {
+ id: "repo_id"
+ commitQueue: {
+ enabled: true
+ }
+ }
+ aliases: [
+ {
+ id: "5ffe393097b1d3759dd3c1aa"
+ alias: "__commit_queue"
+ task: "unit_tests"
+ variant: "ubuntu1604"
+ gitTag: ""
+ taskTags: []
+ variantTags: []
+ remotePath: ""
+ }
+ ]
+ }
+ section: GITHUB_AND_COMMIT_QUEUE
+ ) {
+ projectRef {
+ commitQueue {
+ enabled
+ }
+ }
+ vars {
+ ## should be unchanged
+ vars
+ privateVars
+ }
+ }
+}
diff --git a/graphql/tests/saveRepoSettingsForSection/queries/generalSection.graphql b/graphql/tests/mutation/saveRepoSettingsForSection/queries/general_section.graphql
similarity index 83%
rename from graphql/tests/saveRepoSettingsForSection/queries/generalSection.graphql
rename to graphql/tests/mutation/saveRepoSettingsForSection/queries/general_section.graphql
index f2f9a15bd9f..612d73d75cd 100644
--- a/graphql/tests/saveRepoSettingsForSection/queries/generalSection.graphql
+++ b/graphql/tests/mutation/saveRepoSettingsForSection/queries/general_section.graphql
@@ -3,8 +3,11 @@ mutation {
repoSettings: {
projectRef: {
id: "repo_id"
+ owner: "hello",
+ repo: "world",
enabled: true,
remotePath: "my_path_is_new"
+ branch: "main"
}
},
section: GENERAL
diff --git a/graphql/tests/saveRepoSettingsForSection/queries/varsSection.graphql b/graphql/tests/mutation/saveRepoSettingsForSection/queries/vars_section.graphql
similarity index 100%
rename from graphql/tests/saveRepoSettingsForSection/queries/varsSection.graphql
rename to graphql/tests/mutation/saveRepoSettingsForSection/queries/vars_section.graphql
diff --git a/graphql/tests/saveRepoSettingsForSection/results.json b/graphql/tests/mutation/saveRepoSettingsForSection/results.json
similarity index 72%
rename from graphql/tests/saveRepoSettingsForSection/results.json
rename to graphql/tests/mutation/saveRepoSettingsForSection/results.json
index 8765d370d98..baf4d613310 100644
--- a/graphql/tests/saveRepoSettingsForSection/results.json
+++ b/graphql/tests/mutation/saveRepoSettingsForSection/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "generalSection.graphql",
+ "query_file": "general_section.graphql",
"result": {
"data": {
"saveRepoSettingsForSection": {
@@ -11,41 +11,38 @@
"spawnHostScriptPath": ""
},
"vars": {
- "vars": {"hello": ""},
+ "vars": { "hello": "" },
"privateVars": ["hello"]
-
}
}
}
}
},
{
- "query_file": "cqSection.graphql",
+ "query_file": "commit_queue_section.graphql",
"result": {
"data": {
"saveRepoSettingsForSection": {
"projectRef": {
"commitQueue": {
- "enabled": true,
- "requireSigned": false
+ "enabled": true
}
},
"vars": {
- "vars": {"hello": ""},
+ "vars": { "hello": "" },
"privateVars": ["hello"]
-
}
}
}
}
},
{
- "query_file": "varsSection.graphql",
+ "query_file": "vars_section.graphql",
"result": {
"data": {
"saveRepoSettingsForSection": {
"vars": {
- "vars": {"goodbye": ""},
+ "vars": { "goodbye": "" },
"privateVars": ["goodbye"]
}
}
@@ -53,4 +50,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/graphql/tests/saveSubscription/data.json b/graphql/tests/mutation/saveSubscription/data.json
similarity index 99%
rename from graphql/tests/saveSubscription/data.json
rename to graphql/tests/mutation/saveSubscription/data.json
index a1a54a6c83b..d1ffdcc44b0 100644
--- a/graphql/tests/saveSubscription/data.json
+++ b/graphql/tests/mutation/saveSubscription/data.json
@@ -44,7 +44,6 @@
"message": "EVG-743 add ability to link back to a task",
"status": "created",
"order": 3,
- "config": "",
"ignored": false,
"owner_name": "zakhark",
"repo_name": "logkeeper",
diff --git a/graphql/tests/saveSubscription/queries/build-not-found-error.graphql b/graphql/tests/mutation/saveSubscription/queries/build_not_found_error.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/build-not-found-error.graphql
rename to graphql/tests/mutation/saveSubscription/queries/build_not_found_error.graphql
diff --git a/graphql/tests/saveSubscription/queries/build-success.graphql b/graphql/tests/mutation/saveSubscription/queries/build_success.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/build-success.graphql
rename to graphql/tests/mutation/saveSubscription/queries/build_success.graphql
diff --git a/graphql/tests/saveSubscription/queries/build-success-2.graphql b/graphql/tests/mutation/saveSubscription/queries/build_success_2.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/build-success-2.graphql
rename to graphql/tests/mutation/saveSubscription/queries/build_success_2.graphql
diff --git a/graphql/tests/saveSubscription/queries/error-regex-selectors.graphql b/graphql/tests/mutation/saveSubscription/queries/error_regex_selectors.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/error-regex-selectors.graphql
rename to graphql/tests/mutation/saveSubscription/queries/error_regex_selectors.graphql
diff --git a/graphql/tests/saveSubscription/queries/input-validation-error-1.graphql b/graphql/tests/mutation/saveSubscription/queries/input_validation_error_1.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/input-validation-error-1.graphql
rename to graphql/tests/mutation/saveSubscription/queries/input_validation_error_1.graphql
diff --git a/graphql/tests/saveSubscription/queries/input-validation-error-2.graphql b/graphql/tests/mutation/saveSubscription/queries/input_validation_error_2.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/input-validation-error-2.graphql
rename to graphql/tests/mutation/saveSubscription/queries/input_validation_error_2.graphql
diff --git a/graphql/tests/saveSubscription/queries/input-validation-error-3.graphql b/graphql/tests/mutation/saveSubscription/queries/input_validation_error_3.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/input-validation-error-3.graphql
rename to graphql/tests/mutation/saveSubscription/queries/input_validation_error_3.graphql
diff --git a/graphql/tests/saveSubscription/queries/invalid-input-format.graphql b/graphql/tests/mutation/saveSubscription/queries/invalid_input_format.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/invalid-input-format.graphql
rename to graphql/tests/mutation/saveSubscription/queries/invalid_input_format.graphql
diff --git a/graphql/tests/saveSubscription/queries/project-not-found-error.graphql b/graphql/tests/mutation/saveSubscription/queries/project_not_found_error.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/project-not-found-error.graphql
rename to graphql/tests/mutation/saveSubscription/queries/project_not_found_error.graphql
diff --git a/graphql/tests/saveSubscription/queries/project-success.graphql b/graphql/tests/mutation/saveSubscription/queries/project_success.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/project-success.graphql
rename to graphql/tests/mutation/saveSubscription/queries/project_success.graphql
diff --git a/graphql/tests/saveSubscription/queries/task-not-found-error.graphql b/graphql/tests/mutation/saveSubscription/queries/task_not_found_error.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/task-not-found-error.graphql
rename to graphql/tests/mutation/saveSubscription/queries/task_not_found_error.graphql
diff --git a/graphql/tests/saveSubscription/queries/task-success.graphql b/graphql/tests/mutation/saveSubscription/queries/task_success.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/task-success.graphql
rename to graphql/tests/mutation/saveSubscription/queries/task_success.graphql
diff --git a/graphql/tests/saveSubscription/queries/version-not-found-error.graphql b/graphql/tests/mutation/saveSubscription/queries/version_not_found_error.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/version-not-found-error.graphql
rename to graphql/tests/mutation/saveSubscription/queries/version_not_found_error.graphql
diff --git a/graphql/tests/saveSubscription/queries/version-success.graphql b/graphql/tests/mutation/saveSubscription/queries/version_success.graphql
similarity index 100%
rename from graphql/tests/saveSubscription/queries/version-success.graphql
rename to graphql/tests/mutation/saveSubscription/queries/version_success.graphql
diff --git a/graphql/tests/saveSubscription/results.json b/graphql/tests/mutation/saveSubscription/results.json
similarity index 78%
rename from graphql/tests/saveSubscription/results.json
rename to graphql/tests/mutation/saveSubscription/results.json
index 9648f475899..623fa2e319a 100644
--- a/graphql/tests/saveSubscription/results.json
+++ b/graphql/tests/mutation/saveSubscription/results.json
@@ -1,23 +1,23 @@
{
"tests": [
{
- "query_file": "task-success.graphql",
+ "query_file": "task_success.graphql",
"result": { "data": { "saveSubscription": true } }
},
{
- "query_file": "build-success.graphql",
+ "query_file": "build_success.graphql",
"result": { "data": { "saveSubscription": true } }
},
{
- "query_file": "version-success.graphql",
+ "query_file": "version_success.graphql",
"result": { "data": { "saveSubscription": true } }
},
{
- "query_file": "project-success.graphql",
+ "query_file": "project_success.graphql",
"result": { "data": { "saveSubscription": true } }
},
{
- "query_file": "task-not-found-error.graphql",
+ "query_file": "task_not_found_error.graphql",
"result": {
"errors": [
{
@@ -31,15 +31,15 @@
},
{
- "query_file": "build-success.graphql",
+ "query_file": "build_success.graphql",
"result": { "data": { "saveSubscription": true } }
},
{
- "query_file": "build-success-2.graphql",
+ "query_file": "build_success_2.graphql",
"result": { "data": { "saveSubscription": true } }
},
{
- "query_file": "build-not-found-error.graphql",
+ "query_file": "build_not_found_error.graphql",
"result": {
"errors": [
{
@@ -52,7 +52,7 @@
}
},
{
- "query_file": "project-not-found-error.graphql",
+ "query_file": "project_not_found_error.graphql",
"result": {
"errors": [
{
@@ -65,7 +65,7 @@
}
},
{
- "query_file": "version-not-found-error.graphql",
+ "query_file": "version_not_found_error.graphql",
"result": {
"errors": [
{
@@ -78,7 +78,7 @@
}
},
{
- "query_file": "error-regex-selectors.graphql",
+ "query_file": "error_regex_selectors.graphql",
"result": {
"errors": [
{
@@ -91,11 +91,11 @@
}
},
{
- "query_file": "invalid-input-format.graphql",
+ "query_file": "invalid_input_format.graphql",
"result": {
"errors": [
{
- "message": "Field SubscriptionInput.trigger_data of required type StringMap! was not provided.",
+ "message": "Field \"SubscriptionInput.trigger_data\" of required type \"StringMap!\" was not provided.",
"locations": [{ "line": 3, "column": 19 }],
"extensions": { "code": "GRAPHQL_VALIDATION_FAILED" }
}
@@ -104,7 +104,7 @@
}
},
{
- "query_file": "input-validation-error-1.graphql",
+ "query_file": "input_validation_error_1.graphql",
"result": {
"errors": [
{
@@ -117,7 +117,7 @@
}
},
{
- "query_file": "input-validation-error-2.graphql",
+ "query_file": "input_validation_error_2.graphql",
"result": {
"errors": [
{
@@ -130,7 +130,7 @@
}
},
{
- "query_file": "input-validation-error-3.graphql",
+ "query_file": "input_validation_error_3.graphql",
"result": {
"errors": [
{
diff --git a/graphql/tests/schedulePatch/data.json b/graphql/tests/mutation/schedulePatch/data.json
similarity index 100%
rename from graphql/tests/schedulePatch/data.json
rename to graphql/tests/mutation/schedulePatch/data.json
diff --git a/graphql/tests/schedulePatch/queries/schedule-patch.graphql b/graphql/tests/mutation/schedulePatch/queries/schedule_patch.graphql
similarity index 100%
rename from graphql/tests/schedulePatch/queries/schedule-patch.graphql
rename to graphql/tests/mutation/schedulePatch/queries/schedule_patch.graphql
diff --git a/graphql/tests/schedulePatch/results.json b/graphql/tests/mutation/schedulePatch/results.json
similarity index 95%
rename from graphql/tests/schedulePatch/results.json
rename to graphql/tests/mutation/schedulePatch/results.json
index 77e559120c1..8269351c6c5 100644
--- a/graphql/tests/schedulePatch/results.json
+++ b/graphql/tests/mutation/schedulePatch/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "schedule-patch.graphql",
+ "query_file": "schedule_patch.graphql",
"result": {
"data": {
"schedulePatch": {
diff --git a/graphql/tests/schedulePatchTasks/data.json b/graphql/tests/mutation/schedulePatchTasks/data.json
similarity index 100%
rename from graphql/tests/schedulePatchTasks/data.json
rename to graphql/tests/mutation/schedulePatchTasks/data.json
diff --git a/graphql/tests/schedulePatchTasks/queries/schedule-commitqueue-merge.graphql b/graphql/tests/mutation/schedulePatchTasks/queries/schedule_commit_queue_merge.graphql
similarity index 100%
rename from graphql/tests/schedulePatchTasks/queries/schedule-commitqueue-merge.graphql
rename to graphql/tests/mutation/schedulePatchTasks/queries/schedule_commit_queue_merge.graphql
diff --git a/graphql/tests/schedulePatchTasks/queries/schedule-patch-tasks.graphql b/graphql/tests/mutation/schedulePatchTasks/queries/schedule_patch_tasks.graphql
similarity index 100%
rename from graphql/tests/schedulePatchTasks/queries/schedule-patch-tasks.graphql
rename to graphql/tests/mutation/schedulePatchTasks/queries/schedule_patch_tasks.graphql
diff --git a/graphql/tests/schedulePatchTasks/queries/schedule-patch-tasks-error.graphql b/graphql/tests/mutation/schedulePatchTasks/queries/schedule_patch_tasks_error.graphql
similarity index 100%
rename from graphql/tests/schedulePatchTasks/queries/schedule-patch-tasks-error.graphql
rename to graphql/tests/mutation/schedulePatchTasks/queries/schedule_patch_tasks_error.graphql
diff --git a/graphql/tests/schedulePatchTasks/results.json b/graphql/tests/mutation/schedulePatchTasks/results.json
similarity index 83%
rename from graphql/tests/schedulePatchTasks/results.json
rename to graphql/tests/mutation/schedulePatchTasks/results.json
index 863a7dc90ad..0de9cacbd2d 100644
--- a/graphql/tests/schedulePatchTasks/results.json
+++ b/graphql/tests/mutation/schedulePatchTasks/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "schedule-patch-tasks-error.graphql",
+ "query_file": "schedule_patch_tasks_error.graphql",
"result": {
"errors": [
{
@@ -18,7 +18,7 @@
}
},
{
- "query_file": "schedule-patch-tasks.graphql",
+ "query_file": "schedule_patch_tasks.graphql",
"result": {
"data": {
"schedulePatchTasks": "5e4ff3abe3c3317e352062e4"
@@ -26,7 +26,7 @@
}
},
{
- "query_file": "schedule-commitqueue-merge.graphql",
+ "query_file": "schedule_commit_queue_merge.graphql",
"result": {
"errors": [
{
diff --git a/graphql/tests/scheduleTasks/data.json b/graphql/tests/mutation/scheduleTasks/data.json
similarity index 100%
rename from graphql/tests/scheduleTasks/data.json
rename to graphql/tests/mutation/scheduleTasks/data.json
diff --git a/graphql/tests/scheduleTasks/queries/schedule-tasks.graphql b/graphql/tests/mutation/scheduleTasks/queries/schedule_tasks.graphql
similarity index 100%
rename from graphql/tests/scheduleTasks/queries/schedule-tasks.graphql
rename to graphql/tests/mutation/scheduleTasks/queries/schedule_tasks.graphql
diff --git a/graphql/tests/scheduleTasks/queries/schedule-tasks-failure.graphql b/graphql/tests/mutation/scheduleTasks/queries/schedule_tasks_failure.graphql
similarity index 100%
rename from graphql/tests/scheduleTasks/queries/schedule-tasks-failure.graphql
rename to graphql/tests/mutation/scheduleTasks/queries/schedule_tasks_failure.graphql
diff --git a/graphql/tests/scheduleTasks/results.json b/graphql/tests/mutation/scheduleTasks/results.json
similarity index 84%
rename from graphql/tests/scheduleTasks/results.json
rename to graphql/tests/mutation/scheduleTasks/results.json
index decb38fac44..4a874e36a7b 100644
--- a/graphql/tests/scheduleTasks/results.json
+++ b/graphql/tests/mutation/scheduleTasks/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "schedule-tasks.graphql",
+ "query_file": "schedule_tasks.graphql",
"result": {
"data": {
"scheduleTasks": [
@@ -13,7 +13,7 @@
}
},
{
- "query_file": "schedule-tasks-failure.graphql",
+ "query_file": "schedule_tasks_failure.graphql",
"result": {
"data": null,
"errors": [
diff --git a/graphql/tests/scheduleUndispatchedBaseTasks/data.json b/graphql/tests/mutation/scheduleUndispatchedBaseTasks/data.json
similarity index 100%
rename from graphql/tests/scheduleUndispatchedBaseTasks/data.json
rename to graphql/tests/mutation/scheduleUndispatchedBaseTasks/data.json
diff --git a/graphql/tests/scheduleUndispatchedBaseTasks/queries/generated-tasks.graphql b/graphql/tests/mutation/scheduleUndispatchedBaseTasks/queries/generated_tasks.graphql
similarity index 100%
rename from graphql/tests/scheduleUndispatchedBaseTasks/queries/generated-tasks.graphql
rename to graphql/tests/mutation/scheduleUndispatchedBaseTasks/queries/generated_tasks.graphql
diff --git a/graphql/tests/scheduleUndispatchedBaseTasks/queries/successful-restart.graphql b/graphql/tests/mutation/scheduleUndispatchedBaseTasks/queries/successful_restart.graphql
similarity index 100%
rename from graphql/tests/scheduleUndispatchedBaseTasks/queries/successful-restart.graphql
rename to graphql/tests/mutation/scheduleUndispatchedBaseTasks/queries/successful_restart.graphql
diff --git a/graphql/tests/scheduleUndispatchedBaseTasks/results.json b/graphql/tests/mutation/scheduleUndispatchedBaseTasks/results.json
similarity index 85%
rename from graphql/tests/scheduleUndispatchedBaseTasks/results.json
rename to graphql/tests/mutation/scheduleUndispatchedBaseTasks/results.json
index 9e238b07eb0..c1ce5f0a815 100644
--- a/graphql/tests/scheduleUndispatchedBaseTasks/results.json
+++ b/graphql/tests/mutation/scheduleUndispatchedBaseTasks/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "successful-restart.graphql",
+ "query_file": "successful_restart.graphql",
"result": { "data": { "scheduleUndispatchedBaseTasks": [
{
"id": "base-task-2",
@@ -11,7 +11,7 @@
] } }
},
{
- "query_file": "generated-tasks.graphql",
+ "query_file": "generated_tasks.graphql",
"result": { "data": { "scheduleUndispatchedBaseTasks": [
{
"id": "base_generated_task",
diff --git a/graphql/tests/mutation/setAnnotationMetadataLinks/data.json b/graphql/tests/mutation/setAnnotationMetadataLinks/data.json
new file mode 100644
index 00000000000..b1ce8deb435
--- /dev/null
+++ b/graphql/tests/mutation/setAnnotationMetadataLinks/data.json
@@ -0,0 +1,48 @@
+{
+ "task_annotations": [
+ {
+ "_id": {
+ "$oid": "5e4aa5abe3c3317e35201abc"
+ },
+ "task_id": "task-1234",
+ "task_execution": 0,
+ "issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-1212",
+ "source": {
+ "author": "chaya.malik"
+ }
+ }
+ ],
+ "suspected_issues": [
+ {
+ "url": "https://link.com",
+ "issue_key": "EVG-2121",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ ],
+ "note": {
+ "message": "my message",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ },
+ {
+ "_id": {
+ "$oid": "5e3aa5bbe3c3317e35206abc"
+ },
+ "task_id": "task-5678",
+ "task_execution": 0,
+ "note": {
+ "message": "my other message",
+ "source": {
+ "author": "annie.black"
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/mutation/setAnnotationMetadataLinks/queries/setAnnotationMetadataLinks.graphql b/graphql/tests/mutation/setAnnotationMetadataLinks/queries/setAnnotationMetadataLinks.graphql
new file mode 100644
index 00000000000..2993321ef13
--- /dev/null
+++ b/graphql/tests/mutation/setAnnotationMetadataLinks/queries/setAnnotationMetadataLinks.graphql
@@ -0,0 +1,7 @@
+mutation {
+ setAnnotationMetadataLinks(
+ taskId: "task-1234",
+ execution: 1,
+ metadataLinks: [{url: "https://issuelink.com/browse/ticket", text:"Hello World"}]
+ )
+}
diff --git a/graphql/tests/mutation/setAnnotationMetadataLinks/results.json b/graphql/tests/mutation/setAnnotationMetadataLinks/results.json
new file mode 100644
index 00000000000..34ed7cfcde5
--- /dev/null
+++ b/graphql/tests/mutation/setAnnotationMetadataLinks/results.json
@@ -0,0 +1,12 @@
+{
+ "tests": [
+ {
+ "query_file": "setAnnotationMetadataLinks.graphql",
+ "result": {
+ "data": {
+ "setAnnotationMetadataLinks": true
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/setPatchPriority/data.json b/graphql/tests/mutation/setPatchPriority/data.json
similarity index 100%
rename from graphql/tests/setPatchPriority/data.json
rename to graphql/tests/mutation/setPatchPriority/data.json
diff --git a/graphql/tests/setPatchPriority/queries/set-priority.graphql b/graphql/tests/mutation/setPatchPriority/queries/set_priority.graphql
similarity index 100%
rename from graphql/tests/setPatchPriority/queries/set-priority.graphql
rename to graphql/tests/mutation/setPatchPriority/queries/set_priority.graphql
diff --git a/graphql/tests/setPatchPriority/queries/set-priority-bad-id.graphql b/graphql/tests/mutation/setPatchPriority/queries/set_priority_bad_id.graphql
similarity index 100%
rename from graphql/tests/setPatchPriority/queries/set-priority-bad-id.graphql
rename to graphql/tests/mutation/setPatchPriority/queries/set_priority_bad_id.graphql
diff --git a/graphql/tests/setPatchPriority/queries/set-priority-too-high-for-permission-level.graphql b/graphql/tests/mutation/setPatchPriority/queries/set_priority_too_high_for_permission_level.graphql
similarity index 100%
rename from graphql/tests/setPatchPriority/queries/set-priority-too-high-for-permission-level.graphql
rename to graphql/tests/mutation/setPatchPriority/queries/set_priority_too_high_for_permission_level.graphql
diff --git a/graphql/tests/setPatchPriority/results.json b/graphql/tests/mutation/setPatchPriority/results.json
similarity index 84%
rename from graphql/tests/setPatchPriority/results.json
rename to graphql/tests/mutation/setPatchPriority/results.json
index 9608a94e0a4..9fe75b5792d 100644
--- a/graphql/tests/setPatchPriority/results.json
+++ b/graphql/tests/mutation/setPatchPriority/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "set-priority-bad-id.graphql",
+ "query_file": "set_priority_bad_id.graphql",
"result": {
"errors": [
{
@@ -18,7 +18,7 @@
}
},
{
- "query_file": "set-priority.graphql",
+ "query_file": "set_priority.graphql",
"result": {
"data": {
"setPatchPriority": "5e4ff3abe3c3317e352062e4"
@@ -26,7 +26,7 @@
}
},
{
- "query_file": "set-priority-too-high-for-permission-level.graphql",
+ "query_file": "set_priority_too_high_for_permission_level.graphql",
"result": {
"errors": [
{
diff --git a/graphql/tests/spawnHost/data.json b/graphql/tests/mutation/spawnHost/data.json
similarity index 100%
rename from graphql/tests/spawnHost/data.json
rename to graphql/tests/mutation/spawnHost/data.json
diff --git a/graphql/tests/spawnHost/queries/spawn-host.graphql b/graphql/tests/mutation/spawnHost/queries/spawn_host.graphql
similarity index 100%
rename from graphql/tests/spawnHost/queries/spawn-host.graphql
rename to graphql/tests/mutation/spawnHost/queries/spawn_host.graphql
diff --git a/graphql/tests/spawnHost/results.json b/graphql/tests/mutation/spawnHost/results.json
similarity index 91%
rename from graphql/tests/spawnHost/results.json
rename to graphql/tests/mutation/spawnHost/results.json
index 2416c26b949..575a30d8600 100644
--- a/graphql/tests/spawnHost/results.json
+++ b/graphql/tests/mutation/spawnHost/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "spawn-host.graphql",
+ "query_file": "spawn_host.graphql",
"result": {
"data": {
"spawnHost": {
diff --git a/graphql/tests/spawnVolume/data.json b/graphql/tests/mutation/spawnVolume/data.json
similarity index 100%
rename from graphql/tests/spawnVolume/data.json
rename to graphql/tests/mutation/spawnVolume/data.json
diff --git a/graphql/tests/spawnVolume/queries/availabilityZoneFail.graphql b/graphql/tests/mutation/spawnVolume/queries/availability_zone_fail.graphql
similarity index 100%
rename from graphql/tests/spawnVolume/queries/availabilityZoneFail.graphql
rename to graphql/tests/mutation/spawnVolume/queries/availability_zone_fail.graphql
diff --git a/graphql/tests/spawnVolume/queries/expirationFail.graphql b/graphql/tests/mutation/spawnVolume/queries/expiration_fail.graphql
similarity index 100%
rename from graphql/tests/spawnVolume/queries/expirationFail.graphql
rename to graphql/tests/mutation/spawnVolume/queries/expiration_fail.graphql
diff --git a/graphql/tests/spawnVolume/queries/noExpirationSuccess.graphql b/graphql/tests/mutation/spawnVolume/queries/no_expiration_success.graphql
similarity index 100%
rename from graphql/tests/spawnVolume/queries/noExpirationSuccess.graphql
rename to graphql/tests/mutation/spawnVolume/queries/no_expiration_success.graphql
diff --git a/graphql/tests/spawnVolume/queries/spawnAndAttachSuccess.graphql b/graphql/tests/mutation/spawnVolume/queries/spawn_and_attach_success.graphql
similarity index 100%
rename from graphql/tests/spawnVolume/queries/spawnAndAttachSuccess.graphql
rename to graphql/tests/mutation/spawnVolume/queries/spawn_and_attach_success.graphql
diff --git a/graphql/tests/spawnVolume/queries/spawnHostSuccessNoOptionalParams.graphql b/graphql/tests/mutation/spawnVolume/queries/spawn_host_success_no_optional_params.graphql
similarity index 100%
rename from graphql/tests/spawnVolume/queries/spawnHostSuccessNoOptionalParams.graphql
rename to graphql/tests/mutation/spawnVolume/queries/spawn_host_success_no_optional_params.graphql
diff --git a/graphql/tests/spawnVolume/queries/withExpirationSuccess.graphql b/graphql/tests/mutation/spawnVolume/queries/with_expiration_success.graphql
similarity index 100%
rename from graphql/tests/spawnVolume/queries/withExpirationSuccess.graphql
rename to graphql/tests/mutation/spawnVolume/queries/with_expiration_success.graphql
diff --git a/graphql/tests/spawnVolume/results.json b/graphql/tests/mutation/spawnVolume/results.json
similarity index 64%
rename from graphql/tests/spawnVolume/results.json
rename to graphql/tests/mutation/spawnVolume/results.json
index 2dc299411a1..693e1712257 100644
--- a/graphql/tests/spawnVolume/results.json
+++ b/graphql/tests/mutation/spawnVolume/results.json
@@ -1,11 +1,11 @@
{
"tests": [
{
- "query_file": "availabilityZoneFail.graphql",
+ "query_file": "availability_zone_fail.graphql",
"result": {
"errors": [
{
- "message": "Valid availability zones are: [us-east-1a]",
+ "message": "invalid availability zone 'thangthang', valid availability zones are: [us-east-1a]",
"path": ["spawnVolume"],
"extensions": { "code": "INPUT_VALIDATION_ERROR" }
}
@@ -14,19 +14,19 @@
}
},
{
- "query_file": "spawnHostSuccessNoOptionalParams.graphql",
+ "query_file": "spawn_host_success_no_optional_params.graphql",
"result": { "data": { "spawnVolume": true } }
},
{
- "query_file": "spawnAndAttachSuccess.graphql",
+ "query_file": "spawn_and_attach_success.graphql",
"result": { "data": { "spawnVolume": true } }
},
{
- "query_file": "noExpirationSuccess.graphql",
+ "query_file": "no_expiration_success.graphql",
"result": { "data": { "spawnVolume": true } }
},
{
- "query_file": "expirationFail.graphql",
+ "query_file": "expiration_fail.graphql",
"result": {
"errors": [
{
@@ -39,7 +39,7 @@
}
},
{
- "query_file": "withExpirationSuccess.graphql",
+ "query_file": "with_expiration_success.graphql",
"result": { "data": { "spawnVolume": true } }
}
]
diff --git a/graphql/tests/unschedulePatchTasks/data.json b/graphql/tests/mutation/unschedulePatchTasks/data.json
similarity index 100%
rename from graphql/tests/unschedulePatchTasks/data.json
rename to graphql/tests/mutation/unschedulePatchTasks/data.json
diff --git a/graphql/tests/unschedulePatchTasks/queries/abort-unschedule-patch-tasks.graphql b/graphql/tests/mutation/unschedulePatchTasks/queries/abort_unschedule_patch_tasks.graphql
similarity index 100%
rename from graphql/tests/unschedulePatchTasks/queries/abort-unschedule-patch-tasks.graphql
rename to graphql/tests/mutation/unschedulePatchTasks/queries/abort_unschedule_patch_tasks.graphql
diff --git a/graphql/tests/unschedulePatchTasks/queries/commit-queue-dequeue.graphql b/graphql/tests/mutation/unschedulePatchTasks/queries/commit_queue_dequeue.graphql
similarity index 100%
rename from graphql/tests/unschedulePatchTasks/queries/commit-queue-dequeue.graphql
rename to graphql/tests/mutation/unschedulePatchTasks/queries/commit_queue_dequeue.graphql
diff --git a/graphql/tests/unschedulePatchTasks/queries/unschedule-patch-tasks.graphql b/graphql/tests/mutation/unschedulePatchTasks/queries/unschedule_patch_tasks.graphql
similarity index 100%
rename from graphql/tests/unschedulePatchTasks/queries/unschedule-patch-tasks.graphql
rename to graphql/tests/mutation/unschedulePatchTasks/queries/unschedule_patch_tasks.graphql
diff --git a/graphql/tests/unschedulePatchTasks/queries/unschedule-patch-tasks-bad-id.graphql b/graphql/tests/mutation/unschedulePatchTasks/queries/unschedule_patch_tasks_bad_id.graphql
similarity index 100%
rename from graphql/tests/unschedulePatchTasks/queries/unschedule-patch-tasks-bad-id.graphql
rename to graphql/tests/mutation/unschedulePatchTasks/queries/unschedule_patch_tasks_bad_id.graphql
diff --git a/graphql/tests/unschedulePatchTasks/results.json b/graphql/tests/mutation/unschedulePatchTasks/results.json
similarity index 77%
rename from graphql/tests/unschedulePatchTasks/results.json
rename to graphql/tests/mutation/unschedulePatchTasks/results.json
index 4f1702b425a..537a939ec53 100644
--- a/graphql/tests/unschedulePatchTasks/results.json
+++ b/graphql/tests/mutation/unschedulePatchTasks/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "unschedule-patch-tasks-bad-id.graphql",
+ "query_file": "unschedule_patch_tasks_bad_id.graphql",
"result": {
"errors": [
{
@@ -18,7 +18,7 @@
}
},
{
- "query_file": "unschedule-patch-tasks.graphql",
+ "query_file": "unschedule_patch_tasks.graphql",
"result": {
"data": {
"unschedulePatchTasks": "5e4ff3abe3c3317e352062e4"
@@ -26,7 +26,7 @@
}
},
{
- "query_file": "abort-unschedule-patch-tasks.graphql",
+ "query_file": "abort_unschedule_patch_tasks.graphql",
"result": {
"data": {
"unschedulePatchTasks": "5e4ff3abe3c3317e352062e4"
@@ -34,7 +34,7 @@
}
},
{
- "query_file": "commit-queue-dequeue.graphql",
+ "query_file": "commit_queue_dequeue.graphql",
"result": {
"data": {
"unschedulePatchTasks": "123456789012345678901234"
diff --git a/graphql/tests/updateHostStatus/data.json b/graphql/tests/mutation/updateHostStatus/data.json
similarity index 100%
rename from graphql/tests/updateHostStatus/data.json
rename to graphql/tests/mutation/updateHostStatus/data.json
diff --git a/graphql/tests/updateHostStatus/queries/empty-array.graphql b/graphql/tests/mutation/updateHostStatus/queries/empty_array.graphql
similarity index 100%
rename from graphql/tests/updateHostStatus/queries/empty-array.graphql
rename to graphql/tests/mutation/updateHostStatus/queries/empty_array.graphql
diff --git a/graphql/tests/updateHostStatus/queries/invalid-status.graphql b/graphql/tests/mutation/updateHostStatus/queries/invalid_status.graphql
similarity index 100%
rename from graphql/tests/updateHostStatus/queries/invalid-status.graphql
rename to graphql/tests/mutation/updateHostStatus/queries/invalid_status.graphql
diff --git a/graphql/tests/updateHostStatus/queries/multiple-hosts.graphql b/graphql/tests/mutation/updateHostStatus/queries/multiple_hosts.graphql
similarity index 100%
rename from graphql/tests/updateHostStatus/queries/multiple-hosts.graphql
rename to graphql/tests/mutation/updateHostStatus/queries/multiple_hosts.graphql
diff --git a/graphql/tests/updateHostStatus/queries/no-hosts-found.graphql b/graphql/tests/mutation/updateHostStatus/queries/no_hosts_found.graphql
similarity index 100%
rename from graphql/tests/updateHostStatus/queries/no-hosts-found.graphql
rename to graphql/tests/mutation/updateHostStatus/queries/no_hosts_found.graphql
diff --git a/graphql/tests/updateHostStatus/queries/single-host.graphql b/graphql/tests/mutation/updateHostStatus/queries/single_host.graphql
similarity index 100%
rename from graphql/tests/updateHostStatus/queries/single-host.graphql
rename to graphql/tests/mutation/updateHostStatus/queries/single_host.graphql
diff --git a/graphql/tests/updateHostStatus/queries/user-has-no-permission-to-edit-host.graphql b/graphql/tests/mutation/updateHostStatus/queries/user_has_no_permission_to_edit_host.graphql
similarity index 100%
rename from graphql/tests/updateHostStatus/queries/user-has-no-permission-to-edit-host.graphql
rename to graphql/tests/mutation/updateHostStatus/queries/user_has_no_permission_to_edit_host.graphql
diff --git a/graphql/tests/updateHostStatus/results.json b/graphql/tests/mutation/updateHostStatus/results.json
similarity index 81%
rename from graphql/tests/updateHostStatus/results.json
rename to graphql/tests/mutation/updateHostStatus/results.json
index f5eff5d704c..499cbaec72b 100644
--- a/graphql/tests/updateHostStatus/results.json
+++ b/graphql/tests/mutation/updateHostStatus/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "empty-array.graphql",
+ "query_file": "empty_array.graphql",
"result": {
"errors": [
{
@@ -16,7 +16,7 @@
}
},
{
- "query_file": "multiple-hosts.graphql",
+ "query_file": "multiple_hosts.graphql",
"result": {
"data": {
"updateHostStatus": 2
@@ -24,7 +24,7 @@
}
},
{
- "query_file": "no-hosts-found.graphql",
+ "query_file": "no_hosts_found.graphql",
"result": {
"errors": [
{
@@ -39,7 +39,7 @@
}
},
{
- "query_file": "single-host.graphql",
+ "query_file": "single_host.graphql",
"result": {
"data": {
"updateHostStatus": 1
@@ -47,7 +47,7 @@
}
},
{
- "query_file": "user-has-no-permission-to-edit-host.graphql",
+ "query_file": "user_has_no_permission_to_edit_host.graphql",
"result": {
"data": {
"updateHostStatus": 0
@@ -55,7 +55,7 @@
}
},
{
- "query_file": "invalid-status.graphql",
+ "query_file": "invalid_status.graphql",
"result": {
"errors": [
{
diff --git a/graphql/tests/subnetAvailabilityZones/data.json b/graphql/tests/mutation/updatePublicKey/data.json
similarity index 100%
rename from graphql/tests/subnetAvailabilityZones/data.json
rename to graphql/tests/mutation/updatePublicKey/data.json
diff --git a/graphql/tests/updatePublicKey/queries/error-1.graphql b/graphql/tests/mutation/updatePublicKey/queries/error_1.graphql
similarity index 100%
rename from graphql/tests/updatePublicKey/queries/error-1.graphql
rename to graphql/tests/mutation/updatePublicKey/queries/error_1.graphql
diff --git a/graphql/tests/updatePublicKey/queries/error-2.graphql b/graphql/tests/mutation/updatePublicKey/queries/error_2.graphql
similarity index 100%
rename from graphql/tests/updatePublicKey/queries/error-2.graphql
rename to graphql/tests/mutation/updatePublicKey/queries/error_2.graphql
diff --git a/graphql/tests/updatePublicKey/queries/error-3.graphql b/graphql/tests/mutation/updatePublicKey/queries/error_3.graphql
similarity index 100%
rename from graphql/tests/updatePublicKey/queries/error-3.graphql
rename to graphql/tests/mutation/updatePublicKey/queries/error_3.graphql
diff --git a/graphql/tests/updatePublicKey/queries/success-1.graphql b/graphql/tests/mutation/updatePublicKey/queries/success_1.graphql
similarity index 100%
rename from graphql/tests/updatePublicKey/queries/success-1.graphql
rename to graphql/tests/mutation/updatePublicKey/queries/success_1.graphql
diff --git a/graphql/tests/updatePublicKey/queries/success-2.graphql b/graphql/tests/mutation/updatePublicKey/queries/success_2.graphql
similarity index 100%
rename from graphql/tests/updatePublicKey/queries/success-2.graphql
rename to graphql/tests/mutation/updatePublicKey/queries/success_2.graphql
diff --git a/graphql/tests/updatePublicKey/results.json b/graphql/tests/mutation/updatePublicKey/results.json
similarity index 93%
rename from graphql/tests/updatePublicKey/results.json
rename to graphql/tests/mutation/updatePublicKey/results.json
index eceeb02e870..02195d722bf 100644
--- a/graphql/tests/updatePublicKey/results.json
+++ b/graphql/tests/mutation/updatePublicKey/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "success-1.graphql",
+ "query_file": "success_1.graphql",
"result": {
"data": {
"updatePublicKey": [
@@ -18,7 +18,7 @@
}
},
{
- "query_file": "success-2.graphql",
+ "query_file": "success_2.graphql",
"result": {
"data": {
"updatePublicKey": [
@@ -38,7 +38,7 @@
}
},
{
- "query_file": "error-1.graphql",
+ "query_file": "error_1.graphql",
"result": {
"errors": [
{
@@ -51,7 +51,7 @@
}
},
{
- "query_file": "error-2.graphql",
+ "query_file": "error_2.graphql",
"result": {
"errors": [
{
@@ -64,7 +64,7 @@
}
},
{
- "query_file": "error-3.graphql",
+ "query_file": "error_3.graphql",
"result": {
"errors": [
{
diff --git a/graphql/tests/updatePublicKey/data.json b/graphql/tests/mutation/updateUserSettings/data.json
similarity index 100%
rename from graphql/tests/updatePublicKey/data.json
rename to graphql/tests/mutation/updateUserSettings/data.json
diff --git a/graphql/tests/mutation/updateUserSettings/queries/update_user_settings.graphql b/graphql/tests/mutation/updateUserSettings/queries/update_user_settings.graphql
new file mode 100644
index 00000000000..dbecfc24c76
--- /dev/null
+++ b/graphql/tests/mutation/updateUserSettings/queries/update_user_settings.graphql
@@ -0,0 +1,9 @@
+mutation {
+ updateUserSettings(
+ userSettings: {
+ timezone: "UTC"
+ slackUsername: "mohamed.khelif"
+ slackMemberId: "testslackuser"
+ }
+ )
+}
diff --git a/graphql/tests/mutation/updateUserSettings/results.json b/graphql/tests/mutation/updateUserSettings/results.json
new file mode 100644
index 00000000000..4639857abfe
--- /dev/null
+++ b/graphql/tests/mutation/updateUserSettings/results.json
@@ -0,0 +1,12 @@
+{
+ "tests": [
+ {
+ "query_file": "update_user_settings.graphql",
+ "result": {
+ "data": {
+ "updateUserSettings": true
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/updateVolume/data.json b/graphql/tests/mutation/updateVolume/data.json
similarity index 100%
rename from graphql/tests/updateVolume/data.json
rename to graphql/tests/mutation/updateVolume/data.json
diff --git a/graphql/tests/updateVolume/queries/checkUpdate.graphql b/graphql/tests/mutation/updateVolume/queries/check_update.graphql
similarity index 81%
rename from graphql/tests/updateVolume/queries/checkUpdate.graphql
rename to graphql/tests/mutation/updateVolume/queries/check_update.graphql
index 2205d0b0de9..e11bfd1da0e 100644
--- a/graphql/tests/updateVolume/queries/checkUpdate.graphql
+++ b/graphql/tests/mutation/updateVolume/queries/check_update.graphql
@@ -1,4 +1,4 @@
-{
+query {
myVolumes {
displayName
}
diff --git a/graphql/tests/updateVolume/queries/invalidInput.graphql b/graphql/tests/mutation/updateVolume/queries/invalid_input.graphql
similarity index 100%
rename from graphql/tests/updateVolume/queries/invalidInput.graphql
rename to graphql/tests/mutation/updateVolume/queries/invalid_input.graphql
diff --git a/graphql/tests/updateVolume/queries/setNoExpiration.graphql b/graphql/tests/mutation/updateVolume/queries/set_no_expiration.graphql
similarity index 100%
rename from graphql/tests/updateVolume/queries/setNoExpiration.graphql
rename to graphql/tests/mutation/updateVolume/queries/set_no_expiration.graphql
diff --git a/graphql/tests/updateVolume/queries/updateDisplayName.graphql b/graphql/tests/mutation/updateVolume/queries/update_display_name.graphql
similarity index 100%
rename from graphql/tests/updateVolume/queries/updateDisplayName.graphql
rename to graphql/tests/mutation/updateVolume/queries/update_display_name.graphql
diff --git a/graphql/tests/updateVolume/queries/updateExpirationTime.graphql b/graphql/tests/mutation/updateVolume/queries/update_expiration_time.graphql
similarity index 100%
rename from graphql/tests/updateVolume/queries/updateExpirationTime.graphql
rename to graphql/tests/mutation/updateVolume/queries/update_expiration_time.graphql
diff --git a/graphql/tests/updateVolume/results.json b/graphql/tests/mutation/updateVolume/results.json
similarity index 72%
rename from graphql/tests/updateVolume/results.json
rename to graphql/tests/mutation/updateVolume/results.json
index f62bc906611..08cfe0d7bd8 100644
--- a/graphql/tests/updateVolume/results.json
+++ b/graphql/tests/mutation/updateVolume/results.json
@@ -1,7 +1,7 @@
{
"tests": [
{
- "query_file": "invalidInput.graphql",
+ "query_file": "invalid_input.graphql",
"result": {
"errors": [
{
@@ -14,21 +14,21 @@
}
},
{
- "query_file": "updateDisplayName.graphql",
+ "query_file": "update_display_name.graphql",
"result": { "data": { "updateVolume": true } }
},
{
- "query_file": "checkUpdate.graphql",
+ "query_file": "check_update.graphql",
"result": {
"data": { "myVolumes": [{ "displayName": "i like turtles" }] }
}
},
{
- "query_file": "setNoExpiration.graphql",
+ "query_file": "set_no_expiration.graphql",
"result": { "data": { "updateVolume": true } }
},
{
- "query_file": "updateExpirationTime.graphql",
+ "query_file": "update_expiration_time.graphql",
"result": { "data": { "updateVolume": true } }
}
]
diff --git a/graphql/tests/overrideTaskDependencies/data.json b/graphql/tests/overrideTaskDependencies/data.json
deleted file mode 100644
index b5ecf7c7020..00000000000
--- a/graphql/tests/overrideTaskDependencies/data.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "tasks": [
- {
- "_id": "t1",
- "display_name": "cq merge",
- "branch": "p1",
- "status": "undispatched",
- "build_id": "b1",
- "r": "merge_test",
- "commit_queue_merge": true,
- "activated": true,
- "version": "123456789012345678901234",
- "depends_on": [
- {
- "_id": "dep1",
- "status": "success",
- "unattainable": true
- }
- ]
- },
- {
- "_id": "dep1",
- "status": "failed",
- "display_name": "a dep",
- "build_id": "b1",
- "version": "123456789012345678901234"
- }
- ],
- "builds": [
- {
- "_id": "b1",
- "status": "started",
- "build_variant": "commit-queue",
- "display_name": "~ Commit Queue",
- "tasks": [{ "id": "t1" }]
- }
- ],
- "versions": [
- {
- "_id": "123456789012345678901234"
- }
- ],
- "patches": [
- {
- "_id": {
- "$oid": "123456789012345678901234"
- }
- }
- ],
- "project_ref": [
- {
- "_id": "p1",
- "identifier": "p1",
- "commit_queue": {
- "enabled": true
- }
- }
- ],
- "commit_queue": [
- {
- "_id": "p1",
- "processing": true,
- "queue": [
- {
- "version": "123456789012345678901234",
- "issue": "123456789012345678901234",
- "source": "diff"
- }
- ]
- }
- ]
-}
diff --git a/graphql/tests/patch-taskStatuses/data.json b/graphql/tests/patch/baseTaskStatuses/data.json
similarity index 59%
rename from graphql/tests/patch-taskStatuses/data.json
rename to graphql/tests/patch/baseTaskStatuses/data.json
index 094e168d403..c4e77915322 100644
--- a/graphql/tests/patch-taskStatuses/data.json
+++ b/graphql/tests/patch/baseTaskStatuses/data.json
@@ -22,23 +22,6 @@
"owner_name": "",
"repo_name": "",
"branch_name": "main",
- "repo_kind": "",
- "build_variants_status": [
- {
- "build_variant": "ubuntu1604",
- "activated": true,
- "build_id": "evergreen_ubuntu1604_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48"
- },
- {
- "build_variant": "lint",
- "activated": true,
- "build_id": "evergreen_lint_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48"
- }
- ],
- "builds": [
- "evergreen_ubuntu1604_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48",
- "evergreen_lint_patch_5e823e1f28baeaa22ae00823d83e03082cd148ab_5e4ff3abe3c3317e352062e4_20_02_21_15_13_48"
- ],
"identifier": "evergreen",
"remote": false,
"remote_path": "",
@@ -68,109 +51,6 @@
"repo_name": "evergreen",
"branch_name": "main",
"repo_kind": "github",
- "build_variants_status": [
- {
- "build_variant": "linux-docker",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_linux_docker_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "coverage",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_coverage_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "lint",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_lint_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "osx",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-21T02:50:12.919Z"
- },
- "build_id": "evergreen_osx_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "rhel71-power8",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-21T02:50:12.919Z"
- },
- "build_id": "evergreen_rhel71_power8_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "rhel72-s390x",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-21T02:50:12.919Z"
- },
- "build_id": "evergreen_rhel72_s390x_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "race-detector",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_race_detector_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "ubuntu1604",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_ubuntu1604_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "ubuntu1604-docker",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_ubuntu1604_docker_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "ubuntu1604-arm64",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-21T02:50:12.919Z"
- },
- "build_id": "evergreen_ubuntu1604_arm64_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- },
- {
- "build_variant": "windows",
- "activated": true,
- "activate_at": {
- "$date": "2020-02-20T20:37:12.925Z"
- },
- "build_id": "evergreen_windows_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- }
- ],
- "builds": [
- "evergreen_linux_docker_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_coverage_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_lint_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_osx_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_rhel71_power8_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_rhel72_s390x_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_race_detector_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_ubuntu1604_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_ubuntu1604_docker_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_ubuntu1604_arm64_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06",
- "evergreen_windows_5e823e1f28baeaa22ae00823d83e03082cd148ab_20_02_20_20_37_06"
- ],
"identifier": "evergreen",
"remote": false,
"remote_path": "self-tests.yml",
@@ -304,43 +184,7 @@
"filename": "src/components/Navbar.tsx",
"additions": 70,
"deletions": 0
- },
- {
- "filename": "src/components/app/App.tsx",
- "additions": 78,
- "deletions": 289
- },
- {
- "filename": "src/components/navbar/DevMenu.tsx",
- "additions": 62,
- "deletions": 0
- },
- {
- "filename": "src/components/navbar/PluginsMenu.tsx",
- "additions": 42,
- "deletions": 0
- },
- {
- "filename": "src/context/ContextProvider.tsx",
- "additions": 11,
- "deletions": 0
- },
- {
- "filename": "src/context/apiClient.tsx",
- "additions": 70,
- "deletions": 0
- },
- {
- "filename": "src/context/user.tsx",
- "additions": 33,
- "deletions": 0
- },
- {
- "filename": "src/utils/isDevelopment.ts",
- "additions": 1,
- "deletions": 0
- },
- { "filename": "tslint.json", "additions": 1, "deletions": 0 }
+ }
]
},
"message": ""
@@ -362,23 +206,5 @@
"merge_commit_sha": ""
}
}
- ],
- "project_ref": [
- {
- "_id": "evergreen",
- "identifier": "evergreen"
- },
- {
- "_id": "spruce",
- "identifier": "spruce"
- },
- {
- "_id": "logkeeper",
- "identifier": "logkeeper"
- },
- {
- "_id": "sys-perf",
- "identifier": "sys-perf"
- }
]
}
diff --git a/graphql/tests/patch-taskStatuses/queries/baseTaskStatuses.graphql b/graphql/tests/patch/baseTaskStatuses/queries/base_task_statuses.graphql
similarity index 100%
rename from graphql/tests/patch-taskStatuses/queries/baseTaskStatuses.graphql
rename to graphql/tests/patch/baseTaskStatuses/queries/base_task_statuses.graphql
diff --git a/graphql/tests/patch/baseTaskStatuses/results.json b/graphql/tests/patch/baseTaskStatuses/results.json
new file mode 100644
index 00000000000..d2392af5fb6
--- /dev/null
+++ b/graphql/tests/patch/baseTaskStatuses/results.json
@@ -0,0 +1,14 @@
+{
+ "tests": [
+ {
+ "query_file": "base_task_statuses.graphql",
+ "result": {
+ "data": {
+ "patch": {
+ "baseTaskStatuses": ["failed", "success"]
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/graphql/tests/patch/data.json b/graphql/tests/patch/data.json
index e4a627f1441..83d1ee6b80a 100644
--- a/graphql/tests/patch/data.json
+++ b/graphql/tests/patch/data.json
@@ -1,4 +1,252 @@
{
+ "parser_projects": [
+ {
+ "_id": "evergreen_5e823e1f28baeaa22ae00823d83e03082cd148ab",
+ "stepback": true,
+ "command_type": "test",
+ "ignore": ["*.md", ".github/*"],
+ "tasks": [
+ {
+ "name": "compile",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-build"
+ },
+ {
+ "func": "npm-build"
+ }
+ ]
+ },
+ {
+ "name": "test",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-test"
+ },
+ {
+ "func": "attach-results"
+ }
+ ]
+ },
+ {
+ "name": "lint",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-lint"
+ }
+ ]
+ },
+ {
+ "name": "coverage",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-coverage"
+ }
+ ]
+ }
+ ],
+ "buildvariants": [
+ {
+ "name": "ubuntu1804",
+ "display_name": "Ubuntu 18.04",
+ "run_on": ["ubuntu1804-test"],
+ "tasks": [
+ {
+ "name": "compile"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_id": "5dd2e89cd1fe07048e43bb9c",
+ "stepback": true,
+ "command_type": "test",
+ "ignore": ["*.md", ".github/*"],
+ "tasks": [
+ {
+ "name": "compile",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-build"
+ },
+ {
+ "func": "npm-build"
+ }
+ ]
+ },
+ {
+ "name": "test",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-test"
+ },
+ {
+ "func": "attach-results"
+ }
+ ]
+ },
+ {
+ "name": "lint",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-lint"
+ }
+ ]
+ },
+ {
+ "name": "coverage",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-coverage"
+ }
+ ]
+ }
+ ],
+ "buildvariants": [
+ {
+ "name": "ubuntu1804",
+ "display_name": "Ubuntu 18.04",
+ "run_on": ["ubuntu1804-test"],
+ "tasks": [
+ {
+ "name": "compile"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_id": "5d7288d91f8c8a403bc34a7d",
+ "stepback": true,
+ "command_type": "test",
+ "ignore": ["*.md", ".github/*"],
+ "tasks": [
+ {
+ "name": "compile",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-build"
+ },
+ {
+ "func": "npm-build"
+ }
+ ]
+ },
+ {
+ "name": "test",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-test"
+ },
+ {
+ "func": "attach-results"
+ }
+ ]
+ },
+ {
+ "name": "lint",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-lint"
+ }
+ ]
+ },
+ {
+ "name": "coverage",
+ "commands": [
+ {
+ "func": "get-project"
+ },
+ {
+ "func": "npm-install"
+ },
+ {
+ "func": "npm-coverage"
+ }
+ ]
+ }
+ ],
+ "buildvariants": [
+ {
+ "name": "ubuntu1804",
+ "display_name": "Ubuntu 18.04",
+ "run_on": ["ubuntu1804-test"],
+ "tasks": [
+ {
+ "name": "compile"
+ }
+ ]
+ }
+ ]
+ }
+ ],
"versions": [
{
"_id": "evergreen_5e823e1f28baeaa22ae00823d83e03082cd148ab",
@@ -8,10 +256,23 @@
},
{
"_id": "5dd2e89cd1fe07048e43bb9c",
- "identifier":"spruce",
+ "identifier": "spruce",
+ "gitspec": "5e823e1f28baeaa22ae00823d83e03082cd148ab",
"r": "gitter_request",
- "requester": "gitter_request",
- "config": "stepback: true\ncommand_type: test\nignore:\n - \"*.md\"\n - \".github/*\"\ntasks:\n - name: compile\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-build\n - func: npm-build\n - name: test\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-test\n - func: attach-results\n - name: lint\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-lint\n - name: coverage\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-coverage\nbuildvariants:\n - name: ubuntu1804\n display_name: Ubuntu 18.04\n run_on:\n - ubuntu1804-test\n tasks:\n - name: compile\n"
+ "requester": "gitter_request"
+ },
+ {
+ "gitspec": "5e823e1f28baeaa22ae00823d83e03082cd148ab",
+ "_id": "5e4ff3abe3c3317e352062e4",
+ "identifier": "spruce",
+ "r": "gitter_request",
+ "requester": "gitter_request"
+ },
+ {
+ "_id": "5d7288d91f8c8a403bc34a7d",
+ "identifier": "spruce",
+ "r": "gitter_request",
+ "requester": "gitter_request"
}
],
"tasks": [
@@ -80,9 +341,7 @@
"distro": "archlinux-test",
"build_variant": "lint",
"depends_on": [],
- "distro_aliases": [
- "archlinux-build"
- ],
+ "distro_aliases": ["archlinux-build"],
"display_name": "generate-lint",
"host_id": "i-0d1a6ca179e8044b6",
"restarts": 0,
@@ -502,24 +761,12 @@
"finish_time": {
"$date": "2019-11-18T18:57:15.053Z"
},
- "build_variants": [
- "ubuntu1804"
- ],
- "tasks": [
- "compile",
- "test",
- "lint",
- "coverage"
- ],
+ "build_variants": ["ubuntu1804"],
+ "tasks": ["compile", "test", "lint", "coverage"],
"variants_tasks": [
{
"variant": "ubuntu1804",
- "tasks": [
- "lint",
- "coverage",
- "compile",
- "test"
- ],
+ "tasks": ["lint", "coverage", "compile", "test"],
"displaytasks": []
}
],
@@ -586,7 +833,8 @@
}
],
"activated": true,
- "patched_config": "\nstepback: true\ncommand_type: test\nignore:\n- \\\"*.md\\\"\n- \\\".github/*\\\"\n\nfunctions:\n get-project:\n command: git.get_project\n type: setup\n params:\n directory: spruce\n\n npm-install:\n command: subprocess.exec\n type: setup\n params:\n working_dir: spruce\n binary: npm\n args: [install]\n\n npm-test:\n command: subprocess.exec\n params:\n working_dir: spruce\n binary: npm\n args: [test, --, -u, --reporters=default, --reporters=jest-junit]\n env:\n CI: \\\"true\\\"\n\n npm-lint:\n command: subprocess.exec\n params:\n working_dir: spruce\n binary: npm\n args: [run, lint]\n\n npm-coverage:\n command: subprocess.exec\n params:\n working_dir: spruce\n binary: npm\n args: [run, coverage]\n\n attach-results:\n command: attach.xunit_results\n params:\n files:\n - \\\"./spruce/junit.xml\\\"\n\ntasks:\n- name: compile\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-build\n- name: test\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-test\n - func: attach-results\n- name: lint\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-lint\n- name: coverage\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-coverage\n- name: e2e_test\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-coverage\n\nbuildvariants:\n - name: ubuntu1804\n display_name: Ubuntu 18.04\n run_on:\n - ubuntu1804-test\n tasks:\n - name: compile\n - name: test\n - name: lint\n - name: coverage\n - name: e2e_test\n", "alias": "__github",
+ "patched_config": "\nstepback: true\ncommand_type: test\nignore:\n- \\\"*.md\\\"\n- \\\".github/*\\\"\n\nfunctions:\n get-project:\n command: git.get_project\n type: setup\n params:\n directory: spruce\n\n npm-install:\n command: subprocess.exec\n type: setup\n params:\n working_dir: spruce\n binary: npm\n args: [install]\n\n npm-test:\n command: subprocess.exec\n params:\n working_dir: spruce\n binary: npm\n args: [test, --, -u, --reporters=default, --reporters=jest-junit]\n env:\n CI: \\\"true\\\"\n\n npm-lint:\n command: subprocess.exec\n params:\n working_dir: spruce\n binary: npm\n args: [run, lint]\n\n npm-coverage:\n command: subprocess.exec\n params:\n working_dir: spruce\n binary: npm\n args: [run, coverage]\n\n attach-results:\n command: attach.xunit_results\n params:\n files:\n - \\\"./spruce/junit.xml\\\"\n\ntasks:\n- name: compile\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-build\n- name: test\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-test\n - func: attach-results\n- name: lint\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-lint\n- name: coverage\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-coverage\n- name: e2e_test\n commands:\n - func: get-project\n - func: npm-install\n - func: npm-coverage\n\nbuildvariants:\n - name: ubuntu1804\n display_name: Ubuntu 18.04\n run_on:\n - ubuntu1804-test\n tasks:\n - name: compile\n - name: test\n - name: lint\n - name: coverage\n - name: e2e_test\n",
+ "alias": "__github",
"github_patch_data": {
"pr_number": 27,
"base_owner": "evergreen-ci",
@@ -670,12 +918,8 @@
"activated": true,
"githash": "5e823e1f28baeaa22ae00823d83e03082cd148ab",
"triggers": {
- "aliases": [
- "evergreen_alias"
- ],
- "child_patches": [
- "5e4ff3abe3c3317e352062e4"
- ]
+ "aliases": ["evergreen_alias"],
+ "child_patches": ["5e4ff3abe3c3317e352062e4"]
},
"patches": [
{
@@ -736,26 +980,12 @@
},
"start_time": null,
"finish_time": null,
- "build_variants": [
- "ubuntu1604"
- ],
- "tasks": [
- "coverage",
- "e2e_test",
- "compile",
- "test",
- "lint"
- ],
+ "build_variants": ["ubuntu1604"],
+ "tasks": ["coverage", "e2e_test", "compile", "test", "lint"],
"variants_tasks": [
{
"variant": "ubuntu1604",
- "tasks": [
- "coverage",
- "e2e_test",
- "compile",
- "test",
- "lint"
- ],
+ "tasks": ["coverage", "e2e_test", "compile", "test", "lint"],
"displaytasks": []
}
],
@@ -792,6 +1022,46 @@
"merge_commit_sha": ""
}
},
+ {
+ "_id": {
+ "$oid": "5e6bb9e23066155a993e0f1b"
+ },
+ "desc": "Patch with display tasks",
+ "branch": "evergreen",
+ "githash": "25ab18d7ed2775f27be77d8135ddd841c78cfe28",
+ "patch_number": 452,
+ "author": "admin",
+ "version": "",
+ "status": "created",
+ "create_time": {
+ "$date": {
+ "$numberLong": "1584118242981"
+ }
+ },
+ "start_time": {
+ "$date": {
+ "$numberLong": "-62135596800000"
+ }
+ },
+ "finish_time": {
+ "$date": {
+ "$numberLong": "-62135596800000"
+ }
+ },
+ "build_variants": ["ubuntu1604"],
+ "tasks": ["test-graphql"],
+ "variants_tasks": [
+ {
+ "variant": "ubuntu1604",
+ "tasks": ["test-graphql"],
+ "displaytasks": []
+ }
+ ],
+ "patches": [],
+ "activated": false,
+ "alias": "",
+ "patched_config": "buildvariants:\n - display_name: Ubuntu 16.04\n name: ubuntu1604\n modules:\n - self\n run_on:\n - ubuntu1604-test\n expansions:\n module_prefix: hello\n tasks:\n - name: unit_tests\n - name: validate_commit_message\n - name: patch_only_task\n - name: batchtime_task\n batchtime: 4\n display_tasks:\n - name: display_task\n execution_tasks:\n - validate_commit_message\n - name: display_task2\n execution_tasks:\n - unit_tests\n\nfunctions:\n create virtualenv:\n - command: shell.exec\n params:\n working_dir: src\n script: |\n echo \"noop\"\n\nparameters:\n - key: my_param\n value: hello world1!\n description: something to test parameters1\n\npre:\n - command: git.get_project\n params:\n directory: src\n - func: create virtualenv\n\npost:\n - command: attach.xunit_results\n params:\n file: src/junit-*.xml\n\ntasks:\n - name: unit_tests\n commands:\n - command: shell.exec\n params:\n working_dir: src\n script: |\n echo \"my_param: ${my_param}, your_param: ${your_param}\"\n - name: batchtime_task\n commands:\n - command: shell.exec\n params:\n working_dir: src\n script: |\n echo \"noop2\"\n - name: validate_commit_message\n commands:\n - command: shell.exec\n params:\n script: |\n set -o verbose\n set -o errexit\n if [ \"${is_commit_queue}\" = \"true\" ]; then\n cat > commit_message.txt < 0 {
+ childVersions := []*restModel.APIVersion{}
+ for _, cp := range childPatchIds {
+ // this calls the graphql Version query resolver
+ cv, err := r.Query().Version(ctx, cp)
+ if err != nil {
+ // before erroring due to the version being nil or not found,
+ // fetch the child patch to see if it's activated
+ p, err := patch.FindOneId(cp)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Encountered an error while fetching a child patch: %s", err.Error()))
+ }
+ if p == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to child patch %s", cp))
+ }
+ if p.Version != "" {
+ // only return the error if the version is activated (and we therefore expect it to be there)
+ return nil, InternalServerError.Send(ctx, "An unexpected error occurred. Could not find a child version and expected one.")
+ }
+ }
+ if cv != nil {
+ childVersions = append(childVersions, cv)
+ }
+ }
+ return childVersions, nil
+ }
+ return nil, nil
+}
+
+// IsPatch is the resolver for the isPatch field.
+func (r *versionResolver) IsPatch(ctx context.Context, obj *restModel.APIVersion) (bool, error) {
+ return evergreen.IsPatchRequester(*obj.Requester), nil
+}
+
+// Manifest is the resolver for the manifest field.
+func (r *versionResolver) Manifest(ctx context.Context, obj *restModel.APIVersion) (*Manifest, error) {
+ m, err := manifest.FindFromVersion(*obj.Id, *obj.Project, *obj.Revision, *obj.Requester)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error fetching manifest for version %s : %s", *obj.Id, err.Error()))
+ }
+ if m == nil {
+ return nil, nil
+ }
+ versionManifest := Manifest{
+ ID: m.Id,
+ Revision: m.Revision,
+ Project: m.ProjectName,
+ Branch: m.Branch,
+ IsBase: m.IsBase,
+ ModuleOverrides: m.ModuleOverrides,
+ }
+ modules := map[string]interface{}{}
+ for key, module := range m.Modules {
+ modules[key] = module
+ }
+ versionManifest.Modules = modules
+
+ return &versionManifest, nil
+}
+
+// Patch is the resolver for the patch field.
+func (r *versionResolver) Patch(ctx context.Context, obj *restModel.APIVersion) (*restModel.APIPatch, error) {
+ if !evergreen.IsPatchRequester(*obj.Requester) {
+ return nil, nil
+ }
+ apiPatch, err := data.FindPatchById(*obj.Id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Couldn't find a patch with id: `%s` %s", *obj.Id, err.Error()))
+ }
+ return apiPatch, nil
+}
+
+// PreviousVersion is the resolver for the previousVersion field.
+func (r *versionResolver) PreviousVersion(ctx context.Context, obj *restModel.APIVersion) (*restModel.APIVersion, error) {
+ if !obj.IsPatchRequester() {
+ previousVersion, err := model.VersionFindOne(model.VersionByProjectIdAndOrder(utility.FromStringPtr(obj.Project), obj.Order-1))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding previous version for `%s`: %s", *obj.Id, err.Error()))
+ }
+ if previousVersion == nil {
+ return nil, nil
+ }
+ apiVersion := restModel.APIVersion{}
+ apiVersion.BuildFromService(*previousVersion)
+ return &apiVersion, nil
+ } else {
+ return nil, nil
+ }
+}
+
+// ProjectMetadata is the resolver for the projectMetadata field.
+func (r *versionResolver) ProjectMetadata(ctx context.Context, obj *restModel.APIVersion) (*restModel.APIProjectRef, error) {
+ apiProjectRef, err := getProjectMetadata(ctx, obj.Project, obj.Id)
+ return apiProjectRef, err
+}
+
+// Status is the resolver for the status field.
+func (r *versionResolver) Status(ctx context.Context, obj *restModel.APIVersion) (string, error) {
+ collectiveStatusArray, err := getCollectiveStatusArray(*obj)
+ if err != nil {
+ return "", InternalServerError.Send(ctx, fmt.Sprintf("getting collective status array: %s", err.Error()))
+ }
+ status := patch.GetCollectiveStatus(collectiveStatusArray)
+ return status, nil
+}
+
+// TaskCount is the resolver for the taskCount field.
+func (r *versionResolver) TaskCount(ctx context.Context, obj *restModel.APIVersion) (*int, error) {
+ taskCount, err := task.Count(db.Query(task.DisplayTasksByVersion(*obj.Id, !obj.IsPatchRequester())))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting task count for version `%s`: %s", *obj.Id, err.Error()))
+ }
+ return &taskCount, nil
+}
+
+// Tasks is the resolver for the tasks field.
+func (r *versionResolver) Tasks(ctx context.Context, obj *restModel.APIVersion, options TaskFilterOptions) (*VersionTasks, error) {
+ versionId := utility.FromStringPtr(obj.Id)
+ pageParam := 0
+ if options.Page != nil {
+ pageParam = *options.Page
+ }
+ limitParam := 0
+ if options.Limit != nil {
+ limitParam = *options.Limit
+ }
+ variantParam := ""
+ if options.Variant != nil {
+ variantParam = *options.Variant
+ }
+ taskNameParam := ""
+ if options.TaskName != nil {
+ taskNameParam = *options.TaskName
+ }
+ var taskSorts []task.TasksSortOrder
+ if len(options.Sorts) > 0 {
+ taskSorts = []task.TasksSortOrder{}
+ for _, singleSort := range options.Sorts {
+ key := ""
+ switch singleSort.Key {
+ // the keys here should be the keys for the column headers of the tasks table
+ case TaskSortCategoryName:
+ key = task.DisplayNameKey
+ case TaskSortCategoryStatus:
+ key = task.DisplayStatusKey
+ case TaskSortCategoryBaseStatus:
+ key = task.BaseTaskStatusKey
+ case TaskSortCategoryVariant:
+ key = task.BuildVariantKey
+ case TaskSortCategoryDuration:
+ key = task.TimeTakenKey
+ default:
+ return nil, InputValidationError.Send(ctx, fmt.Sprintf("invalid sort key: '%s'", singleSort.Key))
+ }
+ order := 1
+ if singleSort.Direction == SortDirectionDesc {
+ order = -1
+ }
+ taskSorts = append(taskSorts, task.TasksSortOrder{Key: key, Order: order})
+ }
+ }
+ v, err := model.VersionFindOne(model.VersionById(versionId).WithFields(model.VersionRequesterKey))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding version with id: '%s': %s", versionId, err.Error()))
+ }
+ if v == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find version with id: '%s'", versionId))
+ }
+
+ opts := task.GetTasksByVersionOptions{
+ Statuses: getValidTaskStatusesFilter(options.Statuses),
+ BaseStatuses: getValidTaskStatusesFilter(options.BaseStatuses),
+ Variants: []string{variantParam},
+ TaskNames: []string{taskNameParam},
+ Page: pageParam,
+ Limit: limitParam,
+ Sorts: taskSorts,
+ IncludeBaseTasks: true,
+ // If the version is a patch, we want to exclude inactive tasks by default.
+ IncludeNeverActivatedTasks: !evergreen.IsPatchRequester(v.Requester) || utility.FromBoolPtr(options.IncludeEmptyActivation) || utility.FromBoolPtr(options.IncludeNeverActivatedTasks),
+ IncludeBuildVariantDisplayName: true,
+ IsMainlineCommit: !evergreen.IsPatchRequester(v.Requester),
+ }
+ tasks, count, err := task.GetTasksByVersion(ctx, versionId, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting tasks for version with id '%s': %s", versionId, err.Error()))
+ }
+
+ var apiTasks []*restModel.APITask
+ for _, t := range tasks {
+ apiTask := restModel.APITask{}
+ err := apiTask.BuildFromService(&t, nil)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("converting task item db model to api model: %s", err.Error()))
+ }
+ apiTasks = append(apiTasks, &apiTask)
+ }
+ versionTasks := VersionTasks{
+ Count: count,
+ Data: apiTasks,
+ }
+ return &versionTasks, nil
+}
+
+// TaskStatuses is the resolver for the taskStatuses field.
+func (r *versionResolver) TaskStatuses(ctx context.Context, obj *restModel.APIVersion) ([]string, error) {
+ defaultSort := []task.TasksSortOrder{
+ {Key: task.DisplayNameKey, Order: 1},
+ }
+ opts := task.GetTasksByVersionOptions{
+ Sorts: defaultSort,
+ IncludeBaseTasks: false,
+ FieldsToProject: []string{task.DisplayStatusKey},
+ IncludeBuildVariantDisplayName: false,
+ }
+ tasks, _, err := task.GetTasksByVersion(ctx, *obj.Id, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting version tasks: %s", err.Error()))
+ }
+ return getAllTaskStatuses(tasks), nil
+}
+
+// TaskStatusStats is the resolver for the taskStatusStats field.
+func (r *versionResolver) TaskStatusStats(ctx context.Context, obj *restModel.APIVersion, options BuildVariantOptions) (*task.TaskStats, error) {
+ opts := task.GetTasksByVersionOptions{
+ IncludeBaseTasks: false,
+ IncludeExecutionTasks: false,
+ TaskNames: options.Tasks,
+ Variants: options.Variants,
+ Statuses: getValidTaskStatusesFilter(options.Statuses),
+ // If the version is a patch, we don't want to include its never activated tasks.
+ IncludeNeverActivatedTasks: !obj.IsPatchRequester(),
+ }
+ if len(options.Variants) != 0 {
+ opts.IncludeBuildVariantDisplayName = true // we only need the buildVariantDisplayName if we plan on filtering on it.
+ }
+ stats, err := task.GetTaskStatsByVersion(*obj.Id, opts)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("getting version task status stats: %s", err.Error()))
+ }
+ return stats, nil
+}
+
+// UpstreamProject is the resolver for the upstreamProject field.
+func (r *versionResolver) UpstreamProject(ctx context.Context, obj *restModel.APIVersion) (*UpstreamProject, error) {
+ v, err := model.VersionFindOneId(utility.FromStringPtr(obj.Id))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding version %s: '%s'", *obj.Id, err.Error()))
+ }
+ if v == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Version %s not found", *obj.Id))
+ }
+ if v.TriggerID == "" || v.TriggerType == "" {
+ return nil, nil
+ }
+
+ var projectID string
+ var upstreamProject *UpstreamProject
+ if v.TriggerType == model.ProjectTriggerLevelTask {
+ upstreamTask, err := task.FindOneId(v.TriggerID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream task %s: '%s'", v.TriggerID, err.Error()))
+ }
+ if upstreamTask == nil {
+ return nil, ResourceNotFound.Send(ctx, "upstream task not found")
+ }
+
+ apiTask := restModel.APITask{}
+ if err = apiTask.BuildFromService(upstreamTask, nil); err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error building APITask from service for `%s`: %s", upstreamTask.Id, err.Error()))
+ }
+
+ projectID = upstreamTask.Project
+ upstreamProject = &UpstreamProject{
+ Revision: upstreamTask.Revision,
+ Task: &apiTask,
+ }
+ } else if v.TriggerType == model.ProjectTriggerLevelBuild {
+ upstreamBuild, err := build.FindOneId(v.TriggerID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream build %s: '%s'", v.TriggerID, err.Error()))
+ }
+ if upstreamBuild == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Upstream build %s not found", v.TriggerID))
+ }
+
+ upstreamVersion, err := model.VersionFindOneId(utility.FromStringPtr(&upstreamBuild.Version))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream version %s: '%s'", *obj.Id, err.Error()))
+ }
+ if upstreamVersion == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("upstream version %s not found", *obj.Id))
+ }
+
+ apiVersion := restModel.APIVersion{}
+ apiVersion.BuildFromService(*upstreamVersion)
+
+ projectID = upstreamVersion.Identifier
+ upstreamProject = &UpstreamProject{
+ Revision: upstreamBuild.Revision,
+ Version: &apiVersion,
+ }
+ }
+ upstreamProjectRef, err := model.FindBranchProjectRef(projectID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding upstream project, project: %s, error: '%s'", projectID, err.Error()))
+ }
+ if upstreamProjectRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Upstream project %s not found", projectID))
+ }
+
+ upstreamProject.Owner = upstreamProjectRef.Owner
+ upstreamProject.Repo = upstreamProjectRef.Repo
+ upstreamProject.Project = upstreamProjectRef.Identifier
+ upstreamProject.TriggerID = v.TriggerID
+ upstreamProject.TriggerType = v.TriggerType
+ return upstreamProject, nil
+}
+
+// VersionTiming is the resolver for the versionTiming field.
+func (r *versionResolver) VersionTiming(ctx context.Context, obj *restModel.APIVersion) (*VersionTiming, error) {
+ v, err := model.VersionFindOneId(*obj.Id)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding version `%s`: %s", *obj.Id, err.Error()))
+ }
+ if v == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding version `%s`: %s", *obj.Id, "Version not found"))
+ }
+ timeTaken, makespan, err := v.GetTimeSpent()
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error getting timing for version `%s`: %s", *obj.Id, err.Error()))
+ }
+ // return nil if rounded timeTaken/makespan == 0s
+ t := timeTaken.Round(time.Second)
+ m := makespan.Round(time.Second)
+
+ var apiTimeTaken restModel.APIDuration
+ var apiMakespan restModel.APIDuration
+ if t.Seconds() != 0 {
+ apiTimeTaken = restModel.NewAPIDuration(t)
+ }
+ if m.Seconds() != 0 {
+ apiMakespan = restModel.NewAPIDuration(m)
+ }
+
+ return &VersionTiming{
+ TimeTaken: &apiTimeTaken,
+ Makespan: &apiMakespan,
+ }, nil
+}
+
+// ExternalLinksForMetadata is the resolver for the externalLinksForMetadata field.
+func (r *versionResolver) ExternalLinksForMetadata(ctx context.Context, obj *restModel.APIVersion) ([]*ExternalLinkForMetadata, error) {
+ pRef, err := data.FindProjectById(*obj.Project, false, false)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding project `%s`: %s", *obj.Project, err.Error()))
+ }
+ if pRef == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Project `%s` not found", *obj.Project))
+ }
+ var externalLinks []*ExternalLinkForMetadata
+ for _, link := range pRef.ExternalLinks {
+ // replace {version_id} with the actual version id
+ formattedURL := strings.Replace(link.URLTemplate, "{version_id}", *obj.Id, -1)
+ externalLinks = append(externalLinks, &ExternalLinkForMetadata{
+ URL: formattedURL,
+ DisplayName: link.DisplayName,
+ })
+ }
+ return externalLinks, nil
+}
+
+// Warnings is the resolver for the warnings field.
+func (r *versionResolver) Warnings(ctx context.Context, obj *restModel.APIVersion) ([]string, error) {
+ v, err := model.VersionFindOneId(utility.FromStringPtr(obj.Id))
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding version with id `%s`: %s", *obj.Id, err.Error()))
+ }
+ if v == nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("finding version with id `%s`: %s", *obj.Id, "version not found"))
+ }
+ return v.Warnings, nil
+}
+
+// Version returns VersionResolver implementation.
+func (r *Resolver) Version() VersionResolver { return &versionResolver{r} }
+
+type versionResolver struct{ *Resolver }
diff --git a/graphql/volume_resolver.go b/graphql/volume_resolver.go
new file mode 100644
index 00000000000..2c6b4056101
--- /dev/null
+++ b/graphql/volume_resolver.go
@@ -0,0 +1,34 @@
+package graphql
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/evergreen-ci/evergreen/model/host"
+ restModel "github.com/evergreen-ci/evergreen/rest/model"
+)
+
+// Host is the resolver for the host field.
+func (r *volumeResolver) Host(ctx context.Context, obj *restModel.APIVolume) (*restModel.APIHost, error) {
+ if obj.HostID == nil || *obj.HostID == "" {
+ return nil, nil
+ }
+ h, err := host.FindOneId(*obj.HostID)
+ if err != nil {
+ return nil, InternalServerError.Send(ctx, fmt.Sprintf("Error finding host %s: %s", *obj.HostID, err.Error()))
+ }
+ if h == nil {
+ return nil, ResourceNotFound.Send(ctx, fmt.Sprintf("Unable to find host %s", *obj.HostID))
+ }
+ apiHost := restModel.APIHost{}
+ apiHost.BuildFromService(h, nil)
+ return &apiHost, nil
+}
+
+// Volume returns VolumeResolver implementation.
+func (r *Resolver) Volume() VolumeResolver { return &volumeResolver{r} }
+
+type volumeResolver struct{ *Resolver }
diff --git a/loggers_linux.go b/loggers_linux.go
index 4ed179a5be7..cd0b59efc18 100644
--- a/loggers_linux.go
+++ b/loggers_linux.go
@@ -1,4 +1,4 @@
-// +build linux
+//go:build linux
package evergreen
diff --git a/loggers_other.go b/loggers_other.go
index 5ee9654a73d..b6b22a33385 100644
--- a/loggers_other.go
+++ b/loggers_other.go
@@ -1,4 +1,4 @@
-// +build !linux
+//go:build !linux
package evergreen
diff --git a/makefile b/makefile
index 4b77f9403f7..f30e4c26593 100644
--- a/makefile
+++ b/makefile
@@ -2,12 +2,12 @@
name := evergreen
buildDir := bin
nodeDir := public
-packages := $(name) agent agent-command agent-util agent-internal agent-internal-client operations cloud cloud-userdata
+packages := $(name) agent agent-command agent-util agent-internal agent-internal-client agent-internal-testutil operations cloud cloud-userdata
packages += db util plugin units graphql thirdparty thirdparty-docker auth scheduler model validator service repotracker cmd-codegen-core mock
-packages += model-annotations model-patch model-artifact model-host model-pod model-pod-dispatcher model-build model-event model-task model-user model-distro model-manifest model-testresult
-packages += operations-metabuild-generator operations-metabuild-model model-commitqueue
-packages += rest-client rest-data rest-route rest-model migrations trigger model-alertrecord model-notification model-stats model-reliability
-lintOnlyPackages := api apimodels testutil model-manifest model-testutil service-testutil service-graphql db-mgo db-mgo-bson db-mgo-internal-json
+packages += model-annotations model-patch model-artifact model-host model-pod model-pod-definition model-pod-dispatcher model-build model-event model-task model-user model-distro model-manifest model-testresult
+packages += model-commitqueue
+packages += rest-client rest-data rest-route rest-model migrations trigger model-alertrecord model-notification model-taskstats model-reliability
+lintOnlyPackages := api apimodels testutil model-manifest model-testutil service-testutil service-graphql db-mgo db-mgo-bson db-mgo-internal-json rest
testOnlyPackages := service-graphql # has only test files so can't undergo all operations
orgPath := github.com/evergreen-ci
projectPath := $(orgPath)/$(name)
@@ -97,8 +97,11 @@ testSrcFiles := makefile $(shell find . -name "*.go" -not -path "./$(buildDir)/*
currentHash := $(shell git rev-parse HEAD)
agentVersion := $(shell grep "AgentVersion" config.go | tr -d '\tAgentVersion = ' | tr -d '"')
ldFlags := $(if $(DEBUG_ENABLED),,-w -s )-X=github.com/evergreen-ci/evergreen.BuildRevision=$(currentHash)
+gcFlags := $(if $(STAGING_ONLY),-N -l,)
karmaFlags := $(if $(KARMA_REPORTER),--reporters $(KARMA_REPORTER),)
-smokeFile := $(if $(SMOKE_TEST_FILE),--test-file $(SMOKE_TEST_FILE),)
+
+goLintInstallerVersion := "v1.51.2"
+goLintInstallerChecksum := "0e09dedc7e35f511b7924b885e50d7fe48eef25bec78c86f22f5b5abd24976cc"
# end evergreen specific configuration
######################################################################
@@ -110,14 +113,14 @@ smokeFile := $(if $(SMOKE_TEST_FILE),--test-file $(SMOKE_TEST_FILE),)
# start rules for building services and clients
ifeq ($(OS),Windows_NT)
-localClientBinary := $(clientBuildDir)/$(goos)_$(goarch)/evergreen.exe
+localClientBinary := $(clientBuildDir)/$(goos)_$(goarch)/$(windowsBinaryBasename)
else
-localClientBinary := $(clientBuildDir)/$(goos)_$(goarch)/evergreen
+localClientBinary := $(clientBuildDir)/$(goos)_$(goarch)/$(unixBinaryBasename)
endif
cli:$(localClientBinary)
clis:$(clientBinaries)
-$(clientBuildDir)/%/evergreen $(clientBuildDir)/%/evergreen.exe:$(buildDir)/build-cross-compile $(srcFiles)
- @./$(buildDir)/build-cross-compile -buildName=$* -ldflags="$(ldFlags)" -goBinary="$(gobin)" -directory=$(clientBuildDir) -source=$(clientSource) -output=$@
+$(clientBuildDir)/%/$(unixBinaryBasename) $(clientBuildDir)/%/$(windowsBinaryBasename):$(buildDir)/build-cross-compile $(srcFiles) go.mod go.sum
+ @./$(buildDir)/build-cross-compile -buildName=$* -ldflags="$(ldFlags)" -gcflags="$(gcFlags)" -goBinary="$(gobin)" -directory=$(clientBuildDir) -source=$(clientSource) -output=$@
# Targets to upload the CLI binaries to S3.
$(buildDir)/upload-s3:cmd/upload-s3/upload-s3.go
@$(gobin) build -o $@ $<
@@ -137,10 +140,11 @@ $(buildDir)/set-project-var:cmd/set-project-var/set-project-var.go
$(gobin) build -o $@ $<
set-var:$(buildDir)/set-var
set-project-var:$(buildDir)/set-project-var
-set-smoke-vars:$(buildDir)/.load-smoke-data
- @./bin/set-project-var -dbName mci_smoke -key aws_key -value $(AWS_KEY)
- @./bin/set-project-var -dbName mci_smoke -key aws_secret -value $(AWS_SECRET)
- @./bin/set-var -dbName=mci_smoke -collection=hosts -id=localhost -key=agent_revision -value=$(agentVersion)
+set-smoke-vars:$(buildDir)/.load-smoke-data $(buildDir)/set-project-var $(buildDir)/set-var
+ @$(buildDir)/set-project-var -dbName mci_smoke -key aws_key -value $(AWS_KEY)
+ @$(buildDir)/set-project-var -dbName mci_smoke -key aws_secret -value $(AWS_SECRET)
+ @$(buildDir)/set-var -dbName=mci_smoke -collection=hosts -id=localhost -key=agent_revision -value=$(agentVersion)
+ @$(buildDir)/set-var -dbName=mci_smoke -collection=pods -id=localhost -key=agent_version -value=$(agentVersion)
load-smoke-data:$(buildDir)/.load-smoke-data
load-local-data:$(buildDir)/.load-local-data
$(buildDir)/.load-smoke-data:$(buildDir)/load-smoke-data
@@ -150,18 +154,33 @@ $(buildDir)/.load-local-data:$(buildDir)/load-smoke-data
./$< -path testdata/local -dbName evergreen_local -amboyDBName amboy_local
@touch $@
smoke-test-agent-monitor:$(localClientBinary) load-smoke-data
+ # Start the smoke test's Evergreen app server.
./$< service deploy start-evergreen --web --binary ./$< &
+ # Start the smoke test's agent monitor, which will run the Evergreen agent based on the locally-compiled Evergreen
+ # executable. This agent will coordinate with the app server to run the smoke test's tasks.
+ # It is necessary to set up this locally-running agent because the app server can't actually start hosts to run
+ # tasks.
+ # Note that the distro comes from the smoke test's DB files.
./$< service deploy start-evergreen --monitor --binary ./$< --distro localhost &
- ./$< service deploy test-endpoints --check-build --username admin --key abb623665fdbf368a1db980dde6ee0f0 $(smokeFile) || (pkill -f $<; exit 1)
+ # Run the smoke test's actual tests.
+ # The username/password to is used to authenticate to the app server, and these credentials come from the smoke
+ # test's DB files.
+ ./$< service deploy test-endpoints --check-build --username admin --key abb623665fdbf368a1db980dde6ee0f0
+ # Clean up all smoke test Evergreen executable processes.
+ pkill -f $<
+smoke-test-host-task:$(localClientBinary) load-smoke-data
+ ./$< service deploy start-evergreen --web --binary ./$< &
+ ./$< service deploy start-evergreen --mode host --agent --binary ./$< &
+ ./$< service deploy test-endpoints --check-build --mode host --username admin --key abb623665fdbf368a1db980dde6ee0f0
pkill -f $<
-smoke-test-task:$(localClientBinary) load-smoke-data
+smoke-test-container-task:$(localClientBinary) load-smoke-data
./$< service deploy start-evergreen --web --binary ./$< &
- ./$< service deploy start-evergreen --agent --binary ./$< &
- ./$< service deploy test-endpoints --check-build --username admin --key abb623665fdbf368a1db980dde6ee0f0 $(smokeFile) || (pkill -f $<; exit 1)
+ ./$< service deploy start-evergreen --mode pod --agent --binary ./$< &
+ ./$< service deploy test-endpoints --check-build --mode pod --username admin --key abb623665fdbf368a1db980dde6ee0f0
pkill -f $<
smoke-test-endpoints:$(localClientBinary) load-smoke-data
./$< service deploy start-evergreen --web --binary ./$< &
- ./$< service deploy test-endpoints --username admin --key abb623665fdbf368a1db980dde6ee0f0 $(smokeFile) || (pkill -f $<; exit 1)
+ ./$< service deploy test-endpoints --username admin --key abb623665fdbf368a1db980dde6ee0f0
pkill -f $<
local-evergreen:$(localClientBinary) load-local-data
./$< service deploy start-local-evergreen
@@ -179,7 +198,7 @@ local-evergreen:$(localClientBinary) load-local-data
# start output files
testOutput := $(foreach target,$(packages) $(testOnlyPackages),$(buildDir)/output.$(target).test)
-lintOutput := $(foreach target,$(packages),$(buildDir)/output.$(target).lint)
+lintOutput := $(foreach target,$(packages) $(lintOnlyPackages),$(buildDir)/output.$(target).lint)
coverageOutput := $(foreach target,$(packages),$(buildDir)/output.$(target).coverage)
coverageHtmlOutput := $(foreach target,$(packages),$(buildDir)/output.$(target).coverage.html)
# end output files
@@ -188,7 +207,9 @@ coverageHtmlOutput := $(foreach target,$(packages),$(buildDir)/output.$(target).
$(buildDir)/.lintSetup:$(buildDir)/golangci-lint
@touch $@
$(buildDir)/golangci-lint:
- @curl --retry 10 --retry-max-time 120 -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(buildDir) v1.40.0 >/dev/null 2>&1 && touch $@
+ @curl --retry 10 --retry-max-time 120 -sSfL -o "$(buildDir)/install.sh" https://raw.githubusercontent.com/golangci/golangci-lint/$(goLintInstallerVersion)/install.sh
+ @echo "$(goLintInstallerChecksum) $(buildDir)/install.sh" | sha256sum --check
+ @bash $(buildDir)/install.sh -b $(buildDir) $(goLintInstallerVersion) >/dev/null 2>&1 && touch $@
$(buildDir)/run-linter:cmd/run-linter/run-linter.go $(buildDir)/.lintSetup
$(gobin) build -ldflags "-w" -o $@ $<
# end lint setup targets
@@ -241,9 +262,10 @@ $(clientBuildDir)/%/.signed:$(buildDir)/sign-executable $(clientBuildDir)/%/$(un
./$< sign --client $(buildDir)/macnotary --executable $(@D)/$(unixBinaryBasename) --server-url $(NOTARY_SERVER_URL) --bundle-id $(EVERGREEN_BUNDLE_ID)
touch $@
-dist-staging: export STAGING_ONLY := 1
dist-staging:
- make dist
+ STAGING_ONLY=1 DEBUG_ENABLED=1 SIGN_MACOS= $(MAKE) dist
+dist-unsigned:
+ SIGN_MACOS= $(MAKE) dist
dist:$(buildDir)/dist.tar.gz
$(buildDir)/dist.tar.gz:$(buildDir)/make-tarball $(clientBinaries) $(uiFiles) $(if $(SIGN_MACOS),$(foreach platform,$(macOSPlatforms),$(clientBuildDir)/$(platform)/.signed))
./$< --name $@ --prefix $(name) $(foreach item,$(distContents),--item $(item)) --exclude "public/node_modules" --exclude "clients/.cache"
@@ -379,15 +401,16 @@ mongodb/.get-mongodb:
get-mongodb:mongodb/.get-mongodb
@touch $<
start-mongod:mongodb/.get-mongodb
- ./mongodb/mongod $(if $(AUTH_ENABLED),--auth,) --dbpath ./mongodb/db_files --port 27017 --replSet evg --oplogSize 10
+ifdef AUTH_ENABLED
+ echo "replica set key" > ./mongodb/keyfile.txt
+ chmod 600 ./mongodb/keyfile.txt
+endif
+ ./mongodb/mongod $(if $(AUTH_ENABLED),--auth --keyFile ./mongodb/keyfile.txt,) --dbpath ./mongodb/db_files --port 27017 --replSet evg --oplogSize 10
configure-mongod:mongodb/.get-mongodb
./mongodb/mongo --nodb --eval "assert.soon(function(x){try{var d = new Mongo(\"localhost:27017\"); return true}catch(e){return false}}, \"timed out connecting\")"
@echo "mongod is up"
./mongodb/mongo --eval 'rs.initiate()'
-ifdef $(FCV)
- ./mongodb/mongo --eval 'db.adminCommand({setFeatureCompatibilityVersion: "$(FCV)"})'
-endif
-ifdef $(AUTH_ENABLED)
+ifdef AUTH_ENABLED
./mongodb/mongo --host `./mongodb/mongo --quiet --eval "db.isMaster()['primary']"` cmd/mongo-auth/create_auth_user.js
endif
@echo "configured mongod"
diff --git a/migrations/anser.go b/migrations/anser.go
index 3696090e347..2adeabdf03f 100644
--- a/migrations/anser.go
+++ b/migrations/anser.go
@@ -37,7 +37,7 @@ func (opts Options) Setup(ctx context.Context) (anser.Environment, error) {
env := anser.GetEnvironment()
env.RegisterCloser(func() error { cancel(); return nil })
- q := queue.NewAdaptiveOrderedLocalQueue(1, 10*opts.Target*opts.Workers)
+ q := queue.NewLocalLimitedSize(1, 10*opts.Target*opts.Workers)
runner, err := pool.NewMovingAverageRateLimitedWorkers(opts.Workers, opts.Target, opts.Period, q)
if err != nil {
return nil, errors.WithStack(err)
diff --git a/mock/environment.go b/mock/environment.go
index 5e016ac4f2c..1965e563752 100644
--- a/mock/environment.go
+++ b/mock/environment.go
@@ -94,9 +94,17 @@ func (e *Environment) Configure(ctx context.Context) error {
ScopeCollection: evergreen.ScopeCollection,
})
+ catcher := grip.NewBasicCatcher()
+ catcher.Add(e.roleManager.RegisterPermissions(evergreen.ProjectPermissions))
+ catcher.Add(e.roleManager.RegisterPermissions(evergreen.DistroPermissions))
+ catcher.Add(e.roleManager.RegisterPermissions(evergreen.SuperuserPermissions))
+ if catcher.HasErrors() {
+ return errors.Wrap(catcher.Resolve(), "registering role manager permissions")
+ }
+
depot, err := BootstrapCredentialsCollection(ctx, e.MongoClient, e.EvergreenSettings.Database.Url, e.EvergreenSettings.Database.DB, e.EvergreenSettings.DomainName)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "bootstrapping host credentials collection")
}
e.Depot = depot
@@ -106,7 +114,7 @@ func (e *Environment) Configure(ctx context.Context) error {
// models.
um, err := gimlet.NewBasicUserManager(nil, nil)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "creating user manager")
}
e.userManager = um
diff --git a/model/alertrecord/alert_bookkeeping.go b/model/alertrecord/alert_bookkeeping.go
index 6fbd507235f..f86fd0a1d78 100644
--- a/model/alertrecord/alert_bookkeeping.go
+++ b/model/alertrecord/alert_bookkeeping.go
@@ -23,7 +23,6 @@ const (
FirstTaskTypeFailureId = "first_tasktype_failure"
TaskFailTransitionId = "task_transition_failure"
FirstRegressionInVersion = "first_regression_in_version"
- LastRevisionNotFound = "last_revision_not_found"
taskRegressionByTest = "task-regression-by-test"
)
@@ -59,7 +58,7 @@ func (ar *AlertRecord) Insert() error {
return db.Insert(Collection, ar)
}
-//nolint: megacheck, deadcode, unused
+//nolint:megacheck,unused
var (
IdKey = bsonutil.MustHaveTag(AlertRecord{}, "Id")
subscriptionIDKey = bsonutil.MustHaveTag(AlertRecord{}, "SubscriptionID")
@@ -137,14 +136,6 @@ func ByFirstFailureInTaskType(subscriptionID, versionId, taskName string) db.Q {
return db.Query(q).Limit(1)
}
-func ByLastRevNotFound(subscriptionID, projectId, versionId string) db.Q {
- q := subscriptionIDQuery(subscriptionID)
- q[TypeKey] = LastRevisionNotFound
- q[ProjectIdKey] = projectId
- q[VersionIdKey] = versionId
- return db.Query(q).Limit(1)
-}
-
func FindByFirstRegressionInVersion(subscriptionID, versionId string) (*AlertRecord, error) {
q := subscriptionIDQuery(subscriptionID)
q[TypeKey] = FirstRegressionInVersion
diff --git a/model/alertrecord/alert_bookkeeping_test.go b/model/alertrecord/alert_bookkeeping_test.go
index 239dba79f24..4e54a693b4e 100644
--- a/model/alertrecord/alert_bookkeeping_test.go
+++ b/model/alertrecord/alert_bookkeeping_test.go
@@ -51,7 +51,7 @@ func (s *alertRecordSuite) TestInsertNewTaskRegressionByTestRecord() {
s.Equal("variant", record.Variant)
s.Equal("test", record.TestName)
s.Equal(5, record.RevisionOrderNumber)
- s.Equal(time.Now().Round(time.Second), record.AlertTime.Round(time.Second))
+ s.WithinDuration(time.Now(), record.AlertTime, time.Second)
}
func (s *alertRecordSuite) TestByLastFailureTransition() {
diff --git a/model/annotations/db.go b/model/annotations/db.go
index 00cd835b413..bab0976b245 100644
--- a/model/annotations/db.go
+++ b/model/annotations/db.go
@@ -19,13 +19,16 @@ var (
SuspectedIssuesKey = bsonutil.MustHaveTag(TaskAnnotation{}, "SuspectedIssues")
CreatedIssuesKey = bsonutil.MustHaveTag(TaskAnnotation{}, "CreatedIssues")
IssueLinkIssueKey = bsonutil.MustHaveTag(IssueLink{}, "IssueKey")
+ MetadataLinksKey = bsonutil.MustHaveTag(TaskAnnotation{}, "MetadataLinks")
)
const (
- Collection = "task_annotations"
- UIRequester = "ui"
- APIRequester = "api"
- WebhookRequester = "webhook"
+ Collection = "task_annotations"
+ UIRequester = "ui"
+ APIRequester = "api"
+ WebhookRequester = "webhook"
+ MaxMetadataLinks = 1
+ MaxMetadataTextLength = 40
)
// FindOne gets one TaskAnnotation for the given query.
@@ -71,6 +74,7 @@ func (a *TaskAnnotation) Upsert() error {
IssuesKey: a.Issues,
SuspectedIssuesKey: a.SuspectedIssues,
CreatedIssuesKey: a.CreatedIssues,
+ MetadataLinksKey: a.MetadataLinks,
}
if a.Metadata != nil {
set[MetadataKey] = a.Metadata
diff --git a/model/annotations/task_annotations.go b/model/annotations/task_annotations.go
index 6c205646b7d..908ac5c1cac 100644
--- a/model/annotations/task_annotations.go
+++ b/model/annotations/task_annotations.go
@@ -1,12 +1,15 @@
package annotations
import (
+ "context"
"time"
"github.com/evergreen-ci/birch"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/util"
"github.com/mongodb/anser/bsonutil"
+ "github.com/mongodb/grip"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
@@ -25,6 +28,17 @@ type TaskAnnotation struct {
SuspectedIssues []IssueLink `bson:"suspected_issues,omitempty" json:"suspected_issues,omitempty"`
// links to tickets created from the task using a custom web hook
CreatedIssues []IssueLink `bson:"created_issues,omitempty" json:"created_issues,omitempty"`
+ // links to be displayed in the UI metadata sidebar
+ MetadataLinks []MetadataLink `bson:"metadata_links,omitempty" json:"metadata_links,omitempty"`
+}
+
+// MetadataLink represents an arbitrary link to be associated with a task.
+type MetadataLink struct {
+ // URL to link to
+ URL string `bson:"url" json:"url"`
+ // Text to be displayed
+ Text string `bson:"text" json:"text"`
+ Source *Source `bson:"source,omitempty" json:"source,omitempty"`
}
type IssueLink struct {
@@ -125,6 +139,27 @@ func UpdateAnnotationNote(taskId string, execution int, originalMessage, newMess
return errors.Wrapf(err, "updating note for task '%s'", taskId)
}
+// SetAnnotationMetadataLinks sets the metadata links for a task annotation.
+func SetAnnotationMetadataLinks(ctx context.Context, taskId string, execution int, username string, metadataLinks ...MetadataLink) error {
+ now := time.Now()
+ for i := range metadataLinks {
+ metadataLinks[i].Source = &Source{
+ Author: username,
+ Time: now,
+ Requester: UIRequester,
+ }
+ }
+
+ _, err := db.Upsert(
+ Collection,
+ ByTaskIdAndExecution(taskId, execution),
+ bson.M{
+ "$set": bson.M{MetadataLinksKey: metadataLinks},
+ },
+ )
+ return errors.Wrapf(err, "setting task links for task '%s'", taskId)
+}
+
func AddIssueToAnnotation(taskId string, execution int, issue IssueLink, username string) error {
issue.Source = &Source{
Author: username,
@@ -190,6 +225,12 @@ func UpdateAnnotation(a *TaskAnnotation, userDisplayName string) error {
a.Note.Source = source
update[NoteKey] = a.Note
}
+ if a.MetadataLinks != nil {
+ for i := range a.MetadataLinks {
+ a.MetadataLinks[i].Source = source
+ }
+ update[MetadataLinksKey] = a.MetadataLinks
+ }
if a.Issues != nil {
for i := range a.Issues {
a.Issues[i].Source = source
@@ -257,6 +298,12 @@ func createAnnotationUpdate(annotation *TaskAnnotation, userDisplayName string)
}
update[SuspectedIssuesKey] = bson.M{"$each": annotation.SuspectedIssues}
}
+ if annotation.MetadataLinks != nil {
+ for i := range annotation.MetadataLinks {
+ annotation.MetadataLinks[i].Source = source
+ }
+ update[MetadataLinksKey] = bson.M{"$each": annotation.MetadataLinks}
+ }
return update
}
@@ -313,3 +360,21 @@ func AddCreatedTicket(taskId string, execution int, ticket IssueLink, userDispla
)
return errors.Wrapf(err, "adding ticket to task '%s'", taskId)
}
+
+// ValidateMetadataLinks will validate the given metadata links, ensuring that they are valid URLs,
+// that their text is not too long, and that there are not more than MaxMetadataLinks links provided.
+func ValidateMetadataLinks(links ...MetadataLink) error {
+ catcher := grip.NewBasicCatcher()
+ if len(links) > MaxMetadataLinks {
+ catcher.Errorf("cannot have more than %d task links per annotation", MaxMetadataLinks)
+ }
+ for _, link := range links {
+ catcher.Add(util.CheckURL(link.URL))
+ if link.Text == "" {
+ catcher.Errorf("link text cannot be empty")
+ } else if len(link.Text) > MaxMetadataTextLength {
+ catcher.Errorf("link text cannot exceed %d characters", MaxMetadataTextLength)
+ }
+ }
+ return catcher.Resolve()
+}
diff --git a/model/annotations/task_annotations_test.go b/model/annotations/task_annotations_test.go
index 43949f4341d..ee23d698cf5 100644
--- a/model/annotations/task_annotations_test.go
+++ b/model/annotations/task_annotations_test.go
@@ -83,6 +83,34 @@ func TestRemoveIssueFromAnnotation(t *testing.T) {
assert.Equal(t, "not.annie.black", annotationFromDB.Issues[0].Source.Author)
}
+func TestSetAnnotationMetadataLinks(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ assert.NoError(t, db.Clear(Collection))
+ taskLink := MetadataLink{URL: "https://issuelink.com", Text: "Hello World"}
+ assert.NoError(t, SetAnnotationMetadataLinks(ctx, "t1", 0, "usr", taskLink))
+
+ annotation, err := FindOneByTaskIdAndExecution("t1", 0)
+ assert.NoError(t, err)
+ assert.NotNil(t, annotation)
+ assert.NotEqual(t, annotation.Id, "")
+ assert.Len(t, annotation.MetadataLinks, 1)
+ assert.Equal(t, "Hello World", annotation.MetadataLinks[0].Text)
+ assert.Equal(t, "https://issuelink.com", annotation.MetadataLinks[0].URL)
+ assert.NotNil(t, annotation.MetadataLinks[0].Source)
+ assert.Equal(t, "usr", annotation.MetadataLinks[0].Source.Author)
+
+ taskLink.URL = "https://issuelink.com/2"
+ assert.NoError(t, SetAnnotationMetadataLinks(ctx, "t1", 0, "usr", taskLink))
+ annotation, err = FindOneByTaskIdAndExecution("t1", 0)
+ assert.NoError(t, err)
+ assert.NotNil(t, annotation)
+ assert.Len(t, annotation.MetadataLinks, 1)
+ assert.Equal(t, "https://issuelink.com/2", annotation.MetadataLinks[0].URL)
+ assert.NotNil(t, annotation.MetadataLinks[0].Source)
+ assert.Equal(t, "usr", annotation.MetadataLinks[0].Source.Author)
+}
+
func TestAddSuspectedIssueToAnnotation(t *testing.T) {
assert.NoError(t, db.Clear(Collection))
issue := IssueLink{URL: "https://issuelink.com", IssueKey: "EVG-1234"}
diff --git a/model/artifact/artifact_file.go b/model/artifact/artifact_file.go
index c5141c03263..c5327157574 100644
--- a/model/artifact/artifact_file.go
+++ b/model/artifact/artifact_file.go
@@ -3,7 +3,7 @@ package artifact
import (
"time"
- "github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/pail"
"github.com/mongodb/grip"
"github.com/pkg/errors"
)
@@ -35,8 +35,9 @@ type Entry struct {
}
// Params stores file entries as key-value pairs, for easy parameter parsing.
-// Key = Human-readable name for file
-// Value = link for the file
+//
+// Key = Human-readable name for file
+// Value = link for the file
type Params map[string]string
// File is a pairing of name and link for easy storage/display
@@ -72,13 +73,13 @@ func StripHiddenFiles(files []File, hasUser bool) ([]File, error) {
if !file.ContainsSigningParams() {
return nil, errors.New("AWS secret, AWS key, S3 bucket, or file key missing")
}
- requestParams := thirdparty.RequestParams{
+ requestParams := pail.PreSignRequestParams{
Bucket: file.Bucket,
FileKey: file.FileKey,
AwsKey: file.AwsKey,
AwsSecret: file.AwsSecret,
}
- urlStr, err := thirdparty.PreSign(requestParams)
+ urlStr, err := pail.PreSign(requestParams)
if err != nil {
return nil, errors.Wrap(err, "presigning url")
}
@@ -91,8 +92,8 @@ func StripHiddenFiles(files []File, hasUser bool) ([]File, error) {
return publicFiles, nil
}
-//ContainsSigningParams returns true if all the params needed for
-//presigning a url are present
+// ContainsSigningParams returns true if all the params needed for
+// presigning a url are present
func (f *File) ContainsSigningParams() bool {
return !(f.AwsSecret == "" || f.AwsKey == "" || f.Bucket == "" || f.FileKey == "")
}
diff --git a/model/audit.go b/model/audit.go
deleted file mode 100644
index be8230d21ee..00000000000
--- a/model/audit.go
+++ /dev/null
@@ -1,195 +0,0 @@
-package model
-
-import (
- "fmt"
-
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/host"
- "github.com/evergreen-ci/evergreen/model/task"
- "github.com/mongodb/anser/bsonutil"
- "github.com/pkg/errors"
- "go.mongodb.org/mongo-driver/bson"
-)
-
-// HostTaskInconsistency represents a mismatch between task and host documents.
-// It contains both the host and task's view of their relationship.
-// Implements the Error interface, which returns a full string describing
-// the nature of the mismatch.
-type HostTaskInconsistency struct {
- Host string
- HostTaskCache string
- Task string
- TaskHostCache string
-}
-
-// StuckHostInconsistncy represents hosts that have running
-// tasks but the tasks have been marked as completed.
-type StuckHostInconsistency struct {
- Host string `bson:"host_id"`
- RunningTask string `bson:"running_task"`
- TaskStatus string `bson:"task_status"`
-}
-
-var (
- StuckHostKey = bsonutil.MustHaveTag(StuckHostInconsistency{}, "Host")
- StuckHostRunningTaskKey = bsonutil.MustHaveTag(StuckHostInconsistency{}, "RunningTask")
- StuckHostTaskStatusKey = bsonutil.MustHaveTag(StuckHostInconsistency{}, "TaskStatus")
- HostTaskKey = "task"
-)
-
-// Error returns a human-readible explanation of a HostTaskInconsistency.
-func (i HostTaskInconsistency) Error() string {
- switch {
- case i.Task == "" && i.TaskHostCache == "":
- return fmt.Sprintf("host '%s' says it is running task '%s', which does not exist", i.Host, i.HostTaskCache)
- case i.Host == "" && i.HostTaskCache == "":
- return fmt.Sprintf("task '%s' says it is running on host '%s', which is not a running task", i.Task, i.TaskHostCache)
- case i.HostTaskCache == i.Task:
- return fmt.Sprintf("host '%s' says it is running task '%s', but that task says it is assigned to '%s'", i.Host, i.Task, i.TaskHostCache)
- case i.TaskHostCache == i.Host:
- return fmt.Sprintf("task '%s' says it is running on host '%s', but that host says it is running '%s'", i.Task, i.Host, i.HostTaskCache)
- default:
- // this should never be hit
- return fmt.Sprintf("inconsistent mapping: %s/%s, %s/%s",
- i.Host, i.HostTaskCache, i.Task, i.TaskHostCache)
- }
-}
-
-// AuditHostTaskConsistency finds all running tasks and running hosts and compares
-// their caches of what host/task they are assigned to. Returns a slice of any mappings
-// that are not 1:1 and any errors that occur.
-//
-// NOTE: the error returned ONLY represents issues communicating with the database.
-// HostTaskInconsistency implements the error interface, but it is up to the caller
-// to cast the inconsistencies into an error type if they desire.
-func AuditHostTaskConsistency() ([]HostTaskInconsistency, error) {
- hostToTask, taskToHost, err := loadHostTaskMapping()
- if err != nil {
- return nil, err
- }
- return auditHostTaskMapping(hostToTask, taskToHost), nil
-}
-
-// loadHostTaskMapping queries the DB for hosts with tasks, the tasks assigned in the hosts'
-// running task fields, all running (or dispatched) tasks, and the hosts in those tasks'
-// host id field. Returns a mapping of host Ids to task Ids and task Ids to host Ids,
-// representing both directions of the relationship.
-func loadHostTaskMapping() (map[string]string, map[string]string, error) {
- hostToTask := map[string]string{}
- hostTaskIds := []string{}
- taskToHost := map[string]string{}
- taskHostIds := []string{}
-
- // fetch all hosts with running tasks and then all of the tasks the hosts
- // say they are running.
- runningHosts, err := host.Find(host.IsRunningTask)
- if err != nil {
- return nil, nil, errors.Wrap(err, "querying for running hosts")
- }
-
- for _, h := range runningHosts {
- hostTaskIds = append(hostTaskIds, h.RunningTask)
- }
- hostsTasks, err := task.Find(task.ByIds(hostTaskIds))
- if err != nil {
- return nil, nil, errors.Wrap(err, "querying for hosts' tasks")
- }
-
- // fetch all tasks with an assigned host and the hosts they say
- // they are assigned to
- runningTasks, err := task.Find(task.IsDispatchedOrStarted)
- if err != nil {
- return nil, nil, errors.Wrap(err, "querying for running tasks")
- }
- for _, t := range append(hostsTasks, runningTasks...) {
- taskToHost[t.Id] = t.HostId
- taskHostIds = append(taskHostIds, t.HostId)
- }
- tasksHosts, err := host.Find(host.ByIds(taskHostIds))
- if err != nil {
- return nil, nil, errors.Wrap(err, "querying for tasks' hosts")
- }
-
- // we only want to have running hosts that are not empty.
- for _, h := range append(runningHosts, tasksHosts...) {
- // if the running task is empty don't add it to the map
- if h.RunningTask != "" {
- hostToTask[h.Id] = h.RunningTask
- }
- }
-
- return hostToTask, taskToHost, nil
-}
-
-// auditHostMapping takes a mapping of hosts->tasks and tasks->hosts and
-// returns descriptions of any inconsistencies.
-func auditHostTaskMapping(hostToTask, taskToHost map[string]string) []HostTaskInconsistency {
- found := []HostTaskInconsistency{}
- // cases where a host thinks its running a task that it isn't
- for h, t := range hostToTask {
- cachedTask, ok := taskToHost[t]
- if !ok {
- // host thinks it is running a task that does not exist
- found = append(found, HostTaskInconsistency{
- Host: h,
- HostTaskCache: t,
- })
- } else {
- if cachedTask != h {
- found = append(found, HostTaskInconsistency{
- Host: h,
- HostTaskCache: t,
- Task: t,
- TaskHostCache: cachedTask,
- })
- }
- }
- }
- // cases where a task thinks it is running on a host that isnt running it
- for t, h := range taskToHost {
- cachedHost, ok := hostToTask[h]
- if !ok {
- // task thinks it is running on a host that does not exist
- found = append(found, HostTaskInconsistency{
- Task: t,
- TaskHostCache: h,
- })
- } else {
- if cachedHost != t {
- found = append(found, HostTaskInconsistency{
- Task: t,
- TaskHostCache: h,
- Host: h,
- HostTaskCache: cachedHost,
- })
- }
- }
- }
- return found
-}
-
-func (shi StuckHostInconsistency) Error() string {
- return fmt.Sprintf("host '%s' has a running task '%s' with complete status '%s'", shi.Host, shi.RunningTask, shi.TaskStatus)
-}
-
-// CheckStuckHosts queries for hosts that tasks that are
-// completed but that still have them as a running task
-func CheckStuckHosts() ([]StuckHostInconsistency, error) {
- // find all hosts with tasks that are completed
- pipeline := []bson.M{
- {"$match": bson.M{host.RunningTaskKey: bson.M{"$exists": true}}},
- {"$lookup": bson.M{"from": task.Collection, "localField": host.RunningTaskKey,
- "foreignField": task.IdKey, "as": HostTaskKey}},
- {"$unwind": "$" + HostTaskKey},
- {"$match": bson.M{HostTaskKey + "." + task.StatusKey: bson.M{"$in": evergreen.TaskCompletedStatuses}}},
- {"$project": bson.M{
- StuckHostKey: "$" + host.IdKey,
- StuckHostRunningTaskKey: "$" + host.RunningTaskKey,
- StuckHostTaskStatusKey: "$" + HostTaskKey + "." + task.StatusKey,
- }},
- }
- stuckHosts := []StuckHostInconsistency{}
- err := db.Aggregate(host.Collection, pipeline, &stuckHosts)
- return stuckHosts, err
-}
diff --git a/model/audit_test.go b/model/audit_test.go
deleted file mode 100644
index 2f1edf07e80..00000000000
--- a/model/audit_test.go
+++ /dev/null
@@ -1,172 +0,0 @@
-package model
-
-import (
- "fmt"
- "testing"
-
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/host"
- "github.com/evergreen-ci/evergreen/model/task"
- . "github.com/smartystreets/goconvey/convey"
- "github.com/stretchr/testify/require"
-)
-
-func TestHostTaskAuditing(t *testing.T) {
- Convey("With pre-made sets of mappings", t, func() {
- Convey("a valid mapping should return no inconsistencies", func() {
- h2t := map[string]string{"h1": "t1", "h2": "t2", "h3": "t3"}
- t2h := map[string]string{"t1": "h1", "t2": "h2", "t3": "h3"}
- So(len(auditHostTaskMapping(h2t, t2h)), ShouldEqual, 0)
- })
- Convey("a mismapped host should return one inconsistency", func() {
- h2t := map[string]string{"h1": "t1", "h2": "t2", "h3": "t3", "h4": "t1"}
- t2h := map[string]string{"t1": "h4", "t2": "h2", "t3": "h3"}
- out := auditHostTaskMapping(h2t, t2h)
- So(len(out), ShouldEqual, 1)
- So(out[0], ShouldResemble, HostTaskInconsistency{
- Host: "h1", HostTaskCache: "t1", Task: "t1", TaskHostCache: "h4",
- })
- })
- Convey("a swapped host and task should return four inconsistencies", func() {
- h2t := map[string]string{"h1": "t3", "h2": "t2", "h3": "t1"}
- t2h := map[string]string{"t1": "h1", "t2": "h2", "t3": "h3"}
- out := auditHostTaskMapping(h2t, t2h)
- So(len(out), ShouldEqual, 4)
- })
- Convey("one empty mapping should return inconsistencies", func() {
- h2t := map[string]string{"h1": "t1", "h2": "t2", "h3": "t3"}
- out := auditHostTaskMapping(h2t, nil)
- So(len(out), ShouldEqual, 3)
- Convey("with reasonable error language", func() {
- So(out[0].Error(), ShouldContainSubstring, "does not exist")
- So(out[1].Error(), ShouldContainSubstring, "does not exist")
- So(out[2].Error(), ShouldContainSubstring, "does not exist")
- })
- })
- Convey("two empty mappings should not return inconsistencies", func() {
- out := auditHostTaskMapping(nil, nil)
- So(len(out), ShouldEqual, 0)
- })
- })
-
- Convey("With tasks and hosts stored in the db", t, func() {
- require.NoError(t, db.ClearCollections(host.Collection, task.Collection))
- Convey("no mappings should load with an empty db", func() {
- h2t, t2h, err := loadHostTaskMapping()
- So(err, ShouldBeNil)
- So(len(h2t), ShouldEqual, 0)
- So(len(t2h), ShouldEqual, 0)
- })
- Convey("with 3 hosts, one with a running task", func() {
- h1 := host.Host{Id: "h1", Status: evergreen.HostRunning, RunningTask: "t1"}
- h2 := host.Host{Id: "h2", Status: evergreen.HostRunning}
- h3 := host.Host{Id: "h3", Status: evergreen.HostRunning}
- So(h1.Insert(), ShouldBeNil)
- So(h2.Insert(), ShouldBeNil)
- So(h3.Insert(), ShouldBeNil)
- Convey("only mappings should return for the task-running host", func() {
- h2t, t2h, err := loadHostTaskMapping()
- So(err, ShouldBeNil)
- So(len(h2t), ShouldEqual, 1)
- So(h2t["h1"], ShouldEqual, "t1")
- So(len(t2h), ShouldEqual, 0)
- })
- })
- Convey("with 3 hosts and 3 tasks", func() {
- h1 := host.Host{Id: "h1", Status: evergreen.HostRunning, RunningTask: "t1"}
- h2 := host.Host{Id: "h2", Status: evergreen.HostRunning, RunningTask: "t2"}
- h3 := host.Host{Id: "h3", Status: evergreen.HostRunning}
- t1 := task.Task{Id: "t1", Status: evergreen.TaskStarted, HostId: "h1"}
- t2 := task.Task{Id: "t2", Status: evergreen.TaskDispatched, HostId: "h2"}
- t3 := task.Task{Id: "t3"}
- So(h1.Insert(), ShouldBeNil)
- So(h2.Insert(), ShouldBeNil)
- So(h3.Insert(), ShouldBeNil)
- So(t1.Insert(), ShouldBeNil)
- So(t2.Insert(), ShouldBeNil)
- So(t3.Insert(), ShouldBeNil)
- Convey("mappings should return for the task-running hosts and running tasks", func() {
- h2t, t2h, err := loadHostTaskMapping()
- So(err, ShouldBeNil)
- So(len(h2t), ShouldEqual, 2)
- So(h2t["h1"], ShouldEqual, "t1")
- So(h2t["h2"], ShouldEqual, "t2")
- So(len(t2h), ShouldEqual, 2)
- So(t2h["t1"], ShouldEqual, "h1")
- So(t2h["t2"], ShouldEqual, "h2")
- })
- })
- Convey("with a task that has a host but a host that does not have a task", func() {
- require.NoError(t, db.ClearCollections(host.Collection, task.Collection))
- h := host.Host{
- Id: "host1",
- Status: evergreen.HostRunning,
- }
- So(h.Insert(), ShouldBeNil)
- t := task.Task{
- Id: "task1",
- HostId: "host1",
- Status: evergreen.TaskStarted,
- }
- So(t.Insert(), ShouldBeNil)
- h2t, t2h, err := loadHostTaskMapping()
- So(err, ShouldBeNil)
- So(len(h2t), ShouldEqual, 0)
- So(len(t2h), ShouldEqual, 1)
- So(t2h["task1"], ShouldEqual, "host1")
-
- })
- Convey("with a host that has a task but a task that does not have a host", func() {
- require.NoError(t, db.Clear(task.Collection))
- h := host.Host{
- Id: "host1",
- Status: evergreen.HostRunning,
- RunningTask: "task1",
- }
- So(h.Insert(), ShouldBeNil)
- t := task.Task{
- Id: "task1",
- Status: evergreen.TaskStarted,
- }
- So(t.Insert(), ShouldBeNil)
- h2t, t2h, err := loadHostTaskMapping()
- So(err, ShouldBeNil)
- So(len(h2t), ShouldEqual, 1)
- So(len(t2h), ShouldEqual, 1)
- So(t2h["task1"], ShouldEqual, "")
- So(h2t["host1"], ShouldEqual, "task1")
-
- })
- })
-}
-
-func TestStuckHostAuditing(t *testing.T) {
- Convey("With tasks and hosts inserted into the db", t, func() {
- require.NoError(t, db.ClearCollections(host.Collection, task.Collection))
- h1 := host.Host{Id: "h1", Status: evergreen.HostRunning, RunningTask: "t1"}
- h2 := host.Host{Id: "h2", Status: evergreen.HostRunning, RunningTask: "t2"}
- h3 := host.Host{Id: "h3", Status: evergreen.HostRunning}
-
- So(h1.Insert(), ShouldBeNil)
- So(h2.Insert(), ShouldBeNil)
- So(h3.Insert(), ShouldBeNil)
-
- t1 := task.Task{Id: "t1", Status: evergreen.TaskDispatched, HostId: h1.Id}
- t2 := task.Task{Id: "t2", Status: evergreen.TaskFailed, HostId: h2.Id}
- So(t1.Insert(), ShouldBeNil)
- So(t2.Insert(), ShouldBeNil)
-
- Convey("hosts with running tasks that are completed should be returned", func() {
- stuckHosts, err := CheckStuckHosts()
- So(err, ShouldBeNil)
- So(len(stuckHosts), ShouldEqual, 1)
- So(stuckHosts[0].Host, ShouldEqual, h2.Id)
- So(stuckHosts[0].RunningTask, ShouldEqual, t2.Id)
- So(stuckHosts[0].TaskStatus, ShouldEqual, evergreen.TaskFailed)
- So(stuckHosts[0].Error(), ShouldEqual,
- fmt.Sprintf("host 'h2' has a running task 't2' with complete status '%s'", evergreen.TaskFailed))
- })
-
- })
-}
diff --git a/model/build/build.go b/model/build/build.go
index bb9c858c01b..ba0be102f99 100644
--- a/model/build/build.go
+++ b/model/build/build.go
@@ -2,13 +2,18 @@ package build
import (
"context"
+ "fmt"
+ "net/url"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/utility"
adb "github.com/mongodb/anser/db"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/options"
@@ -23,8 +28,8 @@ type TaskCache struct {
}
// Build represents a set of tasks on one variant of a Project
-// e.g. one build might be "Ubuntu with Python 2.4" and
-// another might be "OSX with Python 3.0", etc.
+// e.g. one build might be "Ubuntu with Python 2.4" and
+// another might be "OSX with Python 3.0", etc.
type Build struct {
Id string `bson:"_id" json:"_id"`
CreateTime time.Time `bson:"create_time" json:"create_time,omitempty"`
@@ -82,8 +87,7 @@ func (b *Build) UnmarshalBSON(in []byte) error { return mgobson.Unmarshal(in, b)
// In spite of the name, a build with status BuildFailed may still be in
// progress; use AllCachedTasksFinished
func (b *Build) IsFinished() bool {
- return b.Status == evergreen.BuildFailed ||
- b.Status == evergreen.BuildSucceeded
+ return evergreen.IsFinishedBuildStatus(b.Status)
}
// AllUnblockedTasksOrCompileFinished returns true when all activated tasks in the build have
@@ -122,19 +126,6 @@ func (b *Build) FindBuildOnBaseCommit() (*Build, error) {
return FindOne(ByRevisionAndVariant(b.Revision, b.BuildVariant))
}
-// Find all builds on the same project + variant + requester between
-// the current b and the specified previous build.
-func (b *Build) FindIntermediateBuilds(previous *Build) ([]Build, error) {
- return Find(ByBetweenBuilds(b, previous))
-}
-
-// Find the most recent activated build with the same variant +
-// requester + project as the current build.
-func (b *Build) PreviousActivated(project string, requester string) (*Build, error) {
- return FindOne(ByRecentlyActivatedForProjectAndVariant(
- b.RevisionOrderNumber, project, b.BuildVariant, requester))
-}
-
// Find the most recent b on with the same build variant + requester +
// project as the current build, with any of the specified statuses.
func (b *Build) PreviousSuccessful() (*Build, error) {
@@ -142,22 +133,29 @@ func (b *Build) PreviousSuccessful() (*Build, error) {
b.RevisionOrderNumber, b.Project, b.BuildVariant))
}
+func getSetBuildActivatedUpdate(active bool, caller string) bson.M {
+ return bson.M{
+ ActivatedKey: active,
+ ActivatedTimeKey: time.Now(),
+ ActivatedByKey: caller,
+ }
+}
+
// UpdateActivation updates builds with the given ids
// to the given activation setting.
func UpdateActivation(buildIds []string, active bool, caller string) error {
+ if len(buildIds) == 0 {
+ return nil
+ }
query := bson.M{IdKey: bson.M{"$in": buildIds}}
if !active && evergreen.IsSystemActivator(caller) {
query[ActivatedByKey] = bson.M{"$in": evergreen.SystemActivators}
}
- _, err := UpdateAllBuilds(
+ err := UpdateAllBuilds(
query,
bson.M{
- "$set": bson.M{
- ActivatedKey: active,
- ActivatedTimeKey: time.Now(),
- ActivatedByKey: caller,
- },
+ "$set": getSetBuildActivatedUpdate(active, caller),
},
)
return errors.Wrapf(err, "setting build activation to %t", active)
@@ -187,6 +185,18 @@ func (b *Build) SetAborted(aborted bool) error {
)
}
+// SetActivated sets the build activated field to the given boolean.
+func (b *Build) SetActivated(activated bool) error {
+ if b.Activated == activated {
+ return nil
+ }
+ b.Activated = activated
+ return UpdateOne(
+ bson.M{IdKey: b.Id},
+ bson.M{"$set": bson.M{ActivatedKey: activated}},
+ )
+}
+
// SetAllTasksBlocked sets the build AllTasksBlocked field to the given boolean.
func (b *Build) SetAllTasksBlocked(blocked bool) error {
if b.AllTasksBlocked == blocked {
@@ -288,15 +298,16 @@ func (b *Build) GetTimeSpent() (time.Duration, time.Duration, error) {
return timeTaken, makespan, nil
}
+// GetURL returns a url to the build page.
+func (b *Build) GetURL(uiBase string) string {
+ return fmt.Sprintf("%s/build/%s?redirect_spruce_users=true", uiBase, url.PathEscape(b.Id))
+}
+
// Insert writes the b to the db.
func (b *Build) Insert() error {
return db.Insert(Collection, b)
}
-func (b *Build) IsPatchBuild() bool {
- return evergreen.IsPatchRequester(b.Requester)
-}
-
type Builds []*Build
func (b Builds) getPayload() []interface{} {
@@ -315,3 +326,68 @@ func (b Builds) InsertMany(ctx context.Context, ordered bool) error {
_, err := evergreen.GetEnvironment().DB().Collection(Collection).InsertMany(ctx, b.getPayload(), &options.InsertManyOptions{Ordered: &ordered})
return errors.Wrap(err, "bulk inserting builds")
}
+
+// GetFinishedNotificationDescription returns a description of successful/failed tasks for the build,
+// to be used by jobs and notification processing.
+func (b *Build) GetFinishedNotificationDescription(tasks []task.Task) string {
+ success := 0
+ failed := 0
+ systemError := 0
+ other := 0
+ noReport := 0
+ for _, t := range tasks {
+ switch {
+ case t.Status == evergreen.TaskSucceeded:
+ success++
+
+ case t.Status == evergreen.TaskFailed:
+ failed++
+
+ case evergreen.IsSystemFailedTaskStatus(t.Status):
+ systemError++
+
+ case utility.StringSliceContains(evergreen.TaskUncompletedStatuses, t.Status):
+ noReport++
+
+ default:
+ other++
+ }
+ }
+
+ grip.ErrorWhen(other > 0, message.Fields{
+ "source": "status updates",
+ "message": "unknown task status",
+ "build_id": b.Id,
+ })
+
+ if success == 0 && failed == 0 && systemError == 0 && other == 0 {
+ return "no tasks were run"
+ }
+
+ desc := fmt.Sprintf("%s, %s", taskStatusSubformat(success, "succeeded"),
+ taskStatusSubformat(failed, "failed"))
+ if systemError > 0 {
+ desc += fmt.Sprintf(", %d internal errors", systemError)
+ }
+ if other > 0 {
+ desc += fmt.Sprintf(", %d other", other)
+ }
+
+ return b.appendTime(desc)
+}
+
+func taskStatusSubformat(n int, verb string) string {
+ if n == 0 {
+ return fmt.Sprintf("none %s", verb)
+ }
+ return fmt.Sprintf("%d %s", n, verb)
+}
+
+func (b *Build) appendTime(txt string) string {
+ finish := b.FinishTime
+ // In case the build is actually blocked, but we are triggering the finish event
+ if utility.IsZeroTime(b.FinishTime) {
+ finish = time.Now()
+ }
+ return fmt.Sprintf("%s in %s", txt, finish.Sub(b.StartTime).String())
+}
diff --git a/model/build/build_test.go b/model/build/build_test.go
index 9ed96899192..eaa11917289 100644
--- a/model/build/build_test.go
+++ b/model/build/build_test.go
@@ -8,6 +8,7 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/db"
+ mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/testutil"
. "github.com/smartystreets/goconvey/convey"
@@ -70,282 +71,6 @@ func TestGenericBuildFinding(t *testing.T) {
})
}
-func TestFindIntermediateBuilds(t *testing.T) {
-
- Convey("When finding intermediate builds", t, func() {
-
- require.NoError(t, db.Clear(Collection))
-
- // the two builds to use as endpoints
-
- currBuild := &Build{
- Id: "curr",
- RevisionOrderNumber: 1000,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(currBuild.Insert(), ShouldBeNil)
-
- prevBuild := &Build{Id: "prev", RevisionOrderNumber: 10}
- So(prevBuild.Insert(), ShouldBeNil)
-
- Convey("all builds returned should be in commits between the current"+
- " build and the specified previous one", func() {
-
- // insert two builds with commit order numbers in the correct
- // range
-
- matchingBuildOne := &Build{
- Id: "mb1",
- RevisionOrderNumber: 50,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(matchingBuildOne.Insert(), ShouldBeNil)
-
- matchingBuildTwo := &Build{
- Id: "mb2",
- RevisionOrderNumber: 51,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(matchingBuildTwo.Insert(), ShouldBeNil)
-
- // insert two builds with commit order numbers out of range (one too
- // high and one too low)
-
- numberTooLow := &Build{
- Id: "tooLow",
- RevisionOrderNumber: 5,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(numberTooLow.Insert(), ShouldBeNil)
-
- numberTooHigh := &Build{
- Id: "tooHigh",
- RevisionOrderNumber: 5000,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(numberTooHigh.Insert(), ShouldBeNil)
-
- // finding intermediate builds should return only the two in range
-
- found, err := currBuild.FindIntermediateBuilds(prevBuild)
- So(err, ShouldBeNil)
- So(len(found), ShouldEqual, 2)
- So(buildIdInSlice(found, matchingBuildOne.Id), ShouldBeTrue)
- So(buildIdInSlice(found, matchingBuildTwo.Id), ShouldBeTrue)
- })
-
- Convey("all builds returned should have the same build variant,"+
- " requester, and project as the current one", func() {
-
- // insert four builds - one with the wrong build variant, one
- // with the wrong requester, one with the wrong project, and one
- // with all the correct values
-
- wrongBV := &Build{
- Id: "wrongBV",
- RevisionOrderNumber: 50,
- BuildVariant: "bv2",
- Requester: "r1",
- Project: "project1",
- }
- So(wrongBV.Insert(), ShouldBeNil)
-
- wrongReq := &Build{
- Id: "wrongReq",
- RevisionOrderNumber: 51,
- BuildVariant: "bv1",
- Requester: "r2",
- Project: "project1",
- }
- So(wrongReq.Insert(), ShouldBeNil)
-
- wrongProject := &Build{
- Id: "wrongProject",
- RevisionOrderNumber: 52,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project2",
- }
- So(wrongProject.Insert(), ShouldBeNil)
-
- allCorrect := &Build{
- Id: "allCorrect",
- RevisionOrderNumber: 53,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(allCorrect.Insert(), ShouldBeNil)
-
- // finding intermediate builds should return only the one with
- // all the correctly matching values
-
- found, err := currBuild.FindIntermediateBuilds(prevBuild)
- So(err, ShouldBeNil)
- So(len(found), ShouldEqual, 1)
- So(found[0].Id, ShouldEqual, allCorrect.Id)
-
- })
-
- Convey("the builds returned should be sorted in ascending order"+
- " by commit order number", func() {
-
- // insert two builds with commit order numbers in the correct
- // range
- matchingBuildOne := &Build{
- Id: "mb1",
- RevisionOrderNumber: 52,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(matchingBuildOne.Insert(), ShouldBeNil)
-
- matchingBuildTwo := &Build{
- Id: "mb2",
- RevisionOrderNumber: 50,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(matchingBuildTwo.Insert(), ShouldBeNil)
-
- matchingBuildThree := &Build{
- Id: "mb3",
- RevisionOrderNumber: 51,
- BuildVariant: "bv1",
- Requester: "r1",
- Project: "project1",
- }
- So(matchingBuildThree.Insert(), ShouldBeNil)
-
- // the builds should come out sorted by commit order number
-
- found, err := currBuild.FindIntermediateBuilds(prevBuild)
- So(err, ShouldBeNil)
- So(len(found), ShouldEqual, 3)
- So(found[0].Id, ShouldEqual, matchingBuildTwo.Id)
- So(found[1].Id, ShouldEqual, matchingBuildThree.Id)
- So(found[2].Id, ShouldEqual, matchingBuildOne.Id)
- })
- })
-}
-
-func TestFindPreviousActivatedBuild(t *testing.T) {
-
- Convey("When finding the previous activated build", t, func() {
-
- require.NoError(t, db.Clear(Collection))
-
- currBuild := &Build{
- Id: "curr",
- RevisionOrderNumber: 1000,
- BuildVariant: "bv1",
- Project: "project1",
- Requester: "r1",
- }
-
- Convey("the last activated build before the specified one with the"+
- " same build variant and specified requester + project should be"+
- " fetched", func() {
-
- // insert 7 builds:
- // one with too high a commit number
- // one with the wrong build variant
- // one with the wrong project
- // one with the wrong requester
- // one inactive
- // two matching ones
-
- tooHigh := &Build{
- Id: "tooHigh",
- RevisionOrderNumber: 5000,
- BuildVariant: "bv1",
- Project: "project1",
- Requester: "r1",
- Activated: true,
- }
- So(tooHigh.Insert(), ShouldBeNil)
-
- wrongBV := &Build{
- Id: "wrongBV",
- RevisionOrderNumber: 500,
- BuildVariant: "bv2",
- Project: "project1",
- Requester: "r1",
- Activated: true,
- }
- So(wrongBV.Insert(), ShouldBeNil)
-
- wrongProject := &Build{
- Id: "wrongProject",
- RevisionOrderNumber: 500,
- BuildVariant: "bv1",
- Project: "project2",
- Requester: "r1",
- Activated: true,
- }
- So(wrongProject.Insert(), ShouldBeNil)
-
- wrongReq := &Build{
- Id: "wrongReq",
- RevisionOrderNumber: 500,
- BuildVariant: "bv1",
- Project: "project1",
- Requester: "r2",
- Activated: true,
- }
- So(wrongReq.Insert(), ShouldBeNil)
-
- notActive := &Build{
- Id: "notActive",
- RevisionOrderNumber: 500,
- BuildVariant: "bv1",
- Project: "project1",
- Requester: "r1",
- }
- So(notActive.Insert(), ShouldBeNil)
-
- matchingHigher := &Build{
- Id: "matchingHigher",
- RevisionOrderNumber: 900,
- BuildVariant: "bv1",
- Project: "project1",
- Requester: "r1",
- Activated: true,
- }
- So(matchingHigher.Insert(), ShouldBeNil)
-
- matchingLower := &Build{
- Id: "matchingLower",
- RevisionOrderNumber: 800,
- BuildVariant: "bv1",
- Project: "project1",
- Requester: "r1",
- Activated: true,
- }
- So(matchingLower.Insert(), ShouldBeNil)
-
- // the matching build with the higher commit order number should
- // be returned
-
- found, err := currBuild.PreviousActivated("project1", "r1")
- So(err, ShouldBeNil)
- So(found.Id, ShouldEqual, matchingHigher.Id)
- })
- })
-}
-
func TestRecentlyFinishedBuilds(t *testing.T) {
Convey("When finding all recently finished builds", t, func() {
@@ -731,3 +456,37 @@ func TestBulkInsert(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, dbBuilds, 3)
}
+
+func TestGetFinishedNotificationDescription(t *testing.T) {
+ b := &Build{
+ Id: mgobson.NewObjectId().Hex(),
+ BuildVariant: "testvariant",
+ Version: "testversion",
+ Status: evergreen.BuildFailed,
+ StartTime: time.Time{},
+ FinishTime: time.Time{}.Add(10 * time.Second),
+ }
+
+ assert.Equal(t, "no tasks were run", b.GetFinishedNotificationDescription(nil))
+
+ tasks := []task.Task{
+ {
+ Status: evergreen.TaskSucceeded,
+ },
+ }
+ assert.Equal(t, "1 succeeded, none failed in 10s", b.GetFinishedNotificationDescription(tasks))
+
+ tasks = []task.Task{
+ {
+ Status: evergreen.TaskSystemFailed,
+ },
+ }
+ assert.Equal(t, "none succeeded, none failed, 1 internal errors in 10s", b.GetFinishedNotificationDescription(tasks))
+
+ tasks = []task.Task{
+ {
+ Status: evergreen.TaskFailed,
+ },
+ }
+ assert.Equal(t, "none succeeded, 1 failed in 10s", b.GetFinishedNotificationDescription(tasks))
+}
diff --git a/model/build/db.go b/model/build/db.go
index fc3df5cdc5a..fa3711597e3 100644
--- a/model/build/db.go
+++ b/model/build/db.go
@@ -8,7 +8,6 @@ import (
"github.com/evergreen-ci/evergreen/model/task"
"github.com/mongodb/anser/bsonutil"
adb "github.com/mongodb/anser/db"
- "github.com/mongodb/grip"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
)
@@ -72,9 +71,12 @@ func ByVersions(vIds []string) db.Q {
return db.Query(bson.M{VersionKey: bson.M{"$in": vIds}})
}
-// ByVariant creates a query that finds all builds for a given variant.
-func ByVariant(bv string) db.Q {
- return db.Query(bson.M{BuildVariantKey: bv})
+// ByVersionAndVariant creates a query that finds all builds in a version for a given variant.
+func ByVersionAndVariant(version, bv string) db.Q {
+ return db.Query(bson.M{
+ VersionKey: version,
+ BuildVariantKey: bv,
+ })
}
// ByProject creates a query that finds all builds for a given project id.
@@ -115,19 +117,6 @@ func ByRevisionWithSystemVersionRequester(revision string) db.Q {
})
}
-// ByRecentlyActivatedForProjectAndVariant builds a query that returns all
-// builds before a given revision that were activated for a project + variant.
-// Builds are sorted from most to least recent.
-func ByRecentlyActivatedForProjectAndVariant(revision int, project, variant, requester string) db.Q {
- return db.Query(bson.M{
- RevisionOrderNumberKey: bson.M{"$lt": revision},
- ActivatedKey: true,
- BuildVariantKey: variant,
- ProjectKey: project,
- RequesterKey: requester,
- }).Sort([]string{"-" + RevisionOrderNumberKey})
-}
-
// ByRecentlySuccessfulForProjectAndVariant builds a query that returns all
// builds before a given revision that were successful for a project + variant.
// Builds are sorted from most to least recent.
@@ -202,20 +191,6 @@ func ByAfterRevision(project, buildVariant string, revision int) db.Q {
}).Sort([]string{RevisionOrderNumberKey})
}
-// ByRecentlyFinished builds a query that returns all builds for a given project
-// that are versions (not patches), that have finished and have non-zero
-// makespans.
-func ByRecentlyFinishedWithMakespans(limit int) db.Q {
- return db.Query(bson.M{
- RequesterKey: bson.M{
- "$in": evergreen.SystemVersionRequesterTypes,
- },
- PredictedMakespanKey: bson.M{"$gt": 0},
- ActualMakespanKey: bson.M{"$gt": 0},
- StatusKey: bson.M{"$in": evergreen.TaskCompletedStatuses},
- }).Sort([]string{RevisionOrderNumberKey}).Limit(limit)
-}
-
// DB Boilerplate
// FindOne returns one build that satisfies the query.
@@ -257,12 +232,13 @@ func UpdateOne(query interface{}, update interface{}) error {
)
}
-func UpdateAllBuilds(query interface{}, update interface{}) (*adb.ChangeInfo, error) {
- return db.UpdateAll(
+func UpdateAllBuilds(query interface{}, update interface{}) error {
+ _, err := db.UpdateAll(
Collection,
query,
update,
)
+ return err
}
// Remove deletes the build of the given id from the database
@@ -284,10 +260,26 @@ func FindProjectForBuild(buildID string) (string, error) {
return b.Project, nil
}
+// FindBuildsForTasks returns all builds that cover the given tasks
+func FindBuildsForTasks(tasks []task.Task) ([]Build, error) {
+ buildIdsMap := map[string]bool{}
+ var buildIds []string
+ for _, t := range tasks {
+ buildIdsMap[t.BuildId] = true
+ }
+ for buildId := range buildIdsMap {
+ buildIds = append(buildIds, buildId)
+ }
+ builds, err := Find(ByIds(buildIds))
+ if err != nil {
+ return nil, errors.Wrap(err, "getting builds")
+ }
+ return builds, nil
+}
+
// SetBuildStartedForTasks sets tasks' builds status to started and activates them
func SetBuildStartedForTasks(tasks []task.Task, caller string) error {
buildIdSet := map[string]bool{}
- catcher := grip.NewBasicCatcher()
for _, t := range tasks {
buildIdSet[t.BuildId] = true
}
@@ -295,16 +287,13 @@ func SetBuildStartedForTasks(tasks []task.Task, caller string) error {
for k := range buildIdSet {
buildIdList = append(buildIdList, k)
}
- // Set the build status for all the builds containing the tasks that we touched
- _, err := UpdateAllBuilds(
+ update := getSetBuildActivatedUpdate(true, caller)
+ update[StatusKey] = evergreen.BuildStarted
+ update[StartTimeKey] = time.Now()
+ // Set the build status/activation for all the builds containing the tasks that we touched.
+ err := UpdateAllBuilds(
bson.M{IdKey: bson.M{"$in": buildIdList}},
- bson.M{"$set": bson.M{
- StatusKey: evergreen.BuildStarted,
- StartTimeKey: time.Now(),
- }},
+ bson.M{"$set": update},
)
- catcher.Wrap(err, "setting builds to started")
- // update activation for all the builds
- catcher.Wrap(UpdateActivation(buildIdList, true, caller), "activating builds")
- return catcher.Resolve()
+ return errors.Wrap(err, "setting builds to started")
}
diff --git a/model/build_test.go b/model/build_test.go
index 64d80530714..6cb65a4fc8d 100644
--- a/model/build_test.go
+++ b/model/build_test.go
@@ -3,8 +3,10 @@ package model
import (
"testing"
+ "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model/build"
+ "github.com/evergreen-ci/evergreen/model/task"
"github.com/stretchr/testify/suite"
)
@@ -69,27 +71,39 @@ func TestBuildConnectorChangeStatusSuite(t *testing.T) {
}
func (s *BuildConnectorChangeStatusSuite) SetupSuite() {
- s.NoError(db.ClearCollections(build.Collection, VersionCollection))
+ s.NoError(db.ClearCollections(build.Collection, VersionCollection, task.Collection))
vId := "v"
+ task1 := &task.Task{
+ Id: "task1",
+ BuildId: "build1",
+ Status: evergreen.TaskWillRun,
+ }
+ task2 := &task.Task{
+ Id: "task2",
+ BuildId: "build2",
+ Status: evergreen.TaskWillRun,
+ }
version := &Version{Id: vId}
- build1 := &build.Build{Id: "build1", Version: vId}
- build2 := &build.Build{Id: "build2", Version: vId}
+ build1 := &build.Build{Id: "build1", Version: vId, Tasks: []build.TaskCache{{Id: "task1"}}}
+ build2 := &build.Build{Id: "build2", Version: vId, Tasks: []build.TaskCache{{Id: "task2"}}}
+ s.NoError(task1.Insert())
+ s.NoError(task2.Insert())
s.NoError(build1.Insert())
s.NoError(build2.Insert())
s.NoError(version.Insert())
}
func (s *BuildConnectorChangeStatusSuite) TestSetActivated() {
- err := SetBuildActivation("build1", true, "user1")
+ err := ActivateBuildsAndTasks([]string{"build1"}, true, "user1")
s.NoError(err)
b, err := build.FindOneId("build1")
s.NoError(err)
s.True(b.Activated)
s.Equal("user1", b.ActivatedBy)
- err = SetBuildActivation("build1", false, "user1")
+ err = ActivateBuildsAndTasks([]string{"build1"}, false, "user1")
s.NoError(err)
b, err = build.FindOneId("build1")
s.NoError(err)
@@ -162,9 +176,6 @@ func (s *BuildConnectorRestartSuite) SetupSuite() {
}
func (s *BuildConnectorRestartSuite) TestRestart() {
- err := RestartAllBuildTasks("build1", "user1")
- s.NoError(err)
-
- err = RestartAllBuildTasks("build1", "user1")
+ err := RestartBuild(&build.Build{Id: "build1"}, []string{}, true, "user1")
s.NoError(err)
}
diff --git a/model/build_variant_history.go b/model/build_variant_history.go
index 2abd674b1b2..6b8a039b930 100644
--- a/model/build_variant_history.go
+++ b/model/build_variant_history.go
@@ -27,7 +27,7 @@ func NewBuildVariantHistoryIterator(buildVariantInTask string, buildVariantInVer
}
// Returns versions and tasks grouped by gitspec, newest first (sorted by order number desc)
-func (self *buildVariantHistoryIterator) GetItems(beforeCommit *Version, numRevisions int) ([]bson.M, []Version, error) {
+func (bvhi *buildVariantHistoryIterator) GetItems(beforeCommit *Version, numRevisions int) ([]bson.M, []Version, error) {
var versionQuery db.Q
if beforeCommit != nil {
versionQuery = db.Query(bson.M{
@@ -35,10 +35,10 @@ func (self *buildVariantHistoryIterator) GetItems(beforeCommit *Version, numRevi
"$in": evergreen.SystemVersionRequesterTypes,
},
VersionRevisionOrderNumberKey: bson.M{"$lt": beforeCommit.RevisionOrderNumber},
- VersionIdentifierKey: self.ProjectName,
+ VersionIdentifierKey: bvhi.ProjectName,
VersionBuildVariantsKey: bson.M{
"$elemMatch": bson.M{
- VersionBuildStatusVariantKey: self.BuildVariantInVersion,
+ VersionBuildStatusVariantKey: bvhi.BuildVariantInVersion,
},
},
})
@@ -47,10 +47,10 @@ func (self *buildVariantHistoryIterator) GetItems(beforeCommit *Version, numRevi
VersionRequesterKey: bson.M{
"$in": evergreen.SystemVersionRequesterTypes,
},
- VersionIdentifierKey: self.ProjectName,
+ VersionIdentifierKey: bvhi.ProjectName,
VersionBuildVariantsKey: bson.M{
"$elemMatch": bson.M{
- VersionBuildStatusVariantKey: self.BuildVariantInVersion,
+ VersionBuildStatusVariantKey: bvhi.BuildVariantInVersion,
},
},
})
@@ -81,8 +81,8 @@ func (self *buildVariantHistoryIterator) GetItems(beforeCommit *Version, numRevi
task.RequesterKey: bson.M{
"$in": evergreen.SystemVersionRequesterTypes,
},
- task.BuildVariantKey: self.BuildVariantInTask,
- task.ProjectKey: self.ProjectName,
+ task.BuildVariantKey: bvhi.BuildVariantInTask,
+ task.ProjectKey: bvhi.ProjectName,
}
if beforeCommit != nil {
diff --git a/model/commit_queue.go b/model/commit_queue.go
index b20bf39052c..f654e5c3ee2 100644
--- a/model/commit_queue.go
+++ b/model/commit_queue.go
@@ -2,15 +2,18 @@ package model
import (
"context"
+ "strconv"
"github.com/evergreen-ci/evergreen/model/commitqueue"
+ "github.com/evergreen-ci/evergreen/model/event"
"github.com/evergreen-ci/evergreen/model/patch"
+ "github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/thirdparty"
- "github.com/google/go-github/v34/github"
+ "github.com/google/go-github/v52/github"
"github.com/pkg/errors"
)
-func GetModulesFromPR(ctx context.Context, githubToken string, prNum int, modules []commitqueue.Module, projectConfig *Project) ([]*github.PullRequest, []patch.ModulePatch, error) {
+func GetModulesFromPR(ctx context.Context, githubToken string, modules []commitqueue.Module, projectConfig *Project) ([]*github.PullRequest, []patch.ModulePatch, error) {
var modulePRs []*github.PullRequest
var modulePatches []patch.ModulePatch
for _, mod := range modules {
@@ -23,7 +26,11 @@ func GetModulesFromPR(ctx context.Context, githubToken string, prNum int, module
return nil, nil, errors.Wrapf(err, "malformed URL for module '%s'", mod.Module)
}
- pr, err := thirdparty.GetPullRequest(ctx, prNum, githubToken, owner, repo)
+ prNum, err := strconv.Atoi(mod.Issue)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "malformed PR number for module '%s'", mod.Module)
+ }
+ pr, err := thirdparty.GetMergeablePullRequest(ctx, prNum, githubToken, owner, repo)
if err != nil {
return nil, nil, errors.Wrap(err, "PR not valid for merge")
}
@@ -41,3 +48,59 @@ func GetModulesFromPR(ctx context.Context, githubToken string, prNum int, module
return modulePRs, modulePatches, nil
}
+
+func RemoveCommitQueueItemForVersion(projectId, version string, user string) (*commitqueue.CommitQueueItem, error) {
+ cq, err := commitqueue.FindOneId(projectId)
+ if err != nil {
+ return nil, errors.Wrapf(err, "getting commit queue for project '%s'", projectId)
+ }
+ if cq == nil {
+ return nil, errors.Errorf("no commit queue found for project '%s'", projectId)
+ }
+
+ issue := ""
+ for _, item := range cq.Queue {
+ if item.Version == version {
+ issue = item.Issue
+ }
+ }
+ if issue == "" {
+ return nil, nil
+ }
+
+ return RemoveItemAndPreventMerge(cq, issue, user)
+}
+
+// RemoveItemAndPreventMerge removes an item from the commit queue and disables the merge task, if applicable.
+func RemoveItemAndPreventMerge(cq *commitqueue.CommitQueue, issue string, user string) (*commitqueue.CommitQueueItem, error) {
+ removed, err := cq.Remove(issue)
+ if err != nil {
+ return removed, errors.Wrapf(err, "removing item '%s' from commit queue for project '%s'", issue, cq.ProjectID)
+ }
+
+ if removed == nil {
+ return nil, nil
+ }
+ if removed.Version != "" {
+ err = preventMergeForItem(*removed, user)
+ }
+
+ return removed, errors.Wrapf(err, "preventing merge for item '%s' in commit queue for project '%s'", issue, cq.ProjectID)
+}
+
+func preventMergeForItem(item commitqueue.CommitQueueItem, user string) error {
+ // Disable the merge task
+ mergeTask, err := task.FindMergeTaskForVersion(item.Version)
+ if err != nil {
+ return errors.Wrapf(err, "finding merge task for '%s'", item.Issue)
+ }
+ if mergeTask == nil {
+ return errors.New("merge task doesn't exist")
+ }
+ event.LogMergeTaskUnscheduled(mergeTask.Id, mergeTask.Execution, user)
+ if err = DisableTasks(user, *mergeTask); err != nil {
+ return errors.Wrap(err, "disabling merge task")
+ }
+
+ return nil
+}
diff --git a/model/commit_queue_test.go b/model/commit_queue_test.go
new file mode 100644
index 00000000000..18a94be541e
--- /dev/null
+++ b/model/commit_queue_test.go
@@ -0,0 +1,77 @@
+package model
+
+import (
+ "context"
+ "testing"
+
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/model/build"
+ "github.com/evergreen-ci/evergreen/model/commitqueue"
+ "github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/testutil"
+ "github.com/stretchr/testify/suite"
+)
+
+type CommitQueueSuite struct {
+ suite.Suite
+ q *commitqueue.CommitQueue
+}
+
+func TestCommitQueueSuite(t *testing.T) {
+ s := new(CommitQueueSuite)
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ originalEnv := evergreen.GetEnvironment()
+ env := testutil.NewEnvironment(ctx, t)
+ evergreen.SetEnvironment(env)
+ defer func() {
+ evergreen.SetEnvironment(originalEnv)
+ }()
+ suite.Run(t, s)
+}
+
+func (s *CommitQueueSuite) SetupTest() {
+ s.NoError(db.ClearCollections(commitqueue.Collection))
+
+ s.q = &commitqueue.CommitQueue{
+ ProjectID: "mci",
+ }
+
+ s.NoError(commitqueue.InsertQueue(s.q))
+ q, err := commitqueue.FindOneId("mci")
+ s.NotNil(q)
+ s.NoError(err)
+}
+func (s *CommitQueueSuite) TestPreventMergeForItem() {
+ s.NoError(db.ClearCollections(event.SubscriptionsCollection, task.Collection, build.Collection, VersionCollection))
+
+ patchID := "abcdef012345"
+
+ item := commitqueue.CommitQueueItem{
+ Issue: patchID,
+ Source: commitqueue.SourceDiff,
+ Version: patchID,
+ }
+
+ v := &Version{
+ Id: patchID,
+ }
+ s.NoError(v.Insert())
+
+ mergeBuild := &build.Build{Id: "b1"}
+ s.NoError(mergeBuild.Insert())
+ mergeTask := &task.Task{Id: "t1", CommitQueueMerge: true, Version: patchID, BuildId: "b1"}
+ s.NoError(mergeTask.Insert())
+
+ // With a corresponding version
+ s.NoError(preventMergeForItem(item, "user"))
+ subscriptions, err := event.FindSubscriptionsByAttributes(event.ResourceTypePatch, event.Attributes{ID: []string{patchID}})
+ s.NoError(err)
+ s.Empty(subscriptions)
+
+ mergeTask, err = task.FindOneId("t1")
+ s.NoError(err)
+ s.Equal(int64(-1), mergeTask.Priority)
+}
diff --git a/model/commitqueue/commit_queue.go b/model/commitqueue/commit_queue.go
index c3a75cd56a3..1bdc224b272 100644
--- a/model/commitqueue/commit_queue.go
+++ b/model/commitqueue/commit_queue.go
@@ -1,19 +1,15 @@
package commitqueue
import (
- "strings"
"time"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
- "github.com/evergreen-ci/evergreen/model/event"
- "github.com/evergreen-ci/evergreen/model/task"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
"github.com/pkg/errors"
)
const (
- triggerComment = "evergreen merge"
SourcePullRequest = "PR"
SourceDiff = "diff"
GithubContext = "evergreen/commitqueue"
@@ -37,6 +33,9 @@ type CommitQueueItem struct {
Modules []Module `bson:"modules"`
MessageOverride string `bson:"message_override"`
Source string `bson:"source"`
+ // QueueLengthAtEnqueue is the length of the queue when the item was enqueued. Used for tracking the speed of the
+ // commit queue as this value is logged when a commit queue item is processed.
+ QueueLengthAtEnqueue int `bson:"queue_length_at_enqueue"`
}
func (i *CommitQueueItem) MarshalBSON() ([]byte, error) { return mgobson.Marshal(i) }
@@ -61,18 +60,19 @@ func (q *CommitQueue) Enqueue(item CommitQueueItem) (int, error) {
}
item.EnqueueTime = time.Now()
- if err := add(q.ProjectID, q.Queue, item); err != nil {
+ item.QueueLengthAtEnqueue = len(q.Queue)
+ if err := add(q.ProjectID, item); err != nil {
return 0, errors.Wrapf(err, "adding '%s' to queue for project '%s'", item.Issue, q.ProjectID)
}
+
+ q.Queue = append(q.Queue, item)
grip.Info(message.Fields{
"source": "commit queue",
- "item_id": item.Issue,
+ "item": item,
"project_id": q.ProjectID,
"queue_length": len(q.Queue),
"message": "enqueued commit queue item",
})
-
- q.Queue = append(q.Queue, item)
return len(q.Queue) - 1, nil
}
@@ -92,23 +92,24 @@ func (q *CommitQueue) EnqueueAtFront(item CommitQueueItem) (int, error) {
}
}
item.EnqueueTime = time.Now()
- if err := addAtPosition(q.ProjectID, q.Queue, item, newPos); err != nil {
+ item.QueueLengthAtEnqueue = len(q.Queue)
+ if err := addAtPosition(q.ProjectID, item, newPos); err != nil {
return 0, errors.Wrapf(err, "force adding '%s' to queue for project '%s'", item.Issue, q.ProjectID)
}
+ if len(q.Queue) == 0 {
+ q.Queue = append(q.Queue, item)
+ return newPos, nil
+ }
+ q.Queue = append(q.Queue[:newPos], append([]CommitQueueItem{item}, q.Queue[newPos:]...)...)
- grip.Warning(message.Fields{
+ grip.Info(message.Fields{
"source": "commit queue",
- "item_id": item.Issue,
+ "item": item,
"project_id": q.ProjectID,
- "queue_length": len(q.Queue) + 1,
+ "queue_length": len(q.Queue),
"position": newPos,
"message": "enqueued commit queue item at front",
})
- if len(q.Queue) == 0 {
- q.Queue = append(q.Queue, item)
- return newPos, nil
- }
- q.Queue = append(q.Queue[:newPos], append([]CommitQueueItem{item}, q.Queue[newPos:]...)...)
return newPos, nil
}
@@ -157,17 +158,24 @@ func (q *CommitQueue) Remove(issue string) (*CommitQueueItem, error) {
}
q.Queue = append(q.Queue[:itemIndex], q.Queue[itemIndex+1:]...)
-
+ grip.Info(message.Fields{
+ "source": "commit queue",
+ "item": item,
+ "project_id": q.ProjectID,
+ "queue_length": len(q.Queue),
+ "message": "removed item from commit queue",
+ })
return &item, nil
}
-func (q *CommitQueue) UpdateVersion(item CommitQueueItem) error {
+func (q *CommitQueue) UpdateVersion(item *CommitQueueItem) error {
for i, currentEntry := range q.Queue {
if currentEntry.Issue == item.Issue {
q.Queue[i].Version = item.Version
+ q.Queue[i].ProcessingStartTime = item.ProcessingStartTime
}
}
- return errors.Wrap(addVersionID(q.ProjectID, item), "updating version")
+ return errors.Wrap(addVersionAndTime(q.ProjectID, *item), "updating version")
}
func (q *CommitQueue) FindItem(issue string) int {
@@ -194,13 +202,6 @@ func EnsureCommitQueueExistsForProject(id string) error {
return nil
}
-func TriggersCommitQueue(commentAction string, comment string) bool {
- if commentAction == "deleted" {
- return false
- }
- return strings.HasPrefix(comment, triggerComment)
-}
-
func ClearAllCommitQueues() (int, error) {
clearedCount, err := clearAll()
if err != nil {
@@ -210,57 +211,11 @@ func ClearAllCommitQueues() (int, error) {
return clearedCount, nil
}
-func RemoveCommitQueueItemForVersion(projectId, version string, user string) (*CommitQueueItem, error) {
- cq, err := FindOneId(projectId)
- if err != nil {
- return nil, errors.Wrapf(err, "getting commit queue for project '%s'", projectId)
- }
- if cq == nil {
- return nil, errors.Errorf("no commit queue found for project '%s'", projectId)
- }
-
- issue := ""
- for _, item := range cq.Queue {
- if item.Version == version {
- issue = item.Issue
- }
- }
- if issue == "" {
- return nil, nil
- }
-
- return cq.RemoveItemAndPreventMerge(issue, true, user)
-}
-
-func (cq *CommitQueue) RemoveItemAndPreventMerge(issue string, versionExists bool, user string) (*CommitQueueItem, error) {
- removed, err := cq.Remove(issue)
- if err != nil {
- return removed, errors.Wrapf(err, "removing item '%s' from commit queue for project '%s'", issue, cq.ProjectID)
- }
-
- if removed == nil {
- return nil, nil
- }
- if versionExists {
- err = preventMergeForItem(*removed, user)
- }
-
- return removed, errors.Wrapf(err, "preventing merge for item '%s' in commit queue for project '%s'", issue, cq.ProjectID)
-}
-
-func preventMergeForItem(item CommitQueueItem, user string) error {
- // Disable the merge task
- mergeTask, err := task.FindMergeTaskForVersion(item.Version)
- if err != nil {
- return errors.Wrapf(err, "finding merge task for '%s'", item.Issue)
- }
- if mergeTask == nil {
- return errors.New("merge task doesn't exist")
- }
- event.LogMergeTaskUnscheduled(mergeTask.Id, mergeTask.Execution, user)
- if err = mergeTask.SetDisabledPriority(user); err != nil {
- return errors.Wrap(err, "disabling merge task")
- }
-
- return nil
+// EnqueuePRInfo holds information necessary to enqueue a PR to the commit queue.
+type EnqueuePRInfo struct {
+ Username string
+ Owner string
+ Repo string
+ PR int
+ CommitMessage string
}
diff --git a/model/commitqueue/commit_queue_test.go b/model/commitqueue/commit_queue_test.go
index 77017bdeff5..557f884ce5d 100644
--- a/model/commitqueue/commit_queue_test.go
+++ b/model/commitqueue/commit_queue_test.go
@@ -7,9 +7,6 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/build"
- "github.com/evergreen-ci/evergreen/model/event"
- "github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/testutil"
_ "github.com/evergreen-ci/evergreen/testutil"
"github.com/stretchr/testify/suite"
@@ -109,7 +106,7 @@ func (s *CommitQueueSuite) TestEnqueueAtFront() {
// check that it's enqueued at the end of the processing items
item.Version = "critical1"
- s.NoError(dbq.UpdateVersion(item))
+ s.NoError(dbq.UpdateVersion(&item))
item = sampleCommitQueueItem
item.Issue = "critical2"
pos, err = dbq.EnqueueAtFront(item)
@@ -145,7 +142,7 @@ func (s *CommitQueueSuite) TestUpdateVersion() {
item := s.q.Queue[0]
item.Version = "my_version"
now := time.Now()
- s.NoError(s.q.UpdateVersion(item))
+ s.NoError(s.q.UpdateVersion(&item))
dbq, err := FindOneId("mci")
s.NoError(err)
@@ -263,18 +260,6 @@ func (s *CommitQueueSuite) TestClearAll() {
s.Equal(2, clearedCount)
}
-func (s *CommitQueueSuite) TestCommentTrigger() {
- comment := "no dice"
- action := "created"
- s.False(TriggersCommitQueue(action, comment))
-
- comment = triggerComment
- s.True(TriggersCommitQueue(action, comment))
-
- action = "deleted"
- s.False(TriggersCommitQueue(action, comment))
-}
-
func (s *CommitQueueSuite) TestFindOneId() {
s.NoError(db.ClearCollections(Collection))
cq := &CommitQueue{ProjectID: "mci"}
@@ -289,33 +274,6 @@ func (s *CommitQueueSuite) TestFindOneId() {
s.Nil(cq)
}
-func (s *CommitQueueSuite) TestPreventMergeForItem() {
- s.NoError(db.ClearCollections(event.SubscriptionsCollection, task.Collection, build.Collection))
-
- patchID := "abcdef012345"
-
- item := CommitQueueItem{
- Issue: patchID,
- Source: SourceDiff,
- Version: patchID,
- }
-
- mergeBuild := &build.Build{Id: "b1"}
- s.NoError(mergeBuild.Insert())
- mergeTask := &task.Task{Id: "t1", CommitQueueMerge: true, Version: patchID, BuildId: "b1"}
- s.NoError(mergeTask.Insert())
-
- // With a corresponding version
- s.NoError(preventMergeForItem(item, "user"))
- subscriptions, err := event.FindSubscriptionsByAttributes(event.ResourceTypePatch, event.Attributes{ID: []string{patchID}})
- s.NoError(err)
- s.Empty(subscriptions)
-
- mergeTask, err = task.FindOneId("t1")
- s.NoError(err)
- s.Equal(int64(-1), mergeTask.Priority)
-}
-
func (s *CommitQueueSuite) TestNextUnprocessed() {
q := CommitQueue{
Queue: []CommitQueueItem{},
diff --git a/model/commitqueue/db.go b/model/commitqueue/db.go
index ad449d3fd05..5f7b4143cf4 100644
--- a/model/commitqueue/db.go
+++ b/model/commitqueue/db.go
@@ -14,12 +14,13 @@ const Collection = "commit_queue"
var (
// bson fields for the CommitQueue struct
- IdKey = bsonutil.MustHaveTag(CommitQueue{}, "ProjectID")
- QueueKey = bsonutil.MustHaveTag(CommitQueue{}, "Queue")
- IssueKey = bsonutil.MustHaveTag(CommitQueueItem{}, "Issue")
- VersionKey = bsonutil.MustHaveTag(CommitQueueItem{}, "Version")
- EnqueueTimeKey = bsonutil.MustHaveTag(CommitQueueItem{}, "EnqueueTime")
- ProcessingStartTimeKey = bsonutil.MustHaveTag(CommitQueueItem{}, "ProcessingStartTime")
+ IdKey = bsonutil.MustHaveTag(CommitQueue{}, "ProjectID")
+ QueueKey = bsonutil.MustHaveTag(CommitQueue{}, "Queue")
+ IssueKey = bsonutil.MustHaveTag(CommitQueueItem{}, "Issue")
+ VersionKey = bsonutil.MustHaveTag(CommitQueueItem{}, "Version")
+ EnqueueTimeKey = bsonutil.MustHaveTag(CommitQueueItem{}, "EnqueueTime")
+ ProcessingStartTimeKey = bsonutil.MustHaveTag(CommitQueueItem{}, "ProcessingStartTime")
+ QueueLengthAtEnqueueKey = bsonutil.MustHaveTag(CommitQueueItem{}, "QueueLengthAtEnqueue")
)
func updateOne(query interface{}, update interface{}) error {
@@ -58,7 +59,7 @@ func insert(q *CommitQueue) error {
return db.Insert(Collection, q)
}
-func add(id string, queue []CommitQueueItem, item CommitQueueItem) error {
+func add(id string, item CommitQueueItem) error {
err := updateOne(
bson.M{
IdKey: id,
@@ -73,7 +74,7 @@ func add(id string, queue []CommitQueueItem, item CommitQueueItem) error {
return err
}
-func addAtPosition(id string, queue []CommitQueueItem, item CommitQueueItem, pos int) error {
+func addAtPosition(id string, item CommitQueueItem, pos int) error {
err := updateOne(
bson.M{
IdKey: id,
@@ -91,7 +92,7 @@ func addAtPosition(id string, queue []CommitQueueItem, item CommitQueueItem, pos
return err
}
-func addVersionID(id string, item CommitQueueItem) error {
+func addVersionAndTime(id string, item CommitQueueItem) error {
return updateOne(
bson.M{
IdKey: id,
diff --git a/model/container_task_queue.go b/model/container_task_queue.go
index d6fb44e5314..596543534f5 100644
--- a/model/container_task_queue.go
+++ b/model/container_task_queue.go
@@ -3,7 +3,6 @@ package model
import (
"time"
- "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
@@ -66,6 +65,7 @@ func (q *ContainerTaskQueue) populate() error {
grip.Info(message.Fields{
"message": "generated container task queue",
+ "usage": "container task health dashboard",
"candidates": len(candidates),
"queue": len(readyForAllocation),
"duration": time.Since(startAt),
@@ -96,50 +96,26 @@ func (q *ContainerTaskQueue) filterByProjectRefSettings(tasks []task.Task) ([]ta
continue
}
- if !ref.IsEnabled() {
- // GitHub PR tasks are still allowed to run for disabled hidden
- // projects.
- if t.Requester == evergreen.GithubPRRequester && ref.IsHidden() {
- grip.Debug(message.Fields{
- "message": "queueing task because GitHub PRs are allowed to run tasks for projects that are both hidden and disabled",
- "outcome": "not skipping",
- "task": t.Id,
- "project": t.Project,
- "context": "container task queue",
- })
- } else {
- grip.Debug(message.Fields{
- "message": "skipping task because project is disabled",
- "outcome": "skipping",
- "task": t.Id,
- "project": t.Project,
- "context": "container task queue",
- })
- continue
- }
- }
-
- if ref.IsDispatchingDisabled() {
- grip.Debug(message.Fields{
- "message": "skipping task because dispatching is disabled for its project",
- "outcome": "skipping",
- "task": t.Id,
- "project": t.Project,
- "context": "container task queue",
- })
- continue
- }
-
- if t.IsPatchRequest() && ref.IsPatchingDisabled() {
+ canDispatch, reason := ProjectCanDispatchTask(&ref, &t)
+ if !canDispatch {
grip.Debug(message.Fields{
- "message": "skipping task because patch testing is disabled for its project",
+ "message": "skipping allocation for undispatchable task",
"outcome": "skipping",
+ "reason": reason,
"task": t.Id,
"project": t.Project,
"context": "container task queue",
})
continue
}
+ grip.DebugWhen(reason != "", message.Fields{
+ "message": "allowing allocation for task that can be dispatched",
+ "outcome": "not skipping",
+ "reason": reason,
+ "task": t.Id,
+ "project": t.Project,
+ "context": "container task queue",
+ })
readyForAllocation = append(readyForAllocation, t)
}
@@ -162,7 +138,7 @@ func (q *ContainerTaskQueue) getProjectRefs(tasks []task.Task) (map[string]Proje
return map[string]ProjectRef{}, nil
}
- projRefs, err := FindProjectRefsByIds(projRefIDs...)
+ projRefs, err := FindMergedProjectRefsByIds(projRefIDs...)
if err != nil {
return nil, errors.Wrap(err, "finding project refs for tasks")
}
diff --git a/model/container_task_queue_test.go b/model/container_task_queue_test.go
index 3505d895bd2..021a117441b 100644
--- a/model/container_task_queue_test.go
+++ b/model/container_task_queue_test.go
@@ -30,7 +30,7 @@ func TestContainerTaskQueue(t *testing.T) {
return ProjectRef{
Id: utility.RandomString(),
Identifier: utility.RandomString(),
- Enabled: utility.TruePtr(),
+ Enabled: true,
}
}
checkEmpty := func(t *testing.T, ctq *ContainerTaskQueue) {
@@ -154,7 +154,7 @@ func TestContainerTaskQueue(t *testing.T) {
},
"DoesNotReturnTaskWithDisabledProject": func(t *testing.T) {
ref := getProjectRef()
- ref.Enabled = utility.FalsePtr()
+ ref.Enabled = false
require.NoError(t, ref.Insert())
needsAllocation := getTaskThatNeedsContainerAllocation()
@@ -168,7 +168,7 @@ func TestContainerTaskQueue(t *testing.T) {
},
"ReturnsGitHubTaskInDisabledAndHiddenProject": func(t *testing.T) {
ref := getProjectRef()
- ref.Enabled = utility.FalsePtr()
+ ref.Enabled = false
ref.Hidden = utility.TruePtr()
require.NoError(t, ref.Insert())
@@ -191,7 +191,7 @@ func TestContainerTaskQueue(t *testing.T) {
},
"DoesNotReturnNonGitHubTaskInDisabledAndHiddenProject": func(t *testing.T) {
ref := getProjectRef()
- ref.Enabled = utility.FalsePtr()
+ ref.Enabled = false
ref.Hidden = utility.TruePtr()
require.NoError(t, ref.Insert())
diff --git a/model/context.go b/model/context.go
index daf5c5b694e..b6ab2dfbba7 100644
--- a/model/context.go
+++ b/model/context.go
@@ -80,7 +80,7 @@ func (ctx *Context) GetProject() (*Project, error) {
return nil, errors.Wrap(err, "finding project")
}
- _, ctx.project, err = FindLatestVersionWithValidProject(pref.Id)
+ _, ctx.project, _, err = FindLatestVersionWithValidProject(pref.Id)
if err != nil {
return nil, errors.Wrapf(err, "finding project from last good version for project ref '%s'", pref.Id)
}
diff --git a/model/dependencies.go b/model/dependency.go
similarity index 52%
rename from model/dependencies.go
rename to model/dependency.go
index 2558fb5b136..3a48cc7d5ee 100644
--- a/model/dependencies.go
+++ b/model/dependency.go
@@ -6,33 +6,43 @@ import (
)
type dependencyIncluder struct {
- Project *Project
- requester string
- included map[TVPair]bool
+ Project *Project
+ requester string
+ included map[TVPair]bool
+ deactivateGeneratedDeps map[TVPair]bool
}
// IncludeDependencies takes a project and a slice of variant/task pairs names
// and returns the expanded set of variant/task pairs to include all the dependencies/requirements
// for the given set of tasks.
// If any dependency is cross-variant, it will include the variant and task for that dependency.
-// This function can return an error, but it should be treated as an informational warning
-func IncludeDependencies(project *Project, tvpairs []TVPair, requester string) ([]TVPair, error) {
+// This function can return an error, but it should be treated as an informational warning.
+func IncludeDependencies(project *Project, tvpairs []TVPair, requester string, activationInfo *specificActivationInfo) ([]TVPair, error) {
di := &dependencyIncluder{Project: project, requester: requester}
- return di.include(tvpairs)
+ return di.include(tvpairs, activationInfo, nil)
+}
+
+// IncludeDependenciesWithGenerated performs the same function as IncludeDependencies for generated projects.
+// activationInfo and generatedVariants are required in the case for generate tasks to detect if
+// new generated dependency's task/variant pairs are depended on by inactive tasks. If so,
+// we also set these new dependencies to inactive.
+func IncludeDependenciesWithGenerated(project *Project, tvpairs []TVPair, requester string, activationInfo *specificActivationInfo, generatedVariants []parserBV) ([]TVPair, error) {
+ di := &dependencyIncluder{Project: project, requester: requester}
+ return di.include(tvpairs, activationInfo, generatedVariants)
}
// include crawls the tasks represented by the combination of variants and tasks and
// add or removes tasks based on the dependency graph. Dependent tasks
// are added; tasks that depend on unreachable tasks are pruned. New slices
// of variants and tasks are returned.
-func (di *dependencyIncluder) include(initialDeps []TVPair) ([]TVPair, error) {
+func (di *dependencyIncluder) include(initialDeps []TVPair, activationInfo *specificActivationInfo, generatedVariants []parserBV) ([]TVPair, error) {
di.included = map[TVPair]bool{}
-
+ di.deactivateGeneratedDeps = map[TVPair]bool{}
warnings := grip.NewBasicCatcher()
// handle each pairing, recursively adding and pruning based
// on the task's dependencies
for _, d := range initialDeps {
- _, err := di.handle(d)
+ _, err := di.handle(d, activationInfo, generatedVariants, true)
warnings.Add(err)
}
@@ -42,14 +52,24 @@ func (di *dependencyIncluder) include(initialDeps []TVPair) ([]TVPair, error) {
outPairs = append(outPairs, pair)
}
}
+ // We deactivate tasks that do not have specific activation set in the
+ // generated project but have been generated as dependencies of other
+ // explicitly inactive tasks
+ for pair, addToActivationInfo := range di.deactivateGeneratedDeps {
+ if addToActivationInfo {
+ activationInfo.activationTasks[pair.Variant] = append(activationInfo.activationTasks[pair.Variant], pair.TaskName)
+ }
+ }
return outPairs, warnings.Resolve()
}
// handle finds and includes all tasks that the given task/variant pair depends
// on. Returns true if the task and all of its dependent tasks can be scheduled
// for the requester. Returns false if it cannot be scheduled, with an error
-// explaining why
-func (di *dependencyIncluder) handle(pair TVPair) (bool, error) {
+// explaining why.
+// isRoot denotes whether the function is at its recursive root, and if so we
+// update the deactivateGeneratedDeps map.
+func (di *dependencyIncluder) handle(pair TVPair, activationInfo *specificActivationInfo, generatedVariants []parserBV, isRoot bool) (bool, error) {
if included, ok := di.included[pair]; ok {
// we've been here before, so don't redo work
return included, nil
@@ -58,7 +78,7 @@ func (di *dependencyIncluder) handle(pair TVPair) (bool, error) {
// if the given task is a task group, recurse on each task
if tg := di.Project.FindTaskGroup(pair.TaskName); tg != nil {
for _, t := range tg.Tasks {
- ok, err := di.handle(TVPair{TaskName: t, Variant: pair.Variant})
+ ok, err := di.handle(TVPair{TaskName: t, Variant: pair.Variant}, activationInfo, generatedVariants, false)
if !ok {
di.included[pair] = false
return false, errors.Wrapf(err, "task group '%s' in variant '%s' contains unschedulable task '%s'", pair.TaskName, pair.Variant, t)
@@ -90,8 +110,20 @@ func (di *dependencyIncluder) handle(pair TVPair) (bool, error) {
// queue up all dependencies for recursive inclusion
deps := di.expandDependencies(pair, bvt.DependsOn)
+
+ // If this function is invoked from generate.tasks, calculate all variants
+ // that need to be included as dependencies, but are not in the generated project.
+ // If all the task / variant pairs that spawn these dependencies are inactive, we
+ // also mark this newly generated dependency as inactive.
+ pairSpecifiesActivation := activationInfo.taskOrVariantHasSpecificActivation(pair.Variant, pair.TaskName)
for _, dep := range deps {
- ok, err := di.handle(dep)
+ // Since the only tasks that have activation info set are the initial unexpanded dependencies, we only need
+ // to propagate the deactivateGeneratedDeps for those tasks, which only exist at the root level of each recursion.
+ // Hence, if isRoot is true, we updateDeactivationMap for the full recursive set of dependencies of the task.
+ if isRoot {
+ di.updateDeactivationMap(dep, generatedVariants, pairSpecifiesActivation)
+ }
+ ok, err := di.handle(dep, activationInfo, generatedVariants, false)
if !ok {
di.included[pair] = false
return false, errors.Wrapf(err, "task '%s' in variant '%s' has an unschedulable dependency", pair.TaskName, pair.Variant)
@@ -102,6 +134,42 @@ func (di *dependencyIncluder) handle(pair TVPair) (bool, error) {
return true, nil
}
+func (di *dependencyIncluder) updateDeactivationMap(pair TVPair, generatedVariants []parserBV, pairSpecifiesActivation bool) {
+ if !variantExistsInGeneratedProject(generatedVariants, pair.Variant) {
+ // If the dependency has not yet been added to deactivateGeneratedDeps, or if the
+ // original pair needs to be active, we update deactivateGeneratedDeps.
+ // We ultimately will only deactivate new dependencies where deactivateGeneratedDeps[pair] = true.
+ // If deactivateGeneratedDeps[pair] = false it signifies that there was at least
+ // one pair that depends on this new dep being active - so we cannot deactivate it.
+ if _, foundPair := di.deactivateGeneratedDeps[pair]; !foundPair || !pairSpecifiesActivation {
+ di.deactivateGeneratedDeps[pair] = pairSpecifiesActivation
+ di.recursivelyUpdateDeactivationMap(pair, map[TVPair]bool{}, pairSpecifiesActivation)
+ }
+ }
+}
+
+// recursivelyUpdateDeactivationMap recurses through the full dependencies of a task and updates their value
+// in the deactivateGeneratedDeps based on the pairSpecifiesActivation input.
+func (di *dependencyIncluder) recursivelyUpdateDeactivationMap(pair TVPair, dependencyIncluded map[TVPair]bool, pairSpecifiesActivation bool) {
+ // If we've been here before, return early to avoid infinite recursion and extra work.
+ if dependencyIncluded[pair] {
+ return
+ }
+ dependencyIncluded[pair] = true
+ bvt := di.Project.FindTaskForVariant(pair.TaskName, pair.Variant)
+ if bvt != nil {
+ deps := di.expandDependencies(pair, bvt.DependsOn)
+ for _, dep := range deps {
+ // Values only get set to true if pairSpecifiesActivation is true, otherwise they are set to false,
+ // which signifies that we must activate the task.
+ if _, foundDep := di.deactivateGeneratedDeps[dep]; !foundDep || !pairSpecifiesActivation {
+ di.deactivateGeneratedDeps[dep] = pairSpecifiesActivation
+ }
+ di.recursivelyUpdateDeactivationMap(dep, dependencyIncluded, pairSpecifiesActivation)
+ }
+ }
+}
+
// expandDependencies finds all tasks depended on by the current task/variant pair.
func (di *dependencyIncluder) expandDependencies(pair TVPair, depends []TaskUnitDependency) []TVPair {
deps := []TVPair{}
@@ -134,12 +202,18 @@ func (di *dependencyIncluder) expandDependencies(pair TVPair, depends []TaskUnit
// dependencies, then add that task for all variants that have it.
for _, v := range di.Project.BuildVariants {
for _, t := range v.Tasks {
- if t.Name != d.Name {
+ if t.Name == pair.TaskName && v.Name == pair.Variant {
continue
}
- if t.Name == pair.TaskName && v.Name == pair.Variant {
+
+ if t.IsGroup {
+ if !di.dependencyMatchesTaskGroupTask(pair, t, d) {
+ continue
+ }
+ } else if t.Name != d.Name {
continue
}
+
projectTask := di.Project.FindTaskForVariant(t.Name, v.Name)
if projectTask != nil {
if projectTask.IsDisabled() || projectTask.SkipOnRequester(di.requester) {
@@ -160,7 +234,7 @@ func (di *dependencyIncluder) expandDependencies(pair TVPair, depends []TaskUnit
variant := di.Project.FindBuildVariant(v)
if variant != nil {
for _, t := range variant.Tasks {
- if t.Name == pair.TaskName {
+ if t.Name == pair.TaskName && variant.Name == pair.Variant {
continue
}
projectTask := di.Project.FindTaskForVariant(t.Name, v)
@@ -189,3 +263,20 @@ func (di *dependencyIncluder) expandDependencies(pair TVPair, depends []TaskUnit
}
return deps
}
+
+func (di *dependencyIncluder) dependencyMatchesTaskGroupTask(depSrc TVPair, bvt BuildVariantTaskUnit, dep TaskUnitDependency) bool {
+ tg := di.Project.FindTaskGroup(bvt.Name)
+ if tg == nil {
+ return false
+ }
+ for _, tgTaskName := range tg.Tasks {
+ if tgTaskName == depSrc.TaskName && bvt.Variant == depSrc.Variant {
+ // Exclude self.
+ continue
+ }
+ if tgTaskName == dep.Name {
+ return true
+ }
+ }
+ return false
+}
diff --git a/model/dependency_test.go b/model/dependency_test.go
index 0766a199cca..b91c5a74b4a 100644
--- a/model/dependency_test.go
+++ b/model/dependency_test.go
@@ -6,6 +6,7 @@ import (
"github.com/evergreen-ci/evergreen"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/utility"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/require"
"go.mongodb.org/mongo-driver/bson"
@@ -61,3 +62,241 @@ func TestDependencyBSON(t *testing.T) {
})
})
}
+
+func TestIncludeDependencies(t *testing.T) {
+ Convey("With a project task config with cross-variant dependencies", t, func() {
+ parserProject := &ParserProject{
+ Tasks: []parserTask{
+ {Name: "t1"},
+ {Name: "t2", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "t1"}}}},
+ {Name: "t3"},
+ {Name: "t4", Patchable: utility.FalsePtr()},
+ {Name: "t5", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "t4"}}}},
+ {Name: "t6", DependsOn: parserDependencies{{TaskSelector: taskSelector{
+ Name: "tgt1",
+ Variant: &variantSelector{StringSelector: AllVariants},
+ }}}},
+ {Name: "t7", DependsOn: parserDependencies{{TaskSelector: taskSelector{
+ Name: "tgt2",
+ }}}},
+ {Name: "tgt1"},
+ {Name: "tgt2"},
+ },
+ BuildVariants: []parserBV{
+ {Name: "v1", Tasks: []parserBVTaskUnit{
+ {Name: "t1"},
+ {Name: "t2"},
+ {Name: "tgt1"},
+ }},
+ {Name: "v2", Tasks: []parserBVTaskUnit{
+ {Name: "t3", DependsOn: parserDependencies{
+ {TaskSelector: taskSelector{Name: "t2", Variant: &variantSelector{StringSelector: "v1"}}},
+ }},
+ {Name: "t4"},
+ {Name: "t5"},
+ {Name: "t6"},
+ {Name: "t7"},
+ {Name: "tgt2"},
+ }},
+ },
+ TaskGroups: []parserTaskGroup{
+ {Name: "tg1", Tasks: []string{"tgt1", "tgt2"}},
+ },
+ }
+ p, err := TranslateProject(parserProject)
+ So(err, ShouldBeNil)
+ So(p, ShouldNotBeNil)
+
+ Convey("a patch against v1/t1 should remain unchanged", func() {
+ pairs, err := IncludeDependencies(p, []TVPair{{"v1", "t1"}}, evergreen.PatchVersionRequester, nil)
+ So(err, ShouldBeNil)
+ So(len(pairs), ShouldEqual, 1)
+ So(pairs[0], ShouldResemble, TVPair{"v1", "t1"})
+ })
+
+ Convey("a patch against v1/t2 should add t1", func() {
+ pairs, err := IncludeDependencies(p, []TVPair{{"v1", "t2"}}, evergreen.PatchVersionRequester, nil)
+ So(err, ShouldBeNil)
+ So(len(pairs), ShouldEqual, 2)
+ So(pairs, shouldContainPair, TVPair{"v1", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t1"})
+ })
+
+ Convey("a patch against v2/t3 should add t1,t2, and v1", func() {
+ pairs, err := IncludeDependencies(p, []TVPair{{"v2", "t3"}}, evergreen.PatchVersionRequester, nil)
+ So(err, ShouldBeNil)
+ So(len(pairs), ShouldEqual, 3)
+ So(pairs, shouldContainPair, TVPair{"v1", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t1"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t3"})
+ })
+
+ Convey("a patch against v2/t5 should be pruned, since its dependency is not patchable", func() {
+ pairs, err := IncludeDependencies(p, []TVPair{{"v2", "t5"}}, evergreen.PatchVersionRequester, nil)
+ So(err, ShouldNotBeNil)
+ So(len(pairs), ShouldEqual, 0)
+
+ pairs, err = IncludeDependencies(p, []TVPair{{"v2", "t5"}}, evergreen.RepotrackerVersionRequester, nil)
+ So(err, ShouldBeNil)
+ So(len(pairs), ShouldEqual, 2)
+ })
+
+ Convey("a patch that has a dependency on a task group task with all variants should include that one task", func() {
+ pairs, err := IncludeDependencies(p, []TVPair{{"v2", "t6"}}, evergreen.PatchVersionRequester, nil)
+ So(err, ShouldBeNil)
+ So(len(pairs), ShouldEqual, 2)
+ expectedPairs := []TVPair{
+ {Variant: "v2", TaskName: "t6"},
+ {Variant: "v1", TaskName: "tgt1"},
+ }
+ So(expectedPairs, ShouldContainResembling, pairs[0])
+ So(expectedPairs, ShouldContainResembling, pairs[1])
+ })
+ Convey("a patch that has a dependency on a task group task within the same variant should include that one task", func() {
+ pairs, err := IncludeDependencies(p, []TVPair{{"v2", "t7"}}, evergreen.PatchVersionRequester, nil)
+ So(err, ShouldBeNil)
+ So(len(pairs), ShouldEqual, 2)
+ expectedPairs := []TVPair{
+ {Variant: "v2", TaskName: "t7"},
+ {Variant: "v2", TaskName: "tgt2"},
+ }
+ So(expectedPairs, ShouldContainResembling, pairs[0])
+ So(expectedPairs, ShouldContainResembling, pairs[1])
+ })
+ })
+
+ Convey("With a project task config with * selectors", t, func() {
+ parserProject := &ParserProject{
+ Tasks: []parserTask{
+ {Name: "t1"},
+ {Name: "t2"},
+ {Name: "t3", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: AllDependencies}}}},
+ {Name: "t4", DependsOn: parserDependencies{
+ {TaskSelector: taskSelector{
+ Name: "t3", Variant: &variantSelector{StringSelector: AllVariants},
+ }},
+ }},
+ {Name: "t5", DependsOn: parserDependencies{
+ {TaskSelector: taskSelector{
+ Name: AllDependencies, Variant: &variantSelector{StringSelector: AllVariants},
+ }},
+ }},
+ },
+ BuildVariants: []parserBV{
+ {Name: "v1", Tasks: []parserBVTaskUnit{{Name: "t1"}, {Name: "t2"}, {Name: "t3"}}},
+ {Name: "v2", Tasks: []parserBVTaskUnit{{Name: "t1"}, {Name: "t2"}, {Name: "t3"}}},
+ {Name: "v3", Tasks: []parserBVTaskUnit{{Name: "t4"}}},
+ {Name: "v4", Tasks: []parserBVTaskUnit{{Name: "t5"}}},
+ },
+ }
+ p, err := TranslateProject(parserProject)
+ So(err, ShouldBeNil)
+ So(p, ShouldNotBeNil)
+
+ Convey("a patch against v1/t3 should include t2 and t1", func() {
+ pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "t3"}}, evergreen.PatchVersionRequester, nil)
+ So(len(pairs), ShouldEqual, 3)
+ So(pairs, shouldContainPair, TVPair{"v1", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t1"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t3"})
+ })
+
+ Convey("a patch against v3/t4 should include v1, v2, t3, t2, and t1", func() {
+ pairs, _ := IncludeDependencies(p, []TVPair{{"v3", "t4"}}, evergreen.PatchVersionRequester, nil)
+ So(len(pairs), ShouldEqual, 7)
+
+ So(pairs, shouldContainPair, TVPair{"v3", "t4"})
+ // requires t3 on the other variants
+ So(pairs, shouldContainPair, TVPair{"v1", "t3"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t3"})
+
+ // t3 requires all the others
+ So(pairs, shouldContainPair, TVPair{"v1", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t1"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t1"})
+ })
+
+ Convey("a patch against v4/t5 should include v1, v2, v3, t4, t3, t2, and t1", func() {
+ pairs, _ := IncludeDependencies(p, []TVPair{{"v4", "t5"}}, evergreen.PatchVersionRequester, nil)
+ So(len(pairs), ShouldEqual, 8)
+ So(pairs, shouldContainPair, TVPair{"v4", "t5"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t1"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "t3"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t1"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t2"})
+ So(pairs, shouldContainPair, TVPair{"v2", "t3"})
+ So(pairs, shouldContainPair, TVPair{"v3", "t4"})
+ })
+ })
+
+ Convey("With a project task config with cyclical requirements", t, func() {
+ all := []parserBVTaskUnit{{Name: "1"}, {Name: "2"}, {Name: "3"}}
+ parserProject := &ParserProject{
+ Tasks: []parserTask{
+ {Name: "1", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "2"}}, {TaskSelector: taskSelector{Name: "3"}}}},
+ {Name: "2", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "1"}}, {TaskSelector: taskSelector{Name: "3"}}}},
+ {Name: "3", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "2"}}, {TaskSelector: taskSelector{Name: "1"}}}},
+ },
+ BuildVariants: []parserBV{
+ {Name: "v1", Tasks: all},
+ {Name: "v2", Tasks: all},
+ },
+ }
+
+ p, err := TranslateProject(parserProject)
+ So(err, ShouldBeNil)
+ So(p, ShouldNotBeNil)
+
+ Convey("all tasks should be scheduled no matter which is initially added", func() {
+ Convey("for '1'", func() {
+ pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "1"}}, evergreen.PatchVersionRequester, nil)
+ So(len(pairs), ShouldEqual, 3)
+ So(pairs, shouldContainPair, TVPair{"v1", "1"})
+ So(pairs, shouldContainPair, TVPair{"v1", "2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "3"})
+ })
+ Convey("for '2'", func() {
+ pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "2"}, {"v2", "2"}}, evergreen.PatchVersionRequester, nil)
+ So(len(pairs), ShouldEqual, 6)
+ So(pairs, shouldContainPair, TVPair{"v1", "1"})
+ So(pairs, shouldContainPair, TVPair{"v1", "2"})
+ So(pairs, shouldContainPair, TVPair{"v1", "3"})
+ So(pairs, shouldContainPair, TVPair{"v2", "1"})
+ So(pairs, shouldContainPair, TVPair{"v2", "2"})
+ So(pairs, shouldContainPair, TVPair{"v2", "3"})
+ })
+ Convey("for '3'", func() {
+ pairs, _ := IncludeDependencies(p, []TVPair{{"v2", "3"}}, evergreen.PatchVersionRequester, nil)
+ So(len(pairs), ShouldEqual, 3)
+ So(pairs, shouldContainPair, TVPair{"v2", "1"})
+ So(pairs, shouldContainPair, TVPair{"v2", "2"})
+ So(pairs, shouldContainPair, TVPair{"v2", "3"})
+ })
+ })
+ })
+ Convey("With a task that depends on task groups", t, func() {
+ parserProject := &ParserProject{
+ Tasks: []parserTask{
+ {Name: "a", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "*", Variant: &variantSelector{StringSelector: "*"}}}}},
+ {Name: "b"},
+ },
+ TaskGroups: []parserTaskGroup{
+ {Name: "task-group", Tasks: []string{"b"}},
+ },
+ BuildVariants: []parserBV{
+ {Name: "variant-with-group", Tasks: []parserBVTaskUnit{{Name: "task-group"}}},
+ {Name: "initial-variant", Tasks: []parserBVTaskUnit{{Name: "a"}}},
+ },
+ }
+ p, err := TranslateProject(parserProject)
+ So(err, ShouldBeNil)
+ So(p, ShouldNotBeNil)
+
+ initDep := TVPair{TaskName: "a", Variant: "initial-variant"}
+ pairs, _ := IncludeDependencies(p, []TVPair{initDep}, evergreen.PatchVersionRequester, nil)
+ So(pairs, ShouldHaveLength, 2)
+ So(initDep, ShouldBeIn, pairs)
+ })
+}
diff --git a/model/distro/aliases_test.go b/model/distro/aliases_test.go
index 7635c385534..71882fe3e8c 100644
--- a/model/distro/aliases_test.go
+++ b/model/distro/aliases_test.go
@@ -15,7 +15,7 @@ func TestDistroAliases(t *testing.T) {
t.Run("Containers", func(t *testing.T) {
distros := byPoolSize{
{Id: "three", Provider: evergreen.ProviderNameStatic},
- {Id: "two", Provider: evergreen.ProviderNameEc2Auto},
+ {Id: "two", Provider: evergreen.ProviderNameEc2Fleet},
{Id: "one", Provider: evergreen.ProviderNameDocker},
}
sort.Sort(distros)
@@ -25,7 +25,7 @@ func TestDistroAliases(t *testing.T) {
t.Run("Ephemeral", func(t *testing.T) {
distros := byPoolSize{
{Id: "two", Provider: evergreen.ProviderNameStatic},
- {Id: "one", Provider: evergreen.ProviderNameEc2Auto},
+ {Id: "one", Provider: evergreen.ProviderNameEc2Fleet},
}
sort.Sort(distros)
assert.Equal(t, "one", distros[0].Id)
diff --git a/model/distro/db.go b/model/distro/db.go
index 3183d864b56..5a281ad67fc 100644
--- a/model/distro/db.go
+++ b/model/distro/db.go
@@ -36,7 +36,7 @@ var (
ValidProjectsKey = bsonutil.MustHaveTag(Distro{}, "ValidProjects")
IsVirtualWorkstationKey = bsonutil.MustHaveTag(Distro{}, "IsVirtualWorkstation")
IsClusterKey = bsonutil.MustHaveTag(Distro{}, "IsCluster")
- IcecreamSettingsKey = bsonutil.MustHaveTag(Distro{}, "IcecreamSettings")
+ IceCreamSettingsKey = bsonutil.MustHaveTag(Distro{}, "IceCreamSettings")
)
var (
@@ -68,8 +68,8 @@ var (
)
var (
- IcecreamSettingsSchedulerHostKey = bsonutil.MustHaveTag(IcecreamSettings{}, "SchedulerHost")
- IcecreamSettingsConfigPathKey = bsonutil.MustHaveTag(IcecreamSettings{}, "ConfigPath")
+ IceCreamSettingsSchedulerHostKey = bsonutil.MustHaveTag(IceCreamSettings{}, "SchedulerHost")
+ IceCreamSettingsConfigPathKey = bsonutil.MustHaveTag(IceCreamSettings{}, "ConfigPath")
)
const Collection = "distro"
diff --git a/model/distro/distro.go b/model/distro/distro.go
index 61e4c692801..0a76b2b0315 100644
--- a/model/distro/distro.go
+++ b/model/distro/distro.go
@@ -50,14 +50,18 @@ type Distro struct {
IsVirtualWorkstation bool `bson:"is_virtual_workstation" json:"is_virtual_workstation" mapstructure:"is_virtual_workstation"`
IsCluster bool `bson:"is_cluster" json:"is_cluster" mapstructure:"is_cluster"`
HomeVolumeSettings HomeVolumeSettings `bson:"home_volume_settings" json:"home_volume_settings" mapstructure:"home_volume_settings"`
- IcecreamSettings IcecreamSettings `bson:"icecream_settings,omitempty" json:"icecream_settings,omitempty" mapstructure:"icecream_settings,omitempty"`
+ IceCreamSettings IceCreamSettings `bson:"icecream_settings,omitempty" json:"icecream_settings,omitempty" mapstructure:"icecream_settings,omitempty"`
}
+// DistroData is the same as a distro, with the only difference being that all
+// the provider settings are stored as maps instead of Birch BSON documents.
type DistroData struct {
Distro Distro `bson:",inline"`
ProviderSettingsMap []map[string]interface{} `bson:"provider_settings_list" json:"provider_settings_list"`
}
+// NewDistroData creates distro data from this distro. The provider settings are
+// converted into maps instead of Birch BSON documents.
func (d *Distro) NewDistroData() DistroData {
res := DistroData{ProviderSettingsMap: []map[string]interface{}{}}
res.Distro = *d
@@ -128,14 +132,14 @@ type HomeVolumeSettings struct {
FormatCommand string `bson:"format_command" json:"format_command" mapstructure:"format_command"`
}
-type IcecreamSettings struct {
+type IceCreamSettings struct {
SchedulerHost string `bson:"scheduler_host,omitempty" json:"scheduler_host,omitempty" mapstructure:"scheduler_host,omitempty"`
ConfigPath string `bson:"config_path,omitempty" json:"config_path,omitempty" mapstructure:"config_path,omitempty"`
}
// WriteConfigScript returns the shell script to update the icecream config
// file.
-func (s IcecreamSettings) GetUpdateConfigScript() string {
+func (s IceCreamSettings) GetUpdateConfigScript() string {
if !s.Populated() {
return ""
}
@@ -161,7 +165,7 @@ fi
)
}
-func (s IcecreamSettings) Populated() bool {
+func (s IceCreamSettings) Populated() bool {
return s.SchedulerHost != "" && s.ConfigPath != ""
}
@@ -224,12 +228,13 @@ func (d *Distro) ShellBinary() string {
}
type HostAllocatorSettings struct {
- Version string `bson:"version" json:"version" mapstructure:"version"`
- MinimumHosts int `bson:"minimum_hosts" json:"minimum_hosts" mapstructure:"minimum_hosts"`
- MaximumHosts int `bson:"maximum_hosts" json:"maximum_hosts" mapstructure:"maximum_hosts"`
- RoundingRule string `bson:"rounding_rule" json:"rounding_rule" mapstructure:"rounding_rule"`
- FeedbackRule string `bson:"feedback_rule" json:"feedback_rule" mapstructure:"feedback_rule"`
- HostsOverallocatedRule string `bson:"hosts_overallocated_rule" json:"hosts_overallocated_rule" mapstructure:"hosts_overallocated_rule"`
+ Version string `bson:"version" json:"version" mapstructure:"version"`
+ MinimumHosts int `bson:"minimum_hosts" json:"minimum_hosts" mapstructure:"minimum_hosts"`
+ MaximumHosts int `bson:"maximum_hosts" json:"maximum_hosts" mapstructure:"maximum_hosts"`
+ RoundingRule string `bson:"rounding_rule" json:"rounding_rule" mapstructure:"rounding_rule"`
+ FeedbackRule string `bson:"feedback_rule" json:"feedback_rule" mapstructure:"feedback_rule"`
+ HostsOverallocatedRule string `bson:"hosts_overallocated_rule" json:"hosts_overallocated_rule" mapstructure:"hosts_overallocated_rule"`
+ // AcceptableHostIdleTime is the amount of time we wait for an idle host to be marked as idle.
AcceptableHostIdleTime time.Duration `bson:"acceptable_host_idle_time" json:"acceptable_host_idle_time" mapstructure:"acceptable_host_idle_time"`
FutureHostFraction float64 `bson:"future_host_fraction" json:"future_host_fraction" mapstructure:"future_host_fraction"`
}
@@ -279,9 +284,6 @@ const (
CommunicationMethodLegacySSH = "legacy-ssh"
CommunicationMethodSSH = "ssh"
CommunicationMethodRPC = "rpc"
-
- CloneMethodLegacySSH = "legacy-ssh"
- CloneMethodOAuth = "oauth"
)
// validBootstrapMethods includes all recognized bootstrap methods.
@@ -299,12 +301,6 @@ var validCommunicationMethods = []string{
CommunicationMethodRPC,
}
-// validCloneMethods includes all recognized clone methods.
-var validCloneMethods = []string{
- CloneMethodLegacySSH,
- CloneMethodOAuth,
-}
-
// Seed the random number generator for creating distro names
func init() {
rand.Seed(time.Now().UnixNano())
@@ -492,11 +488,12 @@ func (d *Distro) IsParent(s *evergreen.Settings) bool {
return false
}
+// GetImageID returns the distro provider's image.
func (d *Distro) GetImageID() (string, error) {
key := ""
switch d.Provider {
- case evergreen.ProviderNameEc2Auto, evergreen.ProviderNameEc2OnDemand, evergreen.ProviderNameEc2Spot, evergreen.ProviderNameEc2Fleet:
+ case evergreen.ProviderNameEc2OnDemand, evergreen.ProviderNameEc2Spot, evergreen.ProviderNameEc2Fleet:
key = "ami"
case evergreen.ProviderNameDocker, evergreen.ProviderNameDockerMock:
key = "image_url"
@@ -569,15 +566,6 @@ func ValidateArch(arch string) error {
return nil
}
-// ValidateCloneMethod checks that the clone mechanism is one of the supported
-// methods.
-func ValidateCloneMethod(method string) error {
- if !utility.StringSliceContains(validCloneMethods, method) {
- return errors.Errorf("'%s' is not a valid clone method", method)
- }
- return nil
-}
-
// GetDistroIds returns a slice of distro IDs for the given group of distros
func (distros DistroGroup) GetDistroIds() []string {
var ids []string
diff --git a/model/distro/distro_test.go b/model/distro/distro_test.go
index bfb60025df2..855ce0a76d7 100644
--- a/model/distro/distro_test.go
+++ b/model/distro/distro_test.go
@@ -232,13 +232,6 @@ func TestGetImageID(t *testing.T) {
noKey bool
legacyOnly bool
}{
- {
- name: "Ec2Auto",
- provider: evergreen.ProviderNameEc2Auto,
- key: "ami",
- value: "imageID",
- expectedOutput: "imageID",
- },
{
name: "Ec2OnDemand",
provider: evergreen.ProviderNameEc2OnDemand,
@@ -317,7 +310,7 @@ func TestGetImageID(t *testing.T) {
},
{
name: "InvalidKey",
- provider: evergreen.ProviderNameEc2Auto,
+ provider: evergreen.ProviderNameEc2Fleet,
key: "abi",
value: "imageID",
err: true,
@@ -592,7 +585,7 @@ func TestAddPermissions(t *testing.T) {
}
func TestLogDistroModifiedWithDistroData(t *testing.T) {
- assert.NoError(t, db.ClearCollections(event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(event.EventCollection))
d := Distro{
Id: "rainbow-lollipop",
diff --git a/model/event/admin_event.go b/model/event/admin_event.go
index 4e6624e9b59..67a72107bd2 100644
--- a/model/event/admin_event.go
+++ b/model/event/admin_event.go
@@ -13,6 +13,11 @@ import (
"github.com/pkg/errors"
)
+func init() {
+ registry.AddType(ResourceTypeAdmin, func() interface{} { return &rawAdminEventData{} })
+ registry.setUnexpirable(ResourceTypeAdmin, EventTypeValueChanged)
+}
+
const (
ResourceTypeAdmin = "ADMIN"
EventTypeValueChanged = "CONFIG_VALUE_CHANGED"
@@ -66,8 +71,7 @@ func LogAdminEvent(section string, before, after evergreen.ConfigSection, user s
ResourceType: ResourceTypeAdmin,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeAdmin,
"message": "error logging event",
@@ -99,7 +103,7 @@ func stripInteriorSections(config *evergreen.Settings) *evergreen.Settings {
}
func FindAdmin(query db.Q) ([]EventLogEntry, error) {
- eventsRaw, err := Find(AllLogCollection, query)
+ eventsRaw, err := Find(query)
if err != nil {
return nil, err
}
@@ -161,7 +165,7 @@ func convertRaw(in rawAdminEventData) (*AdminEventData, error) {
// RevertConfig reverts one config section to the before state of the specified GUID in the event log
func RevertConfig(guid string, user string) error {
- events, err := FindAdmin(ByGuid(guid))
+ events, err := FindAdmin(ByAdminGuid(guid))
if err != nil {
return errors.Wrap(err, "finding events")
}
diff --git a/model/event/admin_event_test.go b/model/event/admin_event_test.go
index 060aa0d52b2..de095009356 100644
--- a/model/event/admin_event_test.go
+++ b/model/event/admin_event_test.go
@@ -28,7 +28,7 @@ func TestAdminEventSuite(t *testing.T) {
}
func (s *AdminEventSuite) SetupTest() {
- s.Require().NoError(db.ClearCollections(AllLogCollection, evergreen.ConfigCollection))
+ s.Require().NoError(db.ClearCollections(EventCollection, evergreen.ConfigCollection))
}
func (s *AdminEventSuite) TestEventLogging() {
@@ -204,7 +204,7 @@ func (s *AdminEventSuite) TestRevertingRoot() {
}
func TestAdminEventsBeforeQuery(t *testing.T) {
- require.NoError(t, db.Clear(AllLogCollection))
+ require.NoError(t, db.Clear(EventCollection))
assert := assert.New(t)
before := &evergreen.ServiceFlags{}
after := &evergreen.ServiceFlags{HostInitDisabled: true}
diff --git a/model/event/auth_event.go b/model/event/auth_event.go
index 80d4e5bdec9..02442ff2a35 100644
--- a/model/event/auth_event.go
+++ b/model/event/auth_event.go
@@ -6,6 +6,10 @@ import (
"github.com/pkg/errors"
)
+func init() {
+ registry.AddType(ResourceTypeUser, func() interface{} { return &userData{} })
+}
+
const (
ResourceTypeUser = "USER"
)
@@ -53,8 +57,7 @@ func LogUserEvent(user string, eventType UserEventType, before, after interface{
Data: data,
ResourceType: ResourceTypeUser,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
return errors.Wrapf(err, "logging user event for user '%s'", user)
}
diff --git a/model/event/auth_event_test.go b/model/event/auth_event_test.go
index 113a50cd842..16829c866c1 100644
--- a/model/event/auth_event_test.go
+++ b/model/event/auth_event_test.go
@@ -12,7 +12,7 @@ import (
func TestLogUserRolesEvent(t *testing.T) {
defer func() {
- require.NoError(t, db.Clear(AllLogCollection))
+ require.NoError(t, db.Clear(EventCollection))
}()
t.Run("InvalidUserEventType", func(t *testing.T) {
assert.Error(t, LogUserEvent("user", "invalid", []string{"role"}, []string{}))
@@ -30,7 +30,7 @@ func TestLogUserRolesEvent(t *testing.T) {
bsonutil.GetDottedKeyName("data", "before"): before,
bsonutil.GetDottedKeyName("data", "after"): after,
})
- err := db.FindOneQ(AllLogCollection, q, e)
+ err := db.FindOneQ(EventCollection, q, e)
require.NoError(t, err)
})
}
diff --git a/model/event/build_event.go b/model/event/build_event.go
index 4474e34476f..42b0a0115ba 100644
--- a/model/event/build_event.go
+++ b/model/event/build_event.go
@@ -7,8 +7,11 @@ import (
"github.com/mongodb/grip/message"
)
-func buildEventDataFactory() interface{} {
- return &BuildEventData{}
+func init() {
+ registry.AddType(ResourceTypeBuild, func() interface{} { return &BuildEventData{} })
+
+ registry.AllowSubscription(ResourceTypeBuild, BuildStateChange)
+ registry.AllowSubscription(ResourceTypeBuild, BuildGithubCheckFinished)
}
const (
@@ -34,8 +37,7 @@ func LogBuildStateChangeEvent(id, status string) {
ResourceType: ResourceTypeBuild,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": event.ResourceType,
"event_type": BuildStateChange,
@@ -55,8 +57,7 @@ func LogBuildGithubCheckFinishedEvent(id, status string) {
},
ResourceType: ResourceTypeBuild,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": event.ResourceType,
"event_type": BuildGithubCheckFinished,
diff --git a/model/event/commit_queue_event.go b/model/event/commit_queue_event.go
index bb491ab4ed4..b94c3e6ab89 100644
--- a/model/event/commit_queue_event.go
+++ b/model/event/commit_queue_event.go
@@ -8,8 +8,12 @@ import (
"github.com/mongodb/grip/message"
)
-func commitQueueEventDataFactory() interface{} {
- return &CommitQueueEventData{}
+func init() {
+ registry.AddType(ResourceTypeCommitQueue, func() interface{} { return &CommitQueueEventData{} })
+
+ registry.AllowSubscription(ResourceTypeCommitQueue, CommitQueueStartTest)
+ registry.AllowSubscription(ResourceTypeCommitQueue, CommitQueueConcludeTest)
+ registry.AllowSubscription(ResourceTypeCommitQueue, CommitQueueEnqueueFailed)
}
const (
@@ -37,8 +41,7 @@ func logCommitQueueEvent(patchID, eventType string, data *CommitQueueEventData)
Data: data,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeCommitQueue,
"message": "error logging event",
@@ -66,6 +69,14 @@ func LogCommitQueueConcludeTest(patchID, status string) {
logCommitQueueEvent(patchID, CommitQueueConcludeTest, data)
}
+func LogCommitQueueConcludeWithErrorMessage(patchID, status, errMsg string) {
+ data := &CommitQueueEventData{
+ Status: status,
+ Error: errMsg,
+ }
+ logCommitQueueEvent(patchID, CommitQueueConcludeTest, data)
+}
+
func LogCommitQueueEnqueueFailed(patchID string, err error) {
data := &CommitQueueEventData{
Status: evergreen.EnqueueFailed,
diff --git a/model/event/distro_event.go b/model/event/distro_event.go
index 5ee7bc5625a..16edaf5fcf3 100644
--- a/model/event/distro_event.go
+++ b/model/event/distro_event.go
@@ -7,6 +7,14 @@ import (
"github.com/mongodb/grip/message"
)
+func init() {
+ registry.AddType(ResourceTypeDistro, func() interface{} { return &DistroEventData{} })
+ registry.setUnexpirable(ResourceTypeDistro, EventDistroAdded)
+ registry.setUnexpirable(ResourceTypeDistro, EventDistroModified)
+ registry.setUnexpirable(ResourceTypeDistro, EventDistroAMIModfied)
+ registry.setUnexpirable(ResourceTypeDistro, EventDistroRemoved)
+}
+
const (
// resource type
ResourceTypeDistro = "DISTRO"
@@ -34,7 +42,7 @@ func LogDistroEvent(distroId string, eventType string, eventData DistroEventData
ResourceType: ResourceTypeDistro,
}
- if err := NewDBEventLogger(AllLogCollection).LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeDistro,
"message": "error logging event",
diff --git a/model/event/distro_event_test.go b/model/event/distro_event_test.go
index d1103fc41e2..49f3fae7457 100644
--- a/model/event/distro_event_test.go
+++ b/model/event/distro_event_test.go
@@ -12,7 +12,7 @@ import (
func TestLoggingDistroEvents(t *testing.T) {
Convey("When logging distro events, ", t, func() {
- So(db.Clear(AllLogCollection), ShouldBeNil)
+ So(db.Clear(EventCollection), ShouldBeNil)
Convey("logged events should be stored and queryable in sorted order", func() {
distroId := "distro_id"
diff --git a/model/event/event.go b/model/event/event.go
index a03b19f0533..f3b7b4ecb94 100644
--- a/model/event/event.go
+++ b/model/event/event.go
@@ -9,7 +9,9 @@ import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
-const AllLogCollection = "event_log"
+const EventCollection = "events"
+
+var notSubscribableTime = time.Date(2015, time.October, 21, 23, 29, 1, 0, time.UTC)
type EventLogEntry struct {
ID string `bson:"_id" json:"-"`
@@ -17,6 +19,7 @@ type EventLogEntry struct {
ProcessedAt time.Time `bson:"processed_at" json:"processed_at"`
Timestamp time.Time `bson:"ts" json:"timestamp"`
+ Expirable bool `bson:"expirable,omitempty" json:"expirable,omitempty"`
ResourceId string `bson:"r_id" json:"resource_id"`
EventType string `bson:"e_type" json:"event_type"`
Data interface{} `bson:"data" json:"data"`
@@ -38,6 +41,7 @@ type UnmarshalEventLogEntry struct {
ProcessedAt time.Time `bson:"processed_at" json:"processed_at"`
Timestamp time.Time `bson:"ts" json:"timestamp"`
+ Expirable bool `bson:"expirable,omitempty" json:"expirable,omitempty"`
ResourceId string `bson:"r_id" json:"resource_id"`
EventType string `bson:"e_type" json:"event_type"`
Data mgobson.Raw `bson:"data" json:"data"`
@@ -47,6 +51,7 @@ var (
// bson fields for the event struct
idKey = bsonutil.MustHaveTag(EventLogEntry{}, "ID")
TimestampKey = bsonutil.MustHaveTag(EventLogEntry{}, "Timestamp")
+ ExpirableKey = bsonutil.MustHaveTag(EventLogEntry{}, "Expirable")
ResourceIdKey = bsonutil.MustHaveTag(EventLogEntry{}, "ResourceId")
ResourceTypeKey = bsonutil.MustHaveTag(EventLogEntry{}, "ResourceType")
processedAtKey = bsonutil.MustHaveTag(EventLogEntry{}, "ProcessedAt")
@@ -65,7 +70,7 @@ func (e *EventLogEntry) SetBSON(raw mgobson.Raw) error {
return errors.Wrap(err, "unmarshalling event into generic event log entry")
}
- e.Data = NewEventFromType(temp.ResourceType)
+ e.Data = registry.newEventFromType(temp.ResourceType)
if e.Data == nil {
return errors.Errorf("unknown resource type '%s'", temp.ResourceType)
}
@@ -74,6 +79,7 @@ func (e *EventLogEntry) SetBSON(raw mgobson.Raw) error {
}
// IDs for events were ObjectIDs previously, so we need to do this
+ // TODO (EVG-17214): Remove once old events are TTLed and/or migrated.
switch v := temp.ID.(type) {
case string:
e.ID = v
@@ -89,6 +95,7 @@ func (e *EventLogEntry) SetBSON(raw mgobson.Raw) error {
e.EventType = temp.EventType
e.ProcessedAt = temp.ProcessedAt
e.ResourceType = temp.ResourceType
+ e.Expirable = temp.Expirable
return nil
}
@@ -104,12 +111,9 @@ func (e *EventLogEntry) validateEvent() error {
e.ID = mgobson.NewObjectId().Hex()
}
if !registry.IsSubscribable(e.ResourceType, e.EventType) {
- loc, _ := time.LoadLocation("UTC")
- notSubscribableTime, err := time.ParseInLocation(time.RFC3339, notSubscribableTimeString, loc)
- if err != nil {
- return errors.Wrap(err, "setting processed at time")
- }
e.ProcessedAt = notSubscribableTime
}
+ e.Expirable = registry.isExpirable(e.ResourceType, e.EventType)
+
return nil
}
diff --git a/model/event/event_finder.go b/model/event/event_finder.go
index cd038114e74..884fbcc2d0a 100644
--- a/model/event/event_finder.go
+++ b/model/event/event_finder.go
@@ -29,9 +29,9 @@ func ResourceTypeKeyIs(key string) bson.M {
// Find takes a collection storing events and a query, generated
// by one of the query functions, and returns a slice of events.
-func Find(coll string, query db.Q) ([]EventLogEntry, error) {
+func Find(query db.Q) ([]EventLogEntry, error) {
events := []EventLogEntry{}
- err := db.FindAllQ(coll, query, &events)
+ err := db.FindAllQ(EventCollection, query, &events)
if err != nil || adb.ResultsNotFound(err) {
return nil, errors.WithStack(err)
}
@@ -39,23 +39,28 @@ func Find(coll string, query db.Q) ([]EventLogEntry, error) {
return events, nil
}
-func FindPaginated(hostID, hostTag, coll string, limit, page int) ([]EventLogEntry, error) {
- query := MostRecentHostEvents(hostID, hostTag, limit)
+func FindPaginatedWithTotalCount(query db.Q, limit, page int) ([]EventLogEntry, int, error) {
events := []EventLogEntry{}
skip := page * limit
if skip > 0 {
query = query.Skip(skip)
}
- err := db.FindAllQ(coll, query, &events)
+ err := db.FindAllQ(EventCollection, query, &events)
if err != nil || adb.ResultsNotFound(err) {
- return nil, errors.WithStack(err)
+ return nil, 0, errors.WithStack(err)
}
- return events, nil
+ // Count ignores skip and limit by default, so this will return the total number of events.
+ count, err := db.CountQ(EventCollection, query)
+ if err != nil {
+ return nil, 0, errors.Wrap(err, "fetching total count for events")
+ }
+
+ return events, count, nil
}
-// FindUnprocessedEvents returns all unprocessed events in AllLogCollection.
+// FindUnprocessedEvents returns all unprocessed events in EventCollection.
// Events are considered unprocessed if their "processed_at" time IsZero
func FindUnprocessedEvents(limit int) ([]EventLogEntry, error) {
out := []EventLogEntry{}
@@ -63,7 +68,7 @@ func FindUnprocessedEvents(limit int) ([]EventLogEntry, error) {
if limit > 0 {
query = query.Limit(limit)
}
- err := db.FindAllQ(AllLogCollection, query, &out)
+ err := db.FindAllQ(EventCollection, query, &out)
if err != nil {
return nil, errors.Wrap(err, "fetching unprocessed events")
}
@@ -78,7 +83,7 @@ func FindByID(eventID string) (*EventLogEntry, error) {
}
var e EventLogEntry
- if err := db.FindOneQ(AllLogCollection, db.Query(query), &e); err != nil {
+ if err := db.FindOneQ(EventCollection, db.Query(query), &e); err != nil {
if adb.ResultsNotFound(err) {
return nil, nil
}
@@ -95,7 +100,7 @@ func FindLastProcessedEvent() (*EventLogEntry, error) {
}).Sort([]string{"-" + processedAtKey})
e := EventLogEntry{}
- if err := db.FindOneQ(AllLogCollection, q, &e); err != nil {
+ if err := db.FindOneQ(EventCollection, q, &e); err != nil {
if adb.ResultsNotFound(err) {
return nil, nil
}
@@ -108,7 +113,7 @@ func FindLastProcessedEvent() (*EventLogEntry, error) {
func CountUnprocessedEvents() (int, error) {
q := db.Query(unprocessedEvents())
- n, err := db.CountQ(AllLogCollection, q)
+ n, err := db.CountQ(EventCollection, q)
if err != nil {
return 0, errors.Wrap(err, "fetching number of unprocessed events")
}
@@ -130,6 +135,13 @@ func MostRecentHostEvents(id string, tag string, n int) db.Q {
return db.Query(filter).Sort([]string{"-" + TimestampKey}).Limit(n)
}
+// MostRecentPaginatedHostEvents returns a limited and paginated list of host events for the given
+// host ID and tag sorted in descending order by timestamp as well as the total number of events.
+func MostRecentPaginatedHostEvents(id string, tag string, limit, page int) ([]EventLogEntry, int, error) {
+ recentHostsQuery := MostRecentHostEvents(id, tag, limit)
+ return FindPaginatedWithTotalCount(recentHostsQuery, limit, page)
+}
+
// Task Events
func TaskEventsForId(id string) db.Q {
filter := ResourceTypeKeyIs(ResourceTypeTask)
@@ -151,7 +163,7 @@ func TaskEventsInOrder(id string) db.Q {
// FindLatestPrimaryDistroEvents return the most recent non-AMI events for the distro.
func FindLatestPrimaryDistroEvents(id string, n int) ([]EventLogEntry, error) {
events := []EventLogEntry{}
- err := db.Aggregate(AllLogCollection, latestDistroEventsPipeline(id, n, false), &events)
+ err := db.Aggregate(EventCollection, latestDistroEventsPipeline(id, n, false), &events)
if err != nil {
return nil, err
}
@@ -162,7 +174,7 @@ func FindLatestPrimaryDistroEvents(id string, n int) ([]EventLogEntry, error) {
func FindLatestAMIModifiedDistroEvent(id string) (EventLogEntry, error) {
events := []EventLogEntry{}
res := EventLogEntry{}
- err := db.Aggregate(AllLogCollection, latestDistroEventsPipeline(id, 1, true), &events)
+ err := db.Aggregate(EventCollection, latestDistroEventsPipeline(id, 1, true), &events)
if err != nil {
return res, err
}
@@ -199,10 +211,12 @@ func RecentAdminEvents(n int) db.Q {
return db.Query(filter).Sort([]string{"-" + TimestampKey}).Limit(n)
}
-func ByGuid(guid string) db.Q {
- return db.Query(bson.M{
- bsonutil.GetDottedKeyName(DataKey, "guid"): guid,
- })
+// ByAdminGuid returns a query for the admin events with the given guid.
+func ByAdminGuid(guid string) db.Q {
+ filter := ResourceTypeKeyIs(ResourceTypeAdmin)
+ filter[ResourceIdKey] = ""
+ filter[bsonutil.GetDottedKeyName(DataKey, "guid")] = guid
+ return db.Query(filter)
}
func AdminEventsBefore(before time.Time, n int) db.Q {
@@ -216,7 +230,7 @@ func AdminEventsBefore(before time.Time, n int) db.Q {
}
func FindAllByResourceID(resourceID string) ([]EventLogEntry, error) {
- return Find(AllLogCollection, db.Query(bson.M{ResourceIdKey: resourceID}))
+ return Find(db.Query(bson.M{ResourceIdKey: resourceID}))
}
// Pod events
@@ -229,3 +243,10 @@ func MostRecentPodEvents(id string, n int) db.Q {
return db.Query(filter).Sort([]string{"-" + TimestampKey}).Limit(n)
}
+
+// MostRecentPaginatedPodEvents returns a limited and paginated list of pod events for the
+// given pod ID sorted in descending order by timestamp as well as the total number of events.
+func MostRecentPaginatedPodEvents(id string, limit, page int) ([]EventLogEntry, int, error) {
+ recentPodsQuery := MostRecentPodEvents(id, limit)
+ return FindPaginatedWithTotalCount(recentPodsQuery, limit, page)
+}
diff --git a/model/event/event_finder_test.go b/model/event/event_finder_test.go
new file mode 100644
index 00000000000..e1b47b230c7
--- /dev/null
+++ b/model/event/event_finder_test.go
@@ -0,0 +1,56 @@
+package event
+
+import (
+ "testing"
+
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestMostRecentPaginatedPodEvents(t *testing.T) {
+ assert.NoError(t, db.ClearCollections(EventCollection))
+ for i := 0; i < 20; i++ {
+ podId := "pod1"
+ if i%2 == 0 {
+ podId = "pod2"
+ }
+ LogPodAssignedTask(podId, "task", i)
+ }
+
+ // Query for pod1 events, limit 10, page 0
+ events, count, err := MostRecentPaginatedPodEvents("pod1", 10, 0)
+ assert.NoError(t, err)
+ assert.Equal(t, 10, count)
+ assert.Len(t, events, 10)
+ for i := 0; i < 10; i++ {
+ assert.Equal(t, "pod1", events[i].ResourceId)
+ assert.Equal(t, 19-(2*i), events[i].Data.(*PodData).TaskExecution)
+
+ }
+
+ // Query for pod1 events, limit 10, page 1
+ events, count, err = MostRecentPaginatedPodEvents("pod1", 10, 1)
+ assert.NoError(t, err)
+ assert.Equal(t, 10, count)
+ assert.Len(t, events, 0)
+
+ // Query for pod1 events, limit 5, page 1
+ events, count, err = MostRecentPaginatedPodEvents("pod1", 5, 1)
+ assert.NoError(t, err)
+ assert.Equal(t, 10, count)
+ assert.Len(t, events, 5)
+ for i := 0; i < 5; i++ {
+ assert.Equal(t, "pod1", events[i].ResourceId)
+ assert.Equal(t, 9-(2*i), events[i].Data.(*PodData).TaskExecution)
+ }
+
+ // Query for pod1 events, limit 11, page 0
+ events, count, err = MostRecentPaginatedPodEvents("pod1", 11, 0)
+ assert.NoError(t, err)
+ assert.Equal(t, 10, count)
+ assert.Len(t, events, 10)
+ for i := 0; i < 10; i++ {
+ assert.Equal(t, "pod1", events[i].ResourceId)
+ assert.Equal(t, 19-(2*i), events[i].Data.(*PodData).TaskExecution)
+ }
+}
diff --git a/model/event/event_logger.go b/model/event/event_logger.go
index 74701c4e86e..dc81b311f76 100644
--- a/model/event/event_logger.go
+++ b/model/event/event_logger.go
@@ -9,30 +9,41 @@ import (
"go.mongodb.org/mongo-driver/bson"
)
-const notSubscribableTimeString = "2015-10-21T16:29:01-07:00"
+func (e *EventLogEntry) Log() error {
+ if err := e.validateEvent(); err != nil {
+ return errors.Wrap(err, "not logging event, event is invalid")
+ }
-type EventLogger interface {
- LogEvent(event *EventLogEntry) error
+ return errors.Wrap(db.Insert(EventCollection, e), "inserting event")
}
-type DBEventLogger struct {
- collection string
-}
+func (e *EventLogEntry) MarkProcessed() error {
+ if e.ID == "" {
+ return errors.New("event has no ID")
+ }
+ processedAt := time.Now()
-func NewDBEventLogger(collection string) *DBEventLogger {
- return &DBEventLogger{
- collection: collection,
+ filter := bson.M{
+ idKey: e.ID,
+ processedAtKey: bson.M{
+ "$eq": time.Time{},
+ },
+ }
+ update := bson.M{
+ "$set": bson.M{
+ processedAtKey: processedAt,
+ },
}
-}
-func (l *DBEventLogger) LogEvent(e *EventLogEntry) error {
- if err := e.validateEvent(); err != nil {
- return errors.Wrap(err, "not logging event, event is invalid")
+ if err := db.Update(EventCollection, filter, update); err != nil {
+ return errors.Wrap(err, "updating 'processed at' time")
}
- return db.Insert(l.collection, e)
+
+ e.ProcessedAt = processedAt
+ return nil
}
-func (l *DBEventLogger) LogManyEvents(events []EventLogEntry) error {
+func LogManyEvents(events []EventLogEntry) error {
catcher := grip.NewBasicCatcher()
interfaces := make([]interface{}, len(events))
for i := range events {
@@ -46,29 +57,6 @@ func (l *DBEventLogger) LogManyEvents(events []EventLogEntry) error {
if catcher.HasErrors() {
return errors.Wrap(catcher.Resolve(), "invalid events")
}
- return db.InsertMany(l.collection, interfaces...)
-}
-
-func (l *DBEventLogger) MarkProcessed(event *EventLogEntry) error {
- if event.ID == "" {
- return errors.New("event has no ID")
- }
- event.ProcessedAt = time.Now()
- err := db.Update(l.collection, bson.M{
- idKey: event.ID,
- processedAtKey: bson.M{
- "$eq": time.Time{},
- },
- }, bson.M{
- "$set": bson.M{
- processedAtKey: event.ProcessedAt,
- },
- })
- if err != nil {
- event.ProcessedAt = time.Time{}
- return errors.Wrap(err, "updating 'processed at' time")
- }
-
- return nil
+ return db.InsertMany(EventCollection, interfaces...)
}
diff --git a/model/event/event_registry.go b/model/event/event_registry.go
index 7fcd609436d..6b7a90cadae 100644
--- a/model/event/event_registry.go
+++ b/model/event/event_registry.go
@@ -12,28 +12,10 @@ type eventRegistry struct {
types map[string]eventDataFactory
isSubscribable map[EventLogEntry]bool
+ unexpirable map[EventLogEntry]bool
}
-var registry *eventRegistry
-
-func init() {
- registry = &eventRegistry{
- types: map[string]eventDataFactory{},
- isSubscribable: map[EventLogEntry]bool{},
- }
-
- registry.AddType(ResourceTypeAdmin, adminEventDataFactory)
- registry.AddType(ResourceTypeBuild, buildEventDataFactory)
- registry.AddType(ResourceTypeDistro, distroEventDataFactory)
- registry.AddType(ResourceTypeUser, userEventDataFactory)
- registry.AllowSubscription(ResourceTypeBuild, BuildStateChange)
- registry.AllowSubscription(ResourceTypeBuild, BuildGithubCheckFinished)
-
- registry.AddType(ResourceTypeCommitQueue, commitQueueEventDataFactory)
- registry.AllowSubscription(ResourceTypeCommitQueue, CommitQueueStartTest)
- registry.AllowSubscription(ResourceTypeCommitQueue, CommitQueueConcludeTest)
- registry.AllowSubscription(ResourceTypeCommitQueue, CommitQueueEnqueueFailed)
-}
+var registry eventRegistry
// AddType adds an event data factory to the registry with the given resource
// type. AddType will panic if you attempt to add the same resourceType more
@@ -42,6 +24,10 @@ func (r *eventRegistry) AddType(resourceType string, f eventDataFactory) {
r.lock.Lock()
defer r.lock.Unlock()
+ if r.types == nil {
+ r.types = make(map[string]eventDataFactory)
+ }
+
_, ok := r.types[resourceType]
if ok {
panic(fmt.Sprintf("attempted to register event '%s' more than once", resourceType))
@@ -65,11 +51,15 @@ func (r *eventRegistry) AllowSubscription(resourceType, eventType string) {
ResourceType: resourceType,
EventType: eventType,
}
+
_, ok := r.isSubscribable[e]
if ok {
panic(fmt.Sprintf("attempted to enable subscribability for event '%s/%s' more than once", resourceType, eventType))
}
+ if r.isSubscribable == nil {
+ r.isSubscribable = make(map[EventLogEntry]bool)
+ }
r.isSubscribable[e] = true
}
@@ -87,38 +77,36 @@ func (r *eventRegistry) IsSubscribable(resourceType, eventType string) bool {
return r.isSubscribable[e]
}
-func NewEventFromType(resourceType string) interface{} {
- registry.lock.RLock()
- defer registry.lock.RUnlock()
+func (r *eventRegistry) setUnexpirable(resourceType, eventType string) {
+ r.lock.Lock()
+ defer r.lock.Unlock()
- f, ok := registry.types[resourceType]
- if !ok {
- return nil
+ if r.unexpirable == nil {
+ r.unexpirable = make(map[EventLogEntry]bool)
}
-
- return f()
+ r.unexpirable[EventLogEntry{ResourceType: resourceType, EventType: eventType}] = true
}
-func taskEventDataFactory() interface{} {
- return &TaskEventData{}
-}
+func (r *eventRegistry) isExpirable(resourceType, eventType string) bool {
+ r.lock.RLock()
+ defer r.lock.RUnlock()
-func hostEventDataFactory() interface{} {
- return &HostEventData{}
-}
+ e := EventLogEntry{
+ ResourceType: resourceType,
+ EventType: eventType,
+ }
-func distroEventDataFactory() interface{} {
- return &DistroEventData{}
+ return !r.unexpirable[e]
}
-func adminEventDataFactory() interface{} {
- return &rawAdminEventData{}
-}
+func (r *eventRegistry) newEventFromType(resourceType string) interface{} {
+ registry.lock.RLock()
+ defer registry.lock.RUnlock()
-func userEventDataFactory() interface{} {
- return &userData{}
-}
+ f, ok := registry.types[resourceType]
+ if !ok {
+ return nil
+ }
-func podEventDataFactory() interface{} {
- return &podData{}
+ return f()
}
diff --git a/model/event/event_test.go b/model/event/event_test.go
index 0c1e93b1f2f..2ea7a0a2e89 100644
--- a/model/event/event_test.go
+++ b/model/event/event_test.go
@@ -10,6 +10,7 @@ import (
"github.com/evergreen-ci/evergreen/db"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
amboyRegistry "github.com/mongodb/amboy/registry"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"go.mongodb.org/mongo-driver/bson"
)
@@ -24,7 +25,7 @@ func TestEventSuite(t *testing.T) {
}
func (s *eventSuite) SetupTest() {
- s.NoError(db.ClearCollections(AllLogCollection))
+ s.NoError(db.ClearCollections(EventCollection))
}
func (s *eventSuite) TestMarshallAndUnarshallingStructsHaveSameTags() {
@@ -73,8 +74,8 @@ func (s *eventSuite) TestWithRealData() {
hostDataStatusKey: "success",
},
}
- s.NoError(db.Insert(AllLogCollection, data))
- entries, err := Find(AllLogCollection, db.Query(bson.M{idKey: mgobson.ObjectIdHex("5949645c9acd9604fdd202d8")}))
+ s.NoError(db.Insert(EventCollection, data))
+ entries, err := Find(db.Query(bson.M{idKey: mgobson.ObjectIdHex("5949645c9acd9604fdd202d8")}))
s.NoError(err)
s.Len(entries, 1)
s.NotPanics(func() {
@@ -108,8 +109,8 @@ func (s *eventSuite) TestWithRealData() {
hostDataStatusKey: "success",
},
}
- s.NoError(db.Insert(AllLogCollection, data))
- entries, err = Find(AllLogCollection, db.Query(bson.M{idKey: mgobson.ObjectIdHex("5949645c9acd9604fdd202d9")}))
+ s.NoError(db.Insert(EventCollection, data))
+ entries, err = Find(db.Query(bson.M{idKey: mgobson.ObjectIdHex("5949645c9acd9604fdd202d9")}))
s.NoError(err)
s.Len(entries, 1)
s.NotPanics(func() {
@@ -132,15 +133,14 @@ func (s *eventSuite) TestWithRealData() {
// check that string IDs are preserved in the DB
data[idKey] = "elephant"
- s.NoError(db.Insert(AllLogCollection, data))
- entries, err = Find(AllLogCollection, db.Query(bson.M{idKey: "elephant"}))
+ s.NoError(db.Insert(EventCollection, data))
+ entries, err = Find(db.Query(bson.M{idKey: "elephant"}))
s.NoError(err)
s.Len(entries, 1)
s.Equal("elephant", entries[0].ID)
}
func (s *eventSuite) TestEventWithNilData() {
- logger := NewDBEventLogger(AllLogCollection)
event := EventLogEntry{
ID: mgobson.NewObjectId().Hex(),
ResourceId: "TEST1",
@@ -148,12 +148,12 @@ func (s *eventSuite) TestEventWithNilData() {
Timestamp: time.Now().Round(time.Millisecond).Truncate(time.Millisecond),
}
s.Nil(event.Data)
- s.Errorf(logger.LogEvent(&event), "event log entry cannot have nil data")
+ s.Errorf(event.Log(), "event log entry cannot have nil data")
s.NotPanics(func() {
// But reading this back should not panic, if it somehow got into the db
- s.NoError(db.Insert(AllLogCollection, event))
- fetchedEvents, err := Find(AllLogCollection, db.Query(bson.M{}))
+ s.NoError(db.Insert(EventCollection, event))
+ fetchedEvents, err := Find(db.Query(bson.M{}))
s.Require().Error(err)
s.Nil(fetchedEvents)
})
@@ -161,7 +161,7 @@ func (s *eventSuite) TestEventWithNilData() {
func (s *eventSuite) TestGlobalEventRegistryItemsAreSane() {
for k := range registry.types {
- event := NewEventFromType(k)
+ event := registry.newEventFromType(k)
s.NotNil(event)
found, rTypeTag := findResourceTypeIn(event)
@@ -246,16 +246,15 @@ func (s *eventSuite) TestFindResourceTypeIn() {
}
func (s *eventSuite) TestFindByID() {
- logger := NewDBEventLogger(AllLogCollection)
e := &EventLogEntry{
ID: mgobson.NewObjectId().Hex(),
ResourceType: ResourceTypeHost,
ResourceId: "TEST1",
EventType: "TEST2",
Timestamp: time.Now().Round(time.Millisecond).Truncate(time.Millisecond),
- Data: NewEventFromType(ResourceTypeHost),
+ Data: registry.newEventFromType(ResourceTypeHost),
}
- s.Require().NoError(logger.LogEvent(e))
+ s.Require().NoError(e.Log())
dbEvent, err := FindByID(e.ID)
s.Require().NoError(err)
s.Require().NotZero(dbEvent)
@@ -264,39 +263,37 @@ func (s *eventSuite) TestFindByID() {
func (s *eventSuite) TestMarkProcessed() {
startTime := time.Now()
-
- logger := NewDBEventLogger(AllLogCollection)
event := &EventLogEntry{
ResourceType: ResourceTypeHost,
ResourceId: "TEST1",
EventType: "TEST2",
Timestamp: time.Now().Round(time.Millisecond).Truncate(time.Millisecond),
- Data: NewEventFromType(ResourceTypeHost),
+ Data: registry.newEventFromType(ResourceTypeHost),
}
processed, ptime := event.Processed()
s.False(processed)
s.Zero(ptime)
- s.EqualError(logger.MarkProcessed(event), "event has no ID")
+ s.EqualError(event.MarkProcessed(), "event has no ID")
event.ID = mgobson.NewObjectId().Hex()
- s.EqualError(logger.MarkProcessed(event), "updating 'processed at' time: document not found")
- s.NoError(logger.LogEvent(event))
+ s.EqualError(event.MarkProcessed(), "updating 'processed at' time: document not found")
+ s.NoError(event.Log())
- s.NoError(db.UpdateId(AllLogCollection, event.ID, bson.M{
+ s.NoError(db.UpdateId(EventCollection, event.ID, bson.M{
"$set": bson.M{
"processed_at": time.Time{},
},
}))
var fetchedEvent EventLogEntry
- s.NoError(db.FindOneQ(AllLogCollection, db.Q{}, &fetchedEvent))
+ s.NoError(db.FindOneQ(EventCollection, db.Q{}, &fetchedEvent))
processed, ptime = fetchedEvent.Processed()
s.False(processed)
s.Zero(ptime)
time.Sleep(time.Millisecond)
- s.NoError(logger.MarkProcessed(&fetchedEvent))
+ s.NoError(fetchedEvent.MarkProcessed())
processed, ptime = fetchedEvent.Processed()
s.True(processed)
s.True(ptime.After(startTime))
@@ -307,8 +304,6 @@ func (s *eventSuite) TestFindUnprocessedEvents() {
loc, _ := time.LoadLocation("UTC")
migrationTime, err := time.ParseInLocation(time.RFC3339, migrationTimeString, loc)
s.NoError(err)
- notSubscribableTime, err := time.ParseInLocation(time.RFC3339, notSubscribableTimeString, loc)
- s.NoError(err)
data := []bson.M{
{
@@ -338,7 +333,7 @@ func (s *eventSuite) TestFindUnprocessedEvents() {
},
}
for i := range data {
- s.NoError(db.Insert(AllLogCollection, data[i]))
+ s.NoError(db.Insert(EventCollection, data[i]))
}
events, err := FindUnprocessedEvents(-1)
s.NoError(err)
@@ -390,7 +385,7 @@ func (s *eventSuite) TestFindLastProcessedEvent() {
},
}
for i := range events {
- s.NoError(db.Insert(AllLogCollection, events[i]))
+ s.NoError(db.Insert(EventCollection, events[i]))
}
e, err := FindLastProcessedEvent()
@@ -437,7 +432,7 @@ func (s *eventSuite) TestCountUnprocessedEvents() {
},
}
for i := range events {
- s.NoError(db.Insert(AllLogCollection, events[i]))
+ s.NoError(db.Insert(EventCollection, events[i]))
}
n, err := CountUnprocessedEvents()
@@ -491,13 +486,12 @@ func findResourceTypeIn(data interface{}) (bool, string) {
}
func (s *eventSuite) TestLogManyEvents() {
- logger := NewDBEventLogger(AllLogCollection)
event1 := EventLogEntry{
ID: mgobson.NewObjectId().Hex(),
ResourceId: "resource_id_1",
EventType: "some_type",
Timestamp: time.Now().Round(time.Millisecond).Truncate(time.Millisecond),
- Data: NewEventFromType(ResourceTypeTask),
+ Data: registry.newEventFromType(ResourceTypeTask),
ResourceType: "TASK",
}
event2 := EventLogEntry{
@@ -505,12 +499,12 @@ func (s *eventSuite) TestLogManyEvents() {
ResourceId: "resource_id_1",
EventType: "some_type",
Timestamp: time.Now().Round(time.Millisecond).Truncate(time.Millisecond),
- Data: NewEventFromType(ResourceTypeTask),
+ Data: registry.newEventFromType(ResourceTypeTask),
ResourceType: "TASK",
}
- s.NoError(logger.LogManyEvents([]EventLogEntry{event1, event2}))
+ s.NoError(LogManyEvents([]EventLogEntry{event1, event2}))
events := []EventLogEntry{}
- s.NoError(db.FindAllQ(AllLogCollection, db.Query(bson.M{}), &events))
+ s.NoError(db.FindAllQ(EventCollection, db.Query(bson.M{}), &events))
s.Len(events, 2)
s.Equal(events[0].ResourceId, "resource_id_1")
s.Equal(events[0].EventType, "some_type")
@@ -521,3 +515,17 @@ func (s *eventSuite) TestLogManyEvents() {
_, ok = events[1].Data.(*TaskEventData)
s.True(ok)
}
+
+func TestEventExpiration(t *testing.T) {
+ for event, isExpirable := range map[EventLogEntry]bool{
+ {ResourceType: EventResourceTypeProject, EventType: EventTypeProjectModified, Data: ""}: false,
+ {ResourceType: ResourceTypeAdmin, EventType: EventTypeValueChanged, Data: ""}: false,
+ {ResourceType: ResourceTypeDistro, EventType: EventDistroAdded, Data: ""}: false,
+ {ResourceType: ResourceTypeCommitQueue, EventType: CommitQueueConcludeTest, Data: ""}: true,
+ {ResourceType: ResourceTypeTask, EventType: EventHostTaskFinished, Data: ""}: true,
+ {ResourceType: ResourceTypeHost, EventType: EventHostCreated, Data: ""}: true,
+ } {
+ assert.NoError(t, event.validateEvent())
+ assert.Equal(t, isExpirable, event.Expirable)
+ }
+}
diff --git a/model/event/host_event.go b/model/event/host_event.go
index 50328d647c2..ee09ca7aebf 100644
--- a/model/event/host_event.go
+++ b/model/event/host_event.go
@@ -5,15 +5,13 @@ import (
"time"
"github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/db"
"github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
- "go.mongodb.org/mongo-driver/bson"
)
func init() {
- registry.AddType(ResourceTypeHost, hostEventDataFactory)
+ registry.AddType(ResourceTypeHost, func() interface{} { return &HostEventData{} })
registry.AllowSubscription(ResourceTypeHost, EventHostExpirationWarningSent)
registry.AllowSubscription(ResourceTypeHost, EventVolumeExpirationWarningSent)
registry.AllowSubscription(ResourceTypeHost, EventHostProvisioned)
@@ -51,12 +49,13 @@ const (
EventHostRunningTaskSet = "HOST_RUNNING_TASK_SET"
EventHostRunningTaskCleared = "HOST_RUNNING_TASK_CLEARED"
EventHostMonitorFlag = "HOST_MONITOR_FLAG"
- EventTaskFinished = "HOST_TASK_FINISHED"
+ EventHostTaskFinished = "HOST_TASK_FINISHED"
EventHostTerminatedExternally = "HOST_TERMINATED_EXTERNALLY"
EventHostExpirationWarningSent = "HOST_EXPIRATION_WARNING_SENT"
EventHostScriptExecuted = "HOST_SCRIPT_EXECUTED"
EventHostScriptExecuteFailed = "HOST_SCRIPT_EXECUTE_FAILED"
EventVolumeExpirationWarningSent = "VOLUME_EXPIRATION_WARNING_SENT"
+ EventVolumeMigrationFailed = "VOLUME_MIGRATION_FAILED"
)
// implements EventData
@@ -70,7 +69,6 @@ type HostEventData struct {
Hostname string `bson:"hn,omitempty" json:"hostname,omitempty"`
ProvisioningMethod string `bson:"prov_method" json:"provisioning_method,omitempty"`
TaskId string `bson:"t_id,omitempty" json:"task_id,omitempty"`
- TaskExecution int `bson:"t_execution,omitempty" json:"task_execution,omitempty"`
TaskPid string `bson:"t_pid,omitempty" json:"task_pid,omitempty"`
TaskStatus string `bson:"t_st,omitempty" json:"task_status,omitempty"`
Execution string `bson:"execution,omitempty" json:"execution,omitempty"`
@@ -81,9 +79,7 @@ type HostEventData struct {
}
var (
- hostDataStatusKey = bsonutil.MustHaveTag(HostEventData{}, "TaskStatus")
- hostDataTaskIDKey = bsonutil.MustHaveTag(HostEventData{}, "TaskId")
- hostDataTaskExecutionKey = bsonutil.MustHaveTag(HostEventData{}, "Execution")
+ hostDataStatusKey = bsonutil.MustHaveTag(HostEventData{}, "TaskStatus")
)
func LogHostEvent(hostId string, eventType string, eventData HostEventData) {
@@ -95,8 +91,7 @@ func LogHostEvent(hostId string, eventType string, eventData HostEventData) {
ResourceType: ResourceTypeHost,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeHost,
"message": "error logging event",
@@ -106,7 +101,13 @@ func LogHostEvent(hostId string, eventType string, eventData HostEventData) {
}
func LogHostCreated(hostId string) {
- LogHostEvent(hostId, EventHostCreated, HostEventData{})
+ LogHostEvent(hostId, EventHostCreated, HostEventData{Successful: true})
+}
+
+// LogHostCreationFailed logs an event indicating that the host errored while it
+// was being created.
+func LogHostCreationFailed(hostID, logs string) {
+ LogHostEvent(hostID, EventHostCreated, HostEventData{Successful: false, Logs: logs})
}
// LogHostStartSucceeded logs an event indicating that the host was successfully
@@ -227,14 +228,20 @@ func LogHostProvisioned(hostId string) {
LogHostEvent(hostId, EventHostProvisioned, HostEventData{})
}
-func LogHostRunningTaskSet(hostId string, taskId string) {
+func LogHostRunningTaskSet(hostId string, taskId string, taskExecution int) {
LogHostEvent(hostId, EventHostRunningTaskSet,
- HostEventData{TaskId: taskId})
+ HostEventData{
+ TaskId: taskId,
+ Execution: strconv.Itoa(taskExecution),
+ })
}
-func LogHostRunningTaskCleared(hostId string, taskId string) {
+func LogHostRunningTaskCleared(hostId string, taskId string, taskExecution int) {
LogHostEvent(hostId, EventHostRunningTaskCleared,
- HostEventData{TaskId: taskId})
+ HostEventData{
+ TaskId: taskId,
+ Execution: strconv.Itoa(taskExecution),
+ })
}
// LogHostProvisionFailed is used when Evergreen gives up on provisioning a host
@@ -251,22 +258,6 @@ func LogVolumeExpirationWarningSent(volumeID string) {
LogHostEvent(volumeID, EventVolumeExpirationWarningSent, HostEventData{})
}
-// UpdateHostTaskExecutions updates host events to track multiple executions of
-// the same host task.
-func UpdateHostTaskExecutions(hostId, taskId string, execution int) error {
- query := bson.M{
- ResourceIdKey: hostId,
- bsonutil.GetDottedKeyName(DataKey, hostDataTaskIDKey): taskId,
- }
- update := bson.M{
- "$set": bson.M{
- bsonutil.GetDottedKeyName(DataKey, hostDataTaskExecutionKey): strconv.Itoa(execution),
- },
- }
- _, err := db.UpdateAll(AllLogCollection, query, update)
- return err
-}
-
func LogHostScriptExecuted(hostID string, logs string) {
LogHostEvent(hostID, EventHostScriptExecuted, HostEventData{Logs: logs})
}
@@ -274,3 +265,8 @@ func LogHostScriptExecuted(hostID string, logs string) {
func LogHostScriptExecuteFailed(hostID string, err error) {
LogHostEvent(hostID, EventHostScriptExecuteFailed, HostEventData{Logs: err.Error()})
}
+
+// LogVolumeMigrationFailed is used when a volume is unable to migrate to a new host.
+func LogVolumeMigrationFailed(hostID string, err error) {
+ LogHostEvent(hostID, EventVolumeMigrationFailed, HostEventData{Logs: err.Error()})
+}
diff --git a/model/event/host_event_agent_deploy.go b/model/event/host_event_agent_deploy.go
index 0bbf63d53e5..1c74d147f26 100644
--- a/model/event/host_event_agent_deploy.go
+++ b/model/event/host_event_agent_deploy.go
@@ -32,7 +32,7 @@ func (m *RecentHostAgentDeploys) String() string {
m.HostID, m.Last, m.Failed, m.Success, m.Count)
}
-////////////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////////
//
// Predicates to support error checking during the agent deploy process
func (m *RecentHostAgentDeploys) LastAttemptFailed() bool {
diff --git a/model/event/host_event_finder.go b/model/event/host_event_finder.go
index 5dc0d511de0..7f76ee666ff 100644
--- a/model/event/host_event_finder.go
+++ b/model/event/host_event_finder.go
@@ -20,7 +20,7 @@ func (s *hostStatusDistro) UnmarshalBSON(in []byte) error { return mgobson.Unmar
func getRecentStatusesForHost(hostId string, n int) (int, []string) {
or := ResourceTypeKeyIs(ResourceTypeHost)
- or[TypeKey] = EventTaskFinished
+ or[TypeKey] = EventHostTaskFinished
or[ResourceIdKey] = hostId
pipeline := []bson.M{
@@ -40,7 +40,7 @@ func getRecentStatusesForHost(hostId string, n int) (int, []string) {
env := evergreen.GetEnvironment()
ctx, cancel := env.Context()
defer cancel()
- cursor, err := env.DB().Collection(AllLogCollection).Aggregate(ctx, pipeline, options.Aggregate().SetAllowDiskUse(true))
+ cursor, err := env.DB().Collection(EventCollection).Aggregate(ctx, pipeline, options.Aggregate().SetAllowDiskUse(true))
if err != nil {
grip.Warning(message.WrapError(err, message.Fields{
"message": "could not get recent host statuses",
diff --git a/model/event/host_event_test.go b/model/event/host_event_test.go
index 9760f0bca0b..eb96ff455b1 100644
--- a/model/event/host_event_test.go
+++ b/model/event/host_event_test.go
@@ -12,7 +12,7 @@ import (
func TestLoggingHostEvents(t *testing.T) {
Convey("When logging host events", t, func() {
- So(db.Clear(AllLogCollection), ShouldBeNil)
+ So(db.Clear(EventCollection), ShouldBeNil)
Convey("all events logged should be persisted to the database, and"+
" fetching them in order should sort by the time they were"+
@@ -32,15 +32,15 @@ func TestLoggingHostEvents(t *testing.T) {
time.Sleep(1 * time.Millisecond)
LogHostProvisioned(hostTag)
time.Sleep(1 * time.Millisecond)
- LogHostRunningTaskSet(hostId, taskId)
+ LogHostRunningTaskSet(hostId, taskId, 0)
time.Sleep(1 * time.Millisecond)
- LogHostRunningTaskCleared(hostId, taskId)
+ LogHostRunningTaskCleared(hostId, taskId, 0)
time.Sleep(1 * time.Millisecond)
// fetch all the events from the database, make sure they are
// persisted correctly
- eventsForHost, err := Find(AllLogCollection, MostRecentHostEvents(hostId, hostTag, 50))
+ eventsForHost, err := Find(MostRecentHostEvents(hostId, hostTag, 50))
So(err, ShouldBeNil)
So(eventsForHost, ShouldHaveLength, 6)
@@ -115,23 +115,6 @@ func TestLoggingHostEvents(t *testing.T) {
So(eventData.Hostname, ShouldBeBlank)
So(eventData.TaskId, ShouldEqual, taskId)
So(eventData.TaskPid, ShouldBeBlank)
-
- // test logging multiple executions of the same task
- err = UpdateHostTaskExecutions(hostId, taskId, 0)
- So(err, ShouldBeNil)
-
- eventsForHost, err = Find(AllLogCollection, MostRecentHostEvents(hostId, "", 50))
- So(err, ShouldBeNil)
- So(len(eventsForHost), ShouldBeGreaterThan, 0)
- for _, event = range eventsForHost {
- So(event.ResourceType, ShouldEqual, ResourceTypeHost)
- eventData = event.Data.(*HostEventData)
- if eventData.TaskId != "" {
- So(eventData.Execution, ShouldEqual, "0")
- } else {
- So(eventData.Execution, ShouldEqual, "")
- }
- }
})
})
}
diff --git a/model/event/patch_event.go b/model/event/patch_event.go
index 3ea7f52181e..12cdaf037ab 100644
--- a/model/event/patch_event.go
+++ b/model/event/patch_event.go
@@ -10,6 +10,7 @@ import (
func init() {
registry.AddType(ResourceTypePatch, patchEventDataFactory)
registry.AllowSubscription(ResourceTypePatch, PatchStateChange)
+ registry.AllowSubscription(ResourceTypePatch, PatchChildrenCompletion)
}
func patchEventDataFactory() interface{} {
@@ -19,11 +20,13 @@ func patchEventDataFactory() interface{} {
const (
ResourceTypePatch = "PATCH"
- PatchStateChange = "STATE_CHANGE"
+ PatchStateChange = "STATE_CHANGE"
+ PatchChildrenCompletion = "CHILDREN_FINISHED"
)
type PatchEventData struct {
Status string `bson:"status,omitempty" json:"status,omitempty"`
+ Author string `bson:"author,omitempty" json:"author,omitempty"`
}
func LogPatchStateChangeEvent(id, newStatus string) {
@@ -37,8 +40,28 @@ func LogPatchStateChangeEvent(id, newStatus string) {
},
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
+ grip.Error(message.WrapError(err, message.Fields{
+ "resource_type": ResourceTypePatch,
+ "message": "error logging event",
+ "source": "event-log-fail",
+ }))
+ }
+}
+
+func LogPatchChildrenCompletionEvent(id, status, author string) {
+ event := EventLogEntry{
+ Timestamp: time.Now().Truncate(0).Round(time.Millisecond),
+ ResourceId: id,
+ ResourceType: ResourceTypePatch,
+ EventType: PatchChildrenCompletion,
+ Data: &PatchEventData{
+ Status: status,
+ Author: author,
+ },
+ }
+
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypePatch,
"message": "error logging event",
diff --git a/model/event/pod.go b/model/event/pod.go
index ac971fe1581..befd9aea339 100644
--- a/model/event/pod.go
+++ b/model/event/pod.go
@@ -8,7 +8,7 @@ import (
)
func init() {
- registry.AddType(ResourceTypePod, podEventDataFactory)
+ registry.AddType(ResourceTypePod, func() interface{} { return &PodData{} })
}
// PodEventType represents a type of event related to a pod.
@@ -24,18 +24,28 @@ const (
// EventPodAssignedTask represents an event where a pod is assigned a task
// to run.
EventPodAssignedTask PodEventType = "ASSIGNED_TASK"
+ // EventPodClearedTask represents an event where a pod's current running
+ // task is cleared.
+ EventPodClearedTask PodEventType = "CLEARED_TASK"
+ // EventPodFinishedTask represents an event where a pod's assigned task has
+ // finished running.
+ EventPodFinishedTask PodEventType = "CONTAINER_TASK_FINISHED"
)
-// podData contains information relevant to a pod event.
-type podData struct {
- OldStatus string `bson:"old_status,omitempty" json:"old_status,omitempty"`
- NewStatus string `bson:"new_status,omitempty" json:"new_status,omitempty"`
+// PodData contains information relevant to a pod event.
+type PodData struct {
+ OldStatus string `bson:"old_status,omitempty" json:"old_status,omitempty"`
+ NewStatus string `bson:"new_status,omitempty" json:"new_status,omitempty"`
+ Reason string `bson:"reason,omitempty" json:"reason,omitempty"`
+
+ // Fields related to pods running tasks
TaskID string `bson:"task_id,omitempty" json:"task_id,omitempty"`
TaskExecution int `bson:"task_execution,omitempty" json:"task_execution,omitempty"`
+ TaskStatus string `bson:"task_status,omitempty" json:"task_status,omitempty"`
}
// LogPodEvent logs an event for a pod to the event log.
-func LogPodEvent(id string, kind PodEventType, data podData) {
+func LogPodEvent(id string, kind PodEventType, data PodData) {
e := EventLogEntry{
Timestamp: time.Now(),
ResourceId: id,
@@ -44,8 +54,7 @@ func LogPodEvent(id string, kind PodEventType, data podData) {
Data: data,
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&e); err != nil {
+ if err := e.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"message": "failed to log pod event",
"pod": id,
@@ -58,15 +67,22 @@ func LogPodEvent(id string, kind PodEventType, data podData) {
// LogPodStatusChanged logs an event indicating that the pod's status has been
// updated.
-func LogPodStatusChanged(id, oldStatus, newStatus string) {
- LogPodEvent(id, EventPodStatusChange, podData{
+func LogPodStatusChanged(id, oldStatus, newStatus, reason string) {
+ LogPodEvent(id, EventPodStatusChange, PodData{
OldStatus: oldStatus,
NewStatus: newStatus,
+ Reason: reason,
})
}
// LogPodAssignedTask logs an event indicating that the pod has been assigned a
// task to run.
func LogPodAssignedTask(id, taskID string, execution int) {
- LogPodEvent(id, EventPodAssignedTask, podData{TaskID: taskID, TaskExecution: execution})
+ LogPodEvent(id, EventPodAssignedTask, PodData{TaskID: taskID, TaskExecution: execution})
+}
+
+// LogPodRunningTaskCleared logs an event indicating that the pod's current
+// running task has been cleared, so it is no longer assigned to run the task.
+func LogPodRunningTaskCleared(id, taskID string, execution int) {
+ LogPodEvent(id, EventPodClearedTask, PodData{TaskID: taskID, TaskExecution: execution})
}
diff --git a/model/event/pod_test.go b/model/event/pod_test.go
index e92850f4179..c931f03bf5d 100644
--- a/model/event/pod_test.go
+++ b/model/event/pod_test.go
@@ -14,18 +14,20 @@ func TestPodEvents(t *testing.T) {
id := "pod_id"
oldStatus := "initializing"
newStatus := "starting"
- LogPodStatusChanged(id, oldStatus, newStatus)
+ reason := "some reason"
+ LogPodStatusChanged(id, oldStatus, newStatus, reason)
- events, err := Find(AllLogCollection, MostRecentPodEvents(id, 10))
+ events, err := Find(MostRecentPodEvents(id, 10))
require.NoError(t, err)
require.Len(t, events, 1)
assert.Equal(t, id, events[0].ResourceId)
require.NotZero(t, events[0].Data)
- data, ok := events[0].Data.(*podData)
+ data, ok := events[0].Data.(*PodData)
require.True(t, ok)
assert.Equal(t, oldStatus, data.OldStatus)
assert.Equal(t, newStatus, data.NewStatus)
+ assert.Equal(t, reason, data.Reason)
},
"LogPodAssignedTask": func(t *testing.T) {
podID := "pod_id"
@@ -33,22 +35,22 @@ func TestPodEvents(t *testing.T) {
execution := 5
LogPodAssignedTask(podID, taskID, 5)
- events, err := Find(AllLogCollection, MostRecentPodEvents(podID, 10))
+ events, err := Find(MostRecentPodEvents(podID, 10))
require.NoError(t, err)
require.Len(t, events, 1)
assert.Equal(t, podID, events[0].ResourceId)
require.NotZero(t, events[0].Data)
- data, ok := events[0].Data.(*podData)
+ data, ok := events[0].Data.(*PodData)
require.True(t, ok)
assert.Equal(t, taskID, data.TaskID)
assert.Equal(t, execution, data.TaskExecution)
},
} {
t.Run(tName, func(t *testing.T) {
- require.NoError(t, db.Clear(AllLogCollection))
+ require.NoError(t, db.Clear(EventCollection))
defer func() {
- assert.NoError(t, db.Clear(AllLogCollection))
+ assert.NoError(t, db.Clear(EventCollection))
}()
tCase(t)
})
diff --git a/model/event/project_event.go b/model/event/project_event.go
new file mode 100644
index 00000000000..406988243fc
--- /dev/null
+++ b/model/event/project_event.go
@@ -0,0 +1,12 @@
+package event
+
+func init() {
+ registry.setUnexpirable(EventResourceTypeProject, EventTypeProjectModified)
+ registry.setUnexpirable(EventResourceTypeProject, EventTypeProjectAdded)
+}
+
+const (
+ EventResourceTypeProject = "PROJECT"
+ EventTypeProjectModified = "PROJECT_MODIFIED"
+ EventTypeProjectAdded = "PROJECT_ADDED"
+)
diff --git a/model/event/subscribers.go b/model/event/subscribers.go
index 76ca677cfc3..8f46b4b3757 100644
--- a/model/event/subscribers.go
+++ b/model/event/subscribers.go
@@ -21,6 +21,10 @@ const (
EnqueuePatchSubscriberType = "enqueue-patch"
SubscriberTypeNone = "none"
RunChildPatchSubscriberType = "run-child-patch"
+
+ webhookRetryLimit = 10
+ webhookMinDelayLimit = 10000
+ webhookTimeoutLimit = 30000
)
var SubscriberTypes = []string{
@@ -35,7 +39,7 @@ var SubscriberTypes = []string{
RunChildPatchSubscriberType,
}
-//nolint: deadcode, megacheck, unused
+//nolint:megacheck,unused
var (
subscriberTypeKey = bsonutil.MustHaveTag(Subscriber{}, "Type")
subscriberTargetKey = bsonutil.MustHaveTag(Subscriber{}, "Target")
@@ -114,13 +118,24 @@ func (s *Subscriber) Validate() error {
catcher := grip.NewBasicCatcher()
catcher.ErrorfWhen(!utility.StringSliceContains(SubscriberTypes, s.Type), "'%s' is not a valid subscriber type", s.Type)
catcher.NewWhen(s.Target == nil, "target is required for subscriber")
+
+ switch v := s.Target.(type) {
+ case WebhookSubscriber:
+ catcher.Add(v.validate())
+ case *WebhookSubscriber:
+ catcher.Add(v.validate())
+ }
+
return catcher.Resolve()
}
type WebhookSubscriber struct {
- URL string `bson:"url"`
- Secret []byte `bson:"secret"`
- Headers []WebhookHeader `bson:"headers"`
+ URL string `bson:"url"`
+ Secret []byte `bson:"secret"`
+ Retries int `bson:"retries"`
+ MinDelayMS int `bson:"min_delay_ms"`
+ TimeoutMS int `bson:"timeout_ms"`
+ Headers []WebhookHeader `bson:"headers"`
}
type WebhookHeader struct {
@@ -135,6 +150,28 @@ func (s *WebhookSubscriber) String() string {
return s.URL
}
+func (s *WebhookSubscriber) validate() error {
+ catcher := grip.NewBasicCatcher()
+ catcher.AddWhen(s.URL == "", errors.New("url cannot be empty"))
+ catcher.AddWhen(len(s.Secret) == 0, errors.New("secret cannot be empty"))
+
+ catcher.AddWhen(s.Retries < 0, errors.New("retries cannot be negative"))
+ catcher.AddWhen(s.Retries > webhookRetryLimit, errors.Errorf("cannot retry more than %d times", webhookRetryLimit))
+
+ catcher.AddWhen(s.MinDelayMS < 0, errors.New("min delay cannot be negative"))
+ catcher.AddWhen(s.MinDelayMS > webhookMinDelayLimit, errors.Errorf("min delay cannot be greater than %d ms", webhookMinDelayLimit))
+
+ catcher.AddWhen(s.TimeoutMS < 0, errors.New("timeout cannot be negative"))
+ catcher.AddWhen(s.TimeoutMS > webhookTimeoutLimit, errors.Errorf("timeout cannot be greater than %d ms", webhookTimeoutLimit))
+
+ for _, header := range s.Headers {
+ catcher.AddWhen(header.Key == "", errors.New("header key cannot be empty"))
+ catcher.AddWhen(header.Value == "", errors.New("header value cannot be empty"))
+ }
+
+ return catcher.Resolve()
+}
+
type JIRAIssueSubscriber struct {
Project string `bson:"project"`
IssueType string `bson:"issue_type"`
@@ -153,11 +190,6 @@ type GithubPullRequestSubscriber struct {
Type string `bson:"type"`
}
-const (
- WaitOnChild = "wait-on-child"
- SendChildPatchOutcome = "send-child-patch-outcome"
-)
-
func (s *GithubPullRequestSubscriber) String() string {
return fmt.Sprintf("%s-%s-%d-%s-%s", s.Owner, s.Repo, s.PRNumber, s.Ref, s.ChildId)
}
diff --git a/model/event/subscribers_test.go b/model/event/subscribers_test.go
index 55363ad5d5d..c9621d3af63 100644
--- a/model/event/subscribers_test.go
+++ b/model/event/subscribers_test.go
@@ -117,3 +117,57 @@ func TestSubscribersStringerWithMissingAttributes(t *testing.T) {
assert.True(strings.HasSuffix(webhookSub.String(), "NIL_URL"))
}
+
+func TestValidate(t *testing.T) {
+ for name, testCase := range map[string]struct {
+ s Subscriber
+ errorExpected bool
+ }{
+ "MissingType": {
+ s: Subscriber{Target: "a@mongodb.com"},
+ errorExpected: true,
+ },
+ "MissingTarget": {
+ s: Subscriber{Type: EmailSubscriberType},
+ errorExpected: true,
+ },
+ "WebhookMissingURL": {
+ s: Subscriber{
+ Type: EvergreenWebhookSubscriberType,
+ Target: WebhookSubscriber{Secret: []byte("shh")},
+ },
+ errorExpected: true,
+ },
+ "WebhookTooManyRetries": {
+ s: Subscriber{
+ Type: EvergreenWebhookSubscriberType,
+ Target: WebhookSubscriber{
+ URL: "https://evergreen.mongodb.com",
+ Secret: []byte("shh"),
+ Retries: 1000000,
+ },
+ },
+ errorExpected: true,
+ },
+ "ValidWebhook": {
+ s: Subscriber{
+ Type: EvergreenWebhookSubscriberType,
+ Target: WebhookSubscriber{
+ URL: "https://evergreen.mongodb.com",
+ Secret: []byte("shh"),
+ Retries: 3,
+ MinDelayMS: 1000,
+ },
+ },
+ errorExpected: false,
+ },
+ } {
+ t.Run(name, func(t *testing.T) {
+ if testCase.errorExpected {
+ assert.Error(t, testCase.s.Validate())
+ } else {
+ assert.NoError(t, testCase.s.Validate())
+ }
+ })
+ }
+}
diff --git a/model/event/subscriptions.go b/model/event/subscriptions.go
index cd86ab6cfaf..71ceea3b463 100644
--- a/model/event/subscriptions.go
+++ b/model/event/subscriptions.go
@@ -22,7 +22,7 @@ const (
SubscriptionsCollection = "subscriptions"
)
-//nolint: deadcode, megacheck, unused
+//nolint:megacheck,unused
var (
subscriptionIDKey = bsonutil.MustHaveTag(Subscription{}, "ID")
subscriptionResourceTypeKey = bsonutil.MustHaveTag(Subscription{}, "ResourceType")
@@ -74,10 +74,15 @@ const (
ObjectHost = "host"
ObjectPatch = "patch"
- TriggerOutcome = "outcome"
+ TriggerOutcome = "outcome"
+ // TriggerFamilyOutcome indicates that a patch or version completed,
+ // and all their child patches (if there are any) have also completed.
+ TriggerFamilyOutcome = "family-outcome"
TriggerGithubCheckOutcome = "github-check-outcome"
TriggerFailure = "failure"
+ TriggerFamilyFailure = "family-failure"
TriggerSuccess = "success"
+ TriggerFamilySuccess = "family-success"
TriggerRegression = "regression"
TriggerExceedsDuration = "exceeds-duration"
TriggerRuntimeChangeByPercent = "runtime-change"
@@ -734,6 +739,7 @@ func CreateOrUpdateGeneralSubscription(resourceType string, id string,
sub.OwnerType = OwnerTypePerson
sub.Owner = user
+
if err := sub.Upsert(); err != nil {
return nil, errors.Wrap(err, "upserting subscription")
}
@@ -787,6 +793,12 @@ func NewVersionGithubCheckOutcomeSubscription(id string, sub Subscriber) Subscri
}
func NewExpiringPatchOutcomeSubscription(id string, sub Subscriber) Subscription {
+ subscription := NewSubscriptionByID(ResourceTypePatch, TriggerFamilyOutcome, id, sub)
+ subscription.LastUpdated = time.Now()
+ return subscription
+}
+
+func NewExpiringPatchChildOutcomeSubscription(id string, sub Subscriber) Subscription {
subscription := NewSubscriptionByID(ResourceTypePatch, TriggerOutcome, id, sub)
subscription.LastUpdated = time.Now()
return subscription
@@ -805,7 +817,7 @@ func NewParentPatchSubscription(id string, sub Subscriber) Subscription {
}
func NewPatchOutcomeSubscriptionByOwner(owner string, sub Subscriber) Subscription {
- return NewSubscriptionByOwner(owner, sub, ResourceTypePatch, TriggerOutcome)
+ return NewSubscriptionByOwner(owner, sub, ResourceTypePatch, TriggerFamilyOutcome)
}
func NewSpawnhostExpirationSubscription(owner string, sub Subscriber) Subscription {
diff --git a/model/event/task_event.go b/model/event/task_event.go
index 00c28eec854..413e57415bd 100644
--- a/model/event/task_event.go
+++ b/model/event/task_event.go
@@ -1,6 +1,7 @@
package event
import (
+ "strconv"
"time"
"github.com/evergreen-ci/evergreen"
@@ -9,7 +10,7 @@ import (
)
func init() {
- registry.AddType(ResourceTypeTask, taskEventDataFactory)
+ registry.AddType(ResourceTypeTask, func() interface{} { return &TaskEventData{} })
registry.AllowSubscription(ResourceTypeTask, TaskStarted)
registry.AllowSubscription(ResourceTypeTask, TaskFinished)
registry.AllowSubscription(ResourceTypeTask, TaskBlocked)
@@ -35,9 +36,6 @@ const (
TaskJiraAlertCreated = "TASK_JIRA_ALERT_CREATED"
TaskDependenciesOverridden = "TASK_DEPENDENCIES_OVERRIDDEN"
MergeTaskUnscheduled = "MERGE_TASK_UNSCHEDULED"
-
- // TODO (EVG-16969) remove once TaskScheduled events TTL
- TaskScheduled = "TASK_SCHEDULED"
)
// implements Data
@@ -54,22 +52,22 @@ type TaskEventData struct {
}
func logTaskEvent(taskId string, eventType string, eventData TaskEventData) {
- event := EventLogEntry{
+ event := getTaskEvent(taskId, eventType, eventData)
+ grip.Error(message.WrapError(event.Log(), message.Fields{
+ "resource_type": ResourceTypeTask,
+ "message": "error logging event",
+ "source": "event-log-fail",
+ }))
+}
+
+func getTaskEvent(taskId string, eventType string, eventData TaskEventData) EventLogEntry {
+ return EventLogEntry{
Timestamp: time.Now(),
ResourceId: taskId,
EventType: eventType,
Data: eventData,
ResourceType: ResourceTypeTask,
}
-
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
- grip.Error(message.WrapError(err, message.Fields{
- "resource_type": ResourceTypeTask,
- "message": "error logging event",
- "source": "event-log-fail",
- }))
- }
}
func logManyTaskEvents(taskIds []string, eventType string, eventData TaskEventData) {
@@ -94,8 +92,7 @@ func logManyTaskEvents(taskIds []string, eventType string, eventData TaskEventDa
}
events = append(events, event)
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogManyEvents(events); err != nil {
+ if err := LogManyEvents(events); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeTask,
"message": "error logging event",
@@ -142,10 +139,28 @@ func LogTaskStarted(taskId string, execution int) {
logTaskEvent(taskId, TaskStarted, TaskEventData{Execution: execution, Status: evergreen.TaskStarted})
}
-func LogTaskFinished(taskId string, execution int, hostId, status string) {
+// LogTaskFinished logs an event indicating that the task has finished.
+func LogTaskFinished(taskId string, execution int, status string) {
logTaskEvent(taskId, TaskFinished, TaskEventData{Execution: execution, Status: status})
+}
+
+// LogHostTaskFinished logs an event for a host task being marked finished. If
+// it was assigned to run on a host, it logs an additional host event indicating
+// that its assigned task has finished.
+func LogHostTaskFinished(taskId string, execution int, hostId, status string) {
+ LogTaskFinished(taskId, execution, status)
if hostId != "" {
- LogHostEvent(hostId, EventTaskFinished, HostEventData{TaskExecution: execution, TaskStatus: status, TaskId: taskId})
+ LogHostEvent(hostId, EventHostTaskFinished, HostEventData{Execution: strconv.Itoa(execution), TaskStatus: status, TaskId: taskId})
+ }
+}
+
+// LogContainerTaskFinished logs an event for a container task being marked
+// finished. If it was assigned to run on a pod, it logs an additional pod event
+// indicating that its assigned task has finished.
+func LogContainerTaskFinished(taskID string, execution int, podID, status string) {
+ LogTaskFinished(taskID, execution, status)
+ if podID != "" {
+ LogPodEvent(podID, EventPodFinishedTask, PodData{TaskExecution: execution, TaskStatus: status, TaskID: taskID})
}
}
@@ -161,10 +176,18 @@ func LogTaskActivated(taskId string, execution int, userId string) {
logTaskEvent(taskId, TaskActivated, TaskEventData{Execution: execution, UserId: userId})
}
+func GetTaskActivatedEvent(taskId string, execution int, userId string) EventLogEntry {
+ return getTaskEvent(taskId, TaskActivated, TaskEventData{Execution: execution, UserId: userId})
+}
+
func LogTaskDeactivated(taskId string, execution int, userId string) {
logTaskEvent(taskId, TaskDeactivated, TaskEventData{Execution: execution, UserId: userId})
}
+func GetTaskDeactivatedEvent(taskId string, execution int, userId string) EventLogEntry {
+ return getTaskEvent(taskId, TaskDeactivated, TaskEventData{Execution: execution, UserId: userId})
+}
+
func LogTaskAbortRequest(taskId string, execution int, userId string) {
logTaskEvent(taskId, TaskAbortRequest,
TaskEventData{Execution: execution, UserId: userId})
diff --git a/model/event/task_event_test.go b/model/event/task_event_test.go
index c38f91bee76..3acad636d8d 100644
--- a/model/event/task_event_test.go
+++ b/model/event/task_event_test.go
@@ -21,7 +21,7 @@ func init() {
func TestLoggingTaskEvents(t *testing.T) {
Convey("Test task event logging", t, func() {
- require.NoError(t, db.Clear(AllLogCollection))
+ require.NoError(t, db.Clear(EventCollection))
Convey("All task events should be logged correctly", func() {
taskId := "task_id"
@@ -35,9 +35,9 @@ func TestLoggingTaskEvents(t *testing.T) {
time.Sleep(1 * time.Millisecond)
LogTaskStarted(taskId, 1)
time.Sleep(1 * time.Millisecond)
- LogTaskFinished(taskId, 1, hostId, evergreen.TaskSucceeded)
+ LogHostTaskFinished(taskId, 1, hostId, evergreen.TaskSucceeded)
- eventsForTask, err := Find(AllLogCollection, TaskEventsInOrder(taskId))
+ eventsForTask, err := Find(TaskEventsInOrder(taskId))
So(err, ShouldEqual, nil)
event := eventsForTask[0]
@@ -111,9 +111,9 @@ func TestLoggingTaskEvents(t *testing.T) {
func TestLogManyTestEvents(t *testing.T) {
require := require.New(t)
assert := assert.New(t)
- require.NoError(db.ClearCollections(AllLogCollection))
+ require.NoError(db.ClearCollections(EventCollection))
LogManyTaskAbortRequests([]string{"task_1", "task_2"}, "example_user")
events := []EventLogEntry{}
- assert.NoError(db.FindAllQ(AllLogCollection, db.Query(bson.M{}), &events))
+ assert.NoError(db.FindAllQ(EventCollection, db.Query(bson.M{}), &events))
assert.Len(events, 2)
}
diff --git a/model/event/version_event.go b/model/event/version_event.go
index 8c9af925a15..3a9a1595f63 100644
--- a/model/event/version_event.go
+++ b/model/event/version_event.go
@@ -11,6 +11,7 @@ func init() {
registry.AddType(ResourceTypeVersion, versionEventDataFactory)
registry.AllowSubscription(ResourceTypeVersion, VersionStateChange)
registry.AllowSubscription(ResourceTypeVersion, VersionGithubCheckFinished)
+ registry.AllowSubscription(ResourceTypeVersion, VersionChildrenCompletion)
}
func versionEventDataFactory() interface{} {
@@ -21,11 +22,13 @@ const (
ResourceTypeVersion = "VERSION"
VersionStateChange = "STATE_CHANGE"
VersionGithubCheckFinished = "GITHUB_CHECK_FINISHED"
+ VersionChildrenCompletion = "CHILDREN_FINISHED"
)
type VersionEventData struct {
Status string `bson:"status,omitempty" json:"status,omitempty"`
GithubCheckStatus string `bson:"github_check_status,omitempty" json:"github_check_status,omitempty"`
+ Author string `bson:"author,omitempty" json:"author,omitempty"`
}
func LogVersionStateChangeEvent(id, newStatus string) {
@@ -39,8 +42,7 @@ func LogVersionStateChangeEvent(id, newStatus string) {
},
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeVersion,
"message": "error logging event",
@@ -60,8 +62,28 @@ func LogVersionGithubCheckFinishedEvent(id, newStatus string) {
},
}
- logger := NewDBEventLogger(AllLogCollection)
- if err := logger.LogEvent(&event); err != nil {
+ if err := event.Log(); err != nil {
+ grip.Error(message.WrapError(err, message.Fields{
+ "resource_type": ResourceTypeVersion,
+ "message": "error logging event",
+ "source": "event-log-fail",
+ }))
+ }
+}
+
+func LogVersionChildrenCompletionEvent(id, status, author string) {
+ event := EventLogEntry{
+ Timestamp: time.Now().Truncate(0).Round(time.Millisecond),
+ ResourceId: id,
+ ResourceType: ResourceTypeVersion,
+ EventType: VersionChildrenCompletion,
+ Data: &VersionEventData{
+ Status: status,
+ Author: author,
+ },
+ }
+
+ if err := event.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
"resource_type": ResourceTypeVersion,
"message": "error logging event",
diff --git a/model/generate.go b/model/generate.go
index 38928957416..c4ca34e8a94 100644
--- a/model/generate.go
+++ b/model/generate.go
@@ -134,7 +134,7 @@ func (g *GeneratedProject) NewVersion(p *Project, pp *ParserProject, v *Version)
return nil, pp, v, errors.Wrap(err, "generated project is invalid")
}
- newPP, err := g.addGeneratedProjectToConfig(pp, v.Config, cachedProject)
+ newPP, err := g.addGeneratedProjectToConfig(pp, cachedProject)
if err != nil {
return nil, nil, nil, errors.Wrap(err, "creating config from generated config")
}
@@ -146,7 +146,7 @@ func (g *GeneratedProject) NewVersion(p *Project, pp *ParserProject, v *Version)
return p, newPP, v, nil
}
-func (g *GeneratedProject) Save(ctx context.Context, p *Project, pp *ParserProject, v *Version) error {
+func (g *GeneratedProject) Save(ctx context.Context, settings *evergreen.Settings, p *Project, pp *ParserProject, v *Version) error {
// Get task again, to exit early if another generator finished early.
t, err := task.FindOneId(g.Task.Id)
if err != nil {
@@ -166,7 +166,9 @@ func (g *GeneratedProject) Save(ctx context.Context, p *Project, pp *ParserProje
return mongo.ErrNoDocuments
}
- if err := updateParserProject(v, pp, t.Id); err != nil {
+ ppCtx, ppCancel := context.WithTimeout(ctx, DefaultParserProjectAccessTimeout)
+ defer ppCancel()
+ if err := updateParserProject(ppCtx, settings, v, pp, t.Id); err != nil {
return errors.WithStack(err)
}
@@ -176,22 +178,24 @@ func (g *GeneratedProject) Save(ctx context.Context, p *Project, pp *ParserProje
return nil
}
-// updateParserProject updates the parser project along with generated task ID and updated config number
-// (if using legacy version config, this comes from version).
-func updateParserProject(v *Version, pp *ParserProject, taskId string) error {
+// updateParserProject updates the parser project along with generated task ID
+// and updated config number.
+func updateParserProject(ctx context.Context, settings *evergreen.Settings, v *Version, pp *ParserProject, taskId string) error {
if utility.StringSliceContains(pp.UpdatedByGenerators, taskId) {
// This generator has already updated the parser project so continue.
return nil
}
- updateNum := pp.ConfigUpdateNumber + 1
- // Legacy: most likely a version for which no parser project exists.
- if pp.ConfigUpdateNumber < v.ConfigUpdateNumber {
- updateNum = v.ConfigUpdateNumber + 1
- }
+
pp.UpdatedByGenerators = append(pp.UpdatedByGenerators, taskId)
- if err := pp.UpsertWithConfigNumber(updateNum); err != nil {
+
+ ppStorageMethod, err := ParserProjectUpsertOneWithS3Fallback(ctx, settings, v.ProjectStorageMethod, pp)
+ if err != nil {
return errors.Wrapf(err, "upserting parser project '%s'", pp.Id)
}
+ if err := v.UpdateProjectStorageMethod(ppStorageMethod); err != nil {
+ return errors.Wrapf(err, "updating version's parser project storage method from '%s' to '%s'", v.ProjectStorageMethod, ppStorageMethod)
+ }
+
return nil
}
@@ -205,8 +209,8 @@ func cacheProjectData(p *Project) projectMaps {
for _, bv := range p.BuildVariants {
cachedProject.buildVariants[bv.Name] = struct{}{}
}
- for _, t := range p.Tasks {
- cachedProject.tasks[t.Name] = &t
+ for i, t := range p.Tasks {
+ cachedProject.tasks[t.Name] = &p.Tasks[i]
}
// functions is already a map, cache it anyway for convenience
cachedProject.functions = p.Functions
@@ -215,7 +219,7 @@ func cacheProjectData(p *Project) projectMaps {
// saveNewBuildsAndTasks saves new builds and tasks to the db.
func (g *GeneratedProject) saveNewBuildsAndTasks(ctx context.Context, v *Version, p *Project) error {
- // inherit priority from the parent task
+ // Inherit priority from the parent generator task.
for i, projBv := range p.BuildVariants {
for j := range projBv.Tasks {
p.BuildVariants[i].Tasks[j].Priority = g.Task.Priority
@@ -224,7 +228,7 @@ func (g *GeneratedProject) saveNewBuildsAndTasks(ctx context.Context, v *Version
// Only consider batchtime for mainline builds. We should always respect activate if it is set.
activationInfo := g.findTasksAndVariantsWithSpecificActivations(v.Requester)
- newTVPairs := g.getNewTasksWithDependencies(v, p)
+ newTVPairs := g.getNewTasksWithDependencies(v, p, &activationInfo)
existingBuilds, err := build.Find(build.ByVersion(v.Id))
if err != nil {
@@ -269,14 +273,22 @@ func (g *GeneratedProject) saveNewBuildsAndTasks(ctx context.Context, v *Version
return errors.Errorf("project '%s' not found", p.Identifier)
}
- activatedTasksInExistingBuilds, err := addNewTasks(ctx, activationInfo, v, p, projectRef, newTVPairsForExistingVariants,
- existingBuilds, syncAtEndOpts, g.Task.Id)
+ creationInfo := TaskCreationInfo{
+ Project: p,
+ ProjectRef: projectRef,
+ Version: v,
+ Pairs: newTVPairsForExistingVariants,
+ ActivationInfo: activationInfo,
+ SyncAtEndOpts: syncAtEndOpts,
+ GeneratedBy: g.Task.Id,
+ }
+ activatedTasksInExistingBuilds, err := addNewTasks(ctx, creationInfo, existingBuilds)
if err != nil {
return errors.Wrap(err, "adding new tasks")
}
- activatedTasksInNewBuilds, err := addNewBuilds(ctx, activationInfo, v, p, newTVPairsForNewVariants,
- existingBuilds, syncAtEndOpts, projectRef, g.Task.Id)
+ creationInfo.Pairs = newTVPairsForNewVariants
+ activatedTasksInNewBuilds, err := addNewBuilds(ctx, creationInfo, existingBuilds)
if err != nil {
return errors.Wrap(err, "adding new builds")
}
@@ -313,9 +325,15 @@ func (g *GeneratedProject) CheckForCycles(v *Version, p *Project, projectRef *Pr
// simulateNewTasks adds the tasks we're planning to add to the version to the graph and
// adds simulated edges from each task that depends on the generator to each of the generated tasks.
func (g *GeneratedProject) simulateNewTasks(graph task.DependencyGraph, v *Version, p *Project, projectRef *ProjectRef) (task.DependencyGraph, error) {
- newTasks := g.getNewTasksWithDependencies(v, p)
+ newTasks := g.getNewTasksWithDependencies(v, p, nil)
- taskIDs, err := getTaskIdTables(v, p, newTasks, projectRef.Identifier)
+ creationInfo := TaskCreationInfo{
+ Project: p,
+ ProjectRef: projectRef,
+ Version: v,
+ Pairs: newTasks,
+ }
+ taskIDs, err := getTaskIdTables(creationInfo)
if err != nil {
return graph, errors.Wrap(err, "getting task ids")
}
@@ -325,14 +343,14 @@ func (g *GeneratedProject) simulateNewTasks(graph task.DependencyGraph, v *Versi
}
// getNewTasksWithDependencies returns the generated tasks and their recursive dependencies.
-func (g *GeneratedProject) getNewTasksWithDependencies(v *Version, p *Project) TaskVariantPairs {
+func (g *GeneratedProject) getNewTasksWithDependencies(v *Version, p *Project, activationInfo *specificActivationInfo) TaskVariantPairs {
newTVPairs := TaskVariantPairs{}
for _, bv := range g.BuildVariants {
newTVPairs = appendTasks(newTVPairs, bv, p)
}
var err error
- newTVPairs.ExecTasks, err = IncludeDependencies(p, newTVPairs.ExecTasks, v.Requester)
+ newTVPairs.ExecTasks, err = IncludeDependenciesWithGenerated(p, newTVPairs.ExecTasks, v.Requester, activationInfo, g.BuildVariants)
grip.Warning(message.WrapError(err, message.Fields{
"message": "error including dependencies for generator",
"task": g.Task.Id,
@@ -435,14 +453,19 @@ func (g *GeneratedProject) filterInactiveTasks(tasks TVPairSet, v *Version, p *P
}
type specificActivationInfo struct {
- stepbackTasks map[string][]string
- activationTasks map[string][]string // tasks by variant that have batchtime or activate specified
- activationVariants []string // variants that have batchtime or activate specified
+ stepbackTasks map[string][]specificStepbackInfo // tasks by variant that are being stepped back, along with the stepback depth to use
+ activationTasks map[string][]string // tasks by variant that have batchtime or activate specified
+ activationVariants []string // variants that have batchtime or activate specified
+}
+
+type specificStepbackInfo struct {
+ task string
+ depth int // store the depth that the new stepback task should use
}
func newSpecificActivationInfo() specificActivationInfo {
return specificActivationInfo{
- stepbackTasks: map[string][]string{},
+ stepbackTasks: map[string][]specificStepbackInfo{},
activationTasks: map[string][]string{},
activationVariants: []string{},
}
@@ -461,30 +484,53 @@ func (b *specificActivationInfo) hasActivationTasks() bool {
}
func (b *specificActivationInfo) isStepbackTask(variant, task string) bool {
- return utility.StringSliceContains(b.stepbackTasks[variant], task)
+ for _, stepbackInfo := range b.stepbackTasks[variant] {
+ if stepbackInfo.task == task {
+ return true
+ }
+ }
+ return false
+}
+
+func (b *specificActivationInfo) getStepbackTaskDepth(variant, task string) int {
+ for _, stepbackInfo := range b.stepbackTasks[variant] {
+ if stepbackInfo.task == task {
+ return stepbackInfo.depth
+ }
+ }
+ return 0
}
func (b *specificActivationInfo) taskHasSpecificActivation(variant, task string) bool {
return utility.StringSliceContains(b.activationTasks[variant], task)
}
+func (b *specificActivationInfo) taskOrVariantHasSpecificActivation(variant, task string) bool {
+ if b == nil {
+ return false
+ }
+ return b.taskHasSpecificActivation(variant, task) || b.variantHasSpecificActivation(variant)
+}
+
func (g *GeneratedProject) findTasksAndVariantsWithSpecificActivations(requester string) specificActivationInfo {
res := newSpecificActivationInfo()
for _, bv := range g.BuildVariants {
- // only consider batchtime for certain requesters
- if evergreen.ShouldConsiderBatchtime(requester) && (bv.BatchTime != nil || bv.CronBatchTime != "") {
+ // Only consider batchtime for certain requesters
+ if evergreen.ShouldConsiderBatchtime(requester) && bv.hasSpecificActivation() {
res.activationVariants = append(res.activationVariants, bv.name())
} else if bv.Activate != nil {
res.activationVariants = append(res.activationVariants, bv.name())
}
- // regardless of whether the build variant has batchtime, there may be tasks with different batchtime
+ // Regardless of whether the build variant has batchtime, there may be tasks with different batchtime
batchTimeTasks := []string{}
for _, bvt := range bv.Tasks {
if isStepbackTask(g.Task, bv.Name, bvt.Name) {
- res.stepbackTasks[bv.Name] = append(res.stepbackTasks[bv.Name], bvt.Name)
- continue // don't consider batchtime/activation if we're stepping back this generated task
+ // If it's a stepback task, it should store the same stepback depth as the generator.
+ stepbackInfo := specificStepbackInfo{task: bvt.Name, depth: g.Task.StepbackDepth}
+ res.stepbackTasks[bv.Name] = append(res.stepbackTasks[bv.Name], stepbackInfo)
+ continue // Don't consider batchtime/activation if we're stepping back this generated task
}
- if evergreen.ShouldConsiderBatchtime(requester) && (bvt.BatchTime != nil || bvt.CronBatchTime != "") {
+ if evergreen.ShouldConsiderBatchtime(requester) && bvt.hasSpecificActivation() {
batchTimeTasks = append(batchTimeTasks, bvt.Name)
} else if bvt.Activate != nil {
batchTimeTasks = append(batchTimeTasks, bvt.Name)
@@ -540,15 +586,7 @@ func appendTasks(pairs TaskVariantPairs, bv parserBV, p *Project) TaskVariantPai
// addGeneratedProjectToConfig takes a ParserProject and a YML config and returns a new one with the GeneratedProject included.
// support for YML config will be degraded.
-func (g *GeneratedProject) addGeneratedProjectToConfig(intermediateProject *ParserProject, config string, cachedProject projectMaps) (*ParserProject, error) {
- var err error
- if intermediateProject == nil {
- intermediateProject, err = createIntermediateProject([]byte(config), false)
- if err != nil {
- return nil, errors.Wrap(err, "creating intermediate project")
- }
- }
-
+func (g *GeneratedProject) addGeneratedProjectToConfig(intermediateProject *ParserProject, cachedProject projectMaps) (*ParserProject, error) {
// Append buildvariants, tasks, and functions to the config.
intermediateProject.TaskGroups = append(intermediateProject.TaskGroups, g.TaskGroups...)
intermediateProject.Tasks = append(intermediateProject.Tasks, g.Tasks...)
@@ -590,6 +628,15 @@ func (g *GeneratedProject) addGeneratedProjectToConfig(intermediateProject *Pars
return intermediateProject, nil
}
+func variantExistsInGeneratedProject(variants []parserBV, variant string) bool {
+ for bv := range variants {
+ if variants[bv].Name == variant {
+ return true
+ }
+ }
+ return false
+}
+
// projectMaps is a struct of maps of project fields, which allows efficient comparisons of generated projects to projects.
type projectMaps struct {
buildVariants map[string]struct{}
@@ -636,9 +683,13 @@ func (g *GeneratedProject) validateNoRedefine(cachedProject projectMaps) error {
}
func isNonZeroBV(bv parserBV) bool {
+ // TODO (EVG-19783): this omits activate from consideration, but it's
+ // unclear if it's intentional or not.
if bv.DisplayName != "" || len(bv.Expansions) > 0 || len(bv.Modules) > 0 ||
- bv.Disabled || len(bv.Tags) > 0 || bv.Push ||
- bv.BatchTime != nil || bv.Stepback != nil || len(bv.RunOn) > 0 {
+ bv.Disable != nil || len(bv.Tags) > 0 ||
+ bv.BatchTime != nil || bv.Patchable != nil || bv.PatchOnly != nil ||
+ bv.AllowForGitTag != nil || bv.GitTagOnly != nil ||
+ bv.Stepback != nil || len(bv.RunOn) > 0 {
return true
}
return false
diff --git a/model/generate_test.go b/model/generate_test.go
index b4c96f0f01c..eb1b3f694f6 100644
--- a/model/generate_test.go
+++ b/model/generate_test.go
@@ -8,8 +8,10 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/mock"
"github.com/evergreen-ci/evergreen/model/build"
"github.com/evergreen-ci/evergreen/model/task"
+ "github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -22,18 +24,18 @@ var (
taskBatchTime = 30
sampleGeneratedProject = GeneratedProject{
Tasks: []parserTask{
- parserTask{
+ {
Name: "new_task",
Commands: []PluginCommandConf{
- PluginCommandConf{
+ {
Command: "shell.exec",
},
},
},
- parserTask{
+ {
Name: "another_task",
Commands: []PluginCommandConf{
- PluginCommandConf{
+ {
Command: "shell.exec",
},
},
@@ -46,11 +48,11 @@ var (
},
},
BuildVariants: []parserBV{
- parserBV{
+ {
Name: "new_buildvariant",
RunOn: []string{"arch"},
},
- parserBV{
+ {
Name: "a_variant",
Tasks: parserBVTaskUnits{
parserBVTaskUnit{
@@ -59,13 +61,13 @@ var (
},
},
DisplayTasks: []displayTask{
- displayTask{
+ {
Name: "my_display_task_old_variant",
ExecutionTasks: []string{"say-bye"},
},
},
},
- parserBV{
+ {
Name: "another_variant",
BatchTime: &bvBatchTime,
Tasks: parserBVTaskUnits{
@@ -79,7 +81,7 @@ var (
},
RunOn: []string{"arch"},
DisplayTasks: []displayTask{
- displayTask{
+ {
Name: "my_display_task_new_variant",
ExecutionTasks: []string{"another_task"},
},
@@ -87,12 +89,12 @@ var (
},
},
Functions: map[string]*YAMLCommandSet{
- "new_function": &YAMLCommandSet{
+ "new_function": {
MultiCommand: []PluginCommandConf{},
},
},
TaskGroups: []parserTaskGroup{
- parserTaskGroup{
+ {
Name: "example_task_group",
MaxHosts: 1,
Tasks: []string{
@@ -102,12 +104,70 @@ var (
},
}
+ sampleGeneratedProjectWithAllMultiFields = GeneratedProject{
+ BuildVariants: []parserBV{
+ {
+ Name: "honeydew",
+ Tasks: []parserBVTaskUnit{
+ {Name: "cat"},
+ {Name: "doge"},
+ {Name: "pika"},
+ },
+ DisplayTasks: []displayTask{},
+ },
+ {
+ Name: "cantaloupe",
+ Tasks: []parserBVTaskUnit{
+ {Name: "quokka"},
+ },
+ DisplayTasks: []displayTask{
+ {Name: "grouse"},
+ {Name: "albatross"},
+ },
+ },
+ },
+ Tasks: []parserTask{
+ {
+ Name: "quokka",
+ Commands: []PluginCommandConf{
+ {Command: "shell.exec"},
+ {Command: "shell.exec"},
+ },
+ },
+ {
+ Name: "pika",
+ Commands: []PluginCommandConf{
+ {Command: "shell.exec"},
+ },
+ },
+ },
+ TaskGroups: []parserTaskGroup{
+ {
+ Name: "sea-bunny",
+ Tasks: []string{"quokka", "pika"},
+ },
+ {
+ Name: "mola-mola",
+ Tasks: []string{"quokka"},
+ },
+ },
+ Functions: map[string]*YAMLCommandSet{
+ "brownie": {MultiCommand: []PluginCommandConf{
+ {Command: "shell.exec"},
+ {Command: "shell.exec"},
+ }},
+ "cookie": {MultiCommand: []PluginCommandConf{
+ {Command: "shell.exec"},
+ }},
+ },
+ }
+
smallGeneratedProject = GeneratedProject{
BuildVariants: []parserBV{
- parserBV{
+ {
Name: "my_build_variant",
DisplayTasks: []displayTask{
- displayTask{
+ {
Name: "my_display_task",
ExecutionTasks: []string{"my_display_task_gen"},
},
@@ -118,7 +178,7 @@ var (
sampleGeneratedProjectAddToBVOnly = GeneratedProject{
BuildVariants: []parserBV{
- parserBV{
+ {
Name: "a_variant",
Tasks: parserBVTaskUnits{
parserBVTaskUnit{
@@ -272,6 +332,47 @@ buildvariants:
- name: say-hi
- name: a-depended-on-task
`
+
+ sampleProjYAMLWithMultiFields = `
+tasks:
+- name: blueberry
+ commands:
+ - command: shell.exec
+- name: strawberry
+ commands:
+ - command: shell.exec
+- name: banana-is-a-berry
+ commands:
+ - command: shell.exec
+
+buildvariants:
+- name: rutabaga
+ tasks:
+ - name: blueberry
+ - name: strawberry
+- name: sweet-potato
+ tasks:
+ - name: strawberry
+ - name: lotta-fruits
+
+functions:
+ purple:
+ - command: shell.exec
+ - command: shell.exec
+ orange:
+ - command: shell.exec
+
+task_groups:
+- name: i-am-a-fruitarian
+ tasks:
+ - blueberry
+ - strawberry
+- name: lotta-fruits
+ tasks:
+ - blueberry
+ - banana-is-a-berry
+`
+
sampleGenerateTasksYml = `
{
"functions": {
@@ -361,6 +462,9 @@ buildvariants:
type GenerateSuite struct {
suite.Suite
+ ctx context.Context
+ cancel context.CancelFunc
+ env evergreen.Environment
}
func TestGenerateSuite(t *testing.T) {
@@ -377,6 +481,14 @@ func (s *GenerateSuite) SetupTest() {
Id: "",
}
s.Require().NoError(ref2.Insert())
+ s.ctx, s.cancel = context.WithCancel(context.Background())
+ env := &mock.Environment{}
+ s.Require().NoError(env.Configure(s.ctx))
+ s.env = env
+}
+
+func (s *GenerateSuite) TearDownTest() {
+ s.cancel()
}
func (s *GenerateSuite) TestParseProjectFromJSON() {
@@ -439,28 +551,28 @@ func (s *GenerateSuite) TestValidateNoRedefine() {
g := GeneratedProject{}
s.NoError(g.validateNoRedefine(projectMaps{}))
- g.BuildVariants = []parserBV{parserBV{Name: "buildvariant_name", DisplayName: "I am a buildvariant"}}
- g.Tasks = []parserTask{parserTask{Name: "task_name"}}
+ g.BuildVariants = []parserBV{{Name: "buildvariant_name", DisplayName: "I am a buildvariant"}}
+ g.Tasks = []parserTask{{Name: "task_name"}}
g.Functions = map[string]*YAMLCommandSet{"function_name": nil}
s.NoError(g.validateNoRedefine(projectMaps{}))
cachedProject := projectMaps{
buildVariants: map[string]struct{}{
- "buildvariant_name": struct{}{},
+ "buildvariant_name": {},
},
}
s.Error(g.validateNoRedefine(cachedProject))
cachedProject = projectMaps{
tasks: map[string]*ProjectTask{
- "task_name": &ProjectTask{},
+ "task_name": {},
},
}
s.Error(g.validateNoRedefine(cachedProject))
cachedProject = projectMaps{
functions: map[string]*YAMLCommandSet{
- "function_name": &YAMLCommandSet{},
+ "function_name": {},
},
}
s.Error(g.validateNoRedefine(cachedProject))
@@ -474,9 +586,9 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
cachedProject = projectMaps{}
g = GeneratedProject{
Tasks: []parserTask{
- parserTask{
+ {
Commands: []PluginCommandConf{
- PluginCommandConf{
+ {
Command: "generate.tasks",
},
},
@@ -488,9 +600,9 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
cachedProject = projectMaps{}
g = GeneratedProject{
Functions: map[string]*YAMLCommandSet{
- "a_function": &YAMLCommandSet{
+ "a_function": {
MultiCommand: []PluginCommandConf{
- PluginCommandConf{
+ {
Command: "generate.tasks",
},
},
@@ -501,9 +613,9 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
cachedProject = projectMaps{
tasks: map[string]*ProjectTask{
- "task_name": &ProjectTask{
+ "task_name": {
Commands: []PluginCommandConf{
- PluginCommandConf{
+ {
Command: "generate.tasks",
},
},
@@ -512,9 +624,9 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
}
g = GeneratedProject{
BuildVariants: []parserBV{
- parserBV{
+ {
Tasks: []parserBVTaskUnit{
- parserBVTaskUnit{
+ {
Name: "task_name",
},
},
@@ -525,18 +637,18 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
cachedProject = projectMaps{
tasks: map[string]*ProjectTask{
- "task_name": &ProjectTask{
+ "task_name": {
Commands: []PluginCommandConf{
- PluginCommandConf{
+ {
Function: "generate_function",
},
},
},
},
functions: map[string]*YAMLCommandSet{
- "generate_function": &YAMLCommandSet{
+ "generate_function": {
MultiCommand: []PluginCommandConf{
- PluginCommandConf{
+ {
Command: "generate.tasks",
},
},
@@ -545,9 +657,9 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
}
g = GeneratedProject{
BuildVariants: []parserBV{
- parserBV{
+ {
Tasks: []parserBVTaskUnit{
- parserBVTaskUnit{
+ {
Name: "task_name",
},
},
@@ -557,14 +669,66 @@ func (s *GenerateSuite) TestValidateNoRecursiveGenerateTasks() {
s.Error(g.validateNoRecursiveGenerateTasks(cachedProject))
}
+func (s *GenerateSuite) TestCacheProjectData() {
+ var p Project
+ _, err := LoadProjectInto(s.ctx, []byte(sampleProjYAMLWithMultiFields), nil, "", &p)
+ s.Require().NoError(err)
+ cached := cacheProjectData(&p)
+ expectedBVs := map[string]bool{
+ "rutabaga": false,
+ "sweet-potato": false,
+ }
+ for bvName := range cached.buildVariants {
+ _, ok := expectedBVs[bvName]
+ s.True(ok, "unexpected build variant '%s'", bvName)
+ expectedBVs[bvName] = true
+ }
+ for bvName, found := range expectedBVs {
+ s.True(found, "did not find expected build variant '%s'", bvName)
+ }
+
+ expectedTasks := map[string]bool{
+ "blueberry": false,
+ "strawberry": false,
+ "banana-is-a-berry": false,
+ }
+ for taskName, tsk := range cached.tasks {
+ _, ok := expectedTasks[taskName]
+ s.True(ok, "unexpected build variant '%s'", taskName)
+ s.Equal(taskName, tsk.Name, "task name key does not match the task it maps to")
+ expectedTasks[taskName] = true
+ }
+ for taskName, found := range expectedTasks {
+ s.True(found, "did not find expected task '%s'", taskName)
+ }
+
+ expectedFuncs := map[string]struct {
+ numCmds int
+ found bool
+ }{
+ "purple": {numCmds: 2},
+ "orange": {numCmds: 1},
+ }
+ for funcName, funcCmds := range cached.functions {
+ expected, ok := expectedFuncs[funcName]
+ s.True(ok, "unexpected function '%s'", funcName)
+ s.Len(funcCmds.List(), expected.numCmds)
+
+ expected.found = true
+ expectedFuncs[funcName] = expected
+ }
+ for funcName, expected := range expectedFuncs {
+ s.True(expected.found, "did not find expected function '%s'", funcName)
+ }
+}
+
func (s *GenerateSuite) TestAddGeneratedProjectToConfig() {
p := &Project{}
- ctx := context.Background()
- pp, err := LoadProjectInto(ctx, []byte(sampleProjYml), nil, "", p)
+ pp, err := LoadProjectInto(s.ctx, []byte(sampleProjYml), nil, "", p)
s.NoError(err)
cachedProject := cacheProjectData(p)
g := sampleGeneratedProject
- newPP, err := g.addGeneratedProjectToConfig(pp, "", cachedProject)
+ newPP, err := g.addGeneratedProjectToConfig(pp, cachedProject)
s.NoError(err)
s.NotEmpty(newPP)
s.Require().Len(newPP.Tasks, 6)
@@ -577,7 +741,7 @@ func (s *GenerateSuite) TestAddGeneratedProjectToConfig() {
s.Equal(newPP.Tasks[4].Name, "new_task")
s.Equal(newPP.Tasks[5].Name, "another_task")
- newPP2, err := g.addGeneratedProjectToConfig(nil, sampleProjYml, cachedProject)
+ newPP2, err := g.addGeneratedProjectToConfig(&ParserProject{Functions: map[string]*YAMLCommandSet{}}, cachedProject)
s.NoError(err)
s.NotEmpty(newPP2)
@@ -597,9 +761,9 @@ func (s *GenerateSuite) TestAddGeneratedProjectToConfig() {
_, ok = newPP.Functions["new_function"]
s.True(ok)
- pp, err = LoadProjectInto(ctx, []byte(sampleProjYmlNoFunctions), nil, "", p)
+ pp, err = LoadProjectInto(s.ctx, []byte(sampleProjYmlNoFunctions), nil, "", p)
s.NoError(err)
- newPP, err = g.addGeneratedProjectToConfig(pp, "", cachedProject)
+ newPP, err = g.addGeneratedProjectToConfig(pp, cachedProject)
s.NoError(err)
s.NotNil(newPP)
s.Require().Len(newPP.Tasks, 5)
@@ -609,17 +773,26 @@ func (s *GenerateSuite) TestAddGeneratedProjectToConfig() {
s.Equal(newPP.Tasks[1].Name, "say-bye")
s.Equal(newPP.Tasks[3].Name, "new_task")
- newPP2, err = g.addGeneratedProjectToConfig(nil, sampleProjYmlNoFunctions, cachedProject)
+ newPP2, err = g.addGeneratedProjectToConfig(&ParserProject{Functions: map[string]*YAMLCommandSet{}}, cachedProject)
s.NoError(err)
s.NotEmpty(newPP2)
}
func (s *GenerateSuite) TestSaveNewBuildsAndTasks() {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ env := &mock.Environment{}
+ s.Require().NoError(env.Configure(ctx))
+
genTask := &task.Task{
- Id: "task_that_called_generate_task",
- Project: "proj",
- Version: "version_that_called_generate_task",
- Priority: 10,
+ Id: "task_that_called_generate_task",
+ Project: "proj",
+ Version: "version_that_called_generate_task",
+ Priority: 10,
+ BuildId: "sample_build",
+ Activated: true,
+ DisplayName: "task_that_called_generate_task",
}
s.NoError(genTask.Insert())
prevBatchTimeVersion := Version{
@@ -657,11 +830,9 @@ func (s *GenerateSuite) TestSaveNewBuildsAndTasks() {
}
s.NoError(sampleBuild.Insert())
v := &Version{
- Id: "version_that_called_generate_task",
- Identifier: "proj",
- BuildIds: []string{"sample_build"},
- Config: sampleProjYml,
- ConfigUpdateNumber: 4,
+ Id: "version_that_called_generate_task",
+ Identifier: "proj",
+ BuildIds: []string{"sample_build"},
BuildVariants: []VersionBuildStatus{
{
BuildId: "sample_build",
@@ -670,21 +841,25 @@ func (s *GenerateSuite) TestSaveNewBuildsAndTasks() {
},
}
s.NoError(v.Insert())
+ pp := &ParserProject{}
+ err := util.UnmarshalYAMLWithFallback([]byte(sampleProjYml), &pp)
+ s.NoError(err)
+ pp.Id = "version_that_called_generate_task"
+ s.NoError(pp.Insert())
g := sampleGeneratedProject
g.Task = genTask
- projectInfo, err := LoadProjectForVersion(v, "proj", false)
+ p, pp, err := FindAndTranslateProjectForVersion(ctx, env.Settings(), v)
s.Require().NoError(err)
- p, pp, v, err := g.NewVersion(projectInfo.Project, projectInfo.IntermediateProject, v)
+ p, pp, v, err = g.NewVersion(p, pp, v)
s.Require().NoError(err)
- s.NoError(g.Save(context.Background(), p, pp, v))
+ s.NoError(g.Save(s.ctx, s.env.Settings(), p, pp, v))
// verify we stopped saving versions
v, err = VersionFindOneId(v.Id)
s.NoError(err)
s.Require().NotNil(v)
- s.Equal(4, v.ConfigUpdateNumber)
s.Require().Len(v.BuildVariants, 2)
// batchtime task added to existing variant, despite no previous batchtime task
@@ -697,10 +872,14 @@ func (s *GenerateSuite) TestSaveNewBuildsAndTasks() {
s.Require().Len(v.BuildVariants[1].BatchTimeTasks, 1)
s.InDelta(time.Now().Add(15*time.Minute).Unix(), v.BuildVariants[1].BatchTimeTasks[0].ActivateAt.Unix(), 1)
- pp, err = ParserProjectFindOneById(v.Id)
+ ppStorage, err := GetParserProjectStorage(s.env.Settings(), v.ProjectStorageMethod)
+ s.Require().NoError(err)
+ defer ppStorage.Close(s.ctx)
+ pp, err = ParserProjectFindOneByID(s.ctx, s.env.Settings(), v.ProjectStorageMethod, v.Id)
s.NoError(err)
s.Require().NotNil(pp)
- s.Equal(5, pp.ConfigUpdateNumber)
+ s.Len(pp.BuildVariants, 3)
+ s.Len(pp.Tasks, 6)
builds, err := build.FindBuildsByVersions([]string{v.Id})
s.NoError(err)
tasks, err := task.FindAll(db.Query(bson.M{task.VersionKey: v.Id})) // with display
@@ -709,7 +888,7 @@ func (s *GenerateSuite) TestSaveNewBuildsAndTasks() {
s.Len(tasks, 7)
existingVariantTasks, err := task.Find(task.ByBuildId(sampleBuild.Id)) // without display
s.NoError(err)
- s.Len(existingVariantTasks, 2)
+ s.Len(existingVariantTasks, 3)
for _, existingTask := range existingVariantTasks {
if existingTask.DisplayName == "say-bye" {
s.False(existingTask.Activated)
@@ -729,6 +908,9 @@ func (s *GenerateSuite) TestSaveNewBuildsAndTasks() {
}
func (s *GenerateSuite) TestSaveWithAlreadyGeneratedTasksAndVariants() {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
generatorTask := &task.Task{
Id: "generator",
BuildId: "generate_build",
@@ -755,26 +937,30 @@ func (s *GenerateSuite) TestSaveWithAlreadyGeneratedTasksAndVariants() {
v := &Version{
Id: "version_that_called_generate_task",
BuildIds: []string{"new_variant"},
- Config: sampleProjYmlTaskGroups,
}
s.NoError(v.Insert())
+ pp := &ParserProject{}
+ err := util.UnmarshalYAMLWithFallback([]byte(sampleProjYmlTaskGroups), &pp)
+ s.NoError(err)
+ pp.Id = "version_that_called_generate_task"
+ s.NoError(pp.Insert())
// Setup parser project to be partially generated.
- projectInfo, err := LoadProjectForVersion(v, "", false)
+ p, pp, err := FindAndTranslateProjectForVersion(s.ctx, s.env.Settings(), v)
s.NoError(err)
g := partiallyGeneratedProject
g.Task = generatorTask
- p, pp, v, err := g.NewVersion(projectInfo.Project, projectInfo.IntermediateProject, v)
+ p, pp, v, err = g.NewVersion(p, pp, v)
s.NoError(err)
pp.UpdatedByGenerators = []string{generatorTask.Id}
- s.NoError(pp.Insert())
+ s.NoError(ParserProjectUpsertOne(ctx, s.env.Settings(), v.ProjectStorageMethod, pp))
// Shouldn't error trying to add the same generated project.
p, pp, v, err = g.NewVersion(p, pp, v)
s.NoError(err)
s.Len(pp.UpdatedByGenerators, 1) // Not modified again.
- s.NoError(g.Save(context.Background(), p, pp, v))
+ s.NoError(g.Save(s.ctx, s.env.Settings(), p, pp, v))
tasks := []task.Task{}
taskQuery := db.Query(bson.M{task.GeneratedByKey: "generator"}).Sort([]string{task.CreateTimeKey})
@@ -833,33 +1019,45 @@ func (s *GenerateSuite) TestSaveNewTasksWithDependencies() {
v := &Version{
Id: "version_that_called_generate_task",
BuildIds: []string{"sample_build"},
- Config: sampleProjYmlTaskGroups,
}
+ pp := &ParserProject{}
+ err := util.UnmarshalYAMLWithFallback([]byte(sampleProjYmlTaskGroups), &pp)
+ s.NoError(err)
+ pp.Id = "version_that_called_generate_task"
+ s.NoError(pp.Insert())
s.NoError(sampleBuild.Insert())
s.NoError(v.Insert())
g := sampleGeneratedProjectAddToBVOnly
g.Task = &tasksThatExist[0]
- projectInfo, err := LoadProjectForVersion(v, "", false)
+ p, pp, err := FindAndTranslateProjectForVersion(s.ctx, s.env.Settings(), v)
s.Require().NoError(err)
- p, pp, v, err := g.NewVersion(projectInfo.Project, projectInfo.IntermediateProject, v)
+ p, pp, v, err = g.NewVersion(p, pp, v)
s.NoError(err)
- s.NoError(g.Save(context.Background(), p, pp, v))
+ s.NoError(g.Save(s.ctx, s.env.Settings(), p, pp, v))
v, err = VersionFindOneId(v.Id)
s.NoError(err)
s.Require().NotNil(v)
- s.Equal(0, v.ConfigUpdateNumber)
- pp, err = ParserProjectFindOneById(v.Id)
+ pp, err = ParserProjectFindOneByID(s.ctx, s.env.Settings(), v.ProjectStorageMethod, v.Id)
s.NoError(err)
s.Require().NotNil(pp)
- s.Equal(1, pp.ConfigUpdateNumber)
+ s.Require().Len(pp.BuildVariants, 1, "parser project should have same build variant")
+ var taskWithDepsFound bool
+ const expectedTask = "task_that_has_dependencies"
+ for _, t := range pp.BuildVariants[0].Tasks {
+ if t.Name == expectedTask {
+ taskWithDepsFound = true
+ break
+ }
+ }
+ s.True(taskWithDepsFound, "task '%s' should have been added to build variant", expectedTask)
tasks := []task.Task{}
err = db.FindAllQ(task.Collection, db.Query(bson.M{}), &tasks)
s.NoError(err)
- err = db.FindAllQ(task.Collection, db.Query(bson.M{"display_name": "task_that_has_dependencies"}), &tasks)
+ err = db.FindAllQ(task.Collection, db.Query(bson.M{task.DisplayNameKey: expectedTask}), &tasks)
s.NoError(err)
s.Require().Len(tasks, 1)
s.Require().Len(tasks[0].DependsOn, 3)
@@ -888,7 +1086,9 @@ func (s *GenerateSuite) TestSaveNewTasksWithCrossVariantDependencies() {
v := &Version{
Id: "v1",
BuildIds: []string{"b1"},
- Config: `tasks:
+ }
+ parserProj := ParserProject{}
+ config := `tasks:
- name: say_something
- name: generator
@@ -899,8 +1099,11 @@ buildvariants:
tasks:
- name: say_something
- name: generator
-`,
- }
+`
+ err := util.UnmarshalYAMLWithFallback([]byte(config), &parserProj)
+ s.NoError(err)
+ parserProj.Id = "v1"
+ s.NoError(parserProj.Insert())
s.NoError(existingBuild.Insert())
s.NoError(v.Insert())
@@ -922,7 +1125,7 @@ buildvariants:
},
},
BuildVariants: []parserBV{
- parserBV{
+ {
Name: "a_new_variant",
Tasks: parserBVTaskUnits{
parserBVTaskUnit{
@@ -934,20 +1137,20 @@ buildvariants:
},
}
- projectInfo, err := LoadProjectForVersion(v, "", false)
+ p, pp, err := FindAndTranslateProjectForVersion(s.ctx, s.env.Settings(), v)
s.Require().NoError(err)
- p, pp, v, err := g.NewVersion(projectInfo.Project, projectInfo.IntermediateProject, v)
+ p, pp, v, err = g.NewVersion(p, pp, v)
s.NoError(err)
- s.NoError(g.Save(context.Background(), p, pp, v))
+ s.NoError(g.Save(s.ctx, s.env.Settings(), p, pp, v))
// the depended-on task is created in the existing variant
saySomething := task.Task{}
- err = db.FindOneQ(task.Collection, db.Query(bson.M{"display_name": "say_something"}), &saySomething)
+ err = db.FindOneQ(task.Collection, db.Query(bson.M{task.DisplayNameKey: "say_something"}), &saySomething)
s.NoError(err)
// the dependent task depends on the depended-on task
taskWithDeps := task.Task{}
- err = db.FindOneQ(task.Collection, db.Query(bson.M{"display_name": "task_that_has_dependencies"}), &taskWithDeps)
+ err = db.FindOneQ(task.Collection, db.Query(bson.M{task.DisplayNameKey: "task_that_has_dependencies"}), &taskWithDeps)
s.NoError(err)
s.Require().Len(taskWithDeps.DependsOn, 1)
s.Equal(taskWithDeps.DependsOn[0].TaskId, saySomething.Id)
@@ -973,8 +1176,12 @@ func (s *GenerateSuite) TestSaveNewTaskWithExistingExecutionTask() {
v := &Version{
Id: "version_that_called_generate_task",
BuildIds: []string{"sample_build"},
- Config: smallYml,
}
+ pp := &ParserProject{}
+ err := util.UnmarshalYAMLWithFallback([]byte(smallYml), &pp)
+ s.NoError(err)
+ pp.Id = "version_that_called_generate_task"
+ s.NoError(pp.Insert())
s.NoError(taskThatExists.Insert())
s.NoError(taskDisplayGen.Insert())
s.NoError(sampleBuild.Insert())
@@ -982,31 +1189,135 @@ func (s *GenerateSuite) TestSaveNewTaskWithExistingExecutionTask() {
g := smallGeneratedProject
g.Task = &taskThatExists
- projectInfo, err := LoadProjectForVersion(v, "", false)
+ p, pp, err := FindAndTranslateProjectForVersion(s.ctx, s.env.Settings(), v)
s.Require().NoError(err)
- p, pp, v, err := g.NewVersion(projectInfo.Project, projectInfo.IntermediateProject, v)
+ p, pp, v, err = g.NewVersion(p, pp, v)
s.Require().NoError(err)
- s.NoError(g.Save(context.Background(), p, pp, v))
+ s.NoError(g.Save(s.ctx, s.env.Settings(), p, pp, v))
v, err = VersionFindOneId(v.Id)
s.NoError(err)
s.Require().NotNil(v)
- s.Equal(0, v.ConfigUpdateNumber)
- pp, err = ParserProjectFindOneById(v.Id)
+ pp, err = ParserProjectFindOneByID(s.ctx, s.env.Settings(), v.ProjectStorageMethod, v.Id)
s.NoError(err)
s.Require().NotNil(pp)
- s.Equal(1, pp.ConfigUpdateNumber)
+ s.Require().Len(pp.BuildVariants, 1, "parser project should have same build variant")
+ const expectedDisplayTask = "my_display_task"
+ var dtFound bool
+ for _, dt := range pp.BuildVariants[0].DisplayTasks {
+ if dt.Name == expectedDisplayTask {
+ dtFound = true
+ break
+ }
+ }
+ s.True(dtFound, "display task '%s' should have been added", expectedDisplayTask)
tasks := []task.Task{}
s.NoError(db.FindAllQ(task.Collection, db.Query(bson.M{}), &tasks))
- s.NoError(db.FindAllQ(task.Collection, db.Query(bson.M{"display_name": "my_display_task_gen"}), &tasks))
+ s.NoError(db.FindAllQ(task.Collection, db.Query(bson.M{task.DisplayNameKey: "my_display_task_gen"}), &tasks))
s.Len(tasks, 1)
- s.NoError(db.FindAllQ(task.Collection, db.Query(bson.M{"display_name": "my_display_task"}), &tasks))
+ s.NoError(db.FindAllQ(task.Collection, db.Query(bson.M{task.DisplayNameKey: "my_display_task"}), &tasks))
s.Len(tasks, 1)
s.Len(tasks[0].ExecutionTasks, 1)
}
+func (s *GenerateSuite) TestMergeGeneratedProjects() {
+ projects := []GeneratedProject{sampleGeneratedProjectWithAllMultiFields}
+ merged, err := MergeGeneratedProjects(projects)
+ s.Require().NoError(err)
+
+ expectedBVs := map[string]struct {
+ numTasks int
+ numDisplayTasks int
+ found bool
+ }{
+ "honeydew": {numTasks: 3},
+ "cantaloupe": {
+ numTasks: 1,
+ numDisplayTasks: 2,
+ },
+ }
+ for _, bv := range merged.BuildVariants {
+ expected, ok := expectedBVs[bv.Name]
+ s.True(ok, "unexpected build variant '%s'", bv.Name)
+ s.Len(bv.Tasks, expected.numTasks, "unexpected number of tasks for build variant '%s'", bv.Name)
+ s.Len(bv.DisplayTasks, expected.numDisplayTasks, "unexpected number of display tasks for build variant '%s'", bv.DisplayName)
+
+ expected.found = true
+ expectedBVs[bv.Name] = expected
+ }
+ for bvName, expected := range expectedBVs {
+ s.True(expected.found, "did not find expected build variant '%s'", bvName)
+ }
+
+ expectedTasks := map[string]struct {
+ numCmds int
+ found bool
+ }{
+ "quokka": {numCmds: 2},
+ "pika": {numCmds: 1},
+ }
+ for _, tsk := range merged.Tasks {
+ expected, ok := expectedTasks[tsk.Name]
+ s.True(ok, "unexpected task '%s'", tsk.Name)
+ s.Len(tsk.Commands, expected.numCmds, "unexpected number of commands for task '%s'", tsk.Name)
+
+ expected.found = true
+ expectedTasks[tsk.Name] = expected
+ }
+ for taskName, expected := range expectedTasks {
+ s.True(expected.found, "did not find expected task '%s'", taskName)
+ }
+
+ expectedFuncs := map[string]struct {
+ numCmds int
+ found bool
+ }{
+ "brownie": {numCmds: 2},
+ "cookie": {numCmds: 1},
+ }
+ for funcName, funcCmds := range merged.Functions {
+ expected, ok := expectedFuncs[funcName]
+ s.True(ok, "unexpected function '%s'", funcName)
+ s.Len(funcCmds.List(), expected.numCmds, "unexpected number of commands for function '%s'", funcName)
+
+ expected.found = true
+ expectedFuncs[funcName] = expected
+ }
+ for funcName, expected := range expectedFuncs {
+ s.True(expected.found, "did not find expected function '%s'", funcName)
+ }
+
+ expectedTaskGroups := map[string]struct {
+ numTasks int
+ found bool
+ }{
+ "sea-bunny": {numTasks: 2},
+ "mola-mola": {numTasks: 1},
+ }
+ for _, tg := range merged.TaskGroups {
+ expected, ok := expectedTaskGroups[tg.Name]
+ s.True(ok, "unexpected task group '%s'", tg.Name)
+ s.Len(tg.Tasks, expected.numTasks, "unexpected number of tasks for task group '%s'", tg.Name)
+
+ expected.found = true
+ expectedTaskGroups[tg.Name] = expected
+ }
+ for tgName, expected := range expectedTaskGroups {
+ s.True(expected.found, "did not find expected task group '%s'", tgName)
+ }
+}
+
+func (s *GenerateSuite) TestMergeGeneratedProjectsWithNoTasks() {
+ projects := []GeneratedProject{smallGeneratedProject}
+ merged, err := MergeGeneratedProjects(projects)
+ s.Require().NoError(err)
+ s.Require().NotNil(merged)
+ s.Require().Len(merged.BuildVariants, 1)
+ s.Len(merged.BuildVariants[0].DisplayTasks, 1)
+}
+
func TestSimulateNewDependencyGraph(t *testing.T) {
defer func() {
assert.NoError(t, db.Clear(task.Collection))
@@ -1021,9 +1332,9 @@ func TestSimulateNewDependencyGraph(t *testing.T) {
project := &Project{
BuildVariants: []BuildVariant{
{Name: "bv0", Tasks: []BuildVariantTaskUnit{
- {Name: "generated", DependsOn: []TaskUnitDependency{{Name: "dependedOn", Variant: "bv0"}}},
- {Name: "dependedOn", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
- {Name: "generator"},
+ {Name: "generated", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "dependedOn", Variant: "bv0"}}},
+ {Name: "dependedOn", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
+ {Name: "generator", Variant: "bv0"},
}},
},
Tasks: []ProjectTask{
@@ -1051,8 +1362,8 @@ func TestSimulateNewDependencyGraph(t *testing.T) {
project := &Project{
BuildVariants: []BuildVariant{
{Name: "bv0", Tasks: []BuildVariantTaskUnit{
- {Name: "generated", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
- {Name: "generator"},
+ {Name: "generated", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
+ {Name: "generator", Variant: "bv0"},
}},
},
Tasks: []ProjectTask{
@@ -1082,9 +1393,9 @@ func TestSimulateNewDependencyGraph(t *testing.T) {
{
Name: "bv0",
Tasks: []BuildVariantTaskUnit{
- {Name: "generated"},
- {Name: "dependedOn", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
- {Name: "generator"},
+ {Name: "generated", Variant: "bv0"},
+ {Name: "dependedOn", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
+ {Name: "generator", Variant: "bv0"},
},
},
},
@@ -1115,8 +1426,8 @@ func TestSimulateNewDependencyGraph(t *testing.T) {
{
Name: "bv0",
Tasks: []BuildVariantTaskUnit{
- {Name: "generated", DependsOn: []TaskUnitDependency{{Name: "dependedOn", Variant: "bv0"}}},
- {Name: "dependedOn", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
+ {Name: "generated", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "dependedOn", Variant: "bv0"}}},
+ {Name: "dependedOn", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "generator", Variant: "bv0"}}},
{Name: "generator"},
},
},
@@ -1270,77 +1581,6 @@ func TestFilterInactiveTasks(t *testing.T) {
})
}
-func (s *GenerateSuite) TestMergeGeneratedProjectsWithNoTasks() {
- projects := []GeneratedProject{smallGeneratedProject}
- merged, err := MergeGeneratedProjects(projects)
- s.Require().NoError(err)
- s.Require().NotNil(merged)
- s.Require().Len(merged.BuildVariants, 1)
- s.Len(merged.BuildVariants[0].DisplayTasks, 1)
-}
-
-func TestUpdateParserProject(t *testing.T) {
- alreadyUpdatedTestName := "TaskAlreadyUpdatedParserProject"
- withZeroTestName := "WithZero"
- taskId := "tId"
- for testName, setupTest := range map[string]func(t *testing.T, v *Version, pp *ParserProject){
- "noParserProject": func(t *testing.T, v *Version, pp *ParserProject) {
- v.ConfigUpdateNumber = 5
- assert.NoError(t, v.Insert())
- },
- "ParserProjectMoreRecent": func(t *testing.T, v *Version, pp *ParserProject) {
- v.ConfigUpdateNumber = 1
- pp.ConfigUpdateNumber = 5
- assert.NoError(t, v.Insert())
- assert.NoError(t, pp.Insert())
- },
- "ConfigMostRecent": func(t *testing.T, v *Version, pp *ParserProject) {
- v.ConfigUpdateNumber = 5
- pp.ConfigUpdateNumber = 1
- assert.NoError(t, v.Insert())
- assert.NoError(t, pp.Insert())
- },
- withZeroTestName: func(t *testing.T, v *Version, pp *ParserProject) {
- v.ConfigUpdateNumber = 0
- assert.NoError(t, v.Insert())
- assert.NoError(t, pp.Insert())
- },
- alreadyUpdatedTestName: func(t *testing.T, v *Version, pp *ParserProject) {
- pp.UpdatedByGenerators = []string{taskId}
- pp.ConfigUpdateNumber = 1
- assert.NoError(t, v.Insert())
- assert.NoError(t, pp.Insert())
- },
- } {
- t.Run(testName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(VersionCollection, ParserProjectCollection))
- v := &Version{Id: "my-version"}
- pp := &ParserProject{Id: "my-version"}
- setupTest(t, v, pp)
- assert.NoError(t, updateParserProject(v, pp, taskId))
- v, err := VersionFindOneId(v.Id)
- assert.NoError(t, err)
- require.NotNil(t, v)
- pp, err = ParserProjectFindOneById(v.Id)
- assert.NoError(t, err)
- require.NotNil(t, pp)
- assert.Len(t, pp.UpdatedByGenerators, 1)
- assert.Contains(t, pp.UpdatedByGenerators, taskId)
- if testName == withZeroTestName {
- assert.Equal(t, 0, v.ConfigUpdateNumber)
- assert.Equal(t, 1, pp.ConfigUpdateNumber)
- return
- } else if testName == alreadyUpdatedTestName {
- // Not changed because we've already updated.
- assert.Equal(t, 1, pp.ConfigUpdateNumber)
- return
- }
- assert.NotEqual(t, 6, v.ConfigUpdateNumber)
- assert.Equal(t, 6, pp.ConfigUpdateNumber)
- })
- }
-}
-
func TestAddDependencies(t *testing.T) {
require.NoError(t, db.Clear(task.Collection))
diff --git a/model/github_hook.go b/model/github_hook.go
index b86403bcf5c..be6418c4802 100644
--- a/model/github_hook.go
+++ b/model/github_hook.go
@@ -2,6 +2,7 @@ package model
import (
"context"
+ "time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
@@ -24,7 +25,7 @@ type GithubHook struct {
Repo string `bson:"repo"`
}
-//nolint: deadcode, megacheck, unused
+//nolint:megacheck,unused
var (
hookIDKey = bsonutil.MustHaveTag(GithubHook{}, "HookID")
ownerKey = bsonutil.MustHaveTag(GithubHook{}, "Owner")
@@ -84,7 +85,9 @@ func FindGithubHookByID(hookID int) (*GithubHook, error) {
}
func SetupNewGithubHook(ctx context.Context, settings evergreen.Settings, owner string, repo string) (*GithubHook, error) {
- respHook, err := thirdparty.CreateGithubHook(ctx, settings, owner, repo)
+ githubCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
+ defer cancel()
+ respHook, err := thirdparty.CreateGithubHook(githubCtx, settings, owner, repo)
if err != nil {
return nil, err
}
@@ -103,7 +106,9 @@ func SetupNewGithubHook(ctx context.Context, settings evergreen.Settings, owner
}
func GetExistingGithubHook(ctx context.Context, settings evergreen.Settings, owner, repo string) (*GithubHook, error) {
- hook, err := thirdparty.GetExistingGithubHook(ctx, settings, owner, repo)
+ githubCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
+ defer cancel()
+ hook, err := thirdparty.GetExistingGithubHook(githubCtx, settings, owner, repo)
if err != nil {
return nil, err
}
diff --git a/model/host/counters.go b/model/host/counters.go
index 73ead66458a..dc0ee56fc09 100644
--- a/model/host/counters.go
+++ b/model/host/counters.go
@@ -58,9 +58,10 @@ func (h *Host) IncContainerBuildAttempt() error {
return nil
}
-func (h *Host) IncIdleTime(dur time.Duration) error {
- if dur < 0 {
- return errors.Errorf("cannot increment idle time by a negative duration %s", dur)
+// IncIdleTime increments the host's TotalIdleTime. Noop if idleTime is non-positive.
+func (h *Host) IncIdleTime(idleTime time.Duration) error {
+ if idleTime <= 0 {
+ return nil
}
query := bson.M{
@@ -70,7 +71,7 @@ func (h *Host) IncIdleTime(dur time.Duration) error {
change := adb.Change{
ReturnNew: true,
Update: bson.M{
- "$inc": bson.M{TotalIdleTimeKey: dur},
+ "$inc": bson.M{TotalIdleTimeKey: idleTime},
},
}
diff --git a/model/host/db.go b/model/host/db.go
index 7c2f4ba2b04..11b0fcf19db 100644
--- a/model/host/db.go
+++ b/model/host/db.go
@@ -4,7 +4,6 @@ import (
"context"
"time"
- "github.com/evergreen-ci/certdepot"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model/build"
@@ -45,6 +44,7 @@ var (
DisplayNameKey = bsonutil.MustHaveTag(Host{}, "DisplayName")
RunningTaskFullKey = bsonutil.MustHaveTag(Host{}, "RunningTaskFull")
RunningTaskKey = bsonutil.MustHaveTag(Host{}, "RunningTask")
+ RunningTaskExecutionKey = bsonutil.MustHaveTag(Host{}, "RunningTaskExecution")
RunningTaskGroupKey = bsonutil.MustHaveTag(Host{}, "RunningTaskGroup")
RunningTaskGroupOrderKey = bsonutil.MustHaveTag(Host{}, "RunningTaskGroupOrder")
RunningTaskBuildVariantKey = bsonutil.MustHaveTag(Host{}, "RunningTaskBuildVariant")
@@ -76,6 +76,7 @@ var (
ProvisionOptionsKey = bsonutil.MustHaveTag(Host{}, "ProvisionOptions")
TaskCountKey = bsonutil.MustHaveTag(Host{}, "TaskCount")
StartTimeKey = bsonutil.MustHaveTag(Host{}, "StartTime")
+ BillingStartTimeKey = bsonutil.MustHaveTag(Host{}, "BillingStartTime")
AgentStartTimeKey = bsonutil.MustHaveTag(Host{}, "AgentStartTime")
TotalIdleTimeKey = bsonutil.MustHaveTag(Host{}, "TotalIdleTime")
HasContainersKey = bsonutil.MustHaveTag(Host{}, "HasContainers")
@@ -104,6 +105,7 @@ var (
VolumeExpirationKey = bsonutil.MustHaveTag(Volume{}, "Expiration")
VolumeNoExpirationKey = bsonutil.MustHaveTag(Volume{}, "NoExpiration")
VolumeHostKey = bsonutil.MustHaveTag(Volume{}, "Host")
+ VolumeMigratingKey = bsonutil.MustHaveTag(Volume{}, "Migrating")
VolumeAttachmentIDKey = bsonutil.MustHaveTag(VolumeAttachment{}, "VolumeID")
VolumeDeviceNameKey = bsonutil.MustHaveTag(VolumeAttachment{}, "DeviceName")
)
@@ -114,16 +116,6 @@ var (
HostsByDistroRunningHostsCountKey = bsonutil.MustHaveTag(IdleHostsByDistroID{}, "RunningHostsCount")
)
-// Constants for bson struct tags.
-var (
- CertUserIDKey = bsonutil.MustHaveTag(certdepot.User{}, "ID")
- CertUserCertKey = bsonutil.MustHaveTag(certdepot.User{}, "Cert")
- CertUserPrivateKeyKey = bsonutil.MustHaveTag(certdepot.User{}, "PrivateKey")
- CertUserCertReqKey = bsonutil.MustHaveTag(certdepot.User{}, "CertReq")
- CertUserCertRevocListKey = bsonutil.MustHaveTag(certdepot.User{}, "CertRevocList")
- CertUserTTLKey = bsonutil.MustHaveTag(certdepot.User{}, "TTL")
-)
-
// === Queries ===
// All is a query that returns all hosts
@@ -228,10 +220,11 @@ func runningHostsQuery(distroID string) bson.M {
return query
}
-func startedTaskHostsQuery(distroID string) bson.M {
+func idleStartedTaskHostsQuery(distroID string) bson.M {
query := bson.M{
- StatusKey: bson.M{"$in": evergreen.StartedHostStatus},
- StartedByKey: evergreen.User,
+ StatusKey: bson.M{"$in": evergreen.StartedHostStatus},
+ StartedByKey: evergreen.User,
+ RunningTaskKey: bson.M{"$exists": false},
}
if distroID != "" {
query[bsonutil.GetDottedKeyName(DistroKey, distro.IdKey)] = distroID
@@ -265,16 +258,13 @@ func CountAllRunningDynamicHosts() (int, error) {
return num, errors.Wrap(err, "counting running dynamic hosts")
}
-func CountStartedTaskHosts() (int, error) {
- num, err := Count(db.Query(startedTaskHostsQuery("")))
+// CountIdleStartedTaskHosts returns the count of task hosts that are starting
+// and not currently running a task.
+func CountIdleStartedTaskHosts() (int, error) {
+ num, err := Count(db.Query(idleStartedTaskHostsQuery("")))
return num, errors.Wrap(err, "counting starting hosts")
}
-func CountStartedTaskHostsForDistro(distroID string) (int, error) {
- num, err := Count(db.Query(startedTaskHostsQuery(distroID)))
- return num, errors.Wrap(err, "counting started task hosts")
-}
-
// IdleHostsWithDistroID, given a distroID, returns a slice of all idle hosts in that distro
func IdleHostsWithDistroID(distroID string) ([]Host, error) {
q := idleHostsQuery(distroID)
@@ -404,21 +394,6 @@ func allHostsSpawnedByFinishedBuilds() ([]Host, error) {
return hosts, nil
}
-// ByUnprovisionedSince produces a query that returns all hosts
-// Evergreen never finished setting up that were created before
-// the given time.
-func ByUnprovisionedSince(threshold time.Time) db.Q {
- return db.Query(bson.M{
- "$or": []bson.M{
- bson.M{ProvisionedKey: false},
- bson.M{StatusKey: evergreen.HostProvisioning},
- },
- CreateTimeKey: bson.M{"$lte": threshold},
- StatusKey: bson.M{"$ne": evergreen.HostTerminated},
- StartedByKey: evergreen.User,
- })
-}
-
// ByTaskSpec returns a query that finds all running hosts that are running a
// task with the given group, buildvariant, project, and version.
func ByTaskSpec(group, buildVariant, project, version string) db.Q {
@@ -487,17 +462,6 @@ var IsUninitialized = db.Query(
bson.M{StatusKey: evergreen.HostUninitialized},
)
-// Starting returns a query that finds hosts that we do not yet know to be running.
-func Starting() db.Q {
- return db.Query(bson.M{StatusKey: evergreen.HostStarting})
-}
-
-// Provisioning returns a query used by the hostinit process to determine hosts that are
-// started according to the cloud provider, but have not yet been provisioned by Evergreen.
-func Provisioning() db.Q {
- return db.Query(bson.M{StatusKey: evergreen.HostProvisioning})
-}
-
// FindByProvisioning finds all hosts that are not yet provisioned by the app
// server.
func FindByProvisioning() ([]Host, error) {
@@ -546,15 +510,6 @@ func FindByNeedsToRestartJasper() ([]Host, error) {
}))
}
-// IsRunningAndSpawned is a query that returns all running hosts
-// spawned by an Evergreen user.
-var IsRunningAndSpawned = db.Query(
- bson.M{
- StartedByKey: bson.M{"$ne": evergreen.User},
- StatusKey: bson.M{"$ne": evergreen.HostTerminated},
- },
-)
-
// IsRunningTask is a query that returns all running hosts with a running task
var IsRunningTask = db.Query(
bson.M{
@@ -638,16 +593,6 @@ func FindOneByJasperCredentialsID(id string) (*Host, error) {
return h, nil
}
-// ByRunningTaskId returns a host running the task with the given id.
-func ByRunningTaskId(taskId string) db.Q {
- return db.Query(bson.D{{Key: RunningTaskKey, Value: taskId}})
-}
-
-var AllStatic = db.Query(
- bson.M{
- ProviderKey: evergreen.HostTypeStatic,
- })
-
// IsIdle is a query that returns all running Evergreen hosts with no task.
var IsIdle = db.Query(
bson.M{
@@ -699,98 +644,6 @@ func ByExpiringBetween(lowerBound time.Time, upperBound time.Time) db.Q {
})
}
-type StaleTaskReason int
-
-const (
- TaskHeartbeatPastCutoff StaleTaskReason = iota
- TaskNoHeartbeatSinceDispatch
- TaskUndispatchedHasHeartbeat
-)
-
-// StateRunningTasks returns tasks documents that are currently run by a host and stale
-func FindStaleRunningTasks(cutoff time.Duration, reason StaleTaskReason) ([]task.Task, error) {
- pipeline := []bson.M{}
- pipeline = append(pipeline, bson.M{
- "$match": bson.M{
- RunningTaskKey: bson.M{
- "$exists": true,
- },
- StatusKey: bson.M{
- "$in": evergreen.UpHostStatus,
- },
- },
- })
- pipeline = append(pipeline, bson.M{
- "$lookup": bson.M{
- "from": task.Collection,
- "localField": RunningTaskKey,
- "foreignField": task.IdKey,
- "as": "_task",
- },
- })
- pipeline = append(pipeline, bson.M{
- "$project": bson.M{
- "_task": 1,
- "_id": 0,
- },
- })
- pipeline = append(pipeline, bson.M{
- "$replaceRoot": bson.M{
- "newRoot": bson.M{
- "$mergeObjects": []interface{}{
- bson.M{"$arrayElemAt": []interface{}{"$_task", 0}},
- "$$ROOT",
- },
- },
- },
- })
- pipeline = append(pipeline, bson.M{
- "$project": bson.M{
- "_task": 0,
- },
- })
- var reasonQuery bson.M
- switch reason {
- case TaskHeartbeatPastCutoff:
- reasonQuery = bson.M{
- task.StatusKey: evergreen.TaskStarted,
- "$and": []bson.M{
- {task.LastHeartbeatKey: bson.M{"$lte": time.Now().Add(-cutoff)}},
- {task.LastHeartbeatKey: bson.M{"$ne": utility.ZeroTime}},
- },
- }
- case TaskNoHeartbeatSinceDispatch:
- reasonQuery = bson.M{
- task.StatusKey: evergreen.TaskDispatched,
- task.DispatchTimeKey: bson.M{"$lte": time.Now().Add(-2 * cutoff)},
- }
- case TaskUndispatchedHasHeartbeat:
- reasonQuery = bson.M{
- task.StatusKey: evergreen.TaskUndispatched,
- "$and": []bson.M{
- {task.LastHeartbeatKey: bson.M{"$lte": time.Now().Add(-cutoff)}},
- {task.LastHeartbeatKey: bson.M{"$ne": utility.ZeroTime}},
- },
- }
- }
- pipeline = append(pipeline, bson.M{
- "$match": reasonQuery,
- })
- pipeline = append(pipeline, bson.M{
- "$project": bson.M{
- task.IdKey: 1,
- task.ExecutionKey: 1,
- },
- })
-
- tasks := []task.Task{}
- err := db.Aggregate(Collection, pipeline, &tasks)
- if err != nil {
- return nil, errors.Wrap(err, "finding stale running tasks")
- }
- return tasks, nil
-}
-
// NeedsAgentDeploy finds hosts which need the agent to be deployed because
// either they do not have an agent yet or their agents have not communicated
// recently.
@@ -963,7 +816,7 @@ func MarkStaleBuildingAsFailed(distroID string) error {
}
for _, id := range ids {
- event.LogHostStartError(id, "stale building host took too long to start")
+ event.LogHostCreationFailed(id, "stale building host took too long to start")
grip.Info(message.Fields{
"message": "stale building host took too long to start",
"host_id": id,
@@ -990,6 +843,20 @@ func FindOneId(id string) (*Host, error) {
return FindOne(ById(id))
}
+// FindOneByTaskIdAndExecution returns a single host with the given running task ID and execution.
+func FindOneByTaskIdAndExecution(id string, execution int) (*Host, error) {
+ h := &Host{}
+ query := db.Query(bson.M{
+ RunningTaskKey: id,
+ RunningTaskExecutionKey: execution,
+ })
+ err := db.FindOneQ(Collection, query, h)
+ if adb.ResultsNotFound(err) {
+ return nil, nil
+ }
+ return h, err
+}
+
// FindOneByIdOrTag finds a host where the given id is stored in either the _id or tag field.
// (The tag field is used for the id from the host's original intent host.)
func FindOneByIdOrTag(id string) (*Host, error) {
@@ -1257,7 +1124,7 @@ func (h *Host) AddVolumeToHost(newVolume *VolumeAttachment) error {
message.Fields{
"host_id": h.Id,
"volume_id": newVolume.VolumeID,
- "op": "host volume acocunting",
+ "op": "host volume accounting",
"message": "problem setting host info on volume records",
}))
@@ -1402,8 +1269,6 @@ func StartingHostsByClient(limit int) (map[ClientOptions][]Host, error) {
// new one. While the atomic swap is safer than doing it non-atomically, it is
// not sufficient to guarantee application correctness, because other threads
// may still be using the old host document.
-// TODO (EVG-15875): set a field containing the external identifier on the host
-// document rather than do this host document swap logic.
func UnsafeReplace(ctx context.Context, env evergreen.Environment, idToRemove string, toInsert *Host) error {
if idToRemove == toInsert.Id {
return nil
@@ -1416,32 +1281,23 @@ func UnsafeReplace(ctx context.Context, env evergreen.Environment, idToRemove st
defer sess.EndSession(ctx)
replaceHost := func(sessCtx mongo.SessionContext) (interface{}, error) {
- if err := RemoveStrict(idToRemove); err != nil {
+ if err := RemoveStrict(sessCtx, env, idToRemove); err != nil {
return nil, errors.Wrapf(err, "removing old host '%s'", idToRemove)
}
- if err := toInsert.Insert(); err != nil {
+ if err := toInsert.InsertWithContext(sessCtx, env); err != nil {
return nil, errors.Wrapf(err, "inserting new host '%s'", toInsert.Id)
}
return nil, nil
}
txnStart := time.Now()
- _, err = sess.WithTransaction(ctx, replaceHost)
- if err != nil {
- grip.Error(message.WrapError(err, message.Fields{
- "message": "replacing old host with new host in a transaction",
- "jira_ticket": "EVG-15022",
- "old_host_id": idToRemove,
- "new_host_id": toInsert.Id,
- "distro_id": toInsert.Distro.Id,
- "duration": time.Since(txnStart),
- }))
+ if _, err = sess.WithTransaction(ctx, replaceHost); err != nil {
return errors.Wrap(err, "atomic removal of old host and insertion of new host")
}
grip.Info(message.Fields{
- "message": "replaced host document",
+ "message": "successfully replaced host document",
"host_id": toInsert.Id,
"host_tag": toInsert.Tag,
"distro": toInsert.Distro.Id,
diff --git a/model/host/host.go b/model/host/host.go
index 08a32c2fe16..5a668193e55 100644
--- a/model/host/host.go
+++ b/model/host/host.go
@@ -32,7 +32,8 @@ import (
)
type Host struct {
- Id string `bson:"_id" json:"id"`
+ Id string `bson:"_id" json:"id"`
+ // Host is the DNS name of the host.
Host string `bson:"host_id" json:"host"`
User string `bson:"user" json:"user"`
Secret string `bson:"secret" json:"secret"`
@@ -61,6 +62,7 @@ type Host struct {
// the task that is currently running on the host
RunningTask string `bson:"running_task,omitempty" json:"running_task,omitempty"`
+ RunningTaskExecution int `bson:"running_task_execution" json:"running_task_execution"`
RunningTaskBuildVariant string `bson:"running_task_bv,omitempty" json:"running_task_bv,omitempty"`
RunningTaskVersion string `bson:"running_task_version,omitempty" json:"running_task_version,omitempty"`
RunningTaskProject string `bson:"running_task_project,omitempty" json:"running_task_project,omitempty"`
@@ -83,6 +85,8 @@ type Host struct {
// creation is when the host document was inserted to the DB, start is when it was started on the cloud provider
CreationTime time.Time `bson:"creation_time" json:"creation_time"`
StartTime time.Time `bson:"start_time" json:"start_time"`
+ // BillingStartTime is when billing started for the host.
+ BillingStartTime time.Time `bson:"billing_start_time" json:"billing_start_time"`
// AgentStartTime is when the agent first initiates contact with the app
// server.
AgentStartTime time.Time `bson:"agent_start_time" json:"agent_start_time"`
@@ -193,7 +197,6 @@ type VolumeAttachment struct {
VolumeID string `bson:"volume_id" json:"volume_id"`
DeviceName string `bson:"device_name" json:"device_name"`
IsHome bool `bson:"is_home" json:"is_home"`
- HostID string `bson:"host_id" json:"host_id"`
}
// PortMap maps container port to the parent host ports (container port is formatted as /)
@@ -213,7 +216,9 @@ func GetPortMap(m nat.PortMap) PortMap {
return res
}
-// DockerOptions contains options for starting a container
+// DockerOptions contains options for starting a container. This fulfills the
+// ProviderSettings interface to populate container information from the distro
+// settings.
type DockerOptions struct {
// Optional parameters to define a registry name and authentication
RegistryName string `mapstructure:"docker_registry_name" bson:"docker_registry_name,omitempty" json:"docker_registry_name,omitempty"`
@@ -237,6 +242,8 @@ type DockerOptions struct {
EnvironmentVars []string `mapstructure:"environment_vars" bson:"environment_vars,omitempty" json:"environment_vars,omitempty"`
}
+// FromDistroSettings loads the Docker container options from the provider
+// settings.
func (opts *DockerOptions) FromDistroSettings(d distro.Distro, _ string) error {
if len(d.ProviderSettingsList) != 0 {
bytes, err := d.ProviderSettingsList[0].MarshalBSON()
@@ -381,26 +388,58 @@ func (h *Host) GetTaskGroupString() string {
// IdleTime returns how long has this host been idle
func (h *Host) IdleTime() time.Duration {
-
- // if the host is currently running a task, it is not idle
+ // If the host is currently running a task, it is not idle.
if h.RunningTask != "" {
- return time.Duration(0)
+ return 0
}
- // if the host has run a task before, then the idle time is just the time
- // passed since the last task finished
+ // If the host is not running a task then the idle time is the time
+ // elapsed since the last task finished.
+ return h.SinceLastTaskCompletion()
+}
+
+// SinceLastTaskCompletion returns the duration since the last task to run on the host
+// completed or, if no task has run, the host's uptime.
+func (h *Host) SinceLastTaskCompletion() time.Duration {
+ // If the host has run a task, return the time the last task finished running.
if h.LastTask != "" {
return time.Since(h.LastTaskCompletedTime)
}
- // if the host has been provisioned, the idle time is how long it has been provisioned
- if !utility.IsZeroTime(h.ProvisionTime) {
- return time.Since(h.ProvisionTime)
+ // If the host has not yet run a task, return how long it has been billable.
+ if !utility.IsZeroTime(h.BillingStartTime) {
+ return time.Since(h.BillingStartTime)
}
- // if the host has not run a task before, the idle time is just
- // how long is has been since the host was created
- return time.Since(h.CreationTime)
+ // If the host hasn't run a task and its billing start time is not set, return
+ // how long it has been since the host was started.
+ return time.Since(h.StartTime)
+}
+
+func (h *Host) TaskStartMessage() message.Fields {
+ msg := message.Fields{
+ "stat": "host-start-task",
+ "distro": h.Distro.Id,
+ "provider": h.Distro.Provider,
+ "provisioning": h.Distro.BootstrapSettings.Method,
+ "host_id": h.Id,
+ "status": h.Status,
+ "since_last_task_secs": h.SinceLastTaskCompletion().Seconds(),
+ "spawn_host": h.StartedBy != evergreen.User && !h.SpawnOptions.SpawnedByTask,
+ "task_spawn_host": h.SpawnOptions.SpawnedByTask,
+ "has_containers": h.HasContainers,
+ "task_host": h.StartedBy == evergreen.User && !h.HasContainers,
+ }
+
+ if strings.HasPrefix(h.Distro.Provider, "ec2") {
+ msg["provider"] = "ec2"
+ }
+
+ if h.Provider != evergreen.ProviderNameStatic {
+ msg["host_task_count"] = h.TaskCount
+ }
+
+ return msg
}
func (h *Host) GetAMI() string {
@@ -701,6 +740,17 @@ func (h *Host) CreateSecret() error {
return nil
}
+func (h *Host) SetBillingStartTime(startTime time.Time) error {
+ if err := UpdateOne(
+ bson.M{IdKey: h.Id},
+ bson.M{"$set": bson.M{BillingStartTimeKey: startTime}},
+ ); err != nil {
+ return errors.Wrap(err, "setting billing start time")
+ }
+ h.BillingStartTime = startTime
+ return nil
+}
+
func (h *Host) SetAgentStartTime() error {
now := time.Now()
if err := UpdateOne(
@@ -1294,8 +1344,9 @@ func (h *Host) ClearRunningAndSetLastTask(t *task.Task) error {
now := time.Now()
err := UpdateOne(
bson.M{
- IdKey: h.Id,
- RunningTaskKey: h.RunningTask,
+ IdKey: h.Id,
+ RunningTaskKey: h.RunningTask,
+ RunningTaskExecutionKey: h.RunningTaskExecution,
},
bson.M{
"$set": bson.M{
@@ -1308,6 +1359,7 @@ func (h *Host) ClearRunningAndSetLastTask(t *task.Task) error {
},
"$unset": bson.M{
RunningTaskKey: 1,
+ RunningTaskExecutionKey: 1,
RunningTaskGroupKey: 1,
RunningTaskGroupOrderKey: 1,
RunningTaskBuildVariantKey: 1,
@@ -1320,17 +1372,19 @@ func (h *Host) ClearRunningAndSetLastTask(t *task.Task) error {
return err
}
- event.LogHostRunningTaskCleared(h.Id, h.RunningTask)
+ event.LogHostRunningTaskCleared(h.Id, h.RunningTask, h.RunningTaskExecution)
grip.Info(message.Fields{
"message": "cleared host running task and set last task",
"host_id": h.Id,
"host_tag": h.Tag,
"distro": h.Distro.Id,
"running_task_id": h.RunningTask,
+ "task_execution": h.RunningTaskExecution,
"last_task_id": t.Id,
})
h.RunningTask = ""
+ h.RunningTaskExecution = 0
h.RunningTaskBuildVariant = ""
h.RunningTaskVersion = ""
h.RunningTaskProject = ""
@@ -1346,39 +1400,64 @@ func (h *Host) ClearRunningAndSetLastTask(t *task.Task) error {
return nil
}
-// ClearRunningTask unsets the running task on the host.
+// ClearRunningTask unsets the running task on the host and logs an event
+// indicating it is no longer running the task.
func (h *Host) ClearRunningTask() error {
- err := UpdateOne(
- bson.M{
- IdKey: h.Id,
- },
- bson.M{
- "$unset": bson.M{
- RunningTaskKey: 1,
- RunningTaskGroupKey: 1,
- RunningTaskGroupOrderKey: 1,
- RunningTaskBuildVariantKey: 1,
- RunningTaskVersionKey: 1,
- RunningTaskProjectKey: 1,
- },
- })
-
- if err != nil {
+ hadRunningTask := h.RunningTask != ""
+ doUpdate := func(update bson.M) error {
+ return UpdateOne(bson.M{IdKey: h.Id}, update)
+ }
+ if err := h.clearRunningTaskWithFunc(doUpdate); err != nil {
return err
}
- if h.RunningTask != "" {
- event.LogHostRunningTaskCleared(h.Id, h.RunningTask)
+ if hadRunningTask {
+ event.LogHostRunningTaskCleared(h.Id, h.RunningTask, h.RunningTaskExecution)
grip.Info(message.Fields{
- "message": "cleared host running task",
- "host_id": h.Id,
- "host_tag": h.Tag,
- "distro": h.Distro.Id,
- "task_id": h.RunningTask,
+ "message": "cleared host running task",
+ "host_id": h.Id,
+ "host_tag": h.Tag,
+ "distro": h.Distro.Id,
+ "task_id": h.RunningTask,
+ "task_execution": h.RunningTaskExecution,
})
}
+ return nil
+}
+
+// ClearRunningTaskWithContext unsets the running task on the log. It does not
+// log an event for clearing the task.
+func (h *Host) ClearRunningTaskWithContext(ctx context.Context, env evergreen.Environment) error {
+ doUpdate := func(update bson.M) error {
+ _, err := env.DB().Collection(Collection).UpdateByID(ctx, h.Id, update)
+ return err
+ }
+ return h.clearRunningTaskWithFunc(doUpdate)
+}
+
+func (h *Host) clearRunningTaskWithFunc(doUpdate func(update bson.M) error) error {
+ if h.RunningTask == "" {
+ return nil
+ }
+
+ update := bson.M{
+ "$unset": bson.M{
+ RunningTaskKey: 1,
+ RunningTaskExecutionKey: 1,
+ RunningTaskGroupKey: 1,
+ RunningTaskGroupOrderKey: 1,
+ RunningTaskBuildVariantKey: 1,
+ RunningTaskVersionKey: 1,
+ RunningTaskProjectKey: 1,
+ },
+ }
+ if err := doUpdate(update); err != nil {
+ return err
+ }
+
h.RunningTask = ""
+ h.RunningTaskExecution = 0
h.RunningTaskBuildVariant = ""
h.RunningTaskVersion = ""
h.RunningTaskProject = ""
@@ -1388,16 +1467,14 @@ func (h *Host) ClearRunningTask() error {
return nil
}
-// UpdateRunningTask updates the running task in the host document, returns
-// - true, nil on success
-// - false, nil on duplicate key error, task is already assigned to another host
-// - false, error on all other errors
-func (h *Host) UpdateRunningTask(t *task.Task) (bool, error) {
+// UpdateRunningTaskWithContext updates the running task for the host. It does
+// not log an event for task assignment.
+func (h *Host) UpdateRunningTaskWithContext(ctx context.Context, env evergreen.Environment, t *task.Task) error {
if t == nil {
- return false, errors.New("received nil task, cannot update")
+ return errors.New("received nil task, cannot update")
}
if t.Id == "" {
- return false, errors.New("task has empty task ID, cannot update")
+ return errors.New("task has empty task ID, cannot update")
}
statuses := []string{evergreen.HostRunning}
@@ -1406,7 +1483,7 @@ func (h *Host) UpdateRunningTask(t *task.Task) (bool, error) {
if h.Distro.BootstrapSettings.Method == distro.BootstrapMethodUserData {
statuses = append(statuses, evergreen.HostStarting)
}
- selector := bson.M{
+ query := bson.M{
IdKey: h.Id,
StatusKey: bson.M{"$in": statuses},
RunningTaskKey: bson.M{"$exists": false},
@@ -1415,6 +1492,7 @@ func (h *Host) UpdateRunningTask(t *task.Task) (bool, error) {
update := bson.M{
"$set": bson.M{
RunningTaskKey: t.Id,
+ RunningTaskExecutionKey: t.Execution,
RunningTaskGroupKey: t.TaskGroup,
RunningTaskGroupOrderKey: t.TaskGroupOrder,
RunningTaskBuildVariantKey: t.BuildVariant,
@@ -1423,28 +1501,24 @@ func (h *Host) UpdateRunningTask(t *task.Task) (bool, error) {
},
}
- err := UpdateOne(selector, update)
- if err != nil {
- if db.IsDuplicateKey(err) {
- grip.Debug(message.Fields{
- "message": "found duplicate running task",
- "task": t.Id,
- "host_id": h.Id,
- })
- return false, nil
- }
- return false, errors.Wrapf(err, "setting running task to '%s' for host '%s'", t.Id, h.Id)
+ if _, err := env.DB().Collection(Collection).UpdateOne(ctx, query, update); err != nil {
+ grip.DebugWhen(db.IsDuplicateKey(err), message.WrapError(err, message.Fields{
+ "message": "found duplicate running task",
+ "task": t.Id,
+ "host_id": h.Id,
+ }))
+ return err
}
- event.LogHostRunningTaskSet(h.Id, t.Id)
- grip.Info(message.Fields{
- "message": "host running task set",
- "host_id": h.Id,
- "host_tag": h.Tag,
- "task_id": t.Id,
- "distro": h.Distro.Id,
- })
- return true, nil
+ h.RunningTask = t.Id
+ h.RunningTaskExecution = t.Execution
+ h.RunningTaskGroup = t.TaskGroup
+ h.RunningTaskGroupOrder = t.TaskGroupOrder
+ h.RunningTaskBuildVariant = t.BuildVariant
+ h.RunningTaskVersion = t.Version
+ h.RunningTaskProject = t.Project
+
+ return nil
}
// SetAgentRevision sets the updated agent revision for the host
@@ -1625,6 +1699,24 @@ func (h *Host) CacheHostData() error {
}
func (h *Host) Insert() error {
+ if err := db.Insert(Collection, h); err != nil {
+ return errors.Wrap(err, "inserting host")
+ }
+ h.logHostCreated()
+ return nil
+}
+
+// InsertWithContext is the same as Insert but accepts a context for the
+// operation.
+func (h *Host) InsertWithContext(ctx context.Context, env evergreen.Environment) error {
+ if _, err := env.DB().Collection(Collection).InsertOne(ctx, h); err != nil {
+ return errors.Wrap(err, "inserting host")
+ }
+ h.logHostCreated()
+ return nil
+}
+
+func (h *Host) logHostCreated() {
event.LogHostCreated(h.Id)
grip.Info(message.Fields{
"message": "host created",
@@ -1632,9 +1724,14 @@ func (h *Host) Insert() error {
"host_tag": h.Tag,
"distro": h.Distro.Id,
})
- return db.Insert(Collection, h)
}
+// Remove removes the host document from the DB.
+// While it's fine to use this in tests, this should generally not be called in
+// production code since deleting the host document makes it difficult to trace
+// what happened to it. Instead, it's preferable to set a host to a failure
+// state (e.g. building-failed, decommissioned) so that it can be cleaned up by
+// host termination.
func (h *Host) Remove() error {
return db.Remove(
Collection,
@@ -1644,11 +1741,9 @@ func (h *Host) Remove() error {
)
}
-// RemoveStrict deletes a host and errors if the host is not found
-func RemoveStrict(id string) error {
- ctx, cancel := evergreen.GetEnvironment().Context()
- defer cancel()
- result, err := evergreen.GetEnvironment().DB().Collection(Collection).DeleteOne(ctx, bson.M{IdKey: id})
+// RemoveStrict deletes a host and errors if the host is not found.
+func RemoveStrict(ctx context.Context, env evergreen.Environment, id string) error {
+ result, err := env.DB().Collection(Collection).DeleteOne(ctx, bson.M{IdKey: id})
if err != nil {
return err
}
@@ -2126,7 +2221,7 @@ func FindHostsSpawnedByBuild(buildID string) ([]Host, error) {
}
// FindTerminatedHostsRunningTasks finds all hosts that were running tasks when
-// they were either terminated or needed to be re-provisioned.
+// they were terminated.
func FindTerminatedHostsRunningTasks() ([]Host, error) {
hosts, err := Find(db.Query(bson.M{
StatusKey: evergreen.HostTerminated,
@@ -2657,6 +2752,22 @@ func (h *Host) MarkShouldExpire(expireOnValue string) error {
)
}
+// UnsetHomeVolume disassociates a home volume from a (stopped) host.
+// This is for internal use, and should only be used on hosts that
+// will be terminated imminently; otherwise, the host will fail to boot.
+func (h *Host) UnsetHomeVolume() error {
+ err := UpdateOne(
+ bson.M{IdKey: h.Id},
+ bson.M{"$set": bson.M{HomeVolumeIDKey: ""}},
+ )
+ if err != nil {
+ return err
+ }
+
+ h.HomeVolumeID = ""
+ return nil
+}
+
func (h *Host) SetHomeVolumeID(volumeID string) error {
h.HomeVolumeID = volumeID
return UpdateOne(bson.M{
@@ -2700,6 +2811,33 @@ func FindHostWithVolume(volumeID string) (*Host, error) {
return FindOne(q)
}
+// FindUpHostWithHomeVolume finds the up host associated with the
+// specified home volume ID.
+func FindUpHostWithHomeVolume(homeVolumeID string) (*Host, error) {
+ q := db.Query(
+ bson.M{
+ StatusKey: bson.M{"$in": evergreen.UpHostStatus},
+ UserHostKey: true,
+ HomeVolumeIDKey: homeVolumeID,
+ },
+ )
+ return FindOne(q)
+}
+
+// FindLatestTerminatedHostWithHomeVolume finds the user's most recently terminated host
+// associated with the specified home volume ID.
+func FindLatestTerminatedHostWithHomeVolume(homeVolumeID string, startedBy string) (*Host, error) {
+ q := db.Query(
+ bson.M{
+ StatusKey: evergreen.HostTerminated,
+ StartedByKey: startedBy,
+ UserHostKey: true,
+ HomeVolumeIDKey: homeVolumeID,
+ },
+ ).Sort([]string{"-" + TerminationTimeKey})
+ return FindOne(q)
+}
+
// FindStaticNeedsNewSSHKeys finds all static hosts that do not have the same
// set of SSH keys as those in the global settings.
func FindStaticNeedsNewSSHKeys(settings *evergreen.Settings) ([]Host, error) {
diff --git a/model/host/host_test.go b/model/host/host_test.go
index e80550355e6..eb855004cb4 100644
--- a/model/host/host_test.go
+++ b/model/host/host_test.go
@@ -289,7 +289,7 @@ func TestUpdatingHostStatus(t *testing.T) {
func TestSetStatusAndFields(t *testing.T) {
defer func() {
- assert.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(Collection, event.EventCollection))
}()
for tName, tCase := range map[string]func(t *testing.T, h *Host){
"FailsIfHostDoesNotExist": func(t *testing.T, h *Host) {
@@ -376,7 +376,7 @@ func TestSetStatusAndFields(t *testing.T) {
},
} {
t.Run(tName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ require.NoError(t, db.ClearCollections(Collection, event.EventCollection))
h := Host{
Id: "host",
Status: evergreen.HostRunning,
@@ -682,6 +682,26 @@ func TestHostCreateSecret(t *testing.T) {
})
}
+func TestHostSetBillingStartTime(t *testing.T) {
+ require.NoError(t, db.Clear(Collection))
+ defer func() {
+ assert.NoError(t, db.Clear(Collection))
+ }()
+
+ h := &Host{
+ Id: "id",
+ }
+ require.NoError(t, h.Insert())
+
+ now := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
+ require.NoError(t, h.SetBillingStartTime(now))
+ assert.True(t, now.Equal(h.BillingStartTime))
+
+ dbHost, err := FindOneId(h.Id)
+ require.NoError(t, err)
+ assert.True(t, now.Equal(dbHost.BillingStartTime))
+}
+
func TestHostSetAgentStartTime(t *testing.T) {
require.NoError(t, db.Clear(Collection))
defer func() {
@@ -809,9 +829,12 @@ func TestHostClearRunningAndSetLastTask(t *testing.T) {
}
func TestUpdateHostRunningTask(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ env := &mock.Environment{}
+ require.NoError(t, env.Configure(ctx))
Convey("With a host", t, func() {
require.NoError(t, db.Clear(Collection))
- oldTaskId := "oldId"
newTaskId := "newId"
h := Host{
Id: "test1",
@@ -829,8 +852,7 @@ func TestUpdateHostRunningTask(t *testing.T) {
So(h.Insert(), ShouldBeNil)
So(h2.Insert(), ShouldBeNil)
Convey("updating the running task id should set proper fields", func() {
- _, err := h.UpdateRunningTask(&task.Task{Id: newTaskId})
- So(err, ShouldBeNil)
+ So(h.UpdateRunningTaskWithContext(ctx, env, &task.Task{Id: newTaskId}), ShouldBeNil)
found, err := FindOne(ById(h.Id))
So(err, ShouldBeNil)
So(found.RunningTask, ShouldEqual, newTaskId)
@@ -839,18 +861,10 @@ func TestUpdateHostRunningTask(t *testing.T) {
So(len(runningTaskHosts), ShouldEqual, 1)
})
Convey("updating the running task to an empty string should error out", func() {
- _, err := h.UpdateRunningTask(&task.Task{})
- So(err, ShouldNotBeNil)
- })
- Convey("updating the running task when a task is already running should error", func() {
- _, err := h.UpdateRunningTask(&task.Task{Id: oldTaskId})
- So(err, ShouldBeNil)
- _, err = h.UpdateRunningTask(&task.Task{Id: newTaskId})
- So(err, ShouldNotBeNil)
+ So(h.UpdateRunningTaskWithContext(ctx, env, &task.Task{}), ShouldNotBeNil)
})
Convey("updating the running task on a starting user data host should succeed", func() {
- _, err := h2.UpdateRunningTask(&task.Task{Id: newTaskId})
- So(err, ShouldBeNil)
+ So(h2.UpdateRunningTaskWithContext(ctx, env, &task.Task{Id: newTaskId}), ShouldBeNil)
found, err := FindOne(ById(h2.Id))
So(err, ShouldBeNil)
So(found.RunningTask, ShouldEqual, newTaskId)
@@ -2513,31 +2527,31 @@ func TestIsIdleParent(t *testing.T) {
assert := assert.New(t)
assert.NoError(db.ClearCollections(Collection))
- provisionTimeRecent := time.Now().Add(-5 * time.Minute)
- provisionTimeOld := time.Now().Add(-1 * time.Hour)
+ billingTimeRecent := time.Now().Add(-5 * time.Minute)
+ billingTimeOld := time.Now().Add(-1 * time.Hour)
host1 := &Host{
- Id: "host1",
- Status: evergreen.HostRunning,
- ProvisionTime: provisionTimeOld,
+ Id: "host1",
+ Status: evergreen.HostRunning,
+ BillingStartTime: billingTimeOld,
}
host2 := &Host{
- Id: "host2",
- Status: evergreen.HostRunning,
- HasContainers: true,
- ProvisionTime: provisionTimeRecent,
+ Id: "host2",
+ Status: evergreen.HostRunning,
+ HasContainers: true,
+ BillingStartTime: billingTimeRecent,
}
host3 := &Host{
- Id: "host3",
- Status: evergreen.HostRunning,
- HasContainers: true,
- ProvisionTime: provisionTimeOld,
+ Id: "host3",
+ Status: evergreen.HostRunning,
+ HasContainers: true,
+ BillingStartTime: billingTimeOld,
}
host4 := &Host{
- Id: "host4",
- Status: evergreen.HostRunning,
- HasContainers: true,
- ProvisionTime: provisionTimeOld,
+ Id: "host4",
+ Status: evergreen.HostRunning,
+ HasContainers: true,
+ BillingStartTime: billingTimeOld,
}
host5 := &Host{
Id: "host5",
@@ -2576,7 +2590,7 @@ func TestIsIdleParent(t *testing.T) {
assert.True(idle)
assert.NoError(err)
- // ios a container --> false
+ // is a container --> false
idle, err = host5.IsIdleParent()
assert.False(idle)
assert.NoError(err)
@@ -3520,7 +3534,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
Status: evergreen.HostUninitialized,
CreationTime: now.Add(-1 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host2",
@@ -3528,7 +3542,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
Status: evergreen.HostUninitialized,
CreationTime: now.Add(-5 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host3",
@@ -3544,7 +3558,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
Status: evergreen.HostUninitialized,
CreationTime: now.Add(-5 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host5",
@@ -3552,7 +3566,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
Status: evergreen.HostBuilding,
CreationTime: now.Add(-5 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host6",
@@ -3560,7 +3574,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
Status: evergreen.HostBuilding,
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host7",
@@ -3568,7 +3582,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
Status: evergreen.HostRunning,
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host8",
@@ -3577,7 +3591,7 @@ func TestRemoveStaleInitializing(t *testing.T) {
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
SpawnOptions: SpawnOptions{SpawnedByTask: true},
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
}
@@ -3640,7 +3654,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostUninitialized,
CreationTime: now.Add(-time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host2",
@@ -3648,7 +3662,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostBuilding,
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host3",
@@ -3664,7 +3678,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostBuildingFailed,
CreationTime: now.Add(-5 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host5",
@@ -3672,7 +3686,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostBuilding,
CreationTime: now.Add(-time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host6",
@@ -3680,7 +3694,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostBuilding,
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
SpawnOptions: SpawnOptions{SpawnedByTask: true},
},
{
@@ -3689,7 +3703,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostRunning,
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
{
Id: "host8",
@@ -3697,7 +3711,7 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
Status: evergreen.HostBuilding,
CreationTime: now.Add(-30 * time.Minute),
UserHost: false,
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
}
@@ -3725,55 +3739,6 @@ func TestMarkStaleBuildingAsFailed(t *testing.T) {
checkStatus(t, hosts[7], evergreen.HostBuildingFailed)
}
-func TestStaleRunningTasks(t *testing.T) {
- assert := assert.New(t)
- require.NoError(t, db.ClearCollections(Collection, task.Collection))
- h1 := Host{
- Id: "h1",
- RunningTask: "t1",
- Status: evergreen.HostRunning,
- }
- assert.NoError(h1.Insert())
- h2 := Host{
- Id: "h2",
- RunningTask: "t2",
- Status: evergreen.HostRunning,
- }
- assert.NoError(h2.Insert())
- h3 := Host{
- Id: "h3",
- RunningTask: "t3",
- Status: evergreen.HostRunning,
- }
- assert.NoError(h3.Insert())
- t1 := task.Task{
- Id: "t1",
- Status: evergreen.TaskStarted,
- LastHeartbeat: time.Now().Add(-15 * time.Minute),
- }
- assert.NoError(t1.Insert())
- t2 := task.Task{
- Id: "t2",
- Status: evergreen.TaskDispatched,
- LastHeartbeat: time.Now().Add(-25 * time.Minute),
- }
- assert.NoError(t2.Insert())
- t3 := task.Task{
- Id: "t3",
- Status: evergreen.TaskStarted,
- LastHeartbeat: time.Now().Add(-1 * time.Minute),
- }
- assert.NoError(t3.Insert())
-
- tasks, err := FindStaleRunningTasks(10*time.Minute, TaskHeartbeatPastCutoff)
- assert.NoError(err)
- assert.Len(tasks, 1)
-
- tasks, err = FindStaleRunningTasks(10*time.Minute, TaskNoHeartbeatSinceDispatch)
- assert.NoError(err)
- assert.Len(tasks, 1)
-}
-
func TestNumNewParentsNeeded(t *testing.T) {
assert := assert.New(t)
require.NoError(t, db.ClearCollections(Collection, distro.Collection, task.Collection))
@@ -4516,6 +4481,38 @@ func TestAddVolumeToHost(t *testing.T) {
}, foundHost.Volumes)
}
+func TestUnsetHomeVolume(t *testing.T) {
+ require.NoError(t, db.ClearCollections(Collection))
+ h := &Host{
+ Id: "host-1",
+ HomeVolumeID: "volume-1",
+ Volumes: []VolumeAttachment{
+ {
+ VolumeID: "volume-1",
+ DeviceName: "device-1",
+ },
+ },
+ }
+ assert.NoError(t, h.Insert())
+ assert.NoError(t, h.UnsetHomeVolume())
+ assert.Equal(t, "", h.HomeVolumeID)
+ assert.Equal(t, []VolumeAttachment{
+ {
+ VolumeID: "volume-1",
+ DeviceName: "device-1",
+ },
+ }, h.Volumes)
+ foundHost, err := FindOneId("host-1")
+ assert.NoError(t, err)
+ assert.Equal(t, "", foundHost.HomeVolumeID)
+ assert.Equal(t, []VolumeAttachment{
+ {
+ VolumeID: "volume-1",
+ DeviceName: "device-1",
+ },
+ }, foundHost.Volumes)
+}
+
func TestRemoveVolumeFromHost(t *testing.T) {
require.NoError(t, db.ClearCollections(Collection))
h := &Host{
@@ -4753,10 +4750,16 @@ func TestFindHostsInRange(t *testing.T) {
}
func TestRemoveAndReplace(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ env := &mock.Environment{}
+ require.NoError(t, env.Configure(ctx))
+
require.NoError(t, db.Clear(Collection))
// removing a nonexistent host errors
- assert.Error(t, RemoveStrict("asdf"))
+ assert.Error(t, RemoveStrict(ctx, env, "asdf"))
// replacing an existing host works
h := Host{
diff --git a/model/host/hostutil.go b/model/host/hostutil.go
index d02d801d1f6..38d55ff565d 100644
--- a/model/host/hostutil.go
+++ b/model/host/hostutil.go
@@ -293,13 +293,13 @@ func (h *Host) ForceReinstallJasperCommand(settings *evergreen.Settings) string
params = append(params, fmt.Sprintf("--user=%s", h.User))
}
- if settings.Splunk.Populated() && h.StartedBy == evergreen.User {
+ if settings.Splunk.SplunkConnectionInfo.Populated() && h.StartedBy == evergreen.User {
params = append(params,
- fmt.Sprintf("--splunk_url=%s", settings.Splunk.ServerURL),
+ fmt.Sprintf("--splunk_url=%s", settings.Splunk.SplunkConnectionInfo.ServerURL),
fmt.Sprintf("--splunk_token_path=%s", h.Distro.AbsPathNotCygwinCompatible(h.splunkTokenFilePath())),
)
- if settings.Splunk.Channel != "" {
- params = append(params, fmt.Sprintf("--splunk_channel=%s", settings.Splunk.Channel))
+ if settings.Splunk.SplunkConnectionInfo.Channel != "" {
+ params = append(params, fmt.Sprintf("--splunk_channel=%s", settings.Splunk.SplunkConnectionInfo.Channel))
}
}
@@ -463,7 +463,7 @@ func (h *Host) GenerateUserDataProvisioningScript(settings *evergreen.Settings,
return "", errors.Wrap(err, "creating setup script")
}
- writeCredentialsCmds, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk, creds)
+ writeCredentialsCmds, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk.SplunkConnectionInfo, creds)
if err != nil {
return "", errors.Wrap(err, "creating commands to write Jasper credentials file")
}
@@ -555,7 +555,6 @@ func (h *Host) SetupServiceUserCommands() (string, error) {
cmd(fmt.Sprintf("net user %s %s /add", h.Distro.BootstrapSettings.ServiceUser, h.ServicePassword)),
// Add the user to the Administrators group.
cmd(fmt.Sprintf("net localgroup Administrators %s /add", h.Distro.BootstrapSettings.ServiceUser)),
- cmd(fmt.Sprintf(`wmic useraccount where name="%s" set passwordexpires=false`, h.Distro.BootstrapSettings.ServiceUser)),
// Allow the user to run the service by granting the "Log on as a
// service" right.
loginServicePermCmd,
diff --git a/model/host/hostutil_test.go b/model/host/hostutil_test.go
index 66d60ffa46f..61691eadac4 100644
--- a/model/host/hostutil_test.go
+++ b/model/host/hostutil_test.go
@@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
"net"
"os"
"path/filepath"
@@ -194,7 +193,7 @@ func TestGetSSHOptions(t *testing.T) {
},
"IncludesMultipleIdentityFiles": func(t *testing.T, h *Host, settings *evergreen.Settings) {
keyName := "key_file"
- keyFile, err := ioutil.TempFile(settings.SSHKeyDirectory, keyName)
+ keyFile, err := os.CreateTemp(settings.SSHKeyDirectory, keyName)
require.NoError(t, err)
assert.NoError(t, keyFile.Close())
defer func() {
@@ -249,11 +248,7 @@ func TestGetSSHOptions(t *testing.T) {
},
} {
t.Run(testName, func(t *testing.T) {
- sshKeyDir, err := ioutil.TempDir("", "ssh_key_directory")
- require.NoError(t, err)
- defer func() {
- assert.NoError(t, os.RemoveAll(sshKeyDir))
- }()
+ sshKeyDir := t.TempDir()
testCase(t, &Host{
Id: "id",
Distro: distro.Distro{
@@ -406,9 +401,9 @@ func TestJasperCommands(t *testing.T) {
assert.Contains(t, cmd, "--env 'envKey1=envValue1'")
},
"ForceReinstallJasperCommandWithSplunkLogging": func(t *testing.T, h *Host, settings *evergreen.Settings) {
- settings.Splunk.ServerURL = "url"
- settings.Splunk.Token = "token"
- settings.Splunk.Channel = "channel"
+ settings.Splunk.SplunkConnectionInfo.ServerURL = "url"
+ settings.Splunk.SplunkConnectionInfo.Token = "token"
+ settings.Splunk.SplunkConnectionInfo.Channel = "channel"
cmd := h.ForceReinstallJasperCommand(settings)
assert.True(t, strings.HasPrefix(cmd, "sudo /foo/jasper_cli jasper service force-reinstall rpc"))
@@ -417,9 +412,9 @@ func TestJasperCommands(t *testing.T) {
assert.Contains(t, cmd, fmt.Sprintf("--port=%d", settings.HostJasper.Port))
assert.Contains(t, cmd, fmt.Sprintf("--creds_path=%s", h.Distro.BootstrapSettings.JasperCredentialsPath))
assert.Contains(t, cmd, fmt.Sprintf("--user=%s", h.User))
- assert.Contains(t, cmd, fmt.Sprintf("--splunk_url=%s", settings.Splunk.ServerURL))
+ assert.Contains(t, cmd, fmt.Sprintf("--splunk_url=%s", settings.Splunk.SplunkConnectionInfo.ServerURL))
assert.Contains(t, cmd, fmt.Sprintf("--splunk_token_path=%s", h.splunkTokenFilePath()))
- assert.Contains(t, cmd, fmt.Sprintf("--splunk_channel=%s", settings.Splunk.Channel))
+ assert.Contains(t, cmd, fmt.Sprintf("--splunk_channel=%s", settings.Splunk.SplunkConnectionInfo.Channel))
},
"ForceReinstallJasperWithResourceLimits": func(t *testing.T, h *Host, settings *evergreen.Settings) {
h.Distro.BootstrapSettings.ResourceLimits = distro.ResourceLimits{
@@ -531,7 +526,7 @@ func TestJasperCommandsWindows(t *testing.T) {
creds, err := newMockCredentials()
require.NoError(t, err)
- writeCredentialsCmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk, creds)
+ writeCredentialsCmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk.SplunkConnectionInfo, creds)
require.NoError(t, err)
startAgentMonitor, err := h.StartAgentMonitorRequest(settings)
@@ -579,7 +574,7 @@ func TestJasperCommandsWindows(t *testing.T) {
creds, err := newMockCredentials()
require.NoError(t, err)
- writeCredentialsCmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk, creds)
+ writeCredentialsCmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk.SplunkConnectionInfo, creds)
require.NoError(t, err)
setupSpawnHost, err := h.SpawnHostSetupCommands(settings)
@@ -620,7 +615,7 @@ func TestJasperCommandsWindows(t *testing.T) {
for testName, testCase := range map[string]func(t *testing.T, h *Host, settings *evergreen.Settings){
"WithJasperCredentialsPath": func(t *testing.T, h *Host, settings *evergreen.Settings) {
- cmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk, creds)
+ cmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk.SplunkConnectionInfo, creds)
require.NoError(t, err)
expectedCreds, err := creds.Export()
@@ -628,20 +623,20 @@ func TestJasperCommandsWindows(t *testing.T) {
assert.Equal(t, fmt.Sprintf("echo '%s' > /bar/bat.txt && chmod 666 /bar/bat.txt", expectedCreds), cmd)
},
"WithSplunkCredentials": func(t *testing.T, h *Host, settings *evergreen.Settings) {
- settings.Splunk.Token = "token"
- settings.Splunk.ServerURL = "splunk_url"
- cmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk, creds)
+ settings.Splunk.SplunkConnectionInfo.Token = "token"
+ settings.Splunk.SplunkConnectionInfo.ServerURL = "splunk_url"
+ cmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk.SplunkConnectionInfo, creds)
require.NoError(t, err)
expectedCreds, err := creds.Export()
require.NoError(t, err)
- assert.Equal(t, fmt.Sprintf("echo '%s' > /bar/bat.txt && chmod 666 /bar/bat.txt && echo '%s' > /bar/splunk.txt && chmod 666 /bar/splunk.txt", expectedCreds, settings.Splunk.Token), cmd)
+ assert.Equal(t, fmt.Sprintf("echo '%s' > /bar/bat.txt && chmod 666 /bar/bat.txt && echo '%s' > /bar/splunk.txt && chmod 666 /bar/splunk.txt", expectedCreds, settings.Splunk.SplunkConnectionInfo.Token), cmd)
},
"SpawnHostWithSplunkCredentials": func(t *testing.T, h *Host, settings *evergreen.Settings) {
h.StartedBy = "started_by_user"
- settings.Splunk.Token = "token"
- settings.Splunk.ServerURL = "splunk_url"
- cmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk, creds)
+ settings.Splunk.SplunkConnectionInfo.Token = "token"
+ settings.Splunk.SplunkConnectionInfo.ServerURL = "splunk_url"
+ cmd, err := h.WriteJasperCredentialsFilesCommands(settings.Splunk.SplunkConnectionInfo, creds)
require.NoError(t, err)
expectedCreds, err := creds.Export()
@@ -985,9 +980,11 @@ func TestStartAgentMonitorRequest(t *testing.T) {
Ui: evergreen.UIConfig{
Url: "www.example2.com",
},
- Splunk: send.SplunkConnectionInfo{
- ServerURL: "www.example3.com",
- Token: "token",
+ Splunk: evergreen.SplunkConfig{
+ SplunkConnectionInfo: send.SplunkConnectionInfo{
+ ServerURL: "www.example3.com",
+ Token: "token",
+ },
},
}
diff --git a/model/host/stats.go b/model/host/stats.go
index f6b56c75b93..71eb6c5b51b 100644
--- a/model/host/stats.go
+++ b/model/host/stats.go
@@ -102,7 +102,7 @@ func GetProviderCounts() (ProviderStats, error) {
////////////////////////////////////////////////////////////////////////
//
-// Pipeline impelementations
+// Pipeline implementations
// statsByDistroPipeline returns a pipeline that will group all up hosts by distro
// and return the count of hosts as well as how many are running tasks
diff --git a/model/host/stats_test.go b/model/host/stats_test.go
index 57b133d3092..2894d63215f 100644
--- a/model/host/stats_test.go
+++ b/model/host/stats_test.go
@@ -17,7 +17,7 @@ func insertTestDocuments() error {
Status: evergreen.HostRunning,
Distro: distro.Distro{
Id: "debian",
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
RunningTask: "baz",
StartedBy: evergreen.User,
@@ -27,7 +27,7 @@ func insertTestDocuments() error {
Status: evergreen.HostRunning,
Distro: distro.Distro{
Id: "redhat",
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
RunningTask: "bar",
StartedBy: evergreen.User,
@@ -37,7 +37,7 @@ func insertTestDocuments() error {
Status: evergreen.HostRunning,
Distro: distro.Distro{
Id: "debian",
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
RunningTask: "foo-foo",
StartedBy: evergreen.User,
@@ -56,7 +56,7 @@ func insertTestDocuments() error {
Status: evergreen.HostUninitialized,
Distro: distro.Distro{
Id: "foo",
- Provider: evergreen.ProviderNameEc2Auto,
+ Provider: evergreen.ProviderNameEc2Fleet,
},
StartedBy: evergreen.User,
},
@@ -98,7 +98,7 @@ func TestHostStatsByProvider(t *testing.T) {
rmap := result.Map()
assert.Equal(1, rmap[evergreen.ProviderNameEc2Spot])
- assert.Equal(3, rmap[evergreen.ProviderNameEc2Auto])
+ assert.Equal(3, rmap[evergreen.ProviderNameEc2Fleet])
alt, err := GetProviderCounts()
assert.NoError(err)
diff --git a/model/host/volume.go b/model/host/volume.go
index 83504aeae1b..c964cdcf01e 100644
--- a/model/host/volume.go
+++ b/model/host/volume.go
@@ -15,12 +15,15 @@ type Volume struct {
CreatedBy string `bson:"created_by" json:"created_by"`
Type string `bson:"type" json:"type"`
Size int `bson:"size" json:"size"`
+ Throughput int `bson:"throughput,omitempty" json:"throughput,omitempty"`
+ IOPS int `bson:"iops,omitempty" json:"iops,omitempty"`
AvailabilityZone string `bson:"availability_zone" json:"availability_zone"`
Expiration time.Time `bson:"expiration" json:"expiration"`
NoExpiration bool `bson:"no_expiration" json:"no_expiration"`
CreationDate time.Time `bson:"created_at" json:"created_at"`
Host string `bson:"host,omitempty" json:"host"`
HomeVolume bool `bson:"home_volume" json:"home_volume"`
+ Migrating bool `bson:"migrating" json:"migrating"`
}
// Insert a volume into the volumes collection.
@@ -70,6 +73,17 @@ func (v *Volume) SetSize(size int) error {
return nil
}
+func (v *Volume) SetMigrating(migrating bool) error {
+ err := db.Update(VolumesCollection,
+ bson.M{VolumeIDKey: v.ID},
+ bson.M{"$set": bson.M{VolumeMigratingKey: migrating}})
+ if err != nil {
+ return errors.WithStack(err)
+ }
+ v.Migrating = migrating
+ return nil
+}
+
// Remove a volume from the volumes collection.
// Note this shouldn't be used when you want to
// remove from AWS itself.
diff --git a/model/lifecycle.go b/model/lifecycle.go
index 3357e8332aa..a650f89277b 100644
--- a/model/lifecycle.go
+++ b/model/lifecycle.go
@@ -55,39 +55,76 @@ type VersionToRestart struct {
// SetVersionActivation updates the "active" state of all builds and tasks associated with a
// version to the given setting. It also updates the task cache for all builds affected.
func SetVersionActivation(versionId string, active bool, caller string) error {
- builds, err := build.Find(
- build.ByVersion(versionId).WithFields(build.IdKey),
- )
- if err != nil {
- return errors.Wrapf(err, "getting builds for version '%s'", versionId)
+ q := bson.M{
+ task.VersionKey: versionId,
+ task.StatusKey: evergreen.TaskUndispatched,
}
- buildIDs := make([]string, 0, len(builds))
- for _, build := range builds {
- buildIDs = append(buildIDs, build.Id)
+ var tasksToModify []task.Task
+ var err error
+ // If activating a task, set the ActivatedBy field to be the caller.
+ if active {
+ if err := SetVersionActivated(versionId, active); err != nil {
+ return errors.Wrapf(err, "setting activated for version '%s'", versionId)
+ }
+ tasksToModify, err = task.FindAll(db.Query(q).WithFields(task.IdKey, task.DependsOnKey, task.ExecutionKey, task.BuildIdKey))
+ if err != nil {
+ return errors.Wrap(err, "getting tasks to activate")
+ }
+ if len(tasksToModify) > 0 {
+ if err = task.ActivateTasks(tasksToModify, time.Now(), false, caller); err != nil {
+ return errors.Wrap(err, "updating tasks for activation")
+ }
+ }
+ } else {
+ // If the caller is the default task activator, only deactivate tasks that have not been activated by a user.
+ if evergreen.IsSystemActivator(caller) {
+ q[task.ActivatedByKey] = bson.M{"$in": evergreen.SystemActivators}
+ }
+
+ tasksToModify, err = task.FindAll(db.Query(q).WithFields(task.IdKey, task.ExecutionKey, task.BuildIdKey))
+ if err != nil {
+ return errors.Wrap(err, "getting tasks to deactivate")
+ }
+ if len(tasksToModify) > 0 {
+ if err = task.DeactivateTasks(tasksToModify, false, caller); err != nil {
+ return errors.Wrap(err, "deactivating tasks")
+ }
+ }
}
- // Update activation for all builds before updating their tasks so the version won't spend
- // time in an intermediate state where only some builds are updated
- if err = build.UpdateActivation(buildIDs, active, caller); err != nil {
- return errors.Wrapf(err, "setting activation for builds in version '%s'", versionId)
+ if len(tasksToModify) == 0 {
+ return nil
}
- return errors.Wrapf(setTaskActivationForBuilds(buildIDs, active, false, nil, caller),
- "setting activation for tasks in version '%s'", versionId)
+ buildIdsMap := map[string]bool{}
+ var buildIds []string
+ for _, t := range tasksToModify {
+ buildIdsMap[t.BuildId] = true
+ }
+ for buildId := range buildIdsMap {
+ buildIds = append(buildIds, buildId)
+ }
+ if err := build.UpdateActivation(buildIds, active, caller); err != nil {
+ return errors.Wrapf(err, "setting build activations to %t", active)
+ }
+ if err := UpdateVersionAndPatchStatusForBuilds(buildIds); err != nil {
+ return errors.Wrapf(err, "updating build and version status for version '%s'", versionId)
+ }
+ return nil
}
-// SetBuildActivation updates the "active" state of this build and all associated tasks.
+// ActivateBuildsAndTasks updates the "active" state of this build and all associated tasks.
// It also updates the task cache for the build document.
-func SetBuildActivation(buildId string, active bool, caller string) error {
- if err := build.UpdateActivation([]string{buildId}, active, caller); err != nil {
- return errors.Wrapf(err, "setting build activation to %t for build '%s'", active, buildId)
+func ActivateBuildsAndTasks(buildIds []string, active bool, caller string) error {
+ if err := build.UpdateActivation(buildIds, active, caller); err != nil {
+ return errors.Wrapf(err, "setting build activation to %t for builds '%v'", active, buildIds)
}
- return errors.Wrapf(setTaskActivationForBuilds([]string{buildId}, active, true, nil, caller),
- "setting task activation for build '%s'", buildId)
+ return errors.Wrapf(setTaskActivationForBuilds(buildIds, active, true, nil, caller),
+ "setting task activation for builds '%v'", buildIds)
}
-// setTaskActivationForBuilds updates the "active" state of all tasks in buildIds.
+// setTaskActivationForBuilds updates the "active" state of all non-disabled tasks in buildIds.
// It also updates the task cache for the build document.
// If withDependencies is true, also set dependencies. Don't need to do this when the entire version is affected.
// If tasks are given to ignore, then we don't activate those tasks.
@@ -95,15 +132,16 @@ func setTaskActivationForBuilds(buildIds []string, active, withDependencies bool
// If activating a task, set the ActivatedBy field to be the caller
if active {
q := bson.M{
- task.BuildIdKey: bson.M{"$in": buildIds},
- task.StatusKey: evergreen.TaskUndispatched,
+ task.BuildIdKey: bson.M{"$in": buildIds},
+ task.StatusKey: evergreen.TaskUndispatched,
+ task.PriorityKey: bson.M{"$gt": evergreen.DisabledTaskPriority},
}
if len(ignoreTasks) > 0 {
q[task.IdKey] = bson.M{"$nin": ignoreTasks}
}
tasksToActivate, err := task.FindAll(db.Query(q).WithFields(task.IdKey, task.DependsOnKey, task.ExecutionKey))
if err != nil {
- return errors.Wrap(err, "getting tasks to deactivate")
+ return errors.Wrap(err, "getting tasks to activate")
}
if withDependencies {
dependOn, err := task.GetRecursiveDependenciesUp(tasksToActivate, nil)
@@ -139,7 +177,6 @@ func setTaskActivationForBuilds(buildIds []string, active, withDependencies bool
if err := UpdateVersionAndPatchStatusForBuilds(buildIds); err != nil {
return errors.Wrapf(err, "updating status for builds '%s'", buildIds)
}
-
return nil
}
@@ -193,7 +230,7 @@ func SetTaskPriority(t task.Task, priority int64, caller string) error {
task.PriorityKey: bson.M{"$lt": priority},
},
},
- }).WithFields(ExecutionKey)
+ }).WithFields(task.ExecutionKey)
tasks, err := task.FindAll(query)
if err != nil {
return errors.Wrap(err, "finding matching tasks")
@@ -216,7 +253,7 @@ func SetTaskPriority(t task.Task, priority int64, caller string) error {
// negative priority - deactivate the task
if priority <= evergreen.DisabledTaskPriority {
- if err = t.DeactivateTask(caller); err != nil {
+ if err = SetActiveState(caller, false, t); err != nil {
return errors.Wrap(err, "deactivating task")
}
}
@@ -236,11 +273,11 @@ func SetBuildPriority(buildId string, priority int64, caller string) error {
// negative priority - these tasks should never run, so unschedule now
if priority < 0 {
- tasks, err := task.FindAll(db.Query(bson.M{task.BuildIdKey: buildId}).WithFields(task.IdKey, task.ExecutionKey))
+ tasks, err := task.FindAll(db.Query(bson.M{task.BuildIdKey: buildId}))
if err != nil {
return errors.Wrapf(err, "getting tasks for build '%s'", buildId)
}
- if err = task.DeactivateTasks(tasks, true, caller); err != nil {
+ if err = SetActiveState(caller, false, tasks...); err != nil {
return errors.Wrapf(err, "deactivating tasks for build '%s'", buildId)
}
}
@@ -248,29 +285,28 @@ func SetBuildPriority(buildId string, priority int64, caller string) error {
return nil
}
-// SetVersionPriority updates the priority field of all tasks associated with the given version id.
-func SetVersionPriority(versionId string, priority int64, caller string) error {
+// SetVersionsPriority updates the priority field of all tasks associated with the given version ids.
+func SetVersionsPriority(versionIds []string, priority int64, caller string) error {
_, err := task.UpdateAll(
- bson.M{task.VersionKey: versionId},
+ bson.M{task.VersionKey: bson.M{"$in": versionIds}},
bson.M{"$set": bson.M{task.PriorityKey: priority}},
)
if err != nil {
- return errors.Wrapf(err, "setting priority for version '%s'", versionId)
+ return errors.Wrap(err, "setting priority for versions")
}
// negative priority - these tasks should never run, so unschedule now
if priority < 0 {
var tasks []task.Task
- tasks, err = task.FindAll(db.Query(bson.M{task.VersionKey: versionId}).WithFields(task.IdKey, task.ExecutionKey))
+ tasks, err = task.FindAll(db.Query(bson.M{task.VersionKey: bson.M{"$in": versionIds}}))
if err != nil {
- return errors.Wrapf(err, "getting tasks for version '%s'", versionId)
+ return errors.Wrap(err, "getting tasks for versions")
}
- err = task.DeactivateTasks(tasks, false, caller)
+ err = SetActiveState(caller, false, tasks...)
if err != nil {
- return errors.Wrapf(err, "deactivating tasks for version '%s'", versionId)
+ return errors.Wrap(err, "deactivating tasks for versions")
}
}
-
return nil
}
@@ -298,35 +334,53 @@ func RestartTasksInVersion(versionId string, abortInProgress bool, caller string
// If abortInProgress is true, it also sets the abort flag on any in-progress tasks.
func RestartVersion(versionId string, taskIds []string, abortInProgress bool, caller string) error {
if abortInProgress {
- if err := task.AbortTasksForVersion(versionId, taskIds, caller); err != nil {
+ if err := task.AbortAndMarkResetTasksForVersion(versionId, taskIds, caller); err != nil {
return errors.WithStack(err)
}
}
+ allFinishedTasks, err := getTasksToReset(taskIds)
+ if err != nil {
+ return errors.Wrap(err, "getting finished tasks")
+ }
+ if len(allFinishedTasks) == 0 {
+ return nil
+ }
+ return restartTasks(allFinishedTasks, caller, versionId)
+}
+
+// getTasksToReset returns all finished tasks that should be reset given an initial input list of
+// finished taskIds. If a display task is in the list, its execution tasks are removed if they also exist.
+func getTasksToReset(taskIds []string) ([]task.Task, error) {
finishedTasks, err := task.FindAll(db.Query(task.ByIdsAndStatus(taskIds, evergreen.TaskCompletedStatuses)))
if err != nil {
- return errors.WithStack(err)
+ return nil, errors.WithStack(err)
}
allFinishedTasks, err := task.AddParentDisplayTasks(finishedTasks)
if err != nil {
- return errors.WithStack(err)
+ return nil, errors.WithStack(err)
}
- // remove execution tasks in case the caller passed both display and execution tasks
- // the functions below are expected to work if just the display task is passed
for i := len(allFinishedTasks) - 1; i >= 0; i-- {
t := allFinishedTasks[i]
if t.DisplayTask != nil {
allFinishedTasks = append(allFinishedTasks[:i], allFinishedTasks[i+1:]...)
}
}
+ return allFinishedTasks, nil
+}
- // archive all the finished tasks
+// restartTasks restarts all finished tasks in the given list that are not part of
+// a single host task group.
+func restartTasks(allFinishedTasks []task.Task, caller, versionId string) error {
toArchive := []task.Task{}
for _, t := range allFinishedTasks {
- if !t.IsPartOfSingleHostTaskGroup() { // for single host task groups we don't archive until fully restarting
+ if !t.IsPartOfSingleHostTaskGroup() {
+ // We do not archive single host TG tasks here because we must wait for
+ // the task group to be fully complete, at which point we can
+ // archive them all at once.
toArchive = append(toArchive, t)
}
}
- if err = task.ArchiveMany(toArchive); err != nil {
+ if err := task.ArchiveMany(toArchive); err != nil {
return errors.Wrap(err, "archiving tasks")
}
@@ -334,21 +388,13 @@ func RestartVersion(versionId string, taskIds []string, abortInProgress bool, ca
Build string
TaskGroup string
}
- // Mark aborted tasks to reset when finished if not all tasks are finished.
- if abortInProgress && len(finishedTasks) < len(taskIds) {
- if err = task.SetAbortedTasksResetWhenFinished(taskIds); err != nil {
- return err
- }
- }
- // only need to check one task per task group / build combination
+ // Only need to check one task per task group / build combination
taskGroupsToCheck := map[taskGroupAndBuild]task.Task{}
- tasksToRestart := allFinishedTasks
-
restartIds := []string{}
- for _, t := range tasksToRestart {
+ for _, t := range allFinishedTasks {
if t.IsPartOfSingleHostTaskGroup() {
- if err = t.SetResetWhenFinished(); err != nil {
+ if err := t.SetResetWhenFinished(); err != nil {
return errors.Wrapf(err, "marking '%s' for restart when finished", t.Id)
}
taskGroupsToCheck[taskGroupAndBuild{
@@ -356,7 +402,7 @@ func RestartVersion(versionId string, taskIds []string, abortInProgress bool, ca
TaskGroup: t.TaskGroup,
}] = t
} else {
- // only hard restart non-single host task group tasks
+ // Only restart non-single host task group tasks
restartIds = append(restartIds, t.Id)
if t.DisplayOnly {
restartIds = append(restartIds, t.ExecutionTasks...)
@@ -365,29 +411,34 @@ func RestartVersion(versionId string, taskIds []string, abortInProgress bool, ca
}
for tg, t := range taskGroupsToCheck {
- if err = checkResetSingleHostTaskGroup(&t, caller); err != nil {
+ if err := checkResetSingleHostTaskGroup(&t, caller); err != nil {
return errors.Wrapf(err, "resetting task group '%s' for build '%s'", tg.TaskGroup, tg.Build)
}
}
// Set all the task fields to indicate restarted
- if err = MarkTasksReset(restartIds); err != nil {
+ if err := MarkTasksReset(restartIds); err != nil {
return errors.WithStack(err)
}
- for _, t := range tasksToRestart {
+ for _, t := range allFinishedTasks {
if !t.IsPartOfSingleHostTaskGroup() { // this will be logged separately if task group is restarted
event.LogTaskRestarted(t.Id, t.Execution, caller)
}
}
- if err = build.SetBuildStartedForTasks(tasksToRestart, caller); err != nil {
+
+ if err := build.SetBuildStartedForTasks(allFinishedTasks, caller); err != nil {
return errors.Wrap(err, "setting builds started")
}
- version, err := VersionFindOneId(versionId)
+ builds, err := build.FindBuildsForTasks(allFinishedTasks)
if err != nil {
- return errors.Wrap(err, "finding version")
+ return errors.Wrap(err, "finding builds for tasks")
}
- return errors.Wrap(version.UpdateStatus(evergreen.VersionStarted), "changing version status")
-
+ for _, b := range builds {
+ if err = checkUpdateBuildPRStatusPending(&b); err != nil {
+ return errors.Wrapf(err, "updating build '%s' PR status", b.Id)
+ }
+ }
+ return errors.Wrap(setVersionStatus(versionId, evergreen.VersionStarted), "changing version status")
}
// RestartVersions restarts selected tasks for a set of versions.
@@ -403,82 +454,21 @@ func RestartVersions(versionsToRestart []*VersionToRestart, abortInProgress bool
// RestartBuild restarts completed tasks associated with a given buildId.
// If abortInProgress is true, it also sets the abort flag on any in-progress tasks.
-func RestartBuild(buildId string, taskIds []string, abortInProgress bool, caller string) error {
+func RestartBuild(build *build.Build, taskIds []string, abortInProgress bool, caller string) error {
if abortInProgress {
// abort in-progress tasks in this build
- if err := task.AbortTasksForBuild(buildId, taskIds, caller); err != nil {
+ if err := task.AbortAndMarkResetTasksForBuild(build.Id, taskIds, caller); err != nil {
return errors.WithStack(err)
}
}
-
- // restart all the 'not in-progress' tasks for the build
- tasks, err := task.FindAll(db.Query(task.ByIdsAndStatus(taskIds, evergreen.TaskCompletedStatuses)))
+ tasksToReset, err := getTasksToReset(taskIds)
if err != nil {
- return errors.WithStack(err)
+ return errors.Wrap(err, "getting finished tasks")
}
- if len(tasks) == 0 {
+ if len(tasksToReset) == 0 {
return nil
}
- return restartTasksForBuild(buildId, tasks, caller)
-}
-
-// RestartAllBuildTasks restarts all the tasks associated with a given build.
-func RestartAllBuildTasks(buildId string, caller string) error {
- if err := task.AbortTasksForBuild(buildId, nil, caller); err != nil {
- return errors.WithStack(err)
- }
-
- allTasks, err := task.FindAll(db.Query(task.ByBuildId(buildId)))
- if err != nil {
- return errors.WithStack(err)
- }
- if len(allTasks) == 0 {
- return nil
- }
- return restartTasksForBuild(buildId, allTasks, caller)
-}
-
-func restartTasksForBuild(buildId string, tasks []task.Task, caller string) error {
- // maps task group to a single task in the group so we only check once
- taskGroupsToCheck := map[string]task.Task{}
- restartIds := []string{}
- toArchive := []task.Task{}
- for _, t := range tasks {
- if t.IsPartOfSingleHostTaskGroup() {
- if err := t.SetResetWhenFinished(); err != nil {
- return errors.Wrapf(err, "marking task group '%s' to reset", t.TaskGroup)
- }
- taskGroupsToCheck[t.TaskGroup] = t
- } else {
- restartIds = append(restartIds, t.Id)
- if t.DisplayOnly {
- restartIds = append(restartIds, t.ExecutionTasks...)
- }
- if t.IsFinished() {
- toArchive = append(toArchive, t)
- }
- }
- }
- if err := task.ArchiveMany(toArchive); err != nil {
- return errors.Wrap(err, "archiving tasks")
- }
- // Set all the task fields to indicate restarted
- if err := MarkTasksReset(restartIds); err != nil {
- return errors.WithStack(err)
- }
- for _, t := range tasks {
- if !t.IsPartOfSingleHostTaskGroup() { // this will be logged separately if task group is restarted
- event.LogTaskRestarted(t.Id, t.Execution, caller)
- }
- }
-
- for tg, t := range taskGroupsToCheck {
- if err := checkResetSingleHostTaskGroup(&t, caller); err != nil {
- return errors.Wrapf(err, "resetting single host task group '%s'", tg)
- }
- }
-
- return errors.Wrap(build.SetBuildStartedForTasks(tasks, caller), "setting builds started")
+ return errors.Wrap(restartTasks(tasksToReset, caller, build.Version), "restarting tasks")
}
func CreateTasksCache(tasks []task.Task) []build.TaskCache {
@@ -523,64 +513,63 @@ func RefreshTasksCache(buildId string) error {
}
// addTasksToBuild creates/activates the tasks for the given build of a project
-func addTasksToBuild(ctx context.Context, b *build.Build, project *Project, pRef *ProjectRef, v *Version, taskNames []string,
- displayNames []string, activationInfo specificActivationInfo, generatedBy string, tasksInBuild []task.Task,
- syncAtEndOpts patch.SyncAtEndOptions, distroAliases map[string][]string, taskIds TaskIdConfig) (*build.Build, task.Tasks, error) {
- // find the build variant for this project/build
- buildVariant := project.FindBuildVariant(b.BuildVariant)
- if buildVariant == nil {
- return nil, nil, errors.Errorf("finding build '%s' in project file '%s'",
- b.BuildVariant, project.Identifier)
+func addTasksToBuild(ctx context.Context, creationInfo TaskCreationInfo) (*build.Build, task.Tasks, error) {
+ // Find the build variant for this project/build
+ creationInfo.BuildVariant = creationInfo.Project.FindBuildVariant(creationInfo.Build.BuildVariant)
+ if creationInfo.BuildVariant == nil {
+ return nil, nil, errors.Errorf("could not find build '%s' in project file '%s'",
+ creationInfo.Build.BuildVariant, creationInfo.Project.Identifier)
}
- // create the new tasks for the build
- createTime, err := getTaskCreateTime(project.Identifier, v)
+ createTime, err := getTaskCreateTime(creationInfo)
if err != nil {
- return nil, nil, errors.Wrapf(err, "getting create time for tasks in version '%s'", v.Id)
+ return nil, nil, errors.Wrapf(err, "getting create time for tasks in version '%s'", creationInfo.Version.Id)
}
var githubCheckAliases ProjectAliases
- if v.Requester == evergreen.RepotrackerVersionRequester && pRef.IsGithubChecksEnabled() {
- githubCheckAliases, err = FindAliasInProjectRepoOrConfig(v.Identifier, evergreen.GithubChecksAlias)
+ if creationInfo.Version.Requester == evergreen.RepotrackerVersionRequester && creationInfo.ProjectRef.IsGithubChecksEnabled() {
+ githubCheckAliases, err = FindAliasInProjectRepoOrConfig(creationInfo.Version.Identifier, evergreen.GithubChecksAlias)
grip.Error(message.WrapError(err, message.Fields{
"message": "error getting github check aliases when adding tasks to build",
- "project": v.Identifier,
- "project_identifier": pRef.Identifier,
- "version": v.Id,
+ "project": creationInfo.Version.Identifier,
+ "project_identifier": creationInfo.ProjectRef.Identifier,
+ "version": creationInfo.Version.Id,
}))
}
- tasks, err := createTasksForBuild(project, pRef, buildVariant, b, v, taskIds, taskNames, displayNames, activationInfo,
- generatedBy, tasksInBuild, syncAtEndOpts, distroAliases, createTime, githubCheckAliases)
+ creationInfo.GithubChecksAliases = githubCheckAliases
+ creationInfo.TaskCreateTime = createTime
+ // Create the new tasks for the build
+ tasks, err := createTasksForBuild(creationInfo)
if err != nil {
- return nil, nil, errors.Wrapf(err, "creating tasks for build '%s'", b.Id)
+ return nil, nil, errors.Wrapf(err, "creating tasks for build '%s'", creationInfo.Build.Id)
}
if err = tasks.InsertUnordered(ctx); err != nil {
- return nil, nil, errors.Wrapf(err, "inserting tasks for build '%s'", b.Id)
+ return nil, nil, errors.Wrapf(err, "inserting tasks for build '%s'", creationInfo.Build.Id)
}
for _, t := range tasks {
if t.IsGithubCheck {
- if err = b.SetIsGithubCheck(); err != nil {
- return nil, nil, errors.Wrapf(err, "setting build '%s' as a GitHub check", b.Id)
+ if err = creationInfo.Build.SetIsGithubCheck(); err != nil {
+ return nil, nil, errors.Wrapf(err, "setting build '%s' as a GitHub check", creationInfo.Build.Id)
}
break
}
}
// update the build to hold the new tasks
- if err = RefreshTasksCache(b.Id); err != nil {
- return nil, nil, errors.Wrapf(err, "updating task cache for '%s'", b.Id)
+ if err = RefreshTasksCache(creationInfo.Build.Id); err != nil {
+ return nil, nil, errors.Wrapf(err, "updating task cache for '%s'", creationInfo.Build.Id)
}
batchTimeTaskStatuses := []BatchTimeTaskStatus{}
- tasksWithActivationTime := activationInfo.getActivationTasks(b.BuildVariant)
+ tasksWithActivationTime := creationInfo.ActivationInfo.getActivationTasks(creationInfo.Build.BuildVariant)
batchTimeCatcher := grip.NewBasicCatcher()
for _, t := range tasks {
if !utility.StringSliceContains(tasksWithActivationTime, t.DisplayName) {
continue
}
- activateTaskAt, err := pRef.GetActivationTimeForTask(project.FindTaskForVariant(t.DisplayName, b.BuildVariant))
+ activateTaskAt, err := creationInfo.ProjectRef.GetActivationTimeForTask(creationInfo.Project.FindTaskForVariant(t.DisplayName, creationInfo.Build.BuildVariant))
batchTimeCatcher.Wrapf(err, "getting activation time for task '%s'", t.DisplayName)
batchTimeTaskStatuses = append(batchTimeTaskStatuses, BatchTimeTaskStatus{
TaskName: t.DisplayName,
@@ -592,127 +581,107 @@ func addTasksToBuild(ctx context.Context, b *build.Build, project *Project, pRef
}
// update the build in the variant
- for i, status := range v.BuildVariants {
- if status.BuildVariant != b.BuildVariant {
+ for i, status := range creationInfo.Version.BuildVariants {
+ if status.BuildVariant != creationInfo.Build.BuildVariant {
continue
}
- v.BuildVariants[i].BatchTimeTasks = append(v.BuildVariants[i].BatchTimeTasks, batchTimeTaskStatuses...)
+ creationInfo.Version.BuildVariants[i].BatchTimeTasks = append(creationInfo.Version.BuildVariants[i].BatchTimeTasks, batchTimeTaskStatuses...)
}
grip.Error(message.WrapError(batchTimeCatcher.Resolve(), message.Fields{
"message": "unable to get activation time for tasks",
- "variant": b.BuildVariant,
+ "variant": creationInfo.Build.BuildVariant,
"runner": "addTasksToBuild",
- "version": v.Id,
+ "version": creationInfo.Version.Id,
}))
- return b, tasks, nil
-}
-
-// BuildCreateArgs is the set of parameters used in CreateBuildFromVersionNoInsert.
-type BuildCreateArgs struct {
- Project Project // project to create the build for
- ProjectRef ProjectRef // project ref associated with the build
- Version Version // the version the build belong to
- TaskIDs TaskIdConfig // pre-generated IDs for the tasks to be created
- BuildName string // name of the buildvariant
- ActivateBuild bool // true if the build should be scheduled
- ActivationInfo specificActivationInfo // indicates if the task has a specific activation or is a stepback task
- TaskNames []string // names of tasks to create (used in patches). Will create all if nil
- DisplayNames []string // names of display tasks to create (used in patches). Will create all if nil
- GeneratedBy string // ID of the task that generated this build
- SourceRev string // githash of the revision that triggered this build
- DefinitionID string // definition ID of the trigger used to create this build
- Aliases ProjectAliases // project aliases to use to filter tasks created
- DistroAliases distro.AliasLookupTable // map of distro aliases to names of distros
- TaskCreateTime time.Time // create time of tasks in the build
- GithubChecksAliases ProjectAliases // project aliases to use to filter tasks to count towards the github checks, if any
- SyncAtEndOpts patch.SyncAtEndOptions
+ return creationInfo.Build, tasks, nil
}
// CreateBuildFromVersionNoInsert creates a build given all of the necessary information
// from the corresponding version and project and a list of tasks. Note that the caller
// is responsible for inserting the created build and task documents
-func CreateBuildFromVersionNoInsert(args BuildCreateArgs) (*build.Build, task.Tasks, error) {
+func CreateBuildFromVersionNoInsert(creationInfo TaskCreationInfo) (*build.Build, task.Tasks, error) {
// avoid adding all tasks in the case of no tasks matching aliases
- if len(args.Aliases) > 0 && len(args.TaskNames) == 0 {
+ if len(creationInfo.Aliases) > 0 && len(creationInfo.TaskNames) == 0 {
return nil, nil, nil
}
- // find the build variant for this project/build
- buildVariant := args.Project.FindBuildVariant(args.BuildName)
+ // Find the build variant for this project/build
+ buildVariant := creationInfo.Project.FindBuildVariant(creationInfo.BuildVariantName)
if buildVariant == nil {
- return nil, nil, errors.Errorf("could not find build '%s' in project file '%s'", args.BuildName, args.Project.Identifier)
+ return nil, nil, errors.Errorf("could not find build '%s' in project file '%s'", creationInfo.BuildVariantName, creationInfo.Project.Identifier)
}
- rev := args.Version.Revision
- if evergreen.IsPatchRequester(args.Version.Requester) {
- rev = fmt.Sprintf("patch_%s_%s", args.Version.Revision, args.Version.Id)
- } else if args.Version.Requester == evergreen.TriggerRequester {
- rev = fmt.Sprintf("%s_%s", args.SourceRev, args.DefinitionID)
- } else if args.Version.Requester == evergreen.AdHocRequester {
- rev = args.Version.Id
- } else if args.Version.Requester == evergreen.GitTagRequester {
- rev = fmt.Sprintf("%s_%s", args.SourceRev, args.Version.TriggeredByGitTag.Tag)
+ rev := creationInfo.Version.Revision
+ if evergreen.IsPatchRequester(creationInfo.Version.Requester) {
+ rev = fmt.Sprintf("patch_%s_%s", creationInfo.Version.Revision, creationInfo.Version.Id)
+ } else if creationInfo.Version.Requester == evergreen.TriggerRequester {
+ rev = fmt.Sprintf("%s_%s", creationInfo.SourceRev, creationInfo.DefinitionID)
+ } else if creationInfo.Version.Requester == evergreen.AdHocRequester {
+ rev = creationInfo.Version.Id
+ } else if creationInfo.Version.Requester == evergreen.GitTagRequester {
+ rev = fmt.Sprintf("%s_%s", creationInfo.SourceRev, creationInfo.Version.TriggeredByGitTag.Tag)
}
// create a new build id
buildId := fmt.Sprintf("%s_%s_%s_%s",
- args.ProjectRef.Identifier,
- args.BuildName,
+ creationInfo.ProjectRef.Identifier,
+ creationInfo.BuildVariantName,
rev,
- args.Version.CreateTime.Format(build.IdTimeLayout))
+ creationInfo.Version.CreateTime.Format(build.IdTimeLayout))
activatedTime := utility.ZeroTime
- if args.ActivateBuild {
+ if creationInfo.ActivateBuild {
activatedTime = time.Now()
}
// create the build itself
b := &build.Build{
Id: util.CleanName(buildId),
- CreateTime: args.Version.CreateTime,
- Activated: args.ActivateBuild,
+ CreateTime: creationInfo.Version.CreateTime,
+ Activated: creationInfo.ActivateBuild,
ActivatedTime: activatedTime,
- Project: args.Project.Identifier,
- Revision: args.Version.Revision,
+ Project: creationInfo.Project.Identifier,
+ Revision: creationInfo.Version.Revision,
Status: evergreen.BuildCreated,
- BuildVariant: args.BuildName,
- Version: args.Version.Id,
+ BuildVariant: creationInfo.BuildVariantName,
+ Version: creationInfo.Version.Id,
DisplayName: buildVariant.DisplayName,
- RevisionOrderNumber: args.Version.RevisionOrderNumber,
- Requester: args.Version.Requester,
- ParentPatchID: args.Version.ParentPatchID,
- ParentPatchNumber: args.Version.ParentPatchNumber,
- TriggerID: args.Version.TriggerID,
- TriggerType: args.Version.TriggerType,
- TriggerEvent: args.Version.TriggerEvent,
+ RevisionOrderNumber: creationInfo.Version.RevisionOrderNumber,
+ Requester: creationInfo.Version.Requester,
+ ParentPatchID: creationInfo.Version.ParentPatchID,
+ ParentPatchNumber: creationInfo.Version.ParentPatchNumber,
+ TriggerID: creationInfo.Version.TriggerID,
+ TriggerType: creationInfo.Version.TriggerType,
+ TriggerEvent: creationInfo.Version.TriggerEvent,
Tags: buildVariant.Tags,
}
- // create all of the necessary tasks for the build
- tasksForBuild, err := createTasksForBuild(&args.Project, &args.ProjectRef, buildVariant, b, &args.Version, args.TaskIDs,
- args.TaskNames, args.DisplayNames, args.ActivationInfo, args.GeneratedBy,
- nil, args.SyncAtEndOpts, args.DistroAliases, args.TaskCreateTime, args.GithubChecksAliases)
+ // create all the necessary tasks for the build
+ creationInfo.BuildVariant = buildVariant
+ creationInfo.Build = b
+ tasksForBuild, err := createTasksForBuild(creationInfo)
if err != nil {
return nil, nil, errors.Wrapf(err, "creating tasks for build '%s'", b.Id)
}
- for _, t := range tasksForBuild {
- if t.IsGithubCheck {
- b.IsGithubCheck = true
- }
- break
- }
-
// create task caches for all of the tasks, and place them into the build
tasks := []task.Task{}
+ containsActivatedTask := false
+
for _, taskP := range tasksForBuild {
+ if taskP.IsGithubCheck {
+ b.IsGithubCheck = true
+ }
+ if taskP.Activated {
+ containsActivatedTask = true
+ }
if taskP.IsPartOfDisplay() {
continue // don't add execution parts of display tasks to the UI cache
}
tasks = append(tasks, *taskP)
}
b.Tasks = CreateTasksCache(tasks)
-
+ b.Activated = containsActivatedTask
return b, tasksForBuild, nil
}
@@ -731,67 +700,71 @@ func CreateTasksFromGroup(in BuildVariantTaskUnit, proj *Project, requester stri
// The slice of tasks will be in the same order as the project's specified tasks
// appear in the specified build variant.
// If tasksToActivate is nil, then all tasks will be activated.
-func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *BuildVariant, b *build.Build, v *Version,
- taskIds TaskIdConfig, taskNames []string, displayNames []string, activationInfo specificActivationInfo, generatedBy string,
- tasksInBuild []task.Task, syncAtEndOpts patch.SyncAtEndOptions, distroAliases map[string][]string, createTime time.Time,
- githubChecksAliases ProjectAliases) (task.Tasks, error) {
+func createTasksForBuild(creationInfo TaskCreationInfo) (task.Tasks, error) {
// The list of tasks we should create.
// If tasks are passed in, then use those, otherwise use the default set.
tasksToCreate := []BuildVariantTaskUnit{}
createAll := false
- if len(taskNames) == 0 && len(displayNames) == 0 {
+ if len(creationInfo.TaskNames) == 0 && len(creationInfo.DisplayNames) == 0 {
createAll = true
}
// Tables includes only new and existing tasks.
- execTable := taskIds.ExecutionTasks
- displayTable := taskIds.DisplayTasks
+ execTable := creationInfo.TaskIDs.ExecutionTasks
+ displayTable := creationInfo.TaskIDs.DisplayTasks
tgMap := map[string]TaskGroup{}
- for _, tg := range project.TaskGroups {
+ for _, tg := range creationInfo.Project.TaskGroups {
tgMap[tg.Name] = tg
}
+ for _, variant := range creationInfo.Project.BuildVariants {
+ for _, t := range variant.Tasks {
+ if t.TaskGroup != nil {
+ tgMap[t.Name] = *t.TaskGroup
+ }
+ }
+ }
- for _, task := range buildVariant.Tasks {
+ for _, task := range creationInfo.BuildVariant.Tasks {
// Verify that the config isn't malformed.
if task.Name != "" && !task.IsGroup {
- if task.IsDisabled() || task.SkipOnRequester(b.Requester) {
+ if task.IsDisabled() || task.SkipOnRequester(creationInfo.Build.Requester) {
continue
}
- if createAll || utility.StringSliceContains(taskNames, task.Name) {
+ if createAll || utility.StringSliceContains(creationInfo.TaskNames, task.Name) {
tasksToCreate = append(tasksToCreate, task)
}
} else if _, ok := tgMap[task.Name]; ok {
- tasksFromVariant := CreateTasksFromGroup(task, project, b.Requester)
+ tasksFromVariant := CreateTasksFromGroup(task, creationInfo.Project, creationInfo.Build.Requester)
for _, taskFromVariant := range tasksFromVariant {
- if task.IsDisabled() || taskFromVariant.SkipOnRequester(b.Requester) {
+ if task.IsDisabled() || taskFromVariant.SkipOnRequester(creationInfo.Build.Requester) {
continue
}
- if createAll || utility.StringSliceContains(taskNames, taskFromVariant.Name) {
+ if createAll || utility.StringSliceContains(creationInfo.TaskNames, taskFromVariant.Name) {
tasksToCreate = append(tasksToCreate, taskFromVariant)
}
}
} else {
return nil, errors.Errorf("config is malformed: variant '%s' runs "+
"task called '%s' but no such task exists for repo '%s' for "+
- "version '%s'", buildVariant.Name, task.Name, project.Identifier, v.Id)
+ "version '%s'", creationInfo.BuildVariant.Name, task.Name, creationInfo.Project.Identifier, creationInfo.Version.Id)
}
}
// if any tasks already exist in the build, add them to the id table
// so they can be used as dependencies
- for _, task := range tasksInBuild {
- execTable.AddId(b.BuildVariant, task.DisplayName, task.Id)
+ for _, task := range creationInfo.TasksInBuild {
+ execTable.AddId(creationInfo.Build.BuildVariant, task.DisplayName, task.Id)
}
generatorIsGithubCheck := false
- if generatedBy != "" {
- generateTask, err := task.FindOneId(generatedBy)
+ if creationInfo.GeneratedBy != "" {
+ generateTask, err := task.FindOneId(creationInfo.GeneratedBy)
if err != nil {
- return nil, errors.Wrapf(err, "finding generated task '%s'", generatedBy)
+ return nil, errors.Wrapf(err, "finding generated task '%s'", creationInfo.GeneratedBy)
}
if generateTask == nil {
- return nil, errors.Errorf("generated task '%s' not found", generatedBy)
+ return nil, errors.Errorf("generated task '%s' not found", creationInfo.GeneratedBy)
}
generatorIsGithubCheck = generateTask.IsGithubCheck
}
@@ -799,29 +772,31 @@ func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *Build
// create all the actual tasks
taskMap := make(map[string]*task.Task)
for _, t := range tasksToCreate {
- id := execTable.GetId(b.BuildVariant, t.Name)
- newTask, err := createOneTask(id, t, project, pRef, buildVariant, b, v, distroAliases, createTime, activationInfo, githubChecksAliases)
+ id := execTable.GetId(creationInfo.Build.BuildVariant, t.Name)
+ newTask, err := createOneTask(id, creationInfo, t)
if err != nil {
return nil, errors.Wrapf(err, "creating task '%s'", id)
}
- // set Tags based on the spec
- newTask.Tags = project.GetSpecForTask(t.Name).Tags
- newTask.DependsOn = makeDeps(t, newTask, execTable)
- newTask.GeneratedBy = generatedBy
+ projectTask := creationInfo.Project.FindProjectTask(t.Name)
+ if projectTask != nil {
+ newTask.Tags = projectTask.Tags
+ }
+ newTask.DependsOn = makeDeps(t.DependsOn, newTask, execTable)
+ newTask.GeneratedBy = creationInfo.GeneratedBy
if generatorIsGithubCheck {
newTask.IsGithubCheck = true
}
- if shouldSyncTask(syncAtEndOpts.VariantsTasks, newTask.BuildVariant, newTask.DisplayName) {
+ if shouldSyncTask(creationInfo.SyncAtEndOpts.VariantsTasks, newTask.BuildVariant, newTask.DisplayName) {
newTask.CanSync = true
newTask.SyncAtEndOpts = task.SyncAtEndOptions{
Enabled: true,
- Statuses: syncAtEndOpts.Statuses,
- Timeout: syncAtEndOpts.Timeout,
+ Statuses: creationInfo.SyncAtEndOpts.Statuses,
+ Timeout: creationInfo.SyncAtEndOpts.Timeout,
}
} else {
- cmds, err := project.CommandsRunOnTV(TVPair{TaskName: newTask.DisplayName, Variant: newTask.BuildVariant}, evergreen.S3PushCommandName)
+ cmds, err := creationInfo.Project.CommandsRunOnTV(TVPair{TaskName: newTask.DisplayName, Variant: newTask.BuildVariant}, evergreen.S3PushCommandName)
if err != nil {
return nil, errors.Wrapf(err, "checking if task definition contains command '%s'", evergreen.S3PushCommandName)
}
@@ -835,26 +810,26 @@ func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *Build
// Create and update display tasks
tasks := task.Tasks{}
- for _, dt := range buildVariant.DisplayTasks {
- id := displayTable.GetId(b.BuildVariant, dt.Name)
+ for _, dt := range creationInfo.BuildVariant.DisplayTasks {
+ id := displayTable.GetId(creationInfo.Build.BuildVariant, dt.Name)
if id == "" {
continue
}
execTasksThatNeedParentId := []string{}
execTaskIds := []string{}
displayTaskActivated := false
- displayTaskAlreadyExists := !createAll && !utility.StringSliceContains(displayNames, dt.Name)
+ displayTaskAlreadyExists := !createAll && !utility.StringSliceContains(creationInfo.DisplayNames, dt.Name)
// get display task activations status and update exec tasks
for _, et := range dt.ExecTasks {
- execTaskId := execTable.GetId(b.BuildVariant, et)
+ execTaskId := execTable.GetId(creationInfo.Build.BuildVariant, et)
if execTaskId == "" {
grip.Error(message.Fields{
"message": "execution task not found",
- "variant": b.BuildVariant,
+ "variant": creationInfo.Build.BuildVariant,
"exec_task": et,
"available_tasks": execTable,
- "project": project.Identifier,
+ "project": creationInfo.Project.Identifier,
"display_task": id,
"display_task_already_exists": displayTaskAlreadyExists,
})
@@ -878,7 +853,7 @@ func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *Build
"exec_tasks_to_update": execTasksThatNeedParentId,
"display_task_id": id,
"display_task": dt.Name,
- "build_id": b.Id,
+ "build_id": creationInfo.Build.Id,
}))
// existing display task may need to be updated
@@ -887,17 +862,17 @@ func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *Build
"message": "problem adding exec tasks to display tasks",
"exec_tasks": execTaskIds,
"display_task": dt.Name,
- "build_id": b.Id,
+ "build_id": creationInfo.Build.Id,
}))
} else { // need to create display task
if len(execTaskIds) == 0 {
continue
}
- newDisplayTask, err := createDisplayTask(id, dt.Name, execTaskIds, buildVariant, b, v, project, createTime, displayTaskActivated)
+ newDisplayTask, err := createDisplayTask(id, creationInfo, dt.Name, execTaskIds, creationInfo.TaskCreateTime, displayTaskActivated)
if err != nil {
return nil, errors.Wrapf(err, "creating display task '%s'", id)
}
- newDisplayTask.GeneratedBy = generatedBy
+ newDisplayTask.GeneratedBy = creationInfo.GeneratedBy
newDisplayTask.DependsOn, err = task.GetAllDependencies(newDisplayTask.ExecutionTasks, taskMap)
if err != nil {
return nil, errors.Wrapf(err, "getting dependencies for display task '%s'", newDisplayTask.Id)
@@ -906,6 +881,7 @@ func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *Build
tasks = append(tasks, newDisplayTask)
}
}
+ addSingleHostTaskGroupDependencies(taskMap, creationInfo.Project, execTable)
for _, t := range taskMap {
tasks = append(tasks, t)
@@ -921,11 +897,44 @@ func createTasksForBuild(project *Project, pRef *ProjectRef, buildVariant *Build
return tasks, nil
}
+// addSingleHostTaskGroupDependencies adds dependencies to tasks in a single-host task group
+func addSingleHostTaskGroupDependencies(taskMap map[string]*task.Task, p *Project, taskIds TaskIdTable) {
+ for _, t := range taskMap {
+ if t.TaskGroup == "" {
+ continue
+ }
+ tg := p.FindTaskGroup(t.TaskGroup)
+ if tg == nil || tg.MaxHosts > 1 {
+ continue
+ }
+ singleHostTGDeps := []TaskUnitDependency{}
+ // Iterate backwards until we find a task that exists in the taskMap. This task
+ // will be the parent dependency for the current single host TG task.
+ taskFound := false
+ for i := len(tg.Tasks) - 1; i >= 0; i-- {
+ // Check the task display names since no display name will appear twice
+ // within the same task group
+ if t.DisplayName == tg.Tasks[i] {
+ taskFound = true
+ continue
+ }
+ if _, ok := taskMap[taskIds.GetId(t.BuildVariant, tg.Tasks[i])]; ok && taskFound {
+ singleHostTGDeps = append(singleHostTGDeps, TaskUnitDependency{
+ Name: tg.Tasks[i],
+ Variant: t.BuildVariant,
+ })
+ break
+ }
+ }
+ t.DependsOn = append(t.DependsOn, makeDeps(singleHostTGDeps, t, taskIds)...)
+ }
+}
+
// makeDeps takes dependency definitions in the project and sets them in the task struct.
// dependencies between commit queue merges are set outside this function
-func makeDeps(t BuildVariantTaskUnit, thisTask *task.Task, taskIds TaskIdTable) []task.Dependency {
+func makeDeps(deps []TaskUnitDependency, thisTask *task.Task, taskIds TaskIdTable) []task.Dependency {
dependencySet := make(map[task.Dependency]bool)
- for _, dep := range t.DependsOn {
+ for _, dep := range deps {
status := evergreen.TaskSucceeded
if dep.Status != "" {
status = dep.Status
@@ -959,7 +968,7 @@ func makeDeps(t BuildVariantTaskUnit, thisTask *task.Task, taskIds TaskIdTable)
if id == thisTask.Id {
continue
}
- dependencySet[task.Dependency{TaskId: id, Status: status}] = true
+ dependencySet[task.Dependency{TaskId: id, Status: status, OmitGeneratedTasks: dep.OmitGeneratedTasks}] = true
}
}
@@ -1124,34 +1133,32 @@ func getAllNodesInDepGraph(startTaskId, startKey, linkKey string) []bson.M {
}
}
-func getTaskCreateTime(projectId string, v *Version) (time.Time, error) {
+func getTaskCreateTime(creationInfo TaskCreationInfo) (time.Time, error) {
createTime := time.Time{}
- if evergreen.IsPatchRequester(v.Requester) {
- baseVersion, err := VersionFindOne(BaseVersionByProjectIdAndRevision(projectId, v.Revision))
+ if evergreen.IsPatchRequester(creationInfo.Version.Requester) {
+ baseVersion, err := VersionFindOne(BaseVersionByProjectIdAndRevision(creationInfo.Project.Identifier, creationInfo.Version.Revision))
if err != nil {
return createTime, errors.Wrap(err, "finding base version for patch version")
}
if baseVersion == nil {
// The database data may be incomplete and missing the base Version
// In that case we don't want to fail, we fallback to the patch version's CreateTime.
- return v.CreateTime, nil
+ return creationInfo.Version.CreateTime, nil
}
return baseVersion.CreateTime, nil
} else {
- return v.CreateTime, nil
+ return creationInfo.Version.CreateTime, nil
}
}
// createOneTask is a helper to create a single task.
-func createOneTask(id string, buildVarTask BuildVariantTaskUnit, project *Project, pRef *ProjectRef, buildVariant *BuildVariant,
- b *build.Build, v *Version, dat distro.AliasLookupTable, createTime time.Time, activationInfo specificActivationInfo,
- githubChecksAliases ProjectAliases) (*task.Task, error) {
+func createOneTask(id string, creationInfo TaskCreationInfo, buildVarTask BuildVariantTaskUnit) (*task.Task, error) {
- activateTask := b.Activated && !activationInfo.taskHasSpecificActivation(b.BuildVariant, buildVarTask.Name)
- isStepback := activationInfo.isStepbackTask(b.BuildVariant, buildVarTask.Name)
+ activateTask := creationInfo.Build.Activated && !creationInfo.ActivationInfo.taskHasSpecificActivation(creationInfo.Build.BuildVariant, buildVarTask.Name)
+ isStepback := creationInfo.ActivationInfo.isStepbackTask(creationInfo.Build.BuildVariant, buildVarTask.Name)
- buildVarTask.RunOn = dat.Expand(buildVarTask.RunOn)
- buildVariant.RunOn = dat.Expand(buildVariant.RunOn)
+ buildVarTask.RunOn = creationInfo.DistroAliases.Expand(buildVarTask.RunOn)
+ creationInfo.BuildVariant.RunOn = creationInfo.DistroAliases.Expand(creationInfo.BuildVariant.RunOn)
activatedTime := utility.ZeroTime
if activateTask {
@@ -1159,14 +1166,14 @@ func createOneTask(id string, buildVarTask BuildVariantTaskUnit, project *Projec
}
isGithubCheck := false
- if len(githubChecksAliases) > 0 {
+ if len(creationInfo.GithubChecksAliases) > 0 {
var err error
- name, tags, ok := project.GetTaskNameAndTags(buildVarTask)
+ name, tags, ok := creationInfo.Project.GetTaskNameAndTags(buildVarTask)
if ok {
- isGithubCheck, err = githubChecksAliases.HasMatchingTask(name, tags)
+ isGithubCheck, err = creationInfo.GithubChecksAliases.HasMatchingTask(name, tags)
grip.Error(message.WrapError(err, message.Fields{
"message": "error checking if task matches aliases",
- "version": v.Id,
+ "version": creationInfo.Version.Id,
"task": buildVarTask.Name,
"variant": buildVarTask.Variant,
}))
@@ -1177,10 +1184,10 @@ func createOneTask(id string, buildVarTask BuildVariantTaskUnit, project *Projec
Id: id,
Secret: utility.RandomString(),
DisplayName: buildVarTask.Name,
- BuildId: b.Id,
- BuildVariant: buildVariant.Name,
- BuildVariantDisplayName: buildVariant.DisplayName,
- CreateTime: createTime,
+ BuildId: creationInfo.Build.Id,
+ BuildVariant: creationInfo.BuildVariant.Name,
+ BuildVariantDisplayName: creationInfo.BuildVariant.DisplayName,
+ CreateTime: creationInfo.TaskCreateTime,
IngestTime: time.Now(),
ScheduledTime: utility.ZeroTime,
StartTime: utility.ZeroTime, // Certain time fields must be initialized
@@ -1190,25 +1197,29 @@ func createOneTask(id string, buildVarTask BuildVariantTaskUnit, project *Projec
Status: evergreen.TaskUndispatched,
Activated: activateTask,
ActivatedTime: activatedTime,
- RevisionOrderNumber: v.RevisionOrderNumber,
- Requester: v.Requester,
- ParentPatchID: b.ParentPatchID,
- ParentPatchNumber: b.ParentPatchNumber,
- Version: v.Id,
- Revision: v.Revision,
- MustHaveResults: utility.FromBoolPtr(project.GetSpecForTask(buildVarTask.Name).MustHaveResults),
- Project: project.Identifier,
+ RevisionOrderNumber: creationInfo.Version.RevisionOrderNumber,
+ Requester: creationInfo.Version.Requester,
+ ParentPatchID: creationInfo.Build.ParentPatchID,
+ ParentPatchNumber: creationInfo.Build.ParentPatchNumber,
+ Version: creationInfo.Version.Id,
+ Revision: creationInfo.Version.Revision,
+ Project: creationInfo.Project.Identifier,
Priority: buildVarTask.Priority,
- GenerateTask: project.IsGenerateTask(buildVarTask.Name),
- TriggerID: v.TriggerID,
- TriggerType: v.TriggerType,
- TriggerEvent: v.TriggerEvent,
+ GenerateTask: creationInfo.Project.IsGenerateTask(buildVarTask.Name),
+ TriggerID: creationInfo.Version.TriggerID,
+ TriggerType: creationInfo.Version.TriggerType,
+ TriggerEvent: creationInfo.Version.TriggerEvent,
CommitQueueMerge: buildVarTask.CommitQueueMerge,
IsGithubCheck: isGithubCheck,
DisplayTaskId: utility.ToStringPtr(""), // this will be overridden if the task is an execution task
}
- t.ExecutionPlatform = shouldRunOnContainer(buildVarTask.RunOn, buildVariant.RunOn, project.Containers)
+ projectTask := creationInfo.Project.FindProjectTask(buildVarTask.Name)
+ if projectTask != nil {
+ t.MustHaveResults = utility.FromBoolPtr(projectTask.MustHaveResults)
+ }
+
+ t.ExecutionPlatform = shouldRunOnContainer(buildVarTask.RunOn, creationInfo.BuildVariant.RunOn, creationInfo.Project.Containers)
if t.IsContainerTask() {
flags, err := evergreen.GetServiceFlags()
if err != nil {
@@ -1218,34 +1229,38 @@ func createOneTask(id string, buildVarTask BuildVariantTaskUnit, project *Projec
return nil, errors.Errorf("container configurations are disabled; task '%s' cannot run", t.DisplayName)
}
- t.Container, err = getContainerFromRunOn(id, buildVarTask, buildVariant)
+ t.Container, err = getContainerFromRunOn(id, buildVarTask, creationInfo.BuildVariant)
if err != nil {
return nil, err
}
- opts, err := getContainerOptions(project, pRef, t.Container)
+ opts, err := getContainerOptions(creationInfo, t.Container)
if err != nil {
return nil, errors.Wrap(err, "getting container options")
}
t.ContainerOpts = *opts
} else {
- distroID, distroAliases, err := getDistrosFromRunOn(id, buildVarTask, buildVariant, project, v)
+ distroID, secondaryDistros, err := getDistrosFromRunOn(id, buildVarTask, creationInfo.BuildVariant)
if err != nil {
return nil, err
}
t.DistroId = distroID
- t.DistroAliases = distroAliases
+ t.SecondaryDistros = secondaryDistros
}
if isStepback {
t.ActivatedBy = evergreen.StepbackTaskActivator
+ t.StepbackDepth = creationInfo.ActivationInfo.getStepbackTaskDepth(t.BuildVariant, t.DisplayName)
} else if t.Activated {
- t.ActivatedBy = v.Author
+ t.ActivatedBy = creationInfo.Version.Author
}
if buildVarTask.IsGroup {
- tg := project.FindTaskGroup(buildVarTask.GroupName)
+ tg := buildVarTask.TaskGroup
+ if tg == nil {
+ tg = creationInfo.Project.FindTaskGroup(buildVarTask.GroupName)
+ }
if tg == nil {
- return nil, errors.Errorf("finding task group '%s' in project '%s'", buildVarTask.GroupName, project.Identifier)
+ return nil, errors.Errorf("finding task group '%s' in project '%s'", buildVarTask.GroupName, creationInfo.Project.Identifier)
}
tg.InjectInfo(t)
@@ -1254,21 +1269,21 @@ func createOneTask(id string, buildVarTask BuildVariantTaskUnit, project *Projec
return t, nil
}
-func getDistrosFromRunOn(id string, buildVarTask BuildVariantTaskUnit, buildVariant *BuildVariant, project *Project, v *Version) (string, []string, error) {
+func getDistrosFromRunOn(id string, buildVarTask BuildVariantTaskUnit, buildVariant *BuildVariant) (string, []string, error) {
if len(buildVarTask.RunOn) > 0 {
- distroAliases := []string{}
+ secondaryDistros := []string{}
distroID := buildVarTask.RunOn[0]
if len(buildVarTask.RunOn) > 1 {
- distroAliases = buildVarTask.RunOn[1:]
+ secondaryDistros = buildVarTask.RunOn[1:]
}
- return distroID, distroAliases, nil
+ return distroID, secondaryDistros, nil
} else if len(buildVariant.RunOn) > 0 {
- distroAliases := []string{}
+ secondaryDistros := []string{}
distroID := buildVariant.RunOn[0]
if len(buildVariant.RunOn) > 1 {
- distroAliases = buildVariant.RunOn[1:]
+ secondaryDistros = buildVariant.RunOn[1:]
}
- return distroID, distroAliases, nil
+ return distroID, secondaryDistros, nil
}
return "", nil, errors.Errorf("task '%s' is not runnable as there is no distro specified", id)
}
@@ -1307,8 +1322,8 @@ func getContainerFromRunOn(id string, buildVarTask BuildVariantTaskUnit, buildVa
// getContainerOptions resolves the task's container configuration based on the
// task's container name and the container definitions available to the project.
-func getContainerOptions(project *Project, pRef *ProjectRef, container string) (*task.ContainerOptions, error) {
- for _, c := range project.Containers {
+func getContainerOptions(creationInfo TaskCreationInfo, container string) (*task.ContainerOptions, error) {
+ for _, c := range creationInfo.Project.Containers {
if c.Name != container {
continue
}
@@ -1316,6 +1331,7 @@ func getContainerOptions(project *Project, pRef *ProjectRef, container string) (
opts := task.ContainerOptions{
WorkingDir: c.WorkingDir,
Image: c.Image,
+ RepoCredsName: c.Credential,
OS: c.System.OperatingSystem,
Arch: c.System.CPUArchitecture,
WindowsVersion: c.System.WindowsVersion,
@@ -1327,21 +1343,26 @@ func getContainerOptions(project *Project, pRef *ProjectRef, container string) (
return &opts, nil
}
- size, ok := pRef.ContainerSizes[c.Size]
- if !ok {
+ var containerSize *ContainerResources
+ for _, size := range creationInfo.ProjectRef.ContainerSizeDefinitions {
+ if size.Name == c.Size {
+ containerSize = &size
+ break
+ }
+ }
+ if containerSize == nil {
return nil, errors.Errorf("container size '%s' not found", c.Size)
}
- opts.CPU = size.CPU
- opts.MemoryMB = size.MemoryMB
+ opts.CPU = containerSize.CPU
+ opts.MemoryMB = containerSize.MemoryMB
return &opts, nil
}
return nil, errors.Errorf("definition for container '%s' not found", container)
}
-func createDisplayTask(id string, displayName string, execTasks []string, bv *BuildVariant, b *build.Build,
- v *Version, p *Project, createTime time.Time, displayTaskActivated bool) (*task.Task, error) {
+func createDisplayTask(id string, creationInfo TaskCreationInfo, displayName string, execTasks []string, createTime time.Time, displayTaskActivated bool) (*task.Task, error) {
activatedTime := utility.ZeroTime
if displayTaskActivated {
@@ -1351,17 +1372,17 @@ func createDisplayTask(id string, displayName string, execTasks []string, bv *Bu
t := &task.Task{
Id: id,
DisplayName: displayName,
- BuildVariant: bv.Name,
- BuildVariantDisplayName: bv.DisplayName,
- BuildId: b.Id,
+ BuildVariant: creationInfo.BuildVariant.Name,
+ BuildVariantDisplayName: creationInfo.BuildVariant.DisplayName,
+ BuildId: creationInfo.Build.Id,
CreateTime: createTime,
- RevisionOrderNumber: v.RevisionOrderNumber,
- Version: v.Id,
- Revision: v.Revision,
- Project: p.Identifier,
- Requester: v.Requester,
- ParentPatchID: b.ParentPatchID,
- ParentPatchNumber: b.ParentPatchNumber,
+ RevisionOrderNumber: creationInfo.Version.RevisionOrderNumber,
+ Version: creationInfo.Version.Id,
+ Revision: creationInfo.Version.Revision,
+ Project: creationInfo.Project.Identifier,
+ Requester: creationInfo.Version.Requester,
+ ParentPatchID: creationInfo.Build.ParentPatchID,
+ ParentPatchNumber: creationInfo.Build.ParentPatchNumber,
DisplayOnly: true,
ExecutionTasks: execTasks,
Status: evergreen.TaskUndispatched,
@@ -1372,9 +1393,9 @@ func createDisplayTask(id string, displayName string, execTasks []string, bv *Bu
ActivatedTime: activatedTime,
DispatchTime: utility.ZeroTime,
ScheduledTime: utility.ZeroTime,
- TriggerID: v.TriggerID,
- TriggerType: v.TriggerType,
- TriggerEvent: v.TriggerEvent,
+ TriggerID: creationInfo.Version.TriggerID,
+ TriggerType: creationInfo.Version.TriggerType,
+ TriggerEvent: creationInfo.Version.TriggerEvent,
DisplayTaskId: utility.ToStringPtr(""),
}
return t, nil
@@ -1517,10 +1538,8 @@ func sortLayer(layer []task.Task, idToDisplayName map[string]string) []task.Task
// do not exist yet out of the set of pairs. No tasks are added for builds which already exist
// (see AddNewTasksForPatch). New builds/tasks are activated depending on their batchtime.
// Returns activated task IDs.
-func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v *Version, p *Project, tasks TaskVariantPairs,
- existingBuilds []build.Build, syncAtEndOpts patch.SyncAtEndOptions, projectRef *ProjectRef, generatedBy string) ([]string, error) {
-
- taskIdTables, err := getTaskIdTables(v, p, tasks, projectRef.Identifier)
+func addNewBuilds(ctx context.Context, creationInfo TaskCreationInfo, existingBuilds []build.Build) ([]string, error) {
+ taskIdTables, err := getTaskIdTables(creationInfo)
if err != nil {
return nil, errors.Wrap(err, "making task ID table")
}
@@ -1534,42 +1553,42 @@ func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v
variantsProcessed[b.BuildVariant] = true
}
- createTime, err := getTaskCreateTime(p.Identifier, v)
+ createTime, err := getTaskCreateTime(creationInfo)
if err != nil {
return nil, errors.Wrap(err, "getting create time for tasks")
}
batchTimeCatcher := grip.NewBasicCatcher()
- for _, pair := range tasks.ExecTasks {
+ for _, pair := range creationInfo.Pairs.ExecTasks {
if _, ok := variantsProcessed[pair.Variant]; ok { // skip variant that was already processed
continue
}
variantsProcessed[pair.Variant] = true
// Extract the unique set of task names for the variant we're about to create
- taskNames := tasks.ExecTasks.TaskNames(pair.Variant)
- displayNames := tasks.DisplayTasks.TaskNames(pair.Variant)
- activateVariant := !activationInfo.variantHasSpecificActivation(pair.Variant)
- buildArgs := BuildCreateArgs{
- Project: *p,
- ProjectRef: *projectRef,
- Version: *v,
- TaskIDs: taskIdTables,
- BuildName: pair.Variant,
- ActivateBuild: activateVariant,
- TaskNames: taskNames,
- DisplayNames: displayNames,
- ActivationInfo: activationInfo,
- GeneratedBy: generatedBy,
- TaskCreateTime: createTime,
- SyncAtEndOpts: syncAtEndOpts,
+ taskNames := creationInfo.Pairs.ExecTasks.TaskNames(pair.Variant)
+ displayNames := creationInfo.Pairs.DisplayTasks.TaskNames(pair.Variant)
+ activateVariant := !creationInfo.ActivationInfo.variantHasSpecificActivation(pair.Variant)
+ buildCreationArgs := TaskCreationInfo{
+ Project: creationInfo.Project,
+ ProjectRef: creationInfo.ProjectRef,
+ Version: creationInfo.Version,
+ TaskIDs: taskIdTables,
+ BuildVariantName: pair.Variant,
+ ActivateBuild: activateVariant,
+ TaskNames: taskNames,
+ DisplayNames: displayNames,
+ ActivationInfo: creationInfo.ActivationInfo,
+ GeneratedBy: creationInfo.GeneratedBy,
+ TaskCreateTime: createTime,
+ SyncAtEndOpts: creationInfo.SyncAtEndOpts,
}
grip.Info(message.Fields{
"op": "creating build for version",
"variant": pair.Variant,
"activated": activateVariant,
- "version": v.Id,
+ "version": creationInfo.Version.Id,
})
- build, tasks, err := CreateBuildFromVersionNoInsert(buildArgs)
+ build, tasks, err := CreateBuildFromVersionNoInsert(buildCreationArgs)
if err != nil {
return nil, errors.WithStack(err)
}
@@ -1578,7 +1597,7 @@ func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v
"op": "skipping empty build for version",
"variant": pair.Variant,
"activated": activateVariant,
- "version": v.Id,
+ "version": creationInfo.Version.Id,
})
continue
}
@@ -1596,7 +1615,7 @@ func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v
if t.Activated {
newActivatedTaskIds = append(newActivatedTaskIds, t.Id)
}
- if activationInfo.taskHasSpecificActivation(t.BuildVariant, t.DisplayName) {
+ if creationInfo.ActivationInfo.taskHasSpecificActivation(t.BuildVariant, t.DisplayName) {
batchTimeTasksToIds[t.DisplayName] = t.Id
}
}
@@ -1604,11 +1623,11 @@ func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v
var activateVariantAt time.Time
batchTimeTaskStatuses := []BatchTimeTaskStatus{}
if !activateVariant {
- activateVariantAt, err = projectRef.GetActivationTimeForVariant(p.FindBuildVariant(pair.Variant))
+ activateVariantAt, err = creationInfo.ProjectRef.GetActivationTimeForVariant(creationInfo.Project.FindBuildVariant(pair.Variant))
batchTimeCatcher.Wrapf(err, "getting activation time for variant '%s'", pair.Variant)
}
for taskName, id := range batchTimeTasksToIds {
- activateTaskAt, err := projectRef.GetActivationTimeForTask(p.FindTaskForVariant(taskName, pair.Variant))
+ activateTaskAt, err := creationInfo.ProjectRef.GetActivationTimeForTask(creationInfo.Project.FindTaskForVariant(taskName, pair.Variant))
batchTimeCatcher.Wrapf(err, "getting activation time for task '%s' in variant '%s'", taskName, pair.Variant)
batchTimeTaskStatuses = append(batchTimeTaskStatuses, BatchTimeTaskStatus{
TaskId: id,
@@ -1634,11 +1653,11 @@ func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v
grip.Error(message.WrapError(batchTimeCatcher.Resolve(), message.Fields{
"message": "unable to get all activation times",
"runner": "addNewBuilds",
- "version": v.Id,
+ "version": creationInfo.Version.Id,
}))
return newActivatedTaskIds, errors.WithStack(VersionUpdateOne(
- bson.M{VersionIdKey: v.Id},
+ bson.M{VersionIdKey: creationInfo.Version.Id},
bson.M{
"$push": bson.M{
VersionBuildIdsKey: bson.M{"$each": newBuildIds},
@@ -1650,24 +1669,23 @@ func addNewBuilds(ctx context.Context, activationInfo specificActivationInfo, v
// Given a version and set of variant/task pairs, creates any tasks that don't exist yet,
// within the set of already existing builds. Returns activated task IDs.
-func addNewTasks(ctx context.Context, activationInfo specificActivationInfo, v *Version, p *Project, pRef *ProjectRef, pairs TaskVariantPairs,
- existingBuilds []build.Build, syncAtEndOpts patch.SyncAtEndOptions, generatedBy string) ([]string, error) {
- if v.BuildIds == nil {
+func addNewTasks(ctx context.Context, creationInfo TaskCreationInfo, existingBuilds []build.Build) ([]string, error) {
+ if creationInfo.Version.BuildIds == nil {
return nil, nil
}
-
distroAliases, err := distro.NewDistroAliasesLookupTable()
if err != nil {
return nil, err
}
- taskIdTables, err := getTaskIdTables(v, p, pairs, pRef.Identifier)
+ taskIdTables, err := getTaskIdTables(creationInfo)
if err != nil {
return nil, errors.Wrap(err, "getting table of task IDs")
}
activatedTaskIds := []string{}
activatedTasks := []task.Task{}
+ var buildIdsToActivate []string
for _, b := range existingBuilds {
wasActivated := b.Activated
// Find the set of task names that already exist for the given build, including display tasks.
@@ -1675,27 +1693,30 @@ func addNewTasks(ctx context.Context, activationInfo specificActivationInfo, v *
if err != nil {
return nil, err
}
-
existingTasksIndex := map[string]bool{}
+ hasActivatedTask := false
for _, t := range tasksInBuild {
+ if t.Activated {
+ hasActivatedTask = true
+ }
existingTasksIndex[t.DisplayName] = true
}
- projectBV := p.FindBuildVariant(b.BuildVariant)
- if projectBV != nil {
- b.Activated = utility.FromBoolTPtr(projectBV.Activate) // activate unless explicitly set otherwise
+ projectBV := creationInfo.Project.FindBuildVariant(b.BuildVariant)
+ if projectBV != nil && hasActivatedTask {
+ b.Activated = utility.FromBoolTPtr(projectBV.Activate)
}
// Build a list of tasks that haven't been created yet for the given variant, but have
// a record in the TVPairSet indicating that it should exist
tasksToAdd := []string{}
- for _, taskName := range pairs.ExecTasks.TaskNames(b.BuildVariant) {
+ for _, taskName := range creationInfo.Pairs.ExecTasks.TaskNames(b.BuildVariant) {
if ok := existingTasksIndex[taskName]; ok {
continue
}
tasksToAdd = append(tasksToAdd, taskName)
}
displayTasksToAdd := []string{}
- for _, taskName := range pairs.DisplayTasks.TaskNames(b.BuildVariant) {
+ for _, taskName := range creationInfo.Pairs.DisplayTasks.TaskNames(b.BuildVariant) {
if ok := existingTasksIndex[taskName]; ok {
continue
}
@@ -1705,8 +1726,13 @@ func addNewTasks(ctx context.Context, activationInfo specificActivationInfo, v *
continue
}
// Add the new set of tasks to the build.
- _, tasks, err := addTasksToBuild(ctx, &b, p, pRef, v, tasksToAdd, displayTasksToAdd, activationInfo,
- generatedBy, tasksInBuild, syncAtEndOpts, distroAliases, taskIdTables)
+ creationInfo.Build = &b
+ creationInfo.TasksInBuild = tasksInBuild
+ creationInfo.TaskIDs = taskIdTables
+ creationInfo.TaskNames = tasksToAdd
+ creationInfo.DisplayNames = displayTasksToAdd
+ creationInfo.DistroAliases = distroAliases
+ _, tasks, err := addTasksToBuild(ctx, creationInfo)
if err != nil {
return nil, err
}
@@ -1717,25 +1743,28 @@ func addNewTasks(ctx context.Context, activationInfo specificActivationInfo, v *
activatedTasks = append(activatedTasks, *t)
b.Activated = true
}
- if t.Activated && activationInfo.isStepbackTask(t.BuildVariant, t.DisplayName) {
+ if t.Activated && creationInfo.ActivationInfo.isStepbackTask(t.BuildVariant, t.DisplayName) {
event.LogTaskActivated(t.Id, t.Execution, evergreen.StepbackTaskActivator)
}
}
// update build activation status if tasks have since been activated
if !wasActivated && b.Activated {
- if err := build.UpdateActivation([]string{b.Id}, true, evergreen.DefaultTaskActivator); err != nil {
- return nil, err
- }
+ buildIdsToActivate = append(buildIdsToActivate, b.Id)
}
}
- if activationInfo.hasActivationTasks() {
- grip.Error(message.WrapError(v.UpdateBuildVariants(), message.Fields{
- "message": "unable to add batchtime tasks",
- "version": v.Id,
- }))
+ if len(buildIdsToActivate) > 0 {
+ if err := build.UpdateActivation(buildIdsToActivate, true, evergreen.DefaultTaskActivator); err != nil {
+ return nil, err
+ }
}
- if err = v.SetActivated(); err != nil {
- return nil, errors.Wrap(err, "setting version activation to true")
+ if creationInfo.ActivationInfo.hasActivationTasks() {
+ if err = creationInfo.Version.ActivateAndSetBuildVariants(); err != nil {
+ return nil, errors.Wrap(err, "activating version and adding batchtime tasks")
+ }
+ } else {
+ if err = creationInfo.Version.SetActivated(true); err != nil {
+ return nil, errors.Wrap(err, "setting version activation to true")
+ }
}
activatedTaskDependencies, err := task.GetRecursiveDependenciesUp(activatedTasks, nil)
@@ -1749,10 +1778,41 @@ func addNewTasks(ctx context.Context, activationInfo specificActivationInfo, v *
return activatedTaskIds, nil
}
-func getTaskIdTables(v *Version, p *Project, newPairs TaskVariantPairs, projectName string) (TaskIdConfig, error) {
+// activateExistingInactiveTasks will find existing inactive tasks in the patch that need to be activated as
+// part of the patch re-configuration.
+func activateExistingInactiveTasks(creationInfo TaskCreationInfo, existingBuilds []build.Build) error {
+ existingTasksToActivate := []task.Task{}
+ for _, b := range existingBuilds {
+ tasksInBuild, err := task.FindAll(db.Query(task.ByBuildId(b.Id)).WithFields(task.DisplayNameKey, task.ActivatedKey, task.BuildIdKey, task.VersionKey))
+ if err != nil {
+ return err
+ }
+ existingTasksIndex := map[string]task.Task{}
+ for i := range tasksInBuild {
+ existingTasksIndex[tasksInBuild[i].DisplayName] = tasksInBuild[i]
+ }
+ execAndDisplayTasks := append(creationInfo.Pairs.ExecTasks.TaskNames(b.BuildVariant), creationInfo.Pairs.DisplayTasks.TaskNames(b.BuildVariant)...)
+ for _, taskName := range execAndDisplayTasks {
+ if t, ok := existingTasksIndex[taskName]; ok && !t.Activated {
+ existingTasksToActivate = append(existingTasksToActivate, t)
+ }
+ }
+ }
+ if len(existingTasksToActivate) > 0 {
+ if err := SetActiveState(evergreen.DefaultTaskActivator, true, existingTasksToActivate...); err != nil {
+ return errors.Wrap(err, "setting tasks to active")
+ }
+ }
+ return nil
+}
+
+func getTaskIdTables(creationInfo TaskCreationInfo) (TaskIdConfig, error) {
// The table should include only new and existing tasks
- taskIdTable := NewPatchTaskIdTable(p, v, newPairs, projectName)
- existingTasks, err := task.FindAll(db.Query(task.ByVersion(v.Id)).WithFields(task.DisplayOnlyKey, task.DisplayNameKey, task.BuildVariantKey))
+ taskIdTable, err := NewPatchTaskIdTable(creationInfo.Project, creationInfo.Version, creationInfo.Pairs, creationInfo.ProjectRef.Identifier)
+ if err != nil {
+ return TaskIdConfig{}, errors.Wrap(err, "creating patch's task ID table")
+ }
+ existingTasks, err := task.FindAll(db.Query(task.ByVersion(creationInfo.Version.Id)).WithFields(task.DisplayOnlyKey, task.DisplayNameKey, task.BuildVariantKey))
if err != nil {
return TaskIdConfig{}, errors.Wrap(err, "getting existing task IDs")
}
diff --git a/model/lifecycle_test.go b/model/lifecycle_test.go
index de7f405d2a1..41bf6b39965 100644
--- a/model/lifecycle_test.go
+++ b/model/lifecycle_test.go
@@ -30,37 +30,53 @@ func TestTaskSetPriority(t *testing.T) {
Convey("With a task", t, func() {
- require.NoError(t, db.ClearCollections(task.Collection, build.Collection))
+ require.NoError(t, db.ClearCollections(task.Collection, build.Collection, VersionCollection))
+
+ v := &Version{Id: "abcdef"}
+ require.NoError(t, v.Insert())
tasks := []task.Task{
{
- Id: "one",
- DependsOn: []task.Dependency{{TaskId: "two", Status: ""}, {TaskId: "three", Status: ""}, {TaskId: "four", Status: ""}},
- Activated: true,
- BuildId: "b0",
+ Id: "one",
+ DependsOn: []task.Dependency{{TaskId: "two", Status: ""}, {TaskId: "three", Status: ""}, {TaskId: "four", Status: ""}},
+ Activated: true,
+ BuildId: "b0",
+ Version: v.Id,
+ DisplayOnly: true,
+ ExecutionTasks: []string{"six"},
},
{
Id: "two",
Priority: 5,
Activated: true,
+ BuildId: "b0",
+ Version: v.Id,
},
{
Id: "three",
DependsOn: []task.Dependency{{TaskId: "five", Status: ""}},
Activated: true,
+ BuildId: "b0",
+ Version: v.Id,
},
{
Id: "four",
DependsOn: []task.Dependency{{TaskId: "five", Status: ""}},
Activated: true,
+ BuildId: "b0",
+ Version: v.Id,
},
{
Id: "five",
Activated: true,
+ BuildId: "b0",
+ Version: v.Id,
},
{
Id: "six",
Activated: true,
+ BuildId: "b0",
+ Version: v.Id,
},
}
@@ -106,11 +122,11 @@ func TestTaskSetPriority(t *testing.T) {
So(err, ShouldBeNil)
So(t, ShouldNotBeNil)
So(t.Id, ShouldEqual, "six")
- So(t.Priority, ShouldEqual, 0)
+ So(t.Priority, ShouldEqual, 1)
})
- Convey("decreasing priority should update the task but not its dependencies", func() {
+ Convey("decreasing priority should update the task and its execution tasks but not its dependencies", func() {
So(SetTaskPriority(tasks[0], 1, "user"), ShouldBeNil)
So(tasks[0].Activated, ShouldEqual, true)
So(SetTaskPriority(tasks[0], -1, "user"), ShouldBeNil)
@@ -151,8 +167,8 @@ func TestTaskSetPriority(t *testing.T) {
So(err, ShouldBeNil)
So(t, ShouldNotBeNil)
So(t.Id, ShouldEqual, "six")
- So(t.Priority, ShouldEqual, 0)
- So(t.Activated, ShouldEqual, true)
+ So(t.Priority, ShouldEqual, -1)
+ So(t.Activated, ShouldEqual, false)
})
})
}
@@ -161,20 +177,21 @@ func TestBuildSetPriority(t *testing.T) {
Convey("With a build", t, func() {
- require.NoError(t, db.ClearCollections(build.Collection, task.Collection))
+ require.NoError(t, db.ClearCollections(build.Collection, task.Collection, VersionCollection))
- b := &build.Build{
- Id: "build",
- }
+ b := &build.Build{Id: "build"}
So(b.Insert(), ShouldBeNil)
- taskOne := &task.Task{Id: "taskOne", BuildId: b.Id}
+ v := &Version{Id: "abcdef"}
+ require.NoError(t, v.Insert())
+
+ taskOne := &task.Task{Id: "taskOne", BuildId: b.Id, Version: v.Id}
So(taskOne.Insert(), ShouldBeNil)
- taskTwo := &task.Task{Id: "taskTwo", BuildId: b.Id}
+ taskTwo := &task.Task{Id: "taskTwo", BuildId: b.Id, Version: v.Id}
So(taskTwo.Insert(), ShouldBeNil)
- taskThree := &task.Task{Id: "taskThree", BuildId: b.Id}
+ taskThree := &task.Task{Id: "taskThree", BuildId: b.Id, Version: v.Id}
So(taskThree.Insert(), ShouldBeNil)
Convey("setting its priority should update the priority"+
@@ -195,14 +212,21 @@ func TestBuildSetPriority(t *testing.T) {
}
func TestBuildRestart(t *testing.T) {
- Convey("Restarting a build", t, func() {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(task.Collection, task.OldCollection, VersionCollection, build.Collection))
+ }()
+ // Running a multi-document transaction requires the collections to exist
+ // first before any documents can be inserted.
+ require.NoError(t, db.CreateCollections(task.Collection, task.OldCollection, VersionCollection, build.Collection))
+ require.NoError(t, db.ClearCollections(task.Collection, task.OldCollection, build.Collection))
+ v := &Version{Id: "version"}
+ require.NoError(t, v.Insert())
+ b := &build.Build{Id: "build", Version: "version"}
+ require.NoError(t, b.Insert())
+ Convey("Restarting a build", t, func() {
Convey("with task abort should update the status of"+
- " non in-progress tasks and abort in-progress ones", func() {
-
- require.NoError(t, db.ClearCollections(build.Collection, task.Collection, task.OldCollection))
- b := &build.Build{Id: "build"}
- So(b.Insert(), ShouldBeNil)
+ " non in-progress tasks and abort in-progress ones and mark them to be reset", func() {
taskOne := &task.Task{
Id: "task1",
@@ -222,7 +246,7 @@ func TestBuildRestart(t *testing.T) {
}
So(taskTwo.Insert(), ShouldBeNil)
- So(RestartBuild(b.Id, []string{"task1", "task2"}, true, evergreen.DefaultTaskActivator), ShouldBeNil)
+ So(RestartBuild(b, []string{"task1", "task2"}, true, evergreen.DefaultTaskActivator), ShouldBeNil)
var err error
b, err = build.FindOne(build.ById(b.Id))
So(err, ShouldBeNil)
@@ -234,15 +258,11 @@ func TestBuildRestart(t *testing.T) {
taskTwo, err = task.FindOne(db.Query(task.ById("task2")))
So(err, ShouldBeNil)
So(taskTwo.Aborted, ShouldEqual, true)
+ So(taskTwo.ResetWhenFinished, ShouldBeTrue)
})
Convey("without task abort should update the status"+
" of only those build tasks not in-progress", func() {
-
- require.NoError(t, db.ClearCollections(build.Collection))
- b := &build.Build{Id: "build"}
- So(b.Insert(), ShouldBeNil)
-
taskThree := &task.Task{
Id: "task3",
DisplayName: "task3",
@@ -261,11 +281,10 @@ func TestBuildRestart(t *testing.T) {
}
So(taskFour.Insert(), ShouldBeNil)
- So(RestartBuild(b.Id, []string{"task3", "task4"}, false, evergreen.DefaultTaskActivator), ShouldBeNil)
+ So(RestartBuild(b, []string{"task3", "task4"}, false, evergreen.DefaultTaskActivator), ShouldBeNil)
var err error
b, err = build.FindOne(build.ById(b.Id))
So(err, ShouldBeNil)
- So(err, ShouldBeNil)
So(b.Status, ShouldEqual, evergreen.BuildStarted)
taskThree, err = task.FindOne(db.Query(task.ById("task3")))
So(err, ShouldBeNil)
@@ -276,6 +295,93 @@ func TestBuildRestart(t *testing.T) {
So(taskFour.Status, ShouldEqual, evergreen.TaskDispatched)
})
+ Convey("single host task group tasks be omitted from the immediate restart logic", func() {
+
+ taskFive := &task.Task{
+ Id: "task5",
+ DisplayName: "task5",
+ BuildId: b.Id,
+ Status: evergreen.TaskSucceeded,
+ Activated: true,
+ TaskGroup: "tg",
+ TaskGroupMaxHosts: 1,
+ }
+ So(taskFive.Insert(), ShouldBeNil)
+
+ taskSix := &task.Task{
+ Id: "task6",
+ DisplayName: "task6",
+ BuildId: b.Id,
+ Status: evergreen.TaskDispatched,
+ Activated: true,
+ TaskGroup: "tg",
+ TaskGroupMaxHosts: 1,
+ }
+ So(taskSix.Insert(), ShouldBeNil)
+
+ taskSeven := &task.Task{
+ Id: "task7",
+ DisplayName: "task7",
+ BuildId: b.Id,
+ Status: evergreen.TaskSucceeded,
+ Activated: true,
+ }
+ So(taskSeven.Insert(), ShouldBeNil)
+
+ So(RestartBuild(b, []string{"task5", "task6", "task7"}, false, evergreen.DefaultTaskActivator), ShouldBeNil)
+ var err error
+ b, err = build.FindOne(build.ById(b.Id))
+ So(err, ShouldBeNil)
+ So(b.Status, ShouldEqual, evergreen.BuildStarted)
+ taskFive, err = task.FindOne(db.Query(task.ById("task5")))
+ So(err, ShouldBeNil)
+ So(taskFive.Status, ShouldEqual, evergreen.TaskSucceeded)
+ So(taskFive.ResetWhenFinished, ShouldBeTrue)
+ taskSix, err = task.FindOne(db.Query(task.ById("task6")))
+ So(err, ShouldBeNil)
+ taskSeven, err = task.FindOne(db.Query(task.ById("task7")))
+ So(err, ShouldBeNil)
+ So(taskSeven.Status, ShouldEqual, evergreen.TaskUndispatched)
+ })
+
+ Convey("a fully completed single host task group should get reset", func() {
+ taskEight := &task.Task{
+ Id: "task8",
+ DisplayName: "task8",
+ BuildId: b.Id,
+ Version: v.Id,
+ Status: evergreen.TaskSucceeded,
+ Activated: true,
+ TaskGroup: "tg2",
+ TaskGroupMaxHosts: 1,
+ }
+ So(taskEight.Insert(), ShouldBeNil)
+
+ taskNine := &task.Task{
+ Id: "task9",
+ DisplayName: "task9",
+ BuildId: b.Id,
+ Version: v.Id,
+ Status: evergreen.TaskSucceeded,
+ Activated: true,
+ TaskGroup: "tg2",
+ TaskGroupMaxHosts: 1,
+ }
+ So(taskNine.Insert(), ShouldBeNil)
+
+ So(RestartBuild(b, []string{"task8", "task9"}, false, evergreen.DefaultTaskActivator), ShouldBeNil)
+ var err error
+ b, err = build.FindOne(build.ById(b.Id))
+ So(err, ShouldBeNil)
+ So(b.Status, ShouldEqual, evergreen.BuildStarted)
+ taskEight, err = task.FindOne(db.Query(task.ById("task8")))
+ So(err, ShouldBeNil)
+ So(taskEight.Status, ShouldEqual, evergreen.TaskUndispatched)
+ taskNine, err = task.FindOne(db.Query(task.ById("task9")))
+ So(err, ShouldBeNil)
+ So(taskNine.Status, ShouldEqual, evergreen.TaskUndispatched)
+ })
+
})
}
@@ -367,20 +473,20 @@ func TestSetVersionActivation(t *testing.T) {
require.NoError(t, db.ClearCollections(build.Collection, task.Collection, VersionCollection))
vID := "abcdef"
- v := &Version{Id: vID}
+ v := &Version{Id: vID, BuildIds: []string{"b0", "b1"}}
require.NoError(t, v.Insert())
builds := []build.Build{
- {Id: "b0", Version: vID, Activated: true},
- {Id: "b1", Version: vID, Activated: true},
+ {Id: "b0", Version: vID, Activated: true, Tasks: []build.TaskCache{{Id: "t0"}}, Status: evergreen.BuildCreated},
+ {Id: "b1", Version: vID, Activated: true, Tasks: []build.TaskCache{{Id: "t1"}}, Status: evergreen.BuildSucceeded},
}
for _, build := range builds {
require.NoError(t, build.Insert())
}
tasks := []task.Task{
- {Id: "t0", BuildId: "b0", Activated: true, Status: evergreen.TaskUndispatched},
- {Id: "t1", BuildId: "b1", Activated: true, Status: evergreen.TaskSucceeded},
+ {Id: "t0", BuildId: "b0", Version: vID, Activated: true, Status: evergreen.TaskUndispatched},
+ {Id: "t1", BuildId: "b1", Version: vID, Activated: true, Status: evergreen.TaskSucceeded},
}
for _, task := range tasks {
require.NoError(t, task.Insert())
@@ -422,6 +528,7 @@ func TestBuildSetActivated(t *testing.T) {
Activated: true,
BuildVariant: "bv",
Version: vID,
+ Status: evergreen.BuildStarted,
}
So(b.Insert(), ShouldBeNil)
@@ -486,7 +593,7 @@ func TestBuildSetActivated(t *testing.T) {
}
So(canary.Insert(), ShouldBeNil)
- So(SetBuildActivation(b.Id, false, evergreen.DefaultTaskActivator), ShouldBeNil)
+ So(ActivateBuildsAndTasks([]string{b.Id}, false, evergreen.DefaultTaskActivator), ShouldBeNil)
// the build should have been updated in the db
b, err := build.FindOne(build.ById(b.Id))
So(err, ShouldBeNil)
@@ -505,7 +612,7 @@ func TestBuildSetActivated(t *testing.T) {
So(differentUserTask.Activated, ShouldBeTrue)
So(differentUserTask.ActivatedBy, ShouldEqual, user)
- So(SetBuildActivation(b.Id, true, evergreen.DefaultTaskActivator), ShouldBeNil)
+ So(ActivateBuildsAndTasks([]string{b.Id}, true, evergreen.DefaultTaskActivator), ShouldBeNil)
activatedTasks, err := task.Find(task.ByActivation(true))
So(err, ShouldBeNil)
So(len(activatedTasks), ShouldEqual, 5)
@@ -551,7 +658,7 @@ func TestBuildSetActivated(t *testing.T) {
So(matching2.Insert(), ShouldBeNil)
// have a user set the build activation to true
- So(SetBuildActivation(b.Id, true, user), ShouldBeNil)
+ So(ActivateBuildsAndTasks([]string{b.Id}, true, user), ShouldBeNil)
// task with the different user activating should be activated with that user
task1, err := task.FindOne(db.Query(task.ById(matching.Id)))
@@ -572,7 +679,7 @@ func TestBuildSetActivated(t *testing.T) {
So(b.ActivatedBy, ShouldEqual, user)
// deactivate the task from evergreen and nothing should be deactivated.
- So(SetBuildActivation(b.Id, false, evergreen.DefaultTaskActivator), ShouldBeNil)
+ So(ActivateBuildsAndTasks([]string{b.Id}, false, evergreen.DefaultTaskActivator), ShouldBeNil)
// refresh from the database and check again
b, err = build.FindOne(build.ById(b.Id))
@@ -728,16 +835,29 @@ func TestCreateBuildFromVersion(t *testing.T) {
},
},
}
-
- smallContainerSize := ContainerResources{
- MemoryMB: 128,
- CPU: 256,
+ buildVar5 := parserBV{
+ Name: "buildVar5",
+ DisplayName: "Build Variant 5",
+ RunOn: []string{"arch"},
+ Tasks: parserBVTaskUnits{
+ {Name: "singleHostTaskGroup"},
+ },
}
+
pref := &ProjectRef{
Id: "projectId",
Identifier: "projectName",
- ContainerSizes: map[string]ContainerResources{
- "small": smallContainerSize,
+ ContainerSizeDefinitions: []ContainerResources{
+ {
+ Name: "small",
+ CPU: 256,
+ MemoryMB: 128,
+ },
+ {
+ Name: "large",
+ CPU: 512,
+ MemoryMB: 256,
+ },
},
}
So(pref.Insert(), ShouldBeNil)
@@ -758,6 +878,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
OperatingSystem: evergreen.LinuxOS,
CPUArchitecture: evergreen.ArchARM64,
},
+ Credential: "repo_creds",
}
container2 := Container{
Name: "container2",
@@ -772,6 +893,13 @@ func TestCreateBuildFromVersion(t *testing.T) {
}
parserProject := &ParserProject{
Identifier: utility.ToStringPtr("projectId"),
+ TaskGroups: []parserTaskGroup{
+ {
+ Name: "singleHostTaskGroup",
+ MaxHosts: 1,
+ Tasks: []string{"singleHostTaskGroup1", "singleHostTaskGroup2", "singleHostTaskGroup3"},
+ },
+ },
Tasks: []parserTask{
{
Name: "taskA",
@@ -813,9 +941,18 @@ func TestCreateBuildFromVersion(t *testing.T) {
},
},
},
+ {
+ Name: "singleHostTaskGroup1",
+ },
+ {
+ Name: "singleHostTaskGroup2",
+ },
+ {
+ Name: "singleHostTaskGroup3",
+ },
},
Containers: []Container{container1, container2},
- BuildVariants: []parserBV{buildVar1, buildVar2, buildVar3, buildVar4},
+ BuildVariants: []parserBV{buildVar1, buildVar2, buildVar3, buildVar4, buildVar5},
}
// the mock version we'll be using
@@ -842,6 +979,10 @@ func TestCreateBuildFromVersion(t *testing.T) {
BuildVariant: buildVar4.Name,
ActivationStatus: ActivationStatus{Activated: true},
},
+ {
+ BuildVariant: buildVar5.Name,
+ ActivationStatus: ActivationStatus{Activated: true},
+ },
},
}
So(v.Insert(), ShouldBeNil)
@@ -875,17 +1016,16 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("if a non-existent build variant is passed in, an error should be returned", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: "blecch",
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: "blecch",
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldNotBeNil)
So(build, ShouldBeNil)
So(tasks, ShouldBeNil)
@@ -893,24 +1033,23 @@ func TestCreateBuildFromVersion(t *testing.T) {
Convey("if no task names are passed in to be used, all of the default"+
" tasks for the build variant should be created", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build, ShouldNotBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(tasks), ShouldEqual, 6)
- args.BuildName = buildVar2.Name
- build, tasks, err = CreateBuildFromVersionNoInsert(args)
+ creationInfo.BuildVariantName = buildVar2.Name
+ build, tasks, err = CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build, ShouldNotBeNil)
So(build.Id, ShouldNotEqual, "")
@@ -920,17 +1059,16 @@ func TestCreateBuildFromVersion(t *testing.T) {
Convey("if a non-empty list of task names is passed in, only the"+
" specified tasks should be created", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: true,
- TaskNames: []string{"taskA", "taskB"},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: true,
+ TaskNames: []string{"taskA", "taskB"},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(tasks), ShouldEqual, 2)
@@ -941,19 +1079,19 @@ func TestCreateBuildFromVersion(t *testing.T) {
Convey("if a non-empty list of TasksWithBatchTime is passed in, only the specified tasks should be activated", func() {
batchTimeTasks := []string{"taskA", "taskB"}
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: true,
- TaskNames: []string{"taskA", "taskB", "taskC", "taskD"}, // excluding display tasks
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: true,
+ TaskNames: []string{"taskA", "taskB", "taskC", "taskD"}, // excluding display tasks
ActivationInfo: specificActivationInfo{activationTasks: map[string][]string{
buildVar1.Name: batchTimeTasks},
},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(tasks), ShouldEqual, 4)
@@ -967,35 +1105,33 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("if an alias is passed in, dependencies are also created", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar2.Name,
- ActivateBuild: false,
- Aliases: []ProjectAlias{alias},
- TaskNames: []string{"taskA", "taskB", "taskC"},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar2.Name,
+ ActivateBuild: false,
+ Aliases: []ProjectAlias{alias},
+ TaskNames: []string{"taskA", "taskB", "taskC"},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(tasks), ShouldEqual, 3)
})
Convey("ensure distro is populated to tasks", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
- TaskNames: []string{"taskA", "taskB"},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
+ TaskNames: []string{"taskA", "taskB"},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
for _, t := range tasks {
@@ -1005,15 +1141,15 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("host execution mode should be populated for execution tasks running on a distro", func() {
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
for _, t := range tasks {
@@ -1026,31 +1162,32 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("execution platform should be set to containers and container options should be populated when run_on contains a container name", func() {
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar4.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar4.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(build.Tasks), ShouldEqual, 4)
bvContainerOpts := task.ContainerOptions{
- CPU: container1.Resources.CPU,
- MemoryMB: container1.Resources.MemoryMB,
- WorkingDir: container1.WorkingDir,
- Image: container1.Image,
- OS: container1.System.OperatingSystem,
- Arch: container1.System.CPUArchitecture,
+ CPU: container1.Resources.CPU,
+ MemoryMB: container1.Resources.MemoryMB,
+ WorkingDir: container1.WorkingDir,
+ Image: container1.Image,
+ OS: container1.System.OperatingSystem,
+ Arch: container1.System.CPUArchitecture,
+ RepoCredsName: container1.Credential,
}
taskContainerOpts := task.ContainerOptions{
- CPU: smallContainerSize.CPU,
- MemoryMB: smallContainerSize.MemoryMB,
+ CPU: 256,
+ MemoryMB: 128,
WorkingDir: container2.WorkingDir,
Image: container2.Image,
OS: container2.System.OperatingSystem,
@@ -1070,17 +1207,16 @@ func TestCreateBuildFromVersion(t *testing.T) {
Convey("the build should contain task caches that correspond exactly"+
" to the tasks created", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar2.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar2.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(tasks), ShouldEqual, 4)
@@ -1095,16 +1231,16 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("a task cache should not contain execution tasks that are part of a display task", func() {
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(len(build.Tasks), ShouldEqual, 2)
@@ -1123,26 +1259,25 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("all of the tasks created should have the dependencies"+
"and priorities specified in the project", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, tasks1, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks1, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
- args.BuildName = buildVar2.Name
- build, tasks2, err := CreateBuildFromVersionNoInsert(args)
+ creationInfo.BuildVariantName = buildVar2.Name
+ build, tasks2, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
- args.BuildName = buildVar3.Name
- build, tasks3, err := CreateBuildFromVersionNoInsert(args)
+ creationInfo.BuildVariantName = buildVar3.Name
+ build, tasks3, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
@@ -1186,21 +1321,20 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(dbTasks[7].DependsOn, ShouldContain, task.Dependency{TaskId: dbTasks[5].Id, Status: evergreen.TaskSucceeded})
So(dbTasks[8].DisplayName, ShouldEqual, "taskE")
- So(len(dbTasks[8].DependsOn), ShouldEqual, 12)
+ So(len(dbTasks[8].DependsOn), ShouldEqual, 15)
})
Convey("all of the build's essential fields should be set correctly", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
}
- build, _, err := CreateBuildFromVersionNoInsert(args)
+ build, _, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
@@ -1221,15 +1355,14 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("all of the tasks' essential fields should be set correctly", func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: false,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: false,
+ TaskNames: []string{},
SyncAtEndOpts: patch.SyncAtEndOptions{
BuildVariants: []string{buildVar1.Name},
Tasks: []string{"taskA", "taskB"},
@@ -1242,7 +1375,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
},
TaskCreateTime: time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
@@ -1253,7 +1386,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[2].BuildId, ShouldEqual, build.Id)
So(tasks[2].DistroId, ShouldEqual, "arch")
So(tasks[2].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[2].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[2].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[2].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[2].Activated, ShouldBeFalse)
So(tasks[2].ActivatedTime.Equal(utility.ZeroTime), ShouldBeTrue)
@@ -1270,7 +1403,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[3].BuildId, ShouldEqual, build.Id)
So(tasks[3].DistroId, ShouldEqual, "arch")
So(tasks[3].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[3].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[3].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[3].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[3].Activated, ShouldBeFalse)
So(tasks[3].ActivatedTime.Equal(utility.ZeroTime), ShouldBeTrue)
@@ -1287,7 +1420,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[4].BuildId, ShouldEqual, build.Id)
So(tasks[4].DistroId, ShouldEqual, "arch")
So(tasks[4].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[4].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[4].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[4].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[4].Activated, ShouldBeFalse)
So(tasks[4].ActivatedTime.Equal(utility.ZeroTime), ShouldBeTrue)
@@ -1304,7 +1437,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[5].BuildId, ShouldEqual, build.Id)
So(tasks[5].DistroId, ShouldEqual, "arch")
So(tasks[5].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[5].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[5].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[5].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[5].Activated, ShouldBeFalse)
So(tasks[5].ActivatedTime.Equal(utility.ZeroTime), ShouldBeTrue)
@@ -1318,18 +1451,17 @@ func TestCreateBuildFromVersion(t *testing.T) {
Convey("if the activated flag is set, the build and all its tasks should be activated",
func() {
-
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: true,
- TaskNames: []string{},
- TaskCreateTime: time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: true,
+ TaskNames: []string{},
+ TaskCreateTime: time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
So(build.Id, ShouldNotEqual, "")
So(build.Activated, ShouldBeTrue)
@@ -1342,7 +1474,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[2].BuildId, ShouldEqual, build.Id)
So(tasks[2].DistroId, ShouldEqual, "arch")
So(tasks[2].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[2].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[2].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[2].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[2].Activated, ShouldBeTrue)
So(tasks[2].ActivatedTime.Equal(utility.ZeroTime), ShouldBeFalse)
@@ -1358,7 +1490,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[3].BuildId, ShouldEqual, build.Id)
So(tasks[3].DistroId, ShouldEqual, "arch")
So(tasks[3].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[3].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[3].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[3].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[3].Activated, ShouldBeTrue)
So(tasks[3].ActivatedTime.Equal(utility.ZeroTime), ShouldBeFalse)
@@ -1374,7 +1506,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[4].BuildId, ShouldEqual, build.Id)
So(tasks[4].DistroId, ShouldEqual, "arch")
So(tasks[4].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[4].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[4].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[4].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[4].Activated, ShouldBeTrue)
So(tasks[4].ActivatedTime.Equal(utility.ZeroTime), ShouldBeFalse)
@@ -1390,7 +1522,7 @@ func TestCreateBuildFromVersion(t *testing.T) {
So(tasks[5].BuildId, ShouldEqual, build.Id)
So(tasks[5].DistroId, ShouldEqual, "arch")
So(tasks[5].BuildVariant, ShouldEqual, buildVar1.Name)
- So(tasks[5].CreateTime.Equal(args.TaskCreateTime), ShouldBeTrue)
+ So(tasks[5].CreateTime.Equal(creationInfo.TaskCreateTime), ShouldBeTrue)
So(tasks[5].Status, ShouldEqual, evergreen.TaskUndispatched)
So(tasks[5].Activated, ShouldBeTrue)
So(tasks[5].ActivatedTime.Equal(utility.ZeroTime), ShouldBeFalse)
@@ -1402,16 +1534,16 @@ func TestCreateBuildFromVersion(t *testing.T) {
})
Convey("the 'must have test results' flag should be set", func() {
- args := BuildCreateArgs{
- Project: *project,
- ProjectRef: *pref,
- Version: *v,
- TaskIDs: table,
- BuildName: buildVar1.Name,
- ActivateBuild: true,
- TaskNames: []string{},
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar1.Name,
+ ActivateBuild: true,
+ TaskNames: []string{},
}
- _, tasks, err := CreateBuildFromVersionNoInsert(args)
+ _, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
So(err, ShouldBeNil)
for _, t := range tasks {
if t.DisplayName == "taskD" {
@@ -1420,6 +1552,60 @@ func TestCreateBuildFromVersion(t *testing.T) {
}
})
+ Convey("single host task group tasks should be assigned child dependencies upon creation", func() {
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar5.Name,
+ TaskNames: []string{},
+ }
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
+ So(err, ShouldBeNil)
+ So(build.Id, ShouldNotEqual, "")
+
+ So(len(tasks), ShouldEqual, 3)
+ for _, singleHostTgTask := range tasks {
+ switch singleHostTgTask.DisplayName {
+ case "singleHostTaskGroup1":
+ So(singleHostTgTask.DependsOn, ShouldHaveLength, 0)
+ case "singleHostTaskGroup2":
+ So(singleHostTgTask.DependsOn, ShouldHaveLength, 1)
+ So(singleHostTgTask.DependsOn[0].TaskId, ShouldEqual, table.ExecutionTasks.GetId("buildVar5", "singleHostTaskGroup1"))
+ case "singleHostTaskGroup3":
+ So(singleHostTgTask.DependsOn, ShouldHaveLength, 1)
+ So(singleHostTgTask.DependsOn[0].TaskId, ShouldEqual, table.ExecutionTasks.GetId("buildVar5", "singleHostTaskGroup2"))
+ }
+ }
+ })
+
+ Convey("single host task group dependencies should still work if some tasks are missing", func() {
+ // remove singleHostTaskGroup2 from the table
+ table.ExecutionTasks[TVPair{Variant: "buildVar5", TaskName: "singleHostTaskGroup2"}] = ""
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: pref,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: buildVar5.Name,
+ TaskNames: []string{"singleHostTaskGroup1", "singleHostTaskGroup3"},
+ }
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
+ So(err, ShouldBeNil)
+ So(build.Id, ShouldNotEqual, "")
+ So(len(tasks), ShouldEqual, 2)
+ for _, singleHostTgTask := range tasks {
+ switch singleHostTgTask.DisplayName {
+ case "singleHostTaskGroup1":
+ So(singleHostTgTask.DependsOn, ShouldHaveLength, 0)
+ case "singleHostTaskGroup3":
+ So(singleHostTgTask.DependsOn, ShouldHaveLength, 1)
+ So(singleHostTgTask.DependsOn[0].TaskId, ShouldEqual, table.ExecutionTasks.GetId("buildVar5", "singleHostTaskGroup1"))
+ }
+ }
+ })
+
})
}
@@ -1484,7 +1670,6 @@ func TestCreateTaskGroup(t *testing.T) {
ActivationStatus: ActivationStatus{Activated: false},
},
},
- Config: projYml,
}
pRef := ProjectRef{
Id: "projectId",
@@ -1492,15 +1677,15 @@ func TestCreateTaskGroup(t *testing.T) {
}
table := NewTaskIdTable(proj, v, "", "")
- args := BuildCreateArgs{
- Project: *proj,
- ProjectRef: pRef,
- Version: *v,
- TaskIDs: table,
- BuildName: "bv",
- ActivateBuild: true,
+ creationInfo := TaskCreationInfo{
+ Project: proj,
+ ProjectRef: &pRef,
+ Version: v,
+ TaskIDs: table,
+ BuildVariantName: "bv",
+ ActivateBuild: true,
}
- build, tasks, err := CreateBuildFromVersionNoInsert(args)
+ build, tasks, err := CreateBuildFromVersionNoInsert(creationInfo)
assert.NoError(err)
assert.Len(build.Tasks, 3)
assert.Len(tasks, 3)
@@ -1533,26 +1718,38 @@ func TestGetTaskIdTable(t *testing.T) {
Name: "bv0",
Tasks: []BuildVariantTaskUnit{
{
- Name: "t0",
+ Name: "t0",
+ Variant: "bv0",
},
{
- Name: "t1",
+ Name: "t1",
+ Variant: "bv0",
},
},
},
},
}
+ pref := &ProjectRef{
+ Identifier: "p0",
+ }
+
newPairs := TaskVariantPairs{
ExecTasks: TVPairSet{
// imagine t1 is a patch_optional task not included in newPairs
{Variant: "bv0", TaskName: "t0"},
},
}
+ creationInfo := TaskCreationInfo{
+ Project: p,
+ ProjectRef: pref,
+ Pairs: newPairs,
+ Version: v,
+ }
existingTask := task.Task{Id: "t2", DisplayName: "existing_task", BuildVariant: "bv0", Version: v.Id}
require.NoError(t, existingTask.Insert())
- tables, err := getTaskIdTables(v, p, newPairs, "p0")
+ tables, err := getTaskIdTables(creationInfo)
assert.NoError(t, err)
assert.Len(t, tables.ExecutionTasks, 2)
assert.Equal(t, "p0_bv0_t0_abcde_09_11_10_23_00_00", tables.ExecutionTasks.GetId("bv0", "t0"))
@@ -1578,7 +1775,7 @@ func TestMakeDeps(t *testing.T) {
{Name: AllDependencies, Variant: AllVariants},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 3)
expectedIDs := []string{"bv0_t0", "bv0_t1", "bv1_t0"}
for _, dep := range deps {
@@ -1592,7 +1789,7 @@ func TestMakeDeps(t *testing.T) {
{Name: AllDependencies, Variant: "bv0"},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 2)
expectedIDs := []string{"bv0_t0", "bv0_t1"}
for _, dep := range deps {
@@ -1606,7 +1803,7 @@ func TestMakeDeps(t *testing.T) {
{Name: "t0", Variant: "bv0"},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 1)
assert.Equal(t, "bv0_t0", deps[0].TaskId)
assert.Equal(t, evergreen.TaskSucceeded, deps[0].Status)
@@ -1618,7 +1815,7 @@ func TestMakeDeps(t *testing.T) {
{Name: "t0", Variant: "bv0"},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 3)
})
@@ -1627,7 +1824,7 @@ func TestMakeDeps(t *testing.T) {
{Name: "t0", Variant: "bv0", Status: evergreen.TaskFailed},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 1)
assert.Equal(t, "bv0_t0", deps[0].TaskId)
assert.Equal(t, evergreen.TaskFailed, deps[0].Status)
@@ -1638,7 +1835,7 @@ func TestMakeDeps(t *testing.T) {
{Name: AllDependencies},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 1)
assert.Equal(t, "bv1_t0", deps[0].TaskId)
assert.Equal(t, evergreen.TaskSucceeded, deps[0].Status)
@@ -1649,7 +1846,7 @@ func TestMakeDeps(t *testing.T) {
{Variant: AllVariants},
}
- deps := makeDeps(tSpec, thisTask, table)
+ deps := makeDeps(tSpec.DependsOn, thisTask, table)
assert.Len(t, deps, 1)
assert.Equal(t, "bv0_t1", deps[0].TaskId)
assert.Equal(t, evergreen.TaskSucceeded, deps[0].Status)
@@ -1939,7 +2136,8 @@ func TestVersionRestart(t *testing.T) {
assert.True(dbTask.ResetWhenFinished)
dbVersion, err = VersionFindOneId("version")
assert.NoError(err)
- assert.Equal(evergreen.VersionStarted, dbVersion.Status)
+ // Version status should not update if only aborting tasks
+ assert.Equal("", dbVersion.Status)
// test that not aborting in-progress tasks does not reset them
assert.NoError(resetTaskData())
@@ -1952,7 +2150,8 @@ func TestVersionRestart(t *testing.T) {
assert.Equal(evergreen.TaskDispatched, dbTask.Status)
dbVersion, err = VersionFindOneId("version")
assert.NoError(err)
- assert.Equal(evergreen.VersionStarted, dbVersion.Status)
+ // Version status should not update if no tasks are being reset.
+ assert.Equal("", dbVersion.Status)
}
func TestDisplayTaskRestart(t *testing.T) {
@@ -1973,7 +2172,7 @@ func TestDisplayTaskRestart(t *testing.T) {
// test restarting a build
assert.NoError(resetTaskData())
- assert.NoError(RestartBuild("build3", displayTasks, false, "test"))
+ assert.NoError(RestartBuild(&build.Build{Id: "build3", Version: "version"}, displayTasks, false, "test"))
tasks, err = task.FindAll(db.Query(task.ByIds(allTasks)))
assert.NoError(err)
assert.Len(tasks, 3)
@@ -1984,7 +2183,7 @@ func TestDisplayTaskRestart(t *testing.T) {
// test that restarting a task correctly resets the task and archives it
assert.NoError(resetTaskData())
- assert.NoError(resetTask("displayTask", "caller", false))
+ assert.NoError(resetTask("displayTask", "caller"))
archivedTasks, err := task.FindOldWithDisplayTasks(nil)
assert.NoError(err)
assert.Len(archivedTasks, 3)
@@ -2003,9 +2202,31 @@ func TestDisplayTaskRestart(t *testing.T) {
assert.True(dbTask.Activated, dbTask.Id)
}
+ // Test that restarting a display task with restartFailed correctly resets failed tasks.
+ assert.NoError(resetTaskData())
+ dt, err := task.FindOneId("displayTask")
+ assert.NoError(err)
+ assert.NoError(dt.SetResetFailedWhenFinished())
+ assert.NoError(resetTask(dt.Id, "caller"))
+ tasks, err = task.FindAll(db.Query(task.ByIds(allTasks)))
+ assert.NoError(err)
+ assert.Len(tasks, 3)
+ for _, dbTask := range tasks {
+ if dbTask.Activated {
+ assert.Equal(evergreen.TaskUndispatched, dbTask.Status, dbTask.Id)
+ } else {
+ assert.Equal(evergreen.TaskSucceeded, dbTask.Status, dbTask.Id)
+ }
+ }
+
// test that execution tasks cannot be restarted
assert.NoError(resetTaskData())
- assert.Error(TryResetTask("task5", "", "", nil))
+ settings := &evergreen.Settings{
+ CommitQueue: evergreen.CommitQueueConfig{
+ MaxSystemFailedTaskRetries: 2,
+ },
+ }
+ assert.Error(TryResetTask(settings, "task5", "", "", nil))
// trying to restart execution tasks should restart the entire display task, if it's done
assert.NoError(resetTaskData())
@@ -2020,13 +2241,18 @@ func TestDisplayTaskRestart(t *testing.T) {
}
func TestResetTaskOrDisplayTask(t *testing.T) {
+ settings := &evergreen.Settings{
+ CommitQueue: evergreen.CommitQueueConfig{
+ MaxSystemFailedTaskRetries: 2,
+ },
+ }
assert.NoError(t, resetTaskData())
et, err := task.FindOneId("task5")
assert.NoError(t, err)
require.NotNil(t, et)
- // restarting execution tasks should restart the whole display task if it's complete
- assert.NoError(t, ResetTaskOrDisplayTask(et, "me", evergreen.StepbackTaskActivator, nil))
+ // restarting execution tasks should restart display task
+ assert.NoError(t, ResetTaskOrDisplayTask(settings, et, "me", evergreen.StepbackTaskActivator, false, nil))
dt, err := task.FindOneId("displayTask")
assert.NoError(t, err)
require.NotNil(t, dt)
@@ -2035,13 +2261,14 @@ func TestResetTaskOrDisplayTask(t *testing.T) {
assert.False(t, dt.ResetWhenFinished)
// restarting display task should mark the display task for restart if it's not complete
- assert.NoError(t, ResetTaskOrDisplayTask(dt, "me", evergreen.StepbackTaskActivator, nil))
+ // ResetFailedWhenFinished should be set to true if failedOnly is passed in
+ assert.NoError(t, ResetTaskOrDisplayTask(settings, dt, "me", evergreen.StepbackTaskActivator, true, nil))
dt, err = task.FindOneId("displayTask")
assert.NoError(t, err)
require.NotNil(t, dt)
assert.Equal(t, dt.Status, evergreen.TaskUndispatched)
assert.Equal(t, dt.Execution, 1)
- assert.True(t, dt.ResetWhenFinished)
+ assert.True(t, dt.ResetFailedWhenFinished)
}
func resetTaskData() error {
@@ -2170,16 +2397,24 @@ func resetTaskData() error {
func TestCreateTasksFromGroup(t *testing.T) {
assert := assert.New(t)
+ const tgName = "name"
+ const bvName = "first_build_variant"
in := BuildVariantTaskUnit{
- Name: "name",
+ Name: tgName,
IsGroup: true,
- GroupName: "task_group",
+ Variant: bvName,
Priority: 0,
DependsOn: []TaskUnitDependency{{Name: "new_dependency"}},
RunOn: []string{},
ExecTimeoutSecs: 0,
}
p := &Project{
+ BuildVariants: []BuildVariant{
+ {
+ Name: "first_build_variant",
+ Tasks: []BuildVariantTaskUnit{in},
+ },
+ },
Tasks: []ProjectTask{
{
Name: "first_task",
@@ -2195,13 +2430,13 @@ func TestCreateTasksFromGroup(t *testing.T) {
},
TaskGroups: []TaskGroup{
{
- Name: "name",
+ Name: tgName,
Tasks: []string{"first_task", "second_task", "third_task"},
},
},
}
bvts := CreateTasksFromGroup(in, p, evergreen.PatchVersionRequester)
- assert.Equal(2, len(bvts))
+ require.Equal(t, 2, len(bvts))
assert.Equal("new_dependency", bvts[0].DependsOn[0].Name)
assert.Equal("new_dependency", bvts[1].DependsOn[0].Name)
}
@@ -2463,8 +2698,8 @@ func TestAddNewTasks(t *testing.T) {
b := build.Build{
Id: "b0",
BuildVariant: "bv0",
+ Activated: false,
}
- assert.NoError(t, b.Insert())
v := &Version{
Id: "v0",
@@ -2472,14 +2707,6 @@ func TestAddNewTasks(t *testing.T) {
}
assert.NoError(t, v.Insert())
- existingTask := task.Task{
- Id: "t0",
- DisplayName: "t0",
- BuildId: "b0",
- BuildVariant: "bv0",
- Version: "v0",
- }
-
tasksToAdd := TaskVariantPairs{
ExecTasks: []TVPair{
{
@@ -2497,6 +2724,7 @@ func TestAddNewTasks(t *testing.T) {
{Name: "t0"},
{
Name: "t1",
+ Variant: "bv0",
DependsOn: []TaskUnitDependency{{Name: "t0"}},
RunOn: []string{"d0"},
},
@@ -2512,30 +2740,71 @@ func TestAddNewTasks(t *testing.T) {
for name, testCase := range map[string]struct {
activationInfo specificActivationInfo
activatedTasks []string
+ existingTask task.Task
+ bvActive bool
}{
"ActivatedNewTask": {
activationInfo: specificActivationInfo{},
activatedTasks: []string{"t0", "t1"},
+ existingTask: task.Task{
+ Id: "t0",
+ DisplayName: "t0",
+ BuildId: "b0",
+ BuildVariant: "bv0",
+ Version: "v0",
+ Activated: true,
+ },
+ bvActive: true,
},
"DeactivatedNewTask": {
activationInfo: specificActivationInfo{activationTasks: map[string][]string{
b.BuildVariant: {"t1"},
}},
activatedTasks: []string{},
+ existingTask: task.Task{},
+ bvActive: false,
+ },
+ "OnlyDeactivatedTasks": {
+ activationInfo: specificActivationInfo{activationTasks: map[string][]string{
+ b.BuildVariant: {"t1"},
+ }},
+ activatedTasks: []string{},
+ existingTask: task.Task{
+ Id: "t0",
+ DisplayName: "t0",
+ BuildId: "b0",
+ BuildVariant: "bv0",
+ Version: "v0",
+ Activated: false,
+ },
+ bvActive: false,
},
} {
t.Run(name, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(task.Collection))
- assert.NoError(t, existingTask.Insert())
-
- _, err := addNewTasks(context.Background(), testCase.activationInfo, v, &project, &ProjectRef{}, tasksToAdd, []build.Build{b}, patch.SyncAtEndOptions{}, "")
+ require.NoError(t, db.ClearCollections(task.Collection, build.Collection))
+ assert.NoError(t, testCase.existingTask.Insert())
+ assert.NoError(t, b.Insert())
+ creationInfo := TaskCreationInfo{
+ Project: &project,
+ ProjectRef: &ProjectRef{},
+ Version: v,
+ Pairs: tasksToAdd,
+ ActivationInfo: testCase.activationInfo,
+ SyncAtEndOpts: patch.SyncAtEndOptions{},
+ GeneratedBy: "",
+ }
+ _, err := addNewTasks(context.Background(), creationInfo, []build.Build{b})
assert.NoError(t, err)
activatedTasks, err := task.FindAll(db.Query(bson.M{task.ActivatedKey: true}))
assert.NoError(t, err)
+ build, err := build.FindOneId("b0")
+ assert.NoError(t, err)
+ assert.NotNil(t, build)
assert.Equal(t, len(testCase.activatedTasks), len(activatedTasks))
for _, task := range activatedTasks {
assert.Contains(t, testCase.activatedTasks, task.DisplayName)
}
+ assert.Equal(t, testCase.bvActive, build.Activated)
})
}
}
diff --git a/model/manifest/db.go b/model/manifest/db.go
index 401a00bc1d6..282fddb8737 100644
--- a/model/manifest/db.go
+++ b/model/manifest/db.go
@@ -1,6 +1,8 @@
package manifest
import (
+ "context"
+
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model/patch"
@@ -45,6 +47,15 @@ func (m *Manifest) TryInsert() (bool, error) {
return false, err
}
+// InsertWithContext is the same as Insert, but it respects the given context by
+// avoiding the global Anser DB session.
+func (m *Manifest) InsertWithContext(ctx context.Context) error {
+ if _, err := evergreen.GetEnvironment().DB().Collection(Collection).InsertOne(ctx, m); err != nil {
+ return err
+ }
+ return nil
+}
+
// ById returns a query that contains an Id selector on the string, id.
func ById(id string) db.Q {
return db.Query(bson.M{IdKey: id})
diff --git a/model/manifest/manifest.go b/model/manifest/manifest.go
index 9cd3201d96e..06c91eab86d 100644
--- a/model/manifest/manifest.go
+++ b/model/manifest/manifest.go
@@ -7,7 +7,7 @@ import (
const Collection = "manifest"
-// Manifest is a representation of the modules associated with the a version.
+// Manifest is a representation of the modules associated with a version.
// Id is the version id,
// Revision is the revision of the version on the project
// ProjectName is the Project Id,
diff --git a/model/matrix_smoke_test.go b/model/matrix_smoke_test.go
index 71e606057c0..fcaf3a0b0a6 100644
--- a/model/matrix_smoke_test.go
+++ b/model/matrix_smoke_test.go
@@ -2,7 +2,7 @@ package model
import (
"context"
- "io/ioutil"
+ "os"
"path/filepath"
"testing"
@@ -48,7 +48,7 @@ func taskNames(v *BuildVariant) []string {
func TestPythonMatrixIntegration(t *testing.T) {
Convey("With a sample matrix project mocking up a python driver", t, func() {
p := Project{}
- bytes, err := ioutil.ReadFile(filepath.Join(testutil.GetDirectoryOfFile(),
+ bytes, err := os.ReadFile(filepath.Join(testutil.GetDirectoryOfFile(),
"testdata", "matrix_python.yml"))
So(err, ShouldBeNil)
Convey("the project should parse properly", func() {
@@ -106,7 +106,7 @@ func TestPythonMatrixIntegration(t *testing.T) {
func TestDepsMatrixIntegration(t *testing.T) {
Convey("With a sample matrix project mocking up a python driver", t, func() {
p := Project{}
- bytes, err := ioutil.ReadFile(filepath.Join(testutil.GetDirectoryOfFile(),
+ bytes, err := os.ReadFile(filepath.Join(testutil.GetDirectoryOfFile(),
"testdata", "matrix_deps.yml"))
So(err, ShouldBeNil)
Convey("the project should parse properly", func() {
diff --git a/model/notification/db.go b/model/notification/db.go
index 54603321f62..450a1d46ba3 100644
--- a/model/notification/db.go
+++ b/model/notification/db.go
@@ -21,7 +21,7 @@ const (
Collection = "notifications"
)
-//nolint: deadcode, megacheck, unused
+//nolint:megacheck,unused
var (
idKey = bsonutil.MustHaveTag(Notification{}, "ID")
subscriberKey = bsonutil.MustHaveTag(Notification{}, "Subscriber")
diff --git a/model/notification/notification.go b/model/notification/notification.go
index 8e5b320121b..87d1d119d68 100644
--- a/model/notification/notification.go
+++ b/model/notification/notification.go
@@ -2,12 +2,14 @@ package notification
import (
"fmt"
+ "strings"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/event"
+ "github.com/evergreen-ci/evergreen/model/user"
"github.com/evergreen-ci/evergreen/util"
"github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
@@ -21,7 +23,7 @@ import (
// from the given event, with the given trigger, for the given subscriber.
// This function will produce an ID that will collide to prevent duplicate
// notifications from being inserted
-func makeNotificationID(eventID, trigger string, subscriber *event.Subscriber) string { //nolint: interfacer
+func makeNotificationID(eventID, trigger string, subscriber *event.Subscriber) string {
return fmt.Sprintf("%s-%s-%s", eventID, trigger, subscriber.String())
}
@@ -107,11 +109,14 @@ func (n *Notification) Composer(env evergreen.Environment) (message.Composer, er
payload.Secret = sub.Secret
payload.URL = sub.URL
payload.NotificationID = n.ID
+ payload.Retries = sub.Retries
+ payload.MinDelayMS = sub.MinDelayMS
+ payload.TimeoutMS = sub.TimeoutMS
for _, header := range sub.Headers {
payload.Headers.Add(header.Key, header.Value)
}
- return util.NewWebhookMessageWithStruct(*payload), nil
+ return util.NewWebhookMessage(*payload), nil
case event.EmailSubscriberType:
sub, ok := n.Subscriber.Target.(*string)
@@ -164,12 +169,17 @@ func (n *Notification) Composer(env evergreen.Environment) (message.Composer, er
return nil, errors.New("slack subscriber is invalid")
}
+ formattedTarget, err := FormatSlackTarget(*sub)
+ if err != nil {
+ return nil, errors.Wrap(err, "formatting slack target")
+ }
+
payload, ok := n.Payload.(*SlackPayload)
if !ok || payload == nil {
return nil, errors.New("slack payload is invalid")
}
- return message.NewSlackMessage(level.Notice, *sub, payload.Body, payload.Attachments), nil
+ return message.NewSlackMessage(level.Notice, formattedTarget, payload.Body, payload.Attachments), nil
case event.GithubPullRequestSubscriberType:
sub := n.Subscriber.Target.(*event.GithubPullRequestSubscriber)
@@ -260,6 +270,25 @@ func (n *Notification) SetTaskMetadata(ID string, execution int) {
n.Metadata.TaskExecution = execution
}
+// FormatSlackTarget uses the slackMemberId instead of the userName when possible.
+func FormatSlackTarget(target string) (string, error) {
+ if strings.HasPrefix(target, "@") {
+ trimmedTarget := strings.TrimPrefix(target, "@")
+ user, err := user.FindBySlackUsername(trimmedTarget)
+ if err != nil {
+ grip.Error(message.WrapError(err, message.Fields{
+ "message": "could not find user by Slack username, falling back to default target instead of using the member ID",
+ "target": target,
+ }))
+ return target, nil
+ }
+ if user != nil && user.Settings.SlackMemberId != "" {
+ return user.Settings.SlackMemberId, nil
+ }
+ }
+ return target, nil
+}
+
type NotificationStats struct {
GithubPullRequest int `json:"github_pull_request" bson:"github_pull_request" yaml:"github_pull_request"`
JIRAIssue int `json:"jira_issue" bson:"jira_issue" yaml:"jira_issue"`
diff --git a/model/patch/cli_intent.go b/model/patch/cli_intent.go
index d14a4759b68..5eec59a95ea 100644
--- a/model/patch/cli_intent.go
+++ b/model/patch/cli_intent.go
@@ -91,13 +91,17 @@ type cliIntent struct {
// GitInfo contains information about the author's git environment.
GitInfo *GitMetadata `bson:"git_info,omitempty"`
+ // RepeatDefinition reuses the latest patch's task/variants (if no patch ID is provided)
RepeatDefinition bool `bson:"reuse_definition"`
-
+ // RepeatFailed reuses the latest patch's failed tasks (if no patch ID is provided)
RepeatFailed bool `bson:"repeat_failed"`
+ // RepeatPatchId uses the given patch to reuse the task/variant definitions
+ RepeatPatchId string `bson:"repeat_patch_id"`
}
// BSON fields for the patches
-// nolint
+//
+//nolint:unused
var (
cliDocumentIDKey = bsonutil.MustHaveTag(cliIntent{}, "DocumentID")
cliPatchFileIDKey = bsonutil.MustHaveTag(cliIntent{}, "PatchFileID")
@@ -165,12 +169,12 @@ func (c *cliIntent) ShouldFinalizePatch() bool {
return c.Finalize
}
-func (c *cliIntent) ReusePreviousPatchDefinition() bool {
- return c.RepeatDefinition
+func (c *cliIntent) RepeatPreviousPatchDefinition() (string, bool) {
+ return c.RepeatPatchId, c.RepeatDefinition
}
-func (c *cliIntent) RepeatFailedTasksAndVariants() bool {
- return c.RepeatFailed
+func (c *cliIntent) RepeatFailedTasksAndVariants() (string, bool) {
+ return c.RepeatPatchId, c.RepeatFailed
}
func (g *cliIntent) RequesterIdentity() string {
@@ -236,6 +240,7 @@ type CLIIntentParams struct {
TriggerAliases []string
RepeatDefinition bool
RepeatFailed bool
+ RepeatPatchId string
SyncParams SyncAtEndOptions
}
@@ -249,14 +254,15 @@ func NewCliIntent(params CLIIntentParams) (Intent, error) {
if params.BaseGitHash == "" {
return nil, errors.New("no base hash provided")
}
- if params.Finalize {
- if params.Alias == "" {
- if len(params.Variants) == 0 {
- return nil, errors.New("no variants provided")
- }
- if len(params.Tasks) == 0 {
- return nil, errors.New("no tasks provided")
- }
+ if params.Finalize && params.Alias == "" && !params.RepeatFailed && !params.RepeatDefinition {
+ if len(params.Variants)+len(params.RegexVariants)+len(params.Tasks)+len(params.RegexTasks) == 0 {
+ return nil, errors.New("no tasks or variants provided")
+ }
+ if len(params.Variants)+len(params.RegexVariants) == 0 {
+ return nil, errors.New("no variants provided")
+ }
+ if len(params.Tasks)+len(params.RegexTasks) == 0 {
+ return nil, errors.New("no tasks provided")
}
}
if len(params.SyncParams.BuildVariants) != 0 && len(params.SyncParams.Tasks) == 0 {
@@ -298,6 +304,7 @@ func NewCliIntent(params CLIIntentParams) (Intent, error) {
GitInfo: params.GitInfo,
RepeatDefinition: params.RepeatDefinition,
RepeatFailed: params.RepeatFailed,
+ RepeatPatchId: params.RepeatPatchId,
}, nil
}
diff --git a/model/patch/db.go b/model/patch/db.go
index fad70b86cfe..9ae40f8cac2 100644
--- a/model/patch/db.go
+++ b/model/patch/db.go
@@ -22,7 +22,8 @@ const (
)
// BSON fields for the patches
-//nolint: deadcode, megacheck, unused
+//
+//nolint:megacheck,unused
var (
IdKey = bsonutil.MustHaveTag(Patch{}, "Id")
DescriptionKey = bsonutil.MustHaveTag(Patch{}, "Description")
@@ -42,6 +43,7 @@ var (
PatchesKey = bsonutil.MustHaveTag(Patch{}, "Patches")
ParametersKey = bsonutil.MustHaveTag(Patch{}, "Parameters")
ActivatedKey = bsonutil.MustHaveTag(Patch{}, "Activated")
+ ProjectStorageMethodKey = bsonutil.MustHaveTag(Patch{}, "ProjectStorageMethod")
PatchedParserProjectKey = bsonutil.MustHaveTag(Patch{}, "PatchedParserProject")
PatchedProjectConfigKey = bsonutil.MustHaveTag(Patch{}, "PatchedProjectConfig")
AliasKey = bsonutil.MustHaveTag(Patch{}, "Alias")
@@ -318,8 +320,7 @@ func PatchesByProject(projectId string, ts time.Time, limit int) db.Q {
}).Sort([]string{"-" + CreateTimeKey}).Limit(limit)
}
-// FindFailedCommitQueuePatchesInTimeRange returns failed patches if they started within range,
-// or if they were never started but finished within time range. (i.e. timed out)
+// FindFailedCommitQueuePatchesInTimeRange returns failed patches if they started or failed within range.
func FindFailedCommitQueuePatchesInTimeRange(projectID string, startTime, endTime time.Time) ([]Patch, error) {
query := bson.M{
ProjectKey: projectID,
@@ -331,7 +332,6 @@ func FindFailedCommitQueuePatchesInTimeRange(projectID string, startTime, endTim
{StartTimeKey: bson.M{"$gte": startTime}},
}},
{"$and": []bson.M{
- {StartTimeKey: time.Time{}},
{FinishTimeKey: bson.M{"$lte": endTime}},
{FinishTimeKey: bson.M{"$gte": startTime}},
}},
@@ -340,6 +340,8 @@ func FindFailedCommitQueuePatchesInTimeRange(projectID string, startTime, endTim
return Find(db.Query(query).Sort([]string{CreateTimeKey}))
}
+// ByGithubPRAndCreatedBefore finds all patches that were created for a GitHub
+// PR before the given timestamp.
func ByGithubPRAndCreatedBefore(t time.Time, owner, repo string, prNumber int) db.Q {
return db.Query(bson.M{
CreateTimeKey: bson.M{
@@ -351,6 +353,23 @@ func ByGithubPRAndCreatedBefore(t time.Time, owner, repo string, prNumber int) d
})
}
+// FindLatestGithubPRPatch returns the latest PR patch for the given PR, if there is one.
+func FindLatestGithubPRPatch(owner, repo string, prNumber int) (*Patch, error) {
+ patches, err := Find(db.Query(bson.M{
+ AliasKey: bson.M{"$ne": evergreen.CommitQueueAlias},
+ bsonutil.GetDottedKeyName(githubPatchDataKey, thirdparty.GithubPatchBaseOwnerKey): owner,
+ bsonutil.GetDottedKeyName(githubPatchDataKey, thirdparty.GithubPatchBaseRepoKey): repo,
+ bsonutil.GetDottedKeyName(githubPatchDataKey, thirdparty.GithubPatchPRNumberKey): prNumber,
+ }).Sort([]string{"-" + CreateTimeKey}).Limit(1))
+ if err != nil {
+ return nil, err
+ }
+ if len(patches) == 0 {
+ return nil, nil
+ }
+ return &patches[0], nil
+}
+
func FindProjectForPatch(patchID mgobson.ObjectId) (string, error) {
p, err := FindOne(ById(patchID).Project(bson.M{ProjectKey: 1}))
if err != nil {
@@ -361,3 +380,31 @@ func FindProjectForPatch(patchID mgobson.ObjectId) (string, error) {
}
return p.Project, nil
}
+
+// GetFinalizedChildPatchIdsForPatch returns patchIds for any finalized children of the given patch.
+func GetFinalizedChildPatchIdsForPatch(patchID string) ([]string, error) {
+ withKey := bsonutil.GetDottedKeyName(TriggersKey, TriggerInfoChildPatchesKey)
+ //do the same for child patches
+ p, err := FindOne(ByStringId(patchID).WithFields(withKey))
+ if err != nil {
+ return nil, errors.Wrapf(err, "finding patch '%s'", patchID)
+ }
+ if p == nil {
+ return nil, errors.Wrapf(err, "patch '%s' not found", patchID)
+ }
+ if !p.IsParent() {
+ return nil, nil
+ }
+
+ childPatches, err := Find(ByStringIds(p.Triggers.ChildPatches).WithFields(VersionKey))
+ if err != nil {
+ return nil, errors.Wrap(err, "getting child patches")
+ }
+ res := []string{}
+ for _, child := range childPatches {
+ if child.Version != "" {
+ res = append(res, child.Id.Hex())
+ }
+ }
+ return res, nil
+}
diff --git a/model/patch/db_test.go b/model/patch/db_test.go
index 6b577145280..d0b20955486 100644
--- a/model/patch/db_test.go
+++ b/model/patch/db_test.go
@@ -8,8 +8,10 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/utility"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestMostRecentByUserAndProject(t *testing.T) {
@@ -149,3 +151,73 @@ func TestByPatchNameStatusesCommitQueuePaginated(t *testing.T) {
assert.Equal(t, evergreen.CommitQueueAlias, patch.Alias)
}
}
+
+func TestGetFinalizedChildPatchIdsForPatch(t *testing.T) {
+ childPatch := Patch{
+ Id: bson.NewObjectId(),
+ Version: "myVersion",
+ }
+ childPatch2 := Patch{
+ Id: bson.NewObjectId(), // not yet finalized
+ }
+
+ p := Patch{
+ Id: bson.NewObjectId(),
+ Triggers: TriggerInfo{
+ ChildPatches: []string{childPatch.Id.Hex(), childPatch2.Id.Hex()},
+ },
+ }
+
+ assert.NoError(t, db.InsertMany(Collection, p, childPatch, childPatch2))
+ childPatchIds, err := GetFinalizedChildPatchIdsForPatch(p.Id.Hex())
+ assert.NoError(t, err)
+ require.Len(t, childPatchIds, 1)
+ assert.Equal(t, childPatchIds[0], childPatch.Id.Hex())
+}
+
+func TestLatestGithubPRPatch(t *testing.T) {
+ assert.NoError(t, db.ClearCollections(Collection))
+ patch1 := Patch{
+ Id: bson.NewObjectId(),
+ CreateTime: time.Now().Add(-time.Hour),
+ GithubPatchData: thirdparty.GithubPatch{
+ BaseOwner: "parks",
+ BaseRepo: "rec",
+ PRNumber: 12,
+ },
+ }
+ patch2 := Patch{
+ Id: bson.NewObjectId(),
+ CreateTime: time.Now(),
+ GithubPatchData: thirdparty.GithubPatch{
+ BaseOwner: "parks",
+ BaseRepo: "rec",
+ PRNumber: 12,
+ },
+ }
+ cqPatch := Patch{
+ Id: bson.NewObjectId(),
+ CreateTime: time.Now().Add(time.Hour),
+ Alias: evergreen.CommitQueueAlias,
+ GithubPatchData: thirdparty.GithubPatch{
+ BaseOwner: "parks",
+ BaseRepo: "rec",
+ PRNumber: 12,
+ },
+ }
+ wrongPRPatch := Patch{
+ Id: bson.NewObjectId(),
+ CreateTime: time.Now(),
+ GithubPatchData: thirdparty.GithubPatch{
+ BaseOwner: "parks",
+ BaseRepo: "rec",
+ PRNumber: 14,
+ },
+ }
+
+ assert.NoError(t, db.InsertMany(Collection, patch1, patch2, cqPatch, wrongPRPatch))
+ p, err := FindLatestGithubPRPatch("parks", "rec", 12)
+ assert.NoError(t, err)
+ require.NotNil(t, p)
+ assert.Equal(t, p.Id.Hex(), patch2.Id.Hex())
+}
diff --git a/model/patch/github.go b/model/patch/github.go
index 096fe209588..d5d553f0f90 100644
--- a/model/patch/github.go
+++ b/model/patch/github.go
@@ -10,7 +10,7 @@ import (
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
"github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/utility"
- "github.com/google/go-github/v34/github"
+ "github.com/google/go-github/v52/github"
"github.com/mongodb/anser/bsonutil"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
@@ -93,7 +93,8 @@ type githubIntent struct {
}
// BSON fields for the patches
-// nolint
+//
+//nolint:unused
var (
documentIDKey = bsonutil.MustHaveTag(githubIntent{}, "DocumentID")
msgIDKey = bsonutil.MustHaveTag(githubIntent{}, "MsgID")
@@ -224,12 +225,12 @@ func (g *githubIntent) ShouldFinalizePatch() bool {
return true
}
-func (g *githubIntent) ReusePreviousPatchDefinition() bool {
- return false
+func (g *githubIntent) RepeatPreviousPatchDefinition() (string, bool) {
+ return "", false
}
-func (g *githubIntent) RepeatFailedTasksAndVariants() bool {
- return false
+func (g *githubIntent) RepeatFailedTasksAndVariants() (string, bool) {
+ return "", false
}
func (g *githubIntent) RequesterIdentity() string {
diff --git a/model/patch/intent.go b/model/patch/intent.go
index bba6160136b..ca172fbc32f 100644
--- a/model/patch/intent.go
+++ b/model/patch/intent.go
@@ -31,13 +31,13 @@ type Intent interface {
// intent should be finalized
ShouldFinalizePatch() bool
- // ReusePreviousPatchDefinition gives the patch the same tasks/variants
- // as the previous patch submitted for this project by the user.
- ReusePreviousPatchDefinition() bool
+ // RepeatPreviousPatchDefinition returns true if we should use the same tasks/variants as a previous patch.
+ // Returns patch ID if specified, otherwise we use the latest patch.
+ RepeatPreviousPatchDefinition() (string, bool)
- // RepeatFailedTasksAndVariants gives the patch the tasks/variants
- // from the previous patch that had failed.
- RepeatFailedTasksAndVariants() bool
+ // RepeatFailedTasksAndVariants returns true if we should use the failed tasks/variants from a previous patch.
+ // Returns patch ID if specified, otherwise we use the latest patch.
+ RepeatFailedTasksAndVariants() (string, bool)
// GetAlias defines the variants and tasks this intent should run on.
GetAlias() string
diff --git a/model/patch/patch.go b/model/patch/patch.go
index 6ff156adb99..5d2c8367d26 100644
--- a/model/patch/patch.go
+++ b/model/patch/patch.go
@@ -5,7 +5,7 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
+ "io"
"os"
"strings"
"text/template"
@@ -17,7 +17,7 @@ import (
"github.com/evergreen-ci/evergreen/model/user"
"github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/utility"
- "github.com/google/go-github/v34/github"
+ "github.com/google/go-github/v52/github"
"github.com/mongodb/anser/bsonutil"
adb "github.com/mongodb/anser/db"
"github.com/mongodb/grip"
@@ -30,11 +30,11 @@ import (
const SizeLimit = 1024 * 1024 * 100
const backportFmtString = "Backport: %s"
-// VariantTasks contains the variant ID and the set of tasks to be scheduled for that variant
+// VariantTasks contains the variant name and the set of tasks to be scheduled for that variant
type VariantTasks struct {
- Variant string
- Tasks []string
- DisplayTasks []DisplayTask
+ Variant string `bson:"variant"`
+ Tasks []string `bson:"tasks"`
+ DisplayTasks []DisplayTask `bson:"displaytasks"`
}
// MergeVariantsTasks merges two slices of VariantsTasks into a single set.
@@ -158,10 +158,27 @@ type Patch struct {
SyncAtEndOpts SyncAtEndOptions `bson:"sync_at_end_opts,omitempty"`
Patches []ModulePatch `bson:"patches"`
Parameters []Parameter `bson:"parameters,omitempty"`
- Activated bool `bson:"activated"`
- // PatchedParserProject is mismatched with its BSON tag since the tag already exists in the DB.
- // Struct property has been renamed to convey that only parser project configs are stored in it.
- PatchedParserProject string `bson:"patched_config"`
+ // Activated indicates whether or not the patch is finalized (i.e.
+ // tasks/variants are now scheduled to run). If true, the patch has been
+ // finalized.
+ Activated bool `bson:"activated"`
+ // ProjectStorageMethod describes how the parser project is stored for this
+ // patch before it's finalized. This field is only set while the patch is
+ // unfinalized and is cleared once the patch has been finalized. It may also
+ // be empty for old, unfinalized patch documents before this field was
+ // introduced (see PatchedParserProject).
+ ProjectStorageMethod evergreen.ParserProjectStorageMethod `bson:"project_storage_method,omitempty"`
+ // PatchedParserProject is a deprecated field to temporarily store the
+ // project configuration before the patch is finalized. It is either 1. the
+ // patch's ParserProject or 2. another version's finalized Project. The
+ // string stores the BSON representation of one of these two for the patch
+ // until the patch is finalized. Once the patch is finalized, this field is
+ // cleared.
+ // Newly-created patches do not use this field at all and instead use the
+ // ProjectStorageMethod to decide where the parser project is persistently
+ // stored. This field is kept solely for backward compatibility with
+ // existing, unfinalized patches.
+ PatchedParserProject string `bson:"patched_config,omitempty"`
PatchedProjectConfig string `bson:"patched_project_config"`
Alias string `bson:"alias"`
Triggers TriggerInfo `bson:"triggers"`
@@ -220,6 +237,12 @@ type TaskSpecifier struct {
VariantRegex string `bson:"variant_regex,omitempty" json:"variant_regex,omitempty"`
}
+// IsFinished returns whether or not the patch has finished based on its
+// status.
+func (p *Patch) IsFinished() bool {
+ return evergreen.IsFinishedPatchStatus(p.Status)
+}
+
// SetDescription sets a patch's description in the database
func (p *Patch) SetDescription(desc string) error {
p.Description = desc
@@ -253,9 +276,13 @@ func (p *Patch) GetURL(uiHost string) string {
var url string
if p.Activated {
url = uiHost + "/version/" + p.Id.Hex()
+ if p.IsChild() {
+ url += "/downstream-projects"
+ }
} else {
url = uiHost + "/patch/" + p.Id.Hex()
}
+
if p.DisplayNewUI {
url = url + "?redirect_spruce_users=true"
}
@@ -307,7 +334,7 @@ func FetchPatchContents(patchfileID string) (string, error) {
return "", errors.Wrap(err, "getting grid file")
}
defer fileReader.Close()
- patchContents, err := ioutil.ReadAll(fileReader)
+ patchContents, err := io.ReadAll(fileReader)
if err != nil {
return "", errors.Wrap(err, "reading patch contents")
}
@@ -351,7 +378,8 @@ func (p *Patch) SetDownstreamParameters(parameters []Parameter) error {
}
// ResolveVariantTasks returns a set of all build variants and a set of all
-// tasks that will run based on the given VariantTasks.
+// tasks that will run based on the given VariantTasks, filtering out any
+// duplicates.
func ResolveVariantTasks(vts []VariantTasks) (bvs []string, tasks []string) {
taskSet := map[string]bool{}
bvSet := map[string]bool{}
@@ -582,20 +610,32 @@ func (p *Patch) FilesChanged() []string {
return filenames
}
-// SetActivated sets the patch to activated in the db
-func (p *Patch) SetActivated(ctx context.Context, versionId string) error {
- p.Version = versionId
- p.Activated = true
- _, err := evergreen.GetEnvironment().DB().Collection(Collection).UpdateOne(ctx,
+// SetFinalized marks the patch as finalized.
+func (p *Patch) SetFinalized(ctx context.Context, versionId string) error {
+ if _, err := evergreen.GetEnvironment().DB().Collection(Collection).UpdateOne(ctx,
bson.M{IdKey: p.Id},
bson.M{
"$set": bson.M{
ActivatedKey: true,
VersionKey: versionId,
},
+ "$unset": bson.M{
+ ProjectStorageMethodKey: 1,
+ PatchedParserProjectKey: 1,
+ PatchedProjectConfigKey: 1,
+ },
},
- )
- return err
+ ); err != nil {
+ return err
+ }
+
+ p.Version = versionId
+ p.Activated = true
+ p.ProjectStorageMethod = ""
+ p.PatchedParserProject = ""
+ p.PatchedProjectConfig = ""
+
+ return nil
}
// SetTriggerAliases appends the names of invoked trigger aliases to the DB
@@ -694,7 +734,7 @@ func (p *Patch) UpdateGithashProjectAndTasks() error {
"$set": bson.M{
GithashKey: p.Githash,
PatchesKey: p.Patches,
- PatchedParserProjectKey: p.PatchedParserProject,
+ ProjectStorageMethodKey: p.ProjectStorageMethod,
PatchedProjectConfigKey: p.PatchedProjectConfig,
VariantsTasksKey: p.VariantsTasks,
BuildVariantsKey: p.BuildVariants,
@@ -725,6 +765,34 @@ func (p *Patch) IsChild() bool {
return p.Triggers.ParentPatch != ""
}
+// CollectiveStatus returns the aggregate status of all tasks and child patches.
+func (p *Patch) CollectiveStatus() (string, error) {
+ parentPatch := p
+ if p.IsChild() {
+ var err error
+ parentPatch, err = FindOneId(p.Triggers.ParentPatch)
+ if err != nil {
+ return "", errors.Wrap(err, "getting parent patch")
+ }
+ if parentPatch == nil {
+ return "", errors.Errorf(fmt.Sprintf("parent patch '%s' does not exist", p.Triggers.ParentPatch))
+ }
+ }
+ allStatuses := []string{parentPatch.Status}
+ for _, childPatchId := range parentPatch.Triggers.ChildPatches {
+ cp, err := FindOneId(childPatchId)
+ if err != nil {
+ return "", errors.Wrapf(err, "getting child patch '%s' ", childPatchId)
+ }
+ if cp == nil {
+ return "", errors.Wrapf(err, "child patch '%s' not found", childPatchId)
+ }
+ allStatuses = append(allStatuses, cp.Status)
+ }
+
+ return GetCollectiveStatus(allStatuses), nil
+}
+
func (p *Patch) IsParent() bool {
return len(p.Triggers.ChildPatches) > 0
}
@@ -752,6 +820,74 @@ func (p *Patch) GetPatchIndex(parentPatch *Patch) (int, error) {
return -1, nil
}
+// GetGithubContextForChildPatch returns the github context for the given child patch, to be used in github statuses.
+func GetGithubContextForChildPatch(projectIdentifier string, parentPatch, childPatch *Patch) (string, error) {
+ patchIndex, err := childPatch.GetPatchIndex(parentPatch)
+ if err != nil {
+ return "", errors.Wrap(err, "getting child patch index")
+ }
+ githubContext := fmt.Sprintf("evergreen/%s", projectIdentifier)
+ // If there are multiple child patches, add the index to ensure these don't overlap,
+ // since there can be multiple for the same child project.
+ if patchIndex > 0 {
+ githubContext = fmt.Sprintf("evergreen/%s/%d", projectIdentifier, patchIndex)
+ }
+ return githubContext, nil
+}
+
+func (p *Patch) GetFamilyInformation() (bool, *Patch, error) {
+ if !p.IsChild() && !p.IsParent() {
+ return evergreen.IsFinishedPatchStatus(p.Status), nil, nil
+ }
+
+ isDone := false
+ childrenOrSiblings, parentPatch, err := p.GetPatchFamily()
+ if err != nil {
+ return isDone, parentPatch, errors.Wrap(err, "getting child or sibling patches")
+ }
+
+ // make sure the parent is done, if not, wait for the parent
+ if p.IsChild() && !evergreen.IsFinishedPatchStatus(parentPatch.Status) {
+ return isDone, parentPatch, nil
+ }
+ childrenStatus, err := GetChildrenOrSiblingsReadiness(childrenOrSiblings)
+ if err != nil {
+ return isDone, parentPatch, errors.Wrap(err, "getting child or sibling information")
+ }
+ if !evergreen.IsFinishedPatchStatus(childrenStatus) {
+ return isDone, parentPatch, nil
+ } else {
+ isDone = true
+ }
+
+ return isDone, parentPatch, err
+}
+
+func GetChildrenOrSiblingsReadiness(childrenOrSiblings []string) (string, error) {
+ if len(childrenOrSiblings) == 0 {
+ return "", nil
+ }
+ childrenStatus := evergreen.PatchSucceeded
+ for _, childPatch := range childrenOrSiblings {
+ childPatchDoc, err := FindOneId(childPatch)
+ if err != nil {
+ return "", errors.Wrapf(err, "getting tasks for child patch '%s'", childPatch)
+ }
+
+ if childPatchDoc == nil {
+ return "", errors.Errorf("child patch '%s' not found", childPatch)
+ }
+ if childPatchDoc.Status == evergreen.PatchFailed {
+ childrenStatus = evergreen.PatchFailed
+ }
+ if !evergreen.IsFinishedPatchStatus(childPatchDoc.Status) {
+ return childPatchDoc.Status, nil
+ }
+ }
+
+ return childrenStatus, nil
+
+}
func (p *Patch) GetPatchFamily() ([]string, *Patch, error) {
var childrenOrSiblings []string
var parentPatch *Patch
@@ -770,6 +906,7 @@ func (p *Patch) GetPatchFamily() ([]string, *Patch, error) {
}
childrenOrSiblings = parentPatch.Triggers.ChildPatches
}
+
return childrenOrSiblings, parentPatch, nil
}
@@ -1041,8 +1178,20 @@ func (p PatchesByCreateTime) Swap(i, j int) {
p[i], p[j] = p[j], p[i]
}
+// CollectiveStatus gets the collective status for a patch given by its ID.
+func CollectiveStatus(patchId string) (string, error) {
+ p, err := FindOneId(patchId)
+ if err != nil {
+ return "", errors.Wrapf(err, "getting patch for version '%s'", patchId)
+ }
+ if p == nil {
+ return "", errors.Errorf("no patch found for version '%s'", patchId)
+ }
+ return p.CollectiveStatus()
+}
+
// GetCollectiveStatus answers the question of what the patch status should be
-// when the patch status and the status of it's children are different
+// when the patch status and the status of its children are different
func GetCollectiveStatus(statuses []string) string {
hasCreated := false
hasFailure := false
diff --git a/model/patch/patch_test.go b/model/patch/patch_test.go
index cc2a4745d87..dcfd601d29a 100644
--- a/model/patch/patch_test.go
+++ b/model/patch/patch_test.go
@@ -13,7 +13,7 @@ import (
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/evergreen/thirdparty"
"github.com/evergreen-ci/utility"
- "github.com/google/go-github/v34/github"
+ "github.com/google/go-github/v52/github"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
@@ -185,7 +185,6 @@ func (s *patchSuite) TestUpdateGithashProjectAndTasks() {
patch.Patches = []ModulePatch{{Githash: "abcdef"}}
patch.Tasks = append(patch.Tasks, "task1")
patch.BuildVariants = append(patch.BuildVariants, "bv1")
- patch.PatchedParserProject = "config"
patch.VariantsTasks = []VariantTasks{
{
Variant: "variant1",
@@ -198,7 +197,6 @@ func (s *patchSuite) TestUpdateGithashProjectAndTasks() {
s.NoError(err)
s.Equal("abcdef", dbPatch.Githash)
- s.Equal("config", dbPatch.PatchedParserProject)
s.Require().Len(dbPatch.Patches, 1)
s.Equal("abcdef", dbPatch.Patches[0].Githash)
diff --git a/model/patch/trigger_intent.go b/model/patch/trigger_intent.go
index 300dce7182e..495b86edee7 100644
--- a/model/patch/trigger_intent.go
+++ b/model/patch/trigger_intent.go
@@ -74,12 +74,12 @@ func (t *TriggerIntent) ShouldFinalizePatch() bool {
return false
}
-func (t *TriggerIntent) ReusePreviousPatchDefinition() bool {
- return false
+func (t *TriggerIntent) RepeatPreviousPatchDefinition() (string, bool) {
+ return "", false
}
-func (g *TriggerIntent) RepeatFailedTasksAndVariants() bool {
- return false
+func (g *TriggerIntent) RepeatFailedTasksAndVariants() (string, bool) {
+ return "", false
}
func (t *TriggerIntent) GetAlias() string {
diff --git a/model/patch_lifecycle.go b/model/patch_lifecycle.go
index fef784b8113..b721dff26ed 100644
--- a/model/patch_lifecycle.go
+++ b/model/patch_lifecycle.go
@@ -3,7 +3,6 @@ package model
import (
"context"
"fmt"
- "io/ioutil"
"net/http"
"os"
"path/filepath"
@@ -92,42 +91,45 @@ func ValidateTVPairs(p *Project, in []TVPair) error {
// Given a patch version and a list of variant/task pairs, creates the set of new builds that
// do not exist yet out of the set of pairs, and adds tasks for builds which already exist.
-func addNewTasksAndBuildsForPatch(ctx context.Context, syncOpts patch.SyncAtEndOptions, patchVersion *Version, project *Project,
- pairs TaskVariantPairs, pRef *ProjectRef) error {
- existingBuilds, err := build.Find(build.ByIds(patchVersion.BuildIds).WithFields(build.IdKey, build.BuildVariantKey, build.CreateTimeKey, build.RequesterKey))
+func addNewTasksAndBuildsForPatch(ctx context.Context, creationInfo TaskCreationInfo) error {
+ existingBuilds, err := build.Find(build.ByIds(creationInfo.Version.BuildIds).WithFields(build.IdKey, build.BuildVariantKey, build.CreateTimeKey, build.RequesterKey))
if err != nil {
return err
}
- _, err = addNewBuilds(ctx, specificActivationInfo{}, patchVersion, project, pairs, existingBuilds, syncOpts, pRef, "")
+ _, err = addNewBuilds(ctx, creationInfo, existingBuilds)
if err != nil {
return errors.Wrap(err, "adding new builds")
}
- _, err = addNewTasks(ctx, specificActivationInfo{}, patchVersion, project, pRef, pairs, existingBuilds, syncOpts, "")
- return errors.Wrap(err, "adding new tasks")
+ _, err = addNewTasks(ctx, creationInfo, existingBuilds)
+ if err != nil {
+ return errors.Wrap(err, "adding new tasks")
+ }
+ err = activateExistingInactiveTasks(creationInfo, existingBuilds)
+ return errors.Wrap(err, "activating existing inactive tasks")
}
type PatchUpdate struct {
Description string `json:"description"`
- Parameters []patch.Parameter `json:"parameters,omitempty"` // TODO: maybe shouldn't be API?
+ Parameters []patch.Parameter `json:"parameters,omitempty"`
PatchTriggerAliases []string `json:"patch_trigger_aliases,omitempty"`
VariantsTasks []patch.VariantTasks `json:"variants_tasks,omitempty"`
}
// ConfigurePatch validates and creates the updated tasks/variants, and updates description if needed.
// Returns an http status code and error.
-func ConfigurePatch(ctx context.Context, p *patch.Patch, version *Version, proj *ProjectRef, patchUpdateReq PatchUpdate) (int, error) {
+func ConfigurePatch(ctx context.Context, settings *evergreen.Settings, p *patch.Patch, version *Version, proj *ProjectRef, patchUpdateReq PatchUpdate) (int, error) {
var err error
- project := &Project{}
- if _, err := LoadProjectInto(ctx, []byte(p.PatchedParserProject), nil, p.Project, project); err != nil {
+ project, _, err := FindAndTranslateProjectForPatch(ctx, settings, p)
+ if err != nil {
return http.StatusInternalServerError, errors.Wrap(err, "unmarshalling project config")
}
addDisplayTasksToPatchReq(&patchUpdateReq, *project)
tasks := VariantTasksToTVPairs(patchUpdateReq.VariantsTasks)
- tasks.ExecTasks, err = IncludeDependencies(project, tasks.ExecTasks, p.GetRequester())
+ tasks.ExecTasks, err = IncludeDependencies(project, tasks.ExecTasks, p.GetRequester(), nil)
grip.Warning(message.WrapError(err, message.Fields{
"message": "error including dependencies for patch",
- "patch": p.Id,
+ "patch": p.Id.Hex(),
}))
if err = ValidateTVPairs(project, tasks.ExecTasks); err != nil {
return http.StatusBadRequest, err
@@ -164,7 +166,16 @@ func ConfigurePatch(ctx context.Context, p *patch.Patch, version *Version, proj
}
// First add new tasks to existing builds, if necessary
- err = addNewTasksAndBuildsForPatch(context.Background(), p.SyncAtEndOpts, version, project, tasks, proj)
+ creationInfo := TaskCreationInfo{
+ Project: project,
+ ProjectRef: proj,
+ Version: version,
+ Pairs: tasks,
+ SyncAtEndOpts: p.SyncAtEndOpts,
+ ActivationInfo: specificActivationInfo{},
+ GeneratedBy: "",
+ }
+ err = addNewTasksAndBuildsForPatch(context.Background(), creationInfo)
if err != nil {
return http.StatusInternalServerError, errors.Wrapf(err, "creating new tasks/builds for version '%s'", version.Id)
}
@@ -191,33 +202,8 @@ func addDisplayTasksToPatchReq(req *PatchUpdate, p Project) {
}
}
-// GetPatchedProject creates and validates a project created by fetching latest commit information from GitHub
-// and applying the patch to the latest remote configuration. Also returns the condensed yaml string for storage.
-// The error returned can be a validation error.
-func GetPatchedProject(ctx context.Context, p *patch.Patch, githubOauthToken string) (*Project, *PatchConfig, error) {
- if p.Version != "" {
- return nil, nil, errors.Errorf("patch '%s' already finalized", p.Version)
- }
-
- project := &Project{}
- projectRef, opts, err := getLoadProjectOptsForPatch(p, githubOauthToken)
- if err != nil {
- return nil, nil, errors.Wrap(err, "fetching project options for patch")
- }
- // if the patched config exists, use that as the project file bytes.
- if p.PatchedParserProject != "" {
- if _, err := LoadProjectInto(ctx, []byte(p.PatchedParserProject), opts, p.Project, project); err != nil {
- return nil, nil, errors.WithStack(err)
- }
- patchConfig := &PatchConfig{
- PatchedParserProject: p.PatchedParserProject,
- PatchedProjectConfig: p.PatchedProjectConfig,
- }
- return project, patchConfig, nil
- }
-
- var cancel context.CancelFunc
- ctx, cancel = context.WithTimeout(ctx, 10*time.Second)
+func getPatchedProjectYAML(ctx context.Context, projectRef *ProjectRef, opts *GetProjectOpts, p *patch.Patch) ([]byte, error) {
+ ctx, cancel := context.WithTimeout(ctx, fetchProjectFilesTimeout)
defer cancel()
env := evergreen.GetEnvironment()
@@ -238,9 +224,9 @@ func GetPatchedProject(ctx context.Context, p *patch.Patch, githubOauthToken str
}
opts.RemotePath = path
opts.PatchOpts.env = env
- projectFileBytes, err = getFileForPatchDiff(ctx, *opts)
+ projectFileBytes, err := getFileForPatchDiff(ctx, *opts)
if err != nil {
- return nil, nil, errors.Wrap(err, "fetching remote configuration file")
+ return nil, errors.Wrap(err, "fetching remote configuration file")
}
// apply remote configuration patch if needed
@@ -248,40 +234,147 @@ func GetPatchedProject(ctx context.Context, p *patch.Patch, githubOauthToken str
opts.ReadFileFrom = ReadFromPatchDiff
projectFileBytes, err = MakePatchedConfig(ctx, env, p, path, string(projectFileBytes))
if err != nil {
- return nil, nil, errors.Wrap(err, "patching remote configuration file")
+ return nil, errors.Wrap(err, "patching remote configuration file")
}
}
- pp, err := LoadProjectInto(ctx, projectFileBytes, opts, p.Project, project)
+
+ return projectFileBytes, nil
+}
+
+// GetPatchedProject creates and validates a project by fetching latest commit
+// information from GitHub and applying the patch to the latest remote
+// configuration. Also returns the condensed yaml string for storage. The error
+// returned can be a validation error.
+func GetPatchedProject(ctx context.Context, settings *evergreen.Settings, p *patch.Patch, githubOauthToken string) (*Project, *PatchConfig, error) {
+ if p.Version != "" {
+ return nil, nil, errors.Errorf("patch '%s' already finalized", p.Version)
+ }
+
+ if p.ProjectStorageMethod != "" || p.PatchedParserProject != "" {
+ // If the patch has already been created but has not been finalized, it
+ // has either already stored the parser project document or stored the
+ // parser project as a string (which is the fallback case for old
+ // patches).
+ project, pp, err := FindAndTranslateProjectForPatch(ctx, settings, p)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "finding and translating project")
+ }
+
+ patchedParserProjectYAML := p.PatchedParserProject
+ if patchedParserProjectYAML == "" {
+ ppOut, err := yaml.Marshal(pp)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "marshalling parser project into YAML")
+ }
+ patchedParserProjectYAML = string(ppOut)
+ }
+ patchConfig := &PatchConfig{
+ PatchedParserProjectYAML: patchedParserProjectYAML,
+ PatchedParserProject: pp,
+ PatchedProjectConfig: p.PatchedProjectConfig,
+ }
+ return project, patchConfig, nil
+ }
+
+ projectRef, opts, err := getLoadProjectOptsForPatch(p, githubOauthToken)
if err != nil {
- return nil, nil, errors.WithStack(err)
+ return nil, nil, errors.Wrap(err, "fetching project options for patch")
+ }
+
+ projectFileBytes, err := getPatchedProjectYAML(ctx, projectRef, opts, p)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "getting patched project file as YAML")
}
- var pc *ProjectConfig
+
+ var pc string
if projectRef.IsVersionControlEnabled() {
- pc, err = CreateProjectConfig(projectFileBytes, p.Project)
+ pc, err = getProjectConfigYAML(p, projectFileBytes)
if err != nil {
- return nil, nil, errors.WithStack(err)
+ return nil, nil, errors.Wrap(err, "getting patched project config")
}
}
+
+ project := &Project{}
+ pp, err := LoadProjectInto(ctx, projectFileBytes, opts, p.Project, project)
+ if err != nil {
+ return nil, nil, errors.WithStack(err)
+ }
+ // LoadProjectInto does not set the parser project's identifier, so set it
+ // here.
+ pp.Identifier = utility.ToStringPtr(p.Project)
ppOut, err := yaml.Marshal(pp)
if err != nil {
return nil, nil, errors.Wrap(err, "marshalling parser project into YAML")
}
+
patchConfig := &PatchConfig{
- PatchedParserProject: string(ppOut),
- }
- if pc != nil {
- pcOut, err := yaml.Marshal(pc)
- if err != nil {
- return nil, nil, errors.Wrap(err, "marshalling project config into YAML")
- }
- patchConfig.PatchedProjectConfig = string(pcOut)
+ PatchedParserProjectYAML: string(ppOut),
+ PatchedParserProject: pp,
+ PatchedProjectConfig: pc,
}
return project, patchConfig, nil
}
-// MakePatchedConfig takes in the path to a remote configuration a stringified version
-// of the current project and returns an unmarshalled version of the project
-// with the patch applied
+// GetPatchedProjectConfig returns the project configuration by fetching the
+// latest commit information from GitHub and applying the patch to the latest
+// remote configuration. The error returned can be a validation error.
+func GetPatchedProjectConfig(ctx context.Context, settings *evergreen.Settings, p *patch.Patch, githubOauthToken string) (string, error) {
+ if p.Version != "" {
+ return "", errors.Errorf("patch '%s' already finalized", p.Version)
+ }
+
+ if p.ProjectStorageMethod != "" || p.PatchedParserProject != "" {
+ // If the patch has been created but not finalized, it has either
+ // already saved the project config as a string (if any), stored the
+ // parser project document (i.e. ProjectStorageMethod), or has the
+ // entire patched parser project as a string (i.e.
+ // PatchedParserProject). Since the project config is optional, the
+ // patch may be created and have already evaluated the patched project
+ // config, but there simply was none. Therefore, this is a valid way to
+ // check and get the PatchedProjectConfig after the patch is already
+ // created.
+ return p.PatchedProjectConfig, nil
+ }
+
+ projectRef, opts, err := getLoadProjectOptsForPatch(p, githubOauthToken)
+ if err != nil {
+ return "", errors.Wrap(err, "fetching project options for patch")
+ }
+
+ if !projectRef.IsVersionControlEnabled() {
+ return "", nil
+ }
+
+ projectFileBytes, err := getPatchedProjectYAML(ctx, projectRef, opts, p)
+ if err != nil {
+ return "", errors.Wrap(err, "getting patched project file as YAML")
+ }
+
+ return getProjectConfigYAML(p, projectFileBytes)
+}
+
+// getProjectConfigYAML creates a project config from the project YAML string
+// and returns the project configuration as a string.
+func getProjectConfigYAML(p *patch.Patch, projectFileBytes []byte) (string, error) {
+ pc, err := CreateProjectConfig(projectFileBytes, p.Project)
+ if err != nil {
+ return "", errors.Wrap(err, "creating project config")
+ }
+ if pc == nil {
+ return "", nil
+ }
+
+ yamlProjectConfig, err := yaml.Marshal(pc)
+ if err != nil {
+ return "", errors.Wrap(err, "marshalling project config into YAML")
+ }
+ return string(yamlProjectConfig), nil
+}
+
+// MakePatchedConfig takes in the project's remote file path containing the
+// project YAML configuration and a stringified version of the project YAML
+// configuration, and returns an unmarshalled version of the project with the
+// patch applied.
func MakePatchedConfig(ctx context.Context, env evergreen.Environment, p *patch.Patch, remoteConfigPath, projectConfig string) ([]byte, error) {
for _, patchPart := range p.Patches {
// we only need to patch the main project and not any other modules
@@ -308,13 +401,13 @@ func MakePatchedConfig(ctx context.Context, env evergreen.Environment, p *patch.
}
}
- defer os.Remove(patchFilePath) //nolint: evg-lint
+ defer os.Remove(patchFilePath) //nolint:evg-lint
// write project configuration
configFilePath, err := util.WriteToTempFile(projectConfig)
if err != nil {
return nil, errors.Wrap(err, "writing config file")
}
- defer os.Remove(configFilePath) //nolint: evg-lint
+ defer os.Remove(configFilePath) //nolint:evg-lint
// clean the working directory
workingDirectory := filepath.Dir(patchFilePath)
@@ -349,15 +442,21 @@ func MakePatchedConfig(ctx context.Context, env evergreen.Environment, p *patch.
remoteConfigPath, patchFilePath),
}
+ output := util.NewMBCappedWriter()
err = env.JasperManager().CreateCommand(ctx).Add([]string{"bash", "-c", strings.Join(patchCommandStrings, "\n")}).
- SetErrorSender(level.Error, grip.GetSender()).SetOutputSender(level.Info, grip.GetSender()).
- Directory(workingDirectory).Run(ctx)
+ Directory(workingDirectory).SetCombinedWriter(output).Run(ctx)
if err != nil {
+ grip.Error(message.WrapError(err, message.Fields{
+ "message": "error running patch command",
+ "patch_id": p.Id.Hex(),
+ "output": output.String(),
+ "patch_command": patchCommandStrings,
+ }))
return nil, errors.Wrap(err, "running patch command (possibly due to merge conflict on evergreen configuration file)")
}
// read in the patched config file
- data, err := ioutil.ReadFile(localConfigPath)
+ data, err := os.ReadFile(localConfigPath)
if err != nil {
return nil, errors.Wrap(err, "reading patched config file")
}
@@ -369,13 +468,14 @@ func MakePatchedConfig(ctx context.Context, env evergreen.Environment, p *patch.
return nil, errors.New("no patch on project")
}
-// FinalizePatch Finalizes a patch:
+// FinalizePatch finalizes a patch:
// Patches a remote project's configuration file if needed.
// Creates a version for this patch and links it.
// Creates builds based on the Version
+// Creates a manifest based on the Version
func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, githubOauthToken string) (*Version, error) {
+ settings, err := evergreen.GetConfig()
if githubOauthToken == "" {
- settings, err := evergreen.GetConfig()
if err != nil {
return nil, err
}
@@ -384,17 +484,17 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
return nil, err
}
}
- // unmarshal the project YAML for storage
- project := &Project{}
- projectRef, opts, err := getLoadProjectOptsForPatch(p, githubOauthToken)
+ projectRef, err := FindMergedProjectRef(p.Project, p.Version, true)
if err != nil {
- return nil, errors.Wrap(err, "fetching project options for patch")
+ return nil, errors.Wrapf(err, "finding project '%s'", p.Project)
}
- intermediateProject, err := LoadProjectInto(ctx, []byte(p.PatchedParserProject), opts, p.Project, project)
+ if projectRef == nil {
+ return nil, errors.Errorf("project '%s' not found", p.Project)
+ }
+
+ project, intermediateProject, err := FindAndTranslateProjectForPatch(ctx, settings, p)
if err != nil {
- return nil, errors.Wrapf(err,
- "marshalling patched parser project from repository revision '%s'",
- p.Githash)
+ return nil, errors.Wrapf(err, "finding and translating project for patch '%s'", p.Id.Hex())
}
var config *ProjectConfig
if projectRef.IsVersionControlEnabled() {
@@ -405,7 +505,6 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
p.Githash)
}
}
- intermediateProject.Id = p.Id.Hex()
if config != nil {
config.Project = p.Project
config.Id = p.Id.Hex()
@@ -433,6 +532,25 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
parentPatchNumber = parentPatch.PatchNumber
}
+ params, err := getFullPatchParams(p)
+ if err != nil {
+ return nil, errors.Wrap(err, "fetching patch parameters")
+ }
+
+ authorEmail := ""
+ if p.GitInfo != nil {
+ authorEmail = p.GitInfo.Email
+ }
+ if p.Author != "" {
+ u, err := user.FindOneById(p.Author)
+ if err != nil {
+ return nil, errors.Wrap(err, "getting user")
+ }
+ if u != nil {
+ authorEmail = u.Email()
+ }
+ }
+
patchVersion := &Version{
Id: p.Id.Hex(),
CreateTime: time.Now(),
@@ -449,10 +567,15 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
Branch: projectRef.Branch,
RevisionOrderNumber: p.PatchNumber,
AuthorID: p.Author,
- Parameters: p.Parameters,
+ Parameters: params,
Activated: utility.TruePtr(),
+ AuthorEmail: authorEmail,
+ }
+
+ mfst, err := constructManifest(patchVersion, projectRef, project.Modules, settings)
+ if err != nil {
+ return nil, errors.Wrap(err, "constructing manifest")
}
- intermediateProject.CreateTime = patchVersion.CreateTime
tasks := TaskVariantPairs{}
if len(p.VariantsTasks) > 0 {
@@ -477,10 +600,18 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
if p.IsCommitQueuePatch() && len(p.VariantsTasks) == 0 {
return nil, errors.Errorf("no builds or tasks for commit queue version in projects '%s', githash '%s'", p.Project, p.Githash)
}
- taskIds := NewPatchTaskIdTable(project, patchVersion, tasks, projectRef.Identifier)
+ taskIds, err := NewPatchTaskIdTable(project, patchVersion, tasks, projectRef.Identifier)
+ if err != nil {
+ return nil, errors.Wrap(err, "creating patch's task ID table")
+ }
variantsProcessed := map[string]bool{}
- createTime, err := getTaskCreateTime(p.Project, patchVersion)
+ creationInfo := TaskCreationInfo{
+ Version: patchVersion,
+ Project: project,
+ ProjectRef: projectRef,
+ }
+ createTime, err := getTaskCreateTime(creationInfo)
if err != nil {
return nil, errors.Wrapf(err, "getting create time for tasks in '%s', githash '%s'", p.Project, p.Githash)
}
@@ -498,22 +629,22 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
displayNames = append(displayNames, dt.Name)
}
taskNames := tasks.ExecTasks.TaskNames(vt.Variant)
- buildArgs := BuildCreateArgs{
- Project: *project,
- ProjectRef: *projectRef,
- Version: *patchVersion,
- TaskIDs: taskIds,
- BuildName: vt.Variant,
- ActivateBuild: true,
- TaskNames: taskNames,
- DisplayNames: displayNames,
- DistroAliases: distroAliases,
- TaskCreateTime: createTime,
- SyncAtEndOpts: p.SyncAtEndOpts,
+ buildCreationArgs := TaskCreationInfo{
+ Project: creationInfo.Project,
+ ProjectRef: creationInfo.ProjectRef,
+ Version: creationInfo.Version,
+ TaskIDs: taskIds,
+ BuildVariantName: vt.Variant,
+ ActivateBuild: true,
+ TaskNames: taskNames,
+ DisplayNames: displayNames,
+ DistroAliases: distroAliases,
+ TaskCreateTime: createTime,
+ SyncAtEndOpts: p.SyncAtEndOpts,
}
var build *build.Build
var tasks task.Tasks
- build, tasks, err = CreateBuildFromVersionNoInsert(buildArgs)
+ build, tasks, err = CreateBuildFromVersionNoInsert(buildCreationArgs)
if err != nil {
return nil, errors.WithStack(err)
}
@@ -538,7 +669,29 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
},
)
}
- mongoClient := evergreen.GetEnvironment().Client()
+
+ // Newer patches always stored the parser project during patch creation.
+ // However, it used to be that the parser project was not stored until
+ // patches were finalized. For backward compatibility with the old
+ // unfinalized patches, try storing the parser project now that it's
+ // finalizing.
+
+ ppStorageMethod := p.ProjectStorageMethod
+ if ppStorageMethod == "" {
+ ppStorageMethod = evergreen.ProjectStorageMethodDB
+ }
+
+ if p.PatchedParserProject != "" {
+ intermediateProject.Init(p.Id.Hex(), patchVersion.CreateTime)
+ ppStorageMethod, err = ParserProjectUpsertOneWithS3Fallback(ctx, settings, ppStorageMethod, intermediateProject)
+ if err != nil {
+ return nil, errors.Wrapf(err, "upserting parser project for patch '%s'", p.Id.Hex())
+ }
+ }
+ patchVersion.ProjectStorageMethod = ppStorageMethod
+
+ env := evergreen.GetEnvironment()
+ mongoClient := env.Client()
session, err := mongoClient.StartSession()
if err != nil {
return nil, errors.Wrap(err, "starting DB session")
@@ -546,28 +699,29 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
defer session.EndSession(ctx)
txFunc := func(sessCtx mongo.SessionContext) (interface{}, error) {
- db := evergreen.GetEnvironment().DB()
+ db := env.DB()
_, err = db.Collection(VersionCollection).InsertOne(sessCtx, patchVersion)
if err != nil {
return nil, errors.Wrapf(err, "inserting version '%s'", patchVersion.Id)
}
- _, err = db.Collection(ParserProjectCollection).InsertOne(sessCtx, intermediateProject)
- if err != nil {
- return nil, errors.Wrapf(err, "inserting parser project for version '%s'", patchVersion.Id)
- }
if config != nil {
_, err = db.Collection(ProjectConfigCollection).InsertOne(sessCtx, config)
if err != nil {
return nil, errors.Wrapf(err, "inserting project config for version '%s'", patchVersion.Id)
}
}
+ if mfst != nil {
+ if err = mfst.InsertWithContext(sessCtx); err != nil {
+ return nil, errors.Wrapf(err, "inserting manifest for version '%s'", patchVersion.Id)
+ }
+ }
if err = buildsToInsert.InsertMany(sessCtx, false); err != nil {
return nil, errors.Wrapf(err, "inserting builds for version '%s'", patchVersion.Id)
}
if err = tasksToInsert.InsertUnordered(sessCtx); err != nil {
return nil, errors.Wrapf(err, "inserting tasks for version '%s'", patchVersion.Id)
}
- if err = p.SetActivated(sessCtx, patchVersion.Id); err != nil {
+ if err = p.SetFinalized(sessCtx, patchVersion.Id); err != nil {
return nil, errors.Wrapf(err, "activating patch '%s'", patchVersion.Id)
}
return nil, err
@@ -606,6 +760,37 @@ func FinalizePatch(ctx context.Context, p *patch.Patch, requester string, github
return patchVersion, nil
}
+// getFullPatchParams will retrieve a merged list of parameters defined on the patch alias (if any)
+// with the parameters that were explicitly user-specified, with the latter taking precedence.
+func getFullPatchParams(p *patch.Patch) ([]patch.Parameter, error) {
+ paramsMap := map[string]string{}
+ if p.Alias == "" || !IsPatchAlias(p.Alias) {
+ return p.Parameters, nil
+ }
+ aliases, err := findAliasesForPatch(p.Project, p.Alias, p)
+ if err != nil {
+ return nil, errors.Wrapf(err, "retrieving alias '%s' for patch '%s'", p.Alias, p.Id.Hex())
+ }
+ for _, alias := range aliases {
+ if len(alias.Parameters) > 0 {
+ for _, aliasParam := range alias.Parameters {
+ paramsMap[aliasParam.Key] = aliasParam.Value
+ }
+ }
+ }
+ for _, param := range p.Parameters {
+ paramsMap[param.Key] = param.Value
+ }
+ var fullParams []patch.Parameter
+ for k, v := range paramsMap {
+ fullParams = append(fullParams, patch.Parameter{
+ Key: k,
+ Value: v,
+ })
+ }
+ return fullParams, nil
+}
+
func getLoadProjectOptsForPatch(p *patch.Patch, githubOauthToken string) (*ProjectRef, *GetProjectOpts, error) {
projectRef, err := FindMergedProjectRef(p.Project, p.Version, true)
if err != nil {
@@ -686,6 +871,7 @@ func SubscribeOnParentOutcome(parentStatus string, childPatchId string, parentPa
return nil
}
+// CancelPatch aborts all of a patch's in-progress tasks and deactivates its undispatched tasks.
func CancelPatch(p *patch.Patch, reason task.AbortInfo) error {
if p.Version != "" {
if err := SetVersionActivation(p.Version, false, reason.User); err != nil {
@@ -697,10 +883,12 @@ func CancelPatch(p *patch.Patch, reason task.AbortInfo) error {
return errors.WithStack(patch.Remove(patch.ById(p.Id)))
}
-// AbortPatchesWithGithubPatchData runs CancelPatch on patches created before
-// the given time, with the same pr number, and base repository. Tasks which
-// are abortable (see model/task.IsAbortable()) will be aborted, while
-// dispatched/running/completed tasks will not be affected
+// AbortPatchesWithGithubPatchData aborts patches and commit queue items created
+// before the given time, with the same PR number, and base repository. Tasks
+// which are abortable will be aborted, while completed tasks will not be
+// affected. This function makes one exception for commit queue items so that if
+// the item is currently running the merge task, then that patch is not aborted
+// and is allowed to finish.
func AbortPatchesWithGithubPatchData(createdBefore time.Time, closed bool, newPatch, owner, repo string, prNumber int) error {
patches, err := patch.Find(patch.ByGithubPRAndCreatedBefore(createdBefore, owner, repo, prNumber))
if err != nil {
@@ -726,6 +914,11 @@ func AbortPatchesWithGithubPatchData(createdBefore time.Time, closed bool, newPa
if mergeTask == nil {
return errors.New("no merge task found")
}
+ if mergeTask.Status == evergreen.TaskStarted || evergreen.IsFinishedTaskStatus(mergeTask.Status) {
+ // If the merge task already started, the PR merge is
+ // already ongoing, so it's better to just let it complete.
+ continue
+ }
catcher.Add(DequeueAndRestartForTask(nil, mergeTask, message.GithubStateFailure, evergreen.APIServerTaskActivator, "new push to pull request"))
} else if err = CancelPatch(&p, task.AbortInfo{User: evergreen.GithubPatchUser, NewVersion: newPatch, PRClosed: closed}); err != nil {
grip.Error(message.WrapError(err, message.Fields{
@@ -734,7 +927,7 @@ func AbortPatchesWithGithubPatchData(createdBefore time.Time, closed bool, newPa
"owner": owner,
"repo": repo,
"message": "failed to abort patch's version",
- "patch_id": p.Id,
+ "patch_id": p.Id.Hex(),
"pr": p.GithubPatchData.PRNumber,
"project": p.Project,
"version": p.Version,
@@ -808,8 +1001,9 @@ func (e *EnqueuePatch) Send() error {
return errors.Errorf("no commit queue for project '%s'", existingPatch.Project)
}
- ctx := context.Background()
- mergePatch, err := MakeMergePatchFromExisting(ctx, existingPatch, "")
+ ctx, cancel := context.WithTimeout(context.Background(), DefaultParserProjectAccessTimeout)
+ defer cancel()
+ mergePatch, err := MakeMergePatchFromExisting(ctx, evergreen.GetEnvironment().Settings(), existingPatch, "")
if err != nil {
return errors.Wrap(err, "making merge patch")
}
@@ -823,12 +1017,14 @@ func (e *EnqueuePatch) Valid() bool {
return patch.IsValidId(e.PatchID)
}
-func MakeMergePatchFromExisting(ctx context.Context, existingPatch *patch.Patch, commitMessage string) (*patch.Patch, error) {
+// MakeMergePatchFromExisting creates a merge patch from an existing one to be
+// put in the commit queue. Is also creates the parser project associated with
+// the patch.
+func MakeMergePatchFromExisting(ctx context.Context, settings *evergreen.Settings, existingPatch *patch.Patch, commitMessage string) (*patch.Patch, error) {
if !existingPatch.HasValidGitInfo() {
return nil, errors.Errorf("enqueueing patch '%s' without metadata", existingPatch.Id.Hex())
}
- // verify the commit queue is on
projectRef, err := FindMergedProjectRef(existingPatch.Project, existingPatch.Version, true)
if err != nil {
return nil, errors.Wrapf(err, "getting project ref '%s'", existingPatch.Project)
@@ -840,9 +1036,9 @@ func MakeMergePatchFromExisting(ctx context.Context, existingPatch *patch.Patch,
return nil, errors.WithStack(err)
}
- project := &Project{}
- if _, err = LoadProjectInto(ctx, []byte(existingPatch.PatchedParserProject), nil, existingPatch.Project, project); err != nil {
- return nil, errors.Wrap(err, "loading project")
+ project, _, err := FindAndTranslateProjectForPatch(ctx, settings, existingPatch)
+ if err != nil {
+ return nil, errors.Wrap(err, "loading existing project")
}
patchDoc := &patch.Patch{
@@ -852,7 +1048,7 @@ func MakeMergePatchFromExisting(ctx context.Context, existingPatch *patch.Patch,
Githash: existingPatch.Githash,
Status: evergreen.PatchCreated,
Alias: evergreen.CommitQueueAlias,
- PatchedParserProject: existingPatch.PatchedParserProject,
+ PatchedProjectConfig: existingPatch.PatchedProjectConfig,
CreateTime: time.Now(),
MergedFrom: existingPatch.Id.Hex(),
}
@@ -881,6 +1077,14 @@ func MakeMergePatchFromExisting(ctx context.Context, existingPatch *patch.Patch,
return nil, errors.Wrap(err, "computing patch num")
}
+ // The parser project is typically inserted at the same time as the patch.
+ // However, commit queue items made from CLI patches are a special exception
+ // that do not follow this behavior, because the existing patch may have be
+ // very outdated compared to the tracking branch's latest commit. The commit
+ // queue should ideally test against the most recent available project
+ // config, so it will resolve the parser project later on, when it's
+ // processed in the commit queue.
+
if err = patchDoc.Insert(); err != nil {
return nil, errors.Wrap(err, "inserting patch")
}
@@ -997,6 +1201,14 @@ func restartDiffItem(p patch.Patch, cq *commitqueue.CommitQueue) error {
PatchNumber: patchNumber,
}
+ // The parser project is typically inserted at the same time as the patch.
+ // However, commit queue items made from CLI patches are a special exception
+ // that do not follow this behavior, because the existing patch may have be
+ // very outdated compared to the tracking branch's latest commit. The commit
+ // queue should ideally test against the most recent available project
+ // config, so it will resolve the parser project later on, when it's
+ // processed in the commit queue.
+
if err = newPatch.Insert(); err != nil {
return errors.Wrap(err, "inserting patch")
}
@@ -1006,6 +1218,8 @@ func restartDiffItem(p patch.Patch, cq *commitqueue.CommitQueue) error {
return nil
}
+// SendCommitQueueResult sends an updated GitHub PR status for a commit queue
+// result. If the patch is not part of a PR, this is a no-op.
func SendCommitQueueResult(p *patch.Patch, status message.GithubState, description string) error {
if p.GithubPatchData.PRNumber == 0 {
return nil
@@ -1023,7 +1237,7 @@ func SendCommitQueueResult(p *patch.Patch, status message.GithubState, descripti
if err != nil {
return errors.Wrap(err, "unable to get settings")
}
- url = fmt.Sprintf("%s/version/%s", settings.Ui.Url, p.Version)
+ url = fmt.Sprintf("%s/version/%s?redirect_spruce_users=true", settings.Ui.Url, p.Version)
}
msg := message.GithubStatus{
Owner: projectRef.Owner,
@@ -1039,6 +1253,11 @@ func SendCommitQueueResult(p *patch.Patch, status message.GithubState, descripti
return errors.Wrap(err, "getting GitHub sender")
}
sender.Send(message.NewGithubStatusMessageWithRepo(level.Notice, msg))
-
+ grip.Info(message.Fields{
+ "ticket": thirdparty.GithubInvestigation,
+ "message": "called github status send",
+ "caller": "commit queue result",
+ "patch_id": p.Id,
+ })
return nil
}
diff --git a/model/patch_lifecycle_test.go b/model/patch_lifecycle_test.go
index 3186a30bdc7..afd7f86c076 100644
--- a/model/patch_lifecycle_test.go
+++ b/model/patch_lifecycle_test.go
@@ -3,7 +3,6 @@ package model
import (
"context"
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -16,11 +15,13 @@ import (
"github.com/evergreen-ci/evergreen/model/build"
"github.com/evergreen-ci/evergreen/model/commitqueue"
"github.com/evergreen-ci/evergreen/model/distro"
+ "github.com/evergreen-ci/evergreen/model/manifest"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/model/user"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/utility"
"github.com/mongodb/grip"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/assert"
@@ -52,11 +53,11 @@ func init() {
}
func clearAll(t *testing.T) {
- require.NoError(t, db.ClearCollections(ProjectRefCollection, patch.Collection, VersionCollection, build.Collection, task.Collection, distro.Collection))
+ require.NoError(t, db.ClearCollections(manifest.Collection, ParserProjectCollection, ProjectRefCollection, patch.Collection, VersionCollection, build.Collection, task.Collection, distro.Collection))
}
// resetPatchSetup clears the ProjectRef, Patch, Version, Build, and Task Collections
-// and creates a patch from the test path given.
+// and creates a patch from the test path given. The patch is not inserted.
func resetPatchSetup(t *testing.T, testPath string) *patch.Patch {
clearAll(t)
projectRef := &ProjectRef{
@@ -85,7 +86,7 @@ func resetPatchSetup(t *testing.T, testPath string) *patch.Patch {
err = baseVersion.Insert()
require.NoError(t, err, "Couldn't insert test base version: %v", err)
- fileBytes, err := ioutil.ReadFile(patchFile)
+ fileBytes, err := os.ReadFile(patchFile)
require.NoError(t, err, "Couldn't read patch file: %v", err)
// this patch adds a new task to the existing build
@@ -111,8 +112,7 @@ func resetPatchSetup(t *testing.T, testPath string) *patch.Patch {
},
},
}
- err = configPatch.Insert()
- require.NoError(t, err, "Couldn't insert test patch: %v", err)
+
return configPatch
}
@@ -135,7 +135,7 @@ func resetProjectlessPatchSetup(t *testing.T) *patch.Patch {
err := projectRef.Insert()
require.NoError(t, err, "Couldn't insert test project ref: %v", err)
- fileBytes, err := ioutil.ReadFile(newProjectPatchFile)
+ fileBytes, err := os.ReadFile(newProjectPatchFile)
require.NoError(t, err, "Couldn't read patch file: %v", err)
// this patch adds a new task to the existing build
@@ -172,38 +172,100 @@ func TestSetPriority(t *testing.T) {
for _, p := range patches {
assert.NoError(t, p.Insert())
}
- err := SetVersionPriority("aabbccddeeff001122334455", 7, "")
+ err := SetVersionsPriority([]string{"aabbccddeeff001122334455"}, 7, "")
assert.NoError(t, err)
foundTask, err := task.FindOneId("t1")
assert.NoError(t, err)
assert.Equal(t, int64(7), foundTask.Priority)
}
-func TestGetPatchedProject(t *testing.T) {
+func TestGetPatchedProjectAndGetPatchedProjectConfig(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- testutil.ConfigureIntegrationTest(t, patchTestConfig, "TestConfigurePatch")
+ testutil.ConfigureIntegrationTest(t, patchTestConfig, t.Name())
+ token, err := patchTestConfig.GetGithubOauthToken()
+ require.NoError(t, err)
Convey("With calling GetPatchedProject with a config and remote configuration path",
t, func() {
Convey("Calling GetPatchedProject returns a valid project given a patch and settings", func() {
configPatch := resetPatchSetup(t, configFilePath)
- token, err := patchTestConfig.GetGithubOauthToken()
+ project, patchConfig, err := GetPatchedProject(ctx, patchTestConfig, configPatch, token)
So(err, ShouldBeNil)
- project, patchConfig, err := GetPatchedProject(ctx, configPatch, token)
- So(err, ShouldBeNil)
- So(patchConfig, ShouldNotBeEmpty)
So(project, ShouldNotBeNil)
+ So(patchConfig, ShouldNotBeNil)
+ So(patchConfig.PatchedParserProjectYAML, ShouldNotBeEmpty)
+ So(patchConfig.PatchedParserProject, ShouldNotBeNil)
+
+ Convey("Calling GetPatchedProjectConfig should return the same project config as GetPatchedProject", func() {
+ projectConfig, err := GetPatchedProjectConfig(ctx, patchTestConfig, configPatch, token)
+ So(err, ShouldBeNil)
+ So(projectConfig, ShouldEqual, patchConfig.PatchedProjectConfig)
+ })
+
+ Convey("Calling GetPatchedProject with a created but unfinalized patch", func() {
+ configPatch := resetPatchSetup(t, configFilePath)
+
+ // Simulate what patch creation does.
+ patchConfig.PatchedParserProject.Id = configPatch.Id.Hex()
+ So(patchConfig.PatchedParserProject.Insert(), ShouldBeNil)
+ configPatch.ProjectStorageMethod = evergreen.ProjectStorageMethodDB
+ configPatch.PatchedProjectConfig = patchConfig.PatchedProjectConfig
+
+ projectFromPatchAndDB, patchConfigFromPatchAndDB, err := GetPatchedProject(ctx, patchTestConfig, configPatch, "invalid-token-do-not-fetch-from-github")
+ So(err, ShouldBeNil)
+ So(projectFromPatchAndDB, ShouldNotBeNil)
+ So(len(projectFromPatchAndDB.Tasks), ShouldEqual, len(project.Tasks))
+ So(patchConfig, ShouldNotBeNil)
+ So(patchConfigFromPatchAndDB.PatchedParserProject, ShouldNotBeNil)
+ So(len(patchConfigFromPatchAndDB.PatchedParserProject.Tasks), ShouldEqual, len(patchConfig.PatchedParserProject.Tasks))
+ So(patchConfigFromPatchAndDB.PatchedProjectConfig, ShouldEqual, patchConfig.PatchedProjectConfig)
+
+ Convey("Calling GetPatchedProjectConfig should return the same project config as GetPatchedProject", func() {
+ projectConfigFromPatch, err := GetPatchedProjectConfig(ctx, patchTestConfig, configPatch, token)
+ So(err, ShouldBeNil)
+ So(projectConfigFromPatch, ShouldEqual, patchConfig.PatchedProjectConfig)
+ })
+ })
+
+ Convey("Calling GetPatchedProject with a created but unfinalized patch using deprecated patched parser project", func() {
+ configPatch := resetPatchSetup(t, configFilePath)
+
+ // Simulate what patch creation does for old patches.
+ configPatch.PatchedParserProject = patchConfig.PatchedParserProjectYAML
+ configPatch.PatchedProjectConfig = patchConfig.PatchedProjectConfig
+
+ projectFromPatch, patchConfigFromPatch, err := GetPatchedProject(ctx, patchTestConfig, configPatch, "invalid-token-do-not-fetch-from-github")
+ So(err, ShouldBeNil)
+ So(patchConfigFromPatch, ShouldNotBeNil)
+ So(projectFromPatch, ShouldNotBeNil)
+ So(len(projectFromPatch.Tasks), ShouldEqual, len(project.Tasks))
+ So(patchConfigFromPatch.PatchedParserProject, ShouldNotBeNil)
+ So(len(patchConfigFromPatch.PatchedParserProject.Tasks), ShouldEqual, len(patchConfig.PatchedParserProject.Tasks))
+ So(patchConfigFromPatch.PatchedParserProjectYAML, ShouldEqual, patchConfig.PatchedParserProjectYAML)
+ So(patchConfigFromPatch.PatchedProjectConfig, ShouldEqual, patchConfig.PatchedProjectConfig)
+
+ Convey("Calling GetPatchedProjectConfig should return the same project config as GetPatchedProject", func() {
+ projectConfigFromPatch, err := GetPatchedProjectConfig(ctx, patchTestConfig, configPatch, token)
+ So(err, ShouldBeNil)
+ So(projectConfigFromPatch, ShouldEqual, patchConfig.PatchedProjectConfig)
+ })
+ })
+
})
Convey("Calling GetPatchedProject on a project-less version returns a valid project", func() {
configPatch := resetProjectlessPatchSetup(t)
- token, err := patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- project, patchConfig, err := GetPatchedProject(ctx, configPatch, token)
+ project, patchConfig, err := GetPatchedProject(ctx, patchTestConfig, configPatch, token)
So(err, ShouldBeNil)
So(patchConfig, ShouldNotBeEmpty)
So(project, ShouldNotBeNil)
+
+ Convey("Calling GetPatchedProjectConfig should return the same project config as GetPatchedProject", func() {
+ projectConfig, err := GetPatchedProjectConfig(ctx, patchTestConfig, configPatch, token)
+ So(err, ShouldBeNil)
+ So(projectConfig, ShouldEqual, patchConfig.PatchedProjectConfig)
+ })
})
Convey("Calling GetPatchedProject on a patch with GridFS patches works", func() {
@@ -214,12 +276,16 @@ func TestGetPatchedProject(t *testing.T) {
configPatch.Patches[0].PatchSet.Patch = ""
configPatch.Patches[0].PatchSet.PatchFileId = patchFileID.Hex()
- token, err := patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- project, patchConfig, err := GetPatchedProject(ctx, configPatch, token)
+ project, patchConfig, err := GetPatchedProject(ctx, patchTestConfig, configPatch, token)
So(err, ShouldBeNil)
So(patchConfig, ShouldNotBeEmpty)
So(project, ShouldNotBeNil)
+
+ Convey("Calling GetPatchedProjectConfig should return the same project config as GetPatchedProject", func() {
+ projectConfig, err := GetPatchedProjectConfig(ctx, patchTestConfig, configPatch, token)
+ So(err, ShouldBeNil)
+ So(projectConfig, ShouldEqual, patchConfig.PatchedProjectConfig)
+ })
})
Reset(func() {
@@ -230,88 +296,210 @@ func TestGetPatchedProject(t *testing.T) {
}
func TestFinalizePatch(t *testing.T) {
- testutil.ConfigureIntegrationTest(t, patchTestConfig, "TestFinalizePatch")
-
+ testutil.ConfigureIntegrationTest(t, patchTestConfig, t.Name())
+ require.NoError(t, evergreen.UpdateConfig(patchTestConfig), ShouldBeNil)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- Convey("With FinalizePatch on a project and commit event generated from GetPatchedProject path",
- t, func() {
- configPatch := resetPatchSetup(t, configFilePath)
- Convey("a patched config should drive version creation", func() {
- token, err := patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- project, patchConfig, err := GetPatchedProject(ctx, configPatch, token)
- So(err, ShouldBeNil)
- So(project, ShouldNotBeNil)
- configPatch.PatchedParserProject = patchConfig.PatchedParserProject
- token, err = patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- version, err := FinalizePatch(ctx, configPatch, evergreen.PatchVersionRequester, token)
- So(err, ShouldBeNil)
- So(version, ShouldNotBeNil)
- So(version.Parameters, ShouldHaveLength, 1)
- // ensure the relevant builds/tasks were created
- builds, err := build.Find(build.All)
- So(err, ShouldBeNil)
- So(len(builds), ShouldEqual, 1)
- So(len(builds[0].Tasks), ShouldEqual, 2)
- tasks, err := task.Find(bson.M{})
- So(err, ShouldBeNil)
- So(len(tasks), ShouldEqual, 2)
- })
-
- Convey("a patch that does not include the remote config should not "+
- "drive version creation", func() {
- patchedConfigFile := "fakeInPatchSoNotPatched"
- configPatch := resetPatchSetup(t, patchedConfigFile)
- token, err := patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- project, patchConfig, err := GetPatchedProject(ctx, configPatch, token)
- So(project, ShouldNotBeNil)
- So(err, ShouldBeNil)
- configPatch.PatchedParserProject = patchConfig.PatchedParserProject
- token, err = patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- version, err := FinalizePatch(ctx, configPatch, evergreen.PatchVersionRequester, token)
- So(err, ShouldBeNil)
- So(version, ShouldNotBeNil)
- So(err, ShouldBeNil)
- So(version, ShouldNotBeNil)
+ // Running a multi-document transaction requires the collections to exist
+ // first before any documents can be inserted.
+ require.NoError(t, db.CreateCollections(manifest.Collection, VersionCollection, ParserProjectCollection, ProjectConfigCollection))
+
+ token, err := patchTestConfig.GetGithubOauthToken()
+ require.NoError(t, err)
+
+ for name, test := range map[string]func(t *testing.T, p *patch.Patch, patchConfig *PatchConfig){
+ "VersionCreationWithPatchedParserProject": func(t *testing.T, p *patch.Patch, patchConfig *PatchConfig) {
+ modulesYml := `
+modules:
+ - name: sandbox
+ repo: git@github.com:evergreen-ci/commit-queue-sandbox.git
+ branch: main
+ - name: evergreen
+ repo: git@github.com:evergreen-ci/evergreen.git
+ branch: main
+`
+ p.PatchedParserProject = patchConfig.PatchedParserProjectYAML
+ p.PatchedParserProject += modulesYml
+ require.NoError(t, p.Insert())
+
+ version, err := FinalizePatch(ctx, p, evergreen.PatchVersionRequester, token)
+ require.NoError(t, err)
+ assert.NotNil(t, version)
+ assert.Len(t, version.Parameters, 1)
+ assert.Equal(t, evergreen.ProjectStorageMethodDB, version.ProjectStorageMethod, "version's project storage method should be set")
+
+ dbPatch, err := patch.FindOneId(p.Id.Hex())
+ require.NoError(t, err)
+ require.NotZero(t, dbPatch)
+ assert.True(t, dbPatch.Activated)
+ assert.Zero(t, dbPatch.PatchedParserProject)
+ // ensure the relevant builds/tasks were created
+ builds, err := build.Find(build.All)
+ require.NoError(t, err)
+ assert.Len(t, builds, 1)
+ assert.Len(t, builds[0].Tasks, 2)
+ tasks, err := task.Find(bson.M{})
+ require.NoError(t, err)
+ assert.Len(t, tasks, 2)
+ },
+ "VersionCreationWithParserProjectInDB": func(t *testing.T, p *patch.Patch, patchConfig *PatchConfig) {
+ project, patchConfig, err := GetPatchedProject(ctx, patchTestConfig, p, token)
+ require.NoError(t, err)
+ assert.NotNil(t, project)
+
+ patchConfig.PatchedParserProject.Id = p.Id.Hex()
+ require.NoError(t, patchConfig.PatchedParserProject.Insert())
+ ppStorageMethod := evergreen.ProjectStorageMethodDB
+ p.ProjectStorageMethod = ppStorageMethod
+ require.NoError(t, p.Insert())
+
+ version, err := FinalizePatch(ctx, p, evergreen.PatchVersionRequester, token)
+ require.NoError(t, err)
+ assert.NotNil(t, version)
+ assert.Len(t, version.Parameters, 1)
+ assert.Equal(t, ppStorageMethod, version.ProjectStorageMethod, "version's project storage method should match that of its patch")
+
+ dbPatch, err := patch.FindOneId(p.Id.Hex())
+ require.NoError(t, err)
+ require.NotZero(t, dbPatch)
+ assert.True(t, dbPatch.Activated)
+ // ensure the relevant builds/tasks were created
+ builds, err := build.Find(build.All)
+ require.NoError(t, err)
+ assert.Len(t, builds, 1)
+ assert.Len(t, builds[0].Tasks, 2)
+ tasks, err := task.Find(bson.M{})
+ require.NoError(t, err)
+ assert.Len(t, tasks, 2)
+ },
+ "VersionCreationWithAutoUpdateModules": func(t *testing.T, p *patch.Patch, patchConfig *PatchConfig) {
+ project, patchConfig, err := GetPatchedProject(ctx, patchTestConfig, p, token)
+ require.NoError(t, err)
+ assert.NotNil(t, project)
+
+ baseManifest := manifest.Manifest{
+ Revision: patchedRevision,
+ ProjectName: patchedProject,
+ Modules: map[string]*manifest.Module{
+ "sandbox": {Branch: "main", Repo: "sandbox", Owner: "else", Revision: "123"},
+ "evergreen": {Branch: "main", Repo: "evergreen", Owner: "something", Revision: "abc"},
+ },
+ IsBase: true,
+ }
+ _, err = baseManifest.TryInsert()
+ require.NoError(t, err)
+
+ modulesYml := `
+modules:
+ - name: sandbox
+ repo: git@github.com:evergreen-ci/commit-queue-sandbox.git
+ branch: main
+ auto_update: true
+ - name: evergreen
+ repo: git@github.com:evergreen-ci/evergreen.git
+ branch: main
+`
+ p.PatchedParserProject = patchConfig.PatchedParserProjectYAML
+ p.PatchedParserProject += modulesYml
+ require.NoError(t, p.Insert())
+
+ version, err := FinalizePatch(ctx, p, evergreen.PatchVersionRequester, token)
+ require.NoError(t, err)
+ assert.NotNil(t, version)
+ // Ensure that the manifest was created and that auto_update worked for
+ // sandbox module but was skipped for evergreen
+ mfst, err := manifest.FindOne(manifest.ById(p.Id.Hex()))
+ require.NoError(t, err)
+ assert.NotNil(t, mfst)
+ assert.Len(t, mfst.Modules, 2)
+ assert.NotEqual(t, mfst.Modules["sandbox"].Revision, "123")
+ assert.Equal(t, mfst.Modules["evergreen"].Revision, "abc")
+ },
+ "EmptyCommitQueuePatchDoesntCreateVersion": func(t *testing.T, p *patch.Patch, patchConfig *PatchConfig) {
+ patchConfig.PatchedParserProject.Id = p.Id.Hex()
+ require.NoError(t, patchConfig.PatchedParserProject.Insert())
+ ppStorageMethod := evergreen.ProjectStorageMethodDB
+ p.ProjectStorageMethod = ppStorageMethod
+
+ //normal patch works
+ p.Tasks = []string{}
+ p.BuildVariants = []string{}
+ p.VariantsTasks = []patch.VariantTasks{}
+ require.NoError(t, p.Insert())
+
+ v, err := FinalizePatch(ctx, p, evergreen.MergeTestRequester, token)
+ require.NoError(t, err)
+ assert.NotNil(t, v)
+ assert.Empty(t, v.BuildIds)
+
+ // commit queue patch should not
+ p.Alias = evergreen.CommitQueueAlias
+ _, err = FinalizePatch(ctx, p, evergreen.MergeTestRequester, token)
+ require.Error(t, err)
+ assert.Contains(t, err.Error(), "no builds or tasks for commit queue version")
+ },
+ } {
+ t.Run(name, func(t *testing.T) {
+ p := resetPatchSetup(t, configFilePath)
- // ensure the relevant builds/tasks were created
- builds, err := build.Find(build.All)
- So(err, ShouldBeNil)
- So(len(builds), ShouldEqual, 1)
- So(len(builds[0].Tasks), ShouldEqual, 1)
- tasks, err := task.FindAll(task.All)
- So(err, ShouldBeNil)
- So(len(tasks), ShouldEqual, 1)
- })
+ project, patchConfig, err := GetPatchedProject(ctx, patchTestConfig, p, token)
+ require.NoError(t, err)
+ assert.NotNil(t, project)
- Convey("a commit queue patch with no tasks/build variants should not create a version", func() {
- //normal patch works
- token, err := patchTestConfig.GetGithubOauthToken()
- So(err, ShouldBeNil)
- configPatch := resetPatchSetup(t, configFilePath)
- configPatch.Tasks = []string{}
- configPatch.BuildVariants = []string{}
- configPatch.VariantsTasks = []patch.VariantTasks{}
- v, err := FinalizePatch(ctx, configPatch, evergreen.MergeTestRequester, token)
- So(err, ShouldBeNil)
- So(v, ShouldNotBeNil)
- So(v.BuildIds, ShouldBeEmpty)
-
- // commit queue patch should not
- configPatch.Alias = evergreen.CommitQueueAlias
- _, err = FinalizePatch(ctx, configPatch, evergreen.MergeTestRequester, token)
- So(err, ShouldNotBeNil)
- So(err.Error(), ShouldContainSubstring, "no builds or tasks for commit queue version")
- })
- Reset(func() {
- So(db.Clear(distro.Collection), ShouldBeNil)
- })
+ test(t, p, patchConfig)
})
+ }
+}
+
+func TestGetFullPatchParams(t *testing.T) {
+ require.NoError(t, db.ClearCollections(ProjectRefCollection, ProjectAliasCollection, patch.Collection))
+ p := patch.Patch{
+ Id: patch.NewId("aaaaaaaaaaff001122334455"),
+ Project: "p1",
+ Alias: "test_alias",
+ Parameters: []patch.Parameter{
+ {
+ Key: "a",
+ Value: "3",
+ },
+ {
+ Key: "c",
+ Value: "4",
+ },
+ },
+ }
+ alias := ProjectAlias{
+ ProjectID: "p1",
+ Alias: "test_alias",
+ Variant: "ubuntu",
+ Task: "subcommand",
+ Parameters: []patch.Parameter{
+ {
+ Key: "a",
+ Value: "1",
+ },
+ {
+ Key: "b",
+ Value: "2",
+ },
+ },
+ }
+ pRef := ProjectRef{
+ Id: "p1",
+ }
+ require.NoError(t, pRef.Insert())
+ require.NoError(t, p.Insert())
+ require.NoError(t, alias.Upsert())
+
+ params, err := getFullPatchParams(&p)
+ require.NoError(t, err)
+ require.Len(t, params, 3)
+ for _, param := range params {
+ if param.Key == "a" {
+ assert.Equal(t, param.Value, "3")
+ }
+ }
}
func TestMakePatchedConfig(t *testing.T) {
@@ -325,7 +513,7 @@ func TestMakePatchedConfig(t *testing.T) {
Convey("the config should be patched correctly", func() {
remoteConfigPath := filepath.Join("config", "evergreen.yml")
- fileBytes, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "patch.diff"))
+ fileBytes, err := os.ReadFile(filepath.Join(cwd, "testdata", "patch.diff"))
So(err, ShouldBeNil)
// update patch with remove config path variable
diffString := fmt.Sprintf(string(fileBytes),
@@ -344,7 +532,7 @@ func TestMakePatchedConfig(t *testing.T) {
},
}},
}
- projectBytes, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "project.config"))
+ projectBytes, err := os.ReadFile(filepath.Join(cwd, "testdata", "project.config"))
So(err, ShouldBeNil)
projectData, err := MakePatchedConfig(ctx, env, p, remoteConfigPath, string(projectBytes))
So(err, ShouldBeNil)
@@ -357,7 +545,7 @@ func TestMakePatchedConfig(t *testing.T) {
})
Convey("an empty base config should be patched correctly", func() {
remoteConfigPath := filepath.Join("model", "testdata", "project2.config")
- fileBytes, err := ioutil.ReadFile(filepath.Join(cwd, "testdata", "project.diff"))
+ fileBytes, err := os.ReadFile(filepath.Join(cwd, "testdata", "project.diff"))
So(err, ShouldBeNil)
p := &patch.Patch{
Patches: []patch.ModulePatch{{
@@ -413,206 +601,15 @@ func shouldContainPair(actual interface{}, expected ...interface{}) string {
return fmt.Sprintf("Expected list to contain pair '%v', but it didn't", expectedPair)
}
-func TestIncludeDependencies(t *testing.T) {
- Convey("With a project task config with cross-variant dependencies", t, func() {
- parserProject := &ParserProject{
- Tasks: []parserTask{
- {Name: "t1"},
- {Name: "t2", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "t1"}}}},
- {Name: "t3"},
- {Name: "t4", Patchable: new(bool)},
- {Name: "t5", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "t4"}}}},
- },
- BuildVariants: []parserBV{
- {Name: "v1", Tasks: []parserBVTaskUnit{{Name: "t1"}, {Name: "t2"}}},
- {Name: "v2", Tasks: []parserBVTaskUnit{
- {Name: "t3", DependsOn: parserDependencies{
- {TaskSelector: taskSelector{Name: "t2", Variant: &variantSelector{StringSelector: "v1"}}},
- }},
- {Name: "t4"},
- {Name: "t5"},
- }},
- },
- }
- p, err := TranslateProject(parserProject)
- So(err, ShouldBeNil)
- So(p, ShouldNotBeNil)
-
- Convey("a patch against v1/t1 should remain unchanged", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "t1"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 1)
- So(pairs[0], ShouldResemble, TVPair{"v1", "t1"})
- })
-
- Convey("a patch against v1/t2 should add t1", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "t2"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 2)
- So(pairs, shouldContainPair, TVPair{"v1", "t2"})
- So(pairs, shouldContainPair, TVPair{"v1", "t1"})
- })
-
- Convey("a patch against v2/t3 should add t1,t2, and v1", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v2", "t3"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 3)
- So(pairs, shouldContainPair, TVPair{"v1", "t2"})
- So(pairs, shouldContainPair, TVPair{"v1", "t1"})
- So(pairs, shouldContainPair, TVPair{"v2", "t3"})
- })
-
- Convey("a patch against v2/t5 should be pruned, since its dependency is not patchable", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v2", "t5"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 0)
-
- pairs, _ = IncludeDependencies(p, []TVPair{{"v2", "t5"}}, evergreen.RepotrackerVersionRequester)
- So(len(pairs), ShouldEqual, 2)
- })
- })
-
- Convey("With a project task config with * selectors", t, func() {
- parserProject := &ParserProject{
- Tasks: []parserTask{
- {Name: "t1"},
- {Name: "t2"},
- {Name: "t3", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: AllDependencies}}}},
- {Name: "t4", DependsOn: parserDependencies{
- {TaskSelector: taskSelector{
- Name: "t3", Variant: &variantSelector{StringSelector: AllVariants},
- }},
- }},
- {Name: "t5", DependsOn: parserDependencies{
- {TaskSelector: taskSelector{
- Name: AllDependencies, Variant: &variantSelector{StringSelector: AllVariants},
- }},
- }},
- },
- BuildVariants: []parserBV{
- {Name: "v1", Tasks: []parserBVTaskUnit{{Name: "t1"}, {Name: "t2"}, {Name: "t3"}}},
- {Name: "v2", Tasks: []parserBVTaskUnit{{Name: "t1"}, {Name: "t2"}, {Name: "t3"}}},
- {Name: "v3", Tasks: []parserBVTaskUnit{{Name: "t4"}}},
- {Name: "v4", Tasks: []parserBVTaskUnit{{Name: "t5"}}},
- },
- }
- p, err := TranslateProject(parserProject)
- So(err, ShouldBeNil)
- So(p, ShouldNotBeNil)
-
- Convey("a patch against v1/t3 should include t2 and t1", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "t3"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 3)
- So(pairs, shouldContainPair, TVPair{"v1", "t2"})
- So(pairs, shouldContainPair, TVPair{"v1", "t1"})
- So(pairs, shouldContainPair, TVPair{"v1", "t3"})
- })
-
- Convey("a patch against v3/t4 should include v1, v2, t3, t2, and t1", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v3", "t4"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 7)
-
- So(pairs, shouldContainPair, TVPair{"v3", "t4"})
- // requires t3 on the other variants
- So(pairs, shouldContainPair, TVPair{"v1", "t3"})
- So(pairs, shouldContainPair, TVPair{"v2", "t3"})
-
- // t3 requires all the others
- So(pairs, shouldContainPair, TVPair{"v1", "t2"})
- So(pairs, shouldContainPair, TVPair{"v1", "t1"})
- So(pairs, shouldContainPair, TVPair{"v2", "t2"})
- So(pairs, shouldContainPair, TVPair{"v2", "t1"})
- })
-
- Convey("a patch against v4/t5 should include v1, v2, v3, t4, t3, t2, and t1", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v4", "t5"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 8)
- So(pairs, shouldContainPair, TVPair{"v4", "t5"})
- So(pairs, shouldContainPair, TVPair{"v1", "t1"})
- So(pairs, shouldContainPair, TVPair{"v1", "t2"})
- So(pairs, shouldContainPair, TVPair{"v1", "t3"})
- So(pairs, shouldContainPair, TVPair{"v2", "t1"})
- So(pairs, shouldContainPair, TVPair{"v2", "t2"})
- So(pairs, shouldContainPair, TVPair{"v2", "t3"})
- So(pairs, shouldContainPair, TVPair{"v3", "t4"})
- })
- })
-
- Convey("With a project task config with cyclical requirements", t, func() {
- all := []parserBVTaskUnit{{Name: "1"}, {Name: "2"}, {Name: "3"}}
- parserProject := &ParserProject{
- Tasks: []parserTask{
- {Name: "1", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "2"}}, {TaskSelector: taskSelector{Name: "3"}}}},
- {Name: "2", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "1"}}, {TaskSelector: taskSelector{Name: "3"}}}},
- {Name: "3", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "2"}}, {TaskSelector: taskSelector{Name: "1"}}}},
- },
- BuildVariants: []parserBV{
- {Name: "v1", Tasks: all},
- {Name: "v2", Tasks: all},
- },
- }
-
- p, err := TranslateProject(parserProject)
- So(err, ShouldBeNil)
- So(p, ShouldNotBeNil)
-
- Convey("all tasks should be scheduled no matter which is initially added", func() {
- Convey("for '1'", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "1"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 3)
- So(pairs, shouldContainPair, TVPair{"v1", "1"})
- So(pairs, shouldContainPair, TVPair{"v1", "2"})
- So(pairs, shouldContainPair, TVPair{"v1", "3"})
- })
- Convey("for '2'", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v1", "2"}, {"v2", "2"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 6)
- So(pairs, shouldContainPair, TVPair{"v1", "1"})
- So(pairs, shouldContainPair, TVPair{"v1", "2"})
- So(pairs, shouldContainPair, TVPair{"v1", "3"})
- So(pairs, shouldContainPair, TVPair{"v2", "1"})
- So(pairs, shouldContainPair, TVPair{"v2", "2"})
- So(pairs, shouldContainPair, TVPair{"v2", "3"})
- })
- Convey("for '3'", func() {
- pairs, _ := IncludeDependencies(p, []TVPair{{"v2", "3"}}, evergreen.PatchVersionRequester)
- So(len(pairs), ShouldEqual, 3)
- So(pairs, shouldContainPair, TVPair{"v2", "1"})
- So(pairs, shouldContainPair, TVPair{"v2", "2"})
- So(pairs, shouldContainPair, TVPair{"v2", "3"})
- })
- })
- })
- Convey("With a task that depends on task groups", t, func() {
- parserProject := &ParserProject{
- Tasks: []parserTask{
- {Name: "a", DependsOn: parserDependencies{{TaskSelector: taskSelector{Name: "*", Variant: &variantSelector{StringSelector: "*"}}}}},
- {Name: "b"},
- },
- TaskGroups: []parserTaskGroup{
- {Name: "task-group", Tasks: []string{"b"}},
- },
- BuildVariants: []parserBV{
- {Name: "variant-with-group", Tasks: []parserBVTaskUnit{{Name: "task-group"}}},
- {Name: "initial-variant", Tasks: []parserBVTaskUnit{{Name: "a"}}},
- },
- }
- p, err := TranslateProject(parserProject)
- So(err, ShouldBeNil)
- So(p, ShouldNotBeNil)
-
- initDep := TVPair{TaskName: "a", Variant: "initial-variant"}
- pairs, _ := IncludeDependencies(p, []TVPair{initDep}, evergreen.PatchVersionRequester)
- So(pairs, ShouldHaveLength, 2)
- So(initDep, ShouldBeIn, pairs)
- })
-}
-
func TestVariantTasksToTVPairs(t *testing.T) {
assert := assert.New(t)
input := []patch.VariantTasks{
- patch.VariantTasks{
+ {
Variant: "variant",
Tasks: []string{"task1", "task2", "task3"},
DisplayTasks: []patch.DisplayTask{
- patch.DisplayTask{
+ {
Name: "displaytask1",
},
},
@@ -659,13 +656,13 @@ func TestAddNewPatch(t *testing.T) {
proj := &Project{
Identifier: "project",
BuildVariants: []BuildVariant{
- BuildVariant{
+ {
Name: "variant",
Tasks: []BuildVariantTaskUnit{
- {Name: "task1"}, {Name: "task2"}, {Name: "task3"},
+ {Name: "task1", Variant: "variant"}, {Name: "task2", Variant: "variant"}, {Name: "task3", Variant: "variant"},
},
DisplayTasks: []patch.DisplayTask{
- patch.DisplayTask{
+ {
Name: "displaytask1",
ExecTasks: []string{"task1", "task2"},
},
@@ -674,28 +671,37 @@ func TestAddNewPatch(t *testing.T) {
},
},
Tasks: []ProjectTask{
- ProjectTask{Name: "task1"}, ProjectTask{Name: "task2"}, ProjectTask{Name: "task3"},
+ {Name: "task1"}, {Name: "task2"}, {Name: "task3"},
},
}
tasks := VariantTasksToTVPairs([]patch.VariantTasks{
- patch.VariantTasks{
+ {
Variant: "variant",
Tasks: []string{"task1", "task2", "task3"},
DisplayTasks: []patch.DisplayTask{
- patch.DisplayTask{
+ {
Name: "displaytask1",
},
},
},
})
- _, err := addNewBuilds(context.Background(), specificActivationInfo{}, v, proj, tasks, nil, p.SyncAtEndOpts, &ref, "")
+ creationInfo := TaskCreationInfo{
+ Project: proj,
+ ProjectRef: &ref,
+ Version: v,
+ Pairs: tasks,
+ ActivationInfo: specificActivationInfo{},
+ SyncAtEndOpts: p.SyncAtEndOpts,
+ GeneratedBy: "",
+ }
+ _, err := addNewBuilds(context.Background(), creationInfo, nil)
assert.NoError(err)
dbBuild, err := build.FindOne(db.Q{})
assert.NoError(err)
assert.NotNil(dbBuild)
assert.Len(dbBuild.Tasks, 2)
- _, err = addNewTasks(context.Background(), specificActivationInfo{}, v, proj, &ref, tasks, []build.Build{*dbBuild}, p.SyncAtEndOpts, "")
+ _, err = addNewTasks(context.Background(), creationInfo, []build.Build{*dbBuild})
assert.NoError(err)
dbTasks, err := task.FindAll(db.Query(task.ByBuildId(dbBuild.Id)))
assert.NoError(err)
@@ -739,13 +745,13 @@ func TestAddNewPatchWithMissingBaseVersion(t *testing.T) {
proj := &Project{
Identifier: "project",
BuildVariants: []BuildVariant{
- BuildVariant{
+ {
Name: "variant",
Tasks: []BuildVariantTaskUnit{
- {Name: "task1"}, {Name: "task2"}, {Name: "task3"},
+ {Name: "task1", Variant: "variant"}, {Name: "task2", Variant: "variant"}, {Name: "task3", Variant: "variant"},
},
DisplayTasks: []patch.DisplayTask{
- patch.DisplayTask{
+ {
Name: "displaytask1",
ExecTasks: []string{"task1", "task2"},
},
@@ -754,28 +760,37 @@ func TestAddNewPatchWithMissingBaseVersion(t *testing.T) {
},
},
Tasks: []ProjectTask{
- ProjectTask{Name: "task1"}, ProjectTask{Name: "task2"}, ProjectTask{Name: "task3"},
+ {Name: "task1"}, {Name: "task2"}, {Name: "task3"},
},
}
tasks := VariantTasksToTVPairs([]patch.VariantTasks{
- patch.VariantTasks{
+ {
Variant: "variant",
Tasks: []string{"task1", "task2", "task3"},
DisplayTasks: []patch.DisplayTask{
- patch.DisplayTask{
+ {
Name: "displaytask1",
},
},
},
})
- _, err := addNewBuilds(context.Background(), specificActivationInfo{}, v, proj, tasks, nil, p.SyncAtEndOpts, &ref, "")
+ creationInfo := TaskCreationInfo{
+ Project: proj,
+ ProjectRef: &ref,
+ Version: v,
+ Pairs: tasks,
+ ActivationInfo: specificActivationInfo{},
+ SyncAtEndOpts: p.SyncAtEndOpts,
+ GeneratedBy: "",
+ }
+ _, err := addNewBuilds(context.Background(), creationInfo, nil)
assert.NoError(err)
dbBuild, err := build.FindOne(db.Q{})
assert.NoError(err)
assert.NotNil(dbBuild)
assert.Len(dbBuild.Tasks, 2)
- _, err = addNewTasks(context.Background(), specificActivationInfo{}, v, proj, &ref, tasks, []build.Build{*dbBuild}, p.SyncAtEndOpts, "")
+ _, err = addNewTasks(context.Background(), creationInfo, []build.Build{*dbBuild})
assert.NoError(err)
dbTasks, err := task.FindAll(db.Query(task.ByBuildId(dbBuild.Id)))
assert.NoError(err)
@@ -884,15 +899,14 @@ func TestRetryCommitQueueItems(t *testing.T) {
require.Len(t, cq.Queue, 1)
assert.Equal(t, "123", cq.Queue[0].Issue)
},
- "UnstartedPatch": func(*testing.T) {
+ "FinishedPatch": func(*testing.T) {
assert.NoError(t, projectRef.Insert())
- // not started but terminated within time range
p := patch.Patch{
Id: mgobson.NewObjectId(),
Project: projectRef.Id,
Githash: patchedRevision,
- StartTime: time.Time{},
+ StartTime: startTime.Add(-30 * time.Minute), // started out of range
FinishTime: startTime.Add(30 * time.Minute),
Status: evergreen.PatchFailed,
Alias: evergreen.CommitQueueAlias,
@@ -926,19 +940,6 @@ func TestRetryCommitQueueItems(t *testing.T) {
GithubPatchData: thirdparty.GithubPatch{
PRNumber: 123,
},
- Patches: []patch.ModulePatch{
- {
- Githash: "revision",
- ModuleName: "name",
- PatchSet: patch.PatchSet{
- Patch: "456",
- Summary: []thirdparty.Summary{
- {Name: configFilePath, Additions: 4, Deletions: 80},
- {Name: "random.txt", Additions: 6, Deletions: 0},
- },
- },
- },
- },
},
{ // within time frame, not failed
Id: mgobson.NewObjectId(),
@@ -1000,3 +1001,113 @@ func TestAddDisplayTasksToPatchReq(t *testing.T) {
assert.Equal(t, "t1", req.VariantsTasks[0].Tasks[0])
assert.Len(t, req.VariantsTasks[0].DisplayTasks, 2)
}
+
+func TestAbortPatchesWithGithubPatchData(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(commitqueue.Collection, patch.Collection, task.Collection, VersionCollection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T, p *patch.Patch, v *Version, tsk *task.Task){
+ "AbortsGitHubPRPatch": func(t *testing.T, p *patch.Patch, v *Version, tsk *task.Task) {
+ require.NoError(t, p.Insert())
+ require.NoError(t, tsk.Insert())
+
+ require.NoError(t, AbortPatchesWithGithubPatchData(time.Now(), false, "", p.GithubPatchData.BaseOwner, p.GithubPatchData.BaseRepo, p.GithubPatchData.PRNumber))
+
+ dbTask, err := task.FindOneId(tsk.Id)
+ require.NoError(t, err)
+ require.NotZero(t, dbTask)
+ assert.True(t, dbTask.Aborted)
+ },
+ "IgnoresGitHubPRPatchCreatedAfterTimestamp": func(t *testing.T, p *patch.Patch, v *Version, tsk *task.Task) {
+ p.CreateTime = time.Now()
+ require.NoError(t, p.Insert())
+ require.NoError(t, tsk.Insert())
+
+ require.NoError(t, AbortPatchesWithGithubPatchData(time.Now().Add(-time.Hour), false, "", p.GithubPatchData.BaseOwner, p.GithubPatchData.BaseRepo, p.GithubPatchData.PRNumber))
+
+ dbTask, err := task.FindOneId(tsk.Id)
+ require.NoError(t, err)
+ require.NotZero(t, dbTask)
+ assert.False(t, dbTask.Aborted)
+ },
+ "AbortsNonMergingCommitQueueItemForGitHubPR": func(t *testing.T, p *patch.Patch, v *Version, tsk *task.Task) {
+ p.Alias = evergreen.CommitQueueAlias
+ require.NoError(t, p.Insert())
+ tsk.CommitQueueMerge = true
+ tsk.Status = evergreen.TaskUndispatched
+ require.NoError(t, tsk.Insert())
+ cq := commitqueue.CommitQueue{
+ ProjectID: p.Project,
+ Queue: []commitqueue.CommitQueueItem{{
+ Issue: p.Id.Hex(),
+ PatchId: p.Id.Hex(),
+ Version: v.Id,
+ }},
+ }
+ require.NoError(t, commitqueue.InsertQueue(&cq))
+
+ require.NoError(t, AbortPatchesWithGithubPatchData(time.Now(), false, "", p.GithubPatchData.BaseOwner, p.GithubPatchData.BaseRepo, p.GithubPatchData.PRNumber))
+
+ dbCommitQueue, err := commitqueue.FindOneId(cq.ProjectID)
+ require.NoError(t, err)
+ require.NotZero(t, dbCommitQueue)
+ assert.Empty(t, dbCommitQueue.Queue)
+ },
+ "SkipMergingCommitQueueItemForGitHubPR": func(t *testing.T, p *patch.Patch, v *Version, tsk *task.Task) {
+ p.Alias = evergreen.CommitQueueAlias
+ require.NoError(t, p.Insert())
+ tsk.CommitQueueMerge = true
+ tsk.Status = evergreen.TaskStarted
+ require.NoError(t, tsk.Insert())
+ cq := commitqueue.CommitQueue{
+ ProjectID: p.Project,
+ Queue: []commitqueue.CommitQueueItem{{
+ Issue: p.Id.Hex(),
+ PatchId: p.Id.Hex(),
+ Version: v.Id,
+ }},
+ }
+ require.NoError(t, commitqueue.InsertQueue(&cq))
+
+ require.NoError(t, AbortPatchesWithGithubPatchData(time.Now(), false, "", p.GithubPatchData.BaseOwner, p.GithubPatchData.BaseRepo, p.GithubPatchData.PRNumber))
+
+ dbCommitQueue, err := commitqueue.FindOneId(cq.ProjectID)
+ require.NoError(t, err)
+ require.NotZero(t, dbCommitQueue)
+ assert.Len(t, dbCommitQueue.Queue, 1)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(commitqueue.Collection, patch.Collection, task.Collection, VersionCollection))
+ id := mgobson.NewObjectId()
+ v := Version{
+ Id: id.Hex(),
+ Status: evergreen.VersionStarted,
+ Activated: utility.TruePtr(),
+ }
+ require.NoError(t, v.Insert())
+ p := patch.Patch{
+ Id: id,
+ Version: v.Id,
+ Status: evergreen.PatchStarted,
+ Activated: true,
+ Project: "project",
+ CreateTime: time.Now().Add(-time.Hour),
+ GithubPatchData: thirdparty.GithubPatch{
+ BaseOwner: "owner",
+ BaseRepo: "repo",
+ PRNumber: 12345,
+ },
+ }
+ tsk := task.Task{
+ Id: "task",
+ Version: v.Id,
+ Status: evergreen.TaskStarted,
+ Project: p.Project,
+ Activated: true,
+ }
+
+ tCase(t, &p, &v, &tsk)
+ })
+ }
+}
diff --git a/model/pod/db.go b/model/pod/db.go
index c4b354beed7..b1dd2b4c9fd 100644
--- a/model/pod/db.go
+++ b/model/pod/db.go
@@ -20,9 +20,10 @@ var (
TypeKey = bsonutil.MustHaveTag(Pod{}, "Type")
StatusKey = bsonutil.MustHaveTag(Pod{}, "Status")
TaskContainerCreationOptsKey = bsonutil.MustHaveTag(Pod{}, "TaskContainerCreationOpts")
+ FamilyKey = bsonutil.MustHaveTag(Pod{}, "Family")
TimeInfoKey = bsonutil.MustHaveTag(Pod{}, "TimeInfo")
ResourcesKey = bsonutil.MustHaveTag(Pod{}, "Resources")
- RunningTaskKey = bsonutil.MustHaveTag(Pod{}, "RunningTask")
+ TaskRuntimeInfoKey = bsonutil.MustHaveTag(Pod{}, "TaskRuntimeInfo")
TaskContainerCreationOptsImageKey = bsonutil.MustHaveTag(TaskContainerCreationOptions{}, "Image")
TaskContainerCreationOptsMemoryMBKey = bsonutil.MustHaveTag(TaskContainerCreationOptions{}, "MemoryMB")
@@ -42,15 +43,15 @@ var (
ResourceInfoClusterKey = bsonutil.MustHaveTag(ResourceInfo{}, "Cluster")
ResourceInfoContainersKey = bsonutil.MustHaveTag(ResourceInfo{}, "Containers")
+ TaskRuntimeInfoRunningTaskIDKey = bsonutil.MustHaveTag(TaskRuntimeInfo{}, "RunningTaskID")
+ TaskRuntimeInfoRunningTaskExecutionKey = bsonutil.MustHaveTag(TaskRuntimeInfo{}, "RunningTaskExecution")
+
ContainerResourceInfoExternalIDKey = bsonutil.MustHaveTag(ContainerResourceInfo{}, "ExternalID")
ContainerResourceInfoNameKey = bsonutil.MustHaveTag(ContainerResourceInfo{}, "Name")
ContainerResourceInfoSecretIDsKey = bsonutil.MustHaveTag(ContainerResourceInfo{}, "SecretIDs")
- SecretNameKey = bsonutil.MustHaveTag(Secret{}, "Name")
SecretExternalIDKey = bsonutil.MustHaveTag(Secret{}, "ExternalID")
SecretValueKey = bsonutil.MustHaveTag(Secret{}, "Value")
- SecretExistsKey = bsonutil.MustHaveTag(Secret{}, "Exists")
- SecretOwnedKey = bsonutil.MustHaveTag(Secret{}, "Owned")
)
func ByID(id string) bson.M {
@@ -107,7 +108,7 @@ func UpdateOne(query interface{}, update interface{}) error {
// FindByNeedsTermination finds all pods running agents that need to be
// terminated, which includes:
// * Pods that have been provisioning for too long.
-// * Pods that are decommissioned.
+// * Pods that are decommissioned and have no running task.
func FindByNeedsTermination() ([]Pod, error) {
staleCutoff := time.Now().Add(-15 * time.Minute)
return Find(db.Query(bson.M{
@@ -122,6 +123,7 @@ func FindByNeedsTermination() ([]Pod, error) {
},
{
StatusKey: StatusDecommissioned,
+ bsonutil.GetDottedKeyName(TaskRuntimeInfoKey, TaskRuntimeInfoRunningTaskIDKey): nil,
},
},
}))
@@ -148,11 +150,19 @@ func FindOneByExternalID(id string) (*Pod, error) {
return FindOne(db.Query(ByExternalID(id)))
}
+// FindIntentByFamily finds intent pods that have a matching family name.
+func FindIntentByFamily(family string) ([]Pod, error) {
+ return Find(db.Query(bson.M{
+ StatusKey: StatusInitializing,
+ FamilyKey: family,
+ }))
+}
+
// UpdateOneStatus updates a pod's status by ID along with any relevant metadata
// information about the status update. If the current status is identical to
// the updated one, this will no-op. If the current status does not match the
// stored status, this will error.
-func UpdateOneStatus(id string, current, updated Status, ts time.Time) error {
+func UpdateOneStatus(id string, current, updated Status, ts time.Time, reason string) error {
if current == updated {
return nil
}
@@ -174,7 +184,73 @@ func UpdateOneStatus(id string, current, updated Status, ts time.Time) error {
return err
}
- event.LogPodStatusChanged(id, string(current), string(updated))
+ event.LogPodStatusChanged(id, string(current), string(updated), reason)
return nil
}
+
+// FindByLastCommunicatedBefore finds all active pods whose last communication
+// was before the given threshold.
+func FindByLastCommunicatedBefore(ts time.Time) ([]Pod, error) {
+ lastCommunicatedKey := bsonutil.GetDottedKeyName(TimeInfoKey, TimeInfoLastCommunicatedKey)
+ return Find(db.Query(bson.M{
+ StatusKey: bson.M{"$in": []Status{StatusStarting, StatusRunning}},
+ lastCommunicatedKey: bson.M{"$lte": ts},
+ }))
+}
+
+// StatusCount contains the total number of pods and total number of running
+// tasks for a particular pod status.
+type StatusCount struct {
+ Status Status `bson:"status"`
+ Count int `bson:"count"`
+ NumRunningTasks int `bson:"num_running_tasks"`
+}
+
+// GetStatsByStatus gets aggregate usage statistics on pods that are intended
+// for running tasks. For each pod status, it returns the counts for the number
+// of pods and number of running tasks in that particular status. Terminated
+// pods are excluded from these statistics.
+func GetStatsByStatus(statuses ...Status) ([]StatusCount, error) {
+ if len(statuses) == 0 {
+ return []StatusCount{}, nil
+ }
+
+ runningTaskKey := bsonutil.GetDottedKeyName(TaskRuntimeInfoKey, TaskRuntimeInfoRunningTaskIDKey)
+ pipeline := []bson.M{
+ {
+ "$match": bson.M{
+ StatusKey: bson.M{
+ "$in": statuses,
+ },
+ TypeKey: TypeAgent,
+ },
+ },
+ {
+ "$group": bson.M{
+ "_id": "$" + StatusKey,
+ "count": bson.M{
+ "$sum": 1,
+ },
+ "running_tasks": bson.M{
+ "$addToSet": "$" + runningTaskKey,
+ },
+ },
+ },
+ {
+ "$project": bson.M{
+ "_id": 0,
+ "status": "$_id",
+ "count": 1,
+ "num_running_tasks": bson.M{"$size": "$running_tasks"},
+ },
+ },
+ }
+
+ stats := []StatusCount{}
+ if err := db.Aggregate(Collection, pipeline, &stats); err != nil {
+ return nil, err
+ }
+
+ return stats, nil
+}
diff --git a/model/pod/db_test.go b/model/pod/db_test.go
index 923b49c9d45..e7df18761fb 100644
--- a/model/pod/db_test.go
+++ b/model/pod/db_test.go
@@ -61,6 +61,20 @@ func TestFindByNeedsTermination(t *testing.T) {
require.Len(t, pods, 1)
assert.Equal(t, decommissionedPod.ID, pods[0].ID)
},
+ "SkipsDecommissionedPodWithRunningTask": func(t *testing.T) {
+ decommissionedPodWithTask := Pod{
+ ID: "pod_id_with_task",
+ Status: StatusDecommissioned,
+ TaskRuntimeInfo: TaskRuntimeInfo{
+ RunningTaskID: "task_id",
+ },
+ }
+ require.NoError(t, decommissionedPodWithTask.Insert())
+
+ pods, err := FindByNeedsTermination()
+ require.NoError(t, err)
+ require.Len(t, pods, 0)
+ },
"ReturnsMatchingStaleInitializingPod": func(t *testing.T) {
stalePod := Pod{
ID: "pod_id",
@@ -243,6 +257,88 @@ func TestFindOneByExternalID(t *testing.T) {
}
}
+func TestFindByFamily(t *testing.T) {
+ for tName, tCase := range map[string]func(t *testing.T){
+ "FindsMatchingSubsetOfPods": func(t *testing.T) {
+ const family = "cool_fam"
+ pods := []Pod{
+ {
+ ID: "p0",
+ Status: StatusInitializing,
+ Family: family,
+ },
+ {
+ ID: "p1",
+ Status: StatusRunning,
+ Family: family,
+ },
+ {
+ ID: "p2",
+ Status: StatusInitializing,
+ Family: family,
+ },
+ {
+ ID: "p3",
+ Status: StatusInitializing,
+ Family: "not_as_cool_fam",
+ },
+ }
+ for _, p := range pods {
+ require.NoError(t, p.Insert())
+ }
+
+ dbPods, err := FindIntentByFamily(family)
+ require.NoError(t, err)
+ var numMatches int
+ for _, p := range dbPods {
+ switch p.ID {
+ case pods[0].ID, pods[2].ID:
+ numMatches++
+ default:
+ assert.FailNow(t, "found unexpected pod '%s'", p.ID)
+ }
+ }
+ assert.Equal(t, 2, numMatches)
+ },
+ "IgnoresNonIntentPods": func(t *testing.T) {
+ p := Pod{
+ ID: "pod",
+ Status: StatusStarting,
+ Family: "family",
+ }
+ require.NoError(t, p.Insert())
+ dbPods, err := FindIntentByFamily(p.Family)
+ assert.NoError(t, err)
+ assert.Empty(t, dbPods)
+ },
+ "IgnoresPodsWithoutMatchingFamily": func(t *testing.T) {
+ p := Pod{
+ ID: "pod",
+ Status: StatusStarting,
+ Family: "family",
+ }
+ require.NoError(t, p.Insert())
+ dbPods, err := FindIntentByFamily("foo")
+ assert.NoError(t, err)
+ assert.Empty(t, dbPods)
+ },
+ "ReturnsNoErrorForNoMatchingPods": func(t *testing.T) {
+ dbPods, err := FindIntentByFamily("nonexistent")
+ assert.NoError(t, err)
+ assert.Empty(t, dbPods)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.Clear(Collection))
+ defer func() {
+ assert.NoError(t, db.Clear(Collection))
+ }()
+
+ tCase(t)
+ })
+ }
+}
+
func TestUpdateOneStatus(t *testing.T) {
checkStatusAndTimeInfo := func(t *testing.T, p *Pod, s Status) {
assert.Equal(t, s, p.Status)
@@ -255,7 +351,7 @@ func TestUpdateOneStatus(t *testing.T) {
}
checkEventLog := func(t *testing.T, p Pod) {
- events, err := event.Find(event.AllLogCollection, event.MostRecentPodEvents(p.ID, 10))
+ events, err := event.Find(event.MostRecentPodEvents(p.ID, 10))
require.NoError(t, err)
require.Len(t, events, 1)
assert.Equal(t, p.ID, events[0].ResourceId)
@@ -268,7 +364,7 @@ func TestUpdateOneStatus(t *testing.T) {
p.Status = StatusInitializing
require.NoError(t, p.Insert())
- require.NoError(t, p.UpdateStatus(p.Status))
+ require.NoError(t, p.UpdateStatus(p.Status, ""))
assert.Equal(t, StatusInitializing, p.Status)
dbPod, err := FindOneByID(p.ID)
@@ -281,7 +377,7 @@ func TestUpdateOneStatus(t *testing.T) {
require.NoError(t, p.Insert())
updated := StatusInitializing
- require.NoError(t, UpdateOneStatus(p.ID, p.Status, updated, time.Now()))
+ require.NoError(t, UpdateOneStatus(p.ID, p.Status, updated, time.Now(), ""))
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
@@ -293,7 +389,7 @@ func TestUpdateOneStatus(t *testing.T) {
require.NoError(t, p.Insert())
updated := StatusStarting
- require.NoError(t, UpdateOneStatus(p.ID, p.Status, updated, time.Now()))
+ require.NoError(t, UpdateOneStatus(p.ID, p.Status, updated, time.Now(), ""))
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
@@ -304,13 +400,13 @@ func TestUpdateOneStatus(t *testing.T) {
"FailsWithMismatchedCurrentStatus": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- assert.Error(t, UpdateOneStatus(p.ID, StatusInitializing, StatusTerminated, time.Now()))
+ assert.Error(t, UpdateOneStatus(p.ID, StatusInitializing, StatusTerminated, time.Now(), ""))
},
"SucceedsWithTerminatedStatus": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
updated := StatusTerminated
- require.NoError(t, UpdateOneStatus(p.ID, p.Status, updated, time.Now()))
+ require.NoError(t, UpdateOneStatus(p.ID, p.Status, updated, time.Now(), ""))
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
@@ -322,13 +418,13 @@ func TestUpdateOneStatus(t *testing.T) {
"FailsWithNonexistentPod": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- assert.Error(t, UpdateOneStatus("nonexistent", StatusStarting, StatusRunning, time.Now()))
+ assert.Error(t, UpdateOneStatus("nonexistent", StatusStarting, StatusRunning, time.Now(), ""))
},
} {
t.Run(tName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ require.NoError(t, db.ClearCollections(Collection, event.EventCollection))
defer func() {
- assert.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(Collection, event.EventCollection))
}()
p := Pod{
@@ -340,3 +436,265 @@ func TestUpdateOneStatus(t *testing.T) {
})
}
}
+
+func TestFindByLastCommunicatedBefore(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T){
+ "FindsStartingStalePod": func(t *testing.T) {
+ p := Pod{
+ ID: "id",
+ Status: StatusStarting,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ }
+ require.NoError(t, p.Insert())
+
+ found, err := FindByLastCommunicatedBefore(time.Now().Add(-10 * time.Minute))
+ require.NoError(t, err)
+ require.Len(t, found, 1)
+ assert.Equal(t, p.ID, found[0].ID)
+ },
+ "FindsRunningStalePod": func(t *testing.T) {
+ p := Pod{
+ ID: "id",
+ Status: StatusRunning,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ }
+ require.NoError(t, p.Insert())
+
+ found, err := FindByLastCommunicatedBefore(time.Now().Add(-10 * time.Minute))
+ require.NoError(t, err)
+ require.Len(t, found, 1)
+ assert.Equal(t, p.ID, found[0].ID)
+ },
+ "FindsMultipleStalePods": func(t *testing.T) {
+ pods := []Pod{
+ {
+ ID: "pod0",
+ Status: StatusDecommissioned,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ },
+ {
+ ID: "pod1",
+ Status: StatusStarting,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Minute),
+ },
+ },
+ {
+ ID: "pod2",
+ Status: StatusStarting,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ },
+ {
+ ID: "pod3",
+ Status: StatusRunning,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Minute),
+ },
+ },
+ {
+ ID: "pod4",
+ Status: StatusRunning,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ },
+ {
+ ID: "pod5",
+ Status: StatusTerminated,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Minute),
+ },
+ },
+ }
+ for _, p := range pods {
+ require.NoError(t, p.Insert())
+ }
+
+ found, err := FindByLastCommunicatedBefore(time.Now().Add(-10 * time.Minute))
+ require.NoError(t, err)
+ require.Len(t, found, 2)
+ assert.ElementsMatch(t, []string{pods[2].ID, pods[4].ID}, []string{found[0].ID, found[1].ID})
+ },
+ "IgnoresPodWithRecentCommunication": func(t *testing.T) {
+ p := Pod{
+ ID: "id",
+ Status: StatusRunning,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Minute),
+ },
+ }
+ require.NoError(t, p.Insert())
+
+ found, err := FindByLastCommunicatedBefore(time.Now().Add(-10 * time.Minute))
+ assert.NoError(t, err)
+ assert.Empty(t, found)
+ },
+ "IgnoresAlreadyTerminatedPod": func(t *testing.T) {
+ p := Pod{
+ ID: "id",
+ Status: StatusTerminated,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ }
+ require.NoError(t, p.Insert())
+
+ found, err := FindByLastCommunicatedBefore(time.Now().Add(-10 * time.Minute))
+ assert.NoError(t, err)
+ assert.Empty(t, found)
+ },
+ "IgnoresIntentPod": func(t *testing.T) {
+ p := Pod{
+ ID: "id",
+ Status: StatusInitializing,
+ TimeInfo: TimeInfo{
+ LastCommunicated: time.Now().Add(-time.Hour),
+ },
+ }
+ require.NoError(t, p.Insert())
+
+ found, err := FindByLastCommunicatedBefore(time.Now().Add(-10 * time.Minute))
+ assert.NoError(t, err)
+ assert.Empty(t, found)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(Collection))
+
+ tCase(t)
+ })
+ }
+}
+
+func TestGetStatsByStatus(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T){
+ "ReturnsEmptyForNoMatchingPods": func(t *testing.T) {
+ stats, err := GetStatsByStatus()
+ assert.NoError(t, err)
+ assert.Empty(t, stats)
+ },
+ "ReturnsStatisticsForMatchingStatusAndType": func(t *testing.T) {
+ for _, p := range []Pod{
+ {
+ ID: "p0",
+ Status: StatusRunning,
+ Type: TypeAgent,
+ TaskRuntimeInfo: TaskRuntimeInfo{
+ RunningTaskID: "t0",
+ RunningTaskExecution: 5,
+ },
+ },
+ {
+ ID: "p1",
+ Status: StatusTerminated,
+ Type: TypeAgent,
+ },
+ {
+ ID: "p2",
+ Status: StatusRunning,
+ Type: TypeAgent,
+ },
+ {
+ ID: "p3",
+ Status: StatusRunning,
+ },
+ } {
+ require.NoError(t, p.Insert())
+ }
+
+ stats, err := GetStatsByStatus(StatusRunning)
+ require.NoError(t, err)
+ require.Len(t, stats, 1)
+ assert.Equal(t, StatusRunning, stats[0].Status)
+ assert.Equal(t, 2, stats[0].Count)
+ assert.Equal(t, 1, stats[0].NumRunningTasks)
+ },
+ "ReturnsStatisticsForMultipleMatchingStatuses": func(t *testing.T) {
+ for _, p := range []Pod{
+ {
+ ID: "p0",
+ Status: StatusRunning,
+ Type: TypeAgent,
+ TaskRuntimeInfo: TaskRuntimeInfo{
+ RunningTaskID: "t0",
+ RunningTaskExecution: 2,
+ },
+ },
+ {
+ ID: "p1",
+ Status: StatusTerminated,
+ Type: TypeAgent,
+ },
+ {
+ ID: "p2",
+ Status: StatusInitializing,
+ Type: TypeAgent,
+ },
+ {
+ ID: "p3",
+ Status: StatusStarting,
+ Type: TypeAgent,
+ },
+ {
+ ID: "p4",
+ Status: StatusInitializing,
+ },
+ {
+ ID: "p5",
+ Status: StatusDecommissioned,
+ Type: TypeAgent,
+ TaskRuntimeInfo: TaskRuntimeInfo{
+ RunningTaskID: "t1",
+ RunningTaskExecution: 0,
+ },
+ },
+ {
+ ID: "p6",
+ Status: StatusRunning,
+ Type: TypeAgent,
+ },
+ } {
+ require.NoError(t, p.Insert())
+ }
+
+ stats, err := GetStatsByStatus(StatusInitializing, StatusStarting, StatusRunning)
+ require.NoError(t, err)
+ require.Len(t, stats, 3)
+ for _, s := range stats {
+ switch s.Status {
+ case StatusInitializing:
+ assert.Equal(t, 1, s.Count)
+ assert.Zero(t, s.NumRunningTasks)
+ case StatusStarting:
+ assert.Equal(t, 1, s.Count)
+ assert.Zero(t, s.NumRunningTasks)
+ case StatusRunning:
+ assert.Equal(t, 2, s.Count)
+ assert.Equal(t, 1, s.NumRunningTasks)
+ default:
+ assert.Fail(t, "unexpected pod status '%s'", s.Status)
+ }
+ }
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(Collection))
+
+ tCase(t)
+ })
+ }
+}
diff --git a/model/pod/definition/db.go b/model/pod/definition/db.go
new file mode 100644
index 00000000000..790d06487f2
--- /dev/null
+++ b/model/pod/definition/db.go
@@ -0,0 +1,91 @@
+package definition
+
+import (
+ "time"
+
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/mongodb/anser/bsonutil"
+ adb "github.com/mongodb/anser/db"
+ "github.com/pkg/errors"
+)
+
+const Collection = "pod_definitions"
+
+var (
+ IDKey = bsonutil.MustHaveTag(PodDefinition{}, "ID")
+ ExternalIDKey = bsonutil.MustHaveTag(PodDefinition{}, "ExternalID")
+ FamilyKey = bsonutil.MustHaveTag(PodDefinition{}, "Family")
+ LastAccessedKey = bsonutil.MustHaveTag(PodDefinition{}, "LastAccessed")
+)
+
+// Find finds all pod definitions matching the given query.
+func Find(q db.Q) ([]PodDefinition, error) {
+ defs := []PodDefinition{}
+ return defs, errors.WithStack(db.FindAllQ(Collection, q, &defs))
+}
+
+// FindOne finds one pod definition by the given query.
+func FindOne(q db.Q) (*PodDefinition, error) {
+ var def PodDefinition
+ err := db.FindOneQ(Collection, q, &def)
+ if adb.ResultsNotFound(err) {
+ return nil, nil
+ }
+ return &def, nil
+}
+
+// UpsertOne updates an existing pod definition if it exists based on the
+// query; otherwise, it inserts a new pod definition.
+func UpsertOne(query, update interface{}) (*adb.ChangeInfo, error) {
+ return db.Upsert(Collection, query, update)
+}
+
+// UpdateOne updates an existing pod definition.
+func UpdateOne(query, update interface{}) error {
+ return db.Update(Collection, query, update)
+}
+
+// FindOneID returns a query to find a pod definition with the given ID.
+func FindOneID(id string) (*PodDefinition, error) {
+ return FindOne(db.Query(ByID(id)))
+}
+
+// ByID returns a query to find pod definitions with the given ID.
+func ByID(id string) bson.M {
+ return bson.M{IDKey: id}
+}
+
+// ByExternalID returns a query to find pod definitions with the given external
+// ID.
+func ByExternalID(id string) bson.M {
+ return bson.M{ExternalIDKey: id}
+}
+
+// FindOneByExternalID find a pod definition with the given external ID.
+func FindOneByExternalID(id string) (*PodDefinition, error) {
+ return FindOne(db.Query(ByExternalID(id)))
+}
+
+// FindOneByFamily finds a pod definition with the given family name.
+func FindOneByFamily(family string) (*PodDefinition, error) {
+ return FindOne(db.Query(bson.M{
+ FamilyKey: family,
+ }))
+}
+
+// FindByLastAccessedBefore finds all pod definitions that were last accessed
+// before the TTL. If a positive limit is given, it will return at most that
+// number of results; otherwise, the results are unlimited.
+func FindByLastAccessedBefore(ttl time.Duration, limit int) ([]PodDefinition, error) {
+ return Find(db.Query(bson.M{
+ "$or": []bson.M{
+ {
+ LastAccessedKey: bson.M{"$lt": time.Now().Add(-ttl)},
+ },
+ {
+ LastAccessedKey: nil,
+ },
+ },
+ }).Limit(limit))
+}
diff --git a/model/pod/definition/db_test.go b/model/pod/definition/db_test.go
new file mode 100644
index 00000000000..574425b6c86
--- /dev/null
+++ b/model/pod/definition/db_test.go
@@ -0,0 +1,195 @@
+package definition
+
+import (
+ "testing"
+ "time"
+
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/testutil"
+ "github.com/evergreen-ci/utility"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func init() {
+ testutil.Setup()
+}
+
+func TestFindOneID(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.Clear(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T){
+ "Succeeds": func(t *testing.T) {
+ pd := PodDefinition{
+ ID: "id",
+ }
+ require.NoError(t, pd.Insert())
+
+ dbPodDef, err := FindOneID(pd.ID)
+ require.NoError(t, err)
+ require.NotZero(t, dbPodDef)
+ assert.Equal(t, pd.ID, dbPodDef.ID)
+ assert.Equal(t, pd.ExternalID, dbPodDef.ExternalID)
+ },
+ "ReturnsNilWithNonexistentPodDefinition": func(t *testing.T) {
+ pd, err := FindOneID("nonexistent")
+ assert.NoError(t, err)
+ assert.Zero(t, pd)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.Clear(Collection))
+ tCase(t)
+ })
+ }
+}
+
+func TestFindOneByExternalID(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.Clear(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T){
+ "Succeeds": func(t *testing.T) {
+ pd := PodDefinition{
+ ID: "id",
+ ExternalID: "external_id",
+ }
+ require.NoError(t, pd.Insert())
+
+ dbPodDef, err := FindOneByExternalID(pd.ExternalID)
+ require.NoError(t, err)
+ require.NotZero(t, dbPodDef)
+ assert.Equal(t, pd.ID, dbPodDef.ID)
+ assert.Equal(t, pd.ExternalID, dbPodDef.ExternalID)
+ },
+ "ReturnsNilWithNonexistentPodDefinition": func(t *testing.T) {
+ pd, err := FindOneByExternalID("nonexistent")
+ assert.NoError(t, err)
+ assert.Zero(t, pd)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.Clear(Collection))
+ tCase(t)
+ })
+ }
+}
+
+func TestFindOneByFamily(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.Clear(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T){
+ "Succeeds": func(t *testing.T) {
+ pd := PodDefinition{
+ ID: "id",
+ ExternalID: "external_id",
+ Family: "family",
+ }
+ require.NoError(t, pd.Insert())
+
+ dbPodDef, err := FindOneByFamily(pd.Family)
+ require.NoError(t, err)
+ require.NotZero(t, dbPodDef)
+ assert.Equal(t, pd.ID, dbPodDef.ID)
+ assert.Equal(t, pd.ExternalID, dbPodDef.ExternalID)
+ assert.Equal(t, pd.Family, dbPodDef.Family)
+ },
+ "ReturnsNilWithNonexistentPodDefinition": func(t *testing.T) {
+ pd, err := FindOneByFamily("nonexistent")
+ assert.NoError(t, err)
+ assert.Zero(t, pd)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.Clear(Collection))
+ tCase(t)
+ })
+ }
+}
+
+func TestFindOneByLastAccessedBefore(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.Clear(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T){
+ "Succeeds": func(t *testing.T) {
+ podDefs := []PodDefinition{
+ {
+ ID: "pod_def0",
+ LastAccessed: time.Now().Add(-time.Hour),
+ },
+ {
+ ID: "pod_def1",
+ LastAccessed: time.Now(),
+ },
+ {
+ ID: "pod_def2",
+ LastAccessed: time.Now().Add(-5 * time.Hour),
+ },
+ }
+ for _, podDef := range podDefs {
+ require.NoError(t, podDef.Insert())
+ }
+ found, err := FindByLastAccessedBefore(time.Minute, -1)
+ require.NoError(t, err)
+ require.Len(t, found, 2)
+ for _, podDef := range found {
+ assert.True(t, utility.StringSliceContains([]string{
+ podDefs[0].ID,
+ podDefs[2].ID,
+ }, podDef.ID), "unexpected pod definition '%s'", podDef.ID)
+ }
+ },
+ "LimitsResults": func(t *testing.T) {
+ podDefs := []PodDefinition{
+ {
+ ID: "pod_def0",
+ LastAccessed: time.Now().Add(-time.Hour),
+ },
+ {
+ ID: "pod_def1",
+ LastAccessed: time.Now().Add(-5 * time.Hour),
+ },
+ }
+ for _, podDef := range podDefs {
+ require.NoError(t, podDef.Insert())
+ }
+ found, err := FindByLastAccessedBefore(time.Minute, 1)
+ require.NoError(t, err)
+ require.Len(t, found, 1)
+ assert.True(t, utility.StringSliceContains([]string{
+ podDefs[0].ID,
+ podDefs[1].ID,
+ }, found[0].ID), "unexpected pod definition '%s'", found[0].ID)
+ },
+ "IgnoresPodDefinitionAccessedWithinTTL": func(t *testing.T) {
+ podDef := PodDefinition{
+ ID: "pod_def",
+ LastAccessed: time.Now(),
+ }
+ require.NoError(t, podDef.Insert())
+
+ found, err := FindByLastAccessedBefore(time.Minute, -1)
+ require.NoError(t, err)
+ assert.Empty(t, found)
+ },
+ "ReturnsPodDefinitionsWithZeroLastAccessedTime": func(t *testing.T) {
+ podDef := PodDefinition{
+ ID: "pod_def",
+ }
+ require.NoError(t, podDef.Insert())
+
+ found, err := FindByLastAccessedBefore(time.Minute, -1)
+ require.NoError(t, err)
+ require.Len(t, found, 1)
+ assert.Equal(t, podDef.ID, found[0].ID)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.Clear(Collection))
+ tCase(t)
+ })
+ }
+}
diff --git a/model/pod/definition/definition.go b/model/pod/definition/definition.go
new file mode 100644
index 00000000000..a3e34041952
--- /dev/null
+++ b/model/pod/definition/definition.go
@@ -0,0 +1,103 @@
+package definition
+
+import (
+ "context"
+ "time"
+
+ "github.com/evergreen-ci/cocoa"
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/utility"
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson/primitive"
+)
+
+// PodDefinition represents a template definition for a pod kept in external
+// storage.
+type PodDefinition struct {
+ // ID is the unique identifier for this document.
+ ID string `bson:"_id"`
+ // ExternalID is the identifier for the template definition in external
+ // storage.
+ ExternalID string `bson:"external_id,omitempty"`
+ // Family is the family name of the pod definition stored in the cloud
+ // provider.
+ Family string `bson:"family,omitempty"`
+ // LastAccessed is the timestamp for the last time this pod definition was
+ // used.
+ LastAccessed time.Time `bson:"last_accessed,omitempty"`
+}
+
+// Insert inserts the pod definition into the collection.
+func (pd *PodDefinition) Insert() error {
+ return db.Insert(Collection, pd)
+}
+
+// Upsert upserts the pod definition into the collection.
+func (pd *PodDefinition) Upsert() error {
+ _, err := db.Upsert(Collection, ByID(pd.ID), pd)
+ return err
+}
+
+// Remove removes the pod definition from the collection.
+func (pd *PodDefinition) Remove() error {
+ return db.Remove(Collection, ByID(pd.ID))
+}
+
+// UpdateLastAccessed updates the time this pod definition was last accessed to
+// now.
+func (pd *PodDefinition) UpdateLastAccessed() error {
+ return UpdateOne(ByID(pd.ID), bson.M{
+ "$set": bson.M{
+ LastAccessedKey: time.Now(),
+ },
+ })
+}
+
+// PodDefinitionCache implements a cocoa.ECSPodDefinitionCache to cache pod
+// definitions in the DB.
+type PodDefinitionCache struct{}
+
+// Put inserts a new pod definition; if an identical one already exists, this is
+// a no-op.
+func (pdc PodDefinitionCache) Put(_ context.Context, item cocoa.ECSPodDefinitionItem) error {
+ family := utility.FromStringPtr(item.DefinitionOpts.Name)
+ idAndFamily := bson.M{
+ ExternalIDKey: item.ID,
+ FamilyKey: family,
+ }
+ newPodDef := bson.M{
+ "$set": bson.M{
+ ExternalIDKey: item.ID,
+ FamilyKey: family,
+ LastAccessedKey: time.Now(),
+ },
+ "$setOnInsert": bson.M{
+ IDKey: primitive.NewObjectID().Hex(),
+ },
+ }
+ if _, err := UpsertOne(idAndFamily, newPodDef); err != nil {
+ return errors.Wrap(err, "upserting pod definition")
+ }
+ return nil
+}
+
+// Delete deletes a new pod definition by its external ID. If the pod definition
+// does not exist, this is a no-op.
+func (pdc PodDefinitionCache) Delete(_ context.Context, externalID string) error {
+ if err := db.Remove(Collection, bson.M{
+ ExternalIDKey: externalID,
+ }); err != nil {
+ return errors.Wrapf(err, "deleting pod definition with external ID '%s'", externalID)
+ }
+
+ return nil
+}
+
+// PodDefinitionTag is the tag used to track pod definitions.
+const PodDefinitionTag = "evergreen-tracked"
+
+// GetTag returns the tag used for tracking cloud pod definitions.
+func (pdc PodDefinitionCache) GetTag() string {
+ return PodDefinitionTag
+}
diff --git a/model/pod/definition/definition_test.go b/model/pod/definition/definition_test.go
new file mode 100644
index 00000000000..4c09d9c6861
--- /dev/null
+++ b/model/pod/definition/definition_test.go
@@ -0,0 +1,168 @@
+package definition
+
+import (
+ "context"
+ "testing"
+
+ "github.com/evergreen-ci/cocoa"
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/utility"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestPodDefinitionUpdateLastAccessed(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(Collection))
+ }()
+ for tName, tCase := range map[string]func(t *testing.T, pd PodDefinition){
+ "SetsLastAccessedTime": func(t *testing.T, pd PodDefinition) {
+ require.NoError(t, pd.Insert())
+
+ require.NoError(t, pd.UpdateLastAccessed())
+ },
+ "FailsForNonexistentPodDefinition": func(t *testing.T, pd PodDefinition) {
+ assert.Error(t, pd.UpdateLastAccessed())
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(Collection))
+ pd := PodDefinition{
+ ID: "id",
+ ExternalID: "external_id",
+ Family: "family",
+ }
+ tCase(t, pd)
+ })
+ }
+}
+
+func TestPodDefinitionCache(t *testing.T) {
+ assert.Implements(t, (*cocoa.ECSPodDefinitionCache)(nil), PodDefinitionCache{})
+
+ var pdc PodDefinitionCache
+
+ t.Run("Put", func(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(Collection))
+ }()
+
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T){
+ "SucceedsWithNewItem": func(ctx context.Context, t *testing.T) {
+ externalID := "external_id"
+ defOpts := cocoa.NewECSPodDefinitionOptions().SetName("family")
+ require.NoError(t, pdc.Put(ctx, cocoa.ECSPodDefinitionItem{
+ ID: externalID,
+ DefinitionOpts: *defOpts,
+ }))
+ pd, err := FindOneByExternalID(externalID)
+ require.NoError(t, err)
+ require.NotZero(t, pd)
+ assert.NotZero(t, pd.ID)
+ assert.Equal(t, externalID, pd.ExternalID)
+ assert.Equal(t, utility.FromStringPtr(defOpts.Name), pd.Family)
+ assert.NotZero(t, pd.LastAccessed)
+ },
+ "IsIdempotentForIdenticalItem": func(ctx context.Context, t *testing.T) {
+ externalID := "external_id"
+ defOpts := cocoa.NewECSPodDefinitionOptions().SetName("name")
+ require.NoError(t, pdc.Put(ctx, cocoa.ECSPodDefinitionItem{
+ ID: externalID,
+ DefinitionOpts: *defOpts,
+ }))
+
+ pd, err := FindOneByExternalID(externalID)
+ require.NoError(t, err)
+ require.NotZero(t, pd)
+
+ originalID := pd.ID
+ assert.NotZero(t, pd.ID)
+ assert.Equal(t, externalID, pd.ExternalID)
+ assert.Equal(t, utility.FromStringPtr(defOpts.Name), pd.Family)
+ assert.NotZero(t, pd.LastAccessed)
+
+ require.NoError(t, pdc.Put(ctx, cocoa.ECSPodDefinitionItem{
+ ID: externalID,
+ DefinitionOpts: *defOpts,
+ }))
+
+ pds, err := Find(db.Query(ByExternalID(externalID)))
+ require.NoError(t, err)
+ require.Len(t, pds, 1, "putting identical item should not have created any new pod definitions")
+
+ assert.Equal(t, originalID, pds[0].ID)
+ assert.Equal(t, externalID, pds[0].ExternalID)
+ assert.Equal(t, utility.FromStringPtr(defOpts.Name), pds[0].Family)
+ assert.NotZero(t, pd.LastAccessed)
+ },
+ "AddsMultipleDifferentItems": func(ctx context.Context, t *testing.T) {
+ const numPodDefs = 10
+ for i := 0; i < numPodDefs; i++ {
+ defOpts := cocoa.NewECSPodDefinitionOptions().SetName(utility.RandomString())
+ require.NoError(t, pdc.Put(ctx, cocoa.ECSPodDefinitionItem{
+ ID: utility.RandomString(),
+ DefinitionOpts: *defOpts,
+ }))
+ }
+ pds, err := Find(db.Query(bson.M{}))
+ require.NoError(t, err)
+ require.Len(t, pds, numPodDefs)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ require.NoError(t, db.ClearCollections(Collection))
+ tCase(ctx, t)
+ })
+ }
+ })
+
+ t.Run("Delete", func(t *testing.T) {
+ defer func() {
+ assert.NoError(t, db.ClearCollections(Collection))
+ }()
+
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T){
+ "SuccessfullyDeletesPodDefinition": func(ctx context.Context, t *testing.T) {
+ pd := PodDefinition{
+ ID: "pod_definition_id",
+ ExternalID: "external_id",
+ }
+ require.NoError(t, pd.Insert())
+
+ require.NoError(t, pdc.Delete(ctx, pd.ExternalID))
+
+ dbPodDef, err := FindOneByExternalID(pd.ExternalID)
+ assert.NoError(t, err)
+ assert.Zero(t, dbPodDef)
+ },
+ "NoopsForNonexistentPodDefinition": func(ctx context.Context, t *testing.T) {
+ assert.NoError(t, pdc.Delete(ctx, "nonexistent"))
+ },
+ "IsIdempotentForAlreadyDeletedPodDefinition": func(ctx context.Context, t *testing.T) {
+ pd := PodDefinition{
+ ID: "pod_definition_id",
+ ExternalID: "external_id",
+ }
+ require.NoError(t, pd.Insert())
+
+ for i := 0; i < 3; i++ {
+ require.NoError(t, pdc.Delete(ctx, pd.ExternalID))
+
+ pd, err := FindOneByExternalID(pd.ExternalID)
+ assert.NoError(t, err)
+ assert.Zero(t, pd)
+ }
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ require.NoError(t, db.ClearCollections(Collection))
+ tCase(ctx, t)
+ })
+ }
+ })
+}
diff --git a/model/pod/definition/doc.go b/model/pod/definition/doc.go
new file mode 100644
index 00000000000..889926a8ad2
--- /dev/null
+++ b/model/pod/definition/doc.go
@@ -0,0 +1,3 @@
+// Package definition contains the data model for the pod definition cache. Pod
+// definitions are templates for creating pods.
+package definition
diff --git a/model/pod/dispatcher/db.go b/model/pod/dispatcher/db.go
index ba48f13b3bc..dfcab8d3901 100644
--- a/model/pod/dispatcher/db.go
+++ b/model/pod/dispatcher/db.go
@@ -26,6 +26,7 @@ var (
PodIDsKey = bsonutil.MustHaveTag(PodDispatcher{}, "PodIDs")
TaskIDsKey = bsonutil.MustHaveTag(PodDispatcher{}, "TaskIDs")
ModificationCountKey = bsonutil.MustHaveTag(PodDispatcher{}, "ModificationCount")
+ LastModifiedKey = bsonutil.MustHaveTag(PodDispatcher{}, "LastModified")
)
// FindOne finds one pod dispatcher for the given query.
@@ -103,20 +104,39 @@ func Allocate(ctx context.Context, env evergreen.Environment, t *task.Task, p *p
newDispatcher := NewPodDispatcher(groupID, []string{t.Id}, []string{p.ID})
pd = &newDispatcher
} else {
- pd.PodIDs = append(pd.PodIDs, p.ID)
-
if !utility.StringSliceContains(pd.TaskIDs, t.Id) {
pd.TaskIDs = append(pd.TaskIDs, t.Id)
}
+
+ if len(pd.TaskIDs) > len(pd.PodIDs) {
+ // Avoid allocating another pod if it's not necessary. The
+ // number of pods allocated to run the pod dispatchers' tasks
+ // should not exceed the number of tasks that need to be run.
+ pd.PodIDs = append(pd.PodIDs, p.ID)
+ }
}
- if _, err := env.DB().Collection(Collection).UpdateOne(sessCtx, pd.atomicUpsertQuery(), pd.atomicUpsertUpdate(), options.Update().SetUpsert(true)); err != nil {
+ lastModified := utility.BSONTime(time.Now())
+ res, err := env.DB().Collection(Collection).UpdateOne(sessCtx, pd.atomicUpsertQuery(), pd.atomicUpsertUpdate(lastModified), options.Update().SetUpsert(true))
+ if err != nil {
return nil, errors.Wrap(err, "upserting pod dispatcher")
}
+ if res.ModifiedCount == 0 && res.UpsertedCount == 0 {
+ // This can occur due to the pod dispatcher being concurrently
+ // updated elsewhere (such as when dispatching a task to a pod),
+ // which is a transient issue.
+ return nil, errors.Errorf("pod dispatcher was not upserted")
+ }
+
pd.ModificationCount++
+ pd.LastModified = lastModified
- if err := p.InsertWithContext(sessCtx, env); err != nil {
- return nil, errors.Wrap(err, "inserting new intent pod")
+ if utility.StringSliceContains(pd.PodIDs, p.ID) {
+ // A pod will only be allocated if the dispatcher is actually in
+ // need of another pod to run its tasks.
+ if err := p.InsertWithContext(sessCtx, env); err != nil {
+ return nil, errors.Wrap(err, "inserting new intent pod")
+ }
}
if err := t.MarkAsContainerAllocated(ctx, env); err != nil {
diff --git a/model/pod/dispatcher/db_test.go b/model/pod/dispatcher/db_test.go
index 7fe310314fc..02a5be4bb41 100644
--- a/model/pod/dispatcher/db_test.go
+++ b/model/pod/dispatcher/db_test.go
@@ -153,7 +153,7 @@ func TestAllocate(t *testing.T) {
defer cancel()
defer func() {
- assert.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.EventCollection))
}()
env := &mock.Environment{}
@@ -163,31 +163,40 @@ func TestAllocate(t *testing.T) {
// first before any documents can be inserted.
require.NoError(t, db.CreateCollections(Collection, task.Collection, pod.Collection))
- checkAllocated := func(t *testing.T, tsk *task.Task, p *pod.Pod, pd *PodDispatcher) {
- dbPod, err := pod.FindOneByID(p.ID)
- require.NoError(t, err)
- require.NotZero(t, dbPod)
- assert.Equal(t, p.Type, dbPod.Type)
- assert.Equal(t, p.Status, dbPod.Status)
-
+ checkTaskAllocated := func(t *testing.T, tsk *task.Task) {
dbTask, err := task.FindOneId(tsk.Id)
require.NoError(t, err)
require.NotZero(t, dbTask)
assert.True(t, dbTask.ContainerAllocated)
assert.NotZero(t, dbTask.ContainerAllocatedTime)
-
+ }
+ checkDispatcherUpdated := func(t *testing.T, tsk *task.Task, pd *PodDispatcher) {
dbDispatcher, err := FindOneByGroupID(GetGroupID(tsk))
require.NoError(t, err)
require.NotZero(t, dbDispatcher)
assert.Equal(t, pd.PodIDs, dbDispatcher.PodIDs)
assert.Equal(t, pd.TaskIDs, dbDispatcher.TaskIDs)
assert.Equal(t, pd.ModificationCount, dbDispatcher.ModificationCount)
-
+ assert.False(t, utility.IsZeroTime(dbDispatcher.LastModified))
+ assert.Equal(t, pd.LastModified, dbDispatcher.LastModified)
+ }
+ checkEventLogged := func(t *testing.T, tsk *task.Task) {
dbEvents, err := event.FindAllByResourceID(tsk.Id)
require.NoError(t, err)
require.Len(t, dbEvents, 1)
assert.Equal(t, event.ContainerAllocated, dbEvents[0].EventType)
}
+ checkAllocated := func(t *testing.T, tsk *task.Task, p *pod.Pod, pd *PodDispatcher) {
+ dbPod, err := pod.FindOneByID(p.ID)
+ require.NoError(t, err)
+ require.NotZero(t, dbPod)
+ assert.Equal(t, p.Type, dbPod.Type)
+ assert.Equal(t, p.Status, dbPod.Status)
+
+ checkTaskAllocated(t, tsk)
+ checkDispatcherUpdated(t, tsk, pd)
+ checkEventLogged(t, tsk)
+ }
for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, env evergreen.Environment, tsk *task.Task, p *pod.Pod){
"SucceedsWithNewPodDispatcher": func(ctx context.Context, t *testing.T, env evergreen.Environment, tsk *task.Task, p *pod.Pod) {
@@ -202,12 +211,10 @@ func TestAllocate(t *testing.T) {
assert.True(t, newDispatcher.ModificationCount > 0)
checkAllocated(t, tsk, p, newDispatcher)
-
},
"SucceedsWithExistingPodDispatcherForGroup": func(ctx context.Context, t *testing.T, env evergreen.Environment, tsk *task.Task, p *pod.Pod) {
pd := &PodDispatcher{
GroupID: GetGroupID(tsk),
- PodIDs: []string{utility.RandomString()},
TaskIDs: []string{tsk.Id},
ModificationCount: 1,
}
@@ -223,9 +230,33 @@ func TestAllocate(t *testing.T) {
assert.Empty(t, right)
assert.Equal(t, pd.TaskIDs, updatedDispatcher.TaskIDs)
assert.True(t, updatedDispatcher.ModificationCount > pd.ModificationCount)
+ assert.False(t, utility.IsZeroTime(updatedDispatcher.LastModified))
checkAllocated(t, tsk, p, updatedDispatcher)
},
+ "SucceedsWithAlreadySufficientPodsAllocatedRunContainers": func(ctx context.Context, t *testing.T, env evergreen.Environment, tsk *task.Task, p *pod.Pod) {
+ pd := &PodDispatcher{
+ GroupID: GetGroupID(tsk),
+ PodIDs: []string{utility.RandomString()},
+ TaskIDs: []string{tsk.Id},
+ ModificationCount: 1,
+ }
+ require.NoError(t, pd.Insert())
+ require.NoError(t, tsk.Insert())
+
+ updatedDispatcher, err := Allocate(ctx, env, tsk, p)
+ require.NoError(t, err)
+
+ assert.Equal(t, pd.GroupID, updatedDispatcher.GroupID)
+ assert.Equal(t, pd.PodIDs, updatedDispatcher.PodIDs)
+ assert.Equal(t, pd.TaskIDs, updatedDispatcher.TaskIDs)
+ assert.True(t, updatedDispatcher.ModificationCount > pd.ModificationCount)
+ assert.False(t, utility.IsZeroTime(updatedDispatcher.LastModified))
+
+ checkTaskAllocated(t, tsk)
+ checkDispatcherUpdated(t, tsk, updatedDispatcher)
+ checkEventLogged(t, tsk)
+ },
"FailsWithoutMatchingTaskStatus": func(ctx context.Context, t *testing.T, env evergreen.Environment, tsk *task.Task, p *pod.Pod) {
pd, err := Allocate(ctx, env, tsk, p)
require.Error(t, err)
@@ -252,16 +283,18 @@ func TestAllocate(t *testing.T) {
tctx, tcancel := context.WithTimeout(ctx, 10*time.Second)
defer tcancel()
- require.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.AllLogCollection))
-
- p, err := pod.NewTaskIntentPod(pod.TaskIntentPodOptions{
- ID: primitive.NewObjectID().Hex(),
- CPU: 256,
- MemoryMB: 512,
- OS: pod.OSLinux,
- Arch: pod.ArchARM64,
- Image: "image",
- WorkingDir: "/",
+ require.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.EventCollection))
+
+ p, err := pod.NewTaskIntentPod(evergreen.ECSConfig{}, pod.TaskIntentPodOptions{
+ ID: primitive.NewObjectID().Hex(),
+ CPU: 256,
+ MemoryMB: 512,
+ OS: pod.OSLinux,
+ Arch: pod.ArchARM64,
+ Image: "image",
+ WorkingDir: "/",
+ PodSecretExternalID: "pod_secret_external_id",
+ PodSecretValue: "pod_secret_value",
})
require.NoError(t, err)
tCase(tctx, t, env, &task.Task{
diff --git a/model/pod/dispatcher/dispatcher.go b/model/pod/dispatcher/dispatcher.go
index 54b37fa4be7..71fa7e6ca34 100644
--- a/model/pod/dispatcher/dispatcher.go
+++ b/model/pod/dispatcher/dispatcher.go
@@ -35,6 +35,8 @@ type PodDispatcher struct {
// ModificationCount is an incrementing lock used to resolve conflicting
// updates to the dispatcher.
ModificationCount int `bson:"modification_count" json:"modification_count"`
+ // LastModified is the timestamp when the pod dispatcher was last modified.
+ LastModified time.Time `bson:"last_modified" json:"last_modified"`
}
// NewPodDispatcher returns a new pod dispatcher.
@@ -61,15 +63,16 @@ func (pd *PodDispatcher) atomicUpsertQuery() bson.M {
}
}
-func (pd *PodDispatcher) atomicUpsertUpdate() bson.M {
+func (pd *PodDispatcher) atomicUpsertUpdate(lastModified time.Time) bson.M {
return bson.M{
"$setOnInsert": bson.M{
IDKey: pd.ID,
GroupIDKey: pd.GroupID,
},
"$set": bson.M{
- PodIDsKey: pd.PodIDs,
- TaskIDsKey: pd.TaskIDs,
+ PodIDsKey: pd.PodIDs,
+ TaskIDsKey: pd.TaskIDs,
+ LastModifiedKey: lastModified,
},
"$inc": bson.M{
ModificationCountKey: 1,
@@ -80,11 +83,13 @@ func (pd *PodDispatcher) atomicUpsertUpdate() bson.M {
// UpsertAtomically inserts/updates the pod dispatcher depending on whether the
// document already exists.
func (pd *PodDispatcher) UpsertAtomically() (*adb.ChangeInfo, error) {
- change, err := UpsertOne(pd.atomicUpsertQuery(), pd.atomicUpsertUpdate())
+ lastModified := utility.BSONTime(time.Now())
+ change, err := UpsertOne(pd.atomicUpsertQuery(), pd.atomicUpsertUpdate(lastModified))
if err != nil {
return change, err
}
pd.ModificationCount++
+ pd.LastModified = lastModified
return change, nil
}
@@ -92,8 +97,8 @@ func (pd *PodDispatcher) UpsertAtomically() (*adb.ChangeInfo, error) {
// there's no task available to run. If the pod is already running a task, this
// will return an error.
func (pd *PodDispatcher) AssignNextTask(ctx context.Context, env evergreen.Environment, p *pod.Pod) (*task.Task, error) {
- if p.RunningTask != "" {
- return nil, errors.Errorf("cannot assign a new task to a pod that is already running task '%s'", p.RunningTask)
+ if p.TaskRuntimeInfo.RunningTaskID != "" {
+ return nil, errors.Errorf("cannot assign a new task to a pod that is already running task '%s' execution %d", p.TaskRuntimeInfo.RunningTaskID, p.TaskRuntimeInfo.RunningTaskExecution)
}
grip.WarningWhen(len(pd.TaskIDs) > 1, message.Fields{
@@ -179,11 +184,11 @@ func (pd *PodDispatcher) dispatchTaskAtomically(ctx context.Context, env evergre
func (pd *PodDispatcher) dispatchTask(env evergreen.Environment, p *pod.Pod, t *task.Task) func(mongo.SessionContext) (interface{}, error) {
return func(sessCtx mongo.SessionContext) (interface{}, error) {
- if err := p.SetRunningTask(sessCtx, env, t.Id); err != nil {
+ if err := p.SetRunningTask(sessCtx, env, t.Id, t.Execution); err != nil {
return nil, errors.Wrapf(err, "setting pod's running task")
}
- if err := t.MarkAsContainerDispatched(sessCtx, env, p.AgentVersion); err != nil {
+ if err := t.MarkAsContainerDispatched(sessCtx, env, p.ID, p.AgentVersion); err != nil {
return nil, errors.Wrapf(err, "marking task as dispatched")
}
@@ -205,7 +210,8 @@ func (pd *PodDispatcher) dequeue(ctx context.Context, env evergreen.Environment)
}
}()
- res, err := env.DB().Collection(Collection).UpdateOne(ctx, pd.atomicUpsertQuery(), pd.atomicUpsertUpdate())
+ lastModified := utility.BSONTime(time.Now())
+ res, err := env.DB().Collection(Collection).UpdateOne(ctx, pd.atomicUpsertQuery(), pd.atomicUpsertUpdate(lastModified))
if err != nil {
return errors.Wrap(err, "upserting dispatcher")
}
@@ -214,6 +220,7 @@ func (pd *PodDispatcher) dequeue(ctx context.Context, env evergreen.Environment)
}
pd.ModificationCount++
+ pd.LastModified = lastModified
return nil
}
@@ -271,7 +278,7 @@ func (pd *PodDispatcher) checkTaskIsDispatchable(ctx context.Context, env evergr
// Disabled projects generally are not allowed to run tasks. The one
// exception is that GitHub PR tasks are still allowed to run for disabled
// hidden projects.
- if !ref.IsEnabled() && (t.Requester != evergreen.GithubPRRequester || !ref.IsHidden()) {
+ if !ref.Enabled && (t.Requester != evergreen.GithubPRRequester || !ref.IsHidden()) {
grip.Notice(message.Fields{
"message": "project ref is disabled",
"outcome": "task is not dispatchable",
@@ -309,7 +316,12 @@ func (pd *PodDispatcher) RemovePod(ctx context.Context, env evergreen.Environmen
if len(pd.PodIDs) == 1 && len(pd.TaskIDs) > 0 {
// The last pod is about to be removed, so there will be no pod
// remaining to run the tasks still in the dispatch queue.
- if err := task.MarkManyContainerDeallocated(pd.TaskIDs); err != nil {
+
+ if err := model.MarkUnallocatableContainerTasksSystemFailed(env.Settings(), pd.TaskIDs); err != nil {
+ return errors.Wrap(err, "marking unallocatable container tasks as system-failed")
+ }
+
+ if err := task.MarkTasksAsContainerDeallocated(pd.TaskIDs); err != nil {
return errors.Wrap(err, "marking all tasks in dispatcher as container deallocated")
}
@@ -355,7 +367,8 @@ func (pd *PodDispatcher) removePodsAndTasks(ctx context.Context, env evergreen.E
}
}()
- res, err := env.DB().Collection(Collection).UpdateOne(ctx, pd.atomicUpsertQuery(), pd.atomicUpsertUpdate())
+ lastModified := utility.BSONTime(time.Now())
+ res, err := env.DB().Collection(Collection).UpdateOne(ctx, pd.atomicUpsertQuery(), pd.atomicUpsertUpdate(lastModified))
if err != nil {
return errors.Wrap(err, "upserting dispatcher")
}
@@ -364,6 +377,7 @@ func (pd *PodDispatcher) removePodsAndTasks(ctx context.Context, env evergreen.E
}
pd.ModificationCount++
+ pd.LastModified = lastModified
return nil
}
diff --git a/model/pod/dispatcher/dispatcher_test.go b/model/pod/dispatcher/dispatcher_test.go
index d29bfb2e2e7..95767d00d8c 100644
--- a/model/pod/dispatcher/dispatcher_test.go
+++ b/model/pod/dispatcher/dispatcher_test.go
@@ -9,6 +9,7 @@ import (
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/mock"
"github.com/evergreen-ci/evergreen/model"
+ "github.com/evergreen-ci/evergreen/model/build"
"github.com/evergreen-ci/evergreen/model/event"
"github.com/evergreen-ci/evergreen/model/pod"
"github.com/evergreen-ci/evergreen/model/task"
@@ -51,6 +52,8 @@ func TestUpsertAtomically(t *testing.T) {
assert.Equal(t, pd.TaskIDs, dbDispatcher.TaskIDs)
assert.NotZero(t, pd.ModificationCount)
assert.Equal(t, pd.ModificationCount, dbDispatcher.ModificationCount)
+ assert.False(t, utility.IsZeroTime(dbDispatcher.LastModified))
+ assert.Equal(t, pd.LastModified, dbDispatcher.LastModified)
},
"FailsWithMatchingGroupIDButDifferentDispatcherID": func(t *testing.T, pd PodDispatcher) {
require.NoError(t, pd.Insert())
@@ -126,7 +129,7 @@ func TestAssignNextTask(t *testing.T) {
defer cancel()
defer func() {
- assert.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.EventCollection))
}()
env := &mock.Environment{}
@@ -147,7 +150,7 @@ func TestAssignNextTask(t *testing.T) {
return model.ProjectRef{
Id: utility.RandomString(),
Identifier: utility.RandomString(),
- Enabled: utility.TruePtr(),
+ Enabled: true,
}
}
@@ -166,12 +169,14 @@ func TestAssignNextTask(t *testing.T) {
assert.Equal(t, evergreen.TaskDispatched, dbTask.Status)
assert.False(t, utility.IsZeroTime(dbTask.DispatchTime))
assert.False(t, utility.IsZeroTime(dbTask.LastHeartbeat))
+ assert.Equal(t, p.ID, dbTask.PodID)
assert.Equal(t, p.AgentVersion, dbTask.AgentVersion)
dbPod, err := pod.FindOneByID(p.ID)
require.NoError(t, err)
require.NotZero(t, dbPod)
- assert.Equal(t, tsk.Id, dbPod.RunningTask)
+ assert.Equal(t, tsk.Id, dbPod.TaskRuntimeInfo.RunningTaskID)
+ assert.Equal(t, pod.StatusDecommissioned, dbPod.Status)
taskEvents, err := event.FindAllByResourceID(dbTask.Id)
require.NoError(t, err)
@@ -180,8 +185,18 @@ func TestAssignNextTask(t *testing.T) {
podEvents, err := event.FindAllByResourceID(p.ID)
require.NoError(t, err)
- require.Len(t, podEvents, 1)
- assert.Equal(t, string(event.EventPodAssignedTask), podEvents[0].EventType)
+ var foundPodAssignedTask bool
+ var foundPodUpdatedStatus bool
+ for _, podEvent := range podEvents {
+ switch podEvent.EventType {
+ case string(event.EventPodAssignedTask):
+ foundPodAssignedTask = true
+ case string(event.EventPodStatusChange):
+ foundPodUpdatedStatus = true
+ }
+ }
+ assert.True(t, foundPodAssignedTask)
+ assert.True(t, foundPodUpdatedStatus)
}
checkTaskUnallocated := func(t *testing.T, tsk task.Task) {
@@ -247,7 +262,7 @@ func TestAssignNextTask(t *testing.T) {
},
"DispatchesTaskInDisabledHiddenProject": func(ctx context.Context, t *testing.T, params testCaseParams) {
params.task.Requester = evergreen.GithubPRRequester
- params.ref.Enabled = utility.FalsePtr()
+ params.ref.Enabled = false
params.ref.Hidden = utility.TruePtr()
require.NoError(t, params.dispatcher.Insert())
require.NoError(t, params.pod.Insert())
@@ -355,7 +370,7 @@ func TestAssignNextTask(t *testing.T) {
checkDispatcherTasks(t, params.dispatcher, nil)
},
"DequeuesTaskInDisabledProjectAndDoesNotDispatchIt": func(ctx context.Context, t *testing.T, params testCaseParams) {
- params.ref.Enabled = utility.FalsePtr()
+ params.ref.Enabled = false
require.NoError(t, params.pod.Insert())
require.NoError(t, params.task.Insert())
require.NoError(t, params.ref.Insert())
@@ -396,7 +411,7 @@ func TestAssignNextTask(t *testing.T) {
checkDispatcherTasks(t, params.dispatcher, []string{params.task.Id})
},
"FailsWithPodAlreadyAssignedTask": func(ctx context.Context, t *testing.T, params testCaseParams) {
- params.pod.RunningTask = "running-task"
+ params.pod.TaskRuntimeInfo.RunningTaskID = "running-task"
require.NoError(t, params.pod.Insert())
require.NoError(t, params.task.Insert())
require.NoError(t, params.ref.Insert())
@@ -410,7 +425,7 @@ func TestAssignNextTask(t *testing.T) {
t.Run(tName, func(t *testing.T) {
tctx, tcancel := context.WithTimeout(ctx, 10*time.Second)
defer tcancel()
- require.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.AllLogCollection))
+ require.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, event.EventCollection))
p := pod.Pod{
ID: utility.RandomString(),
@@ -442,13 +457,12 @@ func TestRemovePod(t *testing.T) {
env := &mock.Environment{}
require.NoError(t, env.Configure(ctx))
+ const podID = "pod_id"
for tName, tCase := range map[string]func(ctx context.Context, env evergreen.Environment, t *testing.T){
"SucceedsWithSomePodsRemaining": func(ctx context.Context, env evergreen.Environment, t *testing.T) {
- const podID = "pod_id"
pd := NewPodDispatcher("group_id", nil, []string{podID, "other_pod_id", "another_pod_id"})
require.NoError(t, pd.Insert())
-
require.NoError(t, pd.RemovePod(ctx, env, podID))
dbDisp, err := FindOneByID(pd.ID)
@@ -458,7 +472,6 @@ func TestRemovePod(t *testing.T) {
assert.ElementsMatch(t, dbDisp.PodIDs, []string{"other_pod_id", "another_pod_id"})
},
"SucceedsWhenTheLastPodIsBeingRemovedWithoutAnyTasks": func(ctx context.Context, env evergreen.Environment, t *testing.T) {
- const podID = "pod_id"
pd := NewPodDispatcher("group_id", nil, []string{podID})
require.NoError(t, pd.Insert())
@@ -478,19 +491,34 @@ func TestRemovePod(t *testing.T) {
Activated: true,
ContainerAllocated: true,
ContainerAllocatedTime: time.Now(),
+ PodID: podID,
}
require.NoError(t, t0.Insert())
+
+ v := model.Version{
+ Id: "version_id",
+ Status: evergreen.BuildStarted,
+ }
+ require.NoError(t, v.Insert())
+ b := build.Build{
+ Id: "build_id",
+ Version: v.Id,
+ }
+ require.NoError(t, b.Insert())
t1 := task.Task{
- Id: "task_id1",
- ExecutionPlatform: task.ExecutionPlatformContainer,
- Status: evergreen.TaskUndispatched,
- Activated: true,
- ContainerAllocated: true,
- ContainerAllocatedTime: time.Now(),
+ Id: "task_id1",
+ BuildId: b.Id,
+ Version: v.Id,
+ ExecutionPlatform: task.ExecutionPlatformContainer,
+ Status: evergreen.TaskUndispatched,
+ Activated: true,
+ ContainerAllocated: true,
+ ContainerAllocatedTime: time.Now(),
+ ContainerAllocationAttempts: 100,
+ PodID: podID,
}
require.NoError(t, t1.Insert())
- const podID = "pod_id"
pd := NewPodDispatcher("group_id", []string{t0.Id, t1.Id}, []string{podID})
require.NoError(t, pd.Insert())
@@ -506,11 +534,24 @@ func TestRemovePod(t *testing.T) {
require.NoError(t, err)
require.NotZero(t, dbTask0)
assert.False(t, dbTask0.ContainerAllocated)
+ assert.True(t, dbTask0.ShouldAllocateContainer(), "task should be able to allocate another container")
dbTask1, err := task.FindOneId(t1.Id)
require.NoError(t, err)
require.NotZero(t, dbTask1)
+ assert.False(t, dbTask1.ShouldAllocateContainer(), "task should not be able to allocate another container because it has no remaining attempts")
+ assert.True(t, dbTask1.IsFinished(), "task should be finished because it has used up all of its container allocation attempts")
assert.False(t, dbTask1.ContainerAllocated)
+
+ dbBuild, err := build.FindOneId(b.Id)
+ require.NoError(t, err)
+ require.NotZero(t, dbBuild)
+ assert.True(t, dbBuild.IsFinished(), "build should be updated after its task is finished")
+
+ dbVersion, err := model.VersionFindOneId(v.Id)
+ require.NoError(t, err)
+ require.NotZero(t, dbVersion)
+ assert.Equal(t, evergreen.VersionFailed, dbVersion.Status, "version should be updated after its task is finished")
},
"FailsWhenPodIsNotInTheDispatcher": func(ctx context.Context, env evergreen.Environment, t *testing.T) {
pd := NewPodDispatcher("group_id", []string{"task_id"}, []string{"pod_id"})
@@ -525,6 +566,8 @@ func TestRemovePod(t *testing.T) {
assert.Equal(t, pd.PodIDs, []string{"pod_id"})
},
"FailsWhenDBDispatcherIsModified": func(ctx context.Context, env evergreen.Environment, t *testing.T) {
+ const modCount = 10
+
tsk := task.Task{
Id: "task_id",
ExecutionPlatform: task.ExecutionPlatformContainer,
@@ -532,11 +575,9 @@ func TestRemovePod(t *testing.T) {
Activated: true,
ContainerAllocated: true,
ContainerAllocatedTime: time.Now(),
+ PodID: podID,
}
- const (
- podID = "pod_id"
- modCount = 10
- )
+
pd := NewPodDispatcher("group_id", []string{tsk.Id}, []string{podID})
pd.ModificationCount = modCount
require.NoError(t, pd.Insert())
@@ -556,8 +597,12 @@ func TestRemovePod(t *testing.T) {
tctx, tcancel := context.WithTimeout(ctx, 5*time.Second)
defer tcancel()
- require.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection))
+ require.NoError(t, db.ClearCollections(Collection, pod.Collection, task.Collection, build.Collection, model.VersionCollection))
+ tskPod := pod.Pod{
+ ID: podID,
+ }
+ assert.NoError(t, tskPod.Insert())
tCase(tctx, env, t)
})
}
diff --git a/model/pod/pod.go b/model/pod/pod.go
index 37fa641ce18..7745f1206c2 100644
--- a/model/pod/pod.go
+++ b/model/pod/pod.go
@@ -2,11 +2,15 @@ package pod
import (
"context"
+ "fmt"
+ "sort"
+ "strings"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/evergreen/model/event"
"github.com/evergreen-ci/utility"
"github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
@@ -26,15 +30,19 @@ type Pod struct {
// TaskCreationOpts are options to configure how a task should be
// containerized and run in a pod.
TaskContainerCreationOpts TaskContainerCreationOptions `bson:"task_creation_opts,omitempty" json:"task_creation_opts,omitempty"`
+ // Family is the family name of the pod definition stored in the cloud
+ // provider.
+ Family string `bson:"family,omitempty" json:"family,omitempty"`
// TimeInfo contains timing information for the pod's lifecycle.
TimeInfo TimeInfo `bson:"time_info,omitempty" json:"time_info,omitempty"`
// Resources are external resources that are owned and managed by this pod.
Resources ResourceInfo `bson:"resource_info,omitempty" json:"resource_info,omitempty"`
+ // TaskRuntimeInfo contains information about the tasks that a pod is
+ // assigned.
+ TaskRuntimeInfo TaskRuntimeInfo `bson:"task_runtime_info,omitempty" json:"task_runtime_info,omitempty"`
// AgentVersion is the version of the agent running on this pod if it's a
// pod that runs tasks.
AgentVersion string `bson:"agent_version,omitempty" json:"agent_version,omitempty"`
- // RunningTask is the ID of the task currently running on the pod.
- RunningTask string `bson:"running_task,omitempty" json:"running_task,omitempty"`
}
// TaskIntentPodOptions represents options to create an intent pod that runs
@@ -43,31 +51,30 @@ type TaskIntentPodOptions struct {
// ID is the pod identifier. If unspecified, it defaults to a new BSON
// object ID.
ID string
- // Secret is the shared secret value between the server and the pod for
- // authentication when the host is provisioned. If unspecified, it defaults
- // to a random string.
- Secret string
// The remaining fields correspond to the ones in
// TaskContainerCreationOptions.
- CPU int
- MemoryMB int
- OS OS
- Arch Arch
- WindowsVersion WindowsVersion
- Image string
- WorkingDir string
- RepoUsername string
- RepoPassword string
+ CPU int
+ MemoryMB int
+ OS OS
+ Arch Arch
+ WindowsVersion WindowsVersion
+ Image string
+ RepoCredsExternalID string
+ WorkingDir string
+ PodSecretExternalID string
+ PodSecretValue string
}
// Validate checks that the options to create a task intent pod are valid and
// sets defaults if possible.
-func (o *TaskIntentPodOptions) Validate() error {
+func (o *TaskIntentPodOptions) Validate(ecsConf evergreen.ECSConfig) error {
catcher := grip.NewBasicCatcher()
catcher.NewWhen(o.CPU <= 0, "CPU must be a positive non-zero value")
+ catcher.ErrorfWhen(ecsConf.MaxCPU > 0 && o.CPU > ecsConf.MaxCPU, "CPU cannot exceed maximum global CPU limit of %d CPU units", ecsConf.MaxCPU)
catcher.NewWhen(o.MemoryMB <= 0, "memory must be a positive non-zero value")
+ catcher.ErrorfWhen(ecsConf.MaxMemoryMB > 0 && o.MemoryMB > ecsConf.MaxMemoryMB, "memory cannot exceed maximum global memory limit of %d MB", ecsConf.MaxCPU)
catcher.Wrap(o.OS.Validate(), "invalid OS")
catcher.Wrap(o.Arch.Validate(), "invalid CPU architecture")
if o.OS == OSWindows {
@@ -75,6 +82,8 @@ func (o *TaskIntentPodOptions) Validate() error {
}
catcher.NewWhen(o.Image == "", "missing image")
catcher.NewWhen(o.WorkingDir == "", "missing working directory")
+ catcher.NewWhen(o.PodSecretExternalID == "", "missing pod secret external ID")
+ catcher.NewWhen(o.PodSecretValue == "", "missing pod secret value")
if catcher.HasErrors() {
return catcher.Resolve()
@@ -83,9 +92,6 @@ func (o *TaskIntentPodOptions) Validate() error {
if o.ID == "" {
o.ID = primitive.NewObjectID().Hex()
}
- if o.Secret == "" {
- o.Secret = utility.RandomString()
- }
return nil
}
@@ -101,39 +107,40 @@ const (
// NewTaskIntentPod creates a new intent pod to run container tasks from the
// given initialization options.
-func NewTaskIntentPod(opts TaskIntentPodOptions) (*Pod, error) {
- if err := opts.Validate(); err != nil {
+func NewTaskIntentPod(ecsConf evergreen.ECSConfig, opts TaskIntentPodOptions) (*Pod, error) {
+ if err := opts.Validate(ecsConf); err != nil {
return nil, errors.Wrap(err, "invalid options")
}
- p := Pod{
- ID: opts.ID,
- Status: StatusInitializing,
- Type: TypeAgent,
- TaskContainerCreationOpts: TaskContainerCreationOptions{
- CPU: opts.CPU,
- MemoryMB: opts.MemoryMB,
- OS: opts.OS,
- Arch: opts.Arch,
- WindowsVersion: opts.WindowsVersion,
- Image: opts.Image,
- WorkingDir: opts.WorkingDir,
- RepoUsername: opts.RepoUsername,
- RepoPassword: opts.RepoPassword,
+ containerOpts := TaskContainerCreationOptions{
+ CPU: opts.CPU,
+ MemoryMB: opts.MemoryMB,
+ OS: opts.OS,
+ Arch: opts.Arch,
+ WindowsVersion: opts.WindowsVersion,
+ Image: opts.Image,
+ RepoCredsExternalID: opts.RepoCredsExternalID,
+ WorkingDir: opts.WorkingDir,
+ EnvVars: map[string]string{
+ PodIDEnvVar: opts.ID,
},
- TimeInfo: TimeInfo{
- Initializing: time.Now(),
+ EnvSecrets: map[string]Secret{
+ PodSecretEnvVar: {
+ ExternalID: opts.PodSecretExternalID,
+ Value: opts.PodSecretValue,
+ },
},
}
- p.TaskContainerCreationOpts.EnvVars = map[string]string{
- PodIDEnvVar: opts.ID,
- }
- p.TaskContainerCreationOpts.EnvSecrets = map[string]Secret{
- PodSecretEnvVar: {
- Value: opts.Secret,
- Exists: utility.FalsePtr(),
- Owned: utility.TruePtr(),
+
+ p := Pod{
+ ID: opts.ID,
+ Status: StatusInitializing,
+ Type: TypeAgent,
+ TaskContainerCreationOpts: containerOpts,
+ TimeInfo: TimeInfo{
+ Initializing: time.Now(),
},
+ Family: containerOpts.GetFamily(ecsConf),
}
return &p, nil
@@ -246,12 +253,9 @@ func (i ContainerResourceInfo) IsZero() bool {
type TaskContainerCreationOptions struct {
// Image is the image that the task's container will run.
Image string `bson:"image" json:"image"`
- // RepoUsername is the username of the repository containing the image. This
- // is only necessary if it is a private repository.
- RepoUsername string `bson:"repo_username,omitempty" json:"repo_username,omitempty"`
- // RepoPassword is the password of the repository containing the image. This
- // is only necessary if it is a private repository.
- RepoPassword string `bson:"repo_password,omitempty" json:"repo_password,omitempty"`
+ // RepoCredsExternalID is the external identifier for the repository
+ // credentials.
+ RepoCredsExternalID string `bson:"repo_creds_external_id,omitempty" json:"repo_creds_external_id,omitempty"`
// MemoryMB is the memory (in MB) that the task's container will be
// allocated.
MemoryMB int `bson:"memory_mb" json:"memory_mb"`
@@ -402,6 +406,21 @@ func (v WindowsVersion) Validate() error {
}
}
+// Matches returns whether or not the pod Windows Version matches the given
+// Evergreen ECS config Windows version.
+func (v WindowsVersion) Matches(other evergreen.ECSWindowsVersion) bool {
+ switch v {
+ case WindowsVersionServer2016:
+ return other == evergreen.ECSWindowsServer2016
+ case WindowsVersionServer2019:
+ return other == evergreen.ECSWindowsServer2019
+ case WindowsVersionServer2022:
+ return other == evergreen.ECSWindowsServer2022
+ default:
+ return false
+ }
+}
+
// ImportWindowsVersion converts the container Windows version into its
// equivalent pod Windows version.
func ImportWindowsVersion(winVer evergreen.WindowsVersion) (WindowsVersion, error) {
@@ -417,31 +436,110 @@ func ImportWindowsVersion(winVer evergreen.WindowsVersion) (WindowsVersion, erro
}
}
+type hashableEnvSecret struct {
+ name string
+ secret Secret
+}
+
+func (hev hashableEnvSecret) hash() string {
+ h := utility.NewSHA1Hash()
+ h.Add(hev.name)
+ h.Add(hev.secret.hash())
+ return h.Sum()
+}
+
+type hashableEnvSecrets []hashableEnvSecret
+
+func newHashableEnvSecrets(envSecrets map[string]Secret) hashableEnvSecrets {
+ var hes hashableEnvSecrets
+ for k, s := range envSecrets {
+ hes = append(hes, hashableEnvSecret{
+ name: k,
+ secret: s,
+ })
+ }
+ sort.Sort(hes)
+ return hes
+}
+
+func (hev hashableEnvSecrets) hash() string {
+ if !sort.IsSorted(hev) {
+ sort.Sort(hev)
+ }
+
+ h := utility.NewSHA1Hash()
+ for _, ev := range hev {
+ h.Add(ev.hash())
+ }
+ return h.Sum()
+}
+
+func (hes hashableEnvSecrets) Len() int {
+ return len(hes)
+}
+
+func (hes hashableEnvSecrets) Less(i, j int) bool {
+ return hes[i].name < hes[j].name
+}
+
+func (hes hashableEnvSecrets) Swap(i, j int) {
+ hes[i], hes[j] = hes[j], hes[i]
+}
+
+// Hash returns the hash digest of the creation options for the container. This
+// is used to create a pod definition, which acts as a template for the actual
+// pod that will run the container.
+func (o *TaskContainerCreationOptions) Hash() string {
+ h := utility.NewSHA1Hash()
+ h.Add(o.Image)
+ h.Add(o.RepoCredsExternalID)
+ h.Add(fmt.Sprint(o.MemoryMB))
+ h.Add(fmt.Sprint(o.CPU))
+ h.Add(string(o.OS))
+ h.Add(string(o.Arch))
+ h.Add(string(o.WindowsVersion))
+ h.Add(o.WorkingDir)
+ // This intentionally does not hash the plaintext environment variables
+ // because some of them (such as the pod ID) vary between each pod. If they
+ // were included in the pod definition, it would reduce the reusability of
+ // pod definitions across different pods.
+ // Instead of setting these per-pod values during pod definition creation,
+ // the environment variables are injected via overriding options when the
+ // pod is started, so they are not relevant to the creation options hash.
+ h.Add(newHashableEnvSecrets(o.EnvSecrets).hash())
+ return h.Sum()
+}
+
+// GetFamily returns the family name for the cloud pod definition to be used
+// for these container creation options.
+func (o *TaskContainerCreationOptions) GetFamily(ecsConf evergreen.ECSConfig) string {
+ return strings.Join([]string{strings.TrimRight(ecsConf.TaskDefinitionPrefix, "-"), "task", o.Hash()}, "-")
+}
+
// IsZero implements the bsoncodec.Zeroer interface for the sake of defining the
// zero value for BSON marshalling.
func (o TaskContainerCreationOptions) IsZero() bool {
- return o.MemoryMB == 0 && o.CPU == 0 && o.OS == "" && o.Arch == "" && o.WindowsVersion == "" && o.Image == "" && o.RepoUsername == "" && o.RepoPassword == "" && o.WorkingDir == "" && len(o.EnvVars) == 0 && len(o.EnvSecrets) == 0
+ return o.MemoryMB == 0 && o.CPU == 0 && o.OS == "" && o.Arch == "" && o.WindowsVersion == "" && o.Image == "" && o.RepoCredsExternalID == "" && o.WorkingDir == "" && len(o.EnvVars) == 0 && len(o.EnvSecrets) == 0
}
// Secret is a sensitive secret that a pod can access. The secret is managed
// in an integrated secrets storage service.
type Secret struct {
- // Name is the friendly name of the secret.
- Name string `bson:"name,omitempty" json:"name,omitempty" yaml:"name,omitempty"`
// ExternalID is the unique external resource identifier for a secret that
// already exists in the secrets storage service.
- ExternalID string `bson:"external_id,omitempty" json:"external_id,omitempty" yaml:"external_id,omitempty"`
- // Value is the value of the secret. If the secret does not yet exist, it
- // will be created; otherwise, this is just a cached copy of the actual
- // value stored in the secrets storage service.
- Value string `bson:"value,omitempty" json:"value,omitempty" yaml:"value,omitempty"`
- // Exists determines whether or not the secret already exists in the secrets
- // storage service. If this is false, then a new secret will be stored.
- Exists *bool `bson:"exists,omitempty" json:"exists,omitempty" yaml:"exists,omitempty"`
- // Owned determines whether or not the secret is owned by its pod. If this
- // is true, then its lifetime is tied to the pod's lifetime, implying that
- // when the pod is cleaned up, this secret is also cleaned up.
- Owned *bool `bson:"owned,omitempty" json:"owned,omitempty" yaml:"owned,omitempty"`
+ ExternalID string `bson:"external_id,omitempty" json:"external_id,omitempty"`
+ // Value is the value of the secret. This is a cached copy of the actual
+ // secret value stored in the secrets storage service.
+ Value string `bson:"value,omitempty" json:"value,omitempty"`
+}
+
+func (s Secret) hash() string {
+ h := utility.NewSHA1Hash()
+ h.Add(s.ExternalID)
+ // Intentionally do not add the value, because the value is a cached copy
+ // from the external secrets storage. The pod definition does not depend on
+ // the particular value of the secret, just its external ID.
+ return h.Sum()
}
// IsZero implements the bsoncodec.Zeroer interface for the sake of defining the
@@ -450,6 +548,22 @@ func (s Secret) IsZero() bool {
return s == Secret{}
}
+// TaskRuntimeInfo contains information for pods running tasks about the tasks
+// that it is running or has run previously.
+type TaskRuntimeInfo struct {
+ // RunningTaskID is the ID of the task currently running on the pod.
+ RunningTaskID string `bson:"running_task_id,omitempty" json:"running_task_id,omitempty"`
+ // RunningTaskExecution is the execution number of the task currently
+ // running on the pod.
+ RunningTaskExecution int `bson:"running_task_execution,omitempty" json:"running_task_execution,omitempty"`
+}
+
+// IsZero implements the bsoncodec.Zeroer interface for the sake of defining the
+// zero value for BSON marshalling.
+func (i TaskRuntimeInfo) IsZero() bool {
+ return i == TaskRuntimeInfo{}
+}
+
// Insert inserts a new pod into the collection. This relies on the global Anser
// DB session.
func (p *Pod) Insert() error {
@@ -476,9 +590,9 @@ func (p *Pod) Remove() error {
}
// UpdateStatus updates the pod status.
-func (p *Pod) UpdateStatus(s Status) error {
+func (p *Pod) UpdateStatus(s Status, reason string) error {
ts := utility.BSONTime(time.Now())
- if err := UpdateOneStatus(p.ID, p.Status, s, ts); err != nil {
+ if err := UpdateOneStatus(p.ID, p.Status, s, ts, reason); err != nil {
return errors.Wrap(err, "updating status")
}
@@ -521,15 +635,30 @@ func (p *Pod) GetSecret() (*Secret, error) {
}
// SetRunningTask sets the task to dispatch to the pod.
-func (p *Pod) SetRunningTask(ctx context.Context, env evergreen.Environment, taskID string) error {
+func (p *Pod) SetRunningTask(ctx context.Context, env evergreen.Environment, taskID string, taskExecution int) error {
+ if p.TaskRuntimeInfo.RunningTaskID == taskID && p.TaskRuntimeInfo.RunningTaskExecution == taskExecution {
+ return nil
+ }
+ if p.TaskRuntimeInfo.RunningTaskID != "" {
+ return errors.Errorf("cannot set running task to '%s' execution %d when it is already set to '%s' execution %d", taskID, taskExecution, p.TaskRuntimeInfo.RunningTaskID, p.TaskRuntimeInfo.RunningTaskExecution)
+ }
+
+ runningTaskIDKey := bsonutil.GetDottedKeyName(TaskRuntimeInfoKey, TaskRuntimeInfoRunningTaskIDKey)
+ runningTaskExecutionKey := bsonutil.GetDottedKeyName(TaskRuntimeInfoKey, TaskRuntimeInfoRunningTaskExecutionKey)
query := bson.M{
- IDKey: p.ID,
- StatusKey: StatusRunning,
- RunningTaskKey: nil,
+ IDKey: p.ID,
+ StatusKey: StatusRunning,
+ runningTaskIDKey: nil,
+ runningTaskExecutionKey: nil,
}
update := bson.M{
"$set": bson.M{
- RunningTaskKey: taskID,
+ runningTaskIDKey: taskID,
+ runningTaskExecutionKey: taskExecution,
+ // Decommissioning ensures that the pod cannot run another task.
+ // TODO (PM-2618): adjust this to handle cases such as
+ // single-container task groups, where the pod may be reused.
+ StatusKey: StatusDecommissioned,
},
}
@@ -541,35 +670,55 @@ func (p *Pod) SetRunningTask(ctx context.Context, env evergreen.Environment, tas
return errors.New("pod was not updated")
}
- p.RunningTask = taskID
+ p.TaskRuntimeInfo.RunningTaskID = taskID
+ p.TaskRuntimeInfo.RunningTaskExecution = taskExecution
+ p.Status = StatusDecommissioned
+
+ event.LogPodStatusChanged(p.ID, string(StatusRunning), string(StatusDecommissioned), "pod has been assigned a task and will not be reused")
return nil
}
// ClearRunningTask clears the current task dispatched to the pod.
func (p *Pod) ClearRunningTask() error {
- if p.RunningTask == "" {
+ if p.TaskRuntimeInfo.RunningTaskID == "" {
return nil
}
- if err := UpdateOne(bson.M{
- IDKey: p.ID,
- RunningTaskKey: p.RunningTask,
- }, bson.M{
+ runningTaskIDKey := bsonutil.GetDottedKeyName(TaskRuntimeInfoKey, TaskRuntimeInfoRunningTaskIDKey)
+ runningTaskExecutionKey := bsonutil.GetDottedKeyName(TaskRuntimeInfoKey, TaskRuntimeInfoRunningTaskExecutionKey)
+ query := bson.M{
+ IDKey: p.ID,
+ runningTaskIDKey: p.TaskRuntimeInfo.RunningTaskID,
+ }
+ if p.TaskRuntimeInfo.RunningTaskExecution == 0 {
+ query["$or"] = []bson.M{
+ {runningTaskExecutionKey: p.TaskRuntimeInfo.RunningTaskExecution},
+ {runningTaskExecutionKey: bson.M{"$exists": false}},
+ }
+ } else {
+ query[runningTaskExecutionKey] = p.TaskRuntimeInfo.RunningTaskExecution
+ }
+
+ if err := UpdateOne(query, bson.M{
"$unset": bson.M{
- RunningTaskKey: 1,
+ runningTaskIDKey: 1,
+ runningTaskExecutionKey: 1,
},
}); err != nil {
return errors.Wrap(err, "clearing running task")
}
- p.RunningTask = ""
+ event.LogPodRunningTaskCleared(p.ID, p.TaskRuntimeInfo.RunningTaskID, p.TaskRuntimeInfo.RunningTaskExecution)
+
+ p.TaskRuntimeInfo.RunningTaskID = ""
+ p.TaskRuntimeInfo.RunningTaskExecution = 0
return nil
}
-// SetAgentStartTime sets the time when the pod's agent started.
-func (p *Pod) SetAgentStartTime() error {
+// UpdateAgentStartTime updates the time when the pod's agent started to now.
+func (p *Pod) UpdateAgentStartTime() error {
ts := utility.BSONTime(time.Now())
if err := UpdateOne(ByID(p.ID), bson.M{
"$set": bson.M{
@@ -583,3 +732,20 @@ func (p *Pod) SetAgentStartTime() error {
return nil
}
+
+// UpdateLastCommunicated updates the last time that the pod and app server
+// successfully communicated to now, indicating that the pod is currently alive.
+func (p *Pod) UpdateLastCommunicated() error {
+ ts := utility.BSONTime(time.Now())
+ if err := UpdateOne(ByID(p.ID), bson.M{
+ "$set": bson.M{
+ bsonutil.GetDottedKeyName(TimeInfoKey, TimeInfoLastCommunicatedKey): ts,
+ },
+ }); err != nil {
+ return err
+ }
+
+ p.TimeInfo.LastCommunicated = ts
+
+ return nil
+}
diff --git a/model/pod/pod_test.go b/model/pod/pod_test.go
index 8c541b68125..ae60ce7a428 100644
--- a/model/pod/pod_test.go
+++ b/model/pod/pod_test.go
@@ -224,23 +224,23 @@ func TestRemove(t *testing.T) {
func TestNewTaskIntentPod(t *testing.T) {
makeValidOpts := func() TaskIntentPodOptions {
return TaskIntentPodOptions{
- ID: "id",
- Secret: "secret",
- CPU: 128,
- MemoryMB: 256,
- OS: OSWindows,
- Arch: ArchAMD64,
- WindowsVersion: WindowsVersionServer2022,
- Image: "image",
- WorkingDir: "/",
- RepoUsername: "username",
- RepoPassword: "password",
+ ID: "id",
+ PodSecretExternalID: "pod_secret_external_id",
+ PodSecretValue: "pod_secret_value",
+ CPU: 128,
+ MemoryMB: 256,
+ OS: OSWindows,
+ Arch: ArchAMD64,
+ WindowsVersion: WindowsVersionServer2022,
+ Image: "image",
+ RepoCredsExternalID: "repo_creds_external_id",
+ WorkingDir: "/",
}
}
t.Run("SucceedsWithValidOptions", func(t *testing.T) {
opts := makeValidOpts()
- p, err := NewTaskIntentPod(opts)
+ p, err := NewTaskIntentPod(evergreen.ECSConfig{}, opts)
require.NoError(t, err)
assert.Equal(t, opts.ID, p.ID)
assert.Equal(t, opts.CPU, p.TaskContainerCreationOpts.CPU)
@@ -249,47 +249,66 @@ func TestNewTaskIntentPod(t *testing.T) {
assert.Equal(t, opts.Arch, p.TaskContainerCreationOpts.Arch)
assert.Equal(t, opts.WindowsVersion, p.TaskContainerCreationOpts.WindowsVersion)
assert.Equal(t, opts.Image, p.TaskContainerCreationOpts.Image)
+ assert.Equal(t, opts.RepoCredsExternalID, p.TaskContainerCreationOpts.RepoCredsExternalID)
assert.Equal(t, opts.WorkingDir, p.TaskContainerCreationOpts.WorkingDir)
- assert.Equal(t, opts.RepoUsername, p.TaskContainerCreationOpts.RepoUsername)
- assert.Equal(t, opts.RepoPassword, p.TaskContainerCreationOpts.RepoPassword)
assert.Equal(t, opts.ID, p.TaskContainerCreationOpts.EnvVars[PodIDEnvVar])
s, err := p.GetSecret()
require.NoError(t, err)
- assert.Zero(t, s.Name)
- assert.Equal(t, opts.Secret, s.Value)
- assert.Empty(t, s.ExternalID)
- assert.False(t, utility.FromBoolPtr(s.Exists))
- assert.True(t, utility.FromBoolPtr(s.Owned))
+ assert.Equal(t, opts.PodSecretExternalID, s.ExternalID)
+ assert.Equal(t, opts.PodSecretValue, s.Value)
})
t.Run("SetsDefaultID", func(t *testing.T) {
opts := makeValidOpts()
opts.ID = ""
- p, err := NewTaskIntentPod(opts)
+ p, err := NewTaskIntentPod(evergreen.ECSConfig{}, opts)
require.NoError(t, err)
assert.NotZero(t, p.ID)
assert.Equal(t, p.ID, p.TaskContainerCreationOpts.EnvVars[PodIDEnvVar])
})
- t.Run("SetsDefaultPodSecret", func(t *testing.T) {
+ t.Run("FailsWithoutPodSecretExternalID", func(t *testing.T) {
opts := makeValidOpts()
- opts.Secret = ""
+ opts.PodSecretExternalID = ""
- p, err := NewTaskIntentPod(opts)
- require.NoError(t, err)
- assert.NotZero(t, p.ID)
- s, err := p.GetSecret()
- require.NoError(t, err)
- assert.Zero(t, s.Name)
- assert.NotZero(t, s.Value)
- assert.Empty(t, s.ExternalID)
- assert.False(t, utility.FromBoolPtr(s.Exists))
- assert.True(t, utility.FromBoolPtr(s.Owned))
+ p, err := NewTaskIntentPod(evergreen.ECSConfig{}, opts)
+ assert.Error(t, err)
+ assert.Zero(t, p)
+ })
+ t.Run("FailsWithoutPodSecretValue", func(t *testing.T) {
+ opts := makeValidOpts()
+ opts.PodSecretValue = ""
+
+ p, err := NewTaskIntentPod(evergreen.ECSConfig{}, opts)
+ assert.Error(t, err)
+ assert.Zero(t, p)
})
- t.Run("FailsWithInvalidOptions", func(t *testing.T) {
+ t.Run("FailsWithoutImage", func(t *testing.T) {
opts := makeValidOpts()
opts.Image = ""
- p, err := NewTaskIntentPod(opts)
+ p, err := NewTaskIntentPod(evergreen.ECSConfig{}, opts)
+ assert.Error(t, err)
+ assert.Zero(t, p)
+ })
+ t.Run("FailsWithCPUExceedingGlobalMaxCPU", func(t *testing.T) {
+ opts := makeValidOpts()
+ ecsConf := evergreen.ECSConfig{
+ MaxCPU: 1024,
+ MaxMemoryMB: 2048,
+ }
+ opts.CPU = ecsConf.MaxCPU + 1
+ p, err := NewTaskIntentPod(ecsConf, opts)
+ assert.Error(t, err)
+ assert.Zero(t, p)
+ })
+ t.Run("FailsWithCPUExceedingGlobalMaxMemoryMB", func(t *testing.T) {
+ opts := makeValidOpts()
+ ecsConf := evergreen.ECSConfig{
+ MaxCPU: 1024,
+ MaxMemoryMB: 2048,
+ }
+ opts.MemoryMB = ecsConf.MaxMemoryMB + 1
+ p, err := NewTaskIntentPod(ecsConf, opts)
assert.Error(t, err)
assert.Zero(t, p)
})
@@ -321,7 +340,7 @@ func TestUpdateStatus(t *testing.T) {
}
checkEventLog := func(t *testing.T, p Pod) {
- events, err := event.Find(event.AllLogCollection, event.MostRecentPodEvents(p.ID, 10))
+ events, err := event.Find(event.MostRecentPodEvents(p.ID, 10))
require.NoError(t, err)
require.Len(t, events, 1)
assert.Equal(t, p.ID, events[0].ResourceId)
@@ -333,7 +352,7 @@ func TestUpdateStatus(t *testing.T) {
"SucceedsWithInitializingStatus": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- require.NoError(t, p.UpdateStatus(StatusInitializing))
+ require.NoError(t, p.UpdateStatus(StatusInitializing, ""))
assert.Equal(t, StatusInitializing, p.Status)
checkStatusAndTimeInfo(t, p)
@@ -342,7 +361,7 @@ func TestUpdateStatus(t *testing.T) {
"SucceedsWithStartingStatus": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- require.NoError(t, p.UpdateStatus(StatusStarting))
+ require.NoError(t, p.UpdateStatus(StatusStarting, ""))
assert.Equal(t, StatusStarting, p.Status)
checkStatusAndTimeInfo(t, p)
@@ -351,7 +370,7 @@ func TestUpdateStatus(t *testing.T) {
"SucceedsWithTerminatedStatus": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- require.NoError(t, p.UpdateStatus(StatusTerminated))
+ require.NoError(t, p.UpdateStatus(StatusTerminated, ""))
assert.Equal(t, StatusTerminated, p.Status)
checkStatus(t, p)
@@ -360,11 +379,11 @@ func TestUpdateStatus(t *testing.T) {
"NoopsWithIdenticalStatus": func(t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- require.NoError(t, p.UpdateStatus(p.Status))
+ require.NoError(t, p.UpdateStatus(p.Status, ""))
checkStatus(t, p)
},
"FailsWithNonexistentPod": func(t *testing.T, p Pod) {
- assert.Error(t, p.UpdateStatus(StatusTerminated))
+ assert.Error(t, p.UpdateStatus(StatusTerminated, ""))
dbPod, err := FindOneByID(p.ID)
assert.NoError(t, err)
@@ -377,7 +396,7 @@ func TestUpdateStatus(t *testing.T) {
"$set": bson.M{StatusKey: StatusInitializing},
}))
- assert.Error(t, p.UpdateStatus(StatusTerminated))
+ assert.Error(t, p.UpdateStatus(StatusTerminated, ""))
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
@@ -386,9 +405,9 @@ func TestUpdateStatus(t *testing.T) {
},
} {
t.Run(tName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ require.NoError(t, db.ClearCollections(Collection, event.EventCollection))
defer func() {
- assert.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(Collection, event.EventCollection))
}()
tCase(t, Pod{
ID: "id",
@@ -474,9 +493,9 @@ func TestUpdateResources(t *testing.T) {
},
} {
t.Run(tName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ require.NoError(t, db.ClearCollections(Collection, event.EventCollection))
defer func() {
- assert.NoError(t, db.ClearCollections(Collection, event.AllLogCollection))
+ assert.NoError(t, db.ClearCollections(Collection, event.EventCollection))
}()
tCase(t, Pod{
ID: "id",
@@ -501,9 +520,8 @@ func TestUpdateResources(t *testing.T) {
func TestGetSecret(t *testing.T) {
t.Run("SucceedsWithPopulatedEnvSecret", func(t *testing.T) {
expected := Secret{
- Name: "secret_name",
- Value: "secret_value",
ExternalID: "external_id",
+ Value: "secret_value",
}
p := Pod{
ID: "id",
@@ -540,26 +558,51 @@ func TestSetRunningTask(t *testing.T) {
for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod){
"Succeeds": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
require.NoError(t, p.Insert())
- taskID := "task"
- require.NoError(t, p.SetRunningTask(ctx, env, taskID))
+ const taskID = "task"
+ const taskExecution = 1
+ require.NoError(t, p.SetRunningTask(ctx, env, taskID, taskExecution))
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
require.NotZero(t, dbPod)
- assert.Equal(t, taskID, dbPod.RunningTask)
+ assert.Equal(t, taskID, dbPod.TaskRuntimeInfo.RunningTaskID)
+ assert.Equal(t, taskExecution, dbPod.TaskRuntimeInfo.RunningTaskExecution)
+ assert.Equal(t, StatusDecommissioned, dbPod.Status)
+ },
+ "NoopsWithPodAlreadyRunningSameTaskExecution": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
+ const taskID = "task"
+ const taskExecution = 2
+ p.TaskRuntimeInfo.RunningTaskID = taskID
+ p.TaskRuntimeInfo.RunningTaskExecution = taskExecution
+ require.NoError(t, p.Insert())
+ assert.NoError(t, p.SetRunningTask(ctx, env, taskID, taskExecution))
+
+ dbPod, err := FindOneByID(p.ID)
+ require.NoError(t, err)
+ require.NotZero(t, dbPod)
+ assert.Equal(t, taskID, dbPod.TaskRuntimeInfo.RunningTaskID)
+ assert.Equal(t, taskExecution, dbPod.TaskRuntimeInfo.RunningTaskExecution)
+ },
+ "FailsWithPodRunningSameTaskButPreviousExecution": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
+ const taskID = "task"
+ const taskExecution = 2
+ p.TaskRuntimeInfo.RunningTaskID = taskID
+ p.TaskRuntimeInfo.RunningTaskExecution = taskExecution
+ require.NoError(t, p.Insert())
+ assert.Error(t, p.SetRunningTask(ctx, env, taskID, taskExecution+1))
},
"FailsWithNonRunningPod": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
p.Status = StatusDecommissioned
require.NoError(t, p.Insert())
- assert.Error(t, p.SetRunningTask(ctx, env, "task"))
+ assert.Error(t, p.SetRunningTask(ctx, env, "task", 0))
},
- "FailsWithPodAlreadyRunningTask": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
- p.RunningTask = "some-other-task"
+ "FailsWithPodAlreadyRunningDifferentTask": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
+ p.TaskRuntimeInfo.RunningTaskID = "some-other-task"
require.NoError(t, p.Insert())
- assert.Error(t, p.SetRunningTask(ctx, env, "task"))
+ assert.Error(t, p.SetRunningTask(ctx, env, "task", 0))
},
"FailsWithNonexistentPod": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
- assert.Error(t, p.SetRunningTask(ctx, env, "task"))
+ assert.Error(t, p.SetRunningTask(ctx, env, "task", 0))
dbPod, err := FindOneByID(p.ID)
assert.NoError(t, err)
@@ -583,66 +626,118 @@ func TestSetRunningTask(t *testing.T) {
func TestClearRunningTask(t *testing.T) {
defer func() {
- assert.NoError(t, db.ClearCollections(Collection))
+ assert.NoError(t, db.ClearCollections(Collection, event.EventCollection))
}()
+ checkContainerTaskCleared := func(t *testing.T, podID string) {
+ p, err := FindOneByID(podID)
+ require.NoError(t, err)
+ require.NotZero(t, p)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskID)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskExecution)
+
+ events, err := event.FindAllByResourceID(podID)
+ require.NoError(t, err)
+ require.Len(t, events, 1)
+ assert.EqualValues(t, event.EventPodClearedTask, events[0].EventType, "should have logged event indicating task is cleared from pod")
+ }
+
for tName, tCase := range map[string]func(t *testing.T, p Pod){
"Succeeds": func(t *testing.T, p Pod) {
- p.RunningTask = "task_id"
+ p.TaskRuntimeInfo.RunningTaskID = "task_id"
+ p.TaskRuntimeInfo.RunningTaskExecution = 5
require.NoError(t, p.Insert())
require.NoError(t, p.ClearRunningTask())
- assert.Zero(t, p.RunningTask)
- dbPod, err := FindOneByID(p.ID)
- require.NoError(t, err)
- require.NotZero(t, dbPod)
- assert.Zero(t, dbPod.RunningTask)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskID)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskExecution)
+
+ checkContainerTaskCleared(t, p.ID)
+ },
+ "SucceedsWithTaskExecutionZero": func(t *testing.T, p Pod) {
+ p.TaskRuntimeInfo.RunningTaskID = "task_id"
+ p.TaskRuntimeInfo.RunningTaskExecution = 0
+ require.NoError(t, p.Insert())
+ require.NoError(t, p.ClearRunningTask())
+
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskID)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskExecution)
+
+ checkContainerTaskCleared(t, p.ID)
},
"SucceedsWhenNotRunningAnyTask": func(t *testing.T, p Pod) {
- p.RunningTask = ""
+ p.TaskRuntimeInfo.RunningTaskID = ""
+ p.TaskRuntimeInfo.RunningTaskExecution = 0
require.NoError(t, p.Insert())
require.NoError(t, p.ClearRunningTask())
- assert.Zero(t, p.RunningTask)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskID)
+ assert.Zero(t, p.TaskRuntimeInfo.RunningTaskExecution)
+
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
require.NotZero(t, dbPod)
- assert.Zero(t, dbPod.RunningTask)
+ assert.Zero(t, dbPod.TaskRuntimeInfo.RunningTaskID)
+ assert.Zero(t, dbPod.TaskRuntimeInfo.RunningTaskExecution)
+
+ events, err := event.FindAllByResourceID(p.ID)
+ require.NoError(t, err)
+ assert.Empty(t, events)
},
"DoesNotUpdateDBWhenInMemoryPodDoesNotHaveRunningTask": func(t *testing.T, p Pod) {
- p.RunningTask = "task_id"
+ const taskID = "task_id"
+ const taskExecution = 3
+ p.TaskRuntimeInfo.RunningTaskID = taskID
+ p.TaskRuntimeInfo.RunningTaskExecution = taskExecution
require.NoError(t, p.Insert())
- p.RunningTask = ""
+ p.TaskRuntimeInfo.RunningTaskID = ""
+ p.TaskRuntimeInfo.RunningTaskExecution = 0
require.NoError(t, p.ClearRunningTask())
- assert.Zero(t, p.RunningTask)
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
require.NotZero(t, dbPod)
- assert.NotZero(t, dbPod.RunningTask)
+ assert.Equal(t, taskID, dbPod.TaskRuntimeInfo.RunningTaskID)
+ assert.Equal(t, taskExecution, dbPod.TaskRuntimeInfo.RunningTaskExecution)
},
"FailsWithNonexistentPod": func(t *testing.T, p Pod) {
- p.RunningTask = "task_id"
+ p.TaskRuntimeInfo.RunningTaskID = "task_id"
assert.Error(t, p.ClearRunningTask())
dbPod, err := FindOneByID(p.ID)
assert.NoError(t, err)
assert.Zero(t, dbPod)
},
- "FailsWhenInMemoryPodHasDifferentRunningTaskFromDB": func(t *testing.T, p Pod) {
- p.RunningTask = "task_id"
+ "FailsWhenInMemoryPodHasDifferentRunningTaskIDFromDB": func(t *testing.T, p Pod) {
+ const taskID = "task_id"
+ p.TaskRuntimeInfo.RunningTaskID = taskID
require.NoError(t, p.Insert())
- p.RunningTask = "some_other_task_id"
+ p.TaskRuntimeInfo.RunningTaskID = "some_other_task_id"
assert.Error(t, p.ClearRunningTask())
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
require.NotZero(t, dbPod)
- assert.Equal(t, "task_id", dbPod.RunningTask)
+ assert.Equal(t, taskID, dbPod.TaskRuntimeInfo.RunningTaskID)
+ },
+ "FailsWhenInMemoryPodHasDifferentRunningTaskExecutionFromDB": func(t *testing.T, p Pod) {
+ const taskID = "task_id"
+ const taskExecution = 5
+ p.TaskRuntimeInfo.RunningTaskID = taskID
+ p.TaskRuntimeInfo.RunningTaskExecution = taskExecution
+ require.NoError(t, p.Insert())
+ p.TaskRuntimeInfo.RunningTaskExecution = taskExecution + 1
+ assert.Error(t, p.ClearRunningTask())
+
+ dbPod, err := FindOneByID(p.ID)
+ require.NoError(t, err)
+ require.NotZero(t, dbPod)
+ assert.Equal(t, taskID, dbPod.TaskRuntimeInfo.RunningTaskID)
+ assert.Equal(t, taskExecution, dbPod.TaskRuntimeInfo.RunningTaskExecution)
},
} {
t.Run(tName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(Collection))
+ require.NoError(t, db.ClearCollections(Collection, event.EventCollection))
p := Pod{
ID: "pod_id",
@@ -653,7 +748,7 @@ func TestClearRunningTask(t *testing.T) {
}
}
-func TestSetAgentStartTime(t *testing.T) {
+func TestUpdateAgentStartTime(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -661,13 +756,10 @@ func TestSetAgentStartTime(t *testing.T) {
assert.NoError(t, db.ClearCollections(Collection))
}()
- env := &mock.Environment{}
- require.NoError(t, env.Configure(ctx))
-
- for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod){
- "Succeeds": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, p Pod){
+ "Succeeds": func(ctx context.Context, t *testing.T, p Pod) {
require.NoError(t, p.Insert())
- require.NoError(t, p.SetAgentStartTime())
+ require.NoError(t, p.UpdateAgentStartTime())
dbPod, err := FindOneByID(p.ID)
require.NoError(t, err)
@@ -675,8 +767,8 @@ func TestSetAgentStartTime(t *testing.T) {
assert.NotZero(t, dbPod.TimeInfo.AgentStarted)
assert.Equal(t, p.TimeInfo.AgentStarted, dbPod.TimeInfo.AgentStarted)
},
- "FailsWithNonexistentPod": func(ctx context.Context, t *testing.T, env *mock.Environment, p Pod) {
- assert.Error(t, p.SetAgentStartTime())
+ "FailsWithNonexistentPod": func(ctx context.Context, t *testing.T, p Pod) {
+ assert.Error(t, p.UpdateAgentStartTime())
dbPod, err := FindOneByID(p.ID)
assert.NoError(t, err)
@@ -692,7 +784,157 @@ func TestSetAgentStartTime(t *testing.T) {
p := Pod{
ID: "id",
}
- tCase(tctx, t, env, p)
+ tCase(tctx, t, p)
+ })
+ }
+}
+
+func TestUpdateLastCommunicated(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ defer func() {
+ assert.NoError(t, db.ClearCollections(Collection))
+ }()
+
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, p Pod){
+ "Succeeds": func(ctx context.Context, t *testing.T, p Pod) {
+ require.NoError(t, p.Insert())
+ require.NoError(t, p.UpdateLastCommunicated())
+
+ dbPod, err := FindOneByID(p.ID)
+ require.NoError(t, err)
+ require.NotZero(t, dbPod)
+ assert.NotZero(t, dbPod.TimeInfo.LastCommunicated)
+ assert.Equal(t, p.TimeInfo.LastCommunicated, dbPod.TimeInfo.LastCommunicated)
+ },
+ "FailsWithNonexistentPod": func(ctx context.Context, t *testing.T, p Pod) {
+ assert.Error(t, p.UpdateLastCommunicated())
+
+ dbPod, err := FindOneByID(p.ID)
+ assert.NoError(t, err)
+ assert.Zero(t, dbPod)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ tctx, tcancel := context.WithCancel(ctx)
+ defer tcancel()
+
+ require.NoError(t, db.ClearCollections(Collection))
+
+ p := Pod{
+ ID: "id",
+ }
+ tCase(tctx, t, p)
})
}
}
+
+func TestTaskContainerCreationOptionsHash(t *testing.T) {
+ t.Run("Hash", func(t *testing.T) {
+ var baseOpts TaskContainerCreationOptions
+ baseHash := baseOpts.Hash()
+
+ t.Run("ReturnsSameValueForSameInput", func(t *testing.T) {
+ for i := 0; i < 5; i++ {
+ assert.Equal(t, baseHash, baseOpts.Hash(), "hash attempt %d produced different hash value", i)
+ }
+ })
+ t.Run("ChangesForImage", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.Image = "image"
+ assert.NotEqual(t, baseHash, opts.Hash(), "image should affect hash")
+ })
+ t.Run("ChangesForRepoCredsExternalID", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.RepoCredsExternalID = "external_id"
+ assert.NotEqual(t, baseHash, opts.Hash(), "repo creds external ID should affect hash")
+ })
+ t.Run("ChangesForMemory", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.MemoryMB = 1024
+ assert.NotEqual(t, baseHash, opts.Hash(), "memory should affect hash")
+ })
+ t.Run("ChangesForCPU", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.CPU = 256
+ assert.NotEqual(t, baseHash, opts.Hash(), "CPU should affect hash")
+ })
+ t.Run("ChangesForOS", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.OS = OSWindows
+ assert.NotEqual(t, baseHash, opts.Hash(), "OS should affect hash")
+ })
+ t.Run("ChangesForArch", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.Arch = ArchARM64
+ assert.NotEqual(t, baseHash, opts.Hash(), "CPU architecture should affect hash")
+ })
+ t.Run("ChangesForWindowsVersion", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.WindowsVersion = WindowsVersionServer2019
+ assert.NotEqual(t, baseHash, opts.Hash(), "Windows version should affect hash")
+ })
+ t.Run("ChangesForWorkingDir", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.WorkingDir = "/working_dir"
+ assert.NotEqual(t, baseHash, opts.Hash(), "working directory should affect hash")
+ })
+ t.Run("ChangesForEnvVars", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.EnvVars = map[string]string{
+ "ENV_VAR": "value",
+ }
+ assert.Equal(t, baseHash, opts.Hash(), "env vars should not affect hash")
+ })
+ t.Run("ReturnsSameValueForSameUnorderedEnvVars", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.EnvVars = map[string]string{
+ "ENV_VAR0": "value0",
+ "ENV_VAR1": "value1",
+ "ENV_VAR2": "value2",
+ }
+ h0 := opts.Hash()
+ h1 := opts.Hash()
+ assert.Equal(t, baseHash, h0, "env vars should not affect hash")
+ assert.Equal(t, h0, h1, "env vars should not affect hash")
+ })
+ t.Run("ReturnsSameValueForSameUnorderedEnvSecrets", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.EnvSecrets = map[string]Secret{
+ "SECRET_ENV_VAR0": {
+ ExternalID: "external_id0",
+ },
+ "SECRET_ENV_VAR1": {
+ ExternalID: "external_id1",
+ },
+ "SECRET_ENV_VAR2": {
+ ExternalID: "external_id2",
+ },
+ }
+ h0 := opts.Hash()
+ h1 := opts.Hash()
+ assert.Equal(t, h0, h1, "order of env secrets should not affect hash")
+ })
+ t.Run("ChangesForEnvSecretExternalID", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.EnvSecrets = map[string]Secret{
+ "SECRET_ENV_VAR": {},
+ }
+ h0 := opts.Hash()
+ opts.EnvSecrets["SECRET_ENV_VAR"] = Secret{ExternalID: "external_id"}
+ h1 := opts.Hash()
+ assert.NotEqual(t, h0, h1, "env secret external ID should affect hash")
+ })
+ t.Run("DoesNotChangeForEnvSecretValue", func(t *testing.T) {
+ var opts TaskContainerCreationOptions
+ opts.EnvSecrets = map[string]Secret{
+ "SECRET_ENV_VAR": {},
+ }
+ h0 := opts.Hash()
+ opts.EnvSecrets["SECRET_ENV_VAR"] = Secret{Value: "secret_value"}
+ h1 := opts.Hash()
+ assert.Equal(t, h0, h1, "env secret value should not affect hash")
+ })
+ })
+}
diff --git a/model/project.go b/model/project.go
index ce7bbd299ef..e718ab3c171 100644
--- a/model/project.go
+++ b/model/project.go
@@ -36,46 +36,35 @@ const (
waterfallTasksQueryMaxTime = 90 * time.Second
)
-type GetProjectTasksOpts struct {
- Limit int `json:"num_versions"`
- BuildVariant string `json:"build_variant"`
- StartAt int `json:"start_at"`
-}
-
type Project struct {
- Enabled bool `yaml:"enabled,omitempty" bson:"enabled"`
- Stepback bool `yaml:"stepback,omitempty" bson:"stepback"`
- PreErrorFailsTask bool `yaml:"pre_error_fails_task,omitempty" bson:"pre_error_fails_task,omitempty"`
- PostErrorFailsTask bool `yaml:"post_error_fails_task,omitempty" bson:"post_error_fails_task,omitempty"`
- OomTracker bool `yaml:"oom_tracker,omitempty" bson:"oom_tracker"`
- BatchTime int `yaml:"batchtime,omitempty" bson:"batch_time"`
- Owner string `yaml:"owner,omitempty" bson:"owner_name"`
- Repo string `yaml:"repo,omitempty" bson:"repo_name"`
- RemotePath string `yaml:"remote_path,omitempty" bson:"remote_path"`
- Branch string `yaml:"branch,omitempty" bson:"branch_name"`
- Identifier string `yaml:"identifier,omitempty" bson:"identifier"`
- DisplayName string `yaml:"display_name,omitempty" bson:"display_name"`
- CommandType string `yaml:"command_type,omitempty" bson:"command_type"`
- Ignore []string `yaml:"ignore,omitempty" bson:"ignore"`
- Parameters []ParameterInfo `yaml:"parameters,omitempty" bson:"parameters,omitempty"`
- Pre *YAMLCommandSet `yaml:"pre,omitempty" bson:"pre"`
- Post *YAMLCommandSet `yaml:"post,omitempty" bson:"post"`
- Timeout *YAMLCommandSet `yaml:"timeout,omitempty" bson:"timeout"`
- EarlyTermination *YAMLCommandSet `yaml:"early_termination,omitempty" bson:"early_termination,omitempty"`
- CallbackTimeout int `yaml:"callback_timeout_secs,omitempty" bson:"callback_timeout_secs"`
- Modules ModuleList `yaml:"modules,omitempty" bson:"modules"`
- Containers []Container `yaml:"containers,omitempty" bson:"containers"`
- BuildVariants BuildVariants `yaml:"buildvariants,omitempty" bson:"build_variants"`
- Functions map[string]*YAMLCommandSet `yaml:"functions,omitempty" bson:"functions"`
- TaskGroups []TaskGroup `yaml:"task_groups,omitempty" bson:"task_groups"`
- Tasks []ProjectTask `yaml:"tasks,omitempty" bson:"tasks"`
- ExecTimeoutSecs int `yaml:"exec_timeout_secs,omitempty" bson:"exec_timeout_secs"`
- Loggers *LoggerConfig `yaml:"loggers,omitempty" bson:"loggers,omitempty"`
- CommitQueueAliases []ProjectAlias `yaml:"commit_queue_aliases,omitempty" bson:"commit_queue_aliases,omitempty"`
- GitHubPRAliases []ProjectAlias `yaml:"github_pr_aliases,omitempty" bson:"github_pr_aliases,omitempty"`
- GitTagAliases []ProjectAlias `yaml:"git_tag_aliases,omitempty" bson:"git_tag_aliases,omitempty"`
- GitHubChecksAliases []ProjectAlias `yaml:"github_checks_aliases,omitempty" bson:"github_checks_aliases,omitempty"`
- PatchAliases []ProjectAlias `yaml:"patch_aliases,omitempty" bson:"patch_aliases,omitempty"`
+ Enabled bool `yaml:"enabled,omitempty" bson:"enabled"` // deprecated
+ Owner string `yaml:"owner,omitempty" bson:"owner_name"` // deprecated
+ Repo string `yaml:"repo,omitempty" bson:"repo_name"` // deprecated
+ RemotePath string `yaml:"remote_path,omitempty" bson:"remote_path"` // deprecated
+ Branch string `yaml:"branch,omitempty" bson:"branch_name"` // deprecated
+ Stepback bool `yaml:"stepback,omitempty" bson:"stepback"`
+ PreErrorFailsTask bool `yaml:"pre_error_fails_task,omitempty" bson:"pre_error_fails_task,omitempty"`
+ PostErrorFailsTask bool `yaml:"post_error_fails_task,omitempty" bson:"post_error_fails_task,omitempty"`
+ OomTracker bool `yaml:"oom_tracker,omitempty" bson:"oom_tracker"`
+ BatchTime int `yaml:"batchtime,omitempty" bson:"batch_time"`
+ Identifier string `yaml:"identifier,omitempty" bson:"identifier"`
+ DisplayName string `yaml:"display_name,omitempty" bson:"display_name"`
+ CommandType string `yaml:"command_type,omitempty" bson:"command_type"`
+ Ignore []string `yaml:"ignore,omitempty" bson:"ignore"`
+ Parameters []ParameterInfo `yaml:"parameters,omitempty" bson:"parameters,omitempty"`
+ Pre *YAMLCommandSet `yaml:"pre,omitempty" bson:"pre"`
+ Post *YAMLCommandSet `yaml:"post,omitempty" bson:"post"`
+ Timeout *YAMLCommandSet `yaml:"timeout,omitempty" bson:"timeout"`
+ EarlyTermination *YAMLCommandSet `yaml:"early_termination,omitempty" bson:"early_termination,omitempty"`
+ CallbackTimeout int `yaml:"callback_timeout_secs,omitempty" bson:"callback_timeout_secs"`
+ Modules ModuleList `yaml:"modules,omitempty" bson:"modules"`
+ Containers []Container `yaml:"containers,omitempty" bson:"containers"`
+ BuildVariants BuildVariants `yaml:"buildvariants,omitempty" bson:"build_variants"`
+ Functions map[string]*YAMLCommandSet `yaml:"functions,omitempty" bson:"functions"`
+ TaskGroups []TaskGroup `yaml:"task_groups,omitempty" bson:"task_groups"`
+ Tasks []ProjectTask `yaml:"tasks,omitempty" bson:"tasks"`
+ ExecTimeoutSecs int `yaml:"exec_timeout_secs,omitempty" bson:"exec_timeout_secs"`
+ Loggers *LoggerConfig `yaml:"loggers,omitempty" bson:"loggers,omitempty"`
// Flag that indicates a project as requiring user authentication
Private bool `yaml:"private,omitempty" bson:"private"`
@@ -89,8 +78,9 @@ type ProjectInfo struct {
}
type PatchConfig struct {
- PatchedParserProject string
- PatchedProjectConfig string
+ PatchedParserProjectYAML string
+ PatchedParserProject *ParserProject
+ PatchedProjectConfig string
}
func (p *ProjectInfo) NotPopulated() bool {
@@ -103,11 +93,16 @@ type BuildVariantTaskUnit struct {
// the project level, or an error will be thrown
Name string `yaml:"name,omitempty" bson:"name"`
// IsGroup indicates that it is a task group or a task within a task group.
+ // This is always populated after translating the parser project to the
+ // project.
IsGroup bool `yaml:"-" bson:"-"`
// GroupName is the task group name if this is a task in a task group. If
// it is the task group itself, it is not populated (Name is the task group
// name).
GroupName string `yaml:"-" bson:"-"`
+ // Variant is the build variant that the task unit is part of. This is
+ // always populated after translating the parser project to the project.
+ Variant string `yaml:"-" bson:"-"`
// fields to overwrite ProjectTask settings.
Patchable *bool `yaml:"patchable,omitempty" bson:"patchable,omitempty"`
@@ -124,8 +119,6 @@ type BuildVariantTaskUnit struct {
ExecTimeoutSecs int `yaml:"exec_timeout_secs,omitempty" bson:"exec_timeout_secs"`
Stepback *bool `yaml:"stepback,omitempty" bson:"stepback,omitempty"`
- Variant string `yaml:"-" bson:"-"`
-
CommitQueueMerge bool `yaml:"commit_queue_merge,omitempty" bson:"commit_queue_merge"`
// Use a *int for 2 possible states
@@ -137,6 +130,8 @@ type BuildVariantTaskUnit struct {
CronBatchTime string `yaml:"cron,omitempty" bson:"cron,omitempty"`
// If Activate is set to false, then we don't initially activate the task.
Activate *bool `yaml:"activate,omitempty" bson:"activate,omitempty"`
+ // TaskGroup is set if an inline task group is defined on the build variant.
+ TaskGroup *TaskGroup `yaml:"task_group,omitempty" bson:"task_group,omitempty"`
}
func (b BuildVariant) Get(name string) (BuildVariantTaskUnit, error) {
@@ -174,8 +169,14 @@ func (b BuildVariants) Get(name string) (BuildVariant, error) {
}
// Populate updates the base fields of the BuildVariantTaskUnit with
-// fields from the project task definition.
-func (bvt *BuildVariantTaskUnit) Populate(pt ProjectTask) {
+// fields from the project task definition and build variant definition. When
+// there are conflicting settings defined at different levels, the priority of
+// settings are (from highest to lowest):
+// * Task settings within a build variant's list of tasks
+// * Task settings within a task group's list of tasks
+// * Project task's settings
+// * Build variant's settings
+func (bvt *BuildVariantTaskUnit) Populate(pt ProjectTask, bv BuildVariant) {
// We never update "Name" or "Commands"
if len(bvt.DependsOn) == 0 {
bvt.DependsOn = pt.DependsOn
@@ -209,8 +210,49 @@ func (bvt *BuildVariantTaskUnit) Populate(pt ProjectTask) {
bvt.Stepback = pt.Stepback
}
+ // Build variant level settings are lower priority than project task level
+ // settings.
+ if bvt.Patchable == nil {
+ bvt.Patchable = bv.Patchable
+ }
+ if bvt.PatchOnly == nil {
+ bvt.PatchOnly = bv.PatchOnly
+ }
+ if bvt.AllowForGitTag == nil {
+ bvt.AllowForGitTag = bv.AllowForGitTag
+ }
+ if bvt.GitTagOnly == nil {
+ bvt.GitTagOnly = bv.GitTagOnly
+ }
+ if bvt.Disable == nil {
+ bvt.Disable = bv.Disable
+ }
}
+// BuildVariantsByName represents a slice of project config build variants that
+// can be sorted by name.
+type BuildVariantsByName []BuildVariant
+
+func (b BuildVariantsByName) Len() int { return len(b) }
+func (b BuildVariantsByName) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
+func (b BuildVariantsByName) Less(i, j int) bool { return b[i].Name < b[j].Name }
+
+// ProjectTasksByName represents a slice of project config tasks that can be
+// sorted by name.
+type ProjectTasksByName []ProjectTask
+
+func (pt ProjectTasksByName) Len() int { return len(pt) }
+func (pt ProjectTasksByName) Swap(i, j int) { pt[i], pt[j] = pt[j], pt[i] }
+func (pt ProjectTasksByName) Less(i, j int) bool { return pt[i].Name < pt[j].Name }
+
+// TaskGroupsByName represents a slice of project config task grups that can be
+// sorted by name.
+type TaskGroupsByName []TaskGroup
+
+func (tg TaskGroupsByName) Len() int { return len(tg) }
+func (tg TaskGroupsByName) Swap(i, j int) { tg[i], tg[j] = tg[j], tg[i] }
+func (tg TaskGroupsByName) Less(i, j int) bool { return tg[i].Name < tg[j].Name }
+
// UnmarshalYAML allows tasks to be referenced as single selector strings.
// This works by first attempting to unmarshal the YAML into a string
// and then falling back to the BuildVariantTaskUnit struct.
@@ -256,6 +298,7 @@ func (bvt *BuildVariantTaskUnit) SkipOnNonGitTagBuild() bool {
return utility.FromBoolPtr(bvt.GitTagOnly)
}
+// IsDisabled returns whether or not this build variant task is disabled.
func (bvt *BuildVariantTaskUnit) IsDisabled() bool {
return utility.FromBoolPtr(bvt.Disable)
}
@@ -279,9 +322,7 @@ type BuildVariant struct {
DisplayName string `yaml:"display_name,omitempty" bson:"display_name"`
Expansions map[string]string `yaml:"expansions,omitempty" bson:"expansions"`
Modules []string `yaml:"modules,omitempty" bson:"modules"`
- Disabled bool `yaml:"disabled,omitempty" bson:"disabled"`
Tags []string `yaml:"tags,omitempty" bson:"tags"`
- Push bool `yaml:"push,omitempty" bson:"push"`
// Use a *int for 2 possible states
// nil - not overriding the project setting
@@ -291,8 +332,27 @@ type BuildVariant struct {
// with BatchTime and CronBatchTime being mutually exclusive.
CronBatchTime string `yaml:"cron,omitempty" bson:"cron,omitempty"`
- // If Activate is set to false, then we don't initially activate the build variant.
+ // If Activate is set to false, then we don't initially activate the build
+ // variant. By default, the build variant is activated.
Activate *bool `yaml:"activate,omitempty" bson:"activate,omitempty"`
+ // Disable will disable tasks in the build variant, preventing them from
+ // running and omitting them if they're dependencies. By default, the build
+ // variant is not disabled.
+ Disable *bool `yaml:"disable,omitempty" bson:"disable"`
+ // Patchable will prevent tasks in this build variant from running in
+ // patches when set to false. By default, the build variant runs in patches.
+ Patchable *bool `yaml:"patchable,omitempty" bson:"patchable,omitempty"`
+ // PatchOnly will only allow tasks in the build variant to run in patches
+ // when set to true. By default, the build variant runs for non-patches.
+ PatchOnly *bool `yaml:"patch_only,omitempty" bson:"patch_only,omitempty"`
+ // AllowForGitTag will prevent tasks in this build variant from running in
+ // git tag versions when set to false. By default, the build variant runs in
+ // git tag versions.
+ AllowForGitTag *bool `yaml:"allow_for_git_tag,omitempty" bson:"allow_for_git_tag,omitempty"`
+ // GitTagOnly will only allow tasks in the build variant to run in git tag
+ // versions when set to true. By default, the build variant runs in non-git
+ // tag versions.
+ GitTagOnly *bool `yaml:"git_tag_only,omitempty" bson:"git_tag_only,omitempty"`
// Use a *bool so that there are 3 possible states:
// 1. nil = not overriding the project setting (default)
@@ -335,11 +395,12 @@ type ContainerSystem struct {
}
type Module struct {
- Name string `yaml:"name,omitempty" bson:"name"`
- Branch string `yaml:"branch,omitempty" bson:"branch"`
- Repo string `yaml:"repo,omitempty" bson:"repo"`
- Prefix string `yaml:"prefix,omitempty" bson:"prefix"`
- Ref string `yaml:"ref,omitempty" bson:"ref"`
+ Name string `yaml:"name,omitempty" bson:"name"`
+ Branch string `yaml:"branch,omitempty" bson:"branch"`
+ Repo string `yaml:"repo,omitempty" bson:"repo"`
+ Prefix string `yaml:"prefix,omitempty" bson:"prefix"`
+ Ref string `yaml:"ref,omitempty" bson:"ref"`
+ AutoUpdate bool `yaml:"auto_update,omitempty" bson:"auto_update"`
}
type Include struct {
@@ -538,10 +599,11 @@ func (c *YAMLCommandSet) UnmarshalYAML(unmarshal func(interface{}) error) error
// TaskUnitDependency holds configuration information about a task/group that must finish before
// the task/group that contains the dependency can run.
type TaskUnitDependency struct {
- Name string `yaml:"name,omitempty" bson:"name"`
- Variant string `yaml:"variant,omitempty" bson:"variant,omitempty"`
- Status string `yaml:"status,omitempty" bson:"status,omitempty"`
- PatchOptional bool `yaml:"patch_optional,omitempty" bson:"patch_optional,omitempty"`
+ Name string `yaml:"name,omitempty" bson:"name"`
+ Variant string `yaml:"variant,omitempty" bson:"variant,omitempty"`
+ Status string `yaml:"status,omitempty" bson:"status,omitempty"`
+ PatchOptional bool `yaml:"patch_optional,omitempty" bson:"patch_optional,omitempty"`
+ OmitGeneratedTasks bool `yaml:"omit_generated_tasks,omitempty" bson:"omit_generated_tasks,omitempty"`
}
// UnmarshalYAML allows tasks to be referenced as single selector strings.
@@ -833,7 +895,11 @@ func NewTaskIdTable(p *Project, v *Version, sourceRev, defID string) TaskIdConfi
if t.IsDisabled() || t.SkipOnRequester(v.Requester) {
continue
}
- if tg := p.FindTaskGroup(t.Name); tg != nil {
+ tg := t.TaskGroup
+ if tg == nil {
+ tg = p.FindTaskGroup(t.Name)
+ }
+ if tg != nil {
for _, groupTask := range tg.Tasks {
taskId := generateId(groupTask, projectIdentifier, &bv, rev, v)
execTable[TVPair{bv.Name, groupTask}] = util.CleanName(taskId)
@@ -855,7 +921,7 @@ func NewTaskIdTable(p *Project, v *Version, sourceRev, defID string) TaskIdConfi
}
// NewPatchTaskIdTable constructs a new TaskIdTable (map of [variant, task display name]->[task id])
-func NewPatchTaskIdTable(proj *Project, v *Version, tasks TaskVariantPairs, projectIdentifier string) TaskIdConfig {
+func NewPatchTaskIdTable(proj *Project, v *Version, tasks TaskVariantPairs, projectIdentifier string) (TaskIdConfig, error) {
config := TaskIdConfig{ExecutionTasks: TaskIdTable{}, DisplayTasks: TaskIdTable{}}
processedVariants := map[string]bool{}
@@ -864,6 +930,13 @@ func NewPatchTaskIdTable(proj *Project, v *Version, tasks TaskVariantPairs, proj
for _, tg := range proj.TaskGroups {
tgMap[tg.Name] = tg
}
+ for _, variant := range proj.BuildVariants {
+ for _, t := range variant.Tasks {
+ if t.TaskGroup != nil {
+ tgMap[t.Name] = *t.TaskGroup
+ }
+ }
+ }
execTasksWithTaskGroupTasks := TVPairSet{}
for _, vt := range tasks.ExecTasks {
if _, ok := tgMap[vt.TaskName]; ok {
@@ -884,7 +957,11 @@ func NewPatchTaskIdTable(proj *Project, v *Version, tasks TaskVariantPairs, proj
continue
}
processedVariants[vt.Variant] = true
- config.ExecutionTasks = generateIdsForVariant(vt, proj, v, tasks.ExecTasks, config.ExecutionTasks, tgMap, projectIdentifier)
+ execTasks, err := generateIdsForVariant(vt, proj, v, tasks.ExecTasks, config.ExecutionTasks, tgMap, projectIdentifier)
+ if err != nil {
+ return TaskIdConfig{}, errors.Wrapf(err, "generating task IDs for variant '%s'", vt.Variant)
+ }
+ config.ExecutionTasks = execTasks
}
processedVariants = map[string]bool{}
for _, vt := range tasks.DisplayTasks {
@@ -893,13 +970,17 @@ func NewPatchTaskIdTable(proj *Project, v *Version, tasks TaskVariantPairs, proj
continue
}
processedVariants[vt.Variant] = true
- config.DisplayTasks = generateIdsForVariant(vt, proj, v, tasks.DisplayTasks, config.DisplayTasks, tgMap, projectIdentifier)
+ displayTasks, err := generateIdsForVariant(vt, proj, v, tasks.DisplayTasks, config.DisplayTasks, tgMap, projectIdentifier)
+ if err != nil {
+ return TaskIdConfig{}, errors.Wrapf(err, "generating task IDs for variant '%s'", vt.Variant)
+ }
+ config.DisplayTasks = displayTasks
}
- return config
+ return config, nil
}
func generateIdsForVariant(vt TVPair, proj *Project, v *Version, tasks TVPairSet, table TaskIdTable,
- tgMap map[string]TaskGroup, projectIdentifier string) TaskIdTable {
+ tgMap map[string]TaskGroup, projectIdentifier string) (TaskIdTable, error) {
if table == nil {
table = map[TVPair]string{}
}
@@ -907,6 +988,9 @@ func generateIdsForVariant(vt TVPair, proj *Project, v *Version, tasks TVPairSet
// we must track the project's variants definitions as well,
// so that we don't create Ids for variants that don't exist.
projBV := proj.FindBuildVariant(vt.Variant)
+ if projBV == nil {
+ return nil, errors.Errorf("build variant '%s' not found in project", vt.Variant)
+ }
taskNamesForVariant := tasks.TaskNames(vt.Variant)
rev := v.Revision
if evergreen.IsPatchRequester(v.Requester) {
@@ -928,10 +1012,15 @@ func generateIdsForVariant(vt TVPair, proj *Project, v *Version, tasks TVPairSet
}
}
- return table
+ return table, nil
}
+// generateId generates a unique project ID. For tasks created for untracked branches,
+// use owner, repo, and branch in lieu of a user-defined project identifier.
func generateId(name string, projectIdentifier string, projBV *BuildVariant, rev string, v *Version) string {
+ if projectIdentifier == "" {
+ projectIdentifier = fmt.Sprintf("%s_%s_%s", v.Owner, v.Repo, v.Branch)
+ }
return fmt.Sprintf("%s_%s_%s_%s_%s",
projectIdentifier,
projBV.Name,
@@ -952,13 +1041,12 @@ var (
ProjectTasksKey = bsonutil.MustHaveTag(Project{}, "Tasks")
)
+// PopulateExpansions returns expansions for a task, excluding build variant
+// expansions, project variables, and project/version parameters.
func PopulateExpansions(t *task.Task, h *host.Host, oauthToken string) (util.Expansions, error) {
if t == nil {
return nil, errors.New("task cannot be nil")
}
- if h == nil {
- return nil, errors.New("host cannot be nil")
- }
projectRef, err := FindBranchProjectRef(t.Project)
if err != nil {
@@ -975,10 +1063,12 @@ func PopulateExpansions(t *task.Task, h *host.Host, oauthToken string) (util.Exp
expansions.Put("revision", t.Revision)
expansions.Put("github_commit", t.Revision)
expansions.Put(evergreen.GlobalGitHubTokenExpansion, oauthToken)
- expansions.Put("distro_id", h.Distro.Id)
expansions.Put("project", projectRef.Identifier)
expansions.Put("project_identifier", projectRef.Identifier) // TODO: deprecate
expansions.Put("project_id", projectRef.Id)
+ if h != nil {
+ expansions.Put("distro_id", h.Distro.Id)
+ }
if t.ActivatedBy == evergreen.StepbackTaskActivator {
expansions.Put("is_stepback", "true")
}
@@ -1030,7 +1120,7 @@ func PopulateExpansions(t *task.Task, h *host.Host, oauthToken string) (util.Exp
return nil, errors.Wrap(err, "finding version")
}
if v == nil {
- return nil, errors.Wrapf(err, "version '%s' doesn't exist", v.Id)
+ return nil, errors.Errorf("version '%s' not found", t.Version)
}
expansions.Put("branch_name", v.Branch)
@@ -1081,7 +1171,7 @@ func PopulateExpansions(t *task.Task, h *host.Host, oauthToken string) (util.Exp
expansions.Put("commit_message", p.Description)
}
- if v.Requester == evergreen.GithubPRRequester {
+ if p.IsPRMergePatch() || v.Requester == evergreen.GithubPRRequester {
expansions.Put("github_pr_number", fmt.Sprintf("%d", p.GithubPatchData.PRNumber))
expansions.Put("github_org", p.GithubPatchData.BaseOwner)
expansions.Put("github_repo", p.GithubPatchData.BaseRepo)
@@ -1093,29 +1183,15 @@ func PopulateExpansions(t *task.Task, h *host.Host, oauthToken string) (util.Exp
expansions.Put("revision_order_id", strconv.Itoa(v.RevisionOrderNumber))
}
- for _, e := range h.Distro.Expansions {
- expansions.Put(e.Key, e.Value)
+ if h != nil {
+ for _, e := range h.Distro.Expansions {
+ expansions.Put(e.Key, e.Value)
+ }
}
- bvExpansions, err := FindExpansionsForVariant(v, t.BuildVariant)
- if err != nil {
- return nil, errors.Wrap(err, "getting expansions for variant")
- }
- expansions.Update(bvExpansions)
return expansions, nil
}
-// GetSpecForTask returns a ProjectTask spec for the given name.
-// Returns an empty ProjectTask if none exists.
-func (p Project) GetSpecForTask(name string) ProjectTask {
- for _, pt := range p.Tasks {
- if pt.Name == name {
- return pt
- }
- }
- return ProjectTask{}
-}
-
func (p *Project) GetVariantMappings() map[string]string {
mappings := make(map[string]string)
for _, buildVariant := range p.BuildVariants {
@@ -1179,28 +1255,14 @@ func (p *Project) FindTaskGroup(name string) *TaskGroup {
return &tg
}
}
- return nil
-}
-
-// FindContainerFromProject finds the container configuration associated with a given task's Container field.
-func FindContainerFromProject(t task.Task) (*Container, error) {
- v, err := VersionFindOneId(t.Version)
- if err != nil {
- return nil, errors.Wrapf(err, "finding version '%s'", t.Version)
- }
- if v == nil {
- return nil, errors.Errorf("version '%s' not found", t.Version)
- }
- projectInfo, err := LoadProjectForVersion(v, t.Project, false)
- if err != nil {
- return nil, errors.Wrapf(err, "getting project for version '%s'", t.Version)
- }
- for _, container := range projectInfo.Project.Containers {
- if container.Name == t.Container {
- return &container, nil
+ for _, bv := range p.BuildVariants {
+ for _, t := range bv.Tasks {
+ if t.TaskGroup != nil && t.Name == name {
+ return t.TaskGroup
+ }
}
}
- return nil, errors.Errorf("no such container '%s' defined on project '%s'", t.Container, t.Project)
+ return nil
}
func FindProjectFromVersionID(versionStr string) (*Project, error) {
@@ -1212,11 +1274,15 @@ func FindProjectFromVersionID(versionStr string) (*Project, error) {
return nil, errors.Errorf("version '%s' not found", versionStr)
}
- projectInfo, err := LoadProjectForVersion(ver, ver.Identifier, false)
+ ctx, cancel := context.WithTimeout(context.Background(), DefaultParserProjectAccessTimeout)
+ defer cancel()
+ env := evergreen.GetEnvironment()
+
+ project, _, err := FindAndTranslateProjectForVersion(ctx, env.Settings(), ver)
if err != nil {
return nil, errors.Wrapf(err, "loading project config for version '%s'", versionStr)
}
- return projectInfo.Project, nil
+ return project, nil
}
func (p *Project) FindDistroNameForTask(t *task.Task) (string, error) {
@@ -1243,52 +1309,68 @@ func (p *Project) FindDistroNameForTask(t *task.Task) (string, error) {
return distro, nil
}
-func FindLatestVersionWithValidProject(projectId string) (*Version, *Project, error) {
+// FindLatestVersionWithValidProject returns the latest mainline version that
+// has a valid project configuration. It also returns the intermediate and final
+// project configurations.
+func FindLatestVersionWithValidProject(projectId string) (*Version, *Project, *ParserProject, error) {
const retryCount = 5
if projectId == "" {
- return nil, nil, errors.WithStack(errors.New("cannot pass empty projectId to FindLatestVersionWithValidProject"))
- }
- project := &Project{
- Identifier: projectId,
+ return nil, nil, nil, errors.New("cannot pass empty projectId to FindLatestVersionWithValidParserProject")
}
+ var project *Project
+ var pp *ParserProject
+
revisionOrderNum := -1 // only specify in the event of failure
var err error
var lastGoodVersion *Version
+ ctx, cancel := context.WithTimeout(context.Background(), DefaultParserProjectAccessTimeout)
+ defer cancel()
for i := 0; i < retryCount; i++ {
lastGoodVersion, err = FindVersionByLastKnownGoodConfig(projectId, revisionOrderNum)
if err != nil {
- // database error, don't log critical
+ // Database error, don't log critical but try again.
continue
}
- if lastGoodVersion != nil {
- projectInfo, err := LoadProjectForVersion(lastGoodVersion, projectId, true)
- if err != nil {
- grip.Critical(message.WrapError(err, message.Fields{
- "message": "last known good version has malformed config",
- "version": lastGoodVersion.Id,
- "project": projectId,
- }))
- revisionOrderNum = lastGoodVersion.RevisionOrderNumber // look for an older version if the returned version is malformed
- continue
- }
- project = projectInfo.Project
+ if lastGoodVersion == nil {
+ // If we received no version with no error then no reason to keep trying.
+ break
}
- return lastGoodVersion, project, nil
+
+ env := evergreen.GetEnvironment()
+ project, pp, err = FindAndTranslateProjectForVersion(ctx, env.Settings(), lastGoodVersion)
+ if err != nil {
+ grip.Critical(message.WrapError(err, message.Fields{
+ "message": "last known good version has malformed config",
+ "version": lastGoodVersion.Id,
+ "project": projectId,
+ }))
+ revisionOrderNum = lastGoodVersion.RevisionOrderNumber // look for an older version if the returned version is malformed
+ continue
+ }
+ return lastGoodVersion, project, pp, nil
}
if lastGoodVersion == nil {
- return nil, nil, errors.Wrapf(err, "finding a valid version for project '%s'", projectId)
+ return nil, nil, nil, errors.Errorf("did not find valid version for project '%s'", projectId)
}
- return nil, nil, errors.Wrapf(err, "loading project from "+
+ return nil, nil, nil, errors.Wrapf(err, "loading project from "+
"last good version for project '%s'", lastGoodVersion.Identifier)
}
-func (bvt *BuildVariantTaskUnit) HasBatchTime() bool {
- return bvt.CronBatchTime != "" || bvt.BatchTime != nil || bvt.Activate != nil
+// HasSpecificActivation returns if the build variant task specifies an activation condition that
+// overrides the default, such as cron/batchtime, disabling the task, or explicitly activating it.
+func (bvt *BuildVariantTaskUnit) HasSpecificActivation() bool {
+ return bvt.CronBatchTime != "" || bvt.BatchTime != nil || bvt.Activate != nil || bvt.IsDisabled()
}
+// FindTaskForVariant returns the build variant task unit for a matching task or
+// task within a task group. If searching for a task within the task group, the
+// build variant task unit returned will have its fields populated, respecting
+// precedence of settings (such as PatchOnly). Note that for tasks within a task
+// group, the returned result will have the name of the task group it's part of,
+// rather than the name of the task.
func (p *Project) FindTaskForVariant(task, variant string) *BuildVariantTaskUnit {
bv := p.FindBuildVariant(variant)
if bv == nil {
@@ -1299,10 +1381,14 @@ func (p *Project) FindTaskForVariant(task, variant string) *BuildVariantTaskUnit
for _, tg := range p.TaskGroups {
tgMap[tg.Name] = tg
}
+ for _, t := range bv.Tasks {
+ if t.TaskGroup != nil {
+ tgMap[t.Name] = *t.TaskGroup
+ }
+ }
for _, bvt := range bv.Tasks {
if bvt.Name == task {
- bvt.Variant = variant
if projectTask := p.FindProjectTask(task); projectTask != nil {
return &bvt
} else if _, exists := tgMap[task]; exists {
@@ -1312,9 +1398,10 @@ func (p *Project) FindTaskForVariant(task, variant string) *BuildVariantTaskUnit
if tg, ok := tgMap[bvt.Name]; ok {
for _, t := range tg.Tasks {
if t == task {
- bvt.Variant = variant
// task group tasks need to be repopulated from the task list
- bvt.Populate(*p.FindProjectTask(task))
+ // Note that the build variant task unit retains the task
+ // group's name.
+ bvt.Populate(*p.FindProjectTask(task), *bv)
return &bvt
}
}
@@ -1357,7 +1444,10 @@ func (p *Project) findBuildVariantsWithTag(tags []string) []string {
// build variant task unit, and returns the name and tags
func (p *Project) GetTaskNameAndTags(bvt BuildVariantTaskUnit) (string, []string, bool) {
if bvt.IsGroup {
- ptg := p.FindTaskGroup(bvt.Name)
+ ptg := bvt.TaskGroup
+ if ptg == nil {
+ ptg = p.FindTaskGroup(bvt.Name)
+ }
if ptg == nil {
return "", nil, false
}
@@ -1454,11 +1544,10 @@ func (p *Project) FindAllBuildVariantTasks() []BuildVariantTaskUnit {
allBVTs := []BuildVariantTaskUnit{}
for _, b := range p.BuildVariants {
for _, t := range b.Tasks {
- t.Variant = b.Name
if t.IsGroup {
allBVTs = append(allBVTs, p.tasksFromGroup(t)...)
} else {
- t.Populate(tasksByName[t.Name])
+ t.Populate(tasksByName[t.Name], b)
allBVTs = append(allBVTs, t)
}
}
@@ -1469,10 +1558,26 @@ func (p *Project) FindAllBuildVariantTasks() []BuildVariantTaskUnit {
// tasksFromGroup returns a slice of the task group's tasks.
// Settings missing from the group task are populated from the task definition.
func (p *Project) tasksFromGroup(bvTaskGroup BuildVariantTaskUnit) []BuildVariantTaskUnit {
- tg := p.FindTaskGroup(bvTaskGroup.Name)
+ tg := bvTaskGroup.TaskGroup
+ if tg == nil {
+ tg = p.FindTaskGroup(bvTaskGroup.Name)
+ }
if tg == nil {
return nil
}
+ bv := p.FindBuildVariant(bvTaskGroup.Variant)
+ if bv == nil {
+ grip.Alert(message.WrapStack(0, message.Fields{
+ "message": "programmatic error: found a task group that has no associated build variant (this is not supposed to ever happen and is probably a bug)",
+ "task_group": bvTaskGroup.Name,
+ "build_variant": bvTaskGroup.Variant,
+ }))
+ // Continue on error, even though this can result in bugs due to using
+ // an unpopulated build variant. Having a temporary bug is preferable to
+ // exiting early, since exiting can prevent task groups from working
+ // at all.
+ bv = &BuildVariant{}
+ }
tasks := []BuildVariantTaskUnit{}
taskMap := map[string]ProjectTask{}
@@ -1486,8 +1591,9 @@ func (p *Project) tasksFromGroup(bvTaskGroup BuildVariantTaskUnit) []BuildVarian
// IsGroup is not persisted, and indicates here that the
// task is a member of a task group.
IsGroup: true,
- Variant: bvTaskGroup.Variant,
+ TaskGroup: bvTaskGroup.TaskGroup,
GroupName: bvTaskGroup.Name,
+ Variant: bvTaskGroup.Variant,
Patchable: bvTaskGroup.Patchable,
PatchOnly: bvTaskGroup.PatchOnly,
Disable: bvTaskGroup.Disable,
@@ -1502,7 +1608,7 @@ func (p *Project) tasksFromGroup(bvTaskGroup BuildVariantTaskUnit) []BuildVarian
CommitQueueMerge: bvTaskGroup.CommitQueueMerge,
}
// Default to project task settings when unspecified
- bvt.Populate(taskMap[t])
+ bvt.Populate(taskMap[t], *bv)
tasks = append(tasks, bvt)
}
return tasks
@@ -1548,7 +1654,9 @@ func (p *Project) IgnoresAllFiles(files []string) bool {
}
// BuildProjectTVPairs resolves the build variants and tasks into which build
-// variants will run and which tasks will run on each build variant.
+// variants will run and which tasks will run on each build variant. This
+// filters out tasks that cannot run due to being disabled or having an
+// unmatched requester (e.g. a patch-only task for a mainline commit).
func (p *Project) BuildProjectTVPairs(patchDoc *patch.Patch, alias string) {
patchDoc.BuildVariants, patchDoc.Tasks, patchDoc.VariantsTasks = p.ResolvePatchVTs(patchDoc, patchDoc.GetRequester(), alias, true)
}
@@ -1556,7 +1664,9 @@ func (p *Project) BuildProjectTVPairs(patchDoc *patch.Patch, alias string) {
// ResolvePatchVTs resolves a list of build variants and tasks into a list of
// all build variants that will run, a list of all tasks that will run, and a
// mapping of the build variant to the tasks that will run on that build
-// variant. If includeDeps is set, it will also resolve task dependencies.
+// variant. If includeDeps is set, it will also resolve task dependencies. This
+// filters out tasks that cannot run due to being disabled or having an
+// unmatched requester (e.g. a patch-only task for a mainline commit).
func (p *Project) ResolvePatchVTs(patchDoc *patch.Patch, requester, alias string, includeDeps bool) (resolvedBVs []string, resolvedTasks []string, vts []patch.VariantTasks) {
var bvs, bvTags, tasks, taskTags []string
for _, bv := range patchDoc.BuildVariants {
@@ -1579,9 +1689,6 @@ func (p *Project) ResolvePatchVTs(patchDoc *patch.Patch, requester, alias string
if len(bvs) == 1 && bvs[0] == "all" {
bvs = []string{}
for _, bv := range p.BuildVariants {
- if bv.Disabled {
- continue
- }
bvs = append(bvs, bv.Name)
}
} else {
@@ -1605,9 +1712,6 @@ func (p *Project) ResolvePatchVTs(patchDoc *patch.Patch, requester, alias string
if len(tasks) == 1 && tasks[0] == "all" {
tasks = []string{}
for _, t := range p.Tasks {
- if !utility.FromBoolTPtr(t.Patchable) || utility.FromBoolPtr(t.GitTagOnly) {
- continue
- }
tasks = append(tasks, t.Name)
}
} else {
@@ -1631,7 +1735,10 @@ func (p *Project) ResolvePatchVTs(patchDoc *patch.Patch, requester, alias string
var pairs TaskVariantPairs
for _, v := range bvs {
for _, t := range tasks {
- if p.FindTaskForVariant(t, v) != nil {
+ if bvt := p.FindTaskForVariant(t, v); bvt != nil {
+ if bvt.IsDisabled() || bvt.SkipOnRequester(requester) {
+ continue
+ }
pairs.ExecTasks = append(pairs.ExecTasks, TVPair{Variant: v, TaskName: t})
} else if p.GetDisplayTask(v, t) != nil {
pairs.DisplayTasks = append(pairs.DisplayTasks, TVPair{Variant: v, TaskName: t})
@@ -1641,12 +1748,12 @@ func (p *Project) ResolvePatchVTs(patchDoc *patch.Patch, requester, alias string
if alias != "" {
catcher := grip.NewBasicCatcher()
- vars, err := p.findAliasesForPatch(alias, patchDoc)
+ aliases, err := findAliasesForPatch(p.Identifier, alias, patchDoc)
catcher.Wrapf(err, "retrieving alias '%s' for patched project config '%s'", alias, patchDoc.Id.Hex())
var aliasPairs, displayTaskPairs []TVPair
if !catcher.HasErrors() {
- aliasPairs, displayTaskPairs, err = p.BuildProjectTVPairsWithAlias(vars)
+ aliasPairs, displayTaskPairs, err = p.BuildProjectTVPairsWithAlias(aliases, requester)
catcher.Wrap(err, "getting task/variant pairs for alias")
}
grip.Error(message.WrapError(catcher.Resolve(), message.Fields{
@@ -1664,7 +1771,7 @@ func (p *Project) ResolvePatchVTs(patchDoc *patch.Patch, requester, alias string
pairs = p.extractDisplayTasks(pairs)
if includeDeps {
var err error
- pairs.ExecTasks, err = IncludeDependencies(p, pairs.ExecTasks, requester)
+ pairs.ExecTasks, err = IncludeDependencies(p, pairs.ExecTasks, requester, nil)
grip.Warning(message.WrapError(err, message.Fields{
"message": "error including dependencies",
"project": p.Identifier,
@@ -1736,29 +1843,37 @@ func (p *Project) IsGenerateTask(taskName string) bool {
return ok
}
-func (p *Project) findAliasesForPatch(alias string, patchDoc *patch.Patch) ([]ProjectAlias, error) {
- vars, shouldExit, err := FindAliasInProjectOrRepoFromDb(p.Identifier, alias)
+func findAliasesForPatch(projectId, alias string, patchDoc *patch.Patch) ([]ProjectAlias, error) {
+ aliases, err := findAliasInProjectOrRepoFromDb(projectId, alias)
if err != nil {
return nil, errors.Wrap(err, "getting alias from project")
}
- if !shouldExit && len(vars) == 0 {
- if len(patchDoc.PatchedProjectConfig) > 0 {
- projectConfig, err := CreateProjectConfig([]byte(patchDoc.PatchedProjectConfig), p.Identifier)
- if err != nil {
- return nil, errors.Wrap(err, "retrieving aliases from patched config")
- }
- vars, err = findAliasFromProjectConfig(projectConfig, alias)
- if err != nil {
- return nil, errors.Wrapf(err, "retrieving alias '%s' from project config", alias)
- }
- } else {
- vars, err = findMatchingAliasForProjectConfig(p.Identifier, alias)
- if err != nil {
- return nil, errors.Wrapf(err, "retrieving alias '%s' from project config", alias)
- }
+ if len(aliases) > 0 {
+ return aliases, nil
+ }
+ pRef, err := FindMergedProjectRef(projectId, "", false)
+ if err != nil {
+ return nil, errors.Wrap(err, "getting project ref")
+ }
+ if pRef == nil || !pRef.IsVersionControlEnabled() {
+ return aliases, nil
+ }
+ if len(patchDoc.PatchedProjectConfig) > 0 {
+ projectConfig, err := CreateProjectConfig([]byte(patchDoc.PatchedProjectConfig), projectId)
+ if err != nil {
+ return nil, errors.Wrap(err, "retrieving aliases from patched config")
+ }
+ aliases, err = findAliasFromProjectConfig(projectConfig, alias)
+ if err != nil {
+ return nil, errors.Wrapf(err, "retrieving alias '%s' from project config", alias)
+ }
+ } else if patchDoc.Version != "" {
+ aliases, err = getMatchingAliasForVersion(patchDoc.Version, alias)
+ if err != nil {
+ return nil, errors.Wrapf(err, "retrieving alias '%s' from project config", alias)
}
}
- return vars, nil
+ return aliases, nil
}
// extractDisplayTasks adds display tasks and all their execution tasks when
@@ -1819,47 +1934,51 @@ func (p *Project) extractDisplayTasks(pairs TaskVariantPairs) TaskVariantPairs {
}
// BuildProjectTVPairsWithAlias returns variants and tasks for a project alias.
-func (p *Project) BuildProjectTVPairsWithAlias(vars []ProjectAlias) ([]TVPair, []TVPair, error) {
+// This filters out tasks that cannot run due to being disabled or having an
+// unmatched requester (e.g. a patch-only task for a mainline commit).
+func (p *Project) BuildProjectTVPairsWithAlias(aliases []ProjectAlias, requester string) ([]TVPair, []TVPair, error) {
pairs := []TVPair{}
displayTaskPairs := []TVPair{}
- for _, v := range vars {
+ for _, alias := range aliases {
var variantRegex *regexp.Regexp
- variantRegex, err := regexp.Compile(v.Variant)
+ variantRegex, err := alias.getVariantRegex()
if err != nil {
- return nil, nil, errors.Wrapf(err, "compiling regex '%s'", v.Variant)
+ return nil, nil, err
}
var taskRegex *regexp.Regexp
- taskRegex, err = regexp.Compile(v.Task)
+ taskRegex, err = alias.getTaskRegex()
if err != nil {
- return nil, nil, errors.Wrapf(err, "compiling regex '%s'", v.Task)
+ return nil, nil, err
}
for _, variant := range p.BuildVariants {
- if isValidRegexOrTag(variant.Name, v.Variant, variant.Tags, v.VariantTags, variantRegex) {
- for _, task := range p.Tasks {
- if task.Patchable != nil && !(*task.Patchable) {
- continue
- }
- if !isValidRegexOrTag(task.Name, v.Task, task.Tags, v.TaskTags, taskRegex) {
- continue
- }
-
- if p.FindTaskForVariant(task.Name, variant.Name) != nil {
- pairs = append(pairs, TVPair{variant.Name, task.Name})
- }
- }
+ if !isValidRegexOrTag(variant.Name, variant.Tags, alias.VariantTags, variantRegex) {
+ continue
+ }
- if v.Task == "" {
+ for _, t := range p.Tasks {
+ if !isValidRegexOrTag(t.Name, t.Tags, alias.TaskTags, taskRegex) {
continue
}
- for _, displayTask := range variant.DisplayTasks {
- if !taskRegex.MatchString(displayTask.Name) {
+
+ if bvtu := p.FindTaskForVariant(t.Name, variant.Name); bvtu != nil {
+ if bvtu.IsDisabled() || bvtu.SkipOnRequester(requester) {
continue
}
- displayTaskPairs = append(displayTaskPairs, TVPair{variant.Name, displayTask.Name})
+ pairs = append(pairs, TVPair{variant.Name, t.Name})
}
}
+
+ if taskRegex == nil {
+ continue
+ }
+ for _, displayTask := range variant.DisplayTasks {
+ if !taskRegex.MatchString(displayTask.Name) {
+ continue
+ }
+ displayTaskPairs = append(displayTaskPairs, TVPair{variant.Name, displayTask.Name})
+ }
}
}
@@ -1884,12 +2003,12 @@ func (p *Project) VariantTasksForSelectors(definitions []patch.PatchTriggerDefin
var err error
pairs := TaskVariantPairs{}
- pairs.ExecTasks, pairs.DisplayTasks, err = p.BuildProjectTVPairsWithAlias(projectAliases)
+ pairs.ExecTasks, pairs.DisplayTasks, err = p.BuildProjectTVPairsWithAlias(projectAliases, requester)
if err != nil {
return nil, errors.Wrap(err, "getting pairs matching patch aliases")
}
pairs = p.extractDisplayTasks(pairs)
- pairs.ExecTasks, err = IncludeDependencies(p, pairs.ExecTasks, requester)
+ pairs.ExecTasks, err = IncludeDependencies(p, pairs.ExecTasks, requester, nil)
grip.Warning(message.WrapError(err, message.Fields{
"message": "error including dependencies",
"project": p.Identifier,
@@ -2074,11 +2193,11 @@ type VariantsAndTasksFromProject struct {
Project Project
}
-// GetVariantsAndTasksFromProject formats variants and tasks as used by the UI pages.
-func GetVariantsAndTasksFromProject(ctx context.Context, patchedConfig, patchProject string) (*VariantsAndTasksFromProject, error) {
- project := &Project{}
- if _, err := LoadProjectInto(ctx, []byte(patchedConfig), nil, patchProject, project); err != nil {
- return nil, errors.Wrap(err, "unmarshalling project config")
+// GetVariantsAndTasksFromPatchProject formats variants and tasks as used by the UI pages.
+func GetVariantsAndTasksFromPatchProject(ctx context.Context, settings *evergreen.Settings, p *patch.Patch) (*VariantsAndTasksFromProject, error) {
+ project, _, err := FindAndTranslateProjectForPatch(ctx, settings, p)
+ if err != nil {
+ return nil, errors.Wrap(err, "finding and translating project")
}
// retrieve tasks and variant mappings' names
diff --git a/model/project_aliases.go b/model/project_aliases.go
index a972af1163b..770616da0f3 100644
--- a/model/project_aliases.go
+++ b/model/project_aliases.go
@@ -8,9 +8,11 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/utility"
"github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson"
)
@@ -24,6 +26,7 @@ var (
variantKey = bsonutil.MustHaveTag(ProjectAlias{}, "Variant")
descriptionKey = bsonutil.MustHaveTag(ProjectAlias{}, "Description")
taskKey = bsonutil.MustHaveTag(ProjectAlias{}, "Task")
+ parametersKey = bsonutil.MustHaveTag(ProjectAlias{}, "Parameters")
variantTagsKey = bsonutil.MustHaveTag(ProjectAlias{}, "VariantTags")
taskTagsKey = bsonutil.MustHaveTag(ProjectAlias{}, "TaskTags")
)
@@ -54,22 +57,37 @@ const (
// "linux"; and to run all tasks beginning with the string "compile" to run on all
// variants beginning with the string "ubuntu1604".
+// For regular patch aliases, the Alias field is required to be a custom string defined by the user.
+// For all other special alias types (commit queue, github PR, etc) the Alias field must match its associated
+// constant in globals.go, i.e. evergreen.GithubPRAlias. For aliases defined within a project's config YAML
+// the Alias field for non-patch aliases is not-required since it will be inferred and assigned at runtime.
+
// Git tags use a special alias "__git_tag" and create a new version for the matching
// variants/tasks, assuming the tag matches the defined git_tag regex.
// In this way, users can define different behavior for different kind of tags.
type ProjectAlias struct {
- ID mgobson.ObjectId `bson:"_id,omitempty" json:"_id" yaml:"id"`
- ProjectID string `bson:"project_id" json:"project_id" yaml:"project_id"`
- Alias string `bson:"alias" json:"alias" yaml:"alias"`
- Variant string `bson:"variant,omitempty" json:"variant" yaml:"variant"`
- Description string `bson:"description" json:"description" yaml:"description"`
- GitTag string `bson:"git_tag" json:"git_tag" yaml:"git_tag"`
- RemotePath string `bson:"remote_path" json:"remote_path" yaml:"remote_path"`
- VariantTags []string `bson:"variant_tags,omitempty" json:"variant_tags" yaml:"variant_tags"`
- Task string `bson:"task,omitempty" json:"task" yaml:"task"`
- TaskTags []string `bson:"tags,omitempty" json:"tags" yaml:"task_tags"`
+ ID mgobson.ObjectId `bson:"_id,omitempty" json:"_id" yaml:"id"`
+ ProjectID string `bson:"project_id" json:"project_id" yaml:"project_id"`
+ Alias string `bson:"alias" json:"alias" yaml:"alias"`
+ Variant string `bson:"variant,omitempty" json:"variant" yaml:"variant"`
+ Description string `bson:"description" json:"description" yaml:"description"`
+ GitTag string `bson:"git_tag" json:"git_tag" yaml:"git_tag"`
+ RemotePath string `bson:"remote_path" json:"remote_path" yaml:"remote_path"`
+ VariantTags []string `bson:"variant_tags,omitempty" json:"variant_tags" yaml:"variant_tags"`
+ Task string `bson:"task,omitempty" json:"task" yaml:"task"`
+ TaskTags []string `bson:"tags,omitempty" json:"tags" yaml:"task_tags"`
+ Parameters []patch.Parameter `bson:"parameters,omitempty" json:"parameters" yaml:"parameters"`
+
+ // Source is not stored; indicates where the alias is stored for the project.
+ Source string `bson:"-" json:"-" yaml:"-"`
}
+const (
+ AliasSourceProject = "project"
+ AliasSourceConfig = "config"
+ AliasSourceRepo = "repo"
+)
+
type ProjectAliases []ProjectAlias
// FindAliasesForProjectFromDb fetches all aliases for a given project without merging with aliases from the parser project
@@ -85,15 +103,23 @@ func FindAliasesForProjectFromDb(projectID string) ([]ProjectAlias, error) {
return out, nil
}
-// MergeAliasesWithProjectConfig returns a merged list of project aliases that includes the merged result of aliases defined
+// GetAliasesMergedWithProjectConfig returns a merged list of project aliases that includes the merged result of aliases defined
// on the project ref and aliases defined in the project YAML. Aliases defined on the project ref will take precedence over the
// project YAML in the case that both are defined.
-func MergeAliasesWithProjectConfig(projectID string, dbAliases []ProjectAlias) ([]ProjectAlias, error) {
- dbAliasMap := aliasesToMap(dbAliases)
- projectConfig, err := FindProjectConfigForProjectOrVersion(projectID, "")
+func GetAliasesMergedWithProjectConfig(projectID string, dbAliases []ProjectAlias) ([]ProjectAlias, error) {
+ projectConfig, err := FindLastKnownGoodProjectConfig(projectID)
if err != nil {
return nil, errors.Wrap(err, "finding project config")
}
+ return mergeProjectConfigAndAliases(projectConfig, dbAliases), nil
+}
+
+func mergeProjectConfigAndAliases(projectConfig *ProjectConfig, dbAliases []ProjectAlias) []ProjectAlias {
+ if projectConfig == nil {
+ return dbAliases
+ }
+ dbAliasMap := aliasesToMap(dbAliases)
+
patchAliases := []ProjectAlias{}
for alias, aliases := range dbAliasMap {
if IsPatchAlias(alias) {
@@ -123,7 +149,7 @@ func MergeAliasesWithProjectConfig(projectID string, dbAliases []ProjectAlias) (
mergedAliases = append(mergedAliases, dbAliasMap[evergreen.GitTagAlias]...)
mergedAliases = append(mergedAliases, dbAliasMap[evergreen.GithubPRAlias]...)
mergedAliases = append(mergedAliases, patchAliases...)
- return mergedAliases, nil
+ return mergedAliases
}
// FindAliasesForRepo fetches all aliases for a given project
@@ -157,9 +183,7 @@ func findMatchingAliasForRepo(repoID, alias string) ([]ProjectAlias, error) {
// findMatchingAliasForProjectRef finds all aliases with a given name for a project.
// Typically FindAliasInProjectRepoOrConfig should be used.
-// Returns true if we have an alias match or the alias doesn't match but
-// other aliases in the category are defined, in which case we shouldn't check other sources.
-func findMatchingAliasForProjectRef(projectID, alias string) ([]ProjectAlias, bool, error) {
+func findMatchingAliasForProjectRef(projectID, alias string) ([]ProjectAlias, error) {
var out []ProjectAlias
q := db.Query(bson.M{
projectIDKey: projectID,
@@ -167,23 +191,15 @@ func findMatchingAliasForProjectRef(projectID, alias string) ([]ProjectAlias, bo
})
err := db.FindAllQ(ProjectAliasCollection, q, &out)
if err != nil {
- return nil, false, errors.Wrap(err, "finding project aliases")
+ return nil, errors.Wrap(err, "finding project aliases")
}
- if len(out) == 0 && IsPatchAlias(alias) {
- // return true if any patch aliases are defined
- numPatchAliases, err := countPatchAliases(projectID)
- if err != nil {
- return nil, false, errors.Wrap(err, "counting patch aliases")
- }
- return nil, numPatchAliases > 0, nil
- }
- return out, len(out) > 0, nil
+ return out, nil
}
-// findMatchingAliasForProjectConfig finds any aliases matching the alias input in the project config.
-func findMatchingAliasForProjectConfig(projectID, alias string) ([]ProjectAlias, error) {
- projectConfig, err := FindProjectConfigForProjectOrVersion(projectID, "")
+// getMatchingAliasForVersion finds any aliases matching the alias input in the project config.
+func getMatchingAliasForVersion(versionID, alias string) ([]ProjectAlias, error) {
+ projectConfig, err := FindProjectConfigById(versionID)
if err != nil {
return nil, errors.Wrap(err, "finding project config")
}
@@ -195,17 +211,11 @@ func findMatchingAliasForProjectConfig(projectID, alias string) ([]ProjectAlias,
}
func findAliasFromProjectConfig(projectConfig *ProjectConfig, alias string) ([]ProjectAlias, error) {
- projectConfigAliases := aliasesToMap(getFullProjectConfigAliases(projectConfig))
+ projectConfig.SetInternalAliases()
+ projectConfigAliases := aliasesToMap(projectConfig.AllAliases())
return projectConfigAliases[alias], nil
}
-func countPatchAliases(projectID string) (int, error) {
- return db.Count(ProjectAliasCollection, bson.M{
- projectIDKey: projectID,
- aliasKey: bson.M{"$nin": evergreen.InternalAliases},
- })
-}
-
func aliasesToMap(aliases []ProjectAlias) map[string][]ProjectAlias {
output := make(map[string][]ProjectAlias)
for _, alias := range aliases {
@@ -214,101 +224,145 @@ func aliasesToMap(aliases []ProjectAlias) map[string][]ProjectAlias {
return output
}
-func getFullProjectConfigAliases(projectConfig *ProjectConfig) []ProjectAlias {
- var projectConfigAliases []ProjectAlias
- if projectConfig != nil {
- for _, commitQueueAlias := range projectConfig.CommitQueueAliases {
- commitQueueAlias.Alias = evergreen.CommitQueueAlias
- projectConfigAliases = append(projectConfigAliases, commitQueueAlias)
- }
- for _, gitTagAlias := range projectConfig.GitTagAliases {
- gitTagAlias.Alias = evergreen.GitTagAlias
- projectConfigAliases = append(projectConfigAliases, gitTagAlias)
- }
- for _, githubPrAlias := range projectConfig.GitHubPRAliases {
- githubPrAlias.Alias = evergreen.GithubPRAlias
- projectConfigAliases = append(projectConfigAliases, githubPrAlias)
- }
- for _, gitHubCheckAlias := range projectConfig.GitHubChecksAliases {
- gitHubCheckAlias.Alias = evergreen.GithubChecksAlias
- projectConfigAliases = append(projectConfigAliases, gitHubCheckAlias)
- }
- projectConfigAliases = append(projectConfigAliases, projectConfig.PatchAliases...)
+func aliasesFromMap(input map[string]ProjectAliases) []ProjectAlias {
+ output := []ProjectAlias{}
+ for _, aliases := range input {
+ output = append(output, aliases...)
}
- return projectConfigAliases
+ return output
}
// FindAliasInProjectRepoOrConfig finds all aliases with a given name for a project.
// If the project has no aliases, the repo is checked for aliases.
func FindAliasInProjectRepoOrConfig(projectID, alias string) ([]ProjectAlias, error) {
- aliases, shouldExit, err := FindAliasInProjectOrRepoFromDb(projectID, alias)
+ aliases, err := findAliasInProjectOrRepoFromDb(projectID, alias)
if err != nil {
return nil, errors.Wrap(err, "checking for existing aliases")
}
- // If nothing is defined in the DB, check the project config,
- // unless the alias defined is a patch alias and there are patch aliases
- // defined on the project page.
- if len(aliases) > 0 || shouldExit {
+ // If nothing is defined in the DB, check the project config.
+ if len(aliases) > 0 {
return aliases, nil
}
- return findMatchingAliasForProjectConfig(projectID, alias)
+ return getMatchingAliasForVersion(projectID, alias)
+}
+
+// patchAliasKey is used internally to group patch aliases together.
+const patchAliasKey = "patch_alias"
+
+// ConstructMergedAliasesByPrecedence will construct a merged list of aliases based on what aliases
+// are found at the project level, repo level, and project config level.
+func ConstructMergedAliasesByPrecedence(projectRef *ProjectRef, projectConfig *ProjectConfig, repoId string) ([]ProjectAlias, error) {
+ var projectAliases []ProjectAlias
+ var err error
+ if projectRef != nil {
+ projectAliases, err = FindAliasesForProjectFromDb(projectRef.Id)
+ if err != nil {
+ return nil, errors.Wrap(err, "finding project aliases")
+ }
+ }
+ aliasesToReturn := map[string]ProjectAliases{}
+ for _, alias := range projectAliases {
+ aliasName := alias.Alias
+ if IsPatchAlias(aliasName) {
+ aliasName = patchAliasKey
+ }
+ alias.Source = AliasSourceProject
+ aliasesToReturn[aliasName] = append(aliasesToReturn[aliasName], alias)
+ }
+ // If all aliases are covered in the project, so there's no reason to look at other sources
+ uncoveredAliases := uncoveredAliasTypes(aliasesToReturn)
+ if len(uncoveredAliases) > 0 && repoId != "" {
+ // Get repo aliases and merge with project aliases
+ repoAliases, err := FindAliasesForRepo(repoId)
+ if err != nil {
+ return nil, errors.Wrap(err, "finding repo aliases")
+ }
+ for _, alias := range repoAliases {
+ aliasName := alias.Alias
+ if IsPatchAlias(aliasName) {
+ aliasName = patchAliasKey
+ }
+ if !utility.StringSliceContains(uncoveredAliases, aliasName) { // Only add alias if there aren't project aliases
+ continue
+ }
+ alias.Source = AliasSourceRepo
+ aliasesToReturn[aliasName] = append(aliasesToReturn[aliasName], alias)
+ }
+ // If all aliases covered in project/repo, then no reason to look at config
+ uncoveredAliases = uncoveredAliasTypes(aliasesToReturn)
+ }
+ res := aliasesFromMap(aliasesToReturn)
+ if len(uncoveredAliases) > 0 && projectRef != nil && projectRef.IsVersionControlEnabled() {
+ mergedAliases := mergeProjectConfigAndAliases(projectConfig, res)
+ // If we've added any new aliases, ensure they're given the config source
+ if len(mergedAliases) > len(res) {
+ for i, a := range mergedAliases {
+ if a.Source == "" {
+ mergedAliases[i].Source = AliasSourceConfig
+ }
+ }
+ }
+ return mergedAliases, nil
+ }
+ return res, nil
+}
+
+// uncoveredAliasTypes returns a list of alias types that aren't populated keys in the given map.
+func uncoveredAliasTypes(aliases map[string]ProjectAliases) []string {
+ res := []string{}
+ aliasesToCheck := append(evergreen.InternalAliases, patchAliasKey)
+ for _, name := range aliasesToCheck {
+ if len(aliases[name]) == 0 {
+ res = append(res, name)
+ }
+ }
+ return res
}
-// FindAliasInProjectRepoOrPatchedConfig finds all aliases with a given name for a project.
+// FindAliasInProjectRepoOrProjectConfig finds all aliases with a given name for a project.
// If the project has no aliases, the patched config string is checked for the alias as well.
-func FindAliasInProjectRepoOrPatchedConfig(projectID, alias, patchedConfig string) ([]ProjectAlias, error) {
- aliases, shouldExit, err := FindAliasInProjectOrRepoFromDb(projectID, alias)
+func FindAliasInProjectRepoOrProjectConfig(projectID, alias string, projectConfig *ProjectConfig) ([]ProjectAlias, error) {
+ aliases, err := findAliasInProjectOrRepoFromDb(projectID, alias)
if err != nil {
return nil, errors.Wrap(err, "checking for existing aliases")
}
- if len(aliases) > 0 || shouldExit || patchedConfig == "" {
+ if len(aliases) > 0 || projectConfig == nil {
return aliases, nil
}
- projectConfig, err := CreateProjectConfig([]byte(patchedConfig), "")
- if err != nil {
- return nil, errors.Wrap(err, "creating project config from patch")
- }
+
return findAliasFromProjectConfig(projectConfig, alias)
}
-// FindAliasInProjectOrRepoFromDb finds all aliases with a given name for a project without merging with parser project.
+// findAliasInProjectOrRepoFromDb finds all aliases with a given name for a project without merging with parser project.
// If the project has no aliases, the repo is checked for aliases.
-func FindAliasInProjectOrRepoFromDb(projectID, alias string) ([]ProjectAlias, bool, error) {
- aliases, shouldExit, err := findMatchingAliasForProjectRef(projectID, alias)
+func findAliasInProjectOrRepoFromDb(projectID, alias string) ([]ProjectAlias, error) {
+ aliases, err := findMatchingAliasForProjectRef(projectID, alias)
if err != nil {
- return aliases, false, errors.Wrapf(err, "finding aliases for project ref '%s'", projectID)
+ return aliases, errors.Wrapf(err, "finding aliases for project ref '%s'", projectID)
}
- if shouldExit {
- return aliases, true, nil
+ if len(aliases) > 0 {
+ return aliases, nil
}
return tryGetRepoAliases(projectID, alias, aliases)
}
-func tryGetRepoAliases(projectID string, alias string, aliases []ProjectAlias) ([]ProjectAlias, bool, error) {
+func tryGetRepoAliases(projectID string, alias string, aliases []ProjectAlias) ([]ProjectAlias, error) {
project, err := FindBranchProjectRef(projectID)
if err != nil {
- return aliases, false, errors.Wrapf(err, "finding project '%s'", projectID)
+ return aliases, errors.Wrapf(err, "finding project '%s'", projectID)
}
if project == nil {
- return aliases, false, errors.Errorf("project '%s' does not exist", projectID)
+ return aliases, errors.Errorf("project '%s' does not exist", projectID)
}
if !project.UseRepoSettings() {
- return aliases, false, nil
+ return aliases, nil
}
aliases, err = findMatchingAliasForRepo(project.RepoRefId, alias)
if err != nil {
- return aliases, false, errors.Wrapf(err, "finding aliases for repo '%s'", project.RepoRefId)
+ return aliases, errors.Wrapf(err, "finding aliases for repo '%s'", project.RepoRefId)
}
- shouldExit := false
- if IsPatchAlias(alias) {
- numRepoPatchAliases, err := countPatchAliases(project.RepoRefId)
- if err != nil {
- return nil, false, errors.Wrap(err, "counting patch aliases")
- }
- shouldExit = numRepoPatchAliases > 0
- }
- return aliases, shouldExit, nil
+ return aliases, nil
}
// HasMatchingGitTagAliasAndRemotePath returns matching git tag aliases that match the given git tag
@@ -380,6 +434,7 @@ func (p *ProjectAlias) Upsert() error {
variantTagsKey: p.VariantTags,
taskTagsKey: p.TaskTags,
taskKey: p.Task,
+ parametersKey: p.Parameters,
}
_, err := db.Upsert(ProjectAliasCollection, bson.M{
@@ -400,6 +455,10 @@ func UpsertAliasesForProject(aliases []ProjectAlias, projectId string) error {
}
catcher.Add(aliases[i].Upsert())
}
+ grip.Debug(message.WrapError(catcher.Resolve(), message.Fields{
+ "message": "problem getting aliases",
+ "project_id": projectId,
+ }))
return catcher.Resolve()
}
@@ -431,11 +490,11 @@ func (a ProjectAliases) HasMatchingGitTag(tag string) (bool, error) {
func aliasesMatchingGitTag(a ProjectAliases, tag string) (ProjectAliases, error) {
res := []ProjectAlias{}
for _, alias := range a {
- gitTagRegex, err := regexp.Compile(alias.GitTag)
+ gitTagRegex, err := alias.getGitTagRegex()
if err != nil {
- return nil, errors.Wrapf(err, "compiling git tag regex '%s'", alias.GitTag)
+ return nil, err
}
- if isValidRegexOrTag(tag, alias.GitTag, nil, nil, gitTagRegex) {
+ if isValidRegexOrTag(tag, nil, nil, gitTagRegex) {
res = append(res, alias)
}
}
@@ -445,47 +504,96 @@ func aliasesMatchingGitTag(a ProjectAliases, tag string) (ProjectAliases, error)
func (a ProjectAliases) AliasesMatchingVariant(variant string, variantTags []string) (ProjectAliases, error) {
res := []ProjectAlias{}
for _, alias := range a {
- variantRegex, err := regexp.Compile(alias.Variant)
+ hasMatch, err := alias.HasMatchingVariant(variant, variantTags)
if err != nil {
- return nil, errors.Wrapf(err, "compiling variant regex '%s'", alias.Variant)
+ return nil, err
}
- if isValidRegexOrTag(variant, alias.Variant, variantTags, alias.VariantTags, variantRegex) {
+ if hasMatch {
res = append(res, alias)
}
}
return res, nil
}
+func (a ProjectAlias) HasMatchingVariant(variant string, variantTags []string) (bool, error) {
+ variantRegex, err := a.getVariantRegex()
+ if err != nil {
+ return false, err
+ }
+ return isValidRegexOrTag(variant, variantTags, a.VariantTags, variantRegex), nil
+}
+
+func (a *ProjectAlias) getVariantRegex() (*regexp.Regexp, error) {
+ if a.Variant == "" {
+ return nil, nil
+ }
+ variantRegex, err := regexp.Compile(a.Variant)
+ if err != nil {
+ return nil, errors.Wrapf(err, "compiling variant regex '%s'", a.Variant)
+ }
+ return variantRegex, nil
+}
+
+func (a *ProjectAlias) getTaskRegex() (*regexp.Regexp, error) {
+ if a.Task == "" {
+ return nil, nil
+ }
+ taskRegex, err := regexp.Compile(a.Task)
+ if err != nil {
+ return nil, errors.Wrapf(err, "compiling task regex '%s'", a.Task)
+ }
+ return taskRegex, nil
+}
+
+func (a *ProjectAlias) getGitTagRegex() (*regexp.Regexp, error) {
+ if a.GitTag == "" {
+ return nil, nil
+ }
+ gitTagRegex, err := regexp.Compile(a.GitTag)
+ if err != nil {
+ return nil, errors.Wrapf(err, "compiling git tag regex '%s'", a.GitTag)
+ }
+ return gitTagRegex, nil
+}
+
// HasMatchingTask assumes that the aliases given already match the preferred variant.
func (a ProjectAliases) HasMatchingTask(taskName string, taskTags []string) (bool, error) {
for _, alias := range a {
- taskRegex, err := regexp.Compile(alias.Task)
+ hasMatch, err := alias.HasMatchingTask(taskName, taskTags)
if err != nil {
- return false, errors.Wrapf(err, "compiling task regex '%s'", alias.Task)
+ return false, err
}
- if isValidRegexOrTag(taskName, alias.Task, taskTags, alias.TaskTags, taskRegex) {
+ if hasMatch {
return true, nil
}
}
return false, nil
}
-func isValidRegexOrTag(curItem, aliasRegex string, curTags, aliasTags []string, regexp *regexp.Regexp) bool {
- isValidRegex := aliasRegex != "" && regexp.MatchString(curItem)
- isValidTag := false
+func (a ProjectAlias) HasMatchingTask(taskName string, taskTags []string) (bool, error) {
+ taskRegex, err := a.getTaskRegex()
+ if err != nil {
+ return false, err
+ }
+
+ return isValidRegexOrTag(taskName, taskTags, a.TaskTags, taskRegex), nil
+}
+
+// isValidRegexOrTag returns true if the item/tag matches the alias tag/regex.
+func isValidRegexOrTag(curItem string, curTags, aliasTags []string, aliasRegex *regexp.Regexp) bool {
+ if aliasRegex != nil && aliasRegex.MatchString(curItem) {
+ return true
+ }
for _, tag := range aliasTags {
if utility.StringSliceContains(curTags, tag) {
- isValidTag = true
- break
+ return true
}
// a negated tag
if len(tag) > 0 && tag[0] == '!' && !utility.StringSliceContains(curTags, tag[1:]) {
- isValidTag = true
- break
+ return true
}
}
-
- return isValidRegex || isValidTag
+ return false
}
func ValidateProjectAliases(aliases []ProjectAlias, aliasType string) []string {
@@ -516,10 +624,10 @@ func validateAliasPatchDefinition(pd ProjectAlias, aliasType string, lineNum int
errs = append(errs, fmt.Sprintf("%s: must specify exactly one of task regex or task tags on line #%d", aliasType, lineNum))
}
- if _, err := regexp.Compile(pd.Variant); err != nil {
+ if _, err := pd.getVariantRegex(); err != nil {
errs = append(errs, fmt.Sprintf("%s: variant regex #%d is invalid", aliasType, lineNum))
}
- if _, err := regexp.Compile(pd.Task); err != nil {
+ if _, err := pd.getTaskRegex(); err != nil {
errs = append(errs, fmt.Sprintf("%s: task regex #%d is invalid", aliasType, lineNum))
}
return errs
@@ -530,7 +638,7 @@ func validateGitTagAlias(pd ProjectAlias, aliasType string, lineNum int) []strin
if strings.TrimSpace(pd.GitTag) == "" {
errs = append(errs, fmt.Sprintf("%s: must define valid git tag regex on line #%d", aliasType, lineNum))
}
- if _, err := regexp.Compile(pd.GitTag); err != nil {
+ if _, err := pd.getGitTagRegex(); err != nil {
errs = append(errs, fmt.Sprintf("%s: git tag regex #%d is invalid", aliasType, lineNum))
}
// if path is defined then no patch definition can be given
diff --git a/model/project_aliases_test.go b/model/project_aliases_test.go
index 2c808b1280b..e4d022ac2bc 100644
--- a/model/project_aliases_test.go
+++ b/model/project_aliases_test.go
@@ -7,7 +7,9 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/utility"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"go.mongodb.org/mongo-driver/bson"
)
@@ -27,10 +29,11 @@ func (s *ProjectAliasSuite) SetupTest() {
s.aliases = []ProjectAlias{}
for i := 0; i < 10; i++ {
s.aliases = append(s.aliases, ProjectAlias{
- ProjectID: fmt.Sprintf("project-%d", i),
- Alias: fmt.Sprintf("alias-%d", i),
- Variant: fmt.Sprintf("variant-%d", i),
- Task: fmt.Sprintf("task-%d", i),
+ ProjectID: fmt.Sprintf("project-%d", i),
+ Alias: fmt.Sprintf("alias-%d", i),
+ Variant: fmt.Sprintf("variant-%d", i),
+ Task: fmt.Sprintf("task-%d", i),
+ Description: fmt.Sprintf("description-%d", i),
})
}
}
@@ -48,6 +51,7 @@ func (s *ProjectAliasSuite) TestInsertTaskAndVariantWithNoTags() {
s.Equal(a.Alias, out.Alias)
s.Equal(a.Variant, out.Variant)
s.Equal(a.Task, out.Task)
+ s.Equal(a.Description, out.Description)
}
}
@@ -70,6 +74,7 @@ func (s *ProjectAliasSuite) TestInsertTagsAndNoTask() {
s.Empty(out.VariantTags)
s.Equal("", out.Task)
s.Equal(tags, out.TaskTags)
+ s.Equal(a.Description, out.Description)
}
}
@@ -138,6 +143,7 @@ func (s *ProjectAliasSuite) TestInsertTagsAndNoVariant() {
s.Empty(out.TaskTags)
s.Equal("", out.Variant)
s.Equal(tags, out.VariantTags)
+ s.Equal(a.Description, out.Description)
}
}
@@ -201,17 +207,17 @@ func (s *ProjectAliasSuite) TestFindAliasInProject() {
s.NoError(a2.Upsert())
s.NoError(a3.Upsert())
- found, shouldExit, err := findMatchingAliasForProjectRef("project-1", "alias-1")
+ found, err := findMatchingAliasForProjectRef("project-1", "alias-1")
s.NoError(err)
- s.True(shouldExit)
s.Len(found, 2)
}
-func (s *ProjectAliasSuite) TestMergeAliasesWithProjectConfig() {
+func (s *ProjectAliasSuite) TestFindAliasInProjectOrConfig() {
s.Require().NoError(db.ClearCollections(ProjectAliasCollection, ProjectConfigCollection, ProjectRefCollection))
pRef := ProjectRef{
- Id: "project-1",
- RepoRefId: "r1",
+ Id: "project-1",
+ RepoRefId: "r1",
+ VersionControlEnabled: utility.TruePtr(),
}
s.NoError(pRef.Upsert())
a1 := ProjectAlias{
@@ -230,10 +236,16 @@ func (s *ProjectAliasSuite) TestMergeAliasesWithProjectConfig() {
ProjectID: "project-1",
Alias: "alias-0",
}
+ duplicateAlias := ProjectAlias{
+ ProjectID: "project-1",
+ Alias: "duplicate",
+ Description: "from UI",
+ }
s.NoError(a1.Upsert())
s.NoError(a2.Upsert())
s.NoError(a3.Upsert())
s.NoError(patchAlias.Upsert())
+ s.NoError(duplicateAlias.Upsert())
projectConfig := &ProjectConfig{
Id: "project-1",
@@ -241,14 +253,17 @@ func (s *ProjectAliasSuite) TestMergeAliasesWithProjectConfig() {
ProjectConfigFields: ProjectConfigFields{
PatchAliases: []ProjectAlias{
{
- ID: mgobson.NewObjectId(),
- ProjectID: "project-1",
- Alias: "alias-2",
+ ID: mgobson.NewObjectId(),
+ Alias: "alias-2",
},
{
- ID: mgobson.NewObjectId(),
- ProjectID: "project-1",
- Alias: "alias-1",
+ ID: mgobson.NewObjectId(),
+ Alias: "alias-1",
+ },
+ {
+ ID: mgobson.NewObjectId(),
+ Alias: "duplicate",
+ Description: "from project config",
},
},
CommitQueueAliases: []ProjectAlias{
@@ -281,32 +296,136 @@ func (s *ProjectAliasSuite) TestMergeAliasesWithProjectConfig() {
projectAliases, err = FindAliasInProjectRepoOrConfig("project-1", "alias-0")
s.NoError(err)
s.Len(projectAliases, 1)
-
- projectAliases, err = FindAliasInProjectRepoOrConfig("project-1", "alias-2")
+ projectAliases, err = FindAliasInProjectRepoOrConfig("project-1", "alias-1")
s.NoError(err)
- s.Len(projectAliases, 0)
-
+ s.Len(projectAliases, 1)
projectAliases, err = FindAliasInProjectRepoOrConfig("project-1", "alias-2")
s.NoError(err)
- s.Len(projectAliases, 0)
+ s.Len(projectAliases, 1)
- projectAliases, err = FindAliasInProjectRepoOrConfig("project-1", "nonexistent")
+ // If the same alias is defined in both UI and project config,
+ // UI takes precedence.
+ projectAliases, err = FindAliasInProjectRepoOrConfig("project-1", "duplicate")
s.NoError(err)
- s.Len(projectAliases, 0)
+ s.Len(projectAliases, 1)
+ s.Equal("from UI", projectAliases[0].Description)
+
}
-func (s *ProjectAliasSuite) TestFindAliasInProjectOrPatchedConfig() {
- projYml := `
-patch_aliases:
- - alias: "test"
- variant: "^ubuntu1604$"
- task: "^test.*$"
- remote_path: ""
-`
- projectAliases, err := FindAliasInProjectRepoOrPatchedConfig("", "test", projYml)
- s.NoError(err)
- s.Len(projectAliases, 1)
- s.Equal("^ubuntu1604$", projectAliases[0].Variant)
+func TestFindMergedAliasesFromProjectRepoOrProjectConfig(t *testing.T) {
+ pRef := ProjectRef{
+ Id: "p1",
+ RepoRefId: "r1",
+ VersionControlEnabled: utility.TruePtr(),
+ }
+ cqAliases := []ProjectAlias{
+ {
+ Alias: evergreen.CommitQueueAlias,
+ Description: "first",
+ },
+ {
+ Alias: evergreen.CommitQueueAlias,
+ Description: "second",
+ },
+ }
+ gitTagAliases := []ProjectAlias{
+ {
+ Alias: evergreen.GitTagAlias,
+ Description: "first",
+ },
+ {
+ Alias: evergreen.GitTagAlias,
+ Description: "second",
+ },
+ }
+ patchAliases := []ProjectAlias{
+ {
+ Alias: "something rad",
+ },
+ {
+ Alias: "something dastardly",
+ },
+ }
+ projectConfig := ProjectConfig{ProjectConfigFields: ProjectConfigFields{
+ PatchAliases: []ProjectAlias{
+ {
+ Alias: "something cool",
+ },
+ },
+ CommitQueueAliases: []ProjectAlias{
+ {
+ Alias: "something useless",
+ },
+ },
+ }}
+
+ for testName, testCase := range map[string]func(t *testing.T){
+ "nothing enabled": func(t *testing.T) {
+ assert.NoError(t, UpsertAliasesForProject(cqAliases, pRef.Id))
+ assert.NoError(t, UpsertAliasesForProject(gitTagAliases, pRef.RepoRefId))
+ tempRef := ProjectRef{ // This ref has nothing else enabled so merging should only return project aliases
+ Id: pRef.Id,
+ }
+ res, err := ConstructMergedAliasesByPrecedence(&tempRef, &projectConfig, "")
+ assert.NoError(t, err)
+ require.Len(t, res, 2)
+ assert.Equal(t, res[0].ProjectID, pRef.Id)
+ assert.Equal(t, res[1].ProjectID, pRef.Id)
+ },
+ "all enabled": func(t *testing.T) {
+ assert.NoError(t, UpsertAliasesForProject(cqAliases, pRef.Id))
+ assert.NoError(t, UpsertAliasesForProject(cqAliases, pRef.RepoRefId))
+ assert.NoError(t, UpsertAliasesForProject(gitTagAliases, pRef.RepoRefId))
+ res, err := ConstructMergedAliasesByPrecedence(&pRef, &projectConfig, pRef.RepoRefId)
+ assert.NoError(t, err)
+ // Uses aliases from project, repo, and config
+ require.Len(t, res, 5)
+ cqCount := 0
+ // There should only be two commit queue aliases, and they should all be from the project
+ for _, a := range res {
+ if a.Alias == evergreen.CommitQueueAlias {
+ cqCount++
+ assert.Equal(t, a.ProjectID, pRef.Id)
+ assert.Equal(t, a.Source, AliasSourceProject)
+ } else if a.Alias == evergreen.GitTagAlias {
+ assert.Equal(t, a.ProjectID, pRef.RepoRefId)
+ assert.Equal(t, a.Source, AliasSourceRepo)
+ } else {
+ assert.Equal(t, a.Source, AliasSourceConfig)
+ }
+ }
+ assert.Equal(t, cqCount, 2)
+ },
+ "project and repo only used": func(t *testing.T) {
+ assert.NoError(t, UpsertAliasesForProject(cqAliases, pRef.Id))
+ assert.NoError(t, UpsertAliasesForProject(cqAliases, pRef.RepoRefId))
+ assert.NoError(t, UpsertAliasesForProject(patchAliases, pRef.RepoRefId))
+ res, err := ConstructMergedAliasesByPrecedence(&pRef, &projectConfig, pRef.RepoRefId)
+ assert.NoError(t, err)
+ // Ignores config aliases because they're already used
+ require.Len(t, res, 4)
+ cqCount := 0
+ patchCount := 0
+ for _, a := range res {
+ if a.Alias == evergreen.CommitQueueAlias {
+ cqCount++
+ assert.Equal(t, a.ProjectID, pRef.Id)
+ assert.Equal(t, a.Source, AliasSourceProject)
+ } else {
+ patchCount++
+ assert.Equal(t, a.ProjectID, pRef.RepoRefId)
+ assert.Equal(t, a.Source, AliasSourceRepo)
+ }
+ }
+ assert.Equal(t, cqCount, 2)
+ assert.Equal(t, patchCount, 2)
+ },
+ } {
+ assert.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection,
+ ProjectConfigCollection, ProjectAliasCollection))
+
+ t.Run(testName, testCase)
+ }
}
func (s *ProjectAliasSuite) TestFindAliasInProjectOrRepo() {
@@ -365,11 +484,6 @@ func (s *ProjectAliasSuite) TestFindAliasInProjectOrRepo() {
s.NoError(err)
s.Len(found, 2)
- // Test project doesn't match alias but other patch aliases are defined so we don't continue to repo
- found, err = FindAliasInProjectRepoOrConfig(pRef1.Id, "alias-1")
- s.NoError(err)
- s.Len(found, 0)
-
// Test non-existent project
found, err = FindAliasInProjectRepoOrConfig("bad-project", "alias-1")
s.Error(err)
diff --git a/model/project_configs.go b/model/project_configs.go
index c342af25f7e..c2d3344d9db 100644
--- a/model/project_configs.go
+++ b/model/project_configs.go
@@ -25,18 +25,17 @@ type ProjectConfigFields struct {
// These fields can be set for the ProjectRef struct on the project page, or in the project config yaml.
// Values for the below fields set on the project page will take precedence over this struct and will
// be the configs used for a given project during runtime.
- TaskAnnotationSettings *evergreen.AnnotationsSettings `yaml:"task_annotation_settings,omitempty" bson:"task_annotation_settings,omitempty"`
- BuildBaronSettings *evergreen.BuildBaronSettings `yaml:"build_baron_settings,omitempty" bson:"build_baron_settings,omitempty"`
- CommitQueueAliases []ProjectAlias `yaml:"commit_queue_aliases,omitempty" bson:"commit_queue_aliases,omitempty"`
- GitHubPRAliases []ProjectAlias `yaml:"github_pr_aliases,omitempty" bson:"github_pr_aliases,omitempty"`
- GitTagAliases []ProjectAlias `yaml:"git_tag_aliases,omitempty" bson:"git_tag_aliases,omitempty"`
- GitHubChecksAliases []ProjectAlias `yaml:"github_checks_aliases,omitempty" bson:"github_checks_aliases,omitempty"`
- PatchAliases []ProjectAlias `yaml:"patch_aliases,omitempty" bson:"patch_aliases,omitempty"`
- WorkstationConfig *WorkstationConfig `yaml:"workstation_config,omitempty" bson:"workstation_config,omitempty"`
- TaskSync *TaskSyncOptions `yaml:"task_sync,omitempty" bson:"task_sync,omitempty"`
- GithubTriggerAliases []string `yaml:"github_trigger_aliases,omitempty" bson:"github_trigger_aliases,omitempty"`
- PeriodicBuilds []PeriodicBuildDefinition `yaml:"periodic_builds,omitempty" bson:"periodic_builds,omitempty"`
- ContainerSizes map[string]ContainerResources `yaml:"container_sizes,omitempty" bson:"container_sizes,omitempty"`
+ TaskAnnotationSettings *evergreen.AnnotationsSettings `yaml:"task_annotation_settings,omitempty" bson:"task_annotation_settings,omitempty"`
+ BuildBaronSettings *evergreen.BuildBaronSettings `yaml:"build_baron_settings,omitempty" bson:"build_baron_settings,omitempty"`
+ CommitQueueAliases []ProjectAlias `yaml:"commit_queue_aliases,omitempty" bson:"commit_queue_aliases,omitempty"`
+ GitHubPRAliases []ProjectAlias `yaml:"github_pr_aliases,omitempty" bson:"github_pr_aliases,omitempty"`
+ GitTagAliases []ProjectAlias `yaml:"git_tag_aliases,omitempty" bson:"git_tag_aliases,omitempty"`
+ GitHubChecksAliases []ProjectAlias `yaml:"github_checks_aliases,omitempty" bson:"github_checks_aliases,omitempty"`
+ PatchAliases []ProjectAlias `yaml:"patch_aliases,omitempty" bson:"patch_aliases,omitempty"`
+ WorkstationConfig *WorkstationConfig `yaml:"workstation_config,omitempty" bson:"workstation_config,omitempty"`
+ TaskSync *TaskSyncOptions `yaml:"task_sync,omitempty" bson:"task_sync,omitempty"`
+ GithubTriggerAliases []string `yaml:"github_trigger_aliases,omitempty" bson:"github_trigger_aliases,omitempty"`
+ ContainerSizeDefinitions []ContainerResources `yaml:"container_size_definitions,omitempty" bson:"container_size_definitions,omitempty"`
}
// Comment above is used by the linter to detect the end of the struct.
@@ -50,21 +49,41 @@ func (pc *ProjectConfig) MarshalBSON() ([]byte, error) {
}
func (pc *ProjectConfig) isEmpty() bool {
- reflectedConfig := reflect.ValueOf(pc).Elem()
- types := reflect.TypeOf(pc).Elem()
+ // ProjectConfig values outside of ProjectConfigFields are metadata, so we don't want to check those.
+ reflectedConfig := reflect.ValueOf(pc.ProjectConfigFields)
for i := 0; i < reflectedConfig.NumField(); i++ {
field := reflectedConfig.Field(i)
- name := types.Field(i).Name
- if name != "Id" && name != "Identifier" {
- if !util.IsFieldUndefined(field) {
- return false
- }
+ if !util.IsFieldUndefined(field) {
+ return false
}
}
return true
}
+func (pc *ProjectConfig) SetInternalAliases() {
+ for i := range pc.GitTagAliases {
+ pc.GitTagAliases[i].Alias = evergreen.GitTagAlias
+ }
+ for i := range pc.GitHubChecksAliases {
+ pc.GitHubChecksAliases[i].Alias = evergreen.GithubChecksAlias
+ }
+ for i := range pc.CommitQueueAliases {
+ pc.CommitQueueAliases[i].Alias = evergreen.CommitQueueAlias
+ }
+ for i := range pc.GitHubPRAliases {
+ pc.GitHubPRAliases[i].Alias = evergreen.GithubPRAlias
+ }
+}
+
+func (pc *ProjectConfig) AllAliases() ProjectAliases {
+ pc.SetInternalAliases()
+ res := append(pc.PatchAliases, pc.GitTagAliases...)
+ res = append(res, pc.GitHubPRAliases...)
+ res = append(res, pc.CommitQueueAliases...)
+ return append(res, pc.GitHubChecksAliases...)
+}
+
// CreateProjectConfig marshals the supplied YAML into our
// intermediate configs representation.
func CreateProjectConfig(yml []byte, identifier string) (*ProjectConfig, error) {
diff --git a/model/project_configs_db.go b/model/project_configs_db.go
index 110c28919d0..869ffd6e25b 100644
--- a/model/project_configs_db.go
+++ b/model/project_configs_db.go
@@ -57,14 +57,3 @@ func FindProjectConfigById(id string) (*ProjectConfig, error) {
}
return project, err
}
-
-// ProjectConfigUpsertOne updates one project config
-func ProjectConfigUpsertOne(query interface{}, update interface{}) error {
- _, err := db.Upsert(
- ProjectConfigCollection,
- query,
- update,
- )
-
- return err
-}
diff --git a/model/project_configs_test.go b/model/project_configs_test.go
index cf24d95189c..d774a4deb2a 100644
--- a/model/project_configs_test.go
+++ b/model/project_configs_test.go
@@ -16,6 +16,7 @@ task_groups:
- command: shell.exec
params:
script: "echo hi"
+create_time: 2022-12-15T17:18:32Z
`
pc, err := CreateProjectConfig([]byte(projYml), "")
assert.Nil(t, err)
@@ -32,9 +33,9 @@ build_baron_settings:
ticket_create_project: BF
ticket_search_projects: ["BF"]
-commit_queue_aliases:
- - project_id: evg
- variant: ubuntu1604
+github_pr_aliases:
+ - variant: "^ubuntu1604$"
+ task: ".*"
`
pc, err = CreateProjectConfig([]byte(projYml), "")
diff --git a/model/project_event.go b/model/project_event.go
index 409ba97c22c..301f3b39d6d 100644
--- a/model/project_event.go
+++ b/model/project_event.go
@@ -14,12 +14,6 @@ import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
-const (
- EventResourceTypeProject = "PROJECT"
- EventTypeProjectModified = "PROJECT_MODIFIED"
- EventTypeProjectAdded = "PROJECT_ADDED"
-)
-
type ProjectSettings struct {
ProjectRef ProjectRef `bson:"proj_ref" json:"proj_ref"`
GithubHooksEnabled bool `bson:"github_hooks_enabled" json:"github_hooks_enabled"`
@@ -28,14 +22,85 @@ type ProjectSettings struct {
Subscriptions []event.Subscription `bson:"subscriptions" json:"subscriptions"`
}
+type ProjectSettingsEvent struct {
+ ProjectSettings `bson:",inline"`
+
+ // The following boolean fields are flags that indicate that a given
+ // field is nil instead of [], since this information is lost when
+ // casting the event to a generic interface.
+ GitTagAuthorizedTeamsDefault bool `bson:"git_tag_authorized_teams_default,omitempty" json:"git_tag_authorized_teams_default,omitempty"`
+ GitTagAuthorizedUsersDefault bool `bson:"git_tag_authorized_users_default,omitempty" json:"git_tag_authorized_users_default,omitempty"`
+ PatchTriggerAliasesDefault bool `bson:"patch_trigger_aliases_default,omitempty" json:"patch_trigger_aliases_default,omitempty"`
+ PeriodicBuildsDefault bool `bson:"periodic_builds_default,omitempty" json:"periodic_builds_default,omitempty"`
+ TriggersDefault bool `bson:"triggers_default,omitempty" json:"triggers_default,omitempty"`
+ WorkstationCommandsDefault bool `bson:"workstation_commands_default,omitempty" json:"workstation_commands_default,omitempty"`
+}
+
type ProjectChangeEvent struct {
- User string `bson:"user" json:"user"`
- Before ProjectSettings `bson:"before" json:"before"`
- After ProjectSettings `bson:"after" json:"after"`
+ User string `bson:"user" json:"user"`
+ Before ProjectSettingsEvent `bson:"before" json:"before"`
+ After ProjectSettingsEvent `bson:"after" json:"after"`
}
type ProjectChangeEvents []ProjectChangeEventEntry
+// ApplyDefaults checks for any flags that indicate that a field in a project event should be nil and sets the field accordingly.
+// Attached projects need to be able to distinguish between empty arrays and nil: nil values default to repo, while empty arrays do not.
+// Look at the flags set in the ProjectSettingsEvent so that fields that were converted to empty arrays when casting to an interface{} can be correctly set to nil
+func (p *ProjectChangeEvents) ApplyDefaults() {
+ for _, event := range *p {
+ changeEvent, isChangeEvent := event.Data.(*ProjectChangeEvent)
+ if !isChangeEvent {
+ continue
+ }
+
+ // Iterate through all flags for Before and After to properly
+ // nullify fields.
+ if changeEvent.Before.GitTagAuthorizedTeamsDefault {
+ changeEvent.Before.ProjectRef.GitTagAuthorizedTeams = nil
+ }
+ if changeEvent.After.GitTagAuthorizedTeamsDefault {
+ changeEvent.After.ProjectRef.GitTagAuthorizedTeams = nil
+ }
+
+ if changeEvent.Before.GitTagAuthorizedUsersDefault {
+ changeEvent.Before.ProjectRef.GitTagAuthorizedUsers = nil
+ }
+ if changeEvent.After.GitTagAuthorizedUsersDefault {
+ changeEvent.After.ProjectRef.GitTagAuthorizedUsers = nil
+ }
+
+ if changeEvent.Before.PatchTriggerAliasesDefault {
+ changeEvent.Before.ProjectRef.PatchTriggerAliases = nil
+ }
+ if changeEvent.After.PatchTriggerAliasesDefault {
+ changeEvent.After.ProjectRef.PatchTriggerAliases = nil
+ }
+
+ if changeEvent.Before.PeriodicBuildsDefault {
+ changeEvent.Before.ProjectRef.PeriodicBuilds = nil
+ }
+ if changeEvent.After.PeriodicBuildsDefault {
+ changeEvent.After.ProjectRef.PeriodicBuilds = nil
+ }
+
+ if changeEvent.Before.TriggersDefault {
+ changeEvent.Before.ProjectRef.Triggers = nil
+ }
+ if changeEvent.After.TriggersDefault {
+ changeEvent.After.ProjectRef.Triggers = nil
+ }
+
+ if changeEvent.Before.WorkstationCommandsDefault {
+ changeEvent.Before.ProjectRef.WorkstationConfig.SetupCommands = nil
+ }
+ if changeEvent.After.WorkstationCommandsDefault {
+ changeEvent.After.ProjectRef.WorkstationConfig.SetupCommands = nil
+ }
+ }
+
+}
+
func (p *ProjectChangeEvents) RedactPrivateVars() {
for _, event := range *p {
changeEvent, isChangeEvent := event.Data.(*ProjectChangeEvent)
@@ -73,6 +138,7 @@ func (e *ProjectChangeEventEntry) SetBSON(raw mgobson.Raw) error {
}
// IDs for events were ObjectIDs previously, so we need to do this
+ // TODO (EVG-17214): Remove once old events are TTLed and/or migrated.
switch v := temp.ID.(type) {
case string:
e.ID = v
@@ -94,18 +160,18 @@ func (e *ProjectChangeEventEntry) SetBSON(raw mgobson.Raw) error {
// Project Events queries
func MostRecentProjectEvents(id string, n int) (ProjectChangeEvents, error) {
- filter := event.ResourceTypeKeyIs(EventResourceTypeProject)
+ filter := event.ResourceTypeKeyIs(event.EventResourceTypeProject)
filter[event.ResourceIdKey] = id
query := db.Query(filter).Sort([]string{"-" + event.TimestampKey}).Limit(n)
events := ProjectChangeEvents{}
- err := db.FindAllQ(event.AllLogCollection, query, &events)
+ err := db.FindAllQ(event.EventCollection, query, &events)
return events, err
}
func ProjectEventsBefore(id string, before time.Time, n int) (ProjectChangeEvents, error) {
- filter := event.ResourceTypeKeyIs(EventResourceTypeProject)
+ filter := event.ResourceTypeKeyIs(event.EventResourceTypeProject)
filter[event.ResourceIdKey] = id
filter[event.TimestampKey] = bson.M{
"$lt": before,
@@ -113,7 +179,7 @@ func ProjectEventsBefore(id string, before time.Time, n int) (ProjectChangeEvent
query := db.Query(filter).Sort([]string{"-" + event.TimestampKey}).Limit(n)
events := ProjectChangeEvents{}
- err := db.FindAllQ(event.AllLogCollection, query, &events)
+ err := db.FindAllQ(event.EventCollection, query, &events)
return events, err
}
@@ -121,16 +187,15 @@ func ProjectEventsBefore(id string, before time.Time, n int) (ProjectChangeEvent
func LogProjectEvent(eventType string, projectId string, eventData ProjectChangeEvent) error {
projectEvent := event.EventLogEntry{
Timestamp: time.Now(),
- ResourceType: EventResourceTypeProject,
+ ResourceType: event.EventResourceTypeProject,
EventType: eventType,
ResourceId: projectId,
Data: eventData,
}
- logger := event.NewDBEventLogger(event.AllLogCollection)
- if err := logger.LogEvent(&projectEvent); err != nil {
+ if err := projectEvent.Log(); err != nil {
grip.Error(message.WrapError(err, message.Fields{
- "resource_type": EventResourceTypeProject,
+ "resource_type": event.EventResourceTypeProject,
"message": "error logging event",
"source": "event-log-fail",
"projectId": projectId,
@@ -142,7 +207,7 @@ func LogProjectEvent(eventType string, projectId string, eventData ProjectChange
}
func LogProjectAdded(projectId, username string) error {
- return LogProjectEvent(EventTypeProjectAdded, projectId, ProjectChangeEvent{User: username})
+ return LogProjectEvent(event.EventTypeProjectAdded, projectId, ProjectChangeEvent{User: username})
}
func GetAndLogProjectModified(id, userId string, isRepo bool, before *ProjectSettings) error {
@@ -153,6 +218,35 @@ func GetAndLogProjectModified(id, userId string, isRepo bool, before *ProjectSet
return errors.Wrap(LogProjectModified(id, userId, before, after), "logging project modified")
}
+// resolveDefaults checks if certain project event fields are nil, and if so, sets the field's corresponding flag.
+// ProjectChangeEvents must be cast to a generic interface to utilize event logging, which casts all nil objects of array types to empty arrays.
+// Set flags if these values should indeed be nil so that we can correct these values when the event log is read from the database.
+func (p *ProjectSettings) resolveDefaults() *ProjectSettingsEvent {
+ projectSettingsEvent := &ProjectSettingsEvent{
+ ProjectSettings: *p,
+ }
+
+ if p.ProjectRef.GitTagAuthorizedTeams == nil {
+ projectSettingsEvent.GitTagAuthorizedTeamsDefault = true
+ }
+ if p.ProjectRef.GitTagAuthorizedUsers == nil {
+ projectSettingsEvent.GitTagAuthorizedUsersDefault = true
+ }
+ if p.ProjectRef.PatchTriggerAliases == nil {
+ projectSettingsEvent.PatchTriggerAliasesDefault = true
+ }
+ if p.ProjectRef.PeriodicBuilds == nil {
+ projectSettingsEvent.PeriodicBuildsDefault = true
+ }
+ if p.ProjectRef.Triggers == nil {
+ projectSettingsEvent.TriggersDefault = true
+ }
+ if p.ProjectRef.WorkstationConfig.SetupCommands == nil {
+ projectSettingsEvent.WorkstationCommandsDefault = true
+ }
+ return projectSettingsEvent
+}
+
func LogProjectModified(projectId, username string, before, after *ProjectSettings) error {
if before == nil || after == nil {
return nil
@@ -164,8 +258,8 @@ func LogProjectModified(projectId, username string, before, after *ProjectSettin
eventData := ProjectChangeEvent{
User: username,
- Before: *before,
- After: *after,
+ Before: *before.resolveDefaults(),
+ After: *after.resolveDefaults(),
}
- return LogProjectEvent(EventTypeProjectModified, projectId, eventData)
+ return LogProjectEvent(event.EventTypeProjectModified, projectId, eventData)
}
diff --git a/model/project_event_test.go b/model/project_event_test.go
index b608ec7907d..96cd036f4bd 100644
--- a/model/project_event_test.go
+++ b/model/project_event_test.go
@@ -20,7 +20,7 @@ func TestProjectEventSuite(t *testing.T) {
}
func (s *ProjectEventSuite) SetupTest() {
- s.Require().NoError(db.ClearCollections(event.AllLogCollection))
+ s.Require().NoError(db.ClearCollections(event.EventCollection))
}
const (
@@ -31,11 +31,12 @@ const (
func getMockProjectSettings() ProjectSettings {
return ProjectSettings{
ProjectRef: ProjectRef{
- Owner: "admin",
- Enabled: utility.TruePtr(),
- Private: utility.TruePtr(),
- Id: projectId,
- Admins: []string{},
+ Owner: "admin",
+ Enabled: true,
+ Private: utility.TruePtr(),
+ Id: projectId,
+ Admins: []string{},
+ PeriodicBuilds: nil,
},
GithubHooksEnabled: true,
Vars: ProjectVars{
@@ -45,11 +46,12 @@ func getMockProjectSettings() ProjectSettings {
AdminOnlyVars: map[string]bool{},
},
Aliases: []ProjectAlias{ProjectAlias{
- ID: mgobson.ObjectIdHex("5bedc72ee4055d31f0340b1d"),
- ProjectID: projectId,
- Alias: "alias1",
- Variant: "ubuntu",
- Task: "subcommand",
+ ID: mgobson.ObjectIdHex("5bedc72ee4055d31f0340b1d"),
+ ProjectID: projectId,
+ Alias: "alias1",
+ Variant: "ubuntu",
+ Task: "subcommand",
+ Description: "Description Here",
},
},
Subscriptions: []event.Subscription{event.Subscription{
@@ -68,7 +70,7 @@ func getMockProjectSettings() ProjectSettings {
func (s *ProjectEventSuite) TestModifyProjectEvent() {
before := getMockProjectSettings()
after := getMockProjectSettings()
- after.ProjectRef.Enabled = utility.FalsePtr()
+ after.ProjectRef.Enabled = false
s.NoError(LogProjectModified(projectId, username, &before, &after))
@@ -89,6 +91,7 @@ func (s *ProjectEventSuite) TestModifyProjectEvent() {
s.Empty(before.ProjectRef.Triggers, eventData.Before.ProjectRef.Triggers)
s.Equal(before.ProjectRef.Id, eventData.Before.ProjectRef.Id)
s.Equal(before.ProjectRef.Admins, eventData.Before.ProjectRef.Admins)
+ s.True(eventData.Before.PeriodicBuildsDefault)
s.Equal(before.GithubHooksEnabled, eventData.Before.GithubHooksEnabled)
s.Equal(before.Vars, eventData.Before.Vars)
s.Equal(before.Aliases, eventData.Before.Aliases)
diff --git a/model/project_matrix.go b/model/project_matrix.go
index cfd4be64caa..f471865a929 100644
--- a/model/project_matrix.go
+++ b/model/project_matrix.go
@@ -184,7 +184,7 @@ func (mdef matrixDefinition) contains(mv matrixValue) bool {
return true
}
-// matrixDefintinos is a helper type for parsing either a single definition
+// matrixDefinitions is a helper type for parsing either a single definition
// or a slice of definitions from YAML.
type matrixDefinitions []matrixDefinition
diff --git a/model/project_parser.go b/model/project_parser.go
index d3ad13843bb..bc11126273f 100644
--- a/model/project_parser.go
+++ b/model/project_parser.go
@@ -4,7 +4,7 @@ import (
"context"
"encoding/base64"
"fmt"
- "io/ioutil"
+ "os"
"reflect"
"strings"
"time"
@@ -26,6 +26,13 @@ const LoadProjectError = "load project error(s)"
const TranslateProjectError = "error translating project"
const EmptyConfigurationError = "received empty configuration file"
+// DefaultParserProjectAccessTimeout is the default timeout for accessing a
+// parser project. In general, the context timeout should prefer to be inherited
+// from a higher-level context (e.g. a REST request's context), so this timeout
+// should only be used as a last resort if the context cannot be easily passed
+// to the place where the parser project is accessed.
+const DefaultParserProjectAccessTimeout = 60 * time.Second
+
// This file contains the infrastructure for turning a YAML project configuration
// into a usable Project struct. A basic overview of the project parsing process is:
//
@@ -33,7 +40,7 @@ const EmptyConfigurationError = "received empty configuration file"
// The ParserProject's internal types define custom YAML unmarshal hooks, allowing
// users to do things like offer a single definition where we expect a list, e.g.
// `tags: "single_tag"` instead of the more verbose `tags: ["single_tag"]`
-// or refer to task by a single selector. Custom YAML handling allows us to
+// or refer to a task by a single selector. Custom YAML handling allows us to
// add other useful features like detecting fatal errors and reporting them
// through the YAML parser's error code, which supplies helpful line number information
// that we would lose during validation against already-parsed data. In the future,
@@ -51,10 +58,18 @@ const EmptyConfigurationError = "received empty configuration file"
// ParserProject serves as an intermediary struct for parsing project
// configuration YAML. It implements the Unmarshaler interface
// to allow for flexible handling.
+// From a mental model perspective, the ParserProject is the project
+// configuration after YAML rules have been evaluated (e.g. matching YAML fields
+// to Go struct fields, evaluating YAML anchors and aliases), but before any
+// Evergreen-specific evaluation rules have been applied. For example, Evergreen
+// has a custom feature to support tagging a set of tasks and expanding those
+// tags into a list of tasks under the build variant's list of tasks (i.e.
+// ".tagname" syntax). In the ParserProject, these are stored as the unexpanded
+// tag text (i.e. ".tagname"), and these tags are not evaluated until the
+// ParserProject is turned into a final Project.
type ParserProject struct {
// Id and ConfigdUpdateNumber are not pointers because they are only used internally
- Id string `yaml:"_id" bson:"_id"` // should be the same as the version's ID
- ConfigUpdateNumber int `yaml:"config_number,omitempty" bson:"config_number,omitempty"`
+ Id string `yaml:"_id" bson:"_id"` // should be the same as the version's ID
// UpdatedByGenerators is used to determine if the parser project needs to be re-saved or not.
UpdatedByGenerators []string `yaml:"updated_by_generators,omitempty" bson:"updated_by_generators,omitempty"`
// List of yamls to merge
@@ -172,9 +187,10 @@ func (pt *parserTask) tags() []string { return pt.Tags }
// parserDependency represents the intermediary state for referencing dependencies.
type parserDependency struct {
- TaskSelector taskSelector `yaml:",inline"`
- Status string `yaml:"status,omitempty" bson:"status,omitempty"`
- PatchOptional bool `yaml:"patch_optional,omitempty" bson:"patch_optional,omitempty"`
+ TaskSelector taskSelector `yaml:",inline"`
+ Status string `yaml:"status,omitempty" bson:"status,omitempty"`
+ PatchOptional bool `yaml:"patch_optional,omitempty" bson:"patch_optional,omitempty"`
+ OmitGeneratedTasks bool `yaml:"omit_generated_tasks,omitempty" bson:"omit_generated_tasks,omitempty"`
}
// parserDependencies is a type defined for unmarshalling both a single
@@ -303,8 +319,7 @@ type parserBV struct {
Expansions util.Expansions `yaml:"expansions,omitempty" bson:"expansions,omitempty"`
Tags parserStringSlice `yaml:"tags,omitempty,omitempty" bson:"tags,omitempty"`
Modules parserStringSlice `yaml:"modules,omitempty" bson:"modules,omitempty"`
- Disabled bool `yaml:"disabled,omitempty" bson:"disabled,omitempty"`
- Push bool `yaml:"push,omitempty" bson:"push,omitempty"`
+ Disable *bool `yaml:"disable,omitempty" bson:"disable,omitempty"`
BatchTime *int `yaml:"batchtime,omitempty" bson:"batchtime,omitempty"`
CronBatchTime string `yaml:"cron,omitempty" bson:"cron,omitempty"`
Stepback *bool `yaml:"stepback,omitempty" bson:"stepback,omitempty"`
@@ -313,7 +328,11 @@ type parserBV struct {
DisplayTasks []displayTask `yaml:"display_tasks,omitempty" bson:"display_tasks,omitempty"`
DependsOn parserDependencies `yaml:"depends_on,omitempty" bson:"depends_on,omitempty"`
// If Activate is set to false, then we don't initially activate the build variant.
- Activate *bool `yaml:"activate,omitempty" bson:"activate,omitempty"`
+ Activate *bool `yaml:"activate,omitempty" bson:"activate,omitempty"`
+ Patchable *bool `yaml:"patchable,omitempty" bson:"patchable,omitempty"`
+ PatchOnly *bool `yaml:"patch_only,omitempty" bson:"patch_only,omitempty"`
+ AllowForGitTag *bool `yaml:"allow_for_git_tag,omitempty" bson:"allow_for_git_tag,omitempty"`
+ GitTagOnly *bool `yaml:"git_tag_only,omitempty" bson:"git_tag_only,omitempty"`
// internal matrix stuff
MatrixId string `yaml:"matrix_id,omitempty" bson:"matrix_id,omitempty"`
@@ -370,14 +389,17 @@ func (pbv *parserBV) canMerge() bool {
pbv.Expansions == nil &&
pbv.Tags == nil &&
pbv.Modules == nil &&
- !pbv.Disabled &&
- !pbv.Push &&
+ pbv.Disable == nil &&
pbv.BatchTime == nil &&
pbv.CronBatchTime == "" &&
pbv.Stepback == nil &&
pbv.RunOn == nil &&
pbv.DependsOn == nil &&
pbv.Activate == nil &&
+ pbv.Patchable == nil &&
+ pbv.PatchOnly == nil &&
+ pbv.AllowForGitTag == nil &&
+ pbv.GitTagOnly == nil &&
pbv.MatrixId == "" &&
pbv.MatrixVal == nil &&
pbv.Matrix == nil &&
@@ -408,6 +430,8 @@ type parserBVTaskUnit struct {
CronBatchTime string `yaml:"cron,omitempty" bson:"cron,omitempty"`
// If Activate is set to false, then we don't initially activate the task.
Activate *bool `yaml:"activate,omitempty" bson:"activate,omitempty"`
+ // TaskGroup is set if an inline task group is defined on the build variant config.
+ TaskGroup *parserTaskGroup `yaml:"task_group,omitempty" bson:"task_group,omitempty"`
}
// UnmarshalYAML allows the YAML parser to read both a single selector string or
@@ -482,70 +506,107 @@ func (pss *parserStringSlice) UnmarshalYAML(unmarshal func(interface{}) error) e
return nil
}
-// LoadProjectForVersion returns the project for a version, either from the parser project or the config string.
-// If read from the config string and shouldSave is set, the resulting parser project will be saved.
-func LoadProjectForVersion(v *Version, id string, shouldSave bool) (ProjectInfo, error) {
- var pp *ParserProject
+// HasSpecificActivation returns if the build variant task specifies an activation condition that
+// overrides the default, such as cron/batchtime, disabling the task, or explicitly deactivating it.
+func (bvt *parserBVTaskUnit) hasSpecificActivation() bool {
+ return bvt.BatchTime != nil || bvt.CronBatchTime != "" ||
+ !utility.FromBoolTPtr(bvt.Activate) || utility.FromBoolPtr(bvt.Disable)
+}
+
+// HasSpecificActivation returns if the build variant specifies an activation condition that
+// overrides the default, such as cron/batchtime, disabling the task, or explicitly deactivating it.
+func (bv *parserBV) hasSpecificActivation() bool {
+ return bv.BatchTime != nil || bv.CronBatchTime != "" ||
+ !utility.FromBoolTPtr(bv.Activate) || utility.FromBoolPtr(bv.Disable)
+}
+
+// FindAndTranslateProjectForPatch translates a parser project for a patch into
+// a project. This assumes that the version may not exist yet (i.e. the patch is
+// unfinalized); otherwise FindAndTranslateProjectForVersion is equivalent.
+func FindAndTranslateProjectForPatch(ctx context.Context, settings *evergreen.Settings, p *patch.Patch) (*Project, *ParserProject, error) {
+ if p.ProjectStorageMethod != "" {
+ pp, err := ParserProjectFindOneByID(ctx, settings, p.ProjectStorageMethod, p.Id.Hex())
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "finding parser project '%s' stored using method '%s'", p.Id.Hex(), p.ProjectStorageMethod)
+ }
+ if pp == nil {
+ return nil, nil, errors.Errorf("parser project '%s' not found in storage using method '%s'", p.Id.Hex(), p.ProjectStorageMethod)
+ }
+ project, err := TranslateProject(pp)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "translating project '%s'", pp.Id)
+ }
+ return project, pp, nil
+ }
+
+ if p.PatchedParserProject != "" {
+ project := &Project{}
+ pp, err := LoadProjectInto(ctx, []byte(p.PatchedParserProject), nil, p.Project, project)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "unmarshalling project config from patched parser project")
+ }
+ return project, pp, nil
+ }
+
+ // This fallback handles the case where the patch is already finalized.
+ v, err := VersionFindOneId(p.Version)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "finding version '%s' for patch '%s'", p.Version, p.Id.Hex())
+ }
+ if v == nil {
+ return nil, nil, errors.Errorf("version '%s' not found for patch '%s'", p.Version, p.Id.Hex())
+ }
+ return FindAndTranslateProjectForVersion(ctx, settings, v)
+}
+
+// FindAndTranslateProjectForVersion translates a parser project for a version into a Project.
+// Also sets the project ID.
+func FindAndTranslateProjectForVersion(ctx context.Context, settings *evergreen.Settings, v *Version) (*Project, *ParserProject, error) {
+ pp, err := ParserProjectFindOneByID(ctx, settings, v.ProjectStorageMethod, v.Id)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "finding parser project")
+ }
+ if pp == nil {
+ return nil, nil, errors.Errorf("parser project not found for version '%s'", v.Id)
+ }
+ // Setting the translated project's identifier is necessary here because the
+ // version always has an identifier, but some old parser projects used to
+ // not be stored with the identifier.
+ pp.Identifier = utility.ToStringPtr(v.Identifier)
+ var p *Project
+ p, err = TranslateProject(pp)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "translating parser project '%s'", v.Id)
+ }
+ return p, pp, err
+}
+
+// LoadProjectInfoForVersion returns the project info for a version from its parser project.
+func LoadProjectInfoForVersion(ctx context.Context, settings *evergreen.Settings, v *Version, id string) (ProjectInfo, error) {
var err error
pRef, err := FindMergedProjectRef(id, "", false)
if err != nil {
return ProjectInfo{}, errors.Wrap(err, "finding project ref")
}
- pp, err = ParserProjectFindOneById(v.Id)
- if err != nil {
- return ProjectInfo{}, errors.Wrap(err, "finding parser project")
+ if pRef == nil {
+ return ProjectInfo{}, errors.Errorf("project ref '%s' not found", id)
}
var pc *ProjectConfig
if pRef.IsVersionControlEnabled() {
- pc, err = FindProjectConfigForProjectOrVersion(v.Identifier, v.Id)
+ pc, err = FindProjectConfigById(v.Id)
if err != nil {
return ProjectInfo{}, errors.Wrap(err, "finding project config")
}
}
- // if parser project config number is old then we should default to legacy
- if pp != nil && pp.ConfigUpdateNumber >= v.ConfigUpdateNumber {
- if pp.Functions == nil {
- pp.Functions = map[string]*YAMLCommandSet{}
- }
- pp.Identifier = utility.ToStringPtr(id)
- var p *Project
- p, err = TranslateProject(pp)
- return ProjectInfo{
- Project: p,
- IntermediateProject: pp,
- Config: pc,
- }, err
- }
-
- if v.Config == "" {
- return ProjectInfo{}, errors.New("version has no config")
- }
- p := &Project{}
- // opts empty because project yaml with `include` will not hit this case
- ctx := context.Background()
- pp, err = LoadProjectInto(ctx, []byte(v.Config), nil, id, p)
+ p, pp, err := FindAndTranslateProjectForVersion(ctx, settings, v)
if err != nil {
- return ProjectInfo{}, errors.Wrap(err, "loading project")
- }
- pp.Id = v.Id
- pp.Identifier = utility.ToStringPtr(id)
- pp.ConfigUpdateNumber = v.ConfigUpdateNumber
- pp.CreateTime = v.CreateTime
-
- if shouldSave {
- if err = pp.TryUpsert(); err != nil {
- grip.Error(message.WrapError(err, message.Fields{
- "project": id,
- "version": v.Id,
- "message": "error inserting parser project for version",
- }))
- return ProjectInfo{}, errors.Wrap(err, "updating version with project")
- }
+ return ProjectInfo{}, errors.Wrap(err, "translating project")
}
return ProjectInfo{
Project: p,
IntermediateProject: pp,
+ Config: pc,
}, nil
}
@@ -559,7 +620,7 @@ func GetProjectFromBSON(data []byte) (*Project, error) {
// LoadProjectInto loads the raw data from the config file into project
// and sets the project's identifier field to identifier. Tags are evaluated. Returns the intermediate step.
-// If reading from a version config, LoadProjectForVersion should be used to persist the resulting parser project.
+// If reading from a version config, LoadProjectInfoForVersion should be used to persist the resulting parser project.
// opts is used to look up files on github if the main parser project has an Include.
func LoadProjectInto(ctx context.Context, data []byte, opts *GetProjectOpts, identifier string, project *Project) (*ParserProject, error) {
unmarshalStrict := false
@@ -617,7 +678,7 @@ func LoadProjectInto(ctx context.Context, data []byte, opts *GetProjectOpts, ide
}
const (
- ReadfromGithub = "github"
+ ReadFromGithub = "github"
ReadFromLocal = "local"
ReadFromPatch = "patch"
ReadFromPatchDiff = "patch_diff"
@@ -658,7 +719,7 @@ func retrieveFile(ctx context.Context, opts GetProjectOpts) ([]byte, error) {
}
switch opts.ReadFileFrom {
case ReadFromLocal:
- fileContents, err := ioutil.ReadFile(opts.RemotePath)
+ fileContents, err := os.ReadFile(opts.RemotePath)
if err != nil {
return nil, errors.Wrap(err, "reading project config")
}
@@ -728,7 +789,7 @@ func retrieveFileForModule(ctx context.Context, opts GetProjectOpts, modules Mod
RemotePath: opts.RemotePath,
Revision: module.Branch,
Token: opts.Token,
- ReadFileFrom: ReadfromGithub,
+ ReadFileFrom: ReadFromGithub,
Identifier: moduleName,
}
return retrieveFile(ctx, moduleOpts)
@@ -763,7 +824,16 @@ func getFileForPatchDiff(ctx context.Context, opts GetProjectOpts) ([]byte, erro
return projectFileBytes, nil
}
+// fetchProjectFilesTimeout is the maximum timeout to fetch project
+// configuration files from its source.
+const fetchProjectFilesTimeout = time.Minute
+
+// GetProjectFromFile fetches project configuration files from its source (e.g.
+// from a patch diff, GitHub, etc).
func GetProjectFromFile(ctx context.Context, opts GetProjectOpts) (ProjectInfo, error) {
+ ctx, cancel := context.WithTimeout(ctx, fetchProjectFilesTimeout)
+ defer cancel()
+
fileContents, err := retrieveFile(ctx, opts)
if err != nil {
return ProjectInfo{}, err
@@ -802,7 +872,6 @@ func createIntermediateProject(yml []byte, unmarshalStrict bool) (*ParserProject
// to a non-existent variables field.
Variables interface{} `yaml:"variables,omitempty" bson:"-"`
}{}
-
if err := util.UnmarshalYAMLStrictWithFallback(yml, &strictProjectWithVariables); err != nil {
return nil, err
}
@@ -821,8 +890,7 @@ func createIntermediateProject(yml []byte, unmarshalStrict bool) (*ParserProject
}
// TranslateProject converts our intermediate project representation into
-// the Project type that Evergreen actually uses. Errors are added to
-// pp.errors and pp.warnings and must be checked separately.
+// the Project type that Evergreen actually uses.
func TranslateProject(pp *ParserProject) (*Project, error) {
// Transfer top level fields
proj := &Project{
@@ -867,6 +935,15 @@ func TranslateProject(pp *ParserProject) (*Project, error) {
return proj, errors.Wrap(catcher.Resolve(), TranslateProjectError)
}
+// Init initializes the parser project with the expected fields before it is
+// persisted. It's assumed that the remaining parser project configuration is
+// already populated, but these values to initialize come from an external
+// source (i.e. the patch or version it's based on).
+func (pp *ParserProject) Init(id string, createdAt time.Time) {
+ pp.Id = id
+ pp.CreateTime = createdAt
+}
+
func (pp *ParserProject) AddTask(name string, commands []PluginCommandConf) {
t := parserTask{
Name: name,
@@ -890,6 +967,14 @@ func (pp *ParserProject) AddBuildVariant(name, displayName, runOn string, batchT
pp.BuildVariants = append(pp.BuildVariants, bv)
}
+func (pp *ParserProject) GetParameters() []patch.Parameter {
+ res := []patch.Parameter{}
+ for _, param := range pp.Parameters {
+ res = append(res, param.Parameter)
+ }
+ return res
+}
+
// sieveMatrixVariants takes a set of parserBVs and groups them into regular
// buildvariant matrix definitions and matrix definitions.
func sieveMatrixVariants(bvs []parserBV) (regular []parserBV, matrices []matrix) {
@@ -974,18 +1059,21 @@ func evaluateBuildVariants(tse *taskSelectorEvaluator, tgse *tagSelectorEvaluato
var evalErrs, errs []error
for _, pbv := range pbvs {
bv := BuildVariant{
- DisplayName: pbv.DisplayName,
- Name: pbv.Name,
- Expansions: pbv.Expansions,
- Modules: pbv.Modules,
- Disabled: pbv.Disabled,
- Push: pbv.Push,
- BatchTime: pbv.BatchTime,
- CronBatchTime: pbv.CronBatchTime,
- Activate: pbv.Activate,
- Stepback: pbv.Stepback,
- RunOn: pbv.RunOn,
- Tags: pbv.Tags,
+ DisplayName: pbv.DisplayName,
+ Name: pbv.Name,
+ Expansions: pbv.Expansions,
+ Modules: pbv.Modules,
+ Disable: pbv.Disable,
+ BatchTime: pbv.BatchTime,
+ CronBatchTime: pbv.CronBatchTime,
+ Activate: pbv.Activate,
+ Patchable: pbv.Patchable,
+ PatchOnly: pbv.PatchOnly,
+ AllowForGitTag: pbv.AllowForGitTag,
+ GitTagOnly: pbv.GitTagOnly,
+ Stepback: pbv.Stepback,
+ RunOn: pbv.RunOn,
+ Tags: pbv.Tags,
}
bv.Tasks, errs = evaluateBVTasks(tse, tgse, vse, pbv, tasks)
@@ -1113,33 +1201,39 @@ func evaluateBVTasks(tse *taskSelectorEvaluator, tgse *tagSelectorEvaluator, vse
tasksByName[t.Name] = t
}
for _, pbvt := range pbv.Tasks {
- // evaluate each task against both the task and task group selectors
+ // Evaluate each task against both the task and task group selectors
// only error if both selectors error because each task should only be found
- // in one or the other
+ // in one or the other. Skip selector checking if task group is defined
+ // directly on the build variant task.
var names, temp []string
- var err1, err2 error
isGroup := false
- if tse != nil {
- temp, err1 = tse.evalSelector(ParseSelector(pbvt.Name))
- names = append(names, temp...)
- }
- if tgse != nil {
- temp, err2 = tgse.evalSelector(ParseSelector(pbvt.Name))
- if len(temp) > 0 {
+ if pbvt.TaskGroup != nil {
+ names = append(names, pbvt.Name)
+ isGroup = true
+ } else {
+ var err1, err2 error
+ if tse != nil {
+ temp, err1 = tse.evalSelector(ParseSelector(pbvt.Name))
names = append(names, temp...)
- isGroup = true
}
- }
- if err1 != nil && err2 != nil {
- evalErrs = append(evalErrs, err1, err2)
- continue
+ if tgse != nil {
+ temp, err2 = tgse.evalSelector(ParseSelector(pbvt.Name))
+ if len(temp) > 0 {
+ names = append(names, temp...)
+ isGroup = true
+ }
+ }
+ if err1 != nil && err2 != nil {
+ evalErrs = append(evalErrs, err1, err2)
+ continue
+ }
}
// create new task definitions--duplicates must have the same status requirements
for _, name := range names {
parserTask := tasksByName[name]
// create a new task by copying the task that selected it,
// so we can preserve the "Variant" and "Status" field.
- t := getParserBuildVariantTaskUnit(name, parserTask, pbvt)
+ t := getParserBuildVariantTaskUnit(name, parserTask, pbvt, pbv)
// Task-level dependencies defined in the variant override variant-level dependencies which override
// task-level dependencies defined in the task.
@@ -1153,6 +1247,8 @@ func evaluateBVTasks(tse *taskSelectorEvaluator, tgse *tagSelectorEvaluator, vse
}
t.DependsOn, errs = evaluateDependsOn(tse.tagEval, tgse, vse, dependsOn)
evalErrs = append(evalErrs, errs...)
+ // IsGroup indicates here that this build variant task unit is a
+ // task group.
t.IsGroup = isGroup
// add the new task if it doesn't already exists (we must avoid conflicting status fields)
@@ -1172,11 +1268,18 @@ func evaluateBVTasks(tse *taskSelectorEvaluator, tgse *tagSelectorEvaluator, vse
return ts, evalErrs
}
-// getParserBuildVariantTaskUnit combines the parser project's task definition with the build variant task definition.
-// DependsOn will be handled separately.
-func getParserBuildVariantTaskUnit(name string, pt parserTask, bvt parserBVTaskUnit) BuildVariantTaskUnit {
+// getParserBuildVariantTaskUnit combines the parser project's build variant
+// task definition with its task definition and build variant definition.
+// DependsOn is handled separately. When there are conflicting settings defined
+// at different levels, the priority of settings are (from highest to lowest):
+// * Task settings within a build variant's list of tasks
+// * Task settings within a task group's list of tasks
+// * Project task's settings
+// * Build variant's settings
+func getParserBuildVariantTaskUnit(name string, pt parserTask, bvt parserBVTaskUnit, bv parserBV) BuildVariantTaskUnit {
res := BuildVariantTaskUnit{
Name: name,
+ Variant: bv.Name,
Patchable: bvt.Patchable,
PatchOnly: bvt.PatchOnly,
Disable: bvt.Disable,
@@ -1191,6 +1294,23 @@ func getParserBuildVariantTaskUnit(name string, pt parserTask, bvt parserBVTaskU
BatchTime: bvt.BatchTime,
Activate: bvt.Activate,
}
+ if bvt.TaskGroup != nil {
+ res.TaskGroup = &TaskGroup{
+ Name: bvt.Name,
+ SetupGroupFailTask: bvt.TaskGroup.SetupGroupFailTask,
+ TeardownTaskCanFailTask: bvt.TaskGroup.TeardownTaskCanFailTask,
+ SetupGroupTimeoutSecs: bvt.TaskGroup.SetupGroupTimeoutSecs,
+ SetupGroup: bvt.TaskGroup.SetupGroup,
+ TeardownGroup: bvt.TaskGroup.TeardownGroup,
+ SetupTask: bvt.TaskGroup.SetupTask,
+ TeardownTask: bvt.TaskGroup.TeardownTask,
+ Tags: bvt.TaskGroup.Tags,
+ Tasks: bvt.TaskGroup.Tasks,
+ MaxHosts: bvt.TaskGroup.MaxHosts,
+ Timeout: bvt.TaskGroup.Timeout,
+ ShareProcs: bvt.TaskGroup.ShareProcs,
+ }
+ }
if res.Priority == 0 {
res.Priority = pt.Priority
}
@@ -1222,6 +1342,26 @@ func getParserBuildVariantTaskUnit(name string, pt parserTask, bvt parserBVTaskU
if len(res.RunOn) == 0 {
res.RunOn = pt.RunOn
}
+
+ // Build variant level settings are lower priority than project task level
+ // settings.
+ if res.Patchable == nil {
+ res.Patchable = bv.Patchable
+ }
+ if res.PatchOnly == nil {
+ res.PatchOnly = bv.PatchOnly
+ }
+ if res.AllowForGitTag == nil {
+ res.AllowForGitTag = bv.AllowForGitTag
+ }
+ if res.GitTagOnly == nil {
+ res.GitTagOnly = bv.GitTagOnly
+ }
+
+ if res.Disable == nil {
+ res.Disable = bv.Disable
+ }
+
return res
}
@@ -1275,10 +1415,11 @@ func evaluateDependsOn(tse *tagSelectorEvaluator, tgse *tagSelectorEvaluator, vs
// create a newDep by copying the dep that selected it,
// so we can preserve the "Status" and "PatchOptional" field.
newDep := TaskUnitDependency{
- Name: name,
- Variant: variant,
- Status: d.Status,
- PatchOptional: d.PatchOptional,
+ Name: name,
+ Variant: variant,
+ Status: d.Status,
+ PatchOptional: d.PatchOptional,
+ OmitGeneratedTasks: d.OmitGeneratedTasks,
}
// add the new dep if it doesn't already exist (we must avoid conflicting status fields)
if oldDep, ok := newDepsByNameAndVariant[TVPair{newDep.Variant, newDep.Name}]; !ok {
diff --git a/model/project_parser_db.go b/model/project_parser_db.go
index 575d4f41d88..0908dd6b664 100644
--- a/model/project_parser_db.go
+++ b/model/project_parser_db.go
@@ -1,15 +1,12 @@
package model
import (
+ "context"
+
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/db/mgo/bson"
- "github.com/evergreen-ci/evergreen/model/patch"
- "github.com/evergreen-ci/evergreen/util"
"github.com/mongodb/anser/bsonutil"
adb "github.com/mongodb/anser/db"
- "github.com/mongodb/grip"
- "github.com/mongodb/grip/message"
- "github.com/pkg/errors"
)
const (
@@ -18,7 +15,6 @@ const (
var (
ParserProjectIdKey = bsonutil.MustHaveTag(ParserProject{}, "Id")
- ParserProjectConfigNumberKey = bsonutil.MustHaveTag(ParserProject{}, "ConfigUpdateNumber")
ParserProjectEnabledKey = bsonutil.MustHaveTag(ParserProject{}, "Enabled")
ParserProjectStepbackKey = bsonutil.MustHaveTag(ParserProject{}, "Stepback")
ParserProjectPreErrorFailsTaskKey = bsonutil.MustHaveTag(ParserProject{}, "PreErrorFailsTask")
@@ -50,13 +46,21 @@ var (
ParserProjectCreateTimeKey = bsonutil.MustHaveTag(ParserProject{}, "CreateTime")
)
-// ParserProjectFindOneById returns the parser project for the version
-func ParserProjectFindOneById(id string) (*ParserProject, error) {
- return ParserProjectFindOne(ParserProjectById(id))
+// ParserProjectFindOneById returns the parser project from the DB for the
+// given ID.
+func parserProjectFindOneById(id string) (*ParserProject, error) {
+ pp, err := parserProjectFindOne(parserProjectById(id))
+ if err != nil {
+ return nil, err
+ }
+ if pp != nil && pp.Functions == nil {
+ pp.Functions = map[string]*YAMLCommandSet{}
+ }
+ return pp, nil
}
-// ParserProjectFindOne finds a parser project with a given query.
-func ParserProjectFindOne(query db.Q) (*ParserProject, error) {
+// parserProjectFindOne finds a parser project in the DB with a given query.
+func parserProjectFindOne(query db.Q) (*ParserProject, error) {
project := &ParserProject{}
err := db.FindOneQ(ParserProjectCollection, query, project)
if adb.ResultsNotFound(err) {
@@ -65,13 +69,13 @@ func ParserProjectFindOne(query db.Q) (*ParserProject, error) {
return project, err
}
-// ParserProjectById returns a query to find a parser project by id.
-func ParserProjectById(id string) db.Q {
+// parserProjectById returns a DB query to find a parser project by ID.
+func parserProjectById(id string) db.Q {
return db.Query(bson.M{ParserProjectIdKey: id})
}
-// ParserProjectUpsertOne updates one project
-func ParserProjectUpsertOne(query interface{}, update interface{}) error {
+// parserProjectUpsertOne updates one parser project in the DB.
+func parserProjectUpsertOne(query interface{}, update interface{}) error {
_, err := db.Upsert(
ParserProjectCollection,
query,
@@ -81,108 +85,30 @@ func ParserProjectUpsertOne(query interface{}, update interface{}) error {
return err
}
-func FindParametersForVersion(v *Version) ([]patch.Parameter, error) {
- pp, err := ParserProjectFindOne(ParserProjectById(v.Id).WithFields(ParserProjectConfigNumberKey,
- ParserProjectParametersKey))
- if err != nil {
- return nil, errors.Wrap(err, "finding parser project")
- }
- if pp == nil || pp.ConfigUpdateNumber < v.ConfigUpdateNumber { // legacy case
- if v.Config == "" {
- return nil, errors.New("version has no config")
- }
- pp, err = createIntermediateProject([]byte(v.Config), false)
- if err != nil {
- return nil, errors.Wrap(err, "parsing legacy config")
- }
- }
- return pp.GetParameters(), nil
-}
-
-func FindExpansionsForVariant(v *Version, variant string) (util.Expansions, error) {
- pp, err := ParserProjectFindOne(ParserProjectById(v.Id).WithFields(ParserProjectConfigNumberKey,
- ParserProjectBuildVariantsKey, ParserProjectAxesKey))
- if err != nil {
- return nil, errors.Wrap(err, "finding parser project")
- }
-
- if pp == nil || pp.ConfigUpdateNumber < v.ConfigUpdateNumber { // legacy case
- if v.Config == "" {
- return nil, errors.New("version has no config")
- }
- pp, err = createIntermediateProject([]byte(v.Config), false)
- if err != nil {
- return nil, errors.Wrap(err, "parsing legacy config")
- }
- }
+// ParserProjectDBStorage implements the ParserProjectStorage interface to
+// access parser projects stored in the DB.
+type ParserProjectDBStorage struct{}
- bvs, errs := GetVariantsWithMatrices(nil, pp.Axes, pp.BuildVariants)
- if len(errs) > 0 {
- catcher := grip.NewBasicCatcher()
- catcher.Extend(errs)
- return nil, catcher.Resolve()
- }
- for _, bv := range bvs {
- if bv.Name == variant {
- return bv.Expansions, nil
- }
- }
- return nil, errors.New("could not find variant")
+// FindOneByID finds a parser project from the DB by its ID. This ignores the
+// context parameter.
+func (s ParserProjectDBStorage) FindOneByID(_ context.Context, id string) (*ParserProject, error) {
+ return parserProjectFindOneById(id)
}
-func checkConfigNumberQuery(id string, configNum int) bson.M {
- q := bson.M{ParserProjectIdKey: id}
- if configNum == 0 {
- q["$or"] = []bson.M{
- bson.M{ParserProjectConfigNumberKey: bson.M{"$exists": false}},
- bson.M{ParserProjectConfigNumberKey: configNum},
- }
- return q
- }
-
- q[ParserProjectConfigNumberKey] = configNum
- return q
+// FindOneByIDWithFields returns the parser project from the DB with only the
+// requested fields populated. This may be more efficient than fetching the
+// entire parser project. This ignores the context parameter.
+func (s ParserProjectDBStorage) FindOneByIDWithFields(_ context.Context, id string, fields ...string) (*ParserProject, error) {
+ return parserProjectFindOne(parserProjectById(id).WithFields(fields...))
}
-// TryUpsert suppresses the error of inserting if it's a duplicate key error
-// and attempts to upsert if config number matches.
-func (pp *ParserProject) TryUpsert() error {
- err := ParserProjectUpsertOne(checkConfigNumberQuery(pp.Id, pp.ConfigUpdateNumber), pp)
- if !db.IsDuplicateKey(err) {
- return err
- }
-
- // log this error but don't return it
- grip.Debug(message.WrapError(err, message.Fields{
- "message": "parser project not upserted",
- "operation": "TryUpsert",
- "version": pp.Id,
- "attempted_to_update_with_num": pp.ConfigUpdateNumber,
- }))
-
- return nil
+// UpsertOne replaces a parser project in the DB if one exists with the same ID.
+// Otherwise, if it does not exist yet, it inserts a new parser project.
+func (s ParserProjectDBStorage) UpsertOne(ctx context.Context, pp *ParserProject) error {
+ return parserProjectUpsertOne(bson.M{ParserProjectIdKey: pp.Id}, pp)
}
-// UpsertWithConfigNumber inserts project if it DNE. Otherwise, updates if the
-// existing config number is less than or equal to the new config number.
-// If shouldEqual, only update if the config update number matches.
-func (pp *ParserProject) UpsertWithConfigNumber(updateNum int) error {
- if pp.Id == "" {
- return errors.New("no version ID given")
- }
- expectedNum := pp.ConfigUpdateNumber
- pp.ConfigUpdateNumber = updateNum
- if err := ParserProjectUpsertOne(checkConfigNumberQuery(pp.Id, expectedNum), pp); err != nil {
- // expose all errors to check duplicate key errors for a race
- return errors.Wrapf(err, "upserting parser project '%s'", pp.Id)
- }
+// Close is a no-op.
+func (s ParserProjectDBStorage) Close(ctx context.Context) error {
return nil
}
-
-func (pp *ParserProject) GetParameters() []patch.Parameter {
- res := []patch.Parameter{}
- for _, param := range pp.Parameters {
- res = append(res, param.Parameter)
- }
- return res
-}
diff --git a/model/project_parser_db_test.go b/model/project_parser_db_test.go
deleted file mode 100644
index 9b3c5303ce1..00000000000
--- a/model/project_parser_db_test.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package model
-
-import (
- "testing"
-
- "github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/util"
- "github.com/stretchr/testify/assert"
-)
-
-func TestFindExpansionsForVariant(t *testing.T) {
- assert.NoError(t, db.ClearCollections(ParserProjectCollection))
- pp := ParserProject{
- Id: "v1",
- Axes: []matrixAxis{
- {
- Id: "version",
- Values: []axisValue{
- {
- Id: "latest",
- Variables: util.Expansions{"VERSION": "latest"},
- },
- },
- },
- {
- Id: "os",
- Values: []axisValue{
- {
- Id: "windows-64",
- Variables: util.Expansions{"OS": "windows-64"},
- },
- },
- },
- },
- BuildVariants: []parserBV{
- {
- Name: "myBV",
- Expansions: util.Expansions{"hello": "world", "goodbye": "mars"},
- },
- {
- Name: "yourBV",
- Expansions: util.Expansions{"milky": "way"},
- },
- {
- Matrix: &matrix{
- Id: "test",
- Spec: matrixDefinition{
- "os": parserStringSlice{
- "*",
- },
- "version": parserStringSlice{
- "*",
- },
- },
- },
- },
- },
- }
-
- v := &Version{Id: "v1"}
- assert.NoError(t, pp.TryUpsert())
- expansions, err := FindExpansionsForVariant(v, "myBV")
- assert.NoError(t, err)
- assert.Equal(t, expansions["hello"], "world")
- assert.Equal(t, expansions["goodbye"], "mars")
- assert.Empty(t, expansions["milky"])
- expansions, err = FindExpansionsForVariant(v, "test__version~latest_os~windows-64")
- assert.NoError(t, err)
- assert.Equal(t, expansions["VERSION"], "latest")
- assert.Equal(t, expansions["OS"], "windows-64")
-}
diff --git a/model/project_parser_s3.go b/model/project_parser_s3.go
new file mode 100644
index 00000000000..3c5b47c1943
--- /dev/null
+++ b/model/project_parser_s3.go
@@ -0,0 +1,133 @@
+package model
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/endpoints"
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/pail"
+ "github.com/evergreen-ci/utility"
+ "github.com/pkg/errors"
+ "go.mongodb.org/mongo-driver/bson"
+)
+
+// ParserProjectS3Storage implements the ParserProjectStorage interface to
+// access parser projects stored in S3.
+type ParserProjectS3Storage struct {
+ bucket pail.Bucket
+ client *http.Client
+ closed bool
+}
+
+// NewParserProjectS3Storage sets up access to parser projects stored in S3.
+// If this returns a non-nil ParserProjectS3Storage, callers are expected to
+// call Close when they are finished with it.
+func NewParserProjectS3Storage(ppConf evergreen.ParserProjectS3Config) (*ParserProjectS3Storage, error) {
+ c := utility.GetHTTPClient()
+
+ var creds *credentials.Credentials
+ if ppConf.Key != "" && ppConf.Secret != "" {
+ creds = pail.CreateAWSCredentials(ppConf.Key, ppConf.Secret, "")
+ }
+ b, err := pail.NewS3MultiPartBucketWithHTTPClient(c, pail.S3Options{
+ Name: ppConf.Bucket,
+ Prefix: ppConf.Prefix,
+ Region: endpoints.UsEast1RegionID,
+ Credentials: creds,
+ })
+ if err != nil {
+ return nil, errors.Wrap(err, "setting up S3 multipart bucket")
+ }
+ s := ParserProjectS3Storage{
+ bucket: b,
+ client: c,
+ }
+ return &s, nil
+}
+
+// FindOneByID finds a parser project in S3 using its ID. If the context errors,
+// it will return the context error.
+func (s *ParserProjectS3Storage) FindOneByID(ctx context.Context, id string) (*ParserProject, error) {
+ if s.closed {
+ return nil, errors.New("cannot access parser project S3 storage when it is closed")
+ }
+
+ r, err := s.bucket.Get(ctx, id)
+ if pail.IsKeyNotFoundError(err) {
+ return nil, nil
+ }
+ if err != nil {
+ return nil, errors.Wrapf(err, "getting parser project '%s'", id)
+ }
+ defer r.Close()
+
+ b, err := io.ReadAll(r)
+ if err != nil {
+ return nil, errors.Wrapf(err, "reading parser project '%s'", id)
+ }
+
+ var pp ParserProject
+ if err := bson.Unmarshal(b, &pp); err != nil {
+ return nil, errors.Wrapf(err, "unmarshalling parser project '%s' from BSON", id)
+ }
+
+ if pp.Functions == nil {
+ pp.Functions = map[string]*YAMLCommandSet{}
+ }
+
+ return &pp, nil
+}
+
+// FindOneByIDWithFields finds a parser project using its ID from S3 and returns
+// the parser project with only the requested fields populated. This is not any
+// more efficient than FindOneByID. If the context errors, it will return the
+// context error.
+func (s *ParserProjectS3Storage) FindOneByIDWithFields(ctx context.Context, id string, fields ...string) (*ParserProject, error) {
+ return s.FindOneByID(ctx, id)
+}
+
+// UpsertOne replaces a parser project if the parser project in S3 with the same
+// ID already exists. If it does not exist yet, it inserts a new parser project.
+func (s *ParserProjectS3Storage) UpsertOne(ctx context.Context, pp *ParserProject) error {
+ if s.closed {
+ return errors.New("cannot access parser project S3 storage when it is closed")
+ }
+
+ bsonPP, err := bson.Marshal(pp)
+ if err != nil {
+ return errors.Wrapf(err, "marshalling parser project '%s' to BSON", pp.Id)
+ }
+
+ return s.UpsertOneBSON(ctx, pp.Id, bsonPP)
+}
+
+// UpsertOneBSON upserts a parser project by its ID when has already been
+// marshalled to BSON.
+func (s *ParserProjectS3Storage) UpsertOneBSON(ctx context.Context, id string, bsonPP []byte) error {
+ if s.closed {
+ return errors.New("cannot access parser project S3 storage when it is closed")
+ }
+
+ r := bytes.NewBuffer(bsonPP)
+ if err := s.bucket.Put(ctx, id, r); err != nil {
+ return errors.Wrapf(err, "upserting BSON parser project '%s'", id)
+ }
+
+ return nil
+}
+
+// Close returns the HTTP client that is being used back to the client pool.
+func (s *ParserProjectS3Storage) Close(ctx context.Context) error {
+ if s.closed {
+ return nil
+ }
+
+ utility.PutHTTPClient(s.client)
+ s.closed = true
+
+ return nil
+}
diff --git a/model/project_parser_storage.go b/model/project_parser_storage.go
new file mode 100644
index 00000000000..73c162abc18
--- /dev/null
+++ b/model/project_parser_storage.go
@@ -0,0 +1,113 @@
+package model
+
+import (
+ "context"
+
+ "github.com/evergreen-ci/evergreen"
+ "github.com/evergreen-ci/evergreen/db"
+ "github.com/mongodb/grip"
+ "github.com/mongodb/grip/message"
+ "github.com/pkg/errors"
+)
+
+// ParserProjectStorage is an interface for accessing the parser project.
+type ParserProjectStorage interface {
+ // FindOneByID finds a parser project using its ID. If the parser project
+ // does not exist in the underlying storage, implementations must return a
+ // nil parser project and nil error. Implementations may or may not respect
+ // the context.
+ FindOneByID(ctx context.Context, id string) (*ParserProject, error)
+ // FindOneByIDWithFields finds a parser project using its ID and returns the
+ // parser project with at least the requested fields populated.
+ // Implementations may choose to return more fields than those explicitly
+ // requested. If the parser project does not exist in the underlying
+ // storage, implementations must return a nil parser project and nil error.
+ // Implementations may or may not respect the context.
+ FindOneByIDWithFields(ctx context.Context, id string, fields ...string) (*ParserProject, error)
+ // UpsertOne replaces a parser project if the parser project with the
+ // same ID already exists. If it does not exist yet, it inserts a new parser
+ // project.
+ UpsertOne(ctx context.Context, pp *ParserProject) error
+ // Close cleans up the accessor to the parser project storage. Users of
+ // ParserProjectStorage implementations must call Close once they are
+ // finished using it.
+ Close(ctx context.Context) error
+}
+
+// GetParserProjectStorage returns the parser project storage mechanism to
+// access the persistent copy of it. Users of the returned ParserProjectStorage
+// must call Close once they are finished using it.
+func GetParserProjectStorage(settings *evergreen.Settings, method evergreen.ParserProjectStorageMethod) (ParserProjectStorage, error) {
+ switch method {
+ case "", evergreen.ProjectStorageMethodDB:
+ return ParserProjectDBStorage{}, nil
+ case evergreen.ProjectStorageMethodS3:
+ return NewParserProjectS3Storage(settings.Providers.AWS.ParserProject)
+ default:
+ return nil, errors.Errorf("unrecognized parser project storage method '%s'", method)
+ }
+}
+
+// ParserProjectFindOneByID is a convenience wrapper to find one parser project
+// by ID from persistent storage.
+func ParserProjectFindOneByID(ctx context.Context, settings *evergreen.Settings, method evergreen.ParserProjectStorageMethod, id string) (*ParserProject, error) {
+ ppStorage, err := GetParserProjectStorage(settings, method)
+ if err != nil {
+ return nil, errors.Wrap(err, "getting parser project storage")
+ }
+ defer ppStorage.Close(ctx)
+ return ppStorage.FindOneByID(ctx, id)
+}
+
+// ParserProjectFindOneByIDWithFields is a convenience wrapper to find one
+// parser project by ID from persistent storage with the given fields populated.
+func ParserProjectFindOneByIDWithFields(ctx context.Context, settings *evergreen.Settings, method evergreen.ParserProjectStorageMethod, id string, fields ...string) (*ParserProject, error) {
+ ppStorage, err := GetParserProjectStorage(settings, method)
+ if err != nil {
+ return nil, errors.Wrap(err, "getting parser project storage")
+ }
+ defer ppStorage.Close(ctx)
+ return ppStorage.FindOneByIDWithFields(ctx, id, fields...)
+}
+
+// ParserProjectUpsertOne is a convenience wrapper to upsert one parser project
+// to persistent storage.
+func ParserProjectUpsertOne(ctx context.Context, settings *evergreen.Settings, method evergreen.ParserProjectStorageMethod, pp *ParserProject) error {
+ ppStorage, err := GetParserProjectStorage(settings, method)
+ if err != nil {
+ return errors.Wrap(err, "getting parser project storage")
+ }
+ defer ppStorage.Close(ctx)
+ return ppStorage.UpsertOne(ctx, pp)
+}
+
+// ParserProjectUpsertOneWithS3Fallback attempts to upsert the parser project
+// into persistent storage using the given storage method. If it fails due to
+// DB document size limitations, it will attempt to fall back to using S3
+// to store it. If it succeeds, this returns the actual project storage method
+// used to persist the parser project; otherwise, it returns the
+// originally-requested storage method.
+func ParserProjectUpsertOneWithS3Fallback(ctx context.Context, settings *evergreen.Settings, method evergreen.ParserProjectStorageMethod, pp *ParserProject) (evergreen.ParserProjectStorageMethod, error) {
+ err := ParserProjectUpsertOne(ctx, settings, method, pp)
+ if method == evergreen.ProjectStorageMethodS3 {
+ return method, errors.Wrap(err, "upserting parser project into S3")
+ }
+
+ if !db.IsDocumentLimit(err) {
+ return method, errors.Wrap(err, "upserting parser project into the DB")
+ }
+
+ newMethod := evergreen.ProjectStorageMethodS3
+ if err := ParserProjectUpsertOne(ctx, settings, newMethod, pp); err != nil {
+ return method, errors.Wrap(err, "falling back to upserting parser project into S3")
+ }
+
+ grip.Info(message.Fields{
+ "message": "successfully upserted parser into S3 as fallback due to document size limitation",
+ "parser_project": pp.Id,
+ "old_storage_method": method,
+ "new_storage_method": newMethod,
+ })
+
+ return newMethod, nil
+}
diff --git a/model/project_parser_test.go b/model/project_parser_test.go
index 8dbaa141a90..a1c16b43413 100644
--- a/model/project_parser_test.go
+++ b/model/project_parser_test.go
@@ -4,23 +4,28 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
+ "os"
"path/filepath"
"reflect"
"strconv"
"strings"
"testing"
+ "github.com/aws/aws-sdk-go/aws/endpoints"
+ "github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
+ mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/evergreen/mock"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/pail"
"github.com/evergreen-ci/utility"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mongodb.org/mongo-driver/bson"
- "gopkg.in/yaml.v3"
+ yaml "gopkg.in/yaml.v3"
)
// ShouldContainResembling tests whether a slice contains an element that DeepEquals
@@ -287,28 +292,103 @@ buildvariants:
func TestTranslateTasks(t *testing.T) {
parserProject := &ParserProject{
- BuildVariants: []parserBV{{
- Name: "bv",
- Tasks: parserBVTaskUnits{
- {
- Name: "my_task",
- ExecTimeoutSecs: 30,
+ BuildVariants: []parserBV{
+ {
+ Name: "bv0",
+ Tasks: parserBVTaskUnits{
+ {
+ Name: "my_task",
+ ExecTimeoutSecs: 30,
+ },
+ {
+ Name: "your_task",
+ GitTagOnly: utility.TruePtr(),
+ },
+ {
+ Name: "my_tg",
+ RunOn: []string{"my_distro"},
+ ExecTimeoutSecs: 20,
+ },
+ },
+ },
+ {
+ Name: "patch_only_bv",
+ PatchOnly: utility.FalsePtr(),
+ Tasks: parserBVTaskUnits{
+ {
+ Name: "your_task",
+ },
+ {
+ Name: "my_task",
+ },
+ {
+ Name: "a_task_with_no_special_configuration",
+ },
+ {
+ Name: "a_task_with_build_variant_task_configuration",
+ PatchOnly: utility.TruePtr(),
+ },
+ },
+ },
+ {
+ Name: "unpatchable_bv",
+ Patchable: utility.FalsePtr(),
+ Tasks: parserBVTaskUnits{
+ {
+ Name: "a_task_with_no_special_configuration",
+ },
+ {
+ Name: "a_task_with_build_variant_task_configuration",
+ Patchable: utility.TruePtr(),
+ },
},
- {
- Name: "your_task",
- GitTagOnly: utility.TruePtr(),
+ },
+ {
+ Name: "allow_for_git_tag_bv",
+ AllowForGitTag: utility.FalsePtr(),
+ Tasks: parserBVTaskUnits{
+ {
+ Name: "a_task_with_no_special_configuration",
+ },
+ {
+ Name: "a_task_with_build_variant_task_configuration",
+ AllowForGitTag: utility.TruePtr(),
+ },
},
- {
- Name: "my_tg",
- RunOn: []string{"my_distro"},
- ExecTimeoutSecs: 20,
+ },
+ {
+ Name: "git_tag_only_bv",
+ GitTagOnly: utility.TruePtr(),
+ Tasks: parserBVTaskUnits{
+ {
+ Name: "a_task_with_no_special_configuration",
+ },
+ {
+ Name: "a_task_with_build_variant_task_configuration",
+ GitTagOnly: utility.FalsePtr(),
+ },
},
- }},
+ },
+ {
+ Name: "disabled_bv",
+ Disable: utility.TruePtr(),
+ Tasks: parserBVTaskUnits{
+ {
+ Name: "your_task",
+ },
+ {
+ Name: "my_task",
+ Disable: utility.FalsePtr(),
+ },
+ },
+ },
},
Tasks: []parserTask{
{Name: "my_task", PatchOnly: utility.TruePtr(), ExecTimeoutSecs: 15},
{Name: "your_task", GitTagOnly: utility.FalsePtr(), Stepback: utility.TruePtr(), RunOn: []string{"a different distro"}},
{Name: "tg_task", PatchOnly: utility.TruePtr(), RunOn: []string{"a different distro"}},
+ {Name: "a_task_with_no_special_configuration"},
+ {Name: "a_task_with_build_variant_task_configuration"},
},
TaskGroups: []parserTaskGroup{{
Name: "my_tg",
@@ -318,8 +398,16 @@ func TestTranslateTasks(t *testing.T) {
out, err := TranslateProject(parserProject)
assert.NoError(t, err)
assert.NotNil(t, out)
- require.Len(t, out.Tasks, 3)
- require.Len(t, out.BuildVariants, 1)
+ require.Len(t, out.Tasks, 5)
+ require.Len(t, out.BuildVariants, 6)
+
+ for _, bv := range out.BuildVariants {
+ for _, bvtu := range bv.Tasks {
+ assert.Equal(t, bv.Name, bvtu.Variant, "build variant task unit's variant should be properly linked")
+ }
+ }
+
+ assert.Equal(t, "bv0", out.BuildVariants[0].Name)
require.Len(t, out.BuildVariants[0].Tasks, 3)
assert.Equal(t, "my_task", out.BuildVariants[0].Tasks[0].Name)
assert.Equal(t, 30, out.BuildVariants[0].Tasks[0].ExecTimeoutSecs)
@@ -327,19 +415,68 @@ func TestTranslateTasks(t *testing.T) {
assert.Equal(t, "your_task", out.BuildVariants[0].Tasks[1].Name)
assert.True(t, utility.FromBoolPtr(out.BuildVariants[0].Tasks[1].GitTagOnly))
assert.True(t, utility.FromBoolPtr(out.BuildVariants[0].Tasks[1].Stepback))
+
assert.Contains(t, out.BuildVariants[0].Tasks[1].RunOn, "a different distro")
assert.Equal(t, "my_tg", out.BuildVariants[0].Tasks[2].Name)
- bvt := out.FindTaskForVariant("my_tg", "bv")
- assert.NotNil(t, bvt)
+ bvt := out.FindTaskForVariant("my_tg", "bv0")
+ require.NotNil(t, bvt)
+ assert.Equal(t, "my_tg", bvt.Name)
assert.Nil(t, bvt.PatchOnly)
assert.Contains(t, bvt.RunOn, "my_distro")
assert.Equal(t, 20, bvt.ExecTimeoutSecs)
+ assert.True(t, bvt.IsGroup)
- bvt = out.FindTaskForVariant("tg_task", "bv")
+ bvt = out.FindTaskForVariant("tg_task", "bv0")
+ assert.Equal(t, "my_tg", bvt.Name, "task within a task group retains its task group name in resulting build variant task unit")
assert.NotNil(t, bvt)
assert.True(t, utility.FromBoolPtr(bvt.PatchOnly))
assert.Contains(t, bvt.RunOn, "my_distro")
+ assert.True(t, bvt.IsGroup)
+
+ assert.Equal(t, "patch_only_bv", out.BuildVariants[1].Name)
+ require.Len(t, out.BuildVariants[1].Tasks, 4)
+ assert.Equal(t, "your_task", out.BuildVariants[1].Tasks[0].Name)
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[1].Tasks[0].Stepback))
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[1].Tasks[0].PatchOnly))
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[1].Tasks[0].GitTagOnly))
+ assert.Equal(t, "my_task", out.BuildVariants[1].Tasks[1].Name)
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[1].Tasks[1].PatchOnly))
+ assert.Equal(t, "a_task_with_no_special_configuration", out.BuildVariants[1].Tasks[2].Name)
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[1].Tasks[2].PatchOnly))
+ assert.Equal(t, "a_task_with_build_variant_task_configuration", out.BuildVariants[1].Tasks[3].Name)
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[1].Tasks[3].PatchOnly))
+
+ assert.Equal(t, "unpatchable_bv", out.BuildVariants[2].Name)
+ require.Len(t, out.BuildVariants[2].Tasks, 2)
+ assert.Equal(t, "a_task_with_no_special_configuration", out.BuildVariants[2].Tasks[0].Name)
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[2].Tasks[0].Patchable))
+ assert.Equal(t, "a_task_with_build_variant_task_configuration", out.BuildVariants[2].Tasks[1].Name)
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[2].Tasks[1].Patchable))
+
+ assert.Equal(t, "allow_for_git_tag_bv", out.BuildVariants[3].Name)
+ require.Len(t, out.BuildVariants[3].Tasks, 2)
+ assert.Equal(t, "a_task_with_no_special_configuration", out.BuildVariants[3].Tasks[0].Name)
+ assert.False(t, utility.FromBoolTPtr(out.BuildVariants[3].Tasks[0].AllowForGitTag))
+ assert.Equal(t, "a_task_with_build_variant_task_configuration", out.BuildVariants[3].Tasks[1].Name)
+ assert.True(t, utility.FromBoolTPtr(out.BuildVariants[3].Tasks[1].AllowForGitTag))
+
+ assert.Equal(t, "git_tag_only_bv", out.BuildVariants[4].Name)
+ require.Len(t, out.BuildVariants[4].Tasks, 2)
+ assert.Equal(t, "a_task_with_no_special_configuration", out.BuildVariants[4].Tasks[0].Name)
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[4].Tasks[0].GitTagOnly))
+ assert.Equal(t, "a_task_with_build_variant_task_configuration", out.BuildVariants[4].Tasks[1].Name)
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[4].Tasks[1].GitTagOnly))
+
+ assert.Equal(t, "disabled_bv", out.BuildVariants[5].Name)
+ require.Len(t, out.BuildVariants[5].Tasks, 2)
+ assert.Equal(t, "your_task", out.BuildVariants[5].Tasks[0].Name)
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[5].Tasks[0].GitTagOnly))
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[5].Tasks[0].Stepback))
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[5].Tasks[0].Disable))
+ assert.Equal(t, "my_task", out.BuildVariants[5].Tasks[1].Name)
+ assert.True(t, utility.FromBoolPtr(out.BuildVariants[5].Tasks[1].PatchOnly))
+ assert.False(t, utility.FromBoolPtr(out.BuildVariants[5].Tasks[1].Disable))
}
func TestTranslateDependsOn(t *testing.T) {
@@ -463,7 +600,7 @@ func parserTaskSelectorTaskEval(tse *taskSelectorEvaluator, tasks parserBVTaskUn
vse := NewVariantSelectorEvaluator([]parserBV{}, nil)
Convey(fmt.Sprintf("tasks [%v] should evaluate to [%v]",
strings.Join(names, ", "), strings.Join(exp, ", ")), func() {
- pbv := parserBV{Tasks: tasks}
+ pbv := parserBV{Name: "build-variant-wow", Tasks: tasks}
ts, errs := evaluateBVTasks(tse, nil, vse, pbv, taskDefs)
if expected != nil {
So(errs, ShouldBeNil)
@@ -477,6 +614,7 @@ func parserTaskSelectorTaskEval(tse *taskSelectorEvaluator, tasks parserBVTaskUn
if t.Name == e.Name && t.Priority == e.Priority && len(t.DependsOn) == len(e.DependsOn) {
exists = true
}
+ So(t.Variant, ShouldEqual, pbv.Name)
}
So(exists, ShouldBeTrue)
}
@@ -893,7 +1031,6 @@ buildvariants:
_, err = LoadProjectInto(ctx, []byte(yamlWithVariables), opts, "example_project", &proj)
require.NoError(t, err)
- fmt.Println("MY TESTS ARE STARTING")
// duplicates should error
yamlWithDup := `
tasks:
@@ -1037,6 +1174,53 @@ buildvariants:
assert.Len(tg.TeardownGroup.List(), 1)
assert.True(tg.ShareProcs)
+ // check that yml with inline task groups within its buildvariants correctly parses the group
+ inlineYml := `
+tasks:
+- name: example_task_1
+- name: example_task_2
+task_groups:
+- &example_task_group
+ name: example_task_group
+ share_processes: true
+ max_hosts: 2
+ setup_group_can_fail_task: true
+ setup_group_timeout_secs: 10
+ setup_group:
+ - command: shell.exec
+ params:
+ script: "echo setup_group"
+ teardown_group:
+ - command: shell.exec
+ params:
+ script: "echo teardown_group"
+ setup_task:
+ - command: shell.exec
+ params:
+ script: "echo setup_group"
+ teardown_task:
+ - command: shell.exec
+ params:
+ script: "echo setup_group"
+ tasks:
+ - example_task_1
+ - example_task_2
+buildvariants:
+- name: "bv"
+ tasks:
+ - name: inline_task_group
+ task_group:
+ <<: *example_task_group
+ tasks:
+ - example_task_1
+`
+ proj = &Project{}
+ _, err = LoadProjectInto(ctx, []byte(inlineYml), nil, "id", proj)
+ assert.Nil(err)
+ assert.NotNil(proj)
+ assert.Len(proj.BuildVariants[0].Tasks, 1)
+ assert.NotNil(proj.BuildVariants[0].Tasks[0].TaskGroup)
+
// check that yml with a task group that contains a nonexistent task errors
wrongTaskYml := `
tasks:
@@ -1518,86 +1702,89 @@ func TestAddBuildVariant(t *testing.T) {
assert.Len(t, pp.BuildVariants[0].Tasks, 1)
}
-func TestTryUpsert(t *testing.T) {
- for testName, testCase := range map[string]func(t *testing.T){
- "configNumberMatches": func(t *testing.T) {
- pp := &ParserProject{
- Id: "my-project",
- ConfigUpdateNumber: 4,
- Owner: utility.ToStringPtr("me"),
- }
- assert.NoError(t, pp.TryUpsert()) // new project should work
- pp.Owner = utility.ToStringPtr("you")
- assert.NoError(t, pp.TryUpsert())
- pp, err := ParserProjectFindOneById(pp.Id)
- assert.NoError(t, err)
- require.NotNil(t, pp)
- assert.Equal(t, "you", utility.FromStringPtr(pp.Owner))
- },
- "noConfigNumber": func(t *testing.T) {
- pp := &ParserProject{
- Id: "my-project",
- Owner: utility.ToStringPtr("me"),
- }
- assert.NoError(t, pp.TryUpsert()) // new project should work
- pp.Owner = utility.ToStringPtr("you")
- assert.NoError(t, pp.TryUpsert())
- pp, err := ParserProjectFindOneById(pp.Id)
- assert.NoError(t, err)
- require.NotNil(t, pp)
- assert.Equal(t, "you", utility.FromStringPtr(pp.Owner))
- },
- "configNumberDoesNotMatch": func(t *testing.T) {
- pp := &ParserProject{
- Id: "my-project",
- ConfigUpdateNumber: 4,
- Owner: utility.ToStringPtr("me"),
- }
- assert.NoError(t, pp.TryUpsert()) // new project should work
- pp.ConfigUpdateNumber = 5
- pp.Owner = utility.ToStringPtr("you")
- assert.NoError(t, pp.TryUpsert()) // should not update and should not error
- pp, err := ParserProjectFindOneById(pp.Id)
- assert.NoError(t, err)
- require.NotNil(t, pp)
- assert.Equal(t, "me", utility.FromStringPtr(pp.Owner))
- },
- } {
- t.Run(testName, func(t *testing.T) {
- require.NoError(t, db.ClearCollections(ParserProjectCollection))
- testCase(t)
- })
- }
-}
+func TestParserProjectStorage(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
-func TestParserProjectRoundtrip(t *testing.T) {
- filepath := filepath.Join(testutil.GetDirectoryOfFile(), "..", "self-tests.yml")
- yml, err := ioutil.ReadFile(filepath)
- assert.NoError(t, err)
-
- original, err := createIntermediateProject(yml, false)
- assert.NoError(t, err)
+ env := &mock.Environment{}
+ require.NoError(t, env.Configure(ctx))
- // to and from yaml
- yamlBytes, err := yaml.Marshal(original)
- assert.NoError(t, err)
- pp := &ParserProject{}
- assert.NoError(t, yaml.Unmarshal(yamlBytes, pp))
+ testutil.ConfigureIntegrationTest(t, env.Settings(), t.Name())
- // to and from BSON
- bsonBytes, err := bson.Marshal(original)
- assert.NoError(t, err)
- bsonPP := &ParserProject{}
- assert.NoError(t, bson.Unmarshal(bsonBytes, bsonPP))
+ c := utility.GetHTTPClient()
+ defer utility.PutHTTPClient(c)
- // ensure bson actually worked
- newBytes, err := yaml.Marshal(bsonPP)
- assert.NoError(t, err)
- assert.True(t, bytes.Equal(yamlBytes, newBytes))
-}
+ ppConf := env.Settings().Providers.AWS.ParserProject
+ bucket, err := pail.NewS3BucketWithHTTPClient(c, pail.S3Options{
+ Name: ppConf.Bucket,
+ Region: endpoints.UsEast1RegionID,
+ Credentials: pail.CreateAWSCredentials(ppConf.Key, ppConf.Secret, ""),
+ })
+ require.NoError(t, err)
+ defer func() {
+ assert.NoError(t, bucket.RemovePrefix(ctx, ppConf.Prefix))
+ }()
-func TestParserProjectPersists(t *testing.T) {
- simpleYaml := `
+ for methodName, ppStorageMethod := range map[string]evergreen.ParserProjectStorageMethod{
+ "DB": evergreen.ProjectStorageMethodDB,
+ "S3": evergreen.ProjectStorageMethodS3,
+ } {
+ t.Run("StorageMethod"+methodName, func(t *testing.T) {
+ for testName, testCase := range map[string]func(ctx context.Context, t *testing.T, env *mock.Environment){
+ "FindOneByIDReturnsNilErrorAndResultForNonexistentParserProject": func(ctx context.Context, t *testing.T, env *mock.Environment) {
+ ppStorage, err := GetParserProjectStorage(env.Settings(), ppStorageMethod)
+ require.NoError(t, err)
+ defer ppStorage.Close(ctx)
+
+ pp, err := ppStorage.FindOneByID(ctx, "nonexistent")
+ assert.NoError(t, err)
+ assert.Zero(t, pp)
+ },
+ "FindOneByIDWithFieldsReturnsNilErrorAndResultForNonexistentParserProject": func(ctx context.Context, t *testing.T, env *mock.Environment) {
+ ppStorage, err := GetParserProjectStorage(env.Settings(), ppStorageMethod)
+ require.NoError(t, err)
+ defer ppStorage.Close(ctx)
+
+ pp, err := ppStorage.FindOneByIDWithFields(ctx, "nonexistent", ParserProjectBuildVariantsKey)
+ assert.NoError(t, err)
+ assert.Zero(t, pp)
+ },
+ "UpsertCreatesNewParserProject": func(ctx context.Context, t *testing.T, env *mock.Environment) {
+ pp := &ParserProject{
+ Id: "my-project",
+ Owner: utility.ToStringPtr("me"),
+ }
+ ppStorage, err := GetParserProjectStorage(env.Settings(), ppStorageMethod)
+ require.NoError(t, err)
+ defer ppStorage.Close(ctx)
+
+ assert.NoError(t, ppStorage.UpsertOne(ctx, pp))
+
+ pp, err = ppStorage.FindOneByID(ctx, pp.Id)
+ assert.NoError(t, err)
+ require.NotNil(t, pp)
+ assert.Equal(t, "me", utility.FromStringPtr(pp.Owner))
+ },
+ "UpsertUpdatesExistingParserProject": func(ctx context.Context, t *testing.T, env *mock.Environment) {
+ pp := &ParserProject{
+ Id: "my-project",
+ Owner: utility.ToStringPtr("me"),
+ }
+ ppStorage, err := GetParserProjectStorage(env.Settings(), ppStorageMethod)
+ require.NoError(t, err)
+ defer ppStorage.Close(ctx)
+
+ assert.NoError(t, ppStorage.UpsertOne(ctx, pp))
+ pp.Owner = utility.ToStringPtr("you")
+ assert.NoError(t, ppStorage.UpsertOne(ctx, pp))
+
+ pp, err = ppStorage.FindOneByID(ctx, pp.Id)
+ assert.NoError(t, err)
+ require.NotNil(t, pp)
+ assert.Equal(t, "you", utility.FromStringPtr(pp.Owner))
+ },
+ "PersistsSimpleYAML": func(ctx context.Context, t *testing.T, env *mock.Environment) {
+ simpleYAML := `
loggers:
agent:
- type: something
@@ -1643,39 +1830,44 @@ buildvariants:
- name: "task_1"
batchtime: 60
`
+ checkProjectPersists(ctx, t, env, []byte(simpleYAML), ppStorageMethod)
+ },
+ "PersistsEvergreenSelfTestsYAML": func(ctx context.Context, t *testing.T, env *mock.Environment) {
+ filepath := filepath.Join(testutil.GetDirectoryOfFile(), "..", "self-tests.yml")
+ yml, err := os.ReadFile(filepath)
+ assert.NoError(t, err)
+ checkProjectPersists(ctx, t, env, yml, ppStorageMethod)
+ },
+ } {
+ t.Run(testName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(ParserProjectCollection))
+ require.NoError(t, bucket.RemovePrefix(ctx, ppConf.Prefix))
- for name, test := range map[string]func(t *testing.T){
- "simpleYaml": func(t *testing.T) {
- checkProjectPersists(t, []byte(simpleYaml))
- },
- "self-tests.yml": func(t *testing.T) {
- filepath := filepath.Join(testutil.GetDirectoryOfFile(), "..", "self-tests.yml")
-
- yml, err := ioutil.ReadFile(filepath)
- assert.NoError(t, err)
- checkProjectPersists(t, yml)
- },
- } {
- t.Run(name, func(t *testing.T) {
- assert.NoError(t, db.ClearCollections(ParserProjectCollection))
- test(t)
+ testCase(ctx, t, env)
+ })
+ }
})
}
}
-func checkProjectPersists(t *testing.T, yml []byte) {
+func checkProjectPersists(ctx context.Context, t *testing.T, env evergreen.Environment, yml []byte, ppStorageMethod evergreen.ParserProjectStorageMethod) {
pp, err := createIntermediateProject(yml, false)
assert.NoError(t, err)
pp.Id = "my-project"
pp.Identifier = utility.ToStringPtr("old-project-identifier")
- pp.ConfigUpdateNumber = 1
+
+ ppStorage, err := GetParserProjectStorage(env.Settings(), ppStorageMethod)
+ require.NoError(t, err)
+ defer ppStorage.Close(ctx)
yamlToCompare, err := yaml.Marshal(pp)
assert.NoError(t, err)
- assert.NoError(t, pp.TryUpsert())
- newPP, err := ParserProjectFindOneById(pp.Id)
+ assert.NoError(t, ppStorage.UpsertOne(ctx, pp))
+
+ newPP, err := ppStorage.FindOneByID(ctx, pp.Id)
assert.NoError(t, err)
+ require.NotZero(t, newPP)
newYaml, err := yaml.Marshal(newPP)
assert.NoError(t, err)
@@ -1688,10 +1880,11 @@ func checkProjectPersists(t *testing.T, yml []byte) {
pp.Id = "my-project"
pp.Identifier = utility.ToStringPtr("new-project-identifier")
- assert.NoError(t, pp.TryUpsert())
+ assert.NoError(t, ppStorage.UpsertOne(ctx, pp))
- newPP, err = ParserProjectFindOneById(pp.Id)
+ newPP, err = ppStorage.FindOneByID(ctx, pp.Id)
assert.NoError(t, err)
+ require.NotZero(t, newPP)
assert.Equal(t, newPP.Identifier, pp.Identifier)
@@ -1704,6 +1897,32 @@ func checkProjectPersists(t *testing.T, yml []byte) {
}
}
+func TestParserProjectRoundtrip(t *testing.T) {
+ filepath := filepath.Join(testutil.GetDirectoryOfFile(), "..", "self-tests.yml")
+ yml, err := os.ReadFile(filepath)
+ assert.NoError(t, err)
+
+ original, err := createIntermediateProject(yml, false)
+ assert.NoError(t, err)
+
+ // to and from yaml
+ yamlBytes, err := yaml.Marshal(original)
+ assert.NoError(t, err)
+ pp := &ParserProject{}
+ assert.NoError(t, yaml.Unmarshal(yamlBytes, pp))
+
+ // to and from BSON
+ bsonBytes, err := bson.Marshal(original)
+ assert.NoError(t, err)
+ bsonPP := &ParserProject{}
+ assert.NoError(t, bson.Unmarshal(bsonBytes, bsonPP))
+
+ // ensure bson actually worked
+ newBytes, err := yaml.Marshal(bsonPP)
+ assert.NoError(t, err)
+ assert.True(t, bytes.Equal(yamlBytes, newBytes))
+}
+
func TestMergeUnorderedUnique(t *testing.T) {
main := &ParserProject{
Tasks: []parserTask{
@@ -1736,12 +1955,12 @@ func TestMergeUnorderedUnique(t *testing.T) {
},
},
Functions: map[string]*YAMLCommandSet{
- "func1": &YAMLCommandSet{
+ "func1": {
SingleCommand: &PluginCommandConf{
Command: "single_command",
},
},
- "func2": &YAMLCommandSet{
+ "func2": {
MultiCommand: []PluginCommandConf{
{
Command: "multi_command1",
@@ -2360,7 +2579,7 @@ ignore:
assert.Equal(t, len(p1.Functions), 2)
assert.Equal(t, len(p1.Tasks), 2)
assert.Equal(t, len(p1.Ignore), 3)
- assert.Equal(t, p1.Stepback, boolPtr(true))
+ assert.Equal(t, p1.Stepback, utility.TruePtr())
assert.NotEqual(t, p1.Post, nil)
}
@@ -2456,3 +2675,82 @@ func TestUpdateForFile(t *testing.T) {
// should be changed to patch diff because it's not a modified file
}
+
+func TestFindAndTranslateProjectForPatch(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ env := &mock.Environment{}
+ require.NoError(t, env.Configure(ctx))
+
+ defer func() {
+ assert.NoError(t, db.ClearCollections(ParserProjectCollection, patch.Collection))
+ }()
+
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, p *patch.Patch, pp *ParserProject){
+ "SucceedsWithUnfinalizedPatch": func(ctx context.Context, t *testing.T, p *patch.Patch, pp *ParserProject) {
+ p.ProjectStorageMethod = evergreen.ProjectStorageMethodDB
+ require.NoError(t, p.Insert())
+ require.NoError(t, pp.Insert())
+
+ project, ppFromDB, err := FindAndTranslateProjectForPatch(ctx, env.Settings(), p)
+ require.NoError(t, err)
+ require.NotZero(t, pp)
+ require.NotZero(t, project)
+ assert.Equal(t, utility.FromStringPtr(pp.DisplayName), utility.FromStringPtr(ppFromDB.DisplayName))
+ assert.Equal(t, utility.FromStringPtr(pp.DisplayName), project.DisplayName)
+ },
+ "SucceedsWithFinalizedPatch": func(ctx context.Context, t *testing.T, p *patch.Patch, pp *ParserProject) {
+ v := Version{
+ Id: p.Id.Hex(),
+ ProjectStorageMethod: evergreen.ProjectStorageMethodDB,
+ }
+ require.NoError(t, v.Insert())
+
+ p.Activated = true
+ p.Version = v.Id
+ require.NoError(t, p.Insert())
+ require.NoError(t, pp.Insert())
+
+ project, ppFromDB, err := FindAndTranslateProjectForPatch(ctx, env.Settings(), p)
+ require.NoError(t, err)
+ require.NotZero(t, ppFromDB)
+ require.NotZero(t, project)
+ assert.Equal(t, utility.FromStringPtr(pp.DisplayName), utility.FromStringPtr(ppFromDB.DisplayName))
+ assert.Equal(t, utility.FromStringPtr(pp.DisplayName), project.DisplayName)
+ },
+ "SucceedsWithDeprecatedPatchedParserProject": func(ctx context.Context, t *testing.T, p *patch.Patch, pp *ParserProject) {
+ yamlPP, err := yaml.Marshal(pp)
+ require.NoError(t, err)
+ p.PatchedParserProject = string(yamlPP)
+ require.NoError(t, p.Insert())
+
+ project, ppFromPatch, err := FindAndTranslateProjectForPatch(ctx, env.Settings(), p)
+ require.NoError(t, err)
+ require.NotZero(t, ppFromPatch)
+ require.NotZero(t, project)
+ assert.Equal(t, utility.FromStringPtr(pp.DisplayName), utility.FromStringPtr(ppFromPatch.DisplayName))
+ assert.Equal(t, utility.FromStringPtr(pp.DisplayName), project.DisplayName)
+ },
+ "FailsWithoutStoredParserProject": func(ctx context.Context, t *testing.T, p *patch.Patch, pp *ParserProject) {
+ p.ProjectStorageMethod = evergreen.ProjectStorageMethodDB
+ require.NoError(t, p.Insert())
+
+ _, _, err := FindAndTranslateProjectForPatch(ctx, env.Settings(), p)
+ assert.Error(t, err)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(ParserProjectCollection, VersionCollection, patch.Collection))
+ p := patch.Patch{
+ Id: mgobson.NewObjectId(),
+ }
+ pp := ParserProject{
+ Id: p.Id.Hex(),
+ DisplayName: utility.ToStringPtr("display-name"),
+ }
+
+ tCase(ctx, t, &p, &pp)
+ })
+ }
+}
diff --git a/model/project_ref.go b/model/project_ref.go
index 20a2a2c2ba5..8b94d1d1f12 100644
--- a/model/project_ref.go
+++ b/model/project_ref.go
@@ -4,6 +4,8 @@ import (
"context"
"encoding/base64"
"fmt"
+ "net/http"
+ "net/url"
"os"
"path/filepath"
"reflect"
@@ -11,11 +13,13 @@ import (
"strings"
"time"
+ "github.com/evergreen-ci/cocoa"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/db"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
"github.com/evergreen-ci/evergreen/model/build"
+ "github.com/evergreen-ci/evergreen/model/commitqueue"
"github.com/evergreen-ci/evergreen/model/event"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
@@ -44,7 +48,7 @@ type ProjectRef struct {
Identifier string `bson:"identifier" json:"identifier" yaml:"identifier"`
DisplayName string `bson:"display_name" json:"display_name,omitempty" yaml:"display_name"`
- Enabled *bool `bson:"enabled,omitempty" json:"enabled,omitempty" yaml:"enabled"`
+ Enabled bool `bson:"enabled,omitempty" json:"enabled,omitempty" yaml:"enabled"`
Private *bool `bson:"private,omitempty" json:"private,omitempty" yaml:"private"`
Restricted *bool `bson:"restricted,omitempty" json:"restricted,omitempty" yaml:"restricted"`
Owner string `bson:"owner_name" json:"owner_name" yaml:"owner"`
@@ -54,22 +58,21 @@ type ProjectRef struct {
PatchingDisabled *bool `bson:"patching_disabled,omitempty" json:"patching_disabled,omitempty"`
RepotrackerDisabled *bool `bson:"repotracker_disabled,omitempty" json:"repotracker_disabled,omitempty" yaml:"repotracker_disabled"`
DispatchingDisabled *bool `bson:"dispatching_disabled,omitempty" json:"dispatching_disabled,omitempty" yaml:"dispatching_disabled"`
+ StepbackDisabled *bool `bson:"stepback_disabled,omitempty" json:"stepback_disabled,omitempty" yaml:"stepback_disabled"`
VersionControlEnabled *bool `bson:"version_control_enabled,omitempty" json:"version_control_enabled,omitempty" yaml:"version_control_enabled"`
PRTestingEnabled *bool `bson:"pr_testing_enabled,omitempty" json:"pr_testing_enabled,omitempty" yaml:"pr_testing_enabled"`
ManualPRTestingEnabled *bool `bson:"manual_pr_testing_enabled,omitempty" json:"manual_pr_testing_enabled,omitempty" yaml:"manual_pr_testing_enabled"`
GithubChecksEnabled *bool `bson:"github_checks_enabled,omitempty" json:"github_checks_enabled,omitempty" yaml:"github_checks_enabled"`
BatchTime int `bson:"batch_time" json:"batch_time" yaml:"batchtime"`
DeactivatePrevious *bool `bson:"deactivate_previous,omitempty" json:"deactivate_previous,omitempty" yaml:"deactivate_previous"`
- DefaultLogger string `bson:"default_logger" json:"default_logger" yaml:"default_logger"`
NotifyOnBuildFailure *bool `bson:"notify_on_failure,omitempty" json:"notify_on_failure,omitempty"`
Triggers []TriggerDefinition `bson:"triggers" json:"triggers"`
// all aliases defined for the project
PatchTriggerAliases []patch.PatchTriggerDefinition `bson:"patch_trigger_aliases" json:"patch_trigger_aliases"`
// all PatchTriggerAliases applied to github patch intents
- GithubTriggerAliases []string `bson:"github_trigger_aliases" json:"github_trigger_aliases"`
- PeriodicBuilds []PeriodicBuildDefinition `bson:"periodic_builds" json:"periodic_builds"`
- CedarTestResultsEnabled *bool `bson:"cedar_test_results_enabled,omitempty" json:"cedar_test_results_enabled,omitempty" yaml:"cedar_test_results_enabled"`
- CommitQueue CommitQueueParams `bson:"commit_queue" json:"commit_queue" yaml:"commit_queue"`
+ GithubTriggerAliases []string `bson:"github_trigger_aliases" json:"github_trigger_aliases"`
+ PeriodicBuilds []PeriodicBuildDefinition `bson:"periodic_builds" json:"periodic_builds"`
+ CommitQueue CommitQueueParams `bson:"commit_queue" json:"commit_queue" yaml:"commit_queue"`
// Admins contain a list of users who are able to access the projects page.
Admins []string `bson:"admins" json:"admins"`
@@ -93,12 +96,12 @@ type ProjectRef struct {
// between what is in GitHub and what is in Evergreen
RepotrackerError *RepositoryErrorDetails `bson:"repotracker_error" json:"repotracker_error"`
- // List of regular expressions describing files to ignore when caching historical test results
- FilesIgnoredFromCache []string `bson:"files_ignored_from_cache" json:"files_ignored_from_cache"`
- DisabledStatsCache *bool `bson:"disabled_stats_cache,omitempty" json:"disabled_stats_cache,omitempty"`
+ // Disable task stats caching for this project.
+ DisabledStatsCache *bool `bson:"disabled_stats_cache,omitempty" json:"disabled_stats_cache,omitempty"`
// List of commands
- WorkstationConfig WorkstationConfig `bson:"workstation_config,omitempty" json:"workstation_config,omitempty"`
+ // Lacks omitempty so that SetupCommands can be identified as either [] or nil in a ProjectSettingsEvent
+ WorkstationConfig WorkstationConfig `bson:"workstation_config" json:"workstation_config"`
// TaskAnnotationSettings holds settings for the file ticket button in the Task Annotations to call custom webhooks when clicked
TaskAnnotationSettings evergreen.AnnotationsSettings `bson:"task_annotation_settings,omitempty" json:"task_annotation_settings,omitempty"`
@@ -108,21 +111,33 @@ type ProjectRef struct {
PerfEnabled *bool `bson:"perf_enabled,omitempty" json:"perf_enabled,omitempty" yaml:"perf_enabled,omitempty"`
// Container settings
- ContainerSizes map[string]ContainerResources `bson:"container_sizes,omitempty" json:"container_sizes,omitempty" yaml:"container_sizes,omitempty"`
- ContainerCredentials map[string]ContainerCredential `bson:"container_credentials,omitempty" json:"container_credentials,omitempty" yaml:"container_credentials,omitempty"`
+ ContainerSizeDefinitions []ContainerResources `bson:"container_size_definitions,omitempty" json:"container_size_definitions,omitempty" yaml:"container_size_definitions,omitempty"`
+ ContainerSecrets []ContainerSecret `bson:"container_secrets,omitempty" json:"container_secrets,omitempty" yaml:"container_secrets,omitempty"`
RepoRefId string `bson:"repo_ref_id" json:"repo_ref_id" yaml:"repo_ref_id"`
// The following fields are used by Evergreen and are not discoverable.
// Hidden determines whether or not the project is discoverable/tracked in the UI
- Hidden *bool `bson:"hidden,omitempty" json:"hidden,omitempty"`
+ Hidden *bool `bson:"hidden,omitempty" json:"hidden,omitempty"`
+ DefaultLogger string `bson:"default_logger,omitempty" json:"default_logger,omitempty"`
+
+ ExternalLinks []ExternalLink `bson:"external_links,omitempty" json:"external_links,omitempty" yaml:"external_links,omitempty"`
+ Banner ProjectBanner `bson:"banner,omitempty" json:"banner,omitempty" yaml:"banner,omitempty"`
+}
+
+type ProjectBanner struct {
+ Theme evergreen.BannerTheme `bson:"theme" json:"theme"`
+ Text string `bson:"text" json:"text"`
+}
+type ExternalLink struct {
+ DisplayName string `bson:"display_name,omitempty" json:"display_name,omitempty" yaml:"display_name,omitempty"`
+ URLTemplate string `bson:"url_template,omitempty" json:"url_template,omitempty" yaml:"url_template,omitempty"`
}
type CommitQueueParams struct {
- Enabled *bool `bson:"enabled" json:"enabled" yaml:"enabled"`
- RequireSigned *bool `bson:"require_signed" json:"require_signed" yaml:"require_signed"`
- MergeMethod string `bson:"merge_method" json:"merge_method" yaml:"merge_method"`
- Message string `bson:"message,omitempty" json:"message,omitempty" yaml:"message"`
+ Enabled *bool `bson:"enabled" json:"enabled" yaml:"enabled"`
+ MergeMethod string `bson:"merge_method" json:"merge_method" yaml:"merge_method"`
+ Message string `bson:"message,omitempty" json:"message,omitempty" yaml:"message"`
}
// TaskSyncOptions contains information about which features are allowed for
@@ -153,16 +168,50 @@ type AlertConfig struct {
// CPU is the CPU units that will be allocated. 1024 CPU units is
// equivalent to 1vCPU.
type ContainerResources struct {
- MemoryMB int `bson:"memory_mb,omitempty" json:"memory_mb" yaml:"memory_mb"`
- CPU int `bson:"cpu,omitempty" json:"cpu" yaml:"cpu"`
+ Name string `bson:"name,omitempty" json:"name" yaml:"name"`
+ MemoryMB int `bson:"memory_mb,omitempty" json:"memory_mb" yaml:"memory_mb"`
+ CPU int `bson:"cpu,omitempty" json:"cpu" yaml:"cpu"`
}
-// ContainerCredential specifies the username and password required for authentication
+// ContainerSecret specifies the username and password required for authentication
// on a private image repository. The credential is saved in AWS Secrets Manager upon
// saving to the ProjectRef
-type ContainerCredential struct {
- Username string `bson:"username,omitempty" json:"username" yaml:"username"`
- Password string `bson:"password,omitempty" json:"password" yaml:"password"`
+type ContainerSecret struct {
+ // Name is the user-friendly display name of the secret.
+ Name string `bson:"name" json:"name" yaml:"name"`
+ // Type is the type of secret that is stored.
+ Type ContainerSecretType `bson:"type" json:"type" yaml:"type"`
+ // ExternalName is the name of the stored secret.
+ ExternalName string `bson:"external_name" json:"external_name" yaml:"external_name"`
+ // ExternalID is the unique resource identifier for the secret. This can be
+ // used to access and modify the secret.
+ ExternalID string `bson:"external_id" json:"external_id" yaml:"external_id"`
+ // Value is the plaintext value of the secret. This is not stored and must
+ // be retrieved using the external ID.
+ Value string `bson:"-" json:"-" yaml:"-"`
+}
+
+// ContainerSecretType represents a particular type of container secret, which
+// designates its purpose.
+type ContainerSecretType string
+
+const (
+ // ContainerSecretPodSecret is a container secret representing the Evergreen
+ // agent's pod secret.
+ ContainerSecretPodSecret ContainerSecretType = "pod_secret"
+ // ContainerSecretRepoCreds is a container secret representing an image
+ // repository's credentials.
+ ContainerSecretRepoCreds ContainerSecretType = "repository_credentials"
+)
+
+// Validate checks that the container secret type is recognized.
+func (t ContainerSecretType) Validate() error {
+ switch t {
+ case ContainerSecretPodSecret, ContainerSecretRepoCreds:
+ return nil
+ default:
+ return errors.Errorf("unrecognized container secret type '%s'", t)
+ }
}
type TriggerDefinition struct {
@@ -187,6 +236,7 @@ type PeriodicBuildDefinition struct {
ID string `bson:"id" json:"id"`
ConfigFile string `bson:"config_file" json:"config_file"`
IntervalHours int `bson:"interval_hours" json:"interval_hours"`
+ Cron string `bson:"cron" json:"cron"`
Alias string `bson:"alias,omitempty" json:"alias,omitempty"`
Message string `bson:"message,omitempty" json:"message,omitempty"`
NextRunTime time.Time `bson:"next_run_time,omitempty" json:"next_run_time,omitempty"`
@@ -222,57 +272,58 @@ type EmailAlertData struct {
var (
// bson fields for the ProjectRef struct
- ProjectRefIdKey = bsonutil.MustHaveTag(ProjectRef{}, "Id")
- ProjectRefOwnerKey = bsonutil.MustHaveTag(ProjectRef{}, "Owner")
- ProjectRefRepoKey = bsonutil.MustHaveTag(ProjectRef{}, "Repo")
- ProjectRefBranchKey = bsonutil.MustHaveTag(ProjectRef{}, "Branch")
- ProjectRefEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "Enabled")
- ProjectRefPrivateKey = bsonutil.MustHaveTag(ProjectRef{}, "Private")
- ProjectRefRestrictedKey = bsonutil.MustHaveTag(ProjectRef{}, "Restricted")
- ProjectRefBatchTimeKey = bsonutil.MustHaveTag(ProjectRef{}, "BatchTime")
- ProjectRefIdentifierKey = bsonutil.MustHaveTag(ProjectRef{}, "Identifier")
- ProjectRefRepoRefIdKey = bsonutil.MustHaveTag(ProjectRef{}, "RepoRefId")
- ProjectRefDisplayNameKey = bsonutil.MustHaveTag(ProjectRef{}, "DisplayName")
- ProjectRefDeactivatePreviousKey = bsonutil.MustHaveTag(ProjectRef{}, "DeactivatePrevious")
- ProjectRefRemotePathKey = bsonutil.MustHaveTag(ProjectRef{}, "RemotePath")
- ProjectRefHiddenKey = bsonutil.MustHaveTag(ProjectRef{}, "Hidden")
- ProjectRefRepotrackerError = bsonutil.MustHaveTag(ProjectRef{}, "RepotrackerError")
- ProjectRefFilesIgnoredFromCacheKey = bsonutil.MustHaveTag(ProjectRef{}, "FilesIgnoredFromCache")
- ProjectRefDisabledStatsCacheKey = bsonutil.MustHaveTag(ProjectRef{}, "DisabledStatsCache")
- ProjectRefAdminsKey = bsonutil.MustHaveTag(ProjectRef{}, "Admins")
- ProjectRefGitTagAuthorizedUsersKey = bsonutil.MustHaveTag(ProjectRef{}, "GitTagAuthorizedUsers")
- ProjectRefGitTagAuthorizedTeamsKey = bsonutil.MustHaveTag(ProjectRef{}, "GitTagAuthorizedTeams")
- projectRefDefaultLoggerKey = bsonutil.MustHaveTag(ProjectRef{}, "DefaultLogger")
- projectRefCedarTestResultsEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "CedarTestResultsEnabled")
- projectRefPRTestingEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "PRTestingEnabled")
- projectRefManualPRTestingEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "ManualPRTestingEnabled")
- projectRefGithubChecksEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "GithubChecksEnabled")
- projectRefGitTagVersionsEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "GitTagVersionsEnabled")
- projectRefRepotrackerDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "RepotrackerDisabled")
- projectRefCommitQueueKey = bsonutil.MustHaveTag(ProjectRef{}, "CommitQueue")
- projectRefTaskSyncKey = bsonutil.MustHaveTag(ProjectRef{}, "TaskSync")
- projectRefPatchingDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "PatchingDisabled")
- projectRefDispatchingDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "DispatchingDisabled")
- projectRefVersionControlEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "VersionControlEnabled")
- projectRefNotifyOnFailureKey = bsonutil.MustHaveTag(ProjectRef{}, "NotifyOnBuildFailure")
- projectRefSpawnHostScriptPathKey = bsonutil.MustHaveTag(ProjectRef{}, "SpawnHostScriptPath")
- projectRefTriggersKey = bsonutil.MustHaveTag(ProjectRef{}, "Triggers")
- projectRefPatchTriggerAliasesKey = bsonutil.MustHaveTag(ProjectRef{}, "PatchTriggerAliases")
- projectRefGithubTriggerAliasesKey = bsonutil.MustHaveTag(ProjectRef{}, "GithubTriggerAliases")
- projectRefPeriodicBuildsKey = bsonutil.MustHaveTag(ProjectRef{}, "PeriodicBuilds")
- projectRefWorkstationConfigKey = bsonutil.MustHaveTag(ProjectRef{}, "WorkstationConfig")
- projectRefTaskAnnotationSettingsKey = bsonutil.MustHaveTag(ProjectRef{}, "TaskAnnotationSettings")
- projectRefBuildBaronSettingsKey = bsonutil.MustHaveTag(ProjectRef{}, "BuildBaronSettings")
- projectRefPerfEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "PerfEnabled")
-
- commitQueueEnabledKey = bsonutil.MustHaveTag(CommitQueueParams{}, "Enabled")
- triggerDefinitionProjectKey = bsonutil.MustHaveTag(TriggerDefinition{}, "Project")
+ ProjectRefIdKey = bsonutil.MustHaveTag(ProjectRef{}, "Id")
+ ProjectRefOwnerKey = bsonutil.MustHaveTag(ProjectRef{}, "Owner")
+ ProjectRefRepoKey = bsonutil.MustHaveTag(ProjectRef{}, "Repo")
+ ProjectRefBranchKey = bsonutil.MustHaveTag(ProjectRef{}, "Branch")
+ ProjectRefEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "Enabled")
+ ProjectRefPrivateKey = bsonutil.MustHaveTag(ProjectRef{}, "Private")
+ ProjectRefRestrictedKey = bsonutil.MustHaveTag(ProjectRef{}, "Restricted")
+ ProjectRefBatchTimeKey = bsonutil.MustHaveTag(ProjectRef{}, "BatchTime")
+ ProjectRefIdentifierKey = bsonutil.MustHaveTag(ProjectRef{}, "Identifier")
+ ProjectRefRepoRefIdKey = bsonutil.MustHaveTag(ProjectRef{}, "RepoRefId")
+ ProjectRefDisplayNameKey = bsonutil.MustHaveTag(ProjectRef{}, "DisplayName")
+ ProjectRefDeactivatePreviousKey = bsonutil.MustHaveTag(ProjectRef{}, "DeactivatePrevious")
+ ProjectRefRemotePathKey = bsonutil.MustHaveTag(ProjectRef{}, "RemotePath")
+ ProjectRefHiddenKey = bsonutil.MustHaveTag(ProjectRef{}, "Hidden")
+ ProjectRefRepotrackerError = bsonutil.MustHaveTag(ProjectRef{}, "RepotrackerError")
+ ProjectRefDisabledStatsCacheKey = bsonutil.MustHaveTag(ProjectRef{}, "DisabledStatsCache")
+ ProjectRefAdminsKey = bsonutil.MustHaveTag(ProjectRef{}, "Admins")
+ ProjectRefGitTagAuthorizedUsersKey = bsonutil.MustHaveTag(ProjectRef{}, "GitTagAuthorizedUsers")
+ ProjectRefGitTagAuthorizedTeamsKey = bsonutil.MustHaveTag(ProjectRef{}, "GitTagAuthorizedTeams")
+ ProjectRefTracksPushEventsKey = bsonutil.MustHaveTag(ProjectRef{}, "TracksPushEvents")
+ projectRefPRTestingEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "PRTestingEnabled")
+ projectRefManualPRTestingEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "ManualPRTestingEnabled")
+ projectRefGithubChecksEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "GithubChecksEnabled")
+ projectRefGitTagVersionsEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "GitTagVersionsEnabled")
+ projectRefRepotrackerDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "RepotrackerDisabled")
+ projectRefCommitQueueKey = bsonutil.MustHaveTag(ProjectRef{}, "CommitQueue")
+ projectRefTaskSyncKey = bsonutil.MustHaveTag(ProjectRef{}, "TaskSync")
+ projectRefPatchingDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "PatchingDisabled")
+ projectRefDispatchingDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "DispatchingDisabled")
+ projectRefStepbackDisabledKey = bsonutil.MustHaveTag(ProjectRef{}, "StepbackDisabled")
+ projectRefVersionControlEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "VersionControlEnabled")
+ projectRefNotifyOnFailureKey = bsonutil.MustHaveTag(ProjectRef{}, "NotifyOnBuildFailure")
+ projectRefSpawnHostScriptPathKey = bsonutil.MustHaveTag(ProjectRef{}, "SpawnHostScriptPath")
+ projectRefTriggersKey = bsonutil.MustHaveTag(ProjectRef{}, "Triggers")
+ projectRefPatchTriggerAliasesKey = bsonutil.MustHaveTag(ProjectRef{}, "PatchTriggerAliases")
+ projectRefGithubTriggerAliasesKey = bsonutil.MustHaveTag(ProjectRef{}, "GithubTriggerAliases")
+ projectRefPeriodicBuildsKey = bsonutil.MustHaveTag(ProjectRef{}, "PeriodicBuilds")
+ projectRefWorkstationConfigKey = bsonutil.MustHaveTag(ProjectRef{}, "WorkstationConfig")
+ projectRefTaskAnnotationSettingsKey = bsonutil.MustHaveTag(ProjectRef{}, "TaskAnnotationSettings")
+ projectRefBuildBaronSettingsKey = bsonutil.MustHaveTag(ProjectRef{}, "BuildBaronSettings")
+ projectRefPerfEnabledKey = bsonutil.MustHaveTag(ProjectRef{}, "PerfEnabled")
+ projectRefContainerSecretsKey = bsonutil.MustHaveTag(ProjectRef{}, "ContainerSecrets")
+ projectRefContainerSizeDefinitionsKey = bsonutil.MustHaveTag(ProjectRef{}, "ContainerSizeDefinitions")
+ projectRefExternalLinksKey = bsonutil.MustHaveTag(ProjectRef{}, "ExternalLinks")
+ projectRefBannerKey = bsonutil.MustHaveTag(ProjectRef{}, "Banner")
+
+ commitQueueEnabledKey = bsonutil.MustHaveTag(CommitQueueParams{}, "Enabled")
+ triggerDefinitionProjectKey = bsonutil.MustHaveTag(TriggerDefinition{}, "Project")
+ containerSecretExternalNameKey = bsonutil.MustHaveTag(ContainerSecret{}, "ExternalName")
+ containerSecretExternalIDKey = bsonutil.MustHaveTag(ContainerSecret{}, "ExternalID")
)
-func (p *ProjectRef) IsEnabled() bool {
- return utility.FromBoolPtr(p.Enabled)
-}
-
func (p *ProjectRef) IsPrivate() bool {
return utility.FromBoolPtr(p.Private)
}
@@ -297,6 +348,10 @@ func (p *ProjectRef) IsPRTestingEnabled() bool {
return p.IsAutoPRTestingEnabled() || p.IsManualPRTestingEnabled()
}
+func (p *ProjectRef) IsStepbackDisabled() bool {
+ return utility.FromBoolPtr(p.StepbackDisabled)
+}
+
func (p *ProjectRef) IsAutoPRTestingEnabled() bool {
return utility.FromBoolPtr(p.PRTestingEnabled)
}
@@ -328,10 +383,6 @@ func (p *ProjectRef) ShouldNotifyOnBuildFailure() bool {
return utility.FromBoolPtr(p.NotifyOnBuildFailure)
}
-func (p *ProjectRef) IsCedarTestResultsEnabled() bool {
- return utility.FromBoolPtr(p.CedarTestResultsEnabled)
-}
-
func (p *ProjectRef) IsGitTagVersionsEnabled() bool {
return utility.FromBoolPtr(p.GitTagVersionsEnabled)
}
@@ -402,11 +453,11 @@ const (
ProjectPageTriggersSection = "TRIGGERS"
ProjectPagePeriodicBuildsSection = "PERIODIC_BUILDS"
ProjectPagePluginSection = "PLUGINS"
+ ProjectPageContainerSection = "CONTAINERS"
)
const (
- tasksByProjectQueryMaxTime = 90 * time.Second
- tasksByProjectMaxNumVersions = 1000
+ tasksByProjectQueryMaxTime = 90 * time.Second
)
var adminPermissions = gimlet.Permissions{
@@ -424,8 +475,9 @@ func (p *ProjectRef) Add(creator *user.DBUser) error {
if p.Id == "" {
p.Id = mgobson.NewObjectId().Hex()
}
- // Ensure that any new project is originally explicitly disabled.
- p.Enabled = utility.FalsePtr()
+ // Ensure that any new project is originally explicitly disabled and set to private.
+ p.Enabled = false
+ p.Private = utility.TruePtr()
// if a hidden project exists for this configuration, use that ID
if p.Owner != "" && p.Repo != "" && p.Branch != "" {
@@ -451,6 +503,20 @@ func (p *ProjectRef) Add(creator *user.DBUser) error {
if err != nil {
return errors.Wrap(err, "inserting project ref")
}
+ if err = commitqueue.EnsureCommitQueueExistsForProject(p.Id); err != nil {
+ grip.Error(message.WrapError(err, message.Fields{
+ "message": "error ensuring commit queue exists",
+ "project_id": p.Id,
+ "project_identifier": p.Identifier,
+ }))
+ }
+
+ newProjectVars := ProjectVars{
+ Id: p.Id,
+ }
+ if err = newProjectVars.Insert(); err != nil {
+ return errors.Wrapf(err, "adding project variables for project '%s'", p.Id)
+ }
return p.addPermissions(creator)
}
@@ -467,7 +533,7 @@ func (p *ProjectRef) GetPatchTriggerAlias(aliasName string) (patch.PatchTriggerD
// MergeWithProjectConfig looks up the project config with the given project ref id and modifies
// the project ref scanning for any properties that can be set on both project ref and project parser.
// Any values that are set at the project config level will be set on the project ref IF they are not set on
-// the project ref.
+// the project ref. If the version isn't specified, we get the latest config.
func (p *ProjectRef) MergeWithProjectConfig(version string) (err error) {
projectConfig, err := FindProjectConfigForProjectOrVersion(p.Id, version)
if err != nil {
@@ -478,9 +544,8 @@ func (p *ProjectRef) MergeWithProjectConfig(version string) (err error) {
err = recovery.HandlePanicWithError(recover(), err, "project ref and project config structures do not match")
}()
pRefToMerge := ProjectRef{
- PeriodicBuilds: projectConfig.PeriodicBuilds,
- GithubTriggerAliases: projectConfig.GithubTriggerAliases,
- ContainerSizes: projectConfig.ContainerSizes,
+ GithubTriggerAliases: projectConfig.GithubTriggerAliases,
+ ContainerSizeDefinitions: projectConfig.ContainerSizeDefinitions,
}
if projectConfig.WorkstationConfig != nil {
pRefToMerge.WorkstationConfig = *projectConfig.WorkstationConfig
@@ -631,8 +696,16 @@ func (p *ProjectRef) DetachFromRepo(u *user.DBUser) error {
// AttachToRepo adds the branch to the relevant repo scopes, and updates the project to point to the repo.
// Any values that previously were unset will now use the repo value, unless this would introduce
-// a Github project conflict. If no repo ref currently exists, the user attaching it will be added as the repo ref admin.
+// a GitHub project conflict. If no repo ref currently exists, the user attaching it will be added as the repo ref admin.
func (p *ProjectRef) AttachToRepo(u *user.DBUser) error {
+ // Before allowing a project to attach to a repo, verify that this is a valid GitHub organization.
+ config, err := evergreen.GetConfig()
+ if err != nil {
+ return errors.Wrap(err, "getting config")
+ }
+ if err := p.ValidateOwnerAndRepo(config.GithubOrgs); err != nil {
+ return errors.Wrap(err, "validating new owner/repo")
+ }
before, err := GetProjectSettingsById(p.Id, false)
if err != nil {
return errors.Wrap(err, "getting before project settings event")
@@ -645,7 +718,8 @@ func (p *ProjectRef) AttachToRepo(u *user.DBUser) error {
}
update = p.addGithubConflictsToUpdate(update)
err = db.UpdateId(ProjectRefCollection, p.Id, bson.M{
- "$set": update,
+ "$set": update,
+ "$unset": bson.M{ProjectRefTracksPushEventsKey: 1},
})
if err != nil {
return errors.Wrap(err, "attaching repo to scope")
@@ -683,12 +757,15 @@ func (p *ProjectRef) AttachToNewRepo(u *user.DBUser) error {
ProjectRefRepoRefIdKey: p.RepoRefId,
}
update = p.addGithubConflictsToUpdate(update)
+
err = db.UpdateId(ProjectRefCollection, p.Id, bson.M{
- "$set": update,
+ "$set": update,
+ "$unset": bson.M{ProjectRefTracksPushEventsKey: 1},
})
if err != nil {
return errors.Wrap(err, "updating owner/repo in the DB")
}
+
return GetAndLogProjectModified(p.Id, u.Id, false, before)
}
@@ -706,7 +783,7 @@ func (p *ProjectRef) addGithubConflictsToUpdate(update bson.M) bson.M {
}))
return update
}
- if mergedProject.IsEnabled() {
+ if mergedProject.Enabled {
conflicts, err := mergedProject.GetGithubProjectConflicts()
if err != nil {
grip.Debug(message.WrapError(err, message.Fields{
@@ -808,12 +885,6 @@ func (projectRef *ProjectRef) Update() error {
)
}
-func (projectRef *ProjectRef) checkDefaultLogger() {
- if projectRef.DefaultLogger == "" {
- projectRef.DefaultLogger = evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger
- }
-}
-
func findOneProjectRefQ(query db.Q) (*ProjectRef, error) {
projectRef := &ProjectRef{}
err := db.FindOneQ(ProjectRefCollection, query, projectRef)
@@ -821,7 +892,6 @@ func findOneProjectRefQ(query db.Q) (*ProjectRef, error) {
return nil, nil
}
- projectRef.checkDefaultLogger()
return projectRef, err
}
@@ -865,6 +935,43 @@ func FindMergedProjectRef(identifier string, version string, includeProjectConfi
return pRef, nil
}
+// GetNumberOfEnabledProjects returns the current number of enabled projects on evergreen.
+func GetNumberOfEnabledProjects() (int, error) {
+ // Empty owner and repo will return all enabled project count.
+ return getNumberOfEnabledProjects("", "")
+}
+
+// GetNumberOfEnabledProjectsForOwnerRepo returns the number of enabled projects for a given owner/repo.
+func GetNumberOfEnabledProjectsForOwnerRepo(owner, repo string) (int, error) {
+ if owner == "" || repo == "" {
+ return 0, errors.New("owner and repo must be specified")
+ }
+ return getNumberOfEnabledProjects(owner, repo)
+}
+
+func getNumberOfEnabledProjects(owner, repo string) (int, error) {
+ pipeline := []bson.M{
+ {"$match": bson.M{ProjectRefEnabledKey: true}},
+ }
+ if owner != "" && repo != "" {
+ // Check owner and repos in project ref or repo ref.
+ pipeline = append(pipeline, bson.M{"$match": byOwnerAndRepo(owner, repo)})
+ }
+ pipeline = append(pipeline, bson.M{"$count": "count"})
+ type Count struct {
+ Count int `bson:"count"`
+ }
+ count := []Count{}
+ err := db.Aggregate(ProjectRefCollection, pipeline, &count)
+ if err != nil {
+ return 0, err
+ }
+ if len(count) == 0 {
+ return 0, nil
+ }
+ return count[0].Count, nil
+}
+
// GetProjectRefMergedWithRepo merges the project with the repo, if one exists.
// Otherwise, it will return the project as given.
func GetProjectRefMergedWithRepo(pRef ProjectRef) (*ProjectRef, error) {
@@ -921,15 +1028,14 @@ func setRepoFieldsFromProjects(repoRef *RepoRef, projectRefs []ProjectRef) {
func (p *ProjectRef) createNewRepoRef(u *user.DBUser) (repoRef *RepoRef, err error) {
repoRef = &RepoRef{ProjectRef{
- Enabled: utility.TruePtr(),
- Admins: []string{},
+ Admins: []string{},
}}
allEnabledProjects, err := FindMergedEnabledProjectRefsByOwnerAndRepo(p.Owner, p.Repo)
if err != nil {
return nil, errors.Wrap(err, "finding all enabled projects")
}
- // for every setting in the project ref, if all enabled projects have the same setting, then use that
+ // For every setting in the project ref, if all enabled projects have the same setting, then use that.
defer func() {
err = recovery.HandlePanicWithError(recover(), err, "project and repo structures do not match")
}()
@@ -937,14 +1043,25 @@ func (p *ProjectRef) createNewRepoRef(u *user.DBUser) (repoRef *RepoRef, err err
if !utility.StringSliceContains(repoRef.Admins, u.Username()) {
repoRef.Admins = append(repoRef.Admins, u.Username())
}
- // some fields shouldn't be set from projects
+ // Some fields shouldn't be set from projects.
repoRef.Id = mgobson.NewObjectId().Hex()
repoRef.RepoRefId = ""
- // set explicitly in case no project is enabled
+ repoRef.Identifier = ""
+
+ // Set explicitly in case no project is enabled.
repoRef.Owner = p.Owner
repoRef.Repo = p.Repo
+ _, err = EnableWebhooks(context.Background(), &repoRef.ProjectRef)
+ if err != nil {
+ grip.Debug(message.WrapError(err, message.Fields{
+ "message": "error enabling webhooks",
+ "repo_id": repoRef.Id,
+ "owner": repoRef.Owner,
+ "repo": repoRef.Repo,
+ }))
+ }
- // creates scope and give user admin access to repo
+ // Creates scope and give user admin access to repo.
if err = repoRef.Add(u); err != nil {
return nil, errors.Wrapf(err, "adding new repo repo ref for '%s/%s'", p.Owner, p.Repo)
}
@@ -1095,7 +1212,14 @@ func CountProjectRefsWithIdentifier(identifier string) (int, error) {
return db.CountQ(ProjectRefCollection, byId(identifier))
}
-// GetTasksWithOptions will find the last number of tasks (denoted by Limit) that exist for a given project.
+type GetProjectTasksOpts struct {
+ Limit int `json:"num_versions"`
+ BuildVariant string `json:"build_variant"`
+ StartAt int `json:"start_at"`
+ Requesters []string `json:"requesters"`
+}
+
+// GetTasksWithOptions will find the matching tasks run in the last number of versions(denoted by Limit) that exist for a given project.
// This function may also filter on tasks running on a specific build variant, or tasks that come after a specific revision order number.
func GetTasksWithOptions(projectName string, taskName string, opts GetProjectTasksOpts) ([]task.Task, error) {
projectId, err := GetIdForProject(projectName)
@@ -1111,6 +1235,11 @@ func GetTasksWithOptions(projectName string, taskName string, opts GetProjectTas
task.DisplayNameKey: taskName,
task.StatusKey: bson.M{"$in": finishedStatuses},
}
+ if len(opts.Requesters) > 0 {
+ match[task.RequesterKey] = bson.M{"$in": opts.Requesters}
+ } else {
+ match[task.RequesterKey] = bson.M{"$in": evergreen.SystemVersionRequesterTypes}
+ }
if opts.BuildVariant != "" {
match[task.BuildVariantKey] = opts.BuildVariant
}
@@ -1127,35 +1256,38 @@ func GetTasksWithOptions(projectName string, taskName string, opts GetProjectTas
}
match["$and"] = []bson.M{
{task.RevisionOrderNumberKey: bson.M{"$lte": startingRevision}},
- {task.RevisionOrderNumberKey: bson.M{"$gte": startingRevision - tasksByProjectMaxNumVersions}},
+ {task.RevisionOrderNumberKey: bson.M{"$gte": startingRevision - opts.Limit + 1}},
}
pipeline := []bson.M{{"$match": match}}
pipeline = append(pipeline, bson.M{"$sort": bson.M{task.RevisionOrderNumberKey: -1}})
- pipeline = append(pipeline, bson.M{"$limit": opts.Limit})
res := []task.Task{}
- if _, err = db.AggregateWithMaxTime(task.Collection, pipeline, &res, tasksByProjectQueryMaxTime); err != nil {
+ if err = db.AggregateWithMaxTime(task.Collection, pipeline, &res, tasksByProjectQueryMaxTime); err != nil {
return nil, errors.Wrapf(err, "aggregating tasks")
}
return res, nil
}
func FindFirstProjectRef() (*ProjectRef, error) {
- projectRef := &ProjectRef{}
+ projectRefSlice := []ProjectRef{}
pipeline := projectRefPipelineForValueIsBool(ProjectRefPrivateKey, RepoRefPrivateKey, false)
- pipeline = append(pipeline, bson.M{"$sort": "-" + ProjectRefDisplayNameKey}, bson.M{"$limit": 1})
+ pipeline = append(pipeline, bson.M{"$sort": bson.M{ProjectRefDisplayNameKey: -1}}, bson.M{"$limit": 1})
err := db.Aggregate(
ProjectRefCollection,
pipeline,
- projectRef,
+ &projectRefSlice,
)
if err != nil {
return nil, errors.Wrap(err, "aggregating project ref")
}
- projectRef.checkDefaultLogger()
- return projectRef, nil
+ if len(projectRefSlice) == 0 {
+ return nil, errors.New("No project found in FindFirstProjectRef")
+ }
+ projectRef := projectRefSlice[0]
+
+ return &projectRef, nil
}
// FindAllMergedTrackedProjectRefs returns all project refs in the db
@@ -1176,7 +1308,6 @@ func FindAllMergedTrackedProjectRefs() ([]ProjectRef, error) {
func addLoggerAndRepoSettingsToProjects(pRefs []ProjectRef) ([]ProjectRef, error) {
repoRefs := map[string]*RepoRef{} // cache repoRefs by id
for i, pRef := range pRefs {
- pRefs[i].checkDefaultLogger()
if pRefs[i].UseRepoSettings() {
repoRef := repoRefs[pRef.RepoRefId]
if repoRef == nil {
@@ -1202,21 +1333,32 @@ func addLoggerAndRepoSettingsToProjects(pRefs []ProjectRef) ([]ProjectRef, error
// FindAllMergedProjectRefs returns all project refs in the db, with repo ref information merged
func FindAllMergedProjectRefs() ([]ProjectRef, error) {
- return FindProjectRefsQ(bson.M{})
+ return findProjectRefsQ(bson.M{}, true)
+}
+
+func FindMergedProjectRefsByIds(ids ...string) ([]ProjectRef, error) {
+ if len(ids) == 0 {
+ return nil, nil
+ }
+ return findProjectRefsQ(bson.M{
+ ProjectRefIdKey: bson.M{
+ "$in": ids,
+ },
+ }, true)
}
func FindProjectRefsByIds(ids ...string) ([]ProjectRef, error) {
if len(ids) == 0 {
return nil, nil
}
- return FindProjectRefsQ(bson.M{
+ return findProjectRefsQ(bson.M{
ProjectRefIdKey: bson.M{
"$in": ids,
},
- })
+ }, false)
}
-func FindProjectRefsQ(filter bson.M) ([]ProjectRef, error) {
+func findProjectRefsQ(filter bson.M, merged bool) ([]ProjectRef, error) {
projectRefs := []ProjectRef{}
q := db.Query(filter)
err := db.FindAllQ(ProjectRefCollection, q, &projectRefs)
@@ -1224,7 +1366,10 @@ func FindProjectRefsQ(filter bson.M) ([]ProjectRef, error) {
return nil, err
}
- return addLoggerAndRepoSettingsToProjects(projectRefs)
+ if merged {
+ return addLoggerAndRepoSettingsToProjects(projectRefs)
+ }
+ return projectRefs, nil
}
func byOwnerAndRepo(owner, repoName string) bson.M {
@@ -1267,8 +1412,10 @@ func byId(identifier string) db.Q {
func FindMergedEnabledProjectRefsByRepoAndBranch(owner, repoName, branch string) ([]ProjectRef, error) {
projectRefs := []ProjectRef{}
- pipeline := []bson.M{{"$match": byOwnerRepoAndBranch(owner, repoName, branch, true)}}
- pipeline = append(pipeline, projectRefPipelineForValueIsBool(ProjectRefEnabledKey, RepoRefEnabledKey, true)...)
+ match := byOwnerRepoAndBranch(owner, repoName, branch, true)
+ match[ProjectRefEnabledKey] = true
+ pipeline := []bson.M{{"$match": match}}
+ pipeline = append(pipeline, lookupRepoStep)
err := db.Aggregate(ProjectRefCollection, pipeline, &projectRefs)
if err != nil {
return nil, err
@@ -1338,9 +1485,6 @@ func FindDownstreamProjects(project string) ([]ProjectRef, error) {
return nil, err
}
- for i := range projectRefs {
- projectRefs[i].checkDefaultLogger()
- }
return projectRefs, err
}
@@ -1354,7 +1498,6 @@ func FindOneProjectRefByRepoAndBranchWithPRTesting(owner, repo, branch, calledBy
}
for _, p := range projectRefs {
if p.IsPRTestingEnabledByCaller(calledBy) {
- p.checkDefaultLogger()
return &p, nil
}
}
@@ -1374,7 +1517,7 @@ func FindOneProjectRefByRepoAndBranchWithPRTesting(owner, repo, branch, calledBy
if err != nil {
return nil, errors.Wrapf(err, "finding merged repo refs for repo '%s/%s'", owner, repo)
}
- if repoRef == nil || !repoRef.IsEnabled() || !repoRef.IsPRTestingEnabledByCaller(calledBy) || repoRef.RemotePath == "" {
+ if repoRef == nil || !repoRef.IsPRTestingEnabledByCaller(calledBy) || repoRef.RemotePath == "" {
grip.Debug(message.Fields{
"source": "find project ref for PR testing",
"message": "repo ref not configured for PR testing untracked branches",
@@ -1394,7 +1537,7 @@ func FindOneProjectRefByRepoAndBranchWithPRTesting(owner, repo, branch, calledBy
// if a disabled project exists, then return early
var hiddenProject *ProjectRef
for i, p := range projectRefs {
- if !p.IsEnabled() && !p.IsHidden() {
+ if !p.Enabled && !p.IsHidden() {
grip.Debug(message.Fields{
"source": "find project ref for PR testing",
"message": "project ref is disabled, not PR testing",
@@ -1423,7 +1566,7 @@ func FindOneProjectRefByRepoAndBranchWithPRTesting(owner, repo, branch, calledBy
Repo: repo,
Branch: branch,
RepoRefId: repoRef.Id,
- Enabled: utility.FalsePtr(),
+ Enabled: false,
Hidden: utility.TruePtr(),
}
if err = hiddenProject.Add(nil); err != nil {
@@ -1441,10 +1584,9 @@ func FindOneProjectRefByRepoAndBranchWithPRTesting(owner, repo, branch, calledBy
return hiddenProject, nil
}
-// FindBranchProjectRef finds the project ref for this owner/repo/branch that has the commit queue enabled.
-// There should only ever be one project for the query because we only enable commit queue if
-// no other project ref with the same specification has it enabled.
-
+// FindOneProjectRefWithCommitQueueByOwnerRepoAndBranch finds the project ref for this owner/repo/branch
+// that has the commit queue enabled. There should only ever be one project for the query because we only enable commit
+// queue if no other project ref with the same specification has it enabled.
func FindOneProjectRefWithCommitQueueByOwnerRepoAndBranch(owner, repo, branch string) (*ProjectRef, error) {
projectRefs, err := FindMergedEnabledProjectRefsByRepoAndBranch(owner, repo, branch)
if err != nil {
@@ -1453,7 +1595,6 @@ func FindOneProjectRefWithCommitQueueByOwnerRepoAndBranch(owner, repo, branch st
}
for _, p := range projectRefs {
if p.CommitQueue.IsEnabled() {
- p.checkDefaultLogger()
return &p, nil
}
}
@@ -1489,7 +1630,6 @@ func EnableWebhooks(ctx context.Context, projectRef *ProjectRef) (bool, error) {
// sometimes people change a project to track a personal
// branch we don't have access to
grip.Error(message.WrapError(err, message.Fields{
- "source": "patch project",
"message": "can't setup webhook",
"project": projectRef.Id,
"project_identifier": projectRef.Identifier,
@@ -1545,8 +1685,10 @@ func FindHiddenProjectRefByOwnerRepoAndBranch(owner, repo, branch string) (*Proj
func FindMergedEnabledProjectRefsByOwnerAndRepo(owner, repo string) ([]ProjectRef, error) {
projectRefs := []ProjectRef{}
- pipeline := []bson.M{{"$match": byOwnerAndRepo(owner, repo)}}
- pipeline = append(pipeline, projectRefPipelineForValueIsBool(ProjectRefEnabledKey, RepoRefEnabledKey, true)...)
+ match := byOwnerAndRepo(owner, repo)
+ match[ProjectRefEnabledKey] = true
+ pipeline := []bson.M{{"$match": match}}
+ pipeline = append(pipeline, lookupRepoStep)
err := db.Aggregate(ProjectRefCollection, pipeline, &projectRefs)
if err != nil {
return nil, err
@@ -1575,7 +1717,6 @@ func FindMergedProjectRefsForRepo(repoRef *RepoRef) ([]ProjectRef, error) {
}
for i := range projectRefs {
- projectRefs[i].checkDefaultLogger()
if projectRefs[i].UseRepoSettings() {
mergedProject, err := mergeBranchAndRepoSettings(&projectRefs[i], repoRef)
if err != nil {
@@ -1665,9 +1806,12 @@ func UpdateOwnerAndRepoForBranchProjects(repoId, owner, repo string) error {
})
}
-func FindProjectRefsWithCommitQueueEnabled() ([]ProjectRef, error) {
+// FindProjectRefIdsWithCommitQueueEnabled returns a list of project IDs that have the commit queue enabled.
+// We don't return the full projects since they aren't actually merged with the repo documents, so they
+// aren't necessarily accurate.
+func FindProjectRefIdsWithCommitQueueEnabled() ([]string, error) {
projectRefs := []ProjectRef{}
-
+ res := []string{}
err := db.Aggregate(
ProjectRefCollection,
projectRefPipelineForCommitQueueEnabled(),
@@ -1675,31 +1819,28 @@ func FindProjectRefsWithCommitQueueEnabled() ([]ProjectRef, error) {
if err != nil {
return nil, err
}
-
- for i := range projectRefs {
- projectRefs[i].checkDefaultLogger()
+ for _, p := range projectRefs {
+ res = append(res, p.Id)
}
- return projectRefs, nil
+ return res, nil
}
+// FindPeriodicProjects returns a list of merged projects that have periodic builds defined.
func FindPeriodicProjects() ([]ProjectRef, error) {
- projectRefs := []ProjectRef{}
+ res := []ProjectRef{}
- err := db.Aggregate(
- ProjectRefCollection,
- projectRefPipelineForPeriodicBuilds(),
- &projectRefs,
- )
+ projectRefs, err := FindAllMergedTrackedProjectRefs()
if err != nil {
return nil, err
}
-
- for i := range projectRefs {
- projectRefs[i].checkDefaultLogger()
+ for _, p := range projectRefs {
+ if p.Enabled && len(p.PeriodicBuilds) > 0 {
+ res = append(res, p)
+ }
}
- return projectRefs, nil
+ return res, nil
}
// FindProjectRefs returns limit refs starting at project id key in the sortDir direction.
@@ -1718,10 +1859,6 @@ func FindProjectRefs(key string, limit int, sortDir int) ([]ProjectRef, error) {
q := db.Query(filter).Sort([]string{sortSpec}).Limit(limit)
err := db.FindAllQ(ProjectRefCollection, q, &projectRefs)
- for i := range projectRefs {
- projectRefs[i].checkDefaultLogger()
- }
-
return projectRefs, err
}
@@ -1756,34 +1893,44 @@ func SaveProjectPageForSection(projectId string, p *ProjectRef, section ProjectP
return false, errors.New("can't default project ref for a repo")
}
}
+ defaultToRepo := false
if p == nil {
+ defaultToRepo = true
p = &ProjectRef{} // use a blank project ref to default the section to repo
}
+
var err error
switch section {
case ProjectPageGeneralSection:
setUpdate := bson.M{
- ProjectRefEnabledKey: p.Enabled,
- ProjectRefBranchKey: p.Branch,
- ProjectRefDisplayNameKey: p.DisplayName,
- ProjectRefIdentifierKey: p.Identifier,
- ProjectRefBatchTimeKey: p.BatchTime,
- ProjectRefRemotePathKey: p.RemotePath,
- projectRefSpawnHostScriptPathKey: p.SpawnHostScriptPath,
- projectRefDispatchingDisabledKey: p.DispatchingDisabled,
- projectRefVersionControlEnabledKey: p.VersionControlEnabled,
- ProjectRefDeactivatePreviousKey: p.DeactivatePrevious,
- projectRefRepotrackerDisabledKey: p.RepotrackerDisabled,
- projectRefDefaultLoggerKey: p.DefaultLogger,
- projectRefCedarTestResultsEnabledKey: p.CedarTestResultsEnabled,
- projectRefPatchingDisabledKey: p.PatchingDisabled,
- projectRefTaskSyncKey: p.TaskSync,
- ProjectRefDisabledStatsCacheKey: p.DisabledStatsCache,
- ProjectRefFilesIgnoredFromCacheKey: p.FilesIgnoredFromCache,
- }
- if !isRepo && !p.UseRepoSettings() {
+ ProjectRefBranchKey: p.Branch,
+ ProjectRefBatchTimeKey: p.BatchTime,
+ ProjectRefRemotePathKey: p.RemotePath,
+ projectRefSpawnHostScriptPathKey: p.SpawnHostScriptPath,
+ projectRefDispatchingDisabledKey: p.DispatchingDisabled,
+ projectRefStepbackDisabledKey: p.StepbackDisabled,
+ projectRefVersionControlEnabledKey: p.VersionControlEnabled,
+ ProjectRefDeactivatePreviousKey: p.DeactivatePrevious,
+ projectRefRepotrackerDisabledKey: p.RepotrackerDisabled,
+ projectRefPatchingDisabledKey: p.PatchingDisabled,
+ projectRefTaskSyncKey: p.TaskSync,
+ ProjectRefDisabledStatsCacheKey: p.DisabledStatsCache,
+ }
+ // Unlike other fields, this will only be set if we're actually modifying it since it's used by the backend.
+ if p.TracksPushEvents != nil {
+ setUpdate[ProjectRefTracksPushEventsKey] = p.TracksPushEvents
+ }
+ // Allow a user to modify owner and repo only if they are editing an unattached project
+ if !isRepo && !p.UseRepoSettings() && !defaultToRepo {
setUpdate[ProjectRefOwnerKey] = p.Owner
setUpdate[ProjectRefRepoKey] = p.Repo
+
+ }
+ // some fields shouldn't be set to nil when defaulting to the repo
+ if !defaultToRepo {
+ setUpdate[ProjectRefEnabledKey] = p.Enabled
+ setUpdate[ProjectRefDisplayNameKey] = p.DisplayName
+ setUpdate[ProjectRefIdentifierKey] = p.Identifier
}
err = db.Update(coll,
bson.M{ProjectRefIdKey: projectId},
@@ -1791,6 +1938,23 @@ func SaveProjectPageForSection(projectId string, p *ProjectRef, section ProjectP
"$set": setUpdate,
})
case ProjectPagePluginSection:
+ catcher := grip.NewSimpleCatcher()
+ for _, link := range p.ExternalLinks {
+ if link.DisplayName != "" && link.URLTemplate != "" {
+ // check length of link display name
+ if len(link.DisplayName) > 40 {
+ catcher.Add(errors.New(fmt.Sprintf("link display name, %s, must be 40 characters or less", link.DisplayName)))
+ }
+ // validate url template
+ formattedURL := strings.Replace(link.URLTemplate, "{version_id}", "version_id", -1)
+ if _, err := url.ParseRequestURI(formattedURL); err != nil {
+ catcher.Add(err)
+ }
+ }
+ }
+ if catcher.HasErrors() {
+ return false, errors.Wrapf(catcher.Resolve(), "validating external links")
+ }
err = db.Update(coll,
bson.M{ProjectRefIdKey: projectId},
bson.M{
@@ -1798,6 +1962,7 @@ func SaveProjectPageForSection(projectId string, p *ProjectRef, section ProjectP
projectRefTaskAnnotationSettingsKey: p.TaskAnnotationSettings,
projectRefBuildBaronSettingsKey: p.BuildBaronSettings,
projectRefPerfEnabledKey: p.PerfEnabled,
+ projectRefExternalLinksKey: p.ExternalLinks,
},
})
case ProjectPageAccessSection:
@@ -1805,7 +1970,6 @@ func SaveProjectPageForSection(projectId string, p *ProjectRef, section ProjectP
bson.M{ProjectRefIdKey: projectId},
bson.M{
"$set": bson.M{
- ProjectRefPrivateKey: p.Private,
ProjectRefRestrictedKey: p.Restricted,
ProjectRefAdminsKey: p.Admins,
},
@@ -1828,7 +1992,8 @@ func SaveProjectPageForSection(projectId string, p *ProjectRef, section ProjectP
err = db.Update(coll,
bson.M{ProjectRefIdKey: projectId},
bson.M{
- "$set": bson.M{projectRefNotifyOnFailureKey: p.NotifyOnBuildFailure},
+ "$set": bson.M{projectRefNotifyOnFailureKey: p.NotifyOnBuildFailure,
+ projectRefBannerKey: p.Banner},
})
case ProjectPageWorkstationsSection:
err = db.Update(coll,
@@ -1860,6 +2025,21 @@ func SaveProjectPageForSection(projectId string, p *ProjectRef, section ProjectP
bson.M{
"$set": bson.M{projectRefPeriodicBuildsKey: p.PeriodicBuilds},
})
+ case ProjectPageContainerSection:
+ catcher := grip.NewSimpleCatcher()
+ for _, size := range p.ContainerSizeDefinitions {
+ if err = size.Validate(evergreen.GetEnvironment().Settings().Providers.AWS.Pod.ECS); err != nil {
+ catcher.Add(errors.Wrapf(err, "validating container size '%s'", size.Name))
+ }
+ }
+ if catcher.HasErrors() {
+ return false, errors.Wrapf(catcher.Resolve(), "validating container size definitions")
+ }
+ err = db.Update(coll,
+ bson.M{ProjectRefIdKey: projectId},
+ bson.M{
+ "$set": bson.M{projectRefContainerSizeDefinitionsKey: p.ContainerSizeDefinitions},
+ })
case ProjectPageVariablesSection:
// this section doesn't modify the project/repo ref
return false, nil
@@ -1973,18 +2153,25 @@ func handleBatchTimeOverflow(in int) int {
return in
}
-// return the next valid batch time
-func GetActivationTimeWithCron(curTime time.Time, cronBatchTime string) (time.Time, error) {
+// GetNextCronTime returns the next valid batch time
+func GetNextCronTime(curTime time.Time, cronBatchTime string) (time.Time, error) {
+ sched, err := getCronParserSchedule(cronBatchTime)
+ if err != nil {
+ return time.Time{}, err
+ }
+ return sched.Next(curTime), nil
+}
- if strings.HasPrefix(cronBatchTime, intervalPrefix) {
- return time.Time{}, errors.Errorf("cannot use interval '%s' in cron batchtime '%s'", intervalPrefix, cronBatchTime)
+func getCronParserSchedule(cronStr string) (cron.Schedule, error) {
+ if strings.HasPrefix(cronStr, intervalPrefix) {
+ return nil, errors.Errorf("cannot use interval '%s' in cron '%s'", intervalPrefix, cronStr)
}
parser := cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.DowOptional | cron.Descriptor)
- sched, err := parser.Parse(cronBatchTime)
+ sched, err := parser.Parse(cronStr)
if err != nil {
- return time.Time{}, errors.Wrapf(err, "parsing cron batchtime '%s'", cronBatchTime)
+ return nil, errors.Wrapf(err, "parsing cron '%s'", cronStr)
}
- return sched.Next(curTime), nil
+ return sched, nil
}
func (p *ProjectRef) GetActivationTimeForVariant(variant *BuildVariant) (time.Time, error) {
@@ -1994,7 +2181,7 @@ func (p *ProjectRef) GetActivationTimeForVariant(variant *BuildVariant) (time.Ti
return utility.ZeroTime, nil
}
if variant.CronBatchTime != "" {
- return GetActivationTimeWithCron(time.Now(), variant.CronBatchTime)
+ return GetNextCronTime(time.Now(), variant.CronBatchTime)
}
// if activated explicitly set to true and we don't have batchtime, then we want to just activate now
if utility.FromBoolPtr(variant.Activate) && variant.BatchTime == nil {
@@ -2025,13 +2212,13 @@ func (p *ProjectRef) GetActivationTimeForVariant(variant *BuildVariant) (time.Ti
func (p *ProjectRef) GetActivationTimeForTask(t *BuildVariantTaskUnit) (time.Time, error) {
defaultRes := time.Now()
// if we don't want to activate the task, set batchtime to the zero time
- if !utility.FromBoolTPtr(t.Activate) {
+ if !utility.FromBoolTPtr(t.Activate) || t.IsDisabled() {
return utility.ZeroTime, nil
}
if t.CronBatchTime != "" {
- return GetActivationTimeWithCron(time.Now(), t.CronBatchTime)
+ return GetNextCronTime(time.Now(), t.CronBatchTime)
}
- // if activated explicitly set to true and we don't have batchtime, then we want to just activate now
+ // If activated explicitly set to true and we don't have batchtime, then we want to just activate now
if utility.FromBoolPtr(t.Activate) && t.BatchTime == nil {
return time.Now(), nil
}
@@ -2090,13 +2277,73 @@ func (p *ProjectRef) GetGithubProjectConflicts() (GithubProjectConflicts, error)
return res, nil
}
+// shouldValidateTotalProjectLimit will return true if:
+// - we are creating a new project
+// - the original project was disabled
+func shouldValidateTotalProjectLimit(isNewProject bool, originalMergedRef *ProjectRef) bool {
+ return isNewProject || !originalMergedRef.Enabled
+}
+
+// shouldValidateOwnerRepoLimit will return true if:
+// - we are creating a new project
+// - the original project was disabled
+// - the owner or repo has changed
+// - the owner/repo is not part of exception
+func shouldValidateOwnerRepoLimit(isNewProject bool, config *evergreen.Settings, originalMergedRef, mergedRefToValidate *ProjectRef) bool {
+ return (shouldValidateTotalProjectLimit(isNewProject, originalMergedRef) ||
+ originalMergedRef.Owner != mergedRefToValidate.Owner || originalMergedRef.Repo != mergedRefToValidate.Repo) &&
+ !config.ProjectCreation.IsExceptionToRepoLimit(mergedRefToValidate.Owner, mergedRefToValidate.Repo)
+}
+
+// ValidateEnabledProjectsLimit takes in a the original and new merged project refs and validates project limits,
+// assuming the given project is going to be enabled.
+// Returns a status code and error if we are already at limit with enabled projects.
+func ValidateEnabledProjectsLimit(projectId string, config *evergreen.Settings, originalMergedRef, mergedRefToValidate *ProjectRef) (int, error) {
+ if config.ProjectCreation.TotalProjectLimit == 0 || config.ProjectCreation.RepoProjectLimit == 0 {
+ return http.StatusOK, nil
+ }
+
+ isNewProject := originalMergedRef == nil
+ catcher := grip.NewBasicCatcher()
+ if shouldValidateTotalProjectLimit(isNewProject, originalMergedRef) {
+ allEnabledProjects, err := GetNumberOfEnabledProjects()
+ if err != nil {
+ return http.StatusInternalServerError, errors.Wrap(err, "getting number of enabled projects")
+ }
+ if allEnabledProjects >= config.ProjectCreation.TotalProjectLimit {
+ catcher.Errorf("total enabled project limit of %d reached", config.ProjectCreation.TotalProjectLimit)
+ }
+ }
+
+ if shouldValidateOwnerRepoLimit(isNewProject, config, originalMergedRef, mergedRefToValidate) {
+ enabledOwnerRepoProjects, err := GetNumberOfEnabledProjectsForOwnerRepo(mergedRefToValidate.Owner, mergedRefToValidate.Repo)
+ if err != nil {
+ return http.StatusInternalServerError, errors.Wrapf(err, "getting number of projects for '%s/%s'", mergedRefToValidate.Owner, mergedRefToValidate.Repo)
+ }
+ if enabledOwnerRepoProjects >= config.ProjectCreation.RepoProjectLimit {
+ catcher.Errorf("enabled project limit of %d reached for '%s/%s'", config.ProjectCreation.RepoProjectLimit, mergedRefToValidate.Owner, mergedRefToValidate.Repo)
+ }
+ }
+
+ if catcher.HasErrors() {
+ return http.StatusBadRequest, catcher.Resolve()
+ }
+ return http.StatusOK, nil
+}
+
+// ValidateProjectRefAndSetDefaults validates the project ref and sets default values.
+// Should only be called on enabled project refs or repo refs.
func (p *ProjectRef) ValidateOwnerAndRepo(validOrgs []string) error {
// verify input and webhooks
if p.Owner == "" || p.Repo == "" {
return errors.New("no owner/repo specified")
}
- if len(validOrgs) > 0 && !utility.StringSliceContains(validOrgs, p.Owner) {
+ return validateOwner(p.Owner, validOrgs)
+}
+
+func validateOwner(owner string, validOrgs []string) error {
+ if len(validOrgs) > 0 && !utility.StringSliceContains(validOrgs, owner) {
return errors.New("owner not authorized")
}
return nil
@@ -2351,47 +2598,67 @@ func (p *ProjectRef) GetProjectSetupCommands(opts apimodels.WorkstationSetupComm
return cmds, nil
}
-func (p *ProjectRef) UpdateNextPeriodicBuild(definition string, nextRun time.Time) error {
- for i, d := range p.PeriodicBuilds {
- if d.ID == definition {
- d.NextRunTime = nextRun
- p.PeriodicBuilds[i] = d
- break
+// UpdateNextPeriodicBuild updates the periodic build run time for either the project
+// or repo ref depending on where it's defined.
+func UpdateNextPeriodicBuild(projectId string, definition *PeriodicBuildDefinition) error {
+ var nextRunTime time.Time
+ var err error
+ baseTime := definition.NextRunTime
+ if utility.IsZeroTime(baseTime) {
+ baseTime = time.Now()
+ }
+ if definition.IntervalHours > 0 {
+ nextRunTime = baseTime.Add(time.Duration(definition.IntervalHours) * time.Hour)
+ } else {
+ nextRunTime, err = GetNextCronTime(baseTime, definition.Cron)
+ if err != nil {
+ return errors.Wrap(err, "getting next run time with cron")
}
}
+ // Get the branch project on its own so we can determine where to update the run time.
+ projectRef, err := FindBranchProjectRef(projectId)
+ if err != nil {
+ return errors.Wrap(err, "finding branch project")
+ }
+ if projectRef == nil {
+ return errors.Errorf("project '%s' not found", projectId)
+ }
+
collection := ProjectRefCollection
- idKey := ProjectRefIdKey
buildsKey := projectRefPeriodicBuildsKey
- if p.UseRepoSettings() {
- // if the periodic build is part of the repo then update there instead
- repoRef, err := FindOneRepoRef(p.RepoRefId)
+ documentIdKey := ProjectRefIdKey
+ idToUpdate := projectRef.Id
+
+ // If periodic builds aren't defined for the project, see if it's part of the repo and update there instead.
+ if projectRef.PeriodicBuilds == nil && projectRef.UseRepoSettings() {
+ repoRef, err := FindOneRepoRef(projectRef.RepoRefId)
if err != nil {
return err
}
if repoRef == nil {
- return errors.New("couldn't find repo")
+ return errors.Errorf("repo '%s' not found", projectRef.RepoRefId)
}
for _, d := range repoRef.PeriodicBuilds {
- if d.ID == definition {
+ if d.ID == definition.ID {
collection = RepoRefCollection
- idKey = RepoRefIdKey
buildsKey = RepoRefPeriodicBuildsKey
+ documentIdKey = RepoRefIdKey
+ idToUpdate = projectRef.RepoRefId
}
}
-
}
filter := bson.M{
- idKey: p.Id,
+ documentIdKey: idToUpdate,
buildsKey: bson.M{
"$elemMatch": bson.M{
- "id": definition,
+ "id": definition.ID,
},
},
}
update := bson.M{
"$set": bson.M{
- bsonutil.GetDottedKeyName(buildsKey, "$", "next_run_time"): nextRun,
+ bsonutil.GetDottedKeyName(buildsKey, "$", "next_run_time"): nextRunTime,
},
}
@@ -2400,7 +2667,7 @@ func (p *ProjectRef) UpdateNextPeriodicBuild(definition string, nextRun time.Tim
func (p *ProjectRef) CommitQueueIsOn() error {
catcher := grip.NewBasicCatcher()
- if !p.IsEnabled() {
+ if !p.Enabled {
catcher.Add(errors.Errorf("project '%s' is disabled", p.Id))
}
if p.IsPatchingDisabled() {
@@ -2515,20 +2782,36 @@ func GetMessageForPatch(patchID string) (string, error) {
// ValidateContainers inspects the list of containers defined in the project YAML and checks that each
// are properly configured, and that their definitions can coexist with what is defined for container sizes
// on the project admin page.
-func ValidateContainers(pRef *ProjectRef, containers []Container) error {
+func ValidateContainers(ecsConf evergreen.ECSConfig, pRef *ProjectRef, containers []Container) error {
catcher := grip.NewSimpleCatcher()
for _, container := range containers {
catcher.Add(container.System.Validate())
if container.Resources != nil {
- catcher.Add(container.Resources.Validate())
+ catcher.Add(container.Resources.Validate(ecsConf))
}
- size, ok := pRef.ContainerSizes[container.Size]
- if ok {
- catcher.Add(size.Validate())
+ var containerSize *ContainerResources
+ for _, size := range pRef.ContainerSizeDefinitions {
+ if size.Name == container.Size {
+ containerSize = &size
+ break
+ }
+ }
+ if containerSize != nil {
+ catcher.Add(containerSize.Validate(ecsConf))
+ }
+ catcher.ErrorfWhen(container.Size != "" && containerSize == nil, "container size '%s' not found", container.Size)
+
+ if container.Credential != "" {
+ var matchingSecret *ContainerSecret
+ for _, cs := range pRef.ContainerSecrets {
+ if cs.Name == container.Credential {
+ matchingSecret = &cs
+ break
+ }
+ }
+ catcher.ErrorfWhen(matchingSecret == nil, "credential '%s' is not defined in project settings", container.Credential)
+ catcher.ErrorfWhen(matchingSecret != nil && matchingSecret.Type != ContainerSecretRepoCreds, "container credential named '%s' exists but is not valid for use as a repository credential", container.Credential)
}
- catcher.ErrorfWhen(container.Size != "" && !ok, "size '%s' is not defined anywhere", container.Size)
- _, ok = pRef.ContainerCredentials[container.Credential]
- catcher.ErrorfWhen(container.Credential != "" && !ok, "credential '%s' is not defined anywhere", container.Credential)
catcher.NewWhen(container.Size != "" && container.Resources != nil, "size and resources cannot both be defined")
catcher.NewWhen(container.Size == "" && container.Resources == nil, "either size or resources must be defined")
catcher.NewWhen(container.Image == "", "image must be defined")
@@ -2554,18 +2837,24 @@ func (c ContainerSystem) Validate() error {
}
// Validate that essential ContainerResources fields are properly defined.
-func (c ContainerResources) Validate() error {
+func (c ContainerResources) Validate(ecsConf evergreen.ECSConfig) error {
catcher := grip.NewSimpleCatcher()
catcher.NewWhen(c.CPU <= 0, "container resource CPU must be a positive integer")
catcher.NewWhen(c.MemoryMB <= 0, "container resource memory MB must be a positive integer")
+
+ catcher.ErrorfWhen(ecsConf.MaxCPU > 0 && c.CPU > ecsConf.MaxCPU, "CPU cannot exceed maximum global limit of %d CPU units", ecsConf.MaxCPU)
+ catcher.ErrorfWhen(ecsConf.MaxMemoryMB > 0 && c.MemoryMB > ecsConf.MaxMemoryMB, "memory cannot exceed maximum global limit of %d MB", ecsConf.MaxMemoryMB)
+
return catcher.Resolve()
}
-// Validate that essential ContainerCredential fields are properly defined.
-func (c ContainerCredential) Validate() error {
+// Validate that essential container secret fields are properly defined for a
+// new secret.
+func (c ContainerSecret) Validate() error {
catcher := grip.NewSimpleCatcher()
- catcher.NewWhen(c.Username == "", "container credential username must be a non empty string")
- catcher.NewWhen(c.Password == "", "container credential password must be a non empty string")
+ catcher.Add(c.Type.Validate())
+ catcher.ErrorfWhen(c.Name == "", "must specify name for new container secret")
+ catcher.ErrorfWhen(c.Value == "", "must specify value for new container secret")
return catcher.Resolve()
}
@@ -2626,13 +2915,17 @@ func ValidateTriggerDefinition(definition patch.PatchTriggerDefinition, parentPr
func (d *PeriodicBuildDefinition) Validate() error {
catcher := grip.NewBasicCatcher()
- catcher.NewWhen(d.IntervalHours <= 0, "interval must be a positive integer")
+ catcher.NewWhen(d.IntervalHours <= 0 && d.Cron == "", "interval must be a positive integer or cron must be defined")
+ catcher.NewWhen(d.IntervalHours > 0 && d.Cron != "", "can't define both cron and interval")
catcher.NewWhen(d.ConfigFile == "", "a config file must be specified")
+ if d.Cron != "" {
+ _, err := getCronParserSchedule(d.Cron)
+ catcher.Wrap(err, "parsing cron")
+ }
if d.ID == "" {
d.ID = utility.RandomString()
}
-
return catcher.Resolve()
}
@@ -2684,8 +2977,9 @@ func GetUpstreamProjectName(triggerID, triggerType string) (string, error) {
return upstreamProject.DisplayName, nil
}
-// projectRefPipelineForMatchingTrigger is an aggregation pipeline to find projects that have the projectKey
-// explicitly set to the val, OR that default to the repo, which has the repoKey explicitly set to the val
+// projectRefPipelineForValueIsBool is an aggregation pipeline to find projects that have the projectKey
+// explicitly set to the val, OR that default to the repo, which has the repoKey explicitly set to the val.
+// Should not be used with project enabled field.
func projectRefPipelineForValueIsBool(projectKey, repoKey string, val bool) []bson.M {
return []bson.M{
lookupRepoStep,
@@ -2708,7 +3002,6 @@ func projectRefPipelineForMatchingTrigger(project string) []bson.M {
"$and": []bson.M{
{"$or": []bson.M{
{ProjectRefEnabledKey: true},
- {ProjectRefEnabledKey: bson.M{"$ne": false}, bsonutil.GetDottedKeyName("repo_ref", RepoRefEnabledKey): true},
}},
{"$or": []bson.M{
{
@@ -2734,7 +3027,6 @@ func projectRefPipelineForCommitQueueEnabled() []bson.M {
"$and": []bson.M{
{"$or": []bson.M{
{ProjectRefEnabledKey: true},
- {ProjectRefEnabledKey: nil, bsonutil.GetDottedKeyName("repo_ref", RepoRefEnabledKey): true},
}},
{"$or": []bson.M{
{
@@ -2747,33 +3039,9 @@ func projectRefPipelineForCommitQueueEnabled() []bson.M {
}},
}},
},
- }
-}
-
-// projectRefPipelineForPeriodicBuilds is an aggregation pipeline to find projects that are
-// 1) explicitly enabled, or that default to the repo which is enabled, and
-// 2) they have periodic builds defined, or they default to the repo which has periodic builds defined.
-func projectRefPipelineForPeriodicBuilds() []bson.M {
- nonEmptySize := bson.M{"$gt": bson.M{"$size": 0}}
- return []bson.M{
- lookupRepoStep,
- {"$match": bson.M{
- "$and": []bson.M{
- {"$or": []bson.M{
- {ProjectRefEnabledKey: true},
- {ProjectRefEnabledKey: nil, bsonutil.GetDottedKeyName("repo_ref", RepoRefEnabledKey): true},
- }},
- {"$or": []bson.M{
- {
- projectRefPeriodicBuildsKey: nonEmptySize,
- },
- {
- projectRefPeriodicBuildsKey: nil,
- bsonutil.GetDottedKeyName("repo_ref", RepoRefPeriodicBuildsKey): nonEmptySize,
- },
- }},
- }},
- },
+ {"$project": bson.M{
+ ProjectRefIdKey: 1,
+ }},
}
}
@@ -2783,3 +3051,172 @@ var lookupRepoStep = bson.M{"$lookup": bson.M{
"foreignField": RepoRefIdKey,
"as": "repo_ref",
}}
+
+// ContainerSecretCache implements the cocoa.SecretCache to provide a cache to
+// store secrets in the DB's project ref.
+type ContainerSecretCache struct{}
+
+// Put sets the external ID for a project ref's container secret by its name.
+func (c ContainerSecretCache) Put(_ context.Context, sc cocoa.SecretCacheItem) error {
+ externalNameKey := bsonutil.GetDottedKeyName(projectRefContainerSecretsKey, containerSecretExternalNameKey)
+ externalIDKey := bsonutil.GetDottedKeyName(projectRefContainerSecretsKey, containerSecretExternalIDKey)
+ externalIDUpdateKey := bsonutil.GetDottedKeyName(projectRefContainerSecretsKey, "$", containerSecretExternalIDKey)
+ return db.Update(ProjectRefCollection, bson.M{
+ externalNameKey: sc.Name,
+ externalIDKey: bson.M{
+ "$in": []interface{}{"", sc.ID},
+ },
+ }, bson.M{
+ "$set": bson.M{
+ externalIDUpdateKey: sc.ID,
+ },
+ })
+}
+
+// Delete deletes a container secret from the project ref by its external
+// identifier.
+func (c ContainerSecretCache) Delete(_ context.Context, externalID string) error {
+ externalIDKey := bsonutil.GetDottedKeyName(projectRefContainerSecretsKey, containerSecretExternalIDKey)
+ err := db.Update(ProjectRefCollection, bson.M{
+ externalIDKey: externalID,
+ }, bson.M{
+ "$pull": bson.M{
+ projectRefContainerSecretsKey: bson.M{
+ containerSecretExternalIDKey: externalID,
+ },
+ },
+ })
+ if adb.ResultsNotFound(err) {
+ return nil
+ }
+
+ return err
+}
+
+// ContainerSecretTag is the tag used to track container secrets.
+const ContainerSecretTag = "evergreen-tracked"
+
+// GetTag returns the tag used for tracking cloud container secrets.
+func (c ContainerSecretCache) GetTag() string {
+ return ContainerSecretTag
+}
+
+// Constants related to secrets stored in Secrets Manager.
+const (
+ // internalSecretNamespace is the namespace for secrets that are
+ // Evergreen-internal (such as the pod secret).
+ internalSecretNamespace = "evg-internal"
+ // repoCredsSecretName is the namespace for repository credentials.
+ repoCredsSecretName = "repo-creds"
+)
+
+// makeContainerSecretName creates a Secrets Manager secret name namespaced
+// within the given project ID.
+func makeContainerSecretName(smConf evergreen.SecretsManagerConfig, projectID, name string) string {
+ return strings.Join([]string{strings.TrimRight(smConf.SecretPrefix, "/"), "project", projectID, name}, "/")
+}
+
+// makeInternalContainerSecretName creates a Secrets Manager secret name
+// namespaced by the given project ID for Evergreen-internal purposes.
+func makeInternalContainerSecretName(smConf evergreen.SecretsManagerConfig, projectID, name string) string {
+ return makeContainerSecretName(smConf, projectID, fmt.Sprintf("%s/%s", internalSecretNamespace, name))
+}
+
+// makeRepoCredsSecretName creates a Secrets Manager secret name namespaced by
+// the given project ID for use as a repository credential.
+func makeRepoCredsContainerSecretName(smConf evergreen.SecretsManagerConfig, projectID, name string) string {
+ return makeContainerSecretName(smConf, projectID, fmt.Sprintf("%s/%s", repoCredsSecretName, name))
+}
+
+// ValidateContainerSecrets checks that the project-level container secrets to
+// be added/updated are valid and sets default values where necessary. It
+// returns the validated and merged container secrets, including the unmodified
+// secrets, the modified secrets, and the new secrets to create.
+func ValidateContainerSecrets(settings *evergreen.Settings, projectID string, original, toUpdate []ContainerSecret) ([]ContainerSecret, error) {
+ combined := make([]ContainerSecret, len(original))
+ _ = copy(combined, original)
+
+ var numPodSecrets int
+ catcher := grip.NewBasicCatcher()
+ for _, updatedSecret := range toUpdate {
+ name := updatedSecret.Name
+
+ if updatedSecret.Type == ContainerSecretPodSecret {
+ numPodSecrets++
+ }
+
+ idx := -1
+ for i := 0; i < len(original); i++ {
+ if original[i].Name == name {
+ idx = i
+ break
+ }
+ }
+
+ if idx != -1 {
+ existingSecret := combined[idx]
+ // If updating an existing secret, only allow the value to be
+ // updated.
+ catcher.ErrorfWhen(updatedSecret.Type != "" && updatedSecret.Type != existingSecret.Type, "container secret '%s' type cannot be changed from '%s' to '%s'", name, existingSecret.Type, updatedSecret.Type)
+ catcher.ErrorfWhen(updatedSecret.ExternalID != "" && updatedSecret.ExternalID != existingSecret.ExternalID, "container secret '%s' external ID cannot be changed from '%s' to '%s'", name, existingSecret.ExternalID, existingSecret.ExternalID)
+ catcher.ErrorfWhen(updatedSecret.ExternalName != "" && updatedSecret.ExternalName != existingSecret.ExternalName, "container secret '%s' external name cannot be changed from '%s' to '%s'", name, existingSecret.ExternalName, updatedSecret.ExternalName)
+ existingSecret.Value = updatedSecret.Value
+ combined[idx] = existingSecret
+ continue
+ }
+
+ catcher.Wrapf(updatedSecret.Validate(), "invalid new container secret '%s'", name)
+
+ // New secrets that have to be created should not have their external
+ // name and ID decided by the user. The external name is controlled by
+ // Evergreen (and set here) and the external ID is determined by the
+ // secret storage service (and set when the secret is actually stored).
+ extName, err := newContainerSecretExternalName(settings.Providers.AWS.Pod.SecretsManager, projectID, updatedSecret)
+ catcher.Add(err)
+ updatedSecret.ExternalName = extName
+ updatedSecret.ExternalID = ""
+
+ combined = append(combined, updatedSecret)
+ }
+
+ catcher.ErrorfWhen(numPodSecrets > 1, "a project can have at most one pod secret but tried to create %d pod secrets total", numPodSecrets)
+
+ return combined, catcher.Resolve()
+}
+
+func newContainerSecretExternalName(smConf evergreen.SecretsManagerConfig, projectID string, secret ContainerSecret) (string, error) {
+ switch secret.Type {
+ case ContainerSecretPodSecret:
+ return makeInternalContainerSecretName(smConf, projectID, secret.Name), nil
+ case ContainerSecretRepoCreds:
+ return makeRepoCredsContainerSecretName(smConf, projectID, secret.Name), nil
+ default:
+ return "", errors.Errorf("unrecognized secret type '%s' for container secret '%s'", secret.Type, secret.Name)
+ }
+}
+
+// ProjectCanDispatchTask returns a boolean indicating if the task can be
+// dispatched based on the project ref's settings and optionally includes a
+// particular reason that the task can or cannot be dispatched.
+func ProjectCanDispatchTask(pRef *ProjectRef, t *task.Task) (canDispatch bool, reason string) {
+ // GitHub PR tasks are still allowed to run for disabled hidden projects.
+ if !pRef.Enabled {
+ // GitHub PR tasks are still allowed to run for disabled hidden
+ // projects.
+ if t.Requester == evergreen.GithubPRRequester && pRef.IsHidden() {
+ reason = "GitHub PRs are allowed to run tasks for disabled hidden projects"
+ } else {
+ return false, "project is disabled"
+ }
+ }
+
+ if pRef.IsDispatchingDisabled() {
+ return false, "task dispatching is disabled for its project"
+ }
+
+ if t.IsPatchRequest() && pRef.IsPatchingDisabled() {
+ return false, "patch testing is disabled for its project"
+ }
+
+ return true, reason
+}
diff --git a/model/project_ref_test.go b/model/project_ref_test.go
index 976efbdca9b..cb15ba46a50 100644
--- a/model/project_ref_test.go
+++ b/model/project_ref_test.go
@@ -3,13 +3,16 @@ package model
import (
"context"
"fmt"
+ "net/http"
"testing"
"time"
+ "github.com/evergreen-ci/cocoa"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/db"
mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/evergreen/model/commitqueue"
"github.com/evergreen-ci/evergreen/model/event"
"github.com/evergreen-ci/evergreen/model/patch"
"github.com/evergreen-ci/evergreen/model/task"
@@ -17,20 +20,20 @@ import (
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/gimlet"
"github.com/evergreen-ci/utility"
+ adb "github.com/mongodb/anser/db"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mongodb.org/mongo-driver/bson"
)
func TestFindOneProjectRef(t *testing.T) {
- evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger = "buildlogger"
assert := assert.New(t)
require.NoError(t, db.Clear(ProjectRefCollection))
projectRef := &ProjectRef{
Owner: "mongodb",
Repo: "mci",
Branch: "main",
- Enabled: utility.TruePtr(),
+ Enabled: true,
BatchTime: 10,
Id: "ident",
}
@@ -43,14 +46,13 @@ func TestFindOneProjectRef(t *testing.T) {
assert.Equal(projectRefFromDB.Owner, "mongodb")
assert.Equal(projectRefFromDB.Repo, "mci")
assert.Equal(projectRefFromDB.Branch, "main")
- assert.True(projectRefFromDB.IsEnabled())
+ assert.True(projectRefFromDB.Enabled)
assert.Equal(projectRefFromDB.BatchTime, 10)
assert.Equal(projectRefFromDB.Id, "ident")
- assert.Equal(projectRefFromDB.DefaultLogger, "buildlogger")
}
func TestFindMergedProjectRef(t *testing.T) {
- require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection, ParserProjectCollection))
+ require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection, ParserProjectCollection, ProjectConfigCollection))
projectConfig := &ProjectConfig{
Id: "ident",
@@ -70,7 +72,7 @@ func TestFindMergedProjectRef(t *testing.T) {
BatchTime: 10,
Id: "ident",
Admins: []string{"john.smith", "john.doe"},
- Enabled: utility.FalsePtr(),
+ Enabled: false,
PatchingDisabled: utility.FalsePtr(),
RepotrackerDisabled: utility.TruePtr(),
DeactivatePrevious: utility.TruePtr(),
@@ -92,7 +94,6 @@ func TestFindMergedProjectRef(t *testing.T) {
Branch: "main",
SpawnHostScriptPath: "my-path",
Admins: []string{"john.liu"},
- Enabled: utility.TruePtr(),
PatchingDisabled: nil,
GitTagVersionsEnabled: utility.FalsePtr(),
PRTestingEnabled: utility.TruePtr(),
@@ -115,7 +116,7 @@ func TestFindMergedProjectRef(t *testing.T) {
assert.Contains(t, mergedProject.Admins, "john.smith")
assert.Contains(t, mergedProject.Admins, "john.doe")
assert.NotContains(t, mergedProject.Admins, "john.liu")
- assert.False(t, *mergedProject.Enabled)
+ assert.False(t, mergedProject.Enabled)
assert.False(t, mergedProject.IsPatchingDisabled())
assert.True(t, mergedProject.UseRepoSettings())
assert.True(t, mergedProject.IsRepotrackerDisabled())
@@ -139,6 +140,169 @@ func TestFindMergedProjectRef(t *testing.T) {
assert.Equal(t, "random2", mergedProject.TaskAnnotationSettings.FileTicketWebhook.Endpoint)
}
+func TestGetNumberOfEnabledProjects(t *testing.T) {
+ require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection))
+
+ enabled1 := &ProjectRef{
+ Id: "enabled1",
+ Owner: "10gen",
+ Repo: "repo",
+ Enabled: true,
+ }
+ assert.NoError(t, enabled1.Insert())
+ enabled2 := &ProjectRef{
+ Id: "enabled2",
+ Owner: "mongodb",
+ Repo: "mci",
+ Enabled: true,
+ }
+ assert.NoError(t, enabled2.Insert())
+ disabled1 := &ProjectRef{
+ Id: "disabled1",
+ Owner: "mongodb",
+ Repo: "mci",
+ Enabled: false,
+ }
+ assert.NoError(t, disabled1.Insert())
+ disabled2 := &ProjectRef{
+ Id: "disabled2",
+ Owner: "mongodb",
+ Repo: "mci",
+ Enabled: false,
+ }
+ assert.NoError(t, disabled2.Insert())
+
+ enabledProjects, err := GetNumberOfEnabledProjects()
+ assert.NoError(t, err)
+ assert.Equal(t, 2, enabledProjects)
+ enabledProjectsOwnerRepo, err := GetNumberOfEnabledProjectsForOwnerRepo(enabled2.Owner, enabled2.Repo)
+ assert.NoError(t, err)
+ assert.Equal(t, 1, enabledProjectsOwnerRepo)
+}
+
+func TestValidateEnabledProjectsLimit(t *testing.T) {
+ assert.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection))
+ enabled1 := &ProjectRef{
+ Id: "enabled1",
+ Owner: "mongodb",
+ Repo: "mci",
+ Enabled: true,
+ }
+ assert.NoError(t, enabled1.Insert())
+ enabled2 := &ProjectRef{
+ Id: "enabled2",
+ Owner: "owner_exception",
+ Repo: "repo_exception",
+ Enabled: true,
+ }
+ assert.NoError(t, enabled2.Insert())
+ disabled1 := &ProjectRef{
+ Id: "disabled1",
+ Owner: "mongodb",
+ Repo: "mci",
+ Enabled: false,
+ }
+ assert.NoError(t, disabled1.Insert())
+ enabledByRepo := &ProjectRef{
+ Id: "enabledByRepo",
+ Owner: "enable_mongodb",
+ Repo: "enable_mci",
+ RepoRefId: "enable_repo",
+ }
+ assert.NoError(t, enabledByRepo.Insert())
+ enableRef := &RepoRef{ProjectRef{
+ Id: "enable_repo",
+ Owner: "enable_mongodb",
+ Repo: "enable_mci",
+ Enabled: true,
+ }}
+ assert.NoError(t, enableRef.Upsert())
+ disabledByRepo := &ProjectRef{
+ Id: "disabledByRepo",
+ Owner: "disable_mongodb",
+ Repo: "disable_mci",
+ RepoRefId: "disable_repo",
+ }
+ assert.NoError(t, disabledByRepo.Insert())
+ disableRepo := &RepoRef{ProjectRef{
+ Id: "disable_repo",
+ Owner: "disable_mongodb",
+ Repo: "disable_mci",
+ Enabled: true,
+ }}
+ assert.NoError(t, disableRepo.Upsert())
+
+ var settings evergreen.Settings
+ settings.ProjectCreation.TotalProjectLimit = 4
+ settings.ProjectCreation.RepoProjectLimit = 1
+ settings.ProjectCreation.RepoExceptions = []evergreen.OwnerRepo{
+ {
+ Owner: "owner_exception",
+ Repo: "repo_exception",
+ },
+ }
+
+ // Should error when trying to enable an existing project past limits.
+ disabled1.Enabled = true
+ original, err := FindMergedProjectRef(disabled1.Id, "", false)
+ assert.NoError(t, err)
+ statusCode, err := ValidateEnabledProjectsLimit(disabled1.Id, &settings, original, disabled1)
+ assert.Error(t, err)
+ assert.Equal(t, http.StatusBadRequest, statusCode)
+
+ // Should not error if owner/repo is part of exception.
+ exception := &ProjectRef{
+ Id: "exception",
+ Owner: "owner_exception",
+ Repo: "repo_exception",
+ Enabled: true,
+ }
+ original, err = FindMergedProjectRef(exception.Id, "", false)
+ assert.NoError(t, err)
+ _, err = ValidateEnabledProjectsLimit(enabled1.Id, &settings, original, exception)
+ assert.NoError(t, err)
+
+ // Should error if owner/repo is not part of exception.
+ notException := &ProjectRef{
+ Id: "not_exception",
+ Owner: "mongodb",
+ Repo: "mci",
+ Enabled: true,
+ }
+ original, err = FindMergedProjectRef(notException.Id, "", false)
+ assert.NoError(t, err)
+ statusCode, err = ValidateEnabledProjectsLimit(notException.Id, &settings, original, notException)
+ assert.Error(t, err)
+ assert.Equal(t, http.StatusBadRequest, statusCode)
+
+ // Should not error if a repo defaulted project is enabled.
+ disableRepo.Enabled = true
+ assert.NoError(t, disableRepo.Upsert())
+ mergedRef, err := GetProjectRefMergedWithRepo(*disabledByRepo)
+ assert.NoError(t, err)
+ original, err = FindMergedProjectRef(disabledByRepo.Id, "", false)
+ assert.NoError(t, err)
+ _, err = ValidateEnabledProjectsLimit(disabledByRepo.Id, &settings, original, mergedRef)
+ assert.NoError(t, err)
+
+ // Should error on enabled if you try to change owner/repo past limit.
+ enabled2.Owner = "mongodb"
+ enabled2.Repo = "mci"
+ original, err = FindMergedProjectRef(enabled2.Id, "", false)
+ assert.NoError(t, err)
+ statusCode, err = ValidateEnabledProjectsLimit(enabled2.Id, &settings, original, enabled2)
+ assert.Error(t, err)
+ assert.Equal(t, http.StatusBadRequest, statusCode)
+
+ // Total project limit cannot be exceeded. Even with the exception.
+ settings.ProjectCreation.TotalProjectLimit = 2
+ original, err = FindMergedProjectRef(exception.Id, "", false)
+ assert.NoError(t, err)
+ statusCode, err = ValidateEnabledProjectsLimit(exception.Id, &settings, original, exception)
+ assert.Error(t, err)
+ assert.Equal(t, http.StatusBadRequest, statusCode)
+}
+
func TestGetBatchTimeDoesNotExceedMaxBatchTime(t *testing.T) {
assert := assert.New(t)
@@ -146,7 +310,7 @@ func TestGetBatchTimeDoesNotExceedMaxBatchTime(t *testing.T) {
Owner: "mongodb",
Repo: "mci",
Branch: "main",
- Enabled: utility.TruePtr(),
+ Enabled: true,
BatchTime: maxBatchTime + 1,
Id: "ident",
}
@@ -179,6 +343,11 @@ func TestGetActivationTimeForTask(t *testing.T) {
Name: "myTask",
Variant: "bv1",
}
+ bvt2 := &BuildVariantTaskUnit{
+ Name: "notMyTask",
+ Variant: "bv1",
+ Disable: utility.TruePtr(),
+ }
versionWithoutTask := Version{
Id: "v1",
@@ -228,51 +397,55 @@ func TestGetActivationTimeForTask(t *testing.T) {
activationTime, err := projectRef.GetActivationTimeForTask(bvt)
assert.NoError(t, err)
assert.True(t, activationTime.Equal(prevTime.Add(time.Hour)))
+
+ activationTime, err = projectRef.GetActivationTimeForTask(bvt2)
+ assert.NoError(t, err)
+ assert.True(t, activationTime.Equal(utility.ZeroTime))
}
func TestGetActivationTimeWithCron(t *testing.T) {
prevTime := time.Date(2020, time.June, 9, 0, 0, 0, 0, time.UTC) // Tuesday
for name, test := range map[string]func(t *testing.T){
"Empty": func(t *testing.T) {
- _, err := GetActivationTimeWithCron(prevTime, "")
+ _, err := GetNextCronTime(prevTime, "")
assert.Error(t, err)
},
"InvalidBatchSyntax": func(t *testing.T) {
batchStr := "* * *"
- _, err := GetActivationTimeWithCron(prevTime, batchStr)
+ _, err := GetNextCronTime(prevTime, batchStr)
assert.Error(t, err)
},
"EveryHourEveryDay": func(t *testing.T) {
batchStr := "0 * * * *"
- res, err := GetActivationTimeWithCron(prevTime, batchStr)
+ res, err := GetNextCronTime(prevTime, batchStr)
assert.NoError(t, err)
assert.Equal(t, prevTime.Add(time.Hour), res)
},
"SpecifyDOW": func(t *testing.T) {
batchStr := "0 0 ? * MON,WED,FRI"
- res, err := GetActivationTimeWithCron(prevTime, batchStr)
+ res, err := GetNextCronTime(prevTime, batchStr)
assert.NoError(t, err)
assert.Equal(t, prevTime.Add(time.Hour*24), res) // i.e. Wednesday
- newRes, err := GetActivationTimeWithCron(res, batchStr) // i.e. Friday
+ newRes, err := GetNextCronTime(res, batchStr) // i.e. Friday
assert.NoError(t, err)
assert.Equal(t, res.Add(time.Hour*48), newRes)
},
"1and15thOfTheMonth": func(t *testing.T) {
batchStr := "0 0 1,15 *"
- res, err := GetActivationTimeWithCron(prevTime, batchStr)
+ res, err := GetNextCronTime(prevTime, batchStr)
assert.NoError(t, err)
assert.Equal(t, prevTime.Add(time.Hour*24*6), res)
},
"Descriptor": func(t *testing.T) {
batchStr := "@daily"
- res, err := GetActivationTimeWithCron(prevTime, batchStr)
+ res, err := GetNextCronTime(prevTime, batchStr)
assert.NoError(t, err)
assert.Equal(t, prevTime.Add(time.Hour*24), res)
},
"Interval": func(t *testing.T) {
batchStr := "@every 2h"
- _, err := GetActivationTimeWithCron(prevTime, batchStr)
+ _, err := GetNextCronTime(prevTime, batchStr)
assert.Error(t, err)
},
} {
@@ -282,9 +455,13 @@ func TestGetActivationTimeWithCron(t *testing.T) {
func TestAttachToNewRepo(t *testing.T) {
require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection, evergreen.ScopeCollection,
- evergreen.RoleCollection, user.Collection, evergreen.ConfigCollection))
+ evergreen.RoleCollection, user.Collection, evergreen.ConfigCollection, GithubHooksCollection))
require.NoError(t, db.CreateCollections(evergreen.ScopeCollection))
+ settings := evergreen.Settings{
+ GithubOrgs: []string{"newOwner", "evergreen-ci"},
+ }
+ assert.NoError(t, settings.Set())
pRef := ProjectRef{
Id: "myProject",
Owner: "evergreen-ci",
@@ -292,11 +469,12 @@ func TestAttachToNewRepo(t *testing.T) {
Branch: "main",
Admins: []string{"me"},
RepoRefId: "myRepo",
- Enabled: utility.TruePtr(),
+ Enabled: true,
CommitQueue: CommitQueueParams{
Enabled: utility.TruePtr(),
},
PRTestingEnabled: utility.TruePtr(),
+ TracksPushEvents: utility.TruePtr(),
}
assert.NoError(t, pRef.Insert())
repoRef := RepoRef{ProjectRef{
@@ -307,8 +485,19 @@ func TestAttachToNewRepo(t *testing.T) {
SystemRoles: []string{GetViewRepoRole("myRepo")},
}
assert.NoError(t, u.Insert())
+
+ // Can't attach to repo with an invalid owner
+ pRef.Owner = "invalid"
+ assert.Error(t, pRef.AttachToNewRepo(u))
+
pRef.Owner = "newOwner"
pRef.Repo = "newRepo"
+ hook := GithubHook{
+ HookID: 12,
+ Owner: pRef.Owner,
+ Repo: pRef.Repo,
+ }
+ assert.NoError(t, hook.Insert())
assert.NoError(t, pRef.AttachToNewRepo(u))
pRefFromDB, err := FindBranchProjectRef(pRef.Id)
@@ -317,6 +506,17 @@ func TestAttachToNewRepo(t *testing.T) {
assert.NotEqual(t, pRefFromDB.RepoRefId, "myRepo")
assert.Equal(t, pRefFromDB.Owner, "newOwner")
assert.Equal(t, pRefFromDB.Repo, "newRepo")
+ assert.Nil(t, pRefFromDB.TracksPushEvents)
+
+ newRepoRef, err := FindOneRepoRef(pRef.RepoRefId)
+ assert.NoError(t, err)
+ assert.NotNil(t, newRepoRef)
+
+ assert.True(t, newRepoRef.DoesTrackPushEvents())
+
+ mergedRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ assert.NoError(t, err)
+ assert.True(t, mergedRef.DoesTrackPushEvents())
userFromDB, err := user.FindOneById("me")
assert.NoError(t, err)
@@ -336,6 +536,7 @@ func TestAttachToNewRepo(t *testing.T) {
Enabled: utility.TruePtr(),
},
GithubChecksEnabled: utility.TruePtr(),
+ Enabled: true,
}
assert.NoError(t, pRef.Insert())
pRef.Owner = "newOwner"
@@ -358,9 +559,12 @@ func TestAttachToNewRepo(t *testing.T) {
func TestAttachToRepo(t *testing.T) {
require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection, evergreen.ScopeCollection,
- evergreen.RoleCollection, user.Collection))
+ evergreen.RoleCollection, user.Collection, GithubHooksCollection, evergreen.ConfigCollection))
require.NoError(t, db.CreateCollections(evergreen.ScopeCollection))
-
+ settings := evergreen.Settings{
+ GithubOrgs: []string{"newOwner", "evergreen-ci"},
+ }
+ assert.NoError(t, settings.Set())
pRef := ProjectRef{
Id: "myProject",
Owner: "evergreen-ci",
@@ -371,10 +575,17 @@ func TestAttachToRepo(t *testing.T) {
Enabled: utility.TruePtr(),
},
GithubChecksEnabled: utility.TruePtr(),
- Enabled: utility.TruePtr(),
+ TracksPushEvents: utility.TruePtr(),
+ Enabled: true,
}
assert.NoError(t, pRef.Insert())
+ hook := GithubHook{
+ HookID: 12,
+ Owner: pRef.Owner,
+ Repo: pRef.Repo,
+ }
+ assert.NoError(t, hook.Insert())
u := &user.DBUser{Id: "me"}
assert.NoError(t, u.Insert())
// No repo exists, but one should be created.
@@ -387,9 +598,15 @@ func TestAttachToRepo(t *testing.T) {
assert.NotNil(t, pRefFromDB)
assert.True(t, pRefFromDB.UseRepoSettings())
assert.NotEmpty(t, pRefFromDB.RepoRefId)
- assert.True(t, pRefFromDB.IsEnabled())
+ assert.True(t, pRefFromDB.Enabled)
assert.True(t, pRefFromDB.CommitQueue.IsEnabled())
assert.True(t, pRefFromDB.IsGithubChecksEnabled())
+ assert.Nil(t, pRefFromDB.TracksPushEvents)
+
+ repoRef, err := FindOneRepoRef(pRef.RepoRefId)
+ assert.NoError(t, err)
+ require.NotNil(t, repoRef)
+ assert.True(t, repoRef.DoesTrackPushEvents())
u, err = user.FindOneById("me")
assert.NoError(t, err)
@@ -408,6 +625,7 @@ func TestAttachToRepo(t *testing.T) {
Enabled: utility.TruePtr(),
},
PRTestingEnabled: utility.TruePtr(),
+ Enabled: true,
}
assert.NoError(t, pRef.Insert())
assert.NoError(t, pRef.AttachToRepo(u))
@@ -423,6 +641,16 @@ func TestAttachToRepo(t *testing.T) {
assert.False(t, pRefFromDB.CommitQueue.IsEnabled())
assert.False(t, pRefFromDB.IsGithubChecksEnabled())
assert.True(t, pRefFromDB.IsPRTestingEnabled())
+
+ // Try attaching with a disallowed owner.
+ pRef = ProjectRef{
+ Id: "myBadProject",
+ Owner: "nonexistent",
+ Repo: "evergreen",
+ Branch: "main",
+ }
+ assert.NoError(t, pRef.Insert())
+ assert.Error(t, pRef.AttachToRepo(u))
}
func TestDetachFromRepo(t *testing.T) {
@@ -440,7 +668,8 @@ func TestDetachFromRepo(t *testing.T) {
assert.NotNil(t, pRefFromDB.GitTagVersionsEnabled)
assert.True(t, pRefFromDB.IsGitTagVersionsEnabled())
assert.True(t, pRefFromDB.IsGithubChecksEnabled())
- assert.Equal(t, pRefFromDB.GithubTriggerAliases, []string{"my_trigger"}) // why isn't this set to repo :O
+ assert.Equal(t, pRefFromDB.GithubTriggerAliases, []string{"my_trigger"})
+ assert.True(t, pRefFromDB.DoesTrackPushEvents())
dbUser, err = user.FindOneById("me")
assert.NoError(t, err)
@@ -595,6 +824,7 @@ func TestDetachFromRepo(t *testing.T) {
Id: pRef.RepoRefId,
Owner: pRef.Owner,
Repo: pRef.Repo,
+ TracksPushEvents: utility.TruePtr(),
PRTestingEnabled: utility.TruePtr(),
GitTagVersionsEnabled: utility.FalsePtr(),
GithubChecksEnabled: utility.TruePtr(),
@@ -644,17 +874,27 @@ func TestDetachFromRepo(t *testing.T) {
func TestDefaultRepoBySection(t *testing.T) {
for name, test := range map[string]func(t *testing.T, id string){
ProjectPageGeneralSection: func(t *testing.T, id string) {
+ repoRef := RepoRef{
+ ProjectRef: ProjectRef{
+ Id: "repo_ref_id",
+ Owner: "mongodb",
+ Repo: "mci",
+ Branch: "main",
+ Enabled: false,
+ },
+ }
+ assert.NoError(t, repoRef.Upsert())
assert.NoError(t, DefaultSectionToRepo(id, ProjectPageGeneralSection, "me"))
pRefFromDb, err := FindBranchProjectRef(id)
assert.NoError(t, err)
assert.NotNil(t, pRefFromDb)
+ assert.NotEqual(t, pRefFromDb.Identifier, "")
assert.Equal(t, pRefFromDb.BatchTime, 0)
assert.Nil(t, pRefFromDb.RepotrackerDisabled)
assert.Nil(t, pRefFromDb.DeactivatePrevious)
assert.Empty(t, pRefFromDb.RemotePath)
assert.Nil(t, pRefFromDb.TaskSync.ConfigEnabled)
- assert.Nil(t, pRefFromDb.FilesIgnoredFromCache)
},
ProjectPageAccessSection: func(t *testing.T, id string) {
assert.NoError(t, DefaultSectionToRepo(id, ProjectPageAccessSection, "me"))
@@ -662,7 +902,6 @@ func TestDefaultRepoBySection(t *testing.T) {
pRefFromDb, err := FindBranchProjectRef(id)
assert.NoError(t, err)
assert.NotNil(t, pRefFromDb)
- assert.Nil(t, pRefFromDb.Private)
assert.Nil(t, pRefFromDb.Restricted)
assert.Nil(t, pRefFromDb.Admins)
},
@@ -756,10 +995,11 @@ func TestDefaultRepoBySection(t *testing.T) {
} {
t.Run(name, func(t *testing.T) {
assert.NoError(t, db.ClearCollections(ProjectRefCollection, ProjectVarsCollection, ProjectAliasCollection,
- event.SubscriptionsCollection, event.AllLogCollection))
+ event.SubscriptionsCollection, event.EventCollection, RepoRefCollection))
pRef := ProjectRef{
Id: "my_project",
+ Identifier: "my_identifier",
Owner: "candy",
Repo: "land",
BatchTime: 10,
@@ -767,7 +1007,6 @@ func TestDefaultRepoBySection(t *testing.T) {
DeactivatePrevious: utility.FalsePtr(),
RemotePath: "path.yml",
TaskSync: TaskSyncOptions{ConfigEnabled: utility.TruePtr()},
- FilesIgnoredFromCache: []string{},
Private: utility.TruePtr(),
Restricted: utility.FalsePtr(),
Admins: []string{"annie"},
@@ -776,6 +1015,7 @@ func TestDefaultRepoBySection(t *testing.T) {
GitTagAuthorizedUsers: []string{"anna"},
NotifyOnBuildFailure: utility.FalsePtr(),
PerfEnabled: utility.FalsePtr(),
+ RepoRefId: "repo_ref_id",
Triggers: []TriggerDefinition{
{Project: "your_project"},
},
@@ -859,7 +1099,6 @@ func TestDefaultRepoBySection(t *testing.T) {
}
func TestFindProjectRefsByRepoAndBranch(t *testing.T) {
- evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger = "buildlogger"
assert := assert.New(t)
require := require.New(t)
@@ -873,7 +1112,7 @@ func TestFindProjectRefsByRepoAndBranch(t *testing.T) {
Owner: "mongodb",
Repo: "mci",
Branch: "main",
- Enabled: utility.FalsePtr(),
+ Enabled: false,
BatchTime: 10,
Id: "iden_",
PRTestingEnabled: utility.TruePtr(),
@@ -884,84 +1123,56 @@ func TestFindProjectRefsByRepoAndBranch(t *testing.T) {
assert.Empty(projectRefs)
projectRef.Id = "ident"
- projectRef.Enabled = utility.TruePtr()
+ projectRef.Enabled = true
assert.NoError(projectRef.Insert())
projectRefs, err = FindMergedEnabledProjectRefsByRepoAndBranch("mongodb", "mci", "main")
assert.NoError(err)
require.Len(projectRefs, 1)
assert.Equal("ident", projectRefs[0].Id)
- assert.Equal("buildlogger", projectRefs[0].DefaultLogger)
projectRef.Id = "ident2"
assert.NoError(projectRef.Insert())
projectRefs, err = FindMergedEnabledProjectRefsByRepoAndBranch("mongodb", "mci", "main")
assert.NoError(err)
assert.Len(projectRefs, 2)
-
- projectRef.Id = "uses_repo"
- projectRef.Enabled = nil
- projectRef.RepoRefId = "my_repo"
- assert.NoError(projectRef.Insert())
-
- repoRef := RepoRef{ProjectRef{
- Id: "my_repo",
- Enabled: utility.FalsePtr(),
- }}
- assert.NoError(repoRef.Upsert())
-
- projectRefs, err = FindMergedEnabledProjectRefsByRepoAndBranch("mongodb", "mci", "main")
- assert.NoError(err)
- assert.Len(projectRefs, 2)
-
- repoRef.Enabled = utility.TruePtr()
- assert.NoError(repoRef.Upsert())
- projectRefs, err = FindMergedEnabledProjectRefsByRepoAndBranch("mongodb", "mci", "main")
- assert.NoError(err)
- assert.Len(projectRefs, 3)
-
- projectRef.Enabled = utility.FalsePtr()
- assert.NoError(projectRef.Upsert())
- projectRefs, err = FindMergedEnabledProjectRefsByRepoAndBranch("mongodb", "mci", "main")
- assert.NoError(err)
- assert.Len(projectRefs, 2)
}
func TestCreateNewRepoRef(t *testing.T) {
assert.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection, user.Collection,
- evergreen.ScopeCollection, ProjectVarsCollection, ProjectAliasCollection))
+ evergreen.ScopeCollection, ProjectVarsCollection, ProjectAliasCollection, GithubHooksCollection))
require.NoError(t, db.CreateCollections(evergreen.ScopeCollection))
+
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
doc1 := &ProjectRef{
- Id: "id1",
- Owner: "mongodb",
- Repo: "mongo",
- Branch: "mci",
- Enabled: utility.TruePtr(),
- FilesIgnoredFromCache: []string{"file1", "file2"},
- Admins: []string{"bob", "other bob"},
- PRTestingEnabled: utility.TruePtr(),
- RemotePath: "evergreen.yml",
- NotifyOnBuildFailure: utility.TruePtr(),
- CommitQueue: CommitQueueParams{Message: "my message"},
- TaskSync: TaskSyncOptions{PatchEnabled: utility.TruePtr()},
+ Id: "id1",
+ Owner: "mongodb",
+ Repo: "mongo",
+ Branch: "mci",
+ Enabled: true,
+ Admins: []string{"bob", "other bob"},
+ PRTestingEnabled: utility.TruePtr(),
+ RemotePath: "evergreen.yml",
+ NotifyOnBuildFailure: utility.TruePtr(),
+ CommitQueue: CommitQueueParams{Message: "my message"},
+ TaskSync: TaskSyncOptions{PatchEnabled: utility.TruePtr()},
}
assert.NoError(t, doc1.Insert())
doc2 := &ProjectRef{
- Id: "id2",
- Owner: "mongodb",
- Repo: "mongo",
- Branch: "mci2",
- Enabled: utility.TruePtr(),
- FilesIgnoredFromCache: []string{"file2"},
- Admins: []string{"bob", "other bob"},
- PRTestingEnabled: utility.TruePtr(),
- RemotePath: "evergreen.yml",
- NotifyOnBuildFailure: utility.FalsePtr(),
- GithubChecksEnabled: utility.TruePtr(),
- CommitQueue: CommitQueueParams{Message: "my message"},
- TaskSync: TaskSyncOptions{PatchEnabled: utility.TruePtr(), ConfigEnabled: utility.TruePtr()},
+ Id: "id2",
+ Identifier: "identifier",
+ Owner: "mongodb",
+ Repo: "mongo",
+ Branch: "mci2",
+ Enabled: true,
+ Admins: []string{"bob", "other bob"},
+ PRTestingEnabled: utility.TruePtr(),
+ RemotePath: "evergreen.yml",
+ NotifyOnBuildFailure: utility.FalsePtr(),
+ GithubChecksEnabled: utility.TruePtr(),
+ CommitQueue: CommitQueueParams{Message: "my message"},
+ TaskSync: TaskSyncOptions{PatchEnabled: utility.TruePtr(), ConfigEnabled: utility.TruePtr()},
}
assert.NoError(t, doc2.Insert())
doc3 := &ProjectRef{
@@ -969,10 +1180,16 @@ func TestCreateNewRepoRef(t *testing.T) {
Owner: "mongodb",
Repo: "mongo",
Branch: "mci2",
- Enabled: utility.FalsePtr(),
+ Enabled: false,
}
assert.NoError(t, doc3.Insert())
+ hook := GithubHook{
+ HookID: 12,
+ Owner: "mongodb",
+ Repo: "mongo",
+ }
+ assert.NoError(t, hook.Insert())
projectVariables := []ProjectVars{
{
Id: doc1.Id,
@@ -1057,7 +1274,7 @@ func TestCreateNewRepoRef(t *testing.T) {
}
u := user.DBUser{Id: "me"}
assert.NoError(t, u.Insert())
- // this will create the new repo ref
+ // This will create the new repo ref
assert.NoError(t, doc2.AddToRepoScope(&u))
assert.NotEmpty(t, doc2.RepoRefId)
@@ -1067,13 +1284,14 @@ func TestCreateNewRepoRef(t *testing.T) {
assert.Equal(t, "mongodb", repoRef.Owner)
assert.Equal(t, "mongo", repoRef.Repo)
+ assert.Empty(t, repoRef.Branch)
+ assert.True(t, repoRef.DoesTrackPushEvents())
assert.Contains(t, repoRef.Admins, "bob")
assert.Contains(t, repoRef.Admins, "other bob")
assert.Contains(t, repoRef.Admins, "me")
- assert.Empty(t, repoRef.FilesIgnoredFromCache)
- assert.True(t, repoRef.IsEnabled())
assert.True(t, repoRef.IsPRTestingEnabled())
assert.Equal(t, "evergreen.yml", repoRef.RemotePath)
+ assert.Equal(t, "", repoRef.Identifier)
assert.Nil(t, repoRef.NotifyOnBuildFailure)
assert.Nil(t, repoRef.GithubChecksEnabled)
assert.Equal(t, "my message", repoRef.CommitQueue.Message)
@@ -1118,7 +1336,6 @@ func TestCreateNewRepoRef(t *testing.T) {
}
func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
- evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger = "buildlogger"
assert := assert.New(t) //nolint
require := require.New(t) //nolint
@@ -1133,7 +1350,7 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
Owner: "mongodb",
Repo: "mci",
Branch: "main",
- Enabled: utility.FalsePtr(),
+ Enabled: false,
BatchTime: 10,
Id: "ident0",
PRTestingEnabled: utility.FalsePtr(),
@@ -1148,7 +1365,7 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
// 2 docs, 1 enabled, but the enabled one has pr testing disabled = no match
doc.Id = "ident_"
doc.PRTestingEnabled = utility.FalsePtr()
- doc.Enabled = utility.TruePtr()
+ doc.Enabled = true
require.NoError(doc.Insert())
projectRef, err = FindOneProjectRefByRepoAndBranchWithPRTesting("mongodb", "mci", "main", "")
assert.NoError(err)
@@ -1162,7 +1379,6 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
assert.NoError(err)
require.NotNil(projectRef)
assert.Equal("ident1", projectRef.Id)
- assert.Equal("buildlogger", projectRef.DefaultLogger)
// 2 matching documents, we just return one of those projects
doc.Id = "ident2"
@@ -1182,6 +1398,7 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
Owner: "mongodb",
Repo: "mci",
Branch: "mine",
+ Enabled: true,
RepoRefId: repoDoc.Id,
}
assert.NoError(doc.Insert())
@@ -1191,7 +1408,7 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
Repo: "mci",
Branch: "mine",
RepoRefId: repoDoc.Id,
- Enabled: utility.FalsePtr(),
+ Enabled: false,
PRTestingEnabled: utility.FalsePtr(),
Hidden: utility.TruePtr(),
}
@@ -1202,12 +1419,6 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
assert.NoError(err)
assert.Nil(projectRef)
- repoDoc.Enabled = utility.TruePtr()
- assert.NoError(repoDoc.Upsert())
- projectRef, err = FindOneProjectRefByRepoAndBranchWithPRTesting("mongodb", "mci", "mine", "")
- assert.NoError(err)
- assert.Nil(projectRef)
-
repoDoc.PRTestingEnabled = utility.TruePtr()
assert.NoError(repoDoc.Upsert())
projectRef, err = FindOneProjectRefByRepoAndBranchWithPRTesting("mongodb", "mci", "mine", "")
@@ -1258,7 +1469,7 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
assert.NotNil(projectRef)
// project explicitly disabled
- doc.Enabled = utility.FalsePtr()
+ doc.Enabled = false
doc.PRTestingEnabled = utility.TruePtr()
assert.NoError(doc.Upsert())
projectRef, err = FindOneProjectRefByRepoAndBranchWithPRTesting("mongodb", "mci", "mine", "")
@@ -1287,7 +1498,6 @@ func TestFindOneProjectRefByRepoAndBranchWithPRTesting(t *testing.T) {
}
func TestFindOneProjectRefWithCommitQueueByOwnerRepoAndBranch(t *testing.T) {
- evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger = "buildlogger"
assert := assert.New(t)
require := require.New(t)
@@ -1302,7 +1512,7 @@ func TestFindOneProjectRefWithCommitQueueByOwnerRepoAndBranch(t *testing.T) {
Repo: "mci",
Branch: "main",
Id: "mci",
- Enabled: utility.TruePtr(),
+ Enabled: true,
}
require.NoError(doc.Insert())
@@ -1317,34 +1527,6 @@ func TestFindOneProjectRefWithCommitQueueByOwnerRepoAndBranch(t *testing.T) {
assert.NoError(err)
assert.NotNil(projectRef)
assert.Equal("mci", projectRef.Id)
- assert.Equal("buildlogger", projectRef.DefaultLogger)
-
- // doc defaults to repo, which is not enabled
- doc = &ProjectRef{
- Owner: "mongodb",
- Repo: "mci",
- Branch: "not_main",
- Id: "mci_main",
- RepoRefId: "my_repo",
- }
- repoDoc := &RepoRef{ProjectRef{Id: "my_repo"}}
- assert.NoError(doc.Insert())
- assert.NoError(repoDoc.Upsert())
-
- projectRef, err = FindOneProjectRefWithCommitQueueByOwnerRepoAndBranch("mongodb", "mci", "not_main")
- assert.NoError(err)
- assert.Nil(projectRef)
-
- // doc defaults to repo, which is enabled
- repoDoc.Enabled = utility.TruePtr()
- repoDoc.CommitQueue.Enabled = utility.TruePtr()
- assert.NoError(repoDoc.Upsert())
-
- projectRef, err = FindOneProjectRefWithCommitQueueByOwnerRepoAndBranch("mongodb", "mci", "not_main")
- assert.NoError(err)
- assert.NotNil(projectRef)
- assert.Equal("mci_main", projectRef.Id)
- assert.Equal("buildlogger", projectRef.DefaultLogger)
// doc doesn't default to repo
doc.CommitQueue.Enabled = utility.FalsePtr()
@@ -1364,7 +1546,7 @@ func TestCanEnableCommitQueue(t *testing.T) {
Repo: "mci",
Branch: "main",
Id: "mci",
- Enabled: utility.TruePtr(),
+ Enabled: true,
CommitQueue: CommitQueueParams{
Enabled: utility.TruePtr(),
},
@@ -1379,7 +1561,7 @@ func TestCanEnableCommitQueue(t *testing.T) {
Repo: "mci",
Branch: "main",
Id: "not-mci",
- Enabled: utility.TruePtr(),
+ Enabled: true,
CommitQueue: CommitQueueParams{
Enabled: utility.FalsePtr(),
},
@@ -1390,73 +1572,29 @@ func TestCanEnableCommitQueue(t *testing.T) {
assert.False(ok)
}
-func TestFindMergedEnabledProjectRefsByOwnerAndRepo(t *testing.T) {
- require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection))
- projectRefs, err := FindMergedEnabledProjectRefsByOwnerAndRepo("mongodb", "mci")
- assert.NoError(t, err)
- assert.Empty(t, projectRefs)
-
- repoRef := RepoRef{ProjectRef{
- Id: "my_repo",
- Enabled: utility.TruePtr(),
- }}
- assert.NoError(t, repoRef.Upsert())
- doc := &ProjectRef{
- Enabled: utility.TruePtr(),
- Owner: "mongodb",
- Repo: "mci",
- Branch: "main",
- Identifier: "mci",
- Id: "1",
- RepoRefId: repoRef.Id,
- }
- assert.NoError(t, doc.Insert())
- doc.Enabled = nil
- doc.Id = "2"
- assert.NoError(t, doc.Insert())
-
- doc.Enabled = utility.FalsePtr()
- doc.Id = "3"
- assert.NoError(t, doc.Insert())
-
- doc.Enabled = utility.TruePtr()
- doc.RepoRefId = ""
- doc.Id = "4"
- assert.NoError(t, doc.Insert())
-
- projectRefs, err = FindMergedEnabledProjectRefsByOwnerAndRepo("mongodb", "mci")
- assert.NoError(t, err)
- require.Len(t, projectRefs, 3)
- assert.NotEqual(t, projectRefs[0].Id, "3")
- assert.NotEqual(t, projectRefs[1].Id, "3")
- assert.NotEqual(t, projectRefs[2].Id, "3")
-}
-
-func TestFindProjectRefsWithCommitQueueEnabled(t *testing.T) {
- evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger = "buildlogger"
+func TestFindProjectRefIdsWithCommitQueueEnabled(t *testing.T) {
assert := assert.New(t)
require := require.New(t)
require.NoError(db.ClearCollections(ProjectRefCollection, RepoRefCollection))
- projectRefs, err := FindProjectRefsWithCommitQueueEnabled()
+ res, err := FindProjectRefIdsWithCommitQueueEnabled()
assert.NoError(err)
- assert.Empty(projectRefs)
+ assert.Empty(res)
repoRef := RepoRef{ProjectRef{
- Id: "my_repo",
- Enabled: utility.TruePtr(),
+ Id: "my_repo",
CommitQueue: CommitQueueParams{
Enabled: utility.TruePtr(),
},
}}
assert.NoError(repoRef.Upsert())
doc := &ProjectRef{
- Enabled: utility.TruePtr(),
+ Enabled: true,
Owner: "mongodb",
Repo: "mci",
Branch: "main",
Identifier: "mci",
- Id: "1",
+ Id: "mci1",
RepoRefId: repoRef.Id,
CommitQueue: CommitQueueParams{
Enabled: utility.TruePtr(),
@@ -1465,36 +1603,33 @@ func TestFindProjectRefsWithCommitQueueEnabled(t *testing.T) {
require.NoError(doc.Insert())
doc.Branch = "fix"
- doc.Id = "2"
+ doc.Id = "mci2"
require.NoError(doc.Insert())
doc.Identifier = "grip"
doc.Repo = "grip"
- doc.Id = "3"
+ doc.Id = "mci3"
doc.CommitQueue.Enabled = utility.FalsePtr()
require.NoError(doc.Insert())
- projectRefs, err = FindProjectRefsWithCommitQueueEnabled()
+ res, err = FindProjectRefIdsWithCommitQueueEnabled()
assert.NoError(err)
- require.Len(projectRefs, 2)
- assert.Equal("mci", projectRefs[0].Identifier)
- assert.Equal("buildlogger", projectRefs[0].DefaultLogger)
- assert.Equal("mci", projectRefs[1].Identifier)
- assert.Equal("buildlogger", projectRefs[1].DefaultLogger)
-
- doc.Id = "both_settings_from_repo"
- doc.Enabled = nil
+ require.Len(res, 2)
+ assert.Equal("mci1", res[0])
+ assert.Equal("mci2", res[1])
+
+ doc.Id = "commit_queue_setting_from_repo"
doc.CommitQueue.Enabled = nil
assert.NoError(doc.Insert())
- projectRefs, err = FindProjectRefsWithCommitQueueEnabled()
+ res, err = FindProjectRefIdsWithCommitQueueEnabled()
assert.NoError(err)
- assert.Len(projectRefs, 3)
+ assert.Len(res, 3)
repoRef.CommitQueue.Enabled = utility.FalsePtr()
assert.NoError(repoRef.Upsert())
- projectRefs, err = FindProjectRefsWithCommitQueueEnabled()
+ res, err = FindProjectRefIdsWithCommitQueueEnabled()
assert.NoError(err)
- assert.Len(projectRefs, 2)
+ assert.Len(res, 2)
}
func TestValidatePeriodicBuildDefinition(t *testing.T) {
@@ -1532,6 +1667,464 @@ func TestValidatePeriodicBuildDefinition(t *testing.T) {
}
}
+func TestContainerSecretValidate(t *testing.T) {
+ t.Run("FailsWithInvalidSecretType", func(t *testing.T) {
+ cs := ContainerSecret{
+ Name: "secret_name",
+ Type: "",
+ Value: "new_value",
+ }
+ assert.Error(t, cs.Validate())
+ })
+ t.Run("FailsWithoutName", func(t *testing.T) {
+ cs := ContainerSecret{
+ Name: "secret_name",
+ Type: ContainerSecretPodSecret,
+ Value: "",
+ }
+ assert.Error(t, cs.Validate())
+ })
+ t.Run("FailsWithoutNewSecretValue", func(t *testing.T) {
+ cs := ContainerSecret{
+ Name: "secret_name",
+ Type: ContainerSecretPodSecret,
+ Value: "",
+ }
+ assert.Error(t, cs.Validate())
+ })
+}
+
+func TestValidateContainerSecrets(t *testing.T) {
+ var settings evergreen.Settings
+ settings.Providers.AWS.Pod.SecretsManager.SecretPrefix = "secret_prefix"
+ const projectID = "project_id"
+
+ t.Run("AddsNewSecretsWithoutAnyExistingSecrets", func(t *testing.T) {
+ toUpdate := []ContainerSecret{
+ {
+ Name: "apple",
+ Value: "new_value0",
+ Type: ContainerSecretRepoCreds,
+ },
+ {
+ Name: "orange",
+ Value: "new_value1",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, nil, toUpdate)
+ require.NoError(t, err)
+
+ require.Len(t, combined, len(toUpdate))
+ for i := 0; i < len(toUpdate); i++ {
+ assert.Equal(t, toUpdate[i].Name, combined[i].Name)
+ assert.Equal(t, toUpdate[i].Type, combined[i].Type)
+ assert.Equal(t, toUpdate[i].Value, combined[i].Value)
+ assert.Zero(t, combined[i].ExternalID)
+ assert.NotZero(t, combined[i].ExternalName)
+ }
+ })
+ t.Run("IgnoresUserDefinedExternalFieldsForNewSecrets", func(t *testing.T) {
+ toUpdate := []ContainerSecret{
+ {
+ Name: "apple",
+ ExternalName: "external_name",
+ ExternalID: "external_id",
+ Value: "new_value0",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, nil, toUpdate)
+ require.NoError(t, err)
+
+ require.Len(t, combined, 1)
+ assert.Equal(t, toUpdate[0].Name, combined[0].Name)
+ assert.Equal(t, toUpdate[0].Type, combined[0].Type)
+ assert.NotZero(t, combined[0].ExternalName)
+ assert.NotEqual(t, toUpdate[0].ExternalName, combined[0].ExternalName, "external name should not be settable by users and should be generated for new secrets")
+ assert.Zero(t, combined[0].ExternalID, "external ID should not be settable by users for new secrets")
+ })
+ t.Run("NoopsWithIdenticalOriginalAndUpdatedSecrets", func(t *testing.T) {
+ secrets := []ContainerSecret{
+ {
+ Name: "apple",
+ ExternalName: "external_name0",
+ ExternalID: "external_id0",
+ Type: ContainerSecretRepoCreds,
+ },
+ {
+ Name: "orange",
+ ExternalName: "external_name1",
+ ExternalID: "external_id1",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, secrets, secrets)
+ require.NoError(t, err)
+
+ assert.Equal(t, combined, secrets)
+ })
+ t.Run("AddsNewContainerSecretsToExistingSecrets", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "apple",
+ ExternalName: "external_name0",
+ ExternalID: "external_id0",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ toUpdate := []ContainerSecret{
+ {
+ Name: "orange",
+ Type: ContainerSecretRepoCreds,
+ Value: "new_value",
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, original, toUpdate)
+ require.NoError(t, err)
+
+ require.Len(t, combined, 2)
+ assert.Equal(t, original[0], combined[0])
+ assert.Equal(t, toUpdate[0].Name, combined[1].Name)
+ assert.Equal(t, toUpdate[0].Type, combined[1].Type)
+ assert.Equal(t, toUpdate[0].Value, combined[1].Value)
+ assert.NotZero(t, combined[1].ExternalName)
+ assert.Zero(t, combined[1].ExternalID)
+ })
+ t.Run("SetsUpdatedValueForExistingSecret", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "pineapple",
+ ExternalName: "a_legit_pizza_topping",
+ ExternalID: "external_id",
+ Type: ContainerSecretPodSecret,
+ },
+ }
+ toUpdate := []ContainerSecret{
+ {
+ Name: "pineapple",
+ Value: "new_value",
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, original, toUpdate)
+ require.NoError(t, err)
+
+ require.Len(t, combined, 1)
+ assert.Equal(t, original[0].Name, combined[0].Name)
+ assert.Equal(t, original[0].ExternalName, combined[0].ExternalName)
+ assert.Equal(t, original[0].ExternalID, combined[0].ExternalID)
+ assert.Equal(t, original[0].Type, combined[0].Type)
+ assert.Equal(t, toUpdate[0].Value, combined[0].Value)
+ })
+ t.Run("CombinesExistingSecretsAndUpdatedSecrets", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "apple",
+ ExternalName: "external_name0",
+ ExternalID: "external_id0",
+ Type: ContainerSecretPodSecret,
+ },
+ {
+ Name: "banana",
+ ExternalName: "external_name1",
+ ExternalID: "external_id1",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ updated := []ContainerSecret{
+ {
+ Name: "cherry",
+ Value: "new_value0",
+ Type: ContainerSecretRepoCreds,
+ },
+ {
+ Name: "banana",
+ ExternalName: "external_name1",
+ ExternalID: "external_id1",
+ Value: "new_value1",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, original, updated)
+ require.NoError(t, err)
+
+ require.Len(t, combined, 3)
+ assert.Equal(t, original[0], combined[0])
+ assert.Equal(t, original[1].Name, combined[1].Name)
+ assert.Equal(t, original[1].ExternalName, combined[1].ExternalName)
+ assert.Equal(t, original[1].ExternalID, combined[1].ExternalID)
+ assert.Equal(t, original[1].Type, combined[1].Type)
+ assert.Equal(t, updated[1].Value, combined[1].Value)
+ assert.Equal(t, updated[0].Name, combined[2].Name)
+ assert.NotZero(t, combined[2].ExternalName)
+ assert.Zero(t, combined[2].ExternalID)
+ assert.Equal(t, updated[0].Type, combined[2].Type)
+ assert.Equal(t, updated[0].Value, combined[2].Value)
+ })
+ t.Run("ReturnsOriginalForNoUpdatedSecrets", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "apple",
+ ExternalName: "external_name0",
+ ExternalID: "external_id0",
+ Type: ContainerSecretPodSecret,
+ },
+ {
+ Name: "banana",
+ ExternalName: "external_name1",
+ ExternalID: "external_id1",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ combined, err := ValidateContainerSecrets(&settings, projectID, original, nil)
+ assert.NoError(t, err)
+ assert.Equal(t, original, combined)
+ })
+ t.Run("ReturnsEmptyWithoutAnyExistingOrUpdatedSecrets", func(t *testing.T) {
+ secrets, err := ValidateContainerSecrets(&settings, projectID, nil, nil)
+ assert.NoError(t, err)
+ assert.Empty(t, secrets)
+ })
+ t.Run("FailsWithInvalidSecretType", func(t *testing.T) {
+ toUpdate := []ContainerSecret{
+ {
+ Name: "breadfruit",
+ Type: "a type of bread",
+ },
+ }
+ _, err := ValidateContainerSecrets(&settings, projectID, nil, toUpdate)
+ assert.Error(t, err)
+ })
+ t.Run("FailsWithDifferentTypeForExistingSecret", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "starfruit",
+ ExternalName: "external_name",
+ ExternalID: "external_id",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ toUpdate := []ContainerSecret{
+ {
+ Name: "starfruit",
+ ExternalName: "external_name",
+ ExternalID: "external_id",
+ Type: ContainerSecretPodSecret,
+ },
+ }
+ _, err := ValidateContainerSecrets(&settings, projectID, original, toUpdate)
+ assert.Error(t, err)
+ })
+ t.Run("FailsWithDifferentExternalNameForExistingSecret", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "starfruit",
+ ExternalID: "external_id",
+ ExternalName: "a_starfruit",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ toUpdate := []ContainerSecret{
+ {
+ Name: "starfruit",
+ ExternalID: "external_id",
+ ExternalName: "not_a_starfruit_no_more",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ _, err := ValidateContainerSecrets(&settings, projectID, original, toUpdate)
+ assert.Error(t, err)
+ })
+ t.Run("FailsWithDifferentExternalIDForExistingSecret", func(t *testing.T) {
+ original := []ContainerSecret{
+ {
+ Name: "starfruit",
+ ExternalID: "a_starfruit",
+ ExternalName: "external_name",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ toUpdate := []ContainerSecret{
+ {
+ Name: "starfruit",
+ ExternalID: "not_a_starfruit_no_more",
+ ExternalName: "external_name",
+ Type: ContainerSecretRepoCreds,
+ },
+ }
+ _, err := ValidateContainerSecrets(&settings, projectID, original, toUpdate)
+ assert.Error(t, err)
+ })
+ t.Run("FailsWithoutName", func(t *testing.T) {
+ containerSecrets := []ContainerSecret{
+ {
+ Type: ContainerSecretPodSecret,
+ Value: "value",
+ },
+ }
+ _, err := ValidateContainerSecrets(&settings, projectID, nil, containerSecrets)
+ assert.Error(t, err)
+ })
+ t.Run("FailsWithMultiplePodSecrets", func(t *testing.T) {
+ toUpdate := []ContainerSecret{
+ {
+ Name: "breadfruit",
+ Type: ContainerSecretPodSecret,
+ Value: "abcde",
+ },
+ {
+ Name: "starfruit",
+ Type: ContainerSecretPodSecret,
+ Value: "12345",
+ },
+ }
+ _, err := ValidateContainerSecrets(&settings, projectID, nil, toUpdate)
+ assert.Error(t, err)
+ })
+}
+
+func TestContainerSecretCache(t *testing.T) {
+ assert.Implements(t, (*cocoa.SecretCache)(nil), ContainerSecretCache{})
+ defer func() {
+ assert.NoError(t, db.ClearCollections(ProjectRefCollection))
+ }()
+
+ for tName, tCase := range map[string]func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache){
+ "PutSucceeds": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ pRef.ContainerSecrets[0].ExternalID = ""
+ require.NoError(t, pRef.Insert())
+ const externalID = "external_id"
+ require.NoError(t, c.Put(ctx, cocoa.SecretCacheItem{
+ ID: externalID,
+ Name: pRef.ContainerSecrets[0].ExternalName,
+ }))
+
+ dbProjRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ require.NoError(t, err)
+ require.NotZero(t, dbProjRef)
+ require.Len(t, dbProjRef.ContainerSecrets, len(pRef.ContainerSecrets))
+ original := pRef.ContainerSecrets[0]
+ updated := dbProjRef.ContainerSecrets[0]
+ assert.Equal(t, original.ExternalName, updated.ExternalName)
+ assert.Equal(t, original.Name, updated.Name)
+ assert.Equal(t, original.Type, updated.Type)
+ assert.Equal(t, externalID, updated.ExternalID)
+ for i := 1; i < len(pRef.ContainerSecrets); i++ {
+ assert.Equal(t, pRef.ContainerSecrets[i], dbProjRef.ContainerSecrets[i], "mismatched container secrets at index %d", i)
+ }
+ },
+ "PutFailsWithNonexistentProjectRef": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ assert.Error(t, c.Put(ctx, cocoa.SecretCacheItem{ID: "external_id", Name: pRef.ContainerSecrets[0].ExternalName}))
+ },
+ "PutFailsWithoutMatchingContainerSecretExternalName": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ require.NoError(t, pRef.Insert())
+ assert.Error(t, c.Put(ctx, cocoa.SecretCacheItem{
+ ID: "external_id",
+ Name: "nonexistent",
+ }))
+
+ dbProjRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ require.NoError(t, err)
+ require.NotZero(t, dbProjRef)
+ require.Len(t, dbProjRef.ContainerSecrets, len(pRef.ContainerSecrets))
+ for i := 0; i < len(pRef.ContainerSecrets); i++ {
+ assert.Equal(t, pRef.ContainerSecrets[i], dbProjRef.ContainerSecrets[i], "mismatched container secrets at index %d", i)
+ }
+ },
+ "PutSucceedsWithContainerSecretThatAlreadyHasSameExternalIDAlreadySet": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ pRef.ContainerSecrets[0].ExternalID = "external_id"
+ require.NoError(t, pRef.Insert())
+ require.NoError(t, c.Put(ctx, cocoa.SecretCacheItem{
+ ID: pRef.ContainerSecrets[0].ExternalID,
+ Name: pRef.ContainerSecrets[0].ExternalName,
+ }))
+
+ dbProjRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ require.NoError(t, err)
+ require.NotZero(t, dbProjRef)
+ require.Len(t, dbProjRef.ContainerSecrets, len(pRef.ContainerSecrets))
+ for i := 0; i < len(pRef.ContainerSecrets); i++ {
+ assert.Equal(t, pRef.ContainerSecrets[i], dbProjRef.ContainerSecrets[i], "mismatched container secrets at index %d", i)
+ }
+ },
+ "PutFailsWithContainerSecretThatHasDifferentExternalIDAlreadySet": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ const externalID = "external_id"
+ pRef.ContainerSecrets[0].ExternalID = "something_else"
+ require.NoError(t, pRef.Insert())
+ require.Error(t, c.Put(ctx, cocoa.SecretCacheItem{
+ ID: externalID,
+ Name: pRef.ContainerSecrets[0].ExternalName,
+ }))
+
+ dbProjRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ require.NoError(t, err)
+ require.NotZero(t, dbProjRef)
+ require.Len(t, dbProjRef.ContainerSecrets, len(pRef.ContainerSecrets))
+ for i := 0; i < len(pRef.ContainerSecrets); i++ {
+ assert.Equal(t, pRef.ContainerSecrets[i], dbProjRef.ContainerSecrets[i], "mismatched container secrets at index %d", i)
+ }
+ },
+ "DeleteSucceeds": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ require.NoError(t, pRef.Insert())
+ require.NoError(t, c.Delete(ctx, pRef.ContainerSecrets[1].ExternalID))
+
+ dbProjRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ require.NoError(t, err)
+ require.NotZero(t, dbProjRef)
+ require.Len(t, dbProjRef.ContainerSecrets, len(pRef.ContainerSecrets)-1)
+ assert.Equal(t, dbProjRef.ContainerSecrets[0], pRef.ContainerSecrets[0])
+ },
+ "DeleteNoopsWithNonexistentProjectRef": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ assert.NoError(t, c.Delete(ctx, "external_id"), "should not for nonexistent project ref")
+ assert.True(t, adb.ResultsNotFound(db.FindOneQ(ProjectRefCollection, db.Query(bson.M{}), &pRef)))
+ },
+ "DeleteNoopsWithoutMatchingContainerSecretExternalID": func(ctx context.Context, t *testing.T, pRef ProjectRef, c ContainerSecretCache) {
+ require.NoError(t, pRef.Insert())
+ assert.NoError(t, c.Delete(ctx, "nonexistent"), "should not error for nonexistent container secret")
+
+ dbProjRef, err := FindMergedProjectRef(pRef.Id, "", false)
+ require.NoError(t, err)
+ require.NotZero(t, dbProjRef)
+ assert.Len(t, dbProjRef.ContainerSecrets, len(pRef.ContainerSecrets))
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ require.NoError(t, db.ClearCollections(ProjectRefCollection))
+ pRef := ProjectRef{
+ Id: "project_id",
+ Identifier: "identifier",
+ ContainerSecrets: []ContainerSecret{
+ {
+ Name: "banana",
+ Type: ContainerSecretRepoCreds,
+ ExternalID: "external_id0",
+ },
+ {
+ Name: "cherry",
+ Type: ContainerSecretRepoCreds,
+ ExternalID: "external_id1",
+ },
+ {
+ Name: "banerry",
+ Type: ContainerSecretRepoCreds,
+ ExternalID: "external_id2",
+ },
+ },
+ }
+ for i := 0; i < len(pRef.ContainerSecrets); i++ {
+ pRef.ContainerSecrets[i].ExternalName = makeRepoCredsContainerSecretName(evergreen.SecretsManagerConfig{
+ SecretPrefix: "prefix",
+ }, pRef.Id, pRef.ContainerSecrets[i].Name)
+ }
+
+ tCase(ctx, t, pRef, ContainerSecretCache{})
+ })
+ }
+}
+
func TestGetPatchTriggerAlias(t *testing.T) {
projRef := ProjectRef{
PatchTriggerAliases: []patch.PatchTriggerDefinition{{Alias: "a0"}},
@@ -1546,55 +2139,53 @@ func TestGetPatchTriggerAlias(t *testing.T) {
}
func TestFindDownstreamProjects(t *testing.T) {
- require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection))
- evergreen.GetEnvironment().Settings().LoggerConfig.DefaultLogger = "buildlogger"
-
- repoRef := RepoRef{ProjectRef{
- Id: "my_repo",
- Enabled: utility.TruePtr(),
- }}
- assert.NoError(t, repoRef.Upsert())
+ require.NoError(t, db.ClearCollections(ProjectRefCollection))
proj1 := ProjectRef{
- Id: "evergreen",
- RepoRefId: repoRef.Id,
- Enabled: utility.TruePtr(),
- Triggers: []TriggerDefinition{{Project: "grip"}},
+ Id: "evergreen",
+ Enabled: true,
+ Triggers: []TriggerDefinition{{Project: "grip"}},
}
require.NoError(t, proj1.Insert())
proj2 := ProjectRef{
- Id: "mci",
- RepoRefId: repoRef.Id,
- Enabled: utility.FalsePtr(),
- Triggers: []TriggerDefinition{{Project: "grip"}},
+ Id: "mci",
+ Enabled: false,
+ Triggers: []TriggerDefinition{{Project: "grip"}},
}
require.NoError(t, proj2.Insert())
projects, err := FindDownstreamProjects("grip")
assert.NoError(t, err)
assert.Len(t, projects, 1)
- proj1.DefaultLogger = "buildlogger"
assert.Equal(t, proj1, projects[0])
+}
- proj1.Enabled = nil
- assert.NoError(t, proj1.Upsert())
- projects, err = FindDownstreamProjects("grip")
- assert.NoError(t, err)
- assert.Len(t, projects, 1)
+func TestAddEmptyBranch(t *testing.T) {
+ require.NoError(t, db.ClearCollections(user.Collection, ProjectRefCollection, evergreen.ScopeCollection, evergreen.RoleCollection, commitqueue.Collection))
+ u := user.DBUser{
+ Id: "me",
+ }
+ require.NoError(t, u.Insert())
+ p := ProjectRef{
+ Identifier: "myProject",
+ Owner: "mongodb",
+ Repo: "mongo",
+ }
+ assert.NoError(t, p.Add(&u))
+ assert.NotEmpty(t, p.Id)
+ assert.Empty(t, p.Branch)
- proj2.Enabled = nil
- assert.NoError(t, proj2.Upsert())
- projects, err = FindDownstreamProjects("grip")
+ cq, err := commitqueue.FindOneId(p.Id)
assert.NoError(t, err)
- assert.Len(t, projects, 2)
+ assert.NotNil(t, cq)
}
func TestAddPermissions(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
assert := assert.New(t)
- assert.NoError(db.ClearCollections(user.Collection, ProjectRefCollection, evergreen.ScopeCollection, evergreen.RoleCollection))
+ assert.NoError(db.ClearCollections(user.Collection, ProjectRefCollection, evergreen.ScopeCollection, evergreen.RoleCollection, commitqueue.Collection))
require.NoError(t, db.CreateCollections(evergreen.ScopeCollection))
env := testutil.NewEnvironment(ctx, t)
u := user.DBUser{
@@ -1612,6 +2203,10 @@ func TestAddPermissions(t *testing.T) {
assert.NotEmpty(p.Id)
assert.True(mgobson.IsObjectIdHex(p.Id))
+ cq, err := commitqueue.FindOneId(p.Id)
+ assert.NoError(err)
+ assert.NotNil(cq)
+
rm := env.RoleManager()
scope, err := rm.FindScopeForResources(evergreen.ProjectResourceType, p.Id)
assert.NoError(err)
@@ -1639,6 +2234,10 @@ func TestAddPermissions(t *testing.T) {
assert.True(mgobson.IsObjectIdHex(p.Id))
assert.Equal(projectId, p.Id)
+ cq, err = commitqueue.FindOneId(p.Id)
+ assert.NoError(err)
+ assert.NotNil(cq)
+
scope, err = rm.FindScopeForResources(evergreen.ProjectResourceType, p.Id)
assert.NoError(err)
assert.NotNil(scope)
@@ -1764,17 +2363,21 @@ func TestGetProjectTasksWithOptions(t *testing.T) {
RevisionOrderNumber: 100,
}))
- // total of 50 tasks eligible to be found
+ // total of 100 tasks eligible to be found
for i := 0; i < 100; i++ {
myTask := task.Task{
Id: fmt.Sprintf("t%d", i),
- RevisionOrderNumber: i,
+ RevisionOrderNumber: 100 - (i / 2),
DisplayName: "t1",
Project: "my_project",
Status: evergreen.TaskSucceeded,
+ Version: fmt.Sprintf("v%d", 100-(i/2)),
}
if i%3 == 0 {
myTask.BuildVariant = "bv1"
+ myTask.Requester = evergreen.RepotrackerVersionRequester
+ } else {
+ myTask.Requester = evergreen.PatchVersionRequester
}
if i%2 == 0 {
myTask.Status = evergreen.TaskUndispatched
@@ -1785,52 +2388,177 @@ func TestGetProjectTasksWithOptions(t *testing.T) {
tasks, err := GetTasksWithOptions("my_ident", "t1", opts)
assert.NoError(t, err)
- assert.Len(t, tasks, defaultVersionLimit)
+ // Returns 7 tasks because 40 tasks exist within the default version limit,
+ // but 1/2 are undispatched and only 1/3 have a system requester
+ assert.Len(t, tasks, 7)
opts.Limit = 5
tasks, err = GetTasksWithOptions("my_ident", "t1", opts)
assert.NoError(t, err)
- assert.Len(t, tasks, 5)
+ assert.Len(t, tasks, 2)
assert.Equal(t, tasks[0].RevisionOrderNumber, 99)
- assert.Equal(t, tasks[4].RevisionOrderNumber, 91)
+ assert.Equal(t, tasks[1].RevisionOrderNumber, 96)
opts.Limit = 10
- opts.StartAt = 20
+ opts.StartAt = 80
+ tasks, err = GetTasksWithOptions("my_ident", "t1", opts)
+ assert.NoError(t, err)
+ assert.Len(t, tasks, 3)
+ assert.Equal(t, tasks[0].RevisionOrderNumber, 78)
+ assert.Equal(t, tasks[2].RevisionOrderNumber, 72)
+
+ opts.Requesters = []string{evergreen.PatchVersionRequester}
tasks, err = GetTasksWithOptions("my_ident", "t1", opts)
assert.NoError(t, err)
- assert.Len(t, tasks, 10)
- assert.Equal(t, tasks[0].RevisionOrderNumber, 19)
- assert.Equal(t, tasks[9].RevisionOrderNumber, 1)
+ assert.Len(t, tasks, 7)
+ assert.Equal(t, tasks[0].RevisionOrderNumber, 80)
+ assert.Equal(t, tasks[6].RevisionOrderNumber, 71)
+ opts.Requesters = []string{evergreen.RepotrackerVersionRequester}
+ tasks, err = GetTasksWithOptions("my_ident", "t1", opts)
+ assert.NoError(t, err)
+ assert.Len(t, tasks, 3)
+ assert.Equal(t, tasks[0].RevisionOrderNumber, 78)
+ assert.Equal(t, tasks[2].RevisionOrderNumber, 72)
+
+ opts.Requesters = []string{}
opts.Limit = defaultVersionLimit
opts.StartAt = 90
- // 1 in every 6 tasks should qualify for this
opts.BuildVariant = "bv1"
tasks, err = GetTasksWithOptions("my_ident", "t1", opts)
+ // Returns 7 tasks because 40 tasks exist within the default version limit,
+ // but only 1/6 matches the bv and is not undispatched
assert.NoError(t, err)
- assert.Len(t, tasks, 15)
+ assert.Len(t, tasks, 7)
+ assert.Equal(t, tasks[0].RevisionOrderNumber, 90)
+ assert.Equal(t, tasks[6].RevisionOrderNumber, 72)
}
func TestUpdateNextPeriodicBuild(t *testing.T) {
assert := assert.New(t)
- assert.NoError(db.Clear(ProjectRefCollection))
+ require := require.New(t)
now := time.Now().Truncate(time.Second)
- p := ProjectRef{
- Id: "proj",
- PeriodicBuilds: []PeriodicBuildDefinition{
- {ID: "1", NextRunTime: now},
- {ID: "2", NextRunTime: now.Add(1 * time.Hour)},
+ later := now.Add(1 * time.Hour)
+ muchLater := now.Add(10 * time.Hour)
+ for name, test := range map[string]func(*testing.T){
+ "updatesProjectOnly": func(t *testing.T) {
+ p := ProjectRef{
+ Id: "proj",
+ PeriodicBuilds: []PeriodicBuildDefinition{
+ {ID: "0", NextRunTime: now},
+ {ID: "1", NextRunTime: later, IntervalHours: 9},
+ },
+ RepoRefId: "repo",
+ }
+ repoRef := RepoRef{ProjectRef{
+ Id: "repo",
+ PeriodicBuilds: []PeriodicBuildDefinition{
+ {ID: "1", NextRunTime: later},
+ },
+ }}
+ assert.NoError(p.Insert())
+ assert.NoError(repoRef.Upsert())
+
+ assert.NoError(UpdateNextPeriodicBuild("proj", &p.PeriodicBuilds[1]))
+ dbProject, err := FindBranchProjectRef(p.Id)
+ assert.NoError(err)
+ require.NotNil(dbProject)
+ assert.True(now.Equal(dbProject.PeriodicBuilds[0].NextRunTime))
+ assert.True(muchLater.Equal(dbProject.PeriodicBuilds[1].NextRunTime))
+
+ dbRepo, err := FindOneRepoRef(p.RepoRefId)
+ assert.NoError(err)
+ require.NotNil(dbRepo)
+ // Repo wasn't updated because the branch project definitions take precedent.
+ assert.True(later.Equal(dbRepo.PeriodicBuilds[0].NextRunTime))
+ },
+ "updatesRepoOnly": func(t *testing.T) {
+ p := ProjectRef{
+ Id: "proj",
+ PeriodicBuilds: nil,
+ RepoRefId: "repo",
+ }
+ repoRef := RepoRef{ProjectRef{
+ Id: "repo",
+ PeriodicBuilds: []PeriodicBuildDefinition{
+ {ID: "0", NextRunTime: later, IntervalHours: 9},
+ },
+ }}
+ assert.NoError(p.Insert())
+ assert.NoError(repoRef.Upsert())
+ assert.NoError(UpdateNextPeriodicBuild("proj", &repoRef.PeriodicBuilds[0]))
+
+ // Repo is updated because the branch project doesn't have any periodic build override defined.
+ dbRepo, err := FindOneRepoRef(p.RepoRefId)
+ assert.NoError(err)
+ require.NotNil(dbRepo)
+ assert.True(muchLater.Equal(dbRepo.PeriodicBuilds[0].NextRunTime))
},
+ "updatesNothing": func(t *testing.T) {
+ p := ProjectRef{
+ Id: "proj",
+ PeriodicBuilds: []PeriodicBuildDefinition{},
+ RepoRefId: "repo",
+ }
+ repoRef := RepoRef{ProjectRef{
+ Id: "repo",
+ PeriodicBuilds: []PeriodicBuildDefinition{
+ {ID: "0", NextRunTime: later, IntervalHours: 9},
+ },
+ }}
+ assert.NoError(p.Insert())
+ assert.NoError(repoRef.Upsert())
+ // Should error because definition isn't relevant for this project, since
+ // we ignore repo definitions when the project has any override defined.
+ assert.Error(UpdateNextPeriodicBuild("proj", &repoRef.PeriodicBuilds[0]))
+
+ dbRepo, err := FindOneRepoRef(p.RepoRefId)
+ assert.NoError(err)
+ assert.NotNil(dbRepo)
+ assert.True(later.Equal(dbRepo.PeriodicBuilds[0].NextRunTime))
+ },
+ "updateProjectWithCron": func(t *testing.T) {
+ nextRunTime := time.Date(2022, 12, 12, 0, 0, 0, 0, time.UTC)
+ nextDay := nextRunTime.Add(24 * time.Hour)
+ laterRunTime := nextRunTime.Add(12 * time.Hour)
+ dailyCron := "0 0 * * *"
+ p := ProjectRef{
+ Id: "proj",
+ PeriodicBuilds: []PeriodicBuildDefinition{
+ {ID: "0", NextRunTime: nextRunTime, Cron: dailyCron},
+ {ID: "1", NextRunTime: laterRunTime, Cron: dailyCron},
+ },
+ RepoRefId: "repo",
+ }
+ repoRef := RepoRef{ProjectRef{
+ Id: "repo",
+ PeriodicBuilds: []PeriodicBuildDefinition{
+ {ID: "1", NextRunTime: later},
+ },
+ }}
+ assert.NoError(p.Insert())
+ assert.NoError(repoRef.Upsert())
+
+ assert.NoError(UpdateNextPeriodicBuild("proj", &p.PeriodicBuilds[0]))
+ dbProject, err := FindBranchProjectRef(p.Id)
+ assert.NoError(err)
+ require.NotNil(dbProject)
+ assert.True(nextDay.Equal(dbProject.PeriodicBuilds[0].NextRunTime))
+ assert.True(laterRunTime.Equal(dbProject.PeriodicBuilds[1].NextRunTime))
+
+ // Even with a different runtime we get the same result, since we're using a cron.
+ assert.NoError(UpdateNextPeriodicBuild("proj", &p.PeriodicBuilds[1]))
+ dbProject, err = FindBranchProjectRef(p.Id)
+ assert.NoError(err)
+ require.NotNil(dbProject)
+ assert.True(nextDay.Equal(dbProject.PeriodicBuilds[1].NextRunTime))
+
+ },
+ } {
+ assert.NoError(db.ClearCollections(ProjectRefCollection, RepoRefCollection))
+ t.Run(name, test)
}
- assert.NoError(p.Insert())
- assert.NoError(p.UpdateNextPeriodicBuild("2", now.Add(10*time.Hour)))
- dbProject, err := FindBranchProjectRef(p.Id)
- assert.NoError(err)
- assert.True(now.Equal(dbProject.PeriodicBuilds[0].NextRunTime))
- assert.True(now.Equal(p.PeriodicBuilds[0].NextRunTime))
- assert.True(now.Add(10 * time.Hour).Equal(dbProject.PeriodicBuilds[1].NextRunTime))
- assert.True(now.Add(10 * time.Hour).Equal(p.PeriodicBuilds[1].NextRunTime))
}
func TestGetProjectSetupCommands(t *testing.T) {
@@ -1847,11 +2575,32 @@ func TestGetProjectSetupCommands(t *testing.T) {
assert.Contains(t, cmds[1].String(), "c1")
}
+func TestFindFirstProjectRef(t *testing.T) {
+ assert.NoError(t, db.ClearCollections(ProjectRefCollection))
+
+ var err error
+ assert.NotPanics(t, func() {
+ _, err = FindFirstProjectRef()
+ }, "Should not panic if there are no matching projects")
+ assert.Error(t, err, "Should return error if there are no matching projects")
+
+ projectRef := ProjectRef{
+ Id: "p1",
+ RepoRefId: "my_repo",
+ Private: utility.FalsePtr(),
+ }
+
+ assert.NoError(t, projectRef.Insert())
+
+ resultRef, err := FindFirstProjectRef()
+ assert.NoError(t, err)
+ assert.Equal(t, "p1", resultRef.Id)
+}
+
func TestFindPeriodicProjects(t *testing.T) {
assert.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection))
repoRef := RepoRef{ProjectRef{
- Enabled: utility.TruePtr(),
Id: "my_repo",
PeriodicBuilds: []PeriodicBuildDefinition{{ID: "repo_def"}},
}}
@@ -1860,26 +2609,32 @@ func TestFindPeriodicProjects(t *testing.T) {
pRef := ProjectRef{
Id: "p1",
RepoRefId: "my_repo",
+ Enabled: true,
PeriodicBuilds: []PeriodicBuildDefinition{},
}
assert.NoError(t, pRef.Insert())
pRef.Id = "p2"
+ pRef.Enabled = true
pRef.PeriodicBuilds = []PeriodicBuildDefinition{{ID: "p1"}}
assert.NoError(t, pRef.Insert())
pRef.Id = "p3"
+ pRef.Enabled = true
pRef.PeriodicBuilds = nil
assert.NoError(t, pRef.Insert())
pRef.Id = "p4"
- pRef.Enabled = utility.FalsePtr()
+ pRef.Enabled = false
pRef.PeriodicBuilds = []PeriodicBuildDefinition{{ID: "p1"}}
assert.NoError(t, pRef.Insert())
projects, err := FindPeriodicProjects()
assert.NoError(t, err)
assert.Len(t, projects, 2)
+ for _, p := range projects {
+ assert.Len(t, p.PeriodicBuilds, 1, fmt.Sprintf("project '%s' missing definition", p.Id))
+ }
}
func TestRemoveAdminFromProjects(t *testing.T) {
@@ -1993,6 +2748,7 @@ func TestMergeWithProjectConfig(t *testing.T) {
TicketCreateProject: "EVG",
TicketSearchProjects: []string{"BF", "BFG"},
},
+ PeriodicBuilds: []PeriodicBuildDefinition{{ID: "p1"}},
}
projectConfig := &ProjectConfig{
Id: "version1",
@@ -2008,14 +2764,16 @@ func TestMergeWithProjectConfig(t *testing.T) {
{Command: "overridden"},
},
},
- ContainerSizes: map[string]ContainerResources{
- "small": ContainerResources{
- MemoryMB: 200,
+ ContainerSizeDefinitions: []ContainerResources{
+ {
+ Name: "small",
CPU: 1,
+ MemoryMB: 200,
},
- "large": ContainerResources{
- MemoryMB: 400,
+ {
+ Name: "large",
CPU: 2,
+ MemoryMB: 400,
},
},
BuildBaronSettings: &evergreen.BuildBaronSettings{
@@ -2025,7 +2783,6 @@ func TestMergeWithProjectConfig(t *testing.T) {
BFSuggestionTimeoutSecs: 10,
},
GithubTriggerAliases: []string{"one", "two"},
- PeriodicBuilds: []PeriodicBuildDefinition{{ID: "p1"}},
},
}
assert.NoError(t, projectRef.Insert())
@@ -2045,18 +2802,214 @@ func TestMergeWithProjectConfig(t *testing.T) {
assert.Equal(t, "EVG", projectRef.BuildBaronSettings.TicketCreateProject)
assert.Equal(t, []string{"one", "two"}, projectRef.GithubTriggerAliases)
assert.Equal(t, "p1", projectRef.PeriodicBuilds[0].ID)
- assert.Equal(t, 1, projectRef.ContainerSizes["small"].CPU)
- assert.Equal(t, 2, projectRef.ContainerSizes["large"].CPU)
+ assert.Equal(t, 1, projectRef.ContainerSizeDefinitions[0].CPU)
+ assert.Equal(t, 2, projectRef.ContainerSizeDefinitions[1].CPU)
- projectRef.ContainerSizes = map[string]ContainerResources{
- "xlarge": ContainerResources{
- MemoryMB: 800,
+ projectRef.ContainerSizeDefinitions = []ContainerResources{
+ {
+ Name: "xlarge",
CPU: 4,
+ MemoryMB: 800,
},
}
err = projectRef.MergeWithProjectConfig("version1")
assert.NoError(t, err)
require.NotNil(t, projectRef)
- assert.Equal(t, 4, projectRef.ContainerSizes["xlarge"].CPU)
+ assert.Equal(t, 4, projectRef.ContainerSizeDefinitions[0].CPU)
+}
+
+func TestSaveProjectPageForSection(t *testing.T) {
+ assert := assert.New(t)
+
+ assert.NoError(db.ClearCollections(ProjectRefCollection, RepoRefCollection, evergreen.ConfigCollection))
+
+ projectRef := &ProjectRef{
+ Owner: "evergreen-ci",
+ Repo: "mci",
+ Branch: "main",
+ Enabled: true,
+ BatchTime: 10,
+ Id: "iden_",
+ Identifier: "identifier",
+ PRTestingEnabled: utility.TruePtr(),
+ Private: utility.TruePtr(),
+ }
+ assert.NoError(projectRef.Insert())
+ projectRef, err := FindBranchProjectRef("identifier")
+ assert.NoError(err)
+ assert.NotNil(t, projectRef)
+ settings := evergreen.Settings{
+ GithubOrgs: []string{"newOwner", "evergreen-ci"},
+ }
+ assert.NoError(settings.Set())
+
+ update := &ProjectRef{
+ Id: "iden_",
+ Enabled: true,
+ Owner: "evergreen-ci",
+ Repo: "test",
+ }
+ _, err = SaveProjectPageForSection("iden_", update, ProjectPageGeneralSection, false)
+ assert.NoError(err)
+
+ // Test successful external link update
+ update = &ProjectRef{
+ ExternalLinks: []ExternalLink{
+ {URLTemplate: "https://arnars.com/{version_id}", DisplayName: "A link"},
+ },
+ }
+ _, err = SaveProjectPageForSection("iden_", update, ProjectPagePluginSection, false)
+ assert.NoError(err)
+
+ // Test failing external link update
+ update = &ProjectRef{
+ ExternalLinks: []ExternalLink{
+ {URLTemplate: "invalid URL template", DisplayName: "way tooooooooooooooooooooo long display name"},
+ },
+ }
+ _, err = SaveProjectPageForSection("iden_", update, ProjectPagePluginSection, false)
+ assert.Error(err)
+ assert.Contains(err.Error(), "validating external links: link display name, way tooooooooooooooooooooo long display name, must be 40 characters or less")
+ assert.Contains(err.Error(), "parse \"invalid URL template\": invalid URI for request")
+
+ // Test private field does not get updated
+ update = &ProjectRef{
+ Restricted: utility.TruePtr(),
+ }
+ _, err = SaveProjectPageForSection("iden_", update, ProjectPageAccessSection, false)
+ assert.NoError(err)
+
+ projectRef, err = FindBranchProjectRef("iden_")
+ assert.NoError(err)
+ assert.NotNil(t, projectRef)
+ assert.True(utility.FromBoolPtr(projectRef.Restricted))
+ assert.True(utility.FromBoolPtr(projectRef.Private))
+
+}
+
+func TestValidateOwnerAndRepo(t *testing.T) {
+ require.NoError(t, db.ClearCollections(ProjectRefCollection, RepoRefCollection, evergreen.ConfigCollection))
+
+ settings := evergreen.Settings{
+ GithubOrgs: []string{"newOwner", "evergreen-ci"},
+ }
+ assert.NoError(t, settings.Set())
+
+ // a project with no owner should error
+ project := ProjectRef{
+ Id: "project",
+ Enabled: true,
+ Repo: "repo",
+ }
+ require.NoError(t, project.Insert())
+
+ err := project.ValidateOwnerAndRepo([]string{"evergreen-ci"})
+ assert.NotNil(t, err)
+
+ // a project with an owner and repo should not error
+ project.Owner = "evergreen-ci"
+ err = project.ValidateOwnerAndRepo([]string{"evergreen-ci"})
+ assert.NoError(t, err)
+}
+
+func TestProjectCanDispatchTask(t *testing.T) {
+ t.Run("ReturnsTrueWithEnabledProject", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: true,
+ }
+ tsk := task.Task{
+ Id: "id",
+ }
+ canDispatch, _ := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.True(t, canDispatch)
+ })
+ t.Run("ReturnsFalseWithDisabledProject", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: false,
+ }
+ tsk := task.Task{
+ Id: "id",
+ }
+ canDispatch, reason := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.False(t, canDispatch)
+ assert.NotZero(t, reason)
+ })
+ t.Run("ReturnsTrueWithDisabledHiddenProjectForGitHubPRTask", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: false,
+ Hidden: utility.TruePtr(),
+ }
+ tsk := task.Task{
+ Id: "id",
+ Requester: evergreen.GithubPRRequester,
+ }
+ canDispatch, _ := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.True(t, canDispatch)
+ })
+ t.Run("ReturnsFalseWithDispatchingDisabledForPatchTask", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: true,
+ DispatchingDisabled: utility.TruePtr(),
+ }
+ tsk := task.Task{
+ Id: "id",
+ Requester: evergreen.PatchVersionRequester,
+ }
+ canDispatch, reason := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.False(t, canDispatch)
+ assert.NotZero(t, reason)
+ })
+ t.Run("ReturnsFalseWithDispatchingDisabledForMainlineTask", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: true,
+ DispatchingDisabled: utility.TruePtr(),
+ }
+ tsk := task.Task{
+ Id: "id",
+ Requester: evergreen.RepotrackerVersionRequester,
+ }
+ canDispatch, reason := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.False(t, canDispatch)
+ assert.NotZero(t, reason)
+ })
+ t.Run("ReturnsTrueWithPatchingDisabledForMainlineTask", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: true,
+ PatchingDisabled: utility.TruePtr(),
+ }
+ tsk := task.Task{
+ Id: "id",
+ Requester: evergreen.RepotrackerVersionRequester,
+ }
+ canDispatch, _ := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.True(t, canDispatch)
+ })
+ t.Run("ReturnsFalseWithPatchingDisabledForPatchTask", func(t *testing.T) {
+ pRef := ProjectRef{
+ Enabled: true,
+ PatchingDisabled: utility.TruePtr(),
+ }
+ tsk := task.Task{
+ Id: "id",
+ Requester: evergreen.PatchVersionRequester,
+ }
+ canDispatch, reason := ProjectCanDispatchTask(&pRef, &tsk)
+ assert.False(t, canDispatch)
+ assert.NotZero(t, reason)
+ })
+}
+
+func TestGetNextCronTime(t *testing.T) {
+ curTime := time.Date(2022, 12, 1, 0, 0, 0, 0, time.Local)
+ cron := "0 * * * *"
+ nextTime, err := GetNextCronTime(curTime, cron)
+ assert.NoError(t, err)
+ assert.NotEqual(t, nextTime, curTime)
+ assert.Equal(t, nextTime, curTime.Add(time.Hour))
+
+ // verify that a weekday cron can be parsed
+ weekdayCron := "0 0 * * 1-5"
+ _, err = GetNextCronTime(curTime, weekdayCron)
+ assert.NoError(t, err)
}
diff --git a/model/project_test.go b/model/project_test.go
index 05efef439aa..02087b6fe53 100644
--- a/model/project_test.go
+++ b/model/project_test.go
@@ -7,6 +7,8 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
+ mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
+ "github.com/evergreen-ci/evergreen/mock"
"github.com/evergreen-ci/evergreen/model/build"
"github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/event"
@@ -16,6 +18,7 @@ import (
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/evergreen/testutil"
"github.com/evergreen-ci/evergreen/thirdparty"
+ "github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/assert"
@@ -40,15 +43,16 @@ func TestFindProject(t *testing.T) {
projRef := &ProjectRef{
Id: "",
}
- version, project, err := FindLatestVersionWithValidProject(projRef.Id)
+ version, project, pp, err := FindLatestVersionWithValidProject(projRef.Id)
So(err, ShouldNotBeNil)
So(project, ShouldBeNil)
+ So(pp, ShouldBeNil)
So(version, ShouldBeNil)
})
Convey("if the project file exists and is valid, the project spec within"+
"should be unmarshalled and returned", func() {
- So(db.ClearCollections(VersionCollection), ShouldBeNil)
+ So(db.ClearCollections(VersionCollection, ParserProjectCollection), ShouldBeNil)
v := &Version{
Id: "my_version",
Owner: "fakeowner",
@@ -56,7 +60,9 @@ func TestFindProject(t *testing.T) {
Branch: "fakebranch",
Identifier: "project_test",
Requester: evergreen.RepotrackerVersionRequester,
- Config: "owner: fakeowner\nrepo: fakerepo\nbranch: fakebranch",
+ }
+ pp := ParserProject{
+ Id: "my_version",
}
p := &ProjectRef{
Id: "project_test",
@@ -64,13 +70,14 @@ func TestFindProject(t *testing.T) {
Repo: "fakerepo",
Branch: "fakebranch",
}
+ require.NoError(t, pp.Insert())
require.NoError(t, v.Insert(), "failed to insert test version: %v", v)
- _, _, err := FindLatestVersionWithValidProject(p.Id)
+ _, _, _, err := FindLatestVersionWithValidProject(p.Id)
So(err, ShouldBeNil)
})
Convey("if the first version is somehow malformed, return an earlier one", func() {
- So(db.ClearCollections(VersionCollection), ShouldBeNil)
+ So(db.ClearCollections(VersionCollection, ParserProjectCollection), ShouldBeNil)
badVersion := &Version{
Id: "bad_version",
Owner: "fakeowner",
@@ -78,8 +85,8 @@ func TestFindProject(t *testing.T) {
Branch: "fakebranch",
Identifier: "project_test",
Requester: evergreen.RepotrackerVersionRequester,
- Config: "this is just nonsense",
RevisionOrderNumber: 10,
+ Errors: []string{"this is a bad version"},
}
goodVersion := &Version{
Id: "good_version",
@@ -88,18 +95,28 @@ func TestFindProject(t *testing.T) {
Branch: "fakebranch",
Identifier: "project_test",
Requester: evergreen.RepotrackerVersionRequester,
- Config: "owner: fakeowner\nrepo: fakerepo\nbranch: fakebranch",
RevisionOrderNumber: 8,
}
+ pp := &ParserProject{}
+ err := util.UnmarshalYAMLWithFallback([]byte("owner: fakeowner\nrepo: fakerepo\nbranch: fakebranch"), &pp)
+ So(err, ShouldBeNil)
+ pp.Id = "good_version"
So(badVersion.Insert(), ShouldBeNil)
So(goodVersion.Insert(), ShouldBeNil)
- v, p, err := FindLatestVersionWithValidProject("project_test")
+ So(pp.Insert(), ShouldBeNil)
+ v, p, pp, err := FindLatestVersionWithValidProject("project_test")
So(err, ShouldBeNil)
+ So(pp, ShouldNotBeNil)
+ So(pp.Id, ShouldEqual, "good_version")
So(p, ShouldNotBeNil)
So(p.Owner, ShouldEqual, "fakeowner")
So(v.Id, ShouldEqual, "good_version")
})
-
+ Convey("error if no version exists", func() {
+ So(db.ClearCollections(VersionCollection, ParserProjectCollection), ShouldBeNil)
+ _, _, _, err := FindLatestVersionWithValidProject("project_test")
+ So(err, ShouldNotBeNil)
+ })
})
}
@@ -170,25 +187,26 @@ func TestPopulateBVT(t *testing.T) {
{
Name: "task1",
ExecTimeoutSecs: 500,
- Stepback: boolPtr(false),
+ Stepback: utility.FalsePtr(),
DependsOn: []TaskUnitDependency{{Name: "other"}},
Priority: 1000,
- Patchable: boolPtr(false),
+ Patchable: utility.FalsePtr(),
},
},
BuildVariants: []BuildVariant{
{
Name: "test",
- Tasks: []BuildVariantTaskUnit{{Name: "task1", Priority: 5}},
+ Tasks: []BuildVariantTaskUnit{{Name: "task1", Variant: "test", Priority: 5}},
},
},
}
Convey("updating a BuildVariantTaskUnit with unset fields", func() {
bvt := project.BuildVariants[0].Tasks[0]
- spec := project.GetSpecForTask("task1")
- So(spec.Name, ShouldEqual, "task1")
- bvt.Populate(spec)
+ projectTask := project.FindProjectTask("task1")
+ So(projectTask, ShouldNotBeNil)
+ So(projectTask.Name, ShouldEqual, "task1")
+ bvt.Populate(*projectTask, project.BuildVariants[0])
Convey("should inherit the unset fields from the Project", func() {
So(bvt.Name, ShouldEqual, "task1")
@@ -204,13 +222,15 @@ func TestPopulateBVT(t *testing.T) {
Convey("updating a BuildVariantTaskUnit with set fields", func() {
bvt := BuildVariantTaskUnit{
Name: "task1",
+ Variant: "bv",
ExecTimeoutSecs: 2,
- Stepback: boolPtr(true),
+ Stepback: utility.TruePtr(),
DependsOn: []TaskUnitDependency{{Name: "task2"}, {Name: "task3"}},
}
- spec := project.GetSpecForTask("task1")
- So(spec.Name, ShouldEqual, "task1")
- bvt.Populate(spec)
+ projectTask := project.FindProjectTask("task1")
+ So(projectTask, ShouldNotBeNil)
+ So(projectTask.Name, ShouldEqual, "task1")
+ bvt.Populate(*projectTask, project.BuildVariants[0])
Convey("should not inherit set fields from the Project", func() {
So(bvt.Name, ShouldEqual, "task1")
@@ -271,15 +291,13 @@ func TestIgnoresAllFiles(t *testing.T) {
})
}
-func boolPtr(b bool) *bool {
- return &b
-}
-
func TestPopulateExpansions(t *testing.T) {
assert := assert.New(t)
- assert.NoError(db.ClearCollections(VersionCollection, patch.Collection, ProjectRefCollection, task.Collection))
+ assert.NoError(db.ClearCollections(VersionCollection, patch.Collection, ProjectRefCollection,
+ task.Collection, ParserProjectCollection))
defer func() {
- assert.NoError(db.ClearCollections(VersionCollection, patch.Collection, ProjectRefCollection, task.Collection))
+ assert.NoError(db.ClearCollections(VersionCollection, patch.Collection, ProjectRefCollection,
+ task.Collection, ParserProjectCollection))
}()
h := host.Host{
@@ -288,24 +306,17 @@ func TestPopulateExpansions(t *testing.T) {
Id: "d1",
WorkDir: "/home/evg",
Expansions: []distro.Expansion{
- distro.Expansion{
+ {
Key: "note",
Value: "huge success",
},
- distro.Expansion{
+ {
Key: "cake",
Value: "truth",
},
},
},
}
- config := `
-buildvariants:
-- name: magic
- expansions:
- cake: lie
- github_org: wut?
-`
projectRef := &ProjectRef{
Id: "mci",
Identifier: "mci-favorite",
@@ -317,7 +328,6 @@ buildvariants:
Author: "somebody",
AuthorEmail: "somebody@somewhere.com",
RevisionOrderNumber: 42,
- Config: config,
Requester: evergreen.GitTagRequester,
TriggeredByGitTag: GitTag{
Tag: "release",
@@ -342,7 +352,7 @@ buildvariants:
assert.NoError(err)
expansions, err := PopulateExpansions(taskDoc, &h, oauthToken)
assert.NoError(err)
- assert.Len(map[string]string(expansions), 24)
+ assert.Len(map[string]string(expansions), 23)
assert.Equal("0", expansions.Get("execution"))
assert.Equal("v1", expansions.Get("version_id"))
assert.Equal("t1", expansions.Get("task_id"))
@@ -365,10 +375,9 @@ buildvariants:
assert.Equal("", expansions.Get("is_patch"))
assert.False(expansions.Exists("is_commit_queue"))
assert.Equal("github_tag", expansions.Get("requester"))
+ assert.False(expansions.Exists("github_pr_number"))
assert.False(expansions.Exists("github_repo"))
assert.False(expansions.Exists("github_author"))
- assert.False(expansions.Exists("github_pr_number"))
- assert.Equal("lie", expansions.Get("cake"))
assert.NoError(VersionUpdateOne(bson.M{VersionIdKey: v.Id}, bson.M{
"$set": bson.M{VersionRequesterKey: evergreen.PatchVersionRequester},
@@ -380,13 +389,13 @@ buildvariants:
expansions, err = PopulateExpansions(taskDoc, &h, oauthToken)
assert.NoError(err)
- assert.Len(map[string]string(expansions), 24)
+ assert.Len(map[string]string(expansions), 23)
assert.Equal("true", expansions.Get("is_patch"))
assert.Equal("patch", expansions.Get("requester"))
assert.False(expansions.Exists("is_commit_queue"))
+ assert.False(expansions.Exists("github_pr_number"))
assert.False(expansions.Exists("github_repo"))
assert.False(expansions.Exists("github_author"))
- assert.False(expansions.Exists("github_pr_number"))
assert.False(expansions.Exists("triggered_by_git_tag"))
require.NoError(t, db.ClearCollections(patch.Collection))
@@ -396,13 +405,26 @@ buildvariants:
p = patch.Patch{
Version: v.Id,
Description: "commit queue message",
+ GithubPatchData: thirdparty.GithubPatch{
+ PRNumber: 12,
+ BaseOwner: "potato",
+ BaseRepo: "tomato",
+ Author: "hemingway",
+ HeadHash: "7d2fe4649f50f87cb60c2f80ac2ceda1e5b88522",
+ MergeCommitSHA: "21",
+ },
}
require.NoError(t, p.Insert())
expansions, err = PopulateExpansions(taskDoc, &h, oauthToken)
assert.NoError(err)
- assert.Len(map[string]string(expansions), 26)
+ assert.Len(map[string]string(expansions), 29)
assert.Equal("true", expansions.Get("is_patch"))
assert.Equal("true", expansions.Get("is_commit_queue"))
+ assert.Equal("12", expansions.Get("github_pr_number"))
+ assert.Equal("potato", expansions.Get("github_org"))
+ assert.Equal(p.GithubPatchData.BaseRepo, expansions.Get("github_repo"))
+ assert.Equal(p.GithubPatchData.Author, expansions.Get("github_author"))
+ assert.Equal(p.GithubPatchData.HeadHash, expansions.Get("github_commit"))
assert.Equal("commit queue message", expansions.Get("commit_message"))
require.NoError(t, db.ClearCollections(patch.Collection))
@@ -447,7 +469,7 @@ buildvariants:
assert.Equal("octocat", expansions.Get("github_author"))
assert.Equal("42", expansions.Get("github_pr_number"))
assert.Equal("abc123", expansions.Get("github_commit"))
- assert.Equal("wut?", expansions.Get("github_org"))
+ assert.Equal("evergreen-ci", expansions.Get("github_org"))
upstreamTask := task.Task{
Id: "upstreamTask",
@@ -550,7 +572,6 @@ func (s *projectSuite) SetupTest() {
for _, alias := range s.aliases {
s.NoError(alias.Upsert())
}
-
s.project = &Project{
Identifier: "project",
BuildVariants: []BuildVariant{
@@ -558,19 +579,24 @@ func (s *projectSuite) SetupTest() {
Name: "bv_1",
Tasks: []BuildVariantTaskUnit{
{
- Name: "a_task_1",
+ Name: "a_task_1",
+ Variant: "bv_1",
},
{
- Name: "a_task_2",
+ Name: "a_task_2",
+ Variant: "bv_1",
},
{
- Name: "b_task_1",
+ Name: "b_task_1",
+ Variant: "bv_1",
},
{
- Name: "b_task_2",
+ Name: "b_task_2",
+ Variant: "bv_1",
},
{
- Name: "9001_task",
+ Name: "9001_task",
+ Variant: "bv_1",
DependsOn: []TaskUnitDependency{
{
Name: "a_task_2",
@@ -579,11 +605,13 @@ func (s *projectSuite) SetupTest() {
},
},
{
- Name: "very_task",
+ Name: "very_task",
+ Variant: "bv_1",
},
{
Name: "another_disabled_task",
- Patchable: boolPtr(false),
+ Variant: "bv_1",
+ Patchable: utility.FalsePtr(),
},
},
DisplayTasks: []patch.DisplayTask{
@@ -598,29 +626,35 @@ func (s *projectSuite) SetupTest() {
Tags: []string{"even"},
Tasks: []BuildVariantTaskUnit{
{
- Name: "a_task_1",
+ Name: "a_task_1",
+ Variant: "bv_2",
},
{
- Name: "a_task_2",
+ Name: "a_task_2",
+ Variant: "bv_2",
},
{
- Name: "b_task_1",
+ Name: "b_task_1",
+ Variant: "bv_2",
},
{
- Name: "b_task_2",
+ Name: "b_task_2",
+ Variant: "bv_2",
},
{
Name: "another_disabled_task",
- Patchable: boolPtr(false),
+ Variant: "bv_2",
+ Patchable: utility.TruePtr(),
},
},
},
{
- Name: "bv_3",
- Disabled: true,
+ Name: "bv_3",
Tasks: []BuildVariantTaskUnit{
{
- Name: "disabled_task",
+ Name: "disabled_task",
+ Variant: "bv_3",
+ Disable: utility.TruePtr(),
},
},
},
@@ -670,11 +704,11 @@ func (s *projectSuite) SetupTest() {
},
{
Name: "another_disabled_task",
- Patchable: boolPtr(false),
+ Patchable: utility.FalsePtr(),
},
},
Functions: map[string]*YAMLCommandSet{
- "go generate a thing": &YAMLCommandSet{
+ "go generate a thing": {
MultiCommand: []PluginCommandConf{
{
Command: "shell.exec",
@@ -693,7 +727,7 @@ func (s *projectSuite) SetupTest() {
func (s *projectSuite) TestAliasResolution() {
// test that .* on variants and tasks selects everything
- pairs, displayTaskPairs, err := s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[0]})
+ pairs, displayTaskPairs, err := s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[0]}, evergreen.PatchVersionRequester)
s.NoError(err)
s.Len(pairs, 11)
pairStrs := make([]string, len(pairs))
@@ -710,21 +744,21 @@ func (s *projectSuite) TestAliasResolution() {
s.Contains(pairStrs, "bv_2/a_task_2")
s.Contains(pairStrs, "bv_2/b_task_1")
s.Contains(pairStrs, "bv_2/b_task_2")
- s.Contains(pairStrs, "bv_3/disabled_task")
+ s.Contains(pairStrs, "bv_2/another_disabled_task")
s.Require().Len(displayTaskPairs, 1)
s.Equal("bv_1/memes", displayTaskPairs[0].String())
// test that the .*_2 regex on variants selects just bv_2
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[1]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[1]}, evergreen.PatchVersionRequester)
s.NoError(err)
- s.Len(pairs, 4)
+ s.Len(pairs, 5)
for _, pair := range pairs {
s.Equal("bv_2", pair.Variant)
}
s.Empty(displayTaskPairs)
// test that the .*_2 regex on tasks selects just the _2 tasks
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[2]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[2]}, evergreen.PatchVersionRequester)
s.NoError(err)
s.Len(pairs, 4)
for _, pair := range pairs {
@@ -733,7 +767,7 @@ func (s *projectSuite) TestAliasResolution() {
s.Empty(displayTaskPairs)
// test that the 'a' tag only selects 'a' tasks
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[3]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[3]}, evergreen.PatchVersionRequester)
s.NoError(err)
s.Len(pairs, 4)
for _, pair := range pairs {
@@ -742,7 +776,7 @@ func (s *projectSuite) TestAliasResolution() {
s.Empty(displayTaskPairs)
// test that the .*_2 regex selects the union of both
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[4]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[4]}, evergreen.PatchVersionRequester)
s.NoError(err)
s.Len(pairs, 4)
for _, pair := range pairs {
@@ -751,20 +785,19 @@ func (s *projectSuite) TestAliasResolution() {
s.Empty(displayTaskPairs)
// test for display tasks
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[5]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[5]}, evergreen.PatchVersionRequester)
s.NoError(err)
s.Empty(pairs)
s.Require().Len(displayTaskPairs, 1)
s.Equal("bv_1/memes", displayTaskPairs[0].String())
// test for alias including a task belong to a disabled variant
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[6]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[6]}, evergreen.PatchVersionRequester)
s.NoError(err)
- s.Require().Len(pairs, 1)
- s.Equal("bv_3/disabled_task", pairs[0].String())
+ s.Empty(pairs)
s.Empty(displayTaskPairs)
- pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[8]})
+ pairs, displayTaskPairs, err = s.project.BuildProjectTVPairsWithAlias([]ProjectAlias{s.aliases[8]}, evergreen.PatchVersionRequester)
s.NoError(err)
s.Require().Len(pairs, 2)
s.Equal("bv_2/a_task_1", pairs[0].String())
@@ -779,17 +812,51 @@ func (s *projectSuite) TestBuildProjectTVPairs() {
Tasks: []string{"all"},
}
- s.project.BuildProjectTVPairs(&patchDoc, "")
+ s.project.BuildProjectTVPairs(&patchDoc, evergreen.PatchVersionRequester)
s.Len(patchDoc.BuildVariants, 2)
- s.Len(patchDoc.Tasks, 6)
+ s.ElementsMatch([]string{"bv_1", "bv_2"}, patchDoc.BuildVariants)
+ s.Len(patchDoc.Tasks, 7)
+ s.ElementsMatch([]string{
+ "a_task_1",
+ "a_task_2",
+ "b_task_1",
+ "b_task_2",
+ "9001_task",
+ "very_task",
+ "another_disabled_task"}, patchDoc.Tasks)
+ for _, vt := range patchDoc.VariantsTasks {
+ switch vt.Variant {
+ case "bv_1":
+ s.ElementsMatch([]string{
+ "a_task_1",
+ "a_task_2",
+ "b_task_1",
+ "b_task_2",
+ "9001_task",
+ "very_task",
+ }, vt.Tasks)
+ s.Len(vt.DisplayTasks, 1)
+ case "bv_2":
+ s.ElementsMatch([]string{
+ "a_task_1",
+ "a_task_2",
+ "b_task_1",
+ "b_task_2",
+ "another_disabled_task",
+ }, vt.Tasks)
+ s.Empty(vt.DisplayTasks)
+ default:
+ s.Fail("unexpected variant '%s'", vt.Variant)
+ }
+ }
// test all tasks expansion with named buildvariant expands unnamed buildvariant
patchDoc.BuildVariants = []string{"bv_1"}
patchDoc.Tasks = []string{"all"}
patchDoc.VariantsTasks = []patch.VariantTasks{}
- s.project.BuildProjectTVPairs(&patchDoc, "")
+ s.project.BuildProjectTVPairs(&patchDoc, evergreen.PatchVersionRequester)
s.Len(patchDoc.BuildVariants, 2)
s.Len(patchDoc.Tasks, 6)
@@ -798,7 +865,7 @@ func (s *projectSuite) TestBuildProjectTVPairs() {
patchDoc.BuildVariants = []string{"all"}
patchDoc.VariantsTasks = []patch.VariantTasks{}
- s.project.BuildProjectTVPairs(&patchDoc, "")
+ s.project.BuildProjectTVPairs(&patchDoc, evergreen.PatchVersionRequester)
s.Len(patchDoc.BuildVariants, 2)
s.Len(patchDoc.Tasks, 6)
@@ -813,8 +880,42 @@ func (s *projectSuite) TestResolvePatchVTs() {
bvs, tasks, variantTasks := s.project.ResolvePatchVTs(&patchDoc, patchDoc.GetRequester(), "", true)
s.Len(bvs, 2)
- s.Len(tasks, 6)
+ s.ElementsMatch([]string{"bv_1", "bv_2"}, bvs)
+ s.Len(tasks, 7)
+ s.ElementsMatch([]string{
+ "a_task_1",
+ "a_task_2",
+ "b_task_1",
+ "b_task_2",
+ "9001_task",
+ "very_task",
+ "another_disabled_task"}, tasks)
s.Len(variantTasks, 2)
+ for _, vt := range variantTasks {
+ switch vt.Variant {
+ case "bv_1":
+ s.ElementsMatch([]string{
+ "a_task_1",
+ "a_task_2",
+ "b_task_1",
+ "b_task_2",
+ "9001_task",
+ "very_task",
+ }, vt.Tasks)
+ s.Len(vt.DisplayTasks, 1)
+ case "bv_2":
+ s.ElementsMatch([]string{
+ "a_task_1",
+ "a_task_2",
+ "b_task_1",
+ "b_task_2",
+ "another_disabled_task",
+ }, vt.Tasks)
+ s.Empty(vt.DisplayTasks)
+ default:
+ s.Fail("unexpected variant '%s'", vt.Variant)
+ }
+ }
// Build variant and tasks override regex.
patchDoc = patch.Patch{
@@ -826,7 +927,7 @@ func (s *projectSuite) TestResolvePatchVTs() {
bvs, tasks, variantTasks = s.project.ResolvePatchVTs(&patchDoc, patchDoc.GetRequester(), "", true)
s.Len(bvs, 2)
- s.Len(tasks, 6)
+ s.Len(tasks, 7)
s.Len(variantTasks, 2)
// Regex build variants and tasks.
@@ -1098,12 +1199,9 @@ func (s *projectSuite) TestBuildProjectTVPairsWithDisabledBuildVariant() {
patchDoc := patch.Patch{}
s.project.BuildProjectTVPairs(&patchDoc, "disabled_stuff")
- s.Equal([]string{"bv_3"}, patchDoc.BuildVariants)
- s.Equal([]string{"disabled_task"}, patchDoc.Tasks)
- s.Require().Len(patchDoc.VariantsTasks, 1)
- s.Equal("bv_3", patchDoc.VariantsTasks[0].Variant)
- s.Equal([]string{"disabled_task"}, patchDoc.VariantsTasks[0].Tasks)
- s.Empty(patchDoc.VariantsTasks[0].DisplayTasks)
+ s.Empty(patchDoc.BuildVariants)
+ s.Empty(patchDoc.Tasks)
+ s.Empty(patchDoc.VariantsTasks)
patchDoc = patch.Patch{
BuildVariants: []string{"bv_3"},
@@ -1111,12 +1209,9 @@ func (s *projectSuite) TestBuildProjectTVPairsWithDisabledBuildVariant() {
}
s.project.BuildProjectTVPairs(&patchDoc, "")
- s.Equal([]string{"bv_3"}, patchDoc.BuildVariants)
- s.Equal([]string{"disabled_task"}, patchDoc.Tasks)
- s.Require().Len(patchDoc.VariantsTasks, 1)
- s.Equal("bv_3", patchDoc.VariantsTasks[0].Variant)
- s.Equal([]string{"disabled_task"}, patchDoc.VariantsTasks[0].Tasks)
- s.Empty(patchDoc.VariantsTasks[0].DisplayTasks)
+ s.Empty(patchDoc.BuildVariants)
+ s.Empty(patchDoc.Tasks)
+ s.Empty(patchDoc.VariantsTasks)
}
func (s *projectSuite) TestBuildProjectTVPairsWithDisplayTaskWithDependencies() {
@@ -1194,24 +1289,24 @@ func (s *projectSuite) TestNewPatchTaskIdTable() {
p := &Project{
Identifier: "project_id",
Tasks: []ProjectTask{
- ProjectTask{
+ {
Name: "task1",
},
- ProjectTask{
+ {
Name: "task2",
},
- ProjectTask{
+ {
Name: "task3",
},
},
BuildVariants: []BuildVariant{
- BuildVariant{
+ {
Name: "test",
- Tasks: []BuildVariantTaskUnit{{Name: "group_1"}},
+ Tasks: []BuildVariantTaskUnit{{Name: "group_1", Variant: "test"}},
},
},
TaskGroups: []TaskGroup{
- TaskGroup{
+ {
Name: "group_1",
Tasks: []string{
"task1",
@@ -1232,7 +1327,8 @@ func (s *projectSuite) TestNewPatchTaskIdTable() {
},
}
- config := NewPatchTaskIdTable(p, v, pairs, "project_identifier")
+ config, err := NewPatchTaskIdTable(p, v, pairs, "project_identifier")
+ s.Require().NoError(err)
s.Len(config.DisplayTasks, 0)
s.Len(config.ExecutionTasks, 2)
s.Equal("project_identifier_test_task1_revision_01_01_01_00_00_00",
@@ -1377,7 +1473,7 @@ func TestFindProjectsSuite(t *testing.T) {
{
Id: "projectA",
Private: utility.FalsePtr(),
- Enabled: utility.TruePtr(),
+ Enabled: true,
CommitQueue: CommitQueueParams{Enabled: utility.TruePtr()},
Owner: "evergreen-ci",
Repo: "gimlet",
@@ -1386,7 +1482,7 @@ func TestFindProjectsSuite(t *testing.T) {
{
Id: "projectB",
Private: utility.TruePtr(),
- Enabled: utility.TruePtr(),
+ Enabled: true,
CommitQueue: CommitQueueParams{Enabled: utility.TruePtr()},
Owner: "evergreen-ci",
Repo: "evergreen",
@@ -1395,7 +1491,7 @@ func TestFindProjectsSuite(t *testing.T) {
{
Id: "projectC",
Private: utility.TruePtr(),
- Enabled: utility.TruePtr(),
+ Enabled: true,
CommitQueue: CommitQueueParams{Enabled: utility.TruePtr()},
Owner: "mongodb",
Repo: "mongo",
@@ -1435,21 +1531,24 @@ func TestFindProjectsSuite(t *testing.T) {
h :=
event.EventLogEntry{
Timestamp: time.Now(),
- ResourceType: EventResourceTypeProject,
- EventType: EventTypeProjectModified,
+ ResourceType: event.EventResourceTypeProject,
+ EventType: event.EventTypeProjectModified,
ResourceId: projectId,
Data: &ProjectChangeEvent{
- User: username,
- Before: before,
- After: after,
+ User: username,
+ Before: ProjectSettingsEvent{
+ ProjectSettings: before,
+ },
+ After: ProjectSettingsEvent{
+ ProjectSettings: after,
+ },
},
}
- s.Require().NoError(db.ClearCollections(event.AllLogCollection))
- logger := event.NewDBEventLogger(event.AllLogCollection)
+ s.Require().NoError(db.ClearCollections(event.EventCollection))
for i := 0; i < projEventCount; i++ {
eventShallowCpy := h
- s.NoError(logger.LogEvent(&eventShallowCpy))
+ s.NoError(eventShallowCpy.Log())
}
return nil
@@ -1540,7 +1639,7 @@ func (s *FindProjectsSuite) TestGetProjectWithCommitQueueByOwnerRepoAndBranch()
func (s *FindProjectsSuite) TestGetProjectSettings() {
projRef := &ProjectRef{
Owner: "admin",
- Enabled: utility.TruePtr(),
+ Enabled: true,
Private: utility.TruePtr(),
Id: projectId,
Admins: []string{},
@@ -1554,7 +1653,7 @@ func (s *FindProjectsSuite) TestGetProjectSettings() {
func (s *FindProjectsSuite) TestGetProjectSettingsNoRepo() {
projRef := &ProjectRef{
Owner: "admin",
- Enabled: utility.TruePtr(),
+ Enabled: true,
Private: utility.TruePtr(),
Id: projectId,
Admins: []string{},
@@ -1575,32 +1674,32 @@ func TestModuleList(t *testing.T) {
manifest1 := manifest.Manifest{
Modules: map[string]*manifest.Module{
- "wt": &manifest.Module{Branch: "develop", Repo: "wt", Owner: "else", Revision: "123"},
- "enterprise": &manifest.Module{Branch: "main", Repo: "enterprise", Owner: "something", Revision: "abc"},
+ "wt": {Branch: "develop", Repo: "wt", Owner: "else", Revision: "123"},
+ "enterprise": {Branch: "main", Repo: "enterprise", Owner: "something", Revision: "abc"},
},
}
assert.True(projModules.IsIdentical(manifest1))
manifest2 := manifest.Manifest{
Modules: map[string]*manifest.Module{
- "wt": &manifest.Module{Branch: "different branch", Repo: "wt", Owner: "else", Revision: "123"},
- "enterprise": &manifest.Module{Branch: "main", Repo: "enterprise", Owner: "something", Revision: "abc"},
+ "wt": {Branch: "different branch", Repo: "wt", Owner: "else", Revision: "123"},
+ "enterprise": {Branch: "main", Repo: "enterprise", Owner: "something", Revision: "abc"},
},
}
assert.False(projModules.IsIdentical(manifest2))
manifest3 := manifest.Manifest{
Modules: map[string]*manifest.Module{
- "wt": &manifest.Module{Branch: "develop", Repo: "wt", Owner: "else", Revision: "123"},
- "enterprise": &manifest.Module{Branch: "main", Repo: "enterprise", Owner: "something", Revision: "abc"},
- "extra": &manifest.Module{Branch: "main", Repo: "repo", Owner: "something", Revision: "abc"},
+ "wt": {Branch: "develop", Repo: "wt", Owner: "else", Revision: "123"},
+ "enterprise": {Branch: "main", Repo: "enterprise", Owner: "something", Revision: "abc"},
+ "extra": {Branch: "main", Repo: "repo", Owner: "something", Revision: "abc"},
},
}
assert.False(projModules.IsIdentical(manifest3))
manifest4 := manifest.Manifest{
Modules: map[string]*manifest.Module{
- "wt": &manifest.Module{Branch: "develop", Repo: "wt", Owner: "else", Revision: "123"},
+ "wt": {Branch: "develop", Repo: "wt", Owner: "else", Revision: "123"},
},
}
assert.False(projModules.IsIdentical(manifest4))
@@ -1627,43 +1726,6 @@ func TestLoggerConfigValidate(t *testing.T) {
assert.EqualError(config.IsValid(), "invalid system logger config: Splunk logger requires a server URL\nSplunk logger requires a token")
}
-func TestFindContainerFromProject(t *testing.T) {
- assert := assert.New(t)
- require.NoError(t, db.ClearCollections(VersionCollection, ParserProjectCollection, ProjectRefCollection))
- ref := ProjectRef{
- Id: "p1",
- }
-
- pp := ParserProject{
- Id: "v1",
- Identifier: utility.ToStringPtr("p1"),
- Containers: []Container{
- {
- Name: "container1",
- },
- },
- }
-
- v := &Version{Id: "v1"}
- require.NoError(t, pp.TryUpsert())
- require.NoError(t, v.Insert())
- require.NoError(t, ref.Insert())
-
- task := task.Task{
- Version: "v1",
- Project: "p1",
- Container: "container1",
- }
- container, err := FindContainerFromProject(task)
- require.NoError(t, err)
- assert.Equal(container.Name, "container1")
-
- task.Container = "nonexistent"
- _, err = FindContainerFromProject(task)
- require.Error(t, err)
- assert.Equal(err.Error(), "no such container 'nonexistent' defined on project 'p1'")
-}
-
func TestLoggerMerge(t *testing.T) {
assert := assert.New(t)
@@ -1855,7 +1917,7 @@ func TestCommandsRunOnBV(t *testing.T) {
},
},
funcs: map[string]*YAMLCommandSet{
- "function": &YAMLCommandSet{
+ "function": {
SingleCommand: &PluginCommandConf{
Command: cmd,
DisplayName: "display",
@@ -1904,7 +1966,7 @@ func TestCommandsRunOnBV(t *testing.T) {
},
},
funcs: map[string]*YAMLCommandSet{
- "function": &YAMLCommandSet{
+ "function": {
SingleCommand: &PluginCommandConf{
Command: cmd,
DisplayName: "display1",
@@ -1937,14 +1999,14 @@ func TestGetAllVariantTasks(t *testing.T) {
{
Name: "bv1",
Tasks: []BuildVariantTaskUnit{
- {Name: "t1"},
- {Name: "t2"},
+ {Name: "t1", Variant: "bv1"},
+ {Name: "t2", Variant: "bv1"},
},
}, {
Name: "bv2",
Tasks: []BuildVariantTaskUnit{
- {Name: "t2"},
- {Name: "t3"},
+ {Name: "t2", Variant: "bv2"},
+ {Name: "t3", Variant: "bv2"},
},
},
},
@@ -2102,8 +2164,8 @@ func TestVariantTasksForSelectors(t *testing.T) {
Name: "bv0",
DisplayTasks: []patch.DisplayTask{{Name: "dt0", ExecTasks: []string{"t0"}}},
Tasks: []BuildVariantTaskUnit{
- {Name: "t0"},
- {Name: "t1", DependsOn: []TaskUnitDependency{{Name: "t0", Variant: "bv0"}}}},
+ {Name: "t0", Variant: "bv0"},
+ {Name: "t1", Variant: "bv0", DependsOn: []TaskUnitDependency{{Name: "t0", Variant: "bv0"}}}},
},
},
Tasks: []ProjectTask{
@@ -2204,15 +2266,15 @@ func TestDependencyGraph(t *testing.T) {
{
Name: "ubuntu",
Tasks: []BuildVariantTaskUnit{
- {Name: "compile", DependsOn: []TaskUnitDependency{{Name: "setup"}}},
- {Name: "setup"},
+ {Name: "compile", Variant: "ubuntu", DependsOn: []TaskUnitDependency{{Name: "setup"}}},
+ {Name: "setup", Variant: "ubuntu"},
},
},
{
Name: "rhel",
Tasks: []BuildVariantTaskUnit{
- {Name: "compile", DependsOn: []TaskUnitDependency{{Name: "setup"}}},
- {Name: "setup"},
+ {Name: "compile", Variant: "rhel", DependsOn: []TaskUnitDependency{{Name: "setup"}}},
+ {Name: "setup", Variant: "rhel"},
},
},
},
@@ -2228,11 +2290,12 @@ func TestFindAllBuildVariantTasks(t *testing.T) {
{Name: "in_group_0"},
{Name: "in_group_1"},
}
- bvTasks := []BuildVariantTaskUnit{{Name: "task_group", IsGroup: true}}
+ const bvName = "bv"
+ bvTasks := []BuildVariantTaskUnit{{Name: "task_group", IsGroup: true, Variant: bvName}}
groups := []TaskGroup{{Name: bvTasks[0].Name, Tasks: []string{tasks[0].Name, tasks[1].Name}}}
p := Project{
Tasks: tasks,
- BuildVariants: []BuildVariant{{Name: "bv", Tasks: bvTasks}},
+ BuildVariants: []BuildVariant{{Name: bvName, Tasks: bvTasks}},
TaskGroups: groups,
}
@@ -2408,9 +2471,14 @@ func TestDependenciesForTaskUnit(t *testing.T) {
}
}
-func TestGetVariantsAndTasksFromProject(t *testing.T) {
- ctx := context.Background()
- patchedConfig := `
+func TestGetVariantsAndTasksFromPatchProject(t *testing.T) {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ env := &mock.Environment{}
+ require.NoError(t, env.Configure(ctx))
+
+ patchedProject := `
buildvariants:
- name: bv1
display_name: bv1_display
@@ -2430,7 +2498,67 @@ tasks:
disable: true
- name: task3
`
- variantsAndTasks, err := GetVariantsAndTasksFromProject(ctx, patchedConfig, "")
- assert.NoError(t, err)
- assert.Len(t, variantsAndTasks.Variants["bv1"].Tasks, 1)
+
+ defer func() {
+ assert.NoError(t, db.ClearCollections(VersionCollection, ParserProjectCollection))
+ }()
+
+ for tName, tCase := range map[string]func(t *testing.T, p *patch.Patch, pp *ParserProject){
+ "SucceedsWithParserProjectInDB": func(t *testing.T, p *patch.Patch, pp *ParserProject) {
+ require.NoError(t, pp.Insert())
+ p.ProjectStorageMethod = evergreen.ProjectStorageMethodDB
+
+ variantsAndTasks, err := GetVariantsAndTasksFromPatchProject(ctx, env.Settings(), p)
+ require.NoError(t, err)
+ assert.Len(t, variantsAndTasks.Tasks, 2)
+ require.NotNil(t, variantsAndTasks.Variants)
+ assert.Len(t, variantsAndTasks.Variants["bv1"].Tasks, 1)
+ assert.Equal(t, "task3", variantsAndTasks.Variants["bv1"].Tasks[0].Name)
+ },
+ "SucceedsWithAlreadyFinalizedPatch": func(t *testing.T, p *patch.Patch, pp *ParserProject) {
+ v := Version{
+ Id: p.Id.Hex(),
+ ProjectStorageMethod: evergreen.ProjectStorageMethodDB,
+ }
+ require.NoError(t, v.Insert())
+ require.NoError(t, pp.Insert())
+ p.Version = v.Id
+
+ variantsAndTasks, err := GetVariantsAndTasksFromPatchProject(ctx, env.Settings(), p)
+ require.NoError(t, err)
+ assert.Len(t, variantsAndTasks.Tasks, 2)
+ require.NotZero(t, variantsAndTasks)
+ assert.Len(t, variantsAndTasks.Variants["bv1"].Tasks, 1)
+ assert.Equal(t, "task3", variantsAndTasks.Variants["bv1"].Tasks[0].Name)
+ },
+ "SucceedsWithPatchedParserProject": func(t *testing.T, p *patch.Patch, pp *ParserProject) {
+ p.PatchedParserProject = patchedProject
+
+ variantsAndTasks, err := GetVariantsAndTasksFromPatchProject(ctx, env.Settings(), p)
+ require.NoError(t, err)
+ assert.Len(t, variantsAndTasks.Tasks, 2)
+ require.NotZero(t, variantsAndTasks)
+ assert.Len(t, variantsAndTasks.Variants["bv1"].Tasks, 1)
+ assert.Equal(t, "task3", variantsAndTasks.Variants["bv1"].Tasks[0].Name)
+ },
+ "FailsWithUnfinalizedPatchThatHasNeitherPatchedParserProjectNorParserProjectStorage": func(t *testing.T, p *patch.Patch, pp *ParserProject) {
+ _, err := GetVariantsAndTasksFromPatchProject(ctx, env.Settings(), p)
+ assert.Error(t, err)
+ },
+ } {
+ t.Run(tName, func(t *testing.T) {
+ require.NoError(t, db.ClearCollections(VersionCollection, ParserProjectCollection))
+
+ project := &Project{}
+ pp, err := LoadProjectInto(ctx, []byte(patchedProject), nil, "", project)
+ require.NoError(t, err)
+
+ p := &patch.Patch{
+ Id: mgobson.NewObjectId(),
+ }
+ pp.Id = p.Id.Hex()
+
+ tCase(t, p, pp)
+ })
+ }
}
diff --git a/model/project_vars.go b/model/project_vars.go
index d4431878831..8cd634c1316 100644
--- a/model/project_vars.go
+++ b/model/project_vars.go
@@ -30,10 +30,10 @@ const (
ProjectAWSSSHKeyValue = "__project_aws_ssh_key_value"
)
-//ProjectVars holds a map of variables specific to a given project.
-//They can be fetched at run time by the agent, so that settings which are
-//sensitive or subject to frequent change don't need to be hard-coded into
-//yml files.
+// ProjectVars holds a map of variables specific to a given project.
+// They can be fetched at run time by the agent, so that settings which are
+// sensitive or subject to frequent change don't need to be hard-coded into
+// yml files.
type ProjectVars struct {
//Should match the identifier of the project it refers to
@@ -340,9 +340,13 @@ func (projectVars *ProjectVars) RedactPrivateVars() *ProjectVars {
func GetVarsByValue(val string) ([]*ProjectVars, error) {
matchingProjects := []*ProjectVars{}
- filter := fmt.Sprintf("function() { for (var field in this.vars) { if (this.vars[field] == \"%s\") return true; } return false; }", val)
- q := db.Query(bson.M{"$where": filter})
- err := db.FindAllQ(ProjectVarsCollection, q, &matchingProjects)
+ pipeline := []bson.M{
+ {"$addFields": bson.M{projectVarsMapKey: bson.M{"$objectToArray": "$" + projectVarsMapKey}}},
+ {"$match": bson.M{bsonutil.GetDottedKeyName(projectVarsMapKey, "v"): val}},
+ {"$addFields": bson.M{projectVarsMapKey: bson.M{"$arrayToObject": "$" + projectVarsMapKey}}},
+ }
+
+ err := db.Aggregate(ProjectVarsCollection, pipeline, &matchingProjects)
if adb.ResultsNotFound(err) {
return nil, nil
diff --git a/model/push.go b/model/push.go
index 2c4b78829a9..0ed477c586e 100644
--- a/model/push.go
+++ b/model/push.go
@@ -57,15 +57,15 @@ func NewPushLog(v *Version, task *task.Task, location string) *PushLog {
}
}
-func (self *PushLog) Insert() error {
- return db.Insert(PushlogCollection, self)
+func (pl *PushLog) Insert() error {
+ return db.Insert(PushlogCollection, pl)
}
-func (self *PushLog) UpdateStatus(newStatus string) error {
+func (pl *PushLog) UpdateStatus(newStatus string) error {
return db.Update(
PushlogCollection,
bson.M{
- PushLogIdKey: self.Id,
+ PushLogIdKey: pl.Id,
},
bson.M{
"$set": bson.M{
diff --git a/model/reliability/db.go b/model/reliability/db.go
index e28c81b7add..1e6c292af5c 100644
--- a/model/reliability/db.go
+++ b/model/reliability/db.go
@@ -16,13 +16,13 @@ package reliability
// This approach ensures that all the score can be fairly compared as they are for the same number of days.
// 2. The date field is generated in the $group stage. It doesn't require an $addField pipeline stage.
//
-// See stats.db.go for details on the structure of the backing daily_task_stats collection.
+// See taskstats.db.go for details on the structure of the backing daily_task_stats collection.
import (
"time"
"github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/stats"
+ "github.com/evergreen-ci/evergreen/model/taskstats"
"github.com/evergreen-ci/utility"
"go.mongodb.org/mongo-driver/bson"
)
@@ -56,37 +56,37 @@ func (filter TaskReliabilityFilter) dateBoundaries() []time.Time {
// BuildTaskPaginationOrBranches builds an expression for the conditions imposed by the filter StartAt field.
func (filter TaskReliabilityFilter) buildTaskPaginationOrBranches() []bson.M {
- var dateDescending = filter.Sort == stats.SortLatestFirst
+ var dateDescending = filter.Sort == taskstats.SortLatestFirst
var nextDate interface{}
if filter.GroupNumDays > 1 {
nextDate = filter.StartAt.Date
}
- var fields []stats.PaginationField
+ var fields []taskstats.PaginationField
switch filter.GroupBy {
- case stats.GroupByTask:
- fields = []stats.PaginationField{
- {Field: stats.DbTaskStatsIdDateKeyFull, Descending: dateDescending, Strict: true, Value: filter.StartAt.Date, NextValue: nextDate},
- {Field: stats.DbTaskStatsIdTaskNameKeyFull, Strict: true, Value: filter.StartAt.Task},
+ case taskstats.GroupByTask:
+ fields = []taskstats.PaginationField{
+ {Field: taskstats.DBTaskStatsIDDateKeyFull, Descending: dateDescending, Strict: true, Value: filter.StartAt.Date, NextValue: nextDate},
+ {Field: taskstats.DBTaskStatsIDTaskNameKeyFull, Strict: true, Value: filter.StartAt.Task},
}
- case stats.GroupByVariant:
- fields = []stats.PaginationField{
- {Field: stats.DbTaskStatsIdDateKeyFull, Descending: dateDescending, Strict: true, Value: filter.StartAt.Date, NextValue: nextDate},
- {Field: stats.DbTaskStatsIdBuildVariantKeyFull, Strict: true, Value: filter.StartAt.BuildVariant},
- {Field: stats.DbTaskStatsIdTaskNameKeyFull, Strict: true, Value: filter.StartAt.Task},
+ case taskstats.GroupByVariant:
+ fields = []taskstats.PaginationField{
+ {Field: taskstats.DBTaskStatsIDDateKeyFull, Descending: dateDescending, Strict: true, Value: filter.StartAt.Date, NextValue: nextDate},
+ {Field: taskstats.DBTaskStatsIDBuildVariantKeyFull, Strict: true, Value: filter.StartAt.BuildVariant},
+ {Field: taskstats.DBTaskStatsIDTaskNameKeyFull, Strict: true, Value: filter.StartAt.Task},
}
- case stats.GroupByDistro:
- fields = []stats.PaginationField{
- {Field: stats.DbTaskStatsIdDateKeyFull, Descending: dateDescending, Strict: true, Value: filter.StartAt.Date, NextValue: nextDate},
- {Field: stats.DbTaskStatsIdBuildVariantKeyFull, Strict: true, Value: filter.StartAt.BuildVariant},
- {Field: stats.DbTaskStatsIdTaskNameKeyFull, Strict: true, Value: filter.StartAt.Task},
- {Field: stats.DbTaskStatsIdDistroKeyFull, Strict: true, Value: filter.StartAt.Distro},
+ case taskstats.GroupByDistro:
+ fields = []taskstats.PaginationField{
+ {Field: taskstats.DBTaskStatsIDDateKeyFull, Descending: dateDescending, Strict: true, Value: filter.StartAt.Date, NextValue: nextDate},
+ {Field: taskstats.DBTaskStatsIDBuildVariantKeyFull, Strict: true, Value: filter.StartAt.BuildVariant},
+ {Field: taskstats.DBTaskStatsIDTaskNameKeyFull, Strict: true, Value: filter.StartAt.Task},
+ {Field: taskstats.DBTaskStatsIDDistroKeyFull, Strict: true, Value: filter.StartAt.Distro},
}
}
- return stats.BuildPaginationOrBranches(fields)
+ return taskstats.BuildPaginationOrBranches(fields)
}
// BuildMatchStageForTask builds the match stage of the task query pipeline based on the filter options.
@@ -97,21 +97,21 @@ func (filter TaskReliabilityFilter) buildMatchStageForTask() bson.M {
end := boundaries[len(boundaries)-1]
match := bson.M{
- stats.DbTaskStatsIdDateKeyFull: bson.M{
+ taskstats.DBTaskStatsIDDateKeyFull: bson.M{
"$lt": start,
"$gte": end,
},
- stats.DbTestStatsIdProjectKeyFull: filter.Project,
- stats.DbTestStatsIdRequesterKeyFull: bson.M{"$in": filter.Requesters},
+ taskstats.DBTaskStatsIDProjectKeyFull: filter.Project,
+ taskstats.DBTaskStatsIDRequesterKeyFull: bson.M{"$in": filter.Requesters},
}
if len(filter.Tasks) > 0 {
- match[stats.DbTaskStatsIdTaskNameKeyFull] = stats.BuildMatchArrayExpression(filter.Tasks)
+ match[taskstats.DBTaskStatsIDTaskNameKeyFull] = taskstats.BuildMatchArrayExpression(filter.Tasks)
}
if len(filter.BuildVariants) > 0 {
- match[stats.DbTaskStatsIdBuildVariantKeyFull] = stats.BuildMatchArrayExpression(filter.BuildVariants)
+ match[taskstats.DBTaskStatsIDBuildVariantKeyFull] = taskstats.BuildMatchArrayExpression(filter.BuildVariants)
}
if len(filter.Distros) > 0 {
- match[stats.DbTaskStatsIdDistroKeyFull] = stats.BuildMatchArrayExpression(filter.Distros)
+ match[taskstats.DBTaskStatsIDDistroKeyFull] = taskstats.BuildMatchArrayExpression(filter.Distros)
}
if filter.StartAt != nil {
@@ -133,9 +133,9 @@ func (filter TaskReliabilityFilter) buildDateStageGroupID(fieldName string, inpu
for i := 0; i < len(boundaries)-1; i++ {
branches = append(branches, bson.M{
- "case": bson.M{"$and": stats.Array{
- bson.M{"$lt": stats.Array{inputDateFieldRef, boundaries[i]}},
- bson.M{"$gte": stats.Array{inputDateFieldRef, boundaries[i+1]}},
+ "case": bson.M{"$and": taskstats.Array{
+ bson.M{"$lt": taskstats.Array{inputDateFieldRef, boundaries[i]}},
+ bson.M{"$gte": taskstats.Array{inputDateFieldRef, boundaries[i+1]}},
}},
"then": boundaries[i+1],
})
@@ -145,19 +145,16 @@ func (filter TaskReliabilityFilter) buildDateStageGroupID(fieldName string, inpu
// buildGroupID builds the _id field for the $group stage corresponding to the GroupBy value.
func (filter TaskReliabilityFilter) buildGroupID() bson.M {
- id := bson.M{stats.TestStatsDateKey: filter.buildDateStageGroupID("date", stats.DbTaskStatsIdDateKeyFull)}
+ id := bson.M{taskstats.TaskStatsDateKey: filter.buildDateStageGroupID("date", taskstats.DBTaskStatsIDDateKeyFull)}
switch filter.GroupBy {
- case stats.GroupByDistro:
- id[stats.TestStatsDistroKey] = "$" + stats.DbTestStatsIdDistroKeyFull
+ case taskstats.GroupByDistro:
+ id[taskstats.TaskStatsDistroKey] = "$" + taskstats.DBTaskStatsIDDistroKeyFull
fallthrough
- case stats.GroupByVariant:
- id[stats.TestStatsBuildVariantKey] = "$" + stats.DbTestStatsIdBuildVariantKeyFull
+ case taskstats.GroupByVariant:
+ id[taskstats.TaskStatsBuildVariantKey] = "$" + taskstats.DBTaskStatsIDBuildVariantKeyFull
fallthrough
- case stats.GroupByTask:
- id[stats.TestStatsTaskNameKey] = "$" + stats.DbTestStatsIdTaskNameKeyFull
- fallthrough
- case stats.GroupByTest:
- id[stats.TestStatsTestFileKey] = "$" + stats.DbTestStatsIdTestFileKeyFull
+ case taskstats.GroupByTask:
+ id[taskstats.TaskStatsTaskNameKey] = "$" + taskstats.DBTaskStatsIDTaskNameKeyFull
}
return id
}
@@ -166,14 +163,14 @@ func (filter TaskReliabilityFilter) buildGroupID() bson.M {
func (filter TaskReliabilityFilter) BuildTaskStatsQueryGroupStage() bson.M {
return bson.M{
"$group": bson.M{
- "_id": filter.buildGroupID(),
- stats.TaskStatsNumSuccessKey: bson.M{"$sum": "$" + stats.DbTaskStatsNumSuccessKey},
- stats.TaskStatsNumFailedKey: bson.M{"$sum": "$" + stats.DbTaskStatsNumFailedKey},
- stats.TaskStatsNumTimeoutKey: bson.M{"$sum": "$" + stats.DbTaskStatsNumTimeoutKey},
- stats.TaskStatsNumTestFailedKey: bson.M{"$sum": "$" + stats.DbTaskStatsNumTestFailedKey},
- stats.TaskStatsNumSystemFailedKey: bson.M{"$sum": "$" + stats.DbTaskStatsNumSystemFailedKey},
- stats.TaskStatsNumSetupFailedKey: bson.M{"$sum": "$" + stats.DbTaskStatsNumSetupFailedKey},
- "total_duration_success": bson.M{"$sum": bson.M{"$multiply": stats.Array{"$" + stats.DbTaskStatsNumSuccessKey, "$" + stats.DbTaskStatsAvgDurationSuccessKey}}},
+ "_id": filter.buildGroupID(),
+ taskstats.TaskStatsNumSuccessKey: bson.M{"$sum": "$" + taskstats.DBTaskStatsNumSuccessKey},
+ taskstats.TaskStatsNumFailedKey: bson.M{"$sum": "$" + taskstats.DBTaskStatsNumFailedKey},
+ taskstats.TaskStatsNumTimeoutKey: bson.M{"$sum": "$" + taskstats.DBTaskStatsNumTimeoutKey},
+ taskstats.TaskStatsNumTestFailedKey: bson.M{"$sum": "$" + taskstats.DBTaskStatsNumTestFailedKey},
+ taskstats.TaskStatsNumSystemFailedKey: bson.M{"$sum": "$" + taskstats.DBTaskStatsNumSystemFailedKey},
+ taskstats.TaskStatsNumSetupFailedKey: bson.M{"$sum": "$" + taskstats.DBTaskStatsNumSetupFailedKey},
+ "total_duration_success": bson.M{"$sum": bson.M{"$multiply": taskstats.Array{"$" + taskstats.DBTaskStatsNumSuccessKey, "$" + taskstats.DBTaskStatsAvgDurationSuccessKey}}},
}}
}
@@ -189,8 +186,8 @@ func (filter TaskReliabilityFilter) taskReliabilityQueryPipeline() []bson.M {
}
// GetTaskStats create an aggregation to find task stats matching the filter state.
-func (filter TaskReliabilityFilter) GetTaskStats() (taskStats []stats.TaskStats, err error) {
+func (filter TaskReliabilityFilter) GetTaskStats() (taskStats []taskstats.TaskStats, err error) {
pipeline := filter.taskReliabilityQueryPipeline()
- err = db.Aggregate(stats.DailyTaskStatsCollection, pipeline, &taskStats)
+ err = db.Aggregate(taskstats.DailyTaskStatsCollection, pipeline, &taskStats)
return
}
diff --git a/model/reliability/db_test.go b/model/reliability/db_test.go
index a41364cb02a..7309672468c 100644
--- a/model/reliability/db_test.go
+++ b/model/reliability/db_test.go
@@ -8,7 +8,7 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/mock"
- "github.com/evergreen-ci/evergreen/model/stats"
+ "github.com/evergreen-ci/evergreen/model/taskstats"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -25,9 +25,9 @@ func setupEnv(ctx context.Context) (*mock.Environment, error) {
}
func withSetupAndTeardown(t *testing.T, env evergreen.Environment, fn func()) {
- require.NoError(t, db.ClearCollections(stats.DailyTaskStatsCollection))
+ require.NoError(t, db.ClearCollections(taskstats.DailyTaskStatsCollection))
defer func() {
- assert.NoError(t, db.ClearCollections(stats.DailyTaskStatsCollection))
+ assert.NoError(t, db.ClearCollections(taskstats.DailyTaskStatsCollection))
}()
fn()
@@ -58,7 +58,7 @@ func TestPipeline(t *testing.T) {
"num_system_failed": bson.M{"$sum": "$num_system_failed"},
"num_test_failed": bson.M{"$sum": "$num_test_failed"},
"num_timeout": bson.M{"$sum": "$num_timeout"},
- "total_duration_success": bson.M{"$sum": bson.M{"$multiply": stats.Array{"$num_success", "$avg_duration_success"}}},
+ "total_duration_success": bson.M{"$sum": bson.M{"$multiply": taskstats.Array{"$num_success", "$avg_duration_success"}}},
},
}
@@ -112,7 +112,7 @@ func TestPipeline(t *testing.T) {
t.Run(testName, func(t *testing.T) {
withSetupAndTeardown(t, env, func() {
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters,
AfterDate: after,
@@ -141,7 +141,7 @@ func TestPipeline(t *testing.T) {
})
},
"Sort Earliest, GroupBy task, Num Days 1": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter) {
- filter.StatsFilter.Sort = stats.SortEarliestFirst
+ filter.StatsFilter.Sort = taskstats.SortEarliestFirst
withCancelledContext(ctx, func(ctx context.Context) {
expected := []bson.M{
bson.M{"_id.date": bson.M{"$gt": filter.StatsFilter.StartAt.Date}},
@@ -168,7 +168,7 @@ func TestPipeline(t *testing.T) {
},
// Variant
"Sort Latest, GroupBy variant, Num Days 1": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter) {
- filter.StatsFilter.GroupBy = stats.GroupByVariant
+ filter.StatsFilter.GroupBy = taskstats.GroupByVariant
withCancelledContext(ctx, func(ctx context.Context) {
expected := []bson.M{
bson.M{"_id.date": bson.M{"$lt": filter.StatsFilter.StartAt.Date}},
@@ -180,8 +180,8 @@ func TestPipeline(t *testing.T) {
})
},
"Sort Earliest, GroupBy variant, Num Days 1": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter) {
- filter.StatsFilter.Sort = stats.SortEarliestFirst
- filter.StatsFilter.GroupBy = stats.GroupByVariant
+ filter.StatsFilter.Sort = taskstats.SortEarliestFirst
+ filter.StatsFilter.GroupBy = taskstats.GroupByVariant
withCancelledContext(ctx, func(ctx context.Context) {
expected := []bson.M{
bson.M{"_id.date": bson.M{"$gt": filter.StatsFilter.StartAt.Date}},
@@ -197,7 +197,7 @@ func TestPipeline(t *testing.T) {
startAtDate := after.Add(28 * 24 * time.Hour)
filter.StatsFilter.GroupNumDays = groupNumDays
filter.StatsFilter.StartAt.Date = startAtDate
- filter.StatsFilter.GroupBy = stats.GroupByVariant
+ filter.StatsFilter.GroupBy = taskstats.GroupByVariant
withCancelledContext(ctx, func(ctx context.Context) {
expected := []bson.M{
@@ -211,7 +211,7 @@ func TestPipeline(t *testing.T) {
},
// Distro
"Sort Latest, GroupBy distro, Num Days 1": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter) {
- filter.StatsFilter.GroupBy = stats.GroupByDistro
+ filter.StatsFilter.GroupBy = taskstats.GroupByDistro
filter.StatsFilter.StartAt.Date = after.Add(24 * time.Hour)
withCancelledContext(ctx, func(ctx context.Context) {
@@ -226,8 +226,8 @@ func TestPipeline(t *testing.T) {
})
},
"Sort Earliest, GroupBy distro, Num Days 1": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter) {
- filter.StatsFilter.GroupBy = stats.GroupByDistro
- filter.StatsFilter.Sort = stats.SortEarliestFirst
+ filter.StatsFilter.GroupBy = taskstats.GroupByDistro
+ filter.StatsFilter.Sort = taskstats.SortEarliestFirst
filter.StatsFilter.StartAt.Date = after.Add(24 * time.Hour)
withCancelledContext(ctx, func(ctx context.Context) {
expected := []bson.M{
@@ -241,7 +241,7 @@ func TestPipeline(t *testing.T) {
})
},
"Sort Latest, GroupBy distro, Num Days 28": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter) {
- filter.StatsFilter.GroupBy = stats.GroupByDistro
+ filter.StatsFilter.GroupBy = taskstats.GroupByDistro
groupNumDays := 28
startAtDate := after.Add(28 * 24 * time.Hour)
filter.StatsFilter.GroupNumDays = groupNumDays
@@ -297,15 +297,15 @@ func TestPipeline(t *testing.T) {
t.Run(testName, func(t *testing.T) {
withSetupAndTeardown(t, env, func() {
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters,
GroupNumDays: 1,
- GroupBy: stats.GroupByTask,
- Sort: stats.SortLatestFirst,
+ GroupBy: taskstats.GroupByTask,
+ Sort: taskstats.SortLatestFirst,
AfterDate: after,
BeforeDate: before,
- StartAt: &stats.StartAt{
+ StartAt: &taskstats.StartAt{
Date: after.Add(24 * time.Hour),
Task: task,
BuildVariant: variant,
@@ -378,7 +378,7 @@ func TestPipeline(t *testing.T) {
},
"Pagination": func(ctx context.Context, t *testing.T, filter *TaskReliabilityFilter, expected bson.M) {
startAt := after.Add(24 * time.Hour)
- filter.StatsFilter.StartAt = &stats.StartAt{
+ filter.StatsFilter.StartAt = &taskstats.StartAt{
Date: startAt,
Task: task,
BuildVariant: variant,
@@ -399,12 +399,12 @@ func TestPipeline(t *testing.T) {
t.Run(testName, func(t *testing.T) {
withSetupAndTeardown(t, env, func() {
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters,
AfterDate: after,
BeforeDate: before,
- GroupBy: stats.GroupByDistro,
+ GroupBy: taskstats.GroupByDistro,
},
}
match := bson.M{
@@ -442,15 +442,15 @@ func TestPipeline(t *testing.T) {
"branches": []bson.M{
bson.M{
"case": bson.M{
- "$and": stats.Array{
+ "$and": taskstats.Array{
bson.M{
- "$lt": stats.Array{
+ "$lt": taskstats.Array{
"$_id.date",
before.Add(24 * time.Hour),
},
},
bson.M{
- "$gte": stats.Array{
+ "$gte": taskstats.Array{
"$_id.date",
after,
},
@@ -469,7 +469,7 @@ func TestPipeline(t *testing.T) {
"num_system_failed": bson.M{"$sum": "$num_system_failed"},
"num_test_failed": bson.M{"$sum": "$num_test_failed"},
"num_timeout": bson.M{"$sum": "$num_timeout"},
- "total_duration_success": bson.M{"$sum": bson.M{"$multiply": stats.Array{"$num_success", "$avg_duration_success"}}},
+ "total_duration_success": bson.M{"$sum": bson.M{"$multiply": taskstats.Array{"$num_success", "$avg_duration_success"}}},
},
})
})
@@ -478,7 +478,7 @@ func TestPipeline(t *testing.T) {
t.Run(testName, func(t *testing.T) {
withSetupAndTeardown(t, env, func() {
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters},
}
@@ -501,13 +501,13 @@ func TestPipeline(t *testing.T) {
"$cond": bson.M{
"else": nil,
"if": bson.M{
- "$ne": stats.Array{
+ "$ne": taskstats.Array{
"$num_success",
0,
},
},
"then": bson.M{
- "$divide": stats.Array{
+ "$divide": taskstats.Array{
"$total_duration_success",
"$num_success",
},
@@ -522,7 +522,7 @@ func TestPipeline(t *testing.T) {
"num_system_failed": 1,
"num_test_failed": 1,
"num_timeout": 1,
- "num_total": bson.M{"$add": stats.Array{"$num_success", "$num_failed"}},
+ "num_total": bson.M{"$add": taskstats.Array{"$num_success", "$num_failed"}},
"task_name": "$_id.task_name",
"variant": "$_id.variant",
},
@@ -558,7 +558,7 @@ func TestPipeline(t *testing.T) {
t.Run(testName, func(t *testing.T) {
withSetupAndTeardown(t, env, func() {
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters},
}
diff --git a/model/reliability/query.go b/model/reliability/query.go
index 136a0ce8c05..2fb6796221a 100644
--- a/model/reliability/query.go
+++ b/model/reliability/query.go
@@ -4,7 +4,7 @@ import (
"math"
"time"
- "github.com/evergreen-ci/evergreen/model/stats"
+ "github.com/evergreen-ci/evergreen/model/taskstats"
"github.com/evergreen-ci/utility"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
@@ -13,25 +13,27 @@ import (
)
const (
- MaxQueryLimit = stats.MaxQueryLimit - 1 // 1000 // route.ReliabilityAPIMaxNumTasks
+ MaxQueryLimit = taskstats.MaxQueryLimit - 1 // (1000) route.ReliabilityAPIMaxNumTasks
MaxSignificanceLimit = 1.0
MinSignificanceLimit = 0.0
DefaultSignificance = 0.05
- GroupByTask = stats.GroupByTask
- GroupByVariant = stats.GroupByVariant
- GroupByDistro = stats.GroupByDistro
- SortEarliestFirst = stats.SortEarliestFirst
- SortLatestFirst = stats.SortLatestFirst
+ GroupByTask = taskstats.GroupByTask
+ GroupByVariant = taskstats.GroupByVariant
+ GroupByDistro = taskstats.GroupByDistro
+ SortEarliestFirst = taskstats.SortEarliestFirst
+ SortLatestFirst = taskstats.SortLatestFirst
)
-// TaskReliabilityFilter represents search and aggregation parameters when querying the test or task statistics.
+// TaskReliabilityFilter represents search and aggregation parameters when
+// querying task statistics.
type TaskReliabilityFilter struct {
- stats.StatsFilter
+ taskstats.StatsFilter
Significance float64
}
-// ValidateForTaskReliability validates that the StartAt struct is valid for use with test stats.
+// ValidateForTaskReliability validates that the StartAt struct is valid for
+// use with task stats.
func (f *TaskReliabilityFilter) ValidateForTaskReliability() error {
catcher := grip.NewBasicCatcher()
catcher.Add(f.ValidateCommon())
@@ -118,7 +120,7 @@ func (s *TaskReliability) calculateSuccessRate() {
// Create a TaskReliability struct from the task stats and calculate the success rate
// using the z score.
-func newTaskReliability(taskStat stats.TaskStats, z float64) TaskReliability {
+func newTaskReliability(taskStat taskstats.TaskStats, z float64) TaskReliability {
reliability := TaskReliability{
TaskName: taskStat.TaskName,
BuildVariant: taskStat.BuildVariant,
diff --git a/model/reliability/query_test.go b/model/reliability/query_test.go
index 51d6ed020fc..6aa8dbbf802 100644
--- a/model/reliability/query_test.go
+++ b/model/reliability/query_test.go
@@ -9,7 +9,7 @@ import (
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/stats"
+ "github.com/evergreen-ci/evergreen/model/taskstats"
_ "github.com/evergreen-ci/evergreen/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -53,8 +53,8 @@ var requesters = []string{
evergreen.MergeTestRequester,
}
-var task1Item1 = stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+var task1Item1 = taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task1,
@@ -71,8 +71,8 @@ var task1Item1 = stats.DbTaskStats{
AvgDurationSuccess: avgDuration,
}
-var task1Item2 = stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+var task1Item2 = taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task1,
@@ -89,8 +89,8 @@ var task1Item2 = stats.DbTaskStats{
AvgDurationSuccess: avgDuration1,
}
-var task2Item1 = stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+var task2Item1 = taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task2,
@@ -106,8 +106,8 @@ var task2Item1 = stats.DbTaskStats{
NumSetupFailed: numSetupFailed,
AvgDurationSuccess: avgDuration,
}
-var task2Item2 = stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+var task2Item2 = taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task2,
@@ -124,8 +124,8 @@ var task2Item2 = stats.DbTaskStats{
AvgDurationSuccess: avgDuration1,
}
-var task3item1 = stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+var task3item1 = taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task3,
@@ -146,15 +146,15 @@ func createValidFilter() TaskReliabilityFilter {
tasks := []string{task1, task2}
return TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters,
AfterDate: day1,
BeforeDate: day2,
Tasks: tasks,
- GroupBy: stats.GroupByDistro,
+ GroupBy: taskstats.GroupByDistro,
GroupNumDays: 1,
- Sort: stats.SortLatestFirst,
+ Sort: taskstats.SortLatestFirst,
Limit: MaxQueryLimit,
},
Significance: DefaultSignificance,
@@ -163,11 +163,11 @@ func createValidFilter() TaskReliabilityFilter {
}
func clearCollection() error {
- return db.Clear(stats.DailyTaskStatsCollection)
+ return db.Clear(taskstats.DailyTaskStatsCollection)
}
func InsertDailyTaskStats(taskStats ...interface{}) error {
- err := db.InsertManyUnordered(stats.DailyTaskStatsCollection, taskStats...)
+ err := db.InsertManyUnordered(taskstats.DailyTaskStatsCollection, taskStats...)
return err
}
@@ -179,7 +179,7 @@ func handleNoFormat(format string, i int) string {
return format
}
-func InsertManyDailyTaskStats(many int, prototype stats.DbTaskStats, projectFmt string, requesterFmt string, taskNameFmt string, variantFmt string, distroFmt string) error {
+func InsertManyDailyTaskStats(many int, prototype taskstats.DBTaskStats, projectFmt string, requesterFmt string, taskNameFmt string, variantFmt string, distroFmt string) error {
items := make([]interface{}, many)
for i := 0; i < many; i++ {
@@ -292,7 +292,7 @@ func TestFilterInvalidSort(t *testing.T) {
assert := assert.New(t)
filter := createValidFilter()
- filter.Sort = stats.Sort("invalid")
+ filter.Sort = taskstats.Sort("invalid")
assert.Error(filter.ValidateForTaskReliability())
}
@@ -300,7 +300,7 @@ func TestFilterInvalidGroupBy(t *testing.T) {
assert := assert.New(t)
filter := createValidFilter()
- filter.GroupBy = stats.GroupBy("invalid")
+ filter.GroupBy = taskstats.GroupBy("invalid")
assert.Error(filter.ValidateForTaskReliability())
}
@@ -485,7 +485,7 @@ func TestValidateForTaskReliability(t *testing.T) {
assert := assert.New(t)
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Limit: MaxQueryLimit + 1,
},
Significance: MaxSignificanceLimit + 1,
@@ -511,7 +511,7 @@ func TestGetTaskReliabilityScores(t *testing.T) {
commonSetup := func(ctx context.Context, t *testing.T) TaskReliabilityFilter {
filter := TaskReliabilityFilter{
- StatsFilter: stats.StatsFilter{
+ StatsFilter: taskstats.StatsFilter{
Project: project,
Requesters: requesters,
Tasks: []string{task1},
@@ -522,7 +522,7 @@ func TestGetTaskReliabilityScores(t *testing.T) {
GroupNumDays: 1,
GroupBy: "distro",
Limit: MaxQueryLimit,
- Sort: stats.SortEarliestFirst,
+ Sort: taskstats.SortEarliestFirst,
},
Significance: .05,
}
@@ -530,8 +530,8 @@ func TestGetTaskReliabilityScores(t *testing.T) {
require.NoError(t, err)
require.NoError(t, InsertDailyTaskStats(
- stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+ taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task1,
@@ -547,8 +547,8 @@ func TestGetTaskReliabilityScores(t *testing.T) {
NumSetupFailed: numSetupFailed,
AvgDurationSuccess: avgDuration,
},
- stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+ taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task2,
@@ -569,8 +569,8 @@ func TestGetTaskReliabilityScores(t *testing.T) {
for i := 1; i < 60; i++ {
delta := time.Duration(i) * 24 * time.Hour
require.NoError(t, InsertDailyTaskStats(
- stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+ taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task1,
@@ -586,8 +586,8 @@ func TestGetTaskReliabilityScores(t *testing.T) {
NumSetupFailed: numSetupFailed,
AvgDurationSuccess: avgDuration,
},
- stats.DbTaskStats{
- Id: stats.DbTaskStatsId{
+ taskstats.DBTaskStats{
+ Id: taskstats.DBTaskStatsID{
Project: project,
Requester: requesters[0],
TaskName: task2,
@@ -679,7 +679,7 @@ func TestGetTaskReliabilityScores(t *testing.T) {
require := require.New(t)
withCancelledContext(ctx, func(ctx context.Context) {
duration := 7
- filter.StatsFilter.Sort = stats.SortLatestFirst
+ filter.StatsFilter.Sort = taskstats.SortLatestFirst
filter.StatsFilter.GroupNumDays = 1
filter.StatsFilter.BeforeDate = day1.Add(time.Duration(duration-1) * 24 * time.Hour)
docs, err := GetTaskReliabilityScores(filter)
@@ -701,7 +701,7 @@ func TestGetTaskReliabilityScores(t *testing.T) {
require := require.New(t)
withCancelledContext(ctx, func(ctx context.Context) {
duration := 7
- filter.StatsFilter.Sort = stats.SortEarliestFirst
+ filter.StatsFilter.Sort = taskstats.SortEarliestFirst
filter.StatsFilter.GroupNumDays = 1
filter.StatsFilter.BeforeDate = day1.Add(time.Duration(duration-1) * 24 * time.Hour)
docs, err := GetTaskReliabilityScores(filter)
@@ -843,7 +843,7 @@ func TestGetTaskReliabilityScores(t *testing.T) {
require := require.New(t)
withCancelledContext(ctx, func(ctx context.Context) {
duration := 7
- filter.StatsFilter.Sort = stats.SortLatestFirst
+ filter.StatsFilter.Sort = taskstats.SortLatestFirst
filter.StatsFilter.GroupNumDays = 1
filter.StatsFilter.BeforeDate = day1.Add(time.Duration(duration-1) * 24 * time.Hour)
docs, err := GetTaskReliabilityScores(filter)
@@ -866,7 +866,7 @@ func TestGetTaskReliabilityScores(t *testing.T) {
require := require.New(t)
withCancelledContext(ctx, func(ctx context.Context) {
duration := 7
- filter.StatsFilter.Sort = stats.SortEarliestFirst
+ filter.StatsFilter.Sort = taskstats.SortEarliestFirst
filter.StatsFilter.GroupNumDays = 1
filter.StatsFilter.BeforeDate = day1.Add(time.Duration(duration-1) * 24 * time.Hour)
docs, err := GetTaskReliabilityScores(filter)
diff --git a/model/repo_ref.go b/model/repo_ref.go
index 6bfe7201505..a6a09635695 100644
--- a/model/repo_ref.go
+++ b/model/repo_ref.go
@@ -28,7 +28,6 @@ var (
RepoRefIdKey = bsonutil.MustHaveTag(RepoRef{}, "Id")
RepoRefOwnerKey = bsonutil.MustHaveTag(RepoRef{}, "Owner")
RepoRefRepoKey = bsonutil.MustHaveTag(RepoRef{}, "Repo")
- RepoRefEnabledKey = bsonutil.MustHaveTag(RepoRef{}, "Enabled")
RepoRefPrivateKey = bsonutil.MustHaveTag(RepoRef{}, "Private")
RepoRefAdminsKey = bsonutil.MustHaveTag(RepoRef{}, "Admins")
RepoRefCommitQueueKey = bsonutil.MustHaveTag(RepoRef{}, "CommitQueue")
@@ -37,8 +36,7 @@ var (
)
func (r *RepoRef) Add(creator *user.DBUser) error {
- err := r.Upsert()
- if err != nil {
+ if err := r.Upsert(); err != nil {
return errors.Wrap(err, "upserting repo ref")
}
return r.addPermissions(creator)
@@ -96,6 +94,10 @@ func FindRepoRefByOwnerAndRepo(owner, repoName string) (*RepoRef, error) {
// for the repo and branches, and gives branch admins permission to view the repo.
func (r *RepoRef) addPermissions(creator *user.DBUser) error {
rm := evergreen.GetEnvironment().RoleManager()
+ // Add to the general scope.
+ if err := rm.AddResourceToScope(evergreen.AllProjectsScope, r.Id); err != nil {
+ return errors.Wrapf(err, "adding repo '%s' to the scope '%s'", r.Id, evergreen.AllProjectsScope)
+ }
adminScope := gimlet.Scope{
ID: GetRepoAdminScope(r.Id),
@@ -183,6 +185,7 @@ func (r *RepoRef) MakeRestricted(branchProjects []ProjectRef) error {
rm := evergreen.GetEnvironment().RoleManager()
scopeId := GetUnrestrictedBranchProjectsScope(r.Id)
branchOnlyAdmins := []string{}
+
// if the branch project is now restricted, remove it from the unrestricted scope
for _, p := range branchProjects {
if !p.IsRestricted() {
diff --git a/model/scheduler_stats.go b/model/scheduler_stats.go
index 539e98b156e..31d20dd3aec 100644
--- a/model/scheduler_stats.go
+++ b/model/scheduler_stats.go
@@ -1,107 +1,11 @@
package model
import (
- "encoding/json"
"time"
- "github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/db"
- mgobson "github.com/evergreen-ci/evergreen/db/mgo/bson"
"github.com/evergreen-ci/evergreen/model/task"
- "github.com/mongodb/grip/message"
- "github.com/pkg/errors"
- "go.mongodb.org/mongo-driver/bson"
)
-// AverageTimeByDistroAndRequester is the average time of a host task.
-type AverageTimeByDistroAndRequester struct {
- Distro string `bson:"distro" json:"distro"`
- Requester string `bson:"requester" json:"requester"`
- AverageTime time.Duration `bson:"average_time" json:"average_time"`
-}
-
-// AverageTimes holds loggable information about host task runtimes.
-type AverageTimes struct {
- Times []AverageTimeByDistroAndRequester `json:"times"`
- message.Base `json:"metadata,omitempty"`
- cachedMessage string
-}
-
-// AverageHostTaskLatency finds the average host task latency by distro and
-// requester.
-func AverageHostTaskLatency(since time.Duration) (*AverageTimes, error) {
- now := time.Now()
- match := task.ByExecutionPlatform(task.ExecutionPlatformHost)
- match[task.StartTimeKey] = bson.M{
- "$gte": now.Add(-since),
- "$lte": now,
- }
- match[task.StatusKey] = bson.M{
- "$in": []string{
- evergreen.TaskStarted,
- evergreen.TaskFailed,
- evergreen.TaskSucceeded},
- }
- match[task.DisplayOnlyKey] = bson.M{"$ne": true}
-
- pipeline := []bson.M{
- {"$match": match},
- {"$group": bson.M{
- "_id": bson.M{
- "distro": "$" + task.DistroIdKey,
- "requester": "$" + task.RequesterKey,
- },
- "average_time": bson.M{
- "$avg": bson.M{
- "$subtract": []interface{}{"$" + task.StartTimeKey, "$" + task.ActivatedTimeKey},
- },
- },
- }},
- {"$project": bson.M{
- "distro": "$" + "_id.distro",
- "requester": "$" + "_id.requester",
- "average_time": "$" + "average_time",
- }},
- }
-
- stats := AverageTimes{}
- if err := db.Aggregate(task.Collection, pipeline, &stats.Times); err != nil {
- return &AverageTimes{}, errors.Wrap(err, "aggregating average task latency")
- }
- // set mongodb times to golang times
- for i, t := range stats.Times {
- stats.Times[i].AverageTime = t.AverageTime * time.Millisecond
- }
- return &stats, nil
-}
-
-func (a *AverageTimes) MarshalBSON() ([]byte, error) {
- return mgobson.Marshal(a)
-}
-
-func (a *AverageTimes) UnmarshalBSON(in []byte) error {
- return mgobson.Unmarshal(in, a)
-}
-
-func (a *AverageTimes) Raw() interface{} {
- _ = a.Collect()
- return a
-}
-
-func (a *AverageTimes) Loggable() bool {
- return len(a.Times) > 0
-}
-
-func (a *AverageTimes) String() string { // nolint: golint
- if a.cachedMessage == "" {
- _ = a.Collect()
- out, _ := json.Marshal(a.Times)
- a.cachedMessage = string(out)
- }
-
- return a.cachedMessage
-}
-
// dependencyPath represents the path of tasks that can
// occur by taking one from each layer of the dependencies
// TotalTime is the sum of all task's time taken to run that are in Tasks.
diff --git a/model/scheduler_stats_test.go b/model/scheduler_stats_test.go
index c00a0b2cfdd..7508678f0ef 100644
--- a/model/scheduler_stats_test.go
+++ b/model/scheduler_stats_test.go
@@ -5,12 +5,8 @@ import (
"time"
"github.com/evergreen-ci/evergreen"
- "github.com/evergreen-ci/evergreen/db"
- "github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/task"
. "github.com/smartystreets/goconvey/convey"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
)
func TestFindPredictedMakespan(t *testing.T) {
@@ -69,109 +65,3 @@ func TestCalculateActualMakespan(t *testing.T) {
})
}
-
-func TestAverageTaskLatencyLastMinuteByDistro(t *testing.T) {
- require := require.New(t)
- assert := assert.New(t)
- require.NoError(db.ClearCollections(task.Collection, distro.Collection))
- distroName := "sampleDistro"
- d := distro.Distro{Id: distroName}
- require.NoError(d.Insert())
- now := time.Now().Add(-50 * time.Second)
-
- tasks := []task.Task{
- {
- Id: "task1",
- Requester: evergreen.RepotrackerVersionRequester,
- ExecutionPlatform: task.ExecutionPlatformHost,
- ActivatedTime: now,
- ScheduledTime: now,
- StartTime: now.Add(10 * time.Second),
- Status: evergreen.TaskStarted,
- DistroId: distroName,
- DisplayOnly: false},
- {
- Id: "task2",
- Requester: evergreen.RepotrackerVersionRequester,
- ExecutionPlatform: task.ExecutionPlatformHost,
- ScheduledTime: now,
- ActivatedTime: now,
- StartTime: now.Add(20 * time.Second),
- Status: evergreen.TaskFailed,
- DistroId: distroName},
- {
- Id: "displaytask",
- Requester: evergreen.RepotrackerVersionRequester,
- ActivatedTime: now,
- ScheduledTime: now,
- StartTime: now.Add(40 * time.Second),
- Status: evergreen.TaskFailed,
- DistroId: distroName,
- DisplayOnly: true},
- {
- Id: "task3",
- Requester: evergreen.RepotrackerVersionRequester,
- ActivatedTime: now.Add(10 * time.Second),
- ScheduledTime: now.Add(10 * time.Second),
- StartTime: now.Add(40 * time.Second),
- Status: evergreen.TaskSucceeded,
- DistroId: distroName},
- {
- Id: "task4",
- Requester: evergreen.RepotrackerVersionRequester,
- ScheduledTime: now,
- ActivatedTime: now,
- StartTime: now.Add(1000 * time.Second),
- Status: evergreen.TaskUnstarted,
- DistroId: distroName},
- {
- Id: "task5",
- Requester: evergreen.PatchVersionRequester,
- ScheduledTime: now,
- ActivatedTime: now,
- StartTime: now.Add(5 * time.Second),
- Status: evergreen.TaskSucceeded,
- DistroId: distroName},
- {
- Id: "task6",
- Requester: evergreen.PatchVersionRequester,
- ActivatedTime: now,
- ScheduledTime: now,
- StartTime: now.Add(15 * time.Second),
- Status: evergreen.TaskSucceeded,
- DistroId: distroName},
- {
- Id: "task7",
- Requester: evergreen.GithubPRRequester,
- ActivatedTime: now,
- ScheduledTime: now,
- StartTime: now.Add(1 * time.Second),
- Status: evergreen.TaskSucceeded,
- DistroId: distroName},
- }
- for _, t := range tasks {
- require.NoError(t.Insert())
- }
- latencies, err := AverageHostTaskLatency(time.Minute)
- require.NoError(err)
- expected := []AverageTimeByDistroAndRequester{
- {
- Distro: "sampleDistro",
- Requester: evergreen.GithubPRRequester,
- AverageTime: time.Second,
- },
- {
- Distro: "sampleDistro",
- Requester: evergreen.PatchVersionRequester,
- AverageTime: 10 * time.Second,
- },
- {
- Distro: "sampleDistro",
- Requester: evergreen.RepotrackerVersionRequester,
- AverageTime: 20 * time.Second,
- },
- }
- for _, time := range expected {
- assert.Contains(latencies.Times, time)
- }
-}
diff --git a/model/stats/db.go b/model/stats/db.go
deleted file mode 100644
index 872884107f8..00000000000
--- a/model/stats/db.go
+++ /dev/null
@@ -1,1088 +0,0 @@
-package stats
-
-// This file provides database layer logic for pre-computed test and task execution statistics.
-// The database schema is the following:
-// *daily_stats_status*
-// {
-// "_id": ,
-// "last_job_run":
-// "processed_tasks_until":
-// }
-// *hourly_test_stats*
-// {
-// "_id": {
-// "test_file": ,
-// "task_name": ,
-// "variant": ,
-// "distro": ,
-// "project": ,
-// "date": ,
-// },
-// "num_pass": ,
-// "num_fail": ,
-// "avg_duration_pass": ,
-// "last_update":
-// }
-// *daily_test_stats*
-// {
-// "_id": {
-// "test_file": ,
-// "task_name": ,
-// "variant": ,
-// "distro": ,
-// "project": ,
-// "date": ,
-// },
-// "num_pass": ,
-// "num_fail": ,
-// "avg_duration_pass": ,
-// "last_update":
-// }
-// *daily_task_stats*
-// {
-// "_id": {
-// "task_name": ,
-// "variant": ,
-// "distro": ,
-// "project": ,
-// "date": ,
-// },
-// "num_success": ,
-// "num_failed": ,
-// "num_test_failed":