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

bump controller-runtime #335

Conversation

stephanhorsthemke
Copy link
Contributor

@stephanhorsthemke stephanhorsthemke commented May 11, 2023

What this PR does / why we need it:
Bumps controller-runtime and fixes breaking changes

Which issue(s) this PR fixes:

Fixes #333.

Special notes for your reviewer:
This PR already unblocks me as I'll just point the go mod to this commit. I don't have much familiarity with the changes and we should maybe put some more thoughts into some of the changes.

Locally I had some test failures also on master and they looked similar

Additional documentation:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 11, 2023
@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 May 11, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @stephanhorsthemke. 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 the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 11, 2023
@stephanhorsthemke stephanhorsthemke changed the title bump controller-runtime, fix breaking changes bump controller-runtime May 11, 2023
@atoato88
Copy link
Contributor

/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 May 11, 2023
@atoato88
Copy link
Contributor

/assign @justinsb
Could you review this?
And CI test failed, is this flaky one?

@atoato88
Copy link
Contributor

@justinsb

I checked the result on prow job.
And I created the update on forked my repo to pass the job.
Using this update, hack/ci/test.sh passed with success on my laptop.

But I wonder if my update is valid, because I updated the expected data.

golang.org/x/crypto v0.1.0
golang.org/x/tools v0.3.0
k8s.io/api v0.26.3
k8s.io/apimachinery v0.26.3
Copy link
Member

Choose a reason for hiding this comment

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

@stephanhorsthemke,

Thank you a lot for this PR. Could you check the errors in the CI test?
We need to fix those before running the others.

@stephanhorsthemke
Copy link
Contributor Author

Hey all and thanks for the swift reviews!
I unblocked myself with this branch already and have trouble to prioritise this now. @atoato88 or anybody else, Please just feel free and take this over. Your changes look good. Maybe we could merge this into another branch in the upstream repo so you have all the permissions?

}
}

var restMapper meta.RESTMapper
if options.Manager != nil {
restMapper = options.Manager.GetRESTMapper()
} else {
rm, err := apiutil.NewDiscoveryRESTMapper(options.RESTConfig)
client, err := restclient.HTTPClientFor(options.RESTConfig)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This creates a new HTTP client and I suspect that this results in the changed timeout IIRC.
An alternative to change the tests (which IMO should be alright, the timeout feels sane?) would be to change the timeout, or rather remove the timeout, here! Probably we could change the RESTConfig?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the previous function apiutil.NewDiscoveryRESTMapper the Client was created by a small helper function which we might also be able to use again. I remember that I had trouble with this somehow

- update expected*.yaml
- update test.sh for getting kubectl v1.27 instead of v1.26
- update guestbook_controller
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: stephanhorsthemke
Once this PR has been reviewed and has the lgtm label, please ask for approval from justinsb. 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

@stephanhorsthemke
Copy link
Contributor Author

Alright. I just went ahead and at least did what @atoato88 did in his branch to see if that fixes all the tests!

What I can't answer is if it is alright and fine that the expected client is different now!

@atoato88
Copy link
Contributor

Umm, test result was not success, I will update my commit.

@atoato88
Copy link
Contributor

I created the update.
Could you merge this?

@kkkkun
Copy link
Member

kkkkun commented May 22, 2023

I created the update. Could you merge this?

@camilamacedo86 @stephanhorsthemke the update is usefully to pull-declarative-test. Should we update and merge ?

It's block kubernetes-sigs/kubebuilder#3421

@atoato88
Copy link
Contributor

@justinsb
Gentle ping.
Could you review this?

@kkkkun
Copy link
Member

kkkkun commented May 24, 2023

Thanks for you PR. If you have no time, I will open PR #337 which contain your commit informations. If you want to start agains. I would close #337.

Co-authored-by: atoato88 <akihito-inou@nec.com>
@k8s-ci-robot
Copy link
Contributor

@stephanhorsthemke: 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-declarative-test 945f0f5 link true /test pull-declarative-test

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.

@stephanhorsthemke
Copy link
Contributor Author

Amazing @kkkkun Thanks for taking over.
I haven't had the time to follow up on this until now so that's great! I'll close this PR.

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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump Golang 1.20 and controller-runtime v0.15.0-alpha.0
6 participants