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

[improvement] : add new phase to check if we can use cloudinit or not to reduce API calls #522

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

rahulait
Copy link
Contributor

@rahulait rahulait commented Sep 26, 2024

What this PR does / why we need it:
Previously, we were doing GET for image and region during every reconcileCreate(). If there is an error during reconcileCreate(), the request is requeued and we again do same GET calls during next reconcile as well. We found that for a 100 node cluster, we were making 1200+ GET calls for regions and 1200+ GET calls for images. This change will help in reducing that number down to 1 call per machine.

When provisioning 100 node cluster with older changes:

cat logs/old/concurrency10-1cluster-100node1.txt | grep "GET  /v4beta/regions" | wc -l
1252
cat logs/old/concurrency10-1cluster-100node1.txt | grep "GET  /v4beta/images" | wc -l
1091

When provisioning 100 node cluster with newer changes:

cat logs/new/concurrency10-1cluster-100node1.txt | grep "GET  /v4beta/regions" | wc -l
103
cat logs/new/concurrency10-1cluster-100node1.txt | grep "GET  /v4beta/images" | wc -l
103

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

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.

Project coverage is 65.40%. Comparing base (f828b25) to head (3f53322).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
controller/linodemachine_controller.go 72.00% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #522      +/-   ##
==========================================
- Coverage   65.50%   65.40%   -0.10%     
==========================================
  Files          78       78              
  Lines        4090     4102      +12     
==========================================
+ Hits         2679     2683       +4     
- Misses       1167     1172       +5     
- Partials      244      247       +3     

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

@rahulait rahulait marked this pull request as ready for review October 1, 2024 06:02
Copy link
Member

@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

@rahulait rahulait merged commit c9b73ad into main Oct 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants