Skip to content

Commit

Permalink
fix(controller): Fix sync manager panic. Fixes #5939 (#5991)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexec authored May 25, 2021
1 parent 80f8473 commit a99d5b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions workflow/sync/sync_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,10 @@ func (cm *Manager) ReleaseAll(wf *wfv1.Workflow) bool {

for _, node := range wf.Status.Nodes {
if node.SynchronizationStatus != nil && node.SynchronizationStatus.Waiting != "" {
lock := cm.syncLockMap[node.SynchronizationStatus.Waiting]
lock.removeFromQueue(getHolderKey(wf, node.ID))

lock, ok := cm.syncLockMap[node.SynchronizationStatus.Waiting]
if ok {
lock.removeFromQueue(getHolderKey(wf, node.ID))
}
node.SynchronizationStatus = nil
wf.Status.Nodes[node.ID] = node
}
Expand Down

0 comments on commit a99d5b8

Please sign in to comment.