Repository navigation
feat: support structured JSON/YAML output for bulk delete operations - #3334
arvindk-softwaredev wants to merge 1 commit into
Conversation
|
[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 |
ce3e614 to
a1a845c
Compare
|
/retest |
Extend -o json/yaml support to bulk delete scenarios across task, pipeline, pipelinerun, eventlistener, triggerbinding, triggertemplate, and clustertriggerbinding delete commands. Signed-off-by: Arvind Krishnamurthy <arvkrish@redhat.com> Assisted-by: Grok 4.7 (via Cursor)
a1a845c to
1f23a1e
Compare
|
/retest |
2 similar comments
|
/retest |
|
/retest |
There was a problem hiding this comment.
🟡 Changes recommended
PipelineRun retention can bypass structured output, and the release note incorrectly claims CustomRun bulk support.
2 open findings
What changed in this PR
Extends machine-readable JSON/YAML output to bulk delete operations across Tekton CLI resources.
Changes:
- Enables structured output for bulk deletion and skips confirmation prompts.
- Adds coverage for JSON/YAML output, selectors, retention, and partial failures.
- Regenerates command and manpage documentation.
| File | Description |
|---|---|
pkg/cmd/triggertemplate/delete.go |
Enables structured bulk-delete output. |
pkg/cmd/triggertemplate/delete_test.go |
Tests JSON/YAML bulk deletion. |
pkg/cmd/triggerbinding/delete.go |
Enables structured bulk-delete output. |
pkg/cmd/triggerbinding/delete_test.go |
Tests JSON/YAML bulk deletion. |
pkg/cmd/task/delete.go |
Adds structured --all results. |
pkg/cmd/task/delete_test.go |
Tests Task bulk output and validation. |
pkg/cmd/pipelinerun/delete.go |
Adds structured bulk and filtered results. |
pkg/cmd/pipelinerun/delete_test.go |
Tests bulk, retention, selectors, and failures. |
pkg/cmd/pipeline/delete.go |
Adds structured --all results. |
pkg/cmd/pipeline/delete_test.go |
Tests output, validation, and partial failures. |
pkg/cmd/eventlistener/delete.go |
Enables structured bulk-delete output. |
pkg/cmd/eventlistener/delete_test.go |
Tests JSON/YAML bulk deletion. |
pkg/cmd/clustertriggerbinding/delete.go |
Enables cluster-wide structured deletion. |
pkg/cmd/clustertriggerbinding/delete_test.go |
Tests JSON/YAML bulk deletion. |
docs/man/man1/tkn-triggertemplate-delete.1 |
Documents bulk structured output. |
docs/man/man1/tkn-triggerbinding-delete.1 |
Documents bulk structured output. |
docs/man/man1/tkn-task-delete.1 |
Documents bulk and related output. |
docs/man/man1/tkn-pipelinerun-delete.1 |
Documents bulk and filtered output. |
docs/man/man1/tkn-pipeline-delete.1 |
Documents bulk and related output. |
docs/man/man1/tkn-eventlistener-delete.1 |
Documents bulk structured output. |
docs/man/man1/tkn-clustertriggerbinding-delete.1 |
Documents cluster-wide output. |
docs/cmd/tkn_triggertemplate_delete.md |
Updates command examples. |
docs/cmd/tkn_triggerbinding_delete.md |
Updates command examples. |
docs/cmd/tkn_task_delete.md |
Updates command examples. |
docs/cmd/tkn_pipelinerun_delete.md |
Updates command examples. |
docs/cmd/tkn_pipeline_delete.md |
Updates command examples. |
docs/cmd/tkn_eventlistener_delete.md |
Updates command examples. |
docs/cmd/tkn_clustertriggerbinding_delete.md |
Updates command examples. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return err | ||
| } | ||
| return d.Errors() | ||
| if formatted.IsStructured(output) { |
| } | ||
| d.PrintSuccesses(s) | ||
| } else if opts.DeleteAllNs { | ||
| if formatted.IsStructured(output) { |


Part of #2850
Changes
Extend -o json/yaml support to bulk delete
--allscenarios across task, pipeline,pipelinerun, eventlistener, triggerbinding, triggertemplate, and
clustertriggerbinding delete commands.
TaskRun is excluded (covered by #3086).
The bulk delete result is returned as machine-readable output.
-o json/-o yaml skips the confirmation prompt (same as -f) so the
command can run non-interactively.
Example:
Above output structure is the same for all resources.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make checkmake generatedSee the contribution guide
for more details.
Release Notes