Skip to content

[release-1.14] cli: reject invalid output formats in describe commands - #6051

Merged
volcano-sh-bot merged 1 commit into
volcano-sh:release-1.14from
volcano-sh-bot:cherry-pick-6012-to-release-1.14
Oct 7, 2026
Merged

volcano-sh-bot merged 1 commit into
volcano-sh:release-1.14from
volcano-sh-bot:cherry-pick-6012-to-release-1.14

Conversation

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #6012

vcctl jobflow describe and vcctl jobtemplate describe now exit with an error when -o is not json or yaml, instead of printing a message and exiting 0.

vcctl jobflow describe and vcctl jobtemplate describe printed
"Unsupported format: <value>" for any -o value other than json or yaml
and then returned nil, so the command exited 0. Scripts that redirect
the output to a file kept the message as the file contents and carried
on, because the exit status said the command had worked.

The format is now checked before the apiserver call and an unsupported
value returns an error, so the command exits non-zero and says what the
valid formats are. The printers return their marshal errors for the same
reason instead of printing them and returning as if nothing was wrong.

Signed-off-by: iamtanishqjain <tanishqjain7014@gmail.com>
@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 6, 2026
@hajnalmt

hajnalmt commented Oct 7, 2026

Copy link
Copy Markdown
Member

/retest

@hajnalmt

hajnalmt commented Oct 7, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve
/kind bug
/area cli

@volcano-sh-bot volcano-sh-bot added kind/bug Categorizes issue or PR as related to a bug. area/cli lgtm Indicates that a PR is ready to be merged. labels Oct 7, 2026
@volcano-sh-bot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hajnalmt

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

The pull request process is described 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

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 7, 2026
@volcano-sh-bot
volcano-sh-bot merged commit 6acda05 into volcano-sh:release-1.14 Oct 7, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cli kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. 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.

3 participants