Repository navigation
fix(customrun): return error when customrun is not found during delete - #3336
tekton-robot merged 1 commit into
Conversation
|
|
|
@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. |
|
/kind bug |
divyansh42
left a comment
There was a problem hiding this comment.
Thanks for the PR @shubhamrai9122-creator 🔥
Please squash the commits into one.
|
@divyansh42 Thanks for the review! Addressed in db8fe2c:
|
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. Record lookup and delete errors with multierr.Append and return them, to align CustomRun delete behavior with Task and Pipeline delete. Each failure is reported once, through the returned error, instead of also being printed to stderr, so non-NotFound lookup errors are no longer shown as "not found". The tests assert that the not found and delete failure messages appear once in the combined output. Fixes tektoncd#3329 Signed-off-by: shubhamrai9122-creator <shubhamrai9122@gmail.com>
db8fe2c to
75a782c
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyansh42, vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
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