-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Workflow-level exit lifecycle hook ignores expression #8742
Comments
Signed-off-by: Yuan Tang <[email protected]>
Signed-off-by: Yuan Tang <[email protected]>
@roofurmston @terrytangyuan The issue is not resolved yet. Version running - v3.3.5 |
Hi @alexec this issue needs to be reopened 😅 |
Indeed, I have tested it on master and the issue is still present. |
It's not in 3.3.5. Please try again once it's included in the next release, e.g. 3.4. |
I tested the fix directly from the master branch. It is slightly confusing as the unit test was removed from the master branch. You are sure that the fix is working in master as expected? |
The fix and the removed test case need to be revisited when I get a chance. |
Signed-off-by: Yuan Tang <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
Just tested with latest image. Issue still exists. |
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. |
This issue has been closed due to inactivity. Feel free to re-open if you still encounter this issue. |
I came across this issue when searching for the same. This is sill an issue in 3.3.9. |
+1 Seeing it as well on v3.3.9. Have not tried v3.4.X yet spec:
entrypoint: coinflip
hooks:
exit:
expression: workflow.status == "Failed"
template: notify Will always execute on success or failure |
+1 I'm still seeing this issue on v3.4.4 as well. Exit hook ignores expression and always executes. |
If I'm reading this correctly, this sounds like correct behavior. Specifically, the Lifecycle Hooks docs say that you should not name a hook |
@agilgur5 I think the general issue here is the expression section seems to be ignored. The hook is being labelled as exit but with This expression does not seem to be evaluated and will run if |
Yes, an exit handler does not use an expression. Name your hook anything other than |
Checklist
Summary
What happened/what you expected to happen?
Expected Behaviour:
I have a workflow with a workflow-level exit lifecycle hook. I expect that using
expression
means that the hook only runs when the expression evaluates totrue
.Actual Behaviour:
The exit hook runs regardless of the
expression
What version are you running?
3.3.4
Diagnostics
Paste the smallest workflow that reproduces the bug. We must be able to run the workflow.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: