Skip to content

[slice] Remove Slice finalizer, once all Pods in the Workload have gracefully terminated. #517

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

Merged
merged 3 commits into from
Jul 31, 2025

Conversation

mbobrovskyi
Copy link
Collaborator

Fixes / Features

  • Remove Slice finalizer, once all Pods in the Workload have gracefully terminated.

@mbobrovskyi
Copy link
Collaborator Author

cc: @IrvingMg @PBundyra

@mbobrovskyi mbobrovskyi changed the title Remove Slice finalizer, once all Pods in the Workload have gracefully terminated. [slice] Remove Slice finalizer, once all Pods in the Workload have gracefully terminated. Jul 3, 2025
@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 3 times, most recently from 992a005 to 04c024c Compare July 3, 2025 08:57
Copy link
Collaborator

@IrvingMg IrvingMg left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just a couple of nits.

@mbobrovskyi mbobrovskyi requested a review from IrvingMg July 3, 2025 16:07
@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 3 times, most recently from e215bda to bedab10 Compare July 4, 2025 10:44
@IrvingMg
Copy link
Collaborator

IrvingMg commented Jul 4, 2025

LGTM

cc: @PBundyra

@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 2 times, most recently from e038b46 to d3c3bd0 Compare July 15, 2025 08:50
@mbobrovskyi mbobrovskyi requested a review from gabesaba July 15, 2025 08:51
@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 2 times, most recently from f42798a to f8fd426 Compare July 16, 2025 08:55
@mbobrovskyi
Copy link
Collaborator Author

@gabesaba, I've addressed all your comments. Could you please take a look?

@pajakd
Copy link
Collaborator

pajakd commented Jul 29, 2025

Overall LGTM, left a few more small comments.

@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 2 times, most recently from 4c60461 to 6535835 Compare July 30, 2025 08:47
@mbobrovskyi mbobrovskyi requested review from pajakd and gabesaba July 30, 2025 08:47
@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 2 times, most recently from 556b5b2 to 81e8c64 Compare July 30, 2025 15:20
@mbobrovskyi mbobrovskyi requested a review from gabesaba July 30, 2025 15:21
@mbobrovskyi mbobrovskyi force-pushed the slice/finalize branch 2 times, most recently from 4377f2c to 24c88ba Compare July 31, 2025 07:20
Comment on lines 480 to 482
finalize, _ := shouldFinalize(wl)
return !finalize && validateRelevantWorkload(wl) == nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the intention of this logic? Could you add a comment please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator Author

@mbobrovskyi mbobrovskyi Jul 31, 2025

Choose a reason for hiding this comment

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

But maybe the Predicate is no longer needed — we check this in the Reconcile() function. WDYT?

Copy link
Collaborator

@gabesaba gabesaba Jul 31, 2025

Choose a reason for hiding this comment

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

What if we just simplify the filter, and return true always - for each event type (besides generic)? It looks like the handler itself will handle any workload just fine. This will make it easier to debug too.

Copy link
Collaborator Author

@mbobrovskyi mbobrovskyi Jul 31, 2025

Choose a reason for hiding this comment

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

But it’s the same whether we use a predicate or just return true, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I’ve reverted the changes related to the Predicate. But if you think we still need to return true, I can revert it again.

Copy link
Collaborator

@gabesaba gabesaba left a comment

Choose a reason for hiding this comment

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

lgtm, this looks great. Thank you for all the revisions :)

@gabesaba gabesaba merged commit 5ff57e1 into slice-main Jul 31, 2025
16 of 17 checks passed
@gabesaba gabesaba deleted the slice/finalize branch July 31, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants