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

🐛Fix conversion of IdentityRef converting between v1alpha4 and v1beta1 #1066

Merged
merged 3 commits into from
Nov 30, 2021

Conversation

mdbooth
Copy link
Contributor

@mdbooth mdbooth commented Nov 26, 2021

What this PR does / why we need it:
The most interesting parts of this PR are the new unit tests. The tests are little more than a 'do the fields line up' test, but they did highlight that we were missing conversion of IdentityRef.

I will be adding to these tests in #1030

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 #1065 #1060

@netlify
Copy link

netlify bot commented Nov 26, 2021

✔️ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

🔨 Explore the source changes: db5a9d2

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/61a4e1253a71b00007e5e279

😎 Browse the preview: https://deploy-preview-1066--kubernetes-sigs-cluster-api-openstack.netlify.app

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 26, 2021
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 26, 2021
Copy link
Contributor

@hidekazuna hidekazuna left a comment

Choose a reason for hiding this comment

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

Overall lgtm, some nits.

api/v1alpha3/conversion_test.go Outdated Show resolved Hide resolved
api/v1alpha4/conversion_test.go Outdated Show resolved Hide resolved
@tobiasgiese
Copy link
Member

/lgtm
good catch, thanks for the unit tests 👍🏻

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2021
@tobiasgiese
Copy link
Member

tobiasgiese commented Nov 29, 2021

@mdbooth what about #1060, shouldn't that also fit here?

@mdbooth
Copy link
Contributor Author

mdbooth commented Nov 29, 2021

@mdbooth what about #1060, shouldn't that also fit here?

Looks like it. Also I didn't realise we already had infrastructure for this! Those AWS tests are a whole lot more readable. I'll check out what they do.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 29, 2021
@tobiasgiese
Copy link
Member

+1 for the new conversion unit tests, this is really much more readable 👌🏻

@mdbooth
Copy link
Contributor Author

mdbooth commented Nov 29, 2021

Apart from more readable they're also significantly more thorough! They uncovered some missing pieces of CloudSecret<->IdentityRef conversion which I've hopefully rectified here.

@tobiasgiese
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2021
@tobiasgiese
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2021
@iamemilio
Copy link
Contributor

/lgtm
I love the fuzz tests

@jichenjc
Copy link
Contributor

/approve

thanks for the test cases :)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc, mdbooth

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 Nov 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 49e908c into kubernetes-sigs:main Nov 30, 2021
@mdbooth mdbooth mentioned this pull request Feb 7, 2022
@pierreprinetti pierreprinetti deleted the conversion-tests branch February 25, 2022 13:00
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

IdentityRef is not preserved converting between v1alpha4 and v1beta1
6 participants