-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ONPREM-1972] Don't re-handle task errors #133
Conversation
dfdb462
to
ace4a71
Compare
@@ -226,9 +230,10 @@ func (o *Orchestrator) handleErrors(ctx context.Context, err error) error { | |||
failErr := o.runnerClient.FailTask(ctx, time.Now(), c.Allocation, err.Error()) | |||
if failErr != nil { | |||
failErr = fmt.Errorf("failed to send fail event for task: %w", failErr) | |||
return errors.Join(failErr, unclaimErr, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If GOAT fails to infra-fail the task, then let container-agent handle it
If GOAT handles a task error (either with an infra-fail or retry), don't exit with a nonzero status code. Doing so causes container agent to overwrite the original error message in the UI.
ace4a71
to
8891b87
Compare
ctx := o.taskContext(parentCtx) | ||
o.reaper.Enable(ctx) | ||
|
||
defer func() { | ||
err = o.shutdown(ctx, err) | ||
o11y.End(span, &err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original error will always get set on the span, so if GOAT fails to infra-fail or retry the task, then we can still see the error in the logs
Don't re-handle task errors. If GOAT handles a task error (either with an infra-fail or retry), don't exit with a nonzero status code. Doing so causes container agent to overwrite the original error message in the UI.
⚙️ Issue
https://circleci.atlassian.net/browse/ONPREM-1972
⚙️ Change Description
Acceptance Criteria:
✅ Solution
❓ Testing
Before: https://app.circleci.com/pipelines/github/circleci/runner-dummy/3032/workflows/2756dd1b-3af4-4305-b7d2-0effbd68b000/jobs/193765
After: https://app.circleci.com/pipelines/github/circleci/runner-dummy/3032/workflows/23a63cf9-4ee1-4a53-b6d3-c41d9ff7b5b6/jobs/193764
📖 Documentation Updates