fix: provide fallback for 3.4 to 3.5 transition with absent NodeFlag. Fixes #12162#13504
Conversation
agilgur5
left a comment
There was a problem hiding this comment.
I'm not sure if this would simplify the code, but if we detect a 3.4 Workflow, could we just skip the recursion check on it entirely? Since it did not exist in 3.4
eab519a to
156d36a
Compare
Not really this isn't a recursion check, the PR title is incorrect. This fix mandates a NodeFlag to be created now, it takes the lack of a NodeFlag to imply older controller to have created the workflow, then it tries to mimic 3.4 logic. |
I changed the title again. I'm not entirely sure I follow the root cause -- your comments in #12162 don't really outline it either. |
156d36a to
88f3276
Compare
Joibel
left a comment
There was a problem hiding this comment.
I'm worried about 3.5 and 3.6 diverging in behaviour with this.
As a less invasive change did you consider scanning the workflow at the beginning of operate to upgrade it?
- If you find a nodeFlags field, abort scan (early dropout for all updated workflows to avoid the cost
- Scan each node and calling CheckHookNode generate and attach a nodeFlags to the nodes as appropriate
This scan would then not be needed in 3.6, but it would be the only difference.
No worries. Basically the |
No, mostly because the mandating of the NodeFlag effectively provides a blast radius. But I don't think this is needed. I think I can effectively create a map containing Nodes mapped into their NodeFlags. Thanks for the suggestion, that is definitely less invasive than this fix. |
Signed-off-by: isubasinghe <isitha@pipekit.io>
88f3276 to
fd6f03b
Compare
|
I am pretty happy with this now actually :) |
Signed-off-by: isubasinghe <isitha@pipekit.io>
Signed-off-by: isubasinghe <isitha@pipekit.io>
Fixes #12162
Motivation
Modifications
Verification