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

feature/214 - fix reporting failed workflow due to failed step #220

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

lucamrgs
Copy link
Collaborator

@lucamrgs lucamrgs commented Sep 5, 2024

To fix this, I changed the logic of assignment of the ID of the next step to execute.
The new logic is more in line with a consistent use of the CACAO V2 spec.

@lucamrgs lucamrgs linked an issue Sep 5, 2024 that may be closed by this pull request
@lucamrgs
Copy link
Collaborator Author

lucamrgs commented Sep 5, 2024

The updated "next step ID assignment" based on on_completion (and ignoring on_success and on_failure) implies that we should not use on_success and on_failure at all at the moment - which I think is a necessary decision for CACAO V2. To be changed in CACAO V3.

@lucamrgs lucamrgs marked this pull request as ready for review September 5, 2024 19:58
@MaartendeKruijf
Copy link
Collaborator

This would prepare for the new CACAO standard right? The question I've wouldn't this break current playbooks that use OnSucces?

@MaartendeKruijf MaartendeKruijf force-pushed the feature/214-fix-reporting-playbook-status-on-unsuccessful-step-status branch from 155a63c to 131a9ac Compare September 10, 2024 09:21
@lucamrgs
Copy link
Collaborator Author

@MaartendeKruijf it's not a change meant to align with the next CACAO version, but to a change that actually records when a playbook execution fails. A failed playbook execution happens when an execution error arises, not when a step "fails". This was overlooked in the code that this PR changes. It would not actually really break playbooks that used on_success, because as far as our execution goes (and if I am not mistaken), we would only "branch" into on_faliure IF on_faliure was the only one defined among on_completion, on_success, and on_faliure.

It is true though that before our logic was defaulting on on_success being the only one defined - but now it's just switched around on defaulting on on_completion.

In summary, this PR should just fix previois incorrect behaviour/assumptions.

@MaartendeKruijf MaartendeKruijf force-pushed the feature/214-fix-reporting-playbook-status-on-unsuccessful-step-status branch from 131a9ac to b567f3d Compare September 10, 2024 20:24
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.

fix reporting playbook status on unsuccessful step status
2 participants