-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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(controller): Fixed workflow stuck with mutex lock #4744
Conversation
Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>
i, holder := ms.GetHolding(lockKey) | ||
items := strings.Split(holderKey, "/") | ||
holdingName := items[len(items)-1] | ||
if i >= 0 && holder.Holder == holdingName { |
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.
This check will make sure who is requesting the mutex release
@@ -93,7 +93,11 @@ func (woc *wfOperationCtx) executeSteps(nodeName string, tmplCtx *templateresolu | |||
|
|||
sgNode := woc.executeStepGroup(stepGroup.Steps, sgNodeName, &stepsCtx) | |||
|
|||
if !sgNode.Fulfilled() { | |||
if sgNode.Fulfilled() { |
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.
If the step template has mutex lock and will not invoke execute template to release the lock if child nodes are completed. It. has to be handled here
Eg:
- name: main-function
synchronization:
mutex:
name: config
steps:
- - name: check
template: main-command
- - name: check1
template: main-command
Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>
Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>
Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>
Signed-off-by: Saravanan Balasubramanian sarabala1979@gmail.com
Checklist:
Fixes #4703