-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: constraint containerType outboundnode boundary. Fixes #12997 #13048
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tianchu Zhao <evantczhao@gmail.com>
@@ -2854,7 +2854,16 @@ func (woc *wfOperationCtx) getOutboundNodes(nodeID string) []string { | |||
} | |||
outboundNodes := make([]string, 0) | |||
for _, child := range node.Children { | |||
outboundNodes = append(outboundNodes, woc.getOutboundNodes(child)...) | |||
childNode, err := woc.wf.Status.Nodes.Get(child) |
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.
Why not put all this new logic inside getOutboundNodes()
- keep that the definitive source of outbound nodes rather than some answers to that question coming from here.
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.
hmm, this code change is inside the getOutboundNodes
function.
There containerType is missing logic for handling containerset situation resulting in getting the wrong node
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.
Yes. I forgot this recursed and just assumed it didn't.
Fixes #12997
Motivation
Root cause:
say we have dag
if task B is processed and started before the controller can process C,
C will find the deepest node in A without considering boundaries and mistakenly attach to B
Modifications
if a node(containerType) child node do not have the same boundyID, we return the current node as the deepest outbound node.
Verification
Tested:
Before code change
After code change