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

🐛 Carry over metadata.uid at ServerSidePatchHelper #6742

Merged

Conversation

chrischdi
Copy link
Member

What this PR does / why we need it:

This prevents the race condition of running server side apply on an object which got:

  • deleted in the meantime
  • recreated in the meantime

and the topology controller won't apply using outdated information anymore.

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 #6741

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 26, 2022
@chrischdi
Copy link
Member Author

/test all

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 26, 2022
@chrischdi
Copy link
Member Author

/test all

@sbueringer
Copy link
Member

/test pull-cluster-api-e2e-full-main

@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 Jun 27, 2022
@sbueringer sbueringer added area/topology and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jun 27, 2022
@chrischdi chrischdi changed the title 🐛 [wip] Carry over metadata.uid at ServerSidePatchHelper 🐛 Carry over metadata.uid at ServerSidePatchHelper Jun 27, 2022
@chrischdi chrischdi force-pushed the pr-ssa-prevent-orphaned-creation branch from 4775d1e to b54df37 Compare June 27, 2022 16:28
@chrischdi
Copy link
Member Author

/test all

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

lgtm one nit
except if we want to move it to desired_state, but for me it's fine where it is

@chrischdi
Copy link
Member Author

lgtm one nit except if we want to move it to desired_state, but for me it's fine where it is

The issue with desired_state is: we don't know if we want to update (in-place -> keep uid) or recreate (template rotation -> no uid) the object.

@sbueringer
Copy link
Member

lgtm one nit except if we want to move it to desired_state, but for me it's fine where it is

The issue with desired_state is: we don't know if we want to update (in-place -> keep uid) or recreate (template rotation -> no uid) the object.

Ah good point / reason to keep it as is

@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 Jun 28, 2022
@sbueringer
Copy link
Member

/lgtm
/approve

/cherry-pick release-1.2

@k8s-infra-cherrypick-robot

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

In response to this:

/lgtm
/approve

/cherry-pick release-1.2

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.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 29, 2022
@sbueringer
Copy link
Member

/hold

Let's see if it is a new flake
/test pull-cluster-api-test-main

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 29, 2022
@sbueringer
Copy link
Member

/test pull-cluster-api-test-main

@chrischdi chrischdi force-pushed the pr-ssa-prevent-orphaned-creation branch from b54df37 to b93b125 Compare June 29, 2022 16:17
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 29, 2022
@chrischdi
Copy link
Member Author

We'll have to wait for #6773 to merge first. Afterwards this one should turn green.

@chrischdi chrischdi closed this Jun 29, 2022
@chrischdi chrischdi reopened this Jun 29, 2022
@sbueringer
Copy link
Member

As Christian investigated: the test failure only occur with this PR but it is fixed in combination with #6773.

We will merge #6773 first and then re-run the tests and then merge #6742

@sbueringer sbueringer force-pushed the pr-ssa-prevent-orphaned-creation branch from b93b125 to f73ea3e Compare June 29, 2022 18:55
@sbueringer
Copy link
Member

Rebased as #6773 has been merged

This prevents the race condition of running server side apply on an object which got:

* deleted in the meantime
* recreated in the meantime

and because of that the reconciler may use outdated information.
@sbueringer sbueringer force-pushed the pr-ssa-prevent-orphaned-creation branch from f73ea3e to 524d990 Compare June 29, 2022 18:56
@sbueringer
Copy link
Member

/lgtm

But let's keep the hold to run the tests a few times to make sure we're not introducing flakes

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

/test pull-cluster-api-test-main

4 similar comments
@sbueringer
Copy link
Member

/test pull-cluster-api-test-main

@sbueringer
Copy link
Member

/test pull-cluster-api-test-main

@sbueringer
Copy link
Member

/test pull-cluster-api-test-main

@sbueringer
Copy link
Member

/test pull-cluster-api-test-main

Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

/lgtm

@sbueringer
Copy link
Member

/test pull-cluster-api-test-main

@sbueringer
Copy link
Member

Looks pretty stable

/approve

@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 Jun 30, 2022
@sbueringer
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2022
@k8s-ci-robot k8s-ci-robot merged commit 89da95f into kubernetes-sigs:main Jun 30, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.3 milestone Jun 30, 2022
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #6784

In response to this:

/lgtm
/approve

/cherry-pick release-1.2

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 killianmuldoon added the area/clusterclass Issues or PRs related to clusterclass label May 4, 2023
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/clusterclass Issues or PRs related to clusterclass 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
7 participants