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

🌱 Add test for ownerReference apiVersion update #9269

Merged

Conversation

killianmuldoon
Copy link
Contributor

Add an end-to-end test to ensure that the apiVersions of ownerReferences are updated to the current version of the CAPI APIs.

Fixes #7224

/area e2e-testing

Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@k8s-ci-robot k8s-ci-robot added area/e2e-testing Issues or PRs related to e2e testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 22, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 22, 2023
@@ -51,17 +49,6 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() {
WorkloadKubernetesVersion: "v1.23.17",
MgmtFlavor: "topology",
WorkloadFlavor: "",
// This check ensures that ownerReference apiVersions are updated for all types after the upgrade.
PostUpgrade: func(proxy framework.ClusterProxy, namespace, clusterName string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think these tests make sense any more as there's no longer any APIVersion upgrades in our clusterctl_upgrade tests.

This is something we should make sure is part of the introduction of v1beta1 or whatever the next APIVersion is.

Copy link
Member

Choose a reason for hiding this comment

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

+1 except we already have v1beta1 :D

Copy link
Member

Choose a reason for hiding this comment

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

Do you think we still need it now that we have ValidateOwnerReferencesOnUpdate in quickstart?

@killianmuldoon
Copy link
Contributor Author

/retest

@sbueringer
Copy link
Member

Really nice one!!

/approve

/assign @fabriziopandini @chrischdi

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 Aug 23, 2023
@sbueringer
Copy link
Member

Fine to cherry-pick from my side if we want to as it falls under

- Improvements to the test framework

@killianmuldoon
Copy link
Contributor Author

/cherry-pick release-1.5

@k8s-infra-cherrypick-robot

@killianmuldoon: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.5

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.

@sbueringer
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 Aug 24, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9ccc5b72c28a4e3a1e8ff2f9be1b109c60cf3fa9

@killianmuldoon
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit 3b55934 into kubernetes-sigs:main Aug 24, 2023
24 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Aug 24, 2023
@k8s-infra-cherrypick-robot

@killianmuldoon: new pull request created: #9295

In response to this:

/cherry-pick release-1.5

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.

@killianmuldoon
Copy link
Contributor Author

/cherry-pick release-1.5

@k8s-infra-cherrypick-robot

@killianmuldoon: new pull request could not be created: failed to create pull request against kubernetes-sigs/cluster-api#release-1.5 from head k8s-infra-cherrypick-robot:cherry-pick-9269-to-release-1.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for k8s-infra-cherrypick-robot:cherry-pick-9269-to-release-1.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-1.5

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.

@killianmuldoon
Copy link
Contributor Author

killianmuldoon commented Aug 24, 2023

We have coverage for this case in release-1.5, but I wanted to backport the util. Will do this in a seperate PR instead.

Strike that - the cherry-pick worked, but apparently too well 😆

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/e2e-testing Issues or PRs related to e2e testing 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.

CAPI controllers should keep ownerRefs on the current apiVersion
6 participants