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

⚠️ Update ginkgo@v2.1.1 and gomega@v1.18.0 #1792

Closed
wants to merge 13 commits into from

Conversation

acumino
Copy link
Contributor

@acumino acumino commented Feb 5, 2022

Migrate ginkgo to v2.

Fixes: #1545

Important Note:
-> Per node timeout has been removed to prevent the wrongly marking a test as failure which is caused by some other test. Read more about it here
-> Custom reporters have been deprecated in ginkgo v2 and will be removed in future releases.

@k8s-ci-robot
Copy link
Contributor

Welcome @acumino!

It looks like this is your first PR to kubernetes-sigs/controller-runtime 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/controller-runtime has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 5, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @acumino. 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 added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 5, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: acumino
To complete the pull request process, please assign alvaroaleman after the PR has been reviewed.
You can assign the PR to them by writing /assign @alvaroaleman in a comment when ready.

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

@acumino
Copy link
Contributor Author

acumino commented Feb 5, 2022

/invite @FillZpp

@acumino
Copy link
Contributor Author

acumino commented Feb 8, 2022

/ping @alvaroaleman

@FillZpp
Copy link
Contributor

FillZpp commented Feb 11, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 11, 2022
@acumino
Copy link
Contributor Author

acumino commented Feb 11, 2022

/test pull-controller-runtime-test-master
/test pull-controller-runtime-apidiff-master

@alvaroaleman alvaroaleman added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Feb 16, 2022
Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

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

It seems this doesn't build?

hack/test-all.sh Outdated Show resolved Hide resolved
pkg/builder/builder_suite_test.go Outdated Show resolved Hide resolved
pkg/builder/builder_suite_test.go Show resolved Hide resolved
@alvaroaleman
Copy link
Member

/retest

The error you are seeing in CI is apparently golangci-lints way of saying "Your code doesn't" build, i.E. retesting is not going to help. Ref: golangci/golangci-lint#825

@acumino acumino force-pushed the ginkgo-v2 branch 5 times, most recently from 5c3fcbb to bba0864 Compare February 16, 2022 20:00
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 17, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2022
@acumino
Copy link
Contributor Author

acumino commented Mar 3, 2022

/retest all

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 4, 2022
Copy link
Member

@schrej schrej left a comment

Choose a reason for hiding this comment

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

From what I can see, the removal of those two helpers for gingko v1 in pkg/envtest/printer makes this a breaking change.

Yes, Ginkgo does a major bump, but it is possible to have both v1 and v2 as a dependency in the same project. Bumping Ginkgo alone only influences the tests of controller-runtime, but not the tests of dependant projects. Cluster API is still using Ginkgo v1 and works fine when running its test with this PR.
Since Cluster API doesn't use the two removed helpers, it's not affected by this PR at all.

The removal of those helpers are also the only changes happening in files that do not end with _test.go. Any change inside of _test.go files will not have an effect on projects using controller-runtime as a dependency.

cc @camilamacedo86 (thanks for staying persistent! I totally missed those helpers on the first review.)

// see https://github.com/onsi/ginkgo/issues/706
// When using this you must make sure to grep for failures in your junit xmls and fail the run
// if there are any.
func NewProwReporter(suiteName string) ginkgo.Reporter {
Copy link
Member

@schrej schrej May 23, 2022

Choose a reason for hiding this comment

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

// NewlineReporter is Reporter that Prints a newline after the default Reporter output so that the results
// are correctly parsed by test automation.
// See issue https://github.com/jstemmer/go-junit-report/issues/31
type NewlineReporter struct{}
Copy link
Member

@schrej schrej May 23, 2022

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

See that you are changing the test_.go files. Those with controller runtime projects will also need to change their _test.go files as well, right? They might use methods that will be affected or not. For example, the default scaffolds done by Kubebuilder will be affected if we need to bump v2.

So, the correct mojo here would be ⚠️.

Copy link
Member

Choose a reason for hiding this comment

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

They will need to change their tests if they are using either printer.NewLineReporter() or printer.NewProwReporter().

Any change that we do in our _test.go files does not affect any users of controller-runtime. Code in _test.go files can't be imported, so it also can't affect their implementation. That's why I initially thought this is not a breaking change.

I would propose to move the removal of these two reporters to a separate PR, so this one does not have to be breaking. And then maybe postpone the removal of those helpers a bit to allow more time for migration to v2.

@acumino acumino changed the title ✨ Update ginkgo@v2.1.1 and gomega@v1.18.0 ⚠️ Update ginkgo@v2.1.1 and gomega@v1.18.0 May 24, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2022
@k8s-ci-robot
Copy link
Contributor

@acumino: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-controller-runtime-test-master 1a677d0 link true /test pull-controller-runtime-test-master

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

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

@acumino: 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.

@matteoolivi
Copy link
Contributor

Why was this closed? Can someone provide an explanation/a status update?

@alvaroaleman
Copy link
Member

@matteoolivi presumably bceause @acumino didn't have the cycles to finish it

@matteoolivi
Copy link
Contributor

@alvaroaleman . Oh. I can definitely relate to that.

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-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ginkgo v2 migration
7 participants