-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make returncode friendly to onfail requisites #39874
Conversation
just pushed a new rebase. |
failures seems unrelated |
Sorry I am being slow on this, I have just not had the time to get into it. Hopefully I can get this reviewed today |
@kiorky here is what I want to do, the issue is that an onfail does not necessarily mean that the run did not have intended failures, since an onfail can be used as an expected trigger or as a safety net for a legit error you would want to know about. |
OK, but as a default what do we choose ?
I vote for 2. |
Hmm, I would vote for 1, minimize the change in behavior. What do you think @cachedout ? |
I don't like changes in behavior in bugfix branches, I'm open to a discuss about a change if this moves to develop. @kiorky ? |
Oh, yes, I would not call this a bugfix |
Well, for me the behavior is totally bugged as i wont expect an error if i handle with onfails, but yes, that's my sole POV. This code is already ported in our fork from 2015.8 -> 2016.11 so i can rebase this to be on top of develop, that's not a big deal. I think no one should use them that way that much in the wild and hoping for rc==0 as if a onfail is triggered, we are already sending, with current code, a rc==2. So, that's impossible per se. |
@kiorky If you want to go ahead and move this to the devlop branch than I think we can move forward with this. Thanks. |
Y, im just busy and dont have time right now to reopen the subject. |
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.
Approved assuming that the code gets merged to the develop branch
@kiorky Looks like we are ready for this to be merged after you rebase and change the branch? |
I have changed the base branch to develop per the earlier discusison. This now needs a rebase to address merge conflicts, please. |
Well, sorry, i have really little time right now, think the best ETA would be in the WE. The PR as it is untouched still does not have the option toggle, so i have to add this support first. |
Ensure that correctly handled states execution (via onfail) will return a 0 code if onfail requisites suceed.
What does this PR do?
Handles correctly returncode of state executions when onfail requisites are used
What issues does this PR fix or reference?
#39873
Previous Behavior
RC==2 when onfail states related to failed states are present and suceed
New Behavior
RC==0 when onfail states related to failed states are present and suceed
Tests written?
Doing them right now
Im currently writing tests and polishing what's added, but as it is non trivial, im opening this for discussion
cc @terminalmage @thatch45 @basepi @regilero