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

*: remove project version 1 references, update migration guide to 2 -> 3 #1636

Closed

Conversation

estroz
Copy link
Contributor

@estroz estroz commented Aug 11, 2020

Project version 1 shouldn't be mentioned in code, and any project version that isn't supported by the binary used in a project should cause an error to be returned.

This PR also adds a skeleton migration guide with some TODO's for future work that will likely be in before the next major release.

/kind documentation

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 11, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: estroz

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2020
@estroz estroz marked this pull request as ready for review August 11, 2020 21:32
@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 Aug 11, 2020
@estroz
Copy link
Contributor Author

estroz commented Aug 11, 2020

/cc @DirectXMan12 @joelanford

@estroz
Copy link
Contributor Author

estroz commented Aug 11, 2020

Closes #1508

@@ -45,12 +45,10 @@

- [Migrations](./migrations.md)

- [Kubebuilder v1 vs v2](./migration/v1vsv2.md)
- [Kubebuilder v2 vs v3](./migration/v2vsv3.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @estroz,

IMO we should not remove the V1 to the V2 migration guide. It should still
What do you need is add a new migration V2 to V3 instead.

go test -race ./cmd/...
go test -race ./pkg/...

fi
Copy link
Member

@camilamacedo86 camilamacedo86 Aug 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where it is used?
Is not a test to check the project in the release process?
So, would not be better it be updated to use the project version 3-alpha instead?

@@ -1,220 +1,58 @@
# Migration from v1 to v2
# Migration from v2 to v3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto above

@@ -1,85 +0,0 @@
# Single Group to Multi-Group
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 not be removed.
For V2 and V# it still valid.

@@ -1,24 +0,0 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a PR to remove the V1 mock and update the migration guide to not point to it.
Could we move forward with it #1499 before?

Comment on lines +12 to +13
The default `CustomResourceDefinition` version is now `v1`, bumped from `v1beta1` which is
[deprecated][crds-deprecated-doc].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was it merged?

Comment on lines +17 to +18
The default `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` versions are now `v1`,
bumped from `v1beta1` which is [deprecated][webhook-deprecated-pr].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same ?

@@ -1,56 +0,0 @@
# Kubebuilder v0 v.s. v1
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 remove the old docs. they should still.

@@ -1,146 +0,0 @@
# Migration guide from v0 project to v1 project
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 remove the old docs. they should still.

@@ -64,7 +64,7 @@ func readFrom(fs afero.Fs, path string) (c config.Config, err error) {

// kubebuilder v1 omitted version, so default to v1
if c.Version == "" {
c.Version = config.Version1
return config.Config{}, fmt.Errorf("project version key `version` is empty or does not exist in %s", path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we need a PR to ADD the migration guide v2 to v3
and another one to do these changes.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, see the comments:

  • we should not remove the old docs
  • we should not remove the migration guide v1 to v3
  • we should just add a new migration guide v2 to v3
  • IMO the changes in the code needs be done in one Pr and we need to have another to add the new migration guide.

PS.: I think we ought to merge #1499 before this one.

/hold

@camilamacedo86
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2020
@estroz
Copy link
Contributor Author

estroz commented Aug 12, 2020

we should not remove the old docs

You're probably right.

the changes in the code needs be done in one Pr and we need to have another to add the new migration guide.

Sure

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 15, 2020
@k8s-ci-robot
Copy link
Contributor

@estroz: PR needs rebase.

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.

Copy link
Contributor

@gabbifish gabbifish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments about catching deprecated plugin versions and ensuring we continue to provide helpful messaging about its deprecation.

// The --plugins flag can only be called to init projects v2+.
if c.projectVersion != config.Version1 {
// The --plugins flag can only be called to init projects v3+.
if c.projectVersion != config.Version2 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this conditional continue to check c.projectVersion != config.Version1? Or in the case v1 is used, explicitly print out a message saying that version is now deprecated? We could use the IsVersionSupported() helper to accomplish this.

Copy link
Member

@camilamacedo86 camilamacedo86 Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V1 is no longer supported and its code no longer exists in the project for a while so I am not sure if it would be required. However, I am ok with the suggestion as well.

@@ -37,11 +37,6 @@ var _ = Describe("Config", func() {
expectedConfig Config
)

By("Using config version 1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep this check to ensure that v1 usage continues to produce the expected behavior (failure?)

@camilamacedo86
Copy link
Member

Hi @estroz,

In order to help we move forward and solve its blocker for the next release, I raise a PR with the migration guide only in #1714. Please, feel free to check. Also, feel free to change this pr to address only the other changes that you would like which are here.

@camilamacedo86
Copy link
Member

Hi @estroz,

The migration guide from V2 to V3 is merged. See: #1714
Since it is open for I while I pushed your suggestions/fixes made here to remove the v1 and make the --plugins flag available only for V3-alpha project version via #1763. It would be very nice to get your help in the review for we are able to merge it.

in this way, I think we can close this. WDYT?

@camilamacedo86
Copy link
Member

Hi @estroz,

I am closing this one based on the comment #1636 (comment). However, please feel free to re-open if you see that it is required.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants