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 MachineFinalizer during machine computation #8463

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

cahillsf
Copy link
Member

@cahillsf cahillsf commented Apr 3, 2023

What this PR does / why we need it:
This PR adds the MachineFinalizer during calculation of the Machine object so the finalizer is set on object creation.

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 3, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @cahillsf. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 3, 2023
@killianmuldoon
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 4, 2023
@cahillsf cahillsf marked this pull request as draft April 4, 2023 12:57
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 4, 2023
@cahillsf cahillsf marked this pull request as ready for review April 4, 2023 22:59
@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 Apr 4, 2023
@cahillsf
Copy link
Member Author

cahillsf commented Apr 4, 2023

/retest-required

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.

Looking into this more, it looks like the finalizer is only owned by the capi-machineset SSA manager. Because we dont re-add the finalizer in the machine controller, if the finalizer already exists, it looks like that finalizer is not co-owned.

Also, since we dont use SSA when dropping the finalizers (we re-write the full list) I think that allows it to drop the finalizer without any ownership problems.

@cahillsf cahillsf force-pushed the cahillsf/dev3 branch 2 times, most recently from 4adef16 to cba1d28 Compare April 6, 2023 13:17
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/area machineset

@k8s-ci-robot k8s-ci-robot added the area/machineset Issues or PRs related to machinesets label May 17, 2023
@fabriziopandini
Copy link
Member

@ykakarap @sbueringer when you have some time, can you make another pass to this PR?

This seems a nice improvement, and I think we can start getting this merged while deferring the refactoring of the test suggested in #8463 (comment) to a follow-up PR....

@sbueringer
Copy link
Member

Is in my backlog somewhere

@ykakarap
Copy link
Contributor

I am good with doing the test refactor in a follow-up PR. The rest of the PR is good to go.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 30, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b4abb738e08ded7fcefe286c4bec9364afc3ab2a

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 28, 2023
@enxebre
Copy link
Member

enxebre commented Jun 28, 2023

@cahillsf are you planning to revive this?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 28, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 28, 2023
@cahillsf
Copy link
Member Author

@enxebre sure thing, had a lgtm label but this never got an approved label. now on rebase I have failing tests that i would need to investigate further. happy to do so if there is still interest here

@sbueringer
Copy link
Member

sbueringer commented Jun 29, 2023

Sorry for the slow response. Just have a neverending backlog and then lost a bit track of this PR.

With the suggested fix, tests should work and otherwise the PR looks good to me.

Not sure about #8172 (comment)

@cahillsf
Copy link
Member Author

thanks @sbueringer! all tests are now passing when you have a chance to take another look

@sbueringer
Copy link
Member

thanks @sbueringer! all tests are now passing when you have a chance to take another look

Thx, change is fine. Please run make lint-fix for the formatting issues reported by golangci-lint + squash the commits.

@sbueringer
Copy link
Member

Sorry
/hold
I have to think about the underlying issue some more. Maybe I made a mistake and we only have that issue in CAPV.

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

@sbueringer
Copy link
Member

sbueringer commented Jun 30, 2023

We decided to move forward with this change. More context here: #8172 (comment)

@cahillsf sorry again for the delay in getting this reviewed.

/lgtm
/approve
/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, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5669cbbeab1a84ffea670ce4b7ed59db59689fde

@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, 2023
@k8s-ci-robot k8s-ci-robot merged commit 23e5d42 into kubernetes-sigs:main Jun 30, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 30, 2023
@cahillsf cahillsf deleted the cahillsf/dev3 branch June 30, 2023 13:01
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/machineset Issues or PRs related to machinesets 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resources are orphaned when MachineDeployment/MachineSet get deleted
8 participants