-
Notifications
You must be signed in to change notification settings - Fork 1.5k
✨ (API, CLI, go/v4) Add cliVersion field to the PROJECT file configuration to store the CLI binary version used to scaffold projects. #4621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @vitorfloriano. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terrific 🎉 . Thank you a lot for your contribution 🥇
dff6ef1
to
6ab4d37
Compare
6ab4d37
to
23c1e26
Compare
edb23a1
to
3aeef07
Compare
needs rebase, do a git pull from |
3aeef07
to
1319415
Compare
1319415
to
28ff872
Compare
28ff872
to
a28a293
Compare
a28a293
to
d1c79bb
Compare
Hi @vitorfloriano IMO it is very close to fly 🚀 |
This commit adds a new field to the PROJECT file: cliVersion. Additionally, it updates the documentation in the Project Configuration Reference to include the new cliVersion field. It also updates the PROJECT file scaffolded in the docs and in testdata.
d1c79bb
to
2fcc548
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ This change seems safe to approve.
The package sigs.k8s.io/kubebuilder/v4/pkg/config/v3 is used directly by consumers, but in practice they usually do not implement the Config interface themselves. Instead, they rely on the provided implementation, such as cfgv3.Cfg.
As a result, adding the GetCliVersion and SetCliVersion methods to the interface is not a breaking change for consumers who simply use the config objects. These consumers won't need to do anything differently.
However, if a project chooses to implement the Config interface themselves, they would now be required to implement the new methods. For example:
type MyCustomConfig struct {
// fields...
}
func (c *MyCustomConfig) GetCliVersion() string {
return "v4.6.0"
}
func (c *MyCustomConfig) SetCliVersion(version string) error {
// optionally store it somewhere
return nil
}
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, vitorfloriano The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Furtheremore, we also validate the change here: #4760 (comment) |
This PR adds a new field to the PROJECT file:
cliVersion.
Additionally, it updates the documentation in the Project Configuration Reference to include the new
cliVersion
field.It also updates the PROJECT file scaffolded in the docs and in testdata.
Closes: #4398
Test Steps:
~/kubebuilder$ goreleaser release --snapshot --skip=publish -f ./build/.goreleaser.yml
~/kubebuilder/dist/kubebuilder_linux_amd64_v1/kubebuilder init --domain example.com --repo github.com/test/example-operator