Skip to content

Commit 725fc05

Browse files
committed
Fix PipelineRunStatus Reconciler for Minimal embeddedStatus
This commit fixes the updates for reconciling PipelineRunStatus when switching the DefaultEmbeddedStatus from `Full` to `Minimal`. The prior runs or taskruns status would not have been reset before this change.
1 parent c752a36 commit 725fc05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/reconciler/pipelinerun/pipelinerun.go

+5
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,11 @@ func updatePipelineRunStatusFromChildObjects(ctx context.Context, logger *zap.Su
13341334
fullEmbedded := cfg.FeatureFlags.EmbeddedStatus == config.FullEmbeddedStatus || cfg.FeatureFlags.EmbeddedStatus == config.BothEmbeddedStatus
13351335
minimalEmbedded := cfg.FeatureFlags.EmbeddedStatus == config.MinimalEmbeddedStatus || cfg.FeatureFlags.EmbeddedStatus == config.BothEmbeddedStatus
13361336

1337+
if cfg.FeatureFlags.EmbeddedStatus == config.MinimalEmbeddedStatus {
1338+
pr.Status.TaskRuns = nil
1339+
pr.Status.Runs = nil
1340+
}
1341+
13371342
if minimalEmbedded {
13381343
updatePipelineRunStatusFromChildRefs(logger, pr, taskRuns, runObjects)
13391344
}

0 commit comments

Comments
 (0)