Repository navigation
fix(customrun): return error when customrun is not found during delete - #3336
shubhamrai9122-creator wants to merge 1 commit into
Conversation
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>
|
[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 |
|
|
|
@shubhamrai9122-creator Thank you for the contribution, could you please sign the CLA? |
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix preserves successful results, propagates failures, and includes regression coverage with no unresolved findings.
No open issues 🎉
What changed in this PR
Fixes #3329 by making tkn customrun delete return an error when a requested resource is missing, while preserving successful deletions.
Changes:
- Accumulates lookup and deletion errors.
- Strengthens error assertions and adds regression coverage for mixed successful and missing resources.
| File | Description |
|---|---|
pkg/cmd/customrun/delete.go |
Collects errors without stopping successful deletions. |
pkg/cmd/customrun/delete_test.go |
Updates error expectations and tests partial success with JSON output. |
Review effort: Balanced
|
@pratap0007 Thanks for the review! I've signed the CLA, and the EasyCLA check is passing now. The PR is ready for another look whenever you have time. |
Changes
Fixes #3329
Previously,
deleteCustomRunsprinted a 'not found' message whencustomRunExistsreturned an error, but skipped the resource without recording the error intodeleteErr. As a result,tkn customrun deleteexited 0 even when specified resources were not found.This commit records lookup errors using
multierr.Appendto align CustomRun delete behavior with Task and Pipeline delete:Submitter Checklist
Release Notes