Skip to content
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

fix: Propogate errors in task worker and don't return #7357

Merged
merged 2 commits into from
Dec 8, 2021

Conversation

simster7
Copy link
Member

@simster7 simster7 commented Dec 8, 2021

Signed-off-by: Simon Behar simbeh7@gmail.com

Don't bother creating a PR until you've done this:

  • Run make pre-commit -B to fix codegen, lint, and commit message problems.

Create your PR as a draft.

  • Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it
    does not need to pass.
  • Once required tests have passed, you can make it "Ready for review".
  • Say how how you tested your changes. If you changed the UI, attach screenshots.

Tips:

  • If changes were requested, and you've made them, then dismiss the review to get it looked at again.
  • Add you organization to USERS.md if you like.
  • You can ask for help!

Signed-off-by: Simon Behar <simbeh7@gmail.com>
@@ -124,7 +124,11 @@ func (ae *AgentExecutor) taskWorker(ctx context.Context, taskQueue chan task, re
result, err := ae.processTask(ctx, tmpl)
if err != nil {
log.WithError(err).Error("Error in agent task")
return
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we return here, the task worker will be stopped without a restart and the error will never be propagated. This can leave the agent with no task worker threads, deadlocking workflow execution

Signed-off-by: Simon Behar <simbeh7@gmail.com>
Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexec alexec merged commit 78dd747 into argoproj:master Dec 8, 2021
@sarabala1979 sarabala1979 mentioned this pull request Dec 15, 2021
73 tasks
@sarabala1979 sarabala1979 mentioned this pull request Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants