Skip to content

[release-1.12] Fix invalid handling of ip addresses in comparisons - #6295

Closed
jetstack-bot wants to merge 1 commit into
cert-manager:release-1.12from
jetstack-bot:cherry-pick-6293-to-release-1.12
Closed

jetstack-bot wants to merge 1 commit into
cert-manager:release-1.12from
jetstack-bot:cherry-pick-6293-to-release-1.12

Conversation

@jetstack-bot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #6293

/assign inteon

Fixes an issue where cert-manager would incorrectly reject two IP addresses as being unequal when they should have compared equal. This would be most noticeable when using an IPv6 address which doesn't match how Go's `net.IP.String()` function would have printed that address.

@jetstack-bot jetstack-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 24, 2023
@jetstack-bot jetstack-bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Aug 24, 2023
@jetstack-bot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jetstack-bot
Once this PR has been reviewed and has the lgtm label, please assign wallrj for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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 added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 24, 2023
@jetstack-bot

Copy link
Copy Markdown
Contributor Author

@jetstack-bot: The following tests 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-cert-manager-release-1.12-make-test 1aaa0f6 link true /test pull-cert-manager-release-1.12-make-test
pull-cert-manager-release-1.12-e2e-v1-27 1aaa0f6 link true /test pull-cert-manager-release-1.12-e2e-v1-27
pull-cert-manager-release-1.12-e2e-v1-27-upgrade 1aaa0f6 link true /test pull-cert-manager-release-1.12-e2e-v1-27-upgrade
pull-cert-manager-release-1.12-license 1aaa0f6 link false /test pull-cert-manager-release-1.12-license

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.

Details

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.

@SgtCoDFish

Copy link
Copy Markdown
Member

I think this will need a manual backport since 1.12 didn't import exp/slices and so will need wider changes than were present in #6293

We can't just use the existing TestEqualIPsUnsorted from the release-1.12 branch because it doesn't correctly handle 4-byte vs 16-byte IP addresses:

    --- FAIL: TestEqualIPsUnsorted_RawIPs/mixed_ipv4_lengths (0.00s)
        util_test.go:186: EqualIPsUnsorted([10.0.0.206], [10.0.0.206]) = false, but expected true

I'll need to rework the commit to either use sort.Slices or to add exp/slices as a dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants