Skip to content

fix(customrun): return error when customrun is not found during delete - #3336

Open
shubhamrai9122-creator wants to merge 1 commit into
tektoncd:mainfrom
shubhamrai9122-creator:fix-customrun-delete-exit-code
Open

shubhamrai9122-creator wants to merge 1 commit into
tektoncd:mainfrom
shubhamrai9122-creator:fix-customrun-delete-exit-code

Conversation

@shubhamrai9122-creator

Copy link
Copy Markdown

Changes

Fixes #3329

Previously, deleteCustomRuns printed a 'not found' message when customRunExists returned an error, but skipped the resource without recording the error into deleteErr. As a result, tkn customrun delete exited 0 even when specified resources were not found.

This commit records lookup errors using multierr.Append to align CustomRun delete behavior with Task and Pipeline delete:

  • Missing names still print the message and are skipped.
  • Existing names are still deleted and reported.
  • The command returns an error if any name was not found.

Submitter Checklist

  • Includes tests
  • Commit messages follow commit message best practices

Release Notes

Fix tkn customrun delete to return a non-zero exit code when a specified customrun is not found.

Previously, deleteCustomRuns printed a 'not found' message when
customRunExists returned an error, but skipped the resource without
recording the error into deleteErr. As a result, tkn customrun delete
exited 0 even when specified resources were not found.

This commit records lookup errors using multierr.Append to align
CustomRun delete behavior with Task and Pipeline delete.

Fixes tektoncd#3329

Signed-off-by: shubhamrai9122-creator <shubhamrai9122@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 Oct 10, 2026
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign chmouel after the PR has been reviewed.
You can assign the PR to them by writing /assign @chmouel 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

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tkn customrun delete exits 0 and silently succeeds when resource is not found

2 participants