Skip to content

🐛 fix: oidc test failure #5352

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

Merged

Conversation

richardcase
Copy link
Member

@richardcase richardcase commented Feb 14, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

The OIDC tests use httpTest.NewTLSServer and uses a hard coded certificate (see go src) and we rely on the hash of this certificate in the tests (here) as part of gomock assertions.

The certificate changes with every new go version and the image used by the Prow job has been changed (see PR) and now uses Go v1.22.12, so the certificates no longer match and the test fails

This updates the oidc test to use our own hard coded certificate with corresponding thumbprints.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #5351

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Fix OIDC unit test after test runner go version change.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 14, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 14, 2025
@richardcase richardcase changed the title 🐛 fix: fix oidc test failure 🐛 fix: oidc test failure Feb 14, 2025
@richardcase richardcase changed the title 🐛 fix: oidc test failure WIP: 🐛 fix: oidc test failure Feb 14, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 14, 2025
@richardcase
Copy link
Member Author

Moving back to WIP as it needs some more changes.

@richardcase richardcase force-pushed the 5351_oidc_test_failure branch from 050bd2a to 7ccabe0 Compare February 14, 2025 14:49
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 14, 2025
@richardcase richardcase changed the title WIP: 🐛 fix: oidc test failure 🐛 fix: oidc test failure Feb 14, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 14, 2025
This updates the oidc test to fix the cert thumbprints from the
server as these change with every go version when using
httptest.NewTLSServer.

Signed-off-by: Richard Case <[email protected]>
Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @richardcase

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 14, 2025
@richardcase
Copy link
Member Author

/approved

@richardcase
Copy link
Member Author

/cherrypick release-2.7
/cherrypick release-2.6

@k8s-infra-cherrypick-robot

@richardcase: once the present PR merges, I will cherry-pick it on top of release-2.6, release-2.7 in new PRs and assign them to you.

In response to this:

/cherrypick release-2.7
/cherrypick release-2.6

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-sigs/prow repository.

@damdo
Copy link
Member

damdo commented Feb 14, 2025

@richardcase typo in the /approve command

@richardcase
Copy link
Member Author

Thanks @damdo

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2025
@k8s-ci-robot k8s-ci-robot merged commit 8cc4beb into kubernetes-sigs:main Feb 14, 2025
17 checks passed
@k8s-infra-cherrypick-robot

@richardcase: new pull request created: #5353

In response to this:

/cherrypick release-2.7
/cherrypick release-2.6

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@richardcase: new pull request created: #5354

In response to this:

/cherrypick release-2.7
/cherrypick release-2.6

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-sigs/prow repository.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority 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.

Tests are failing at TestOIDCReconcile
4 participants