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

Get IP addresses type from Linode #233

Closed
wants to merge 1 commit into from
Closed

Conversation

Michkov
Copy link
Contributor

@Michkov Michkov commented Sep 23, 2024

Avoid auto-detection of private IP address - respect setting in Linode.
Needed to support testing Linode instances which are providing public IP addresses in private IP ranges.

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

Avoid auto-detection of private IP address - respect setting in Linode.
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 55.26%. Comparing base (708ee98) to head (8d38cab).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cloud/linode/instances.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
- Coverage   55.34%   55.26%   -0.09%     
==========================================
  Files          12       12              
  Lines        1881     1882       +1     
==========================================
- Hits         1041     1040       -1     
- Misses        696      697       +1     
- Partials      144      145       +1     

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

@rahulait
Copy link
Contributor

We had similar implementation in the past where we were making linode API call to get instance ip addresses for each instance (client.GetInstanceIPAddresses(ctx, instance.ID)) but that ended up in an escalation. If we try to get ip-address for each instance, then that would mean accounts which have large number of instances will keep on making those many additional calls to linode API every 15-20 secs when the cache expires. Hence we rely on one call (ListInstances) and build cache from the response.

@rahulait rahulait self-requested a review September 24, 2024 14:59
Copy link
Contributor

@rahulait rahulait left a comment

Choose a reason for hiding this comment

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

We can't make additional calls for each instance everytime we build the cache as it balloons up quickly.

@Michkov
Copy link
Contributor Author

Michkov commented Sep 25, 2024

Replaced by #235

@Michkov Michkov closed this Sep 25, 2024
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.

2 participants