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

[Fix] Update the failure setting logic in Linode Machine Controller #543

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

komer3
Copy link
Contributor

@komer3 komer3 commented Oct 15, 2024

Adding a condition to not set Failure for linodemachine if the error is transient. This makes sure that Machine resource state is not set to failed unless a non transient error occurs

Previously, if there was an err emitted by the reconciler we would set a failure for LinodeMachine object which was causing the Machine resource to be set to failed and stay like that even if the linodemachine eventually comes ready.

With the fix, we are not setting a failure if the emitted err is a transient error (meaning a temporary error which can change after re-queuing the request). We are now going to only set it if its a permanent error!

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

… is transient. This makes sure that Machine resource state is not set to failed unless a non transient error occurs
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 64.82%. Comparing base (90e9677) to head (f4fc2e2).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
controller/linodemachine_controller.go 0.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #543      +/-   ##
==========================================
- Coverage   64.91%   64.82%   -0.09%     
==========================================
  Files          79       79              
  Lines        4298     4299       +1     
==========================================
- Hits         2790     2787       -3     
- Misses       1239     1242       +3     
- Partials      269      270       +1     

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

@komer3 komer3 marked this pull request as ready for review October 16, 2024 17:58
amold1
amold1 previously approved these changes Oct 16, 2024
@komer3 komer3 merged commit 2c91eb4 into main Oct 16, 2024
11 of 13 checks passed
@komer3 komer3 deleted the fix-machine-fatalerr branch October 16, 2024 18:46
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.

4 participants