-
Notifications
You must be signed in to change notification settings - Fork 4
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 deletion patch error #163
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lubedacht
requested review from
piepmatz,
gfariasalves-ionos,
mcbenjemaa,
wikkyk and
jriedel-ionos
as code owners
June 21, 2024 12:08
jriedel-ionos
requested changes
Jun 25, 2024
mcbenjemaa
previously approved these changes
Jun 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm aware of this
Quality Gate passedIssues Measures |
jriedel-ionos
approved these changes
Jun 25, 2024
jriedel-ionos
added a commit
that referenced
this pull request
Jun 26, 2024
Co-authored-by: Jonas Riedel <138458199+jriedel-ionos@users.noreply.github.com>
jriedel-ionos
added a commit
that referenced
this pull request
Jun 26, 2024
**What is the purpose of this pull request/Why do we need it?** Cherry pick of #163 for release 0.2.1 Co-authored-by: lubedacht <132355999+lubedacht@users.noreply.github.com>
Mattes83
pushed a commit
to Mattes83/cluster-api-provider-ionoscloud
that referenced
this pull request
Jun 26, 2024
Co-authored-by: Jonas Riedel <138458199+jriedel-ionos@users.noreply.github.com>
Mattes83
pushed a commit
to Mattes83/cluster-api-provider-ionoscloud
that referenced
this pull request
Jun 27, 2024
Co-authored-by: Jonas Riedel <138458199+jriedel-ionos@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request/Why do we need it?
This PR fixes a bug that occurs during the deletion of machines.
The patch helper will always calculate a diff and patch the resource and status accordingly. At the time of the deletion when removing the finalizer, we need to make sure, that there is no more change in the status anymore. We are always checking for requests at the beginning of a reconcile function. Those requests are stored in the status and upon completion, those will be removed from the status. The machine controller will patch the status in the end.
The order of the patch helper is
When the finalizer is removed and the object patch completed, the resource is gone. The next patch request against the status will therefore fail with a
NotFound
error.Description of changes:
Adds a check to the
checkRequestStates
function that will patch the object and requeue before proceeding with the deletion logic.Checklist: