File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -716,6 +716,7 @@ func (wfc *WorkflowController) processNextItem(ctx context.Context) bool {
716716 if err != nil {
717717 logger .WithField ("key" , key ).WithError (err ).Warn (ctx , "Failed to unmarshal key to workflow object" )
718718 woc := newWorkflowOperationCtx (ctx , wf , wfc )
719+ ctx = logging .WithLogger (ctx , woc .log )
719720 woc .markWorkflowFailed (ctx , fmt .Sprintf ("cannot unmarshall spec: %s" , err .Error ()))
720721 woc .persistUpdates (ctx )
721722 return true
@@ -730,9 +731,10 @@ func (wfc *WorkflowController) processNextItem(ctx context.Context) bool {
730731 wfc .wfQueue .AddAfter (key , workflowResyncPeriod )
731732
732733 woc := newWorkflowOperationCtx (ctx , wf , wfc )
734+ ctx = logging .WithLogger (ctx , woc .log )
733735
734736 if (! woc .GetShutdownStrategy ().Enabled () || woc .GetShutdownStrategy () != wfv1 .ShutdownStrategyTerminate ) && ! wfc .throttler .Admit (key ) {
735- logger .WithField ("key" , key ).Info (ctx , "Workflow processing has been postponed due to max parallelism limit" )
737+ woc . log .WithField ("key" , key ).Info (ctx , "Workflow processing has been postponed due to max parallelism limit" )
736738 if woc .wf .Status .Phase == wfv1 .WorkflowUnknown {
737739 woc .markWorkflowPhase (ctx , wfv1 .WorkflowPending , "Workflow processing has been postponed because too many workflows are already running" )
738740 woc .persistUpdates (ctx )
You can’t perform that action at this time.
0 commit comments