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

Manual retries do not trigger exit handlers #10003

Closed
3 tasks done
pquadri opened this issue Nov 9, 2022 · 5 comments · Fixed by #10004 or #10159
Closed
3 tasks done

Manual retries do not trigger exit handlers #10003

pquadri opened this issue Nov 9, 2022 · 5 comments · Fixed by #10004 or #10159
Labels

Comments

@pquadri
Copy link
Contributor

pquadri commented Nov 9, 2022

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

When defining a workflow that has an exit handler (either with handlers or lifecycle hooks) a manual retry of the workflow does not trigger a rerun of the handler unless the handler himself fails, while in the code there is a comment that clearly states that the handler should always be executed.
I will soon test it on the latest version, but the code that causes the problem hasn't changed recently.

Version

3.4.1

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: retry-script-
spec:
  entrypoint: retry-script
  hooks:
    exit:
      template: handler
      arguments:
        parameters:
          - name: message
            value: "{{ workflow.status }}"

  templates:
  - name: retry-script
    script:
      image: python:alpine3.6
      command: ["python"]
      source: |
        import random;
        import sys; 
        exit_code = 1; 
        sys.exit(exit_code)
  - name: handler
    inputs: 
      parameters: 
        - name: message 
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["echo {{inputs.parameters.message}}"]

Logs from the workflow controller


Logs from in your workflow's wait container


terrytangyuan pushed a commit that referenced this issue Nov 9, 2022
Signed-off-by: pquadri <pquadri10@gmail.com>
@pquadri
Copy link
Contributor Author

pquadri commented Dec 1, 2022

i'm afraid i did not actually fix it despite the test passing, the exit handler group is rescheduled for execution but its steps are not, there is definetly something I am missing in the groups reset logic

@terrytangyuan
Copy link
Member

Would you like to take another look?

@terrytangyuan terrytangyuan reopened this Dec 1, 2022
@pquadri
Copy link
Contributor Author

pquadri commented Dec 1, 2022

I will try but I'm not sure how to check it honestly, will do what I can :)

@stale
Copy link

stale bot commented Jan 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

@pquadri
Copy link
Contributor Author

pquadri commented Jan 9, 2023

the issue should be solved in the new linked pr :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants