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

Upgrade ginkgo to v2 for go/v4 plugin #2532

Closed
haoxins opened this issue Mar 9, 2022 · 7 comments
Closed

Upgrade ginkgo to v2 for go/v4 plugin #2532

haoxins opened this issue Mar 9, 2022 · 7 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. release-blocker triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@haoxins
Copy link

haoxins commented Mar 9, 2022

What do you want to happen?

I just submitted a PR for upgrading ginkgo to v2, see #2522
After some discussions we found it's a broken change for go/v3.
So I created this issue for tracking the upgrade and intend to be added to v4 milestone.

Extra Labels

No response

@haoxins haoxins added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 9, 2022
@camilamacedo86 camilamacedo86 added this to the go/v4 milestone Mar 9, 2022
@camilamacedo86 camilamacedo86 added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Mar 9, 2022
@camilamacedo86
Copy link
Member

camilamacedo86 commented Mar 9, 2022

We checked in the review of #2522 that changes in the scaffolds are required and that the previous code will not work with ginkgo v2 so it is a breaking change and then we cannot move forward in go/v3. We will need a go/v4 plugin to add this one.

See that the scaffolds require to be changed with the following migrations.

Also, you can check the policy: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#introducing-changes-to-plugins

@camilamacedo86
Copy link
Member

camilamacedo86 commented Aug 16, 2022

Besides the ginkgo upgrade is considered a breaking change because requires small changes Kubebuilder has k8s and controller-runtime as a dependency. Therefore, k8s 1.25 made this change and we have a PR open to introducing it in controller-runtime (see kubernetes-sigs/controller-runtime#1977).

In this way, we need to be aligned with both and the best approach seems to ensure that Kubebuilder tests as go/v3 and go/v4-alpha are all updated to using ginkgo v2.

On top of that following further details were provided by @jakobmoellersap:

With the Migration of Gingko in controller-runtime (see kubernetes-sigs/controller-runtime#1977) we will also have the chance to migrate our test coding as well as our templated scaffolds to gingko v2. To make sure that we do not break incompatibility, we especially need to look at the migration guide in https://onsi.github.io/ginkgo/MIGRATING_TO_V2

Since CR is upgrading this also means we have to react to the resulting breaking changes
EDIT: This is not a breaking change anymore after the removal of the changes of the printer package

The PR removes two helpers in pkg/envtest/printer that were used with ginkgo v1. Since you can't use both versions at the same time, this isn't relevant though.
In summary, all projects depending on controller-runtime will have to update to ginkgo v2 after this is merged and released. Upstream did so already: kubernetes/kubernetes#109111

@jakobmoellerdev
Copy link
Contributor

/assign

@camilamacedo86
Copy link
Member

We update the CLI: #2876
However, we need to update the scaffolds.
Also, since C+R and k8s made the update and their a dep we probably need to ensure the same for all scaffolds indeed go/v3

@camilamacedo86
Copy link
Member

Hi @jakobmoellersap,

Are you able to help us update the scaffolds by doing the same changes in the scaffolds so we are able to do a new release with this change?

@jakmoe
Copy link

jakmoe commented Sep 13, 2022

Yup, was out the last few days. Will submit a draft today.

@camilamacedo86
Copy link
Member

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. release-blocker triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants