Skip to content

Conversation

@vitorfloriano
Copy link
Contributor

@vitorfloriano vitorfloriano commented Nov 18, 2025

This PR changes the version subcommand output to a human-readable table format:

  • Current:
$ kubebuilder version
Version: cmd.version{KubeBuilderVersion:"v4.10.1", KubernetesVendor:"1.34.1", GitCommit:"$Format:%H$", BuildDate:"1970-01-01T00:00:00Z", GoOs:"unknown", GoArch:"unknown"}
  • After:
$ kubebuilder version
KubeBuilder:        (devel)
Kubernetes Vendor:  1.34.1
Git Commit:         c7b5b17b8e1dc4f0fdaf0910464a4d44000365bf
Build Date:         2025-12-24T01:25:15Z
Go OS/Arch:         linux/amd64

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 18, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vitorfloriano
Once this PR has been reviewed and has the lgtm label, please assign kavinjsir for approval. For more information see the Code Review Process.

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

@k8s-ci-robot
Copy link
Contributor

Hi @vitorfloriano. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 18, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 19, 2025
@vitorfloriano
Copy link
Contributor Author

vitorfloriano commented Dec 2, 2025

Hi @camilamacedo86 hope you're doing well.

I opened helm/helm#31574 to fix a similar issue and was informed by the Helm maintainers that formating the version subcommand output would be considered a breaking change, so I would like to know if that could be the case for Kubebuilder as well.

I'm not sure if any other programs are consuming the output from version.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 24, 2025
@vitorfloriano vitorfloriano marked this pull request as ready for review December 24, 2025 01:37
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 2025
@vitorfloriano vitorfloriano changed the title 🐛 fix(cli): version subcommand pretty output 🐛 fix(cli): format version subcommand output Dec 24, 2025
The version subcommand now displays the version info in a human-readable table format.
@camilamacedo86
Copy link
Member

Hi @camilamacedo86 hope you're doing well.

I opened helm/helm#31574 to fix a similar issue and was informed by the Helm maintainers that formating the version subcommand output would be considered a breaking change, so I would like to know if that could be the case for Kubebuilder as well.

I'm not sure if any other programs are consuming the output from version.

Thanks for working on this — the new output is much nicer for humans 👍
Yes, this can still be a breaking change in practice if some users are grepping or parsing the current output (even if they shouldn’t). Right now there’s no compatibility or machine-readable option.

I think we can move forward if we add a minimal stable output format, for example:

kubebuilder version -o json
# or
kubebuilder version --output=json

and keep the pretty output as the default. This gives tooling a stable contract while improving the human UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants