Skip to content

Commit

Permalink
DEVPROD-6014 Surface check run creation errors (#7700)
Browse files Browse the repository at this point in the history
  • Loading branch information
bynn authored Apr 1, 2024
1 parent 81efff6 commit 34255b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,8 @@ func (a *Agent) finishTask(ctx context.Context, tc *taskContext, status string,

err = a.upsertCheckRun(ctx, tc)
if err != nil {
grip.Error(errors.Wrap(err, "upserting checkrun"))
grip.Error(errors.Wrap(err, "upserting check run"))
tc.logger.Task().Errorf("Error upserting check run: '%s'", err.Error())
}

span := trace.SpanFromContext(ctx)
Expand Down Expand Up @@ -1073,7 +1074,7 @@ func buildCheckRun(ctx context.Context, tc *taskContext) (*apimodels.CheckRunOut

fileName, err := tc.taskConfig.Expansions.ExpandString(fileName)
if err != nil {
return nil, errors.WithStack(err)
return nil, errors.New("Error expanding check run output file")
}

fileName = command.GetWorkingDirectory(tc.taskConfig, fileName)
Expand All @@ -1092,7 +1093,7 @@ func buildCheckRun(ctx context.Context, tc *taskContext) (*apimodels.CheckRunOut
}

if err := util.ExpandValues(&checkRunOutput, &tc.taskConfig.Expansions); err != nil {
return nil, errors.Wrap(err, "applying expansions")
return nil, errors.New("Error expanding values for check run output")
}

return &checkRunOutput, nil
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var (

// Agent version to control agent rollover. The format is the calendar date
// (YYYY-MM-DD).
AgentVersion = "2024-04-01"
AgentVersion = "2024-04-01a"
)

// ConfigSection defines a sub-document in the evergreen config
Expand Down

0 comments on commit 34255b6

Please sign in to comment.