Repository navigation
Conversation
TaskRun validation rejected any debug.breakpoints block that did not set onFailure, even though both breakpoint fields are optional per TEP-0097 and the reconciler treats them independently. This forced users to also set onFailure=enabled just to use beforeSteps. Validate onFailure only when it is explicitly set, in both the v1 and v1beta1 TaskRun validation, and replace the table test case that asserted the coupling with a valid beforeSteps-only case. Signed-off-by: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10909 +/- ##
==========================================
- Coverage 90.74% 90.74% -0.01%
==========================================
Files 298 298
Lines 22603 22599 -4
==========================================
- Hits 20512 20508 -4
Misses 2089 2089
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/kind bug |
Problem
TaskRunvalidation rejects anydebug.breakpointsblock that does not setonFailure, so this valid configuration is refused:validateDebugreturns "onFailure breakpoint is empty, it is only allowed to be set as enabled" wheneverbreakpointsis non-nil andonFailureis empty. Both breakpoint fields are optional per TEP-0097, and the reconciler/entrypoint already treat them independently - only the validation gate couples them.Fix
Validate
onFailureonly when it is explicitly set, in bothpkg/apis/pipeline/v1andpkg/apis/pipeline/v1beta1. The existing rule that a non-emptyonFailuremust equalenabledis unchanged.Testing
Replaced the "empty onFailure breakpoint" table case with a valid
beforeSteps-only case.(passes; output in CI)
Fixes #9719
/kind bug