-
Notifications
You must be signed in to change notification settings - Fork 65
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
ccruntime: processCcRuntimeDeleteRequest split #415
ccruntime: processCcRuntimeDeleteRequest split #415
Conversation
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. Thanks @beraldoleal !
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.
It does look way better now, I noticed 2 little differences, not sure whether they are actually intended and important.
We are currently experiencing issues with finalizers hanging when deleting ccruntime. Initial debugging has pinpointed the problem to the processCcRuntimeDeleteRequest method. This method is large and has a cyclomatic complexity of 21. We should take this opportunity to use early returns to reduce nesting and simplify control flow. Additionally, this is moving the finalizer handling logic to its own method. This refactor should not change the current logic, only improve readability and maintainability. Related to confidential-containers#391. Signed-off-by: Beraldo Leal <[email protected]>
aa7b076
to
42aec49
Compare
Those were good catches. Thanks. Let me know if you are ok with the changes. |
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.
Thanks, now it seems to be doing the same thing to me except it's better readable now :-)
@wainersm do you mind reviewing again, since I force pushed with some changes? |
@stevenhorsman @fidencio can one of you trigger the e2e CI. Looks like it's stuck. |
You need the |
Oh ok.. |
Merging this as CI passed successfully. |
We are currently experiencing issues with finalizers hanging when deleting ccruntime. Initial debugging has pinpointed the problem to the processCcRuntimeDeleteRequest method.
This method is large and has a cyclomatic complexity of 21. I'm taking this opportunity to use early returns to reduce nesting and simplify control flow. Additionally, this is moving the finalizer handling logic to its own method.
This refactor should not change the current logic, only improve readability and maintainability.
Related to #391.