Skip to content

Commit edbf8f4

Browse files
committed
fixup! feat(ISV-7024): Add when conditions to pipeline tasks
1 parent 75a5e93 commit edbf8f4

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

docs/tekton-when-condition-guidelines.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,16 @@ A task result can be used as a `when` condition input when **all three** of the
116116
## Rule 4 — `when` input is a task result, guarded task also consumes task results in params ❌
117117

118118
This combination is **not allowed**. When the `when` condition is based on a task result and the
119-
guarded task also consumes task results in its own params, skipping the task creates an ambiguous
120-
state in the result propagation chain:
119+
guarded task also consumes task results in its own params, the pipeline can fail regardless of
120+
whether the `when` condition evaluates to true or false.
121+
122+
The critical case: even when the `when` source task ran successfully and the condition evaluates
123+
to **false** (meaning the guarded task should be skipped), Tekton still resolves all param
124+
references before the skip takes effect. If any param references a task result from a skipped
125+
upstream task, the pipeline fails — the clean skip never happens.
126+
127+
More generally, skipping the guarded task creates an ambiguous state in the result propagation
128+
chain:
121129

122130
1. The upstream tasks that produced the param results ran and completed.
123131
2. The guarded task is skipped — those results are not consumed and not transformed.

0 commit comments

Comments
 (0)