Skip to content

Commit

Permalink
Fix PipelineRunStatus Reconciler for Minimal embeddedStatus
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JeromeJu committed Jan 12, 2023
1 parent c752a36 commit 725fc05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/reconciler/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,11 @@ func updatePipelineRunStatusFromChildObjects(ctx context.Context, logger *zap.Su
fullEmbedded := cfg.FeatureFlags.EmbeddedStatus == config.FullEmbeddedStatus || cfg.FeatureFlags.EmbeddedStatus == config.BothEmbeddedStatus
minimalEmbedded := cfg.FeatureFlags.EmbeddedStatus == config.MinimalEmbeddedStatus || cfg.FeatureFlags.EmbeddedStatus == config.BothEmbeddedStatus

if cfg.FeatureFlags.EmbeddedStatus == config.MinimalEmbeddedStatus {
pr.Status.TaskRuns = nil
pr.Status.Runs = nil
}

if minimalEmbedded {
updatePipelineRunStatusFromChildRefs(logger, pr, taskRuns, runObjects)
}
Expand Down

0 comments on commit 725fc05

Please sign in to comment.