Skip to content

fix: allow debug.breakpoints.beforeSteps without onFailure - #10836

Closed
aniketatgithub wants to merge 1 commit into
tektoncd:mainfrom
aniketatgithub:fix-debug-before-steps-without-onfailure
Closed

aniketatgithub wants to merge 1 commit into
tektoncd:mainfrom
aniketatgithub:fix-debug-before-steps-without-onfailure

Conversation

@aniketatgithub

Copy link
Copy Markdown

Changes

Fixes #9719

validateDebug rejected any TaskRun with a non-nil breakpoints block whose onFailure was empty, even though both onFailure and beforeSteps are +optional on TaskBreakpoints and the runtime treats them independently (NeedsDebugOnFailure() returns false for empty; NeedsDebugBeforeStep()/HaveBeforeSteps() work alone). The empty-onFailure rejection was a side effect of an earlier volume-related fix and was never intended as a requirement.

This removes the empty-onFailure rejection from both v1 and v1beta1 validateDebug. The remaining check only fires when onFailure is set to a value other than enabled. Added TestTaskRunSpec_ValidateDebugBreakpoints table tests (beforeSteps-only valid, empty breakpoints valid, enabled valid, invalid value rejected, duplicate beforeSteps rejected) in both packages.

Submitter Checklist

Release Notes

Fix TaskRun validation so `debug.breakpoints.beforeSteps` can be used without setting `debug.breakpoints.onFailure`.

The validation gate rejected any TaskRun with a non-nil breakpoints
block whose onFailure was empty, even though both fields are optional
in the API and the runtime treats them independently. Remove the
empty-onFailure rejection from both v1 and v1beta1 validators; the
invalid-value check for non-enabled values remains.

Fixes tektoncd#9719.

Signed-off-by: Aniket <aniketkomailkro@gmail.com>
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 30, 2026
@aniketatgithub

Copy link
Copy Markdown
Author

/kind bug

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@tekton-robot tekton-robot added kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 30, 2026
@tekton-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign vdemeester after the PR has been reviewed.
You can assign the PR to them by writing /assign @vdemeester in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aniketatgithub

Copy link
Copy Markdown
Author

Closing for now since I can't complete the CLA signing process. Happy for someone else to pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug validation bug: beforeSteps cannot be used without onFailure

2 participants