diff --git a/engine/api/workflow/dao.go b/engine/api/workflow/dao.go index a757edec2a..e0447fe022 100644 --- a/engine/api/workflow/dao.go +++ b/engine/api/workflow/dao.go @@ -516,13 +516,14 @@ func load(ctx context.Context, db gorp.SqlExecutor, store cache.Store, proj *sdk dbRes := Workflow{} _, next := observability.Span(ctx, "workflow.load.selectOne") - if err := db.SelectOne(&dbRes, query, args...); err != nil { + err := db.SelectOne(&dbRes, query, args...) + next() + if err != nil { if err == sql.ErrNoRows { return nil, sdk.ErrWorkflowNotFound } return nil, sdk.WrapError(err, "Unable to load workflow") } - next() res := sdk.Workflow(dbRes) if proj.Key == "" { @@ -538,11 +539,11 @@ func load(ctx context.Context, db gorp.SqlExecutor, store cache.Store, proj *sdk // Load groups _, next = observability.Span(ctx, "workflow.load.loadWorkflowGroups") gps, err := group.LoadWorkflowGroups(db, res.ID) + next() if err != nil { return nil, sdk.WrapError(err, "Unable to load workflow groups") } res.Groups = gps - next() res.Pipelines = map[int64]sdk.Pipeline{} res.Applications = map[int64]sdk.Application{} diff --git a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html index f0ef37dba1..533d7c02f0 100644 --- a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html +++ b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html @@ -72,14 +72,17 @@