Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

yyy1000
Copy link
Member

@yyy1000 yyy1000 commented May 4, 2023

Description

This involves add a new field in PROJECT file, which is the CLI tag of Kubebuilder.
Will fix #3229

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 4, 2023
@k8s-ci-robot
Copy link
Contributor

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 /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.

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.

@k8s-ci-robot k8s-ci-robot requested a review from jmrodri May 4, 2023 05:32
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yyy1000 yyy1000 marked this pull request as draft May 4, 2023 05:38
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 4, 2023
feat: sepearate version apart

fix: add version in Makefile

fix: add testdata made by generate

fix: small lint

fix: lint

fix: lint issue
@yyy1000 yyy1000 marked this pull request as ready for review May 4, 2023 13:25
@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 May 4, 2023
@yyy1000
Copy link
Member Author

yyy1000 commented May 4, 2023

So far I don't know how to handle the 'APIDiff' CI problem. :(
And also, Testdata verification fails though I run 'make generate'.🤔

-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') \
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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
Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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 {
Copy link
Member

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

@camilamacedo86
Copy link
Member

Great, I am closing this one based on the comment #3229 (comment), but we can look into it in the future.

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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add to the PROJECT file the CLI tag version used to do the scaffold
3 participants