Skip to content

Commit

Permalink
Return repo errors from runner (#2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4victor authored Jan 21, 2025
1 parent 64cd15a commit 8cc4040
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runner/internal/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ func (ex *RunExecutor) Run(ctx context.Context) (err error) {
log.Info(ctx, "Run job", "log_level", log.GetLogger(ctx).Logger.Level.String())

if err := ex.setupRepo(ctx); err != nil {
ex.SetJobState(ctx, types.JobStateFailed)
ex.SetJobStateWithTerminationReason(
ctx,
types.JobStateFailed,
types.TerminationReasonContainerExitedWithError,
fmt.Sprintf("Failed to set up the repo (%s)", err),
)
return gerrors.Wrap(err)
}
cleanupCredentials, err := ex.setupCredentials(ctx)
Expand Down

0 comments on commit 8cc4040

Please sign in to comment.