Skip to content

Refactor reconciliation logic in Linode controllers to handle deletion cases gracefully#709

Merged
komer3 merged 3 commits intomainfrom
oop-deletion-regression
Mar 19, 2025
Merged

Refactor reconciliation logic in Linode controllers to handle deletion cases gracefully#709
komer3 merged 3 commits intomainfrom
oop-deletion-regression

Conversation

@komer3
Copy link
Contributor

@komer3 komer3 commented Mar 19, 2025

Updated the Reconcile methods in LinodeFirewall, LinodePlacementGroup, and LinodeVPC controllers to allow for successful reconciliation when the associated cluster is not found during deletion. Added logging to indicate when a cluster is not found but the resource is being deleted, ensuring that the deletion process continues smoothly. Additionally, modified the pause logic to only check for paused conditions if the resource is not being deleted or if the cluster still exists.

What this PR does / why we need it:

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 #

Special notes for your reviewer:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

…n cases gracefully

Updated the Reconcile methods in LinodeFirewall, LinodePlacementGroup, and LinodeVPC controllers to allow for successful reconciliation when the associated cluster is not found during deletion. Added logging to indicate when a cluster is not found but the resource is being deleted, ensuring that the deletion process continues smoothly. Additionally, modified the pause logic to only check for paused conditions if the resource is not being deleted or if the cluster still exists.
@codecov
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 2.04082% with 48 lines in your changes missing coverage. Please review.

Project coverage is 65.51%. Comparing base (2522ab5) to head (6fcbef5).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/linodefirewall_controller.go 0.00% 16 Missing ⚠️
...rnal/controller/linodeplacementgroup_controller.go 0.00% 16 Missing ⚠️
internal/controller/linodevpc_controller.go 0.00% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #709      +/-   ##
==========================================
- Coverage   65.66%   65.51%   -0.15%     
==========================================
  Files          70       70              
  Lines        6583     6598      +15     
==========================================
  Hits         4323     4323              
- Misses       2007     2022      +15     
  Partials      253      253              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@komer3 komer3 added the bugfix label Mar 19, 2025
Copy link
Collaborator

@AshleyDumaine AshleyDumaine left a comment

Choose a reason for hiding this comment

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

LGTM

@komer3 komer3 merged commit 1e0a30f into main Mar 19, 2025
12 of 14 checks passed
@komer3 komer3 deleted the oop-deletion-regression branch March 19, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants