-
Notifications
You must be signed in to change notification settings - Fork 20
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] handle case where instance already exists #563
Conversation
4205c90
to
f1eb5ed
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #563 +/- ##
==========================================
- Coverage 64.84% 64.84% -0.01%
==========================================
Files 79 79
Lines 5664 5683 +19
==========================================
+ Hits 3673 3685 +12
- Misses 1718 1723 +5
- Partials 273 275 +2 ☔ View full report in Codecov by Sentry. |
f8d18f9
to
3812bb9
Compare
a44e517
to
2e94207
Compare
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
b0e3b28
to
4944970
Compare
What this PR does / why we need it:
If create instance call fails due to context timeout error, instance gets provisioned on the linode side but CAPL thinks instance is still not created. It keeps on retrying and ends up hitting [400 label must be unique] error as it cannot provision another instance with same name. This results in CAPL continuously retrying to create the instance and ending up hitting rate-limits. This PR fixes the issue by doing a GET if instance already exists and using it during next reconciles.
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: