Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into feature/simplify-retries
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <daniel@union.ai>
  • Loading branch information
hamersaw committed Sep 29, 2023
2 parents f919ad6 + 0fcc1da commit 6af5f8f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/controller/nodes/task/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,13 +536,6 @@ func (t Handler) Handle(ctx context.Context, nCtx interfaces.NodeExecutionContex
ts := nCtx.NodeStateReader().GetTaskNodeState()

pluginTrns := &pluginRequestedTransition{}
defer func() {
// increment parallelism if the final pluginTrns is not in a terminal state
if pluginTrns != nil && !pluginTrns.pInfo.Phase().IsTerminal() {
eCtx := nCtx.ExecutionContext()
logger.Infof(ctx, "Parallelism now set to [%d].", eCtx.IncrementParallelism())
}
}()

// We will start with the assumption that catalog is disabled
pluginTrns.PopulateCacheInfo(catalog.NewFailedCatalogEntry(catalog.NewStatus(core.CatalogCacheStatus_CACHE_DISABLED, nil)))
Expand Down Expand Up @@ -667,6 +660,10 @@ func (t Handler) Handle(ctx context.Context, nCtx interfaces.NodeExecutionContex
return handler.UnknownTransition, err
}

// increment parallelism if the final pluginTrns is not in a terminal state
if pluginTrns != nil && !pluginTrns.pInfo.Phase().IsTerminal() {
logger.Infof(ctx, "Parallelism now set to [%d].", nCtx.ExecutionContext().IncrementParallelism())
}
return pluginTrns.FinalTransition(ctx)
}

Expand Down

0 comments on commit 6af5f8f

Please sign in to comment.