-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Problem Description
The new Python 3.12 Tekton pipeline files being added in PR #1379 use an invalid variable reference $(tasks.status)
in when
expressions for Slack notification failure gating. This causes the condition to never match, resulting in build failure alerts never reaching Slack.
Technical Details
Issue: $(tasks.status)
is not a valid Tekton variable
Impact: Slack notification tasks are silently skipped because the condition cannot resolve
Root Cause: When expressions can reference $(tasks.<taskName>.status)
or $(context.pipelineRun.status)
, but not the synthetic token $(tasks.status)
Current Problematic Pattern
when:
- input: $(tasks.status)
operator: in
values:
- "Failed"
Correct Solutions
Option 1: Use overall pipeline status
when:
- input: $(context.pipelineRun.status)
operator: in
values:
- "Failed"
Option 2: Use specific task status
when:
- input: $(tasks.build-container.status)
operator: in
values:
- "Failed"
Affected Files
Based on the current PR #1379, this issue affects the new Python 3.12 pipeline files being added:
- All new .tekton/-py312-.yaml files in the PR
Impact Analysis
- Severity: High - Critical failure notifications are not being sent
- Scope: Affects new Python 3.12 pipelines being introduced
- User Impact: Development teams will not receive build failure alerts via Slack
- Operational Impact: Failed builds may go unnoticed, affecting development workflow
Solution Requirements
- Pattern Replacement: Replace all instances of
$(tasks.status)
with valid Tekton variables - Consistency: Use the same approach across all pipeline files
- Testing: Verify that failure notifications are properly triggered after changes
- Validation: Check if similar issues exist in Python 3.11 pipelines
Acceptance Criteria
- All instances of
$(tasks.status)
are replaced with valid Tekton variables in new Python 3.12 files - Consistent approach is used across all affected pipeline files
- Slack failure notifications are properly triggered when pipelines fail
- Changes are tested with both successful and failed pipeline runs
- Audit existing Python 3.11 pipelines for similar issues
- No new instances of
$(tasks.status)
are introduced
Context
- Discovered in: PR RHOAIENG-28512: add py312 .tekton push pipelines #1379 (RHOAIENG-28512: add py312 .tekton push pipelines)
- Comment: RHOAIENG-28512: add py312 .tekton push pipelines #1379 (comment)
- Reporter: @jiridanek
- Technical Analysis: Shows that
$(tasks.status)
cannot resolve in Tekton when expressions
Implementation Notes
- Recommend using
$(context.pipelineRun.status)
for overall pipeline status - Ensure consistent implementation across all pipeline files
- Consider adding validation to prevent future instances of this pattern
- May need to audit existing Python 3.11 files for similar patterns
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog