-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
✨Add to the PROJECT file the CLI tag version used to do the scaffold #3387
Conversation
Hi @yyy1000. 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yyy1000 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
feat: sepearate version apart fix: add version in Makefile fix: add testdata made by generate fix: small lint fix: lint fix: lint issue
So far I don't know how to handle the 'APIDiff' CI problem. :( |
-X sigs.k8s.io/kubebuilder/v3/pkg/version.goos=$(shell go env GOOS) \ | ||
-X sigs.k8s.io/kubebuilder/v3/pkg/version.goarch=$(shell go env GOARCH) \ | ||
-X sigs.k8s.io/kubebuilder/v3/pkg/version.gitCommit=$(shell git rev-parse HEAD) \ | ||
-X sigs.k8s.io/kubebuilder/v3/pkg/version.buildDate=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \ |
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.
can you please revert this changes that has no relation with the scope of this PR?
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.
well, I use this changes to finish this PR... because I move the 'version.go' to other places.
If I don't move, I can't import that value from 'main' package.
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.
Hun, it does not seem to make sense. This target is used to build the binary, and making changes here does not allow you to import or not a code to be used. We should not perform those changes to address this one.
@@ -4,6 +4,7 @@ | |||
# More info: https://book.kubebuilder.io/reference/project-config.html | |||
componentConfig: true | |||
domain: tutorial.kubebuilder.io | |||
kubebuilderVersion: unknown | |||
layout: | |||
- go.kubebuilder.io/v4 |
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.
I think if we want to track this one we will need to have the CLI version used per plugin and scaffold.
See that we can init a project within the version X and then afterwords scaffold an API with N+2
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.
Ah, got it.
So it would be applied to go/v2 and go/v3 also?
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.
It should ONLY be applied to the Project Config v3.
@@ -93,6 +93,19 @@ func (c *cfg) SetProjectName(string) error { | |||
} | |||
} | |||
|
|||
// GetCLIVersion implements config.Config | |||
func (c cfg) GetCLIVersion() string { |
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.
We should not change the config/v2 it is deprecated and the changes should be addressed into the config/v3
Great, I am closing this one based on the comment #3229 (comment), but we can look into it in the future. |
Description
This involves add a new field in PROJECT file, which is the CLI tag of Kubebuilder.
Will fix #3229