-
Notifications
You must be signed in to change notification settings - Fork 4
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 steps tagged with never being ignored even when selected by other tags. #277
Conversation
I am open to other suggestions - technically, we could also this to |
I think This does mean that |
Another question (will look in the code myself later when I've got time) -- is the |
Ah, very good question. I didn't have an example to hand to test that out. I did try to modify the substep code consistently though. I haven't set up a sub-recipe myself, so if you have an example lying around, that would be great. |
I also thought about that. I don't think it is too confusing provided we document it.
|
Having thought about it, my preference is to keep the |
Ok so in summary we want to:
The fix for the above is trivial, just want to be sure I am doing the right thing. |
Confirmed. This also matches the ansible never-always tag behaviour, so we're in good company. |
Ok, done. @o-smirnov could I trouble you to test the subrecipe case when you have a chance? I don't mind putting in more work but a representative recipe + usage example would be nice. |
@o-smirnov I have updated the PR with two extra asserts which should catch bogus tags. |
Thanks @JSKenyon. I've added a fix to propagate step and tag selection into subrecipes. There's a test recipe checked in under
The If you feel motivated, you can add a proper test for this with console output checking. I'm off to assemble a TART so can't do it just now. @Athanaseus @SpheMakh please re-review this so we can merge it. |
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.
lgtm
Sorry @Athanaseus - I changed the logging slightly. Could you please review and approve again? No functional changes. |
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.
nice
This is a fix for a minor bug I introduced. Sorry @o-smirnov! Current behaviour will not run steps tagged with
never
if they are selected by tag i.e. the following:will not be run by
stimela run recipe.yaml -t init
. I don't think this is what we want. This change will disregardnever
tags on steps picked by-s
or-t
i.e.never
is only honoured when the entire recipe is run.