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 k8s.io dependencies to v0.23.1 #4675

Merged
merged 5 commits into from Dec 21, 2021

Conversation

munnerz
Copy link
Member

@munnerz munnerz commented Dec 17, 2021

What this PR does / why we need it:

This has also involved upgrading go-logr from a v0.X release to v1.X, which brings with it a significant change in that Logger is no longer an interface and is now a struct that wraps an interface.

They've also made NewContext and FromContext first-class functions in the logr package too, so we can (over time) remove our own in-built variants.

To better handle the interface/struct change, I've opted to change up some bits of the webhook that previously accepted a stopCh and a Log field set on them to use a context provided one instead. There's a few extra changes I want to do here to tidy this up/make it cleaner, but I don't want to explode this PR in complexity :)

Release note:

Upgrade Kubernetes dependencies to v0.23.1

fixes #4500

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Dec 17, 2021
@jetstack-bot
Copy link
Collaborator

Hi @munnerz. Thanks for your PR.

I'm waiting for a jetstack 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.

@jetstack-bot jetstack-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/acme Indicates a PR directly modifies the ACME Issuer code area/acme/http01 Indicates a PR modifies ACME HTTP01 provider code area/monitoring Indicates a PR or issue relates to monitoring approved Indicates a PR has been approved by an approver from all required OWNERS files. area/testing Issues relating to testing labels Dec 17, 2021
@munnerz munnerz added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 17, 2021
Signed-off-by: James Munnelly <jmunnelly@apple.com>
@jetstack-bot jetstack-bot added the area/acme/dns01 Indicates a PR modifies ACME DNS01 provider code label Dec 17, 2021
@maelvls
Copy link
Member

maelvls commented Dec 17, 2021

upgrading go-logr from a v0.X release to v1.X

I remember having issues with go-logr 1.2.0 and controller-runtime 0.10.x:

Screenshot from 2021-12-17 17-38-27

Update: ohh it seems like controller-runtime has upgraded to go-logr v1.2.0 too! Never mind my comment 😅

@munnerz
Copy link
Member Author

munnerz commented Dec 17, 2021

I think the failures here are unrelated...

/retest

@munnerz
Copy link
Member Author

munnerz commented Dec 17, 2021

upgrading go-logr from a v0.X release to v1.X

I remember having issues with go-logr 1.2.0 and controller-runtime 0.10.x:

Screenshot from 2021-12-17 17-38-27

Update: ohh it seems like controller-runtime has upgraded to go-logr v1.2.0 too! Never mind my comment 😅

In reference to your tweet, the reason why this one would be especially problematic is between v0.x and v1.x of a module, there's no change to the module path. For future versions (i.e. v2), logr would be available under both github.com/go-logr/logr and github.com/go-logr/logr/v2 (for the v2 version), and so we could import both and things would 'just work'.

This hasn't always been the case with some modules when they move between versions (e.g. klog), because klog has a singleton within it and it appears they have opted to not do anything clever to maintain compatibility/interoperability between module versions (I'm not 100% sure on the 'why' of that though). This is effectively breaking the go module contract as it should be possible to have various dependencies importing both versions (with one possibly providing a compatibility layer around the other).

Signed-off-by: James Munnelly <jmunnelly@apple.com>
Signed-off-by: James Munnelly <jmunnelly@apple.com>
Signed-off-by: James Munnelly <jmunnelly@apple.com>
Signed-off-by: James Munnelly <jmunnelly@apple.com>
@munnerz
Copy link
Member Author

munnerz commented Dec 20, 2021

/kind cleanup

@jetstack-bot jetstack-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Dec 20, 2021
@irbekrm
Copy link
Collaborator

irbekrm commented Dec 20, 2021

/assign

Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

I think this all looks good and I'm very glad that hack/update-codegen.sh no longer downloads so much.

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2021
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: munnerz, wallrj

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

@jetstack-bot jetstack-bot merged commit 6601845 into cert-manager:master Dec 21, 2021
@jetstack-bot jetstack-bot added this to the v1.7 milestone Dec 21, 2021
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. area/acme/dns01 Indicates a PR modifies ACME DNS01 provider code area/acme/http01 Indicates a PR modifies ACME HTTP01 provider code area/acme Indicates a PR directly modifies the ACME Issuer code area/monitoring Indicates a PR or issue relates to monitoring area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. ok-to-test release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

./hack/update-codegen.sh downloads 1.2GiB of Go dependencies on each run
5 participants