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] : store subnet id in linodeVPC and remove GetVPC call #548

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

rahulait
Copy link
Contributor

What this PR does / why we need it:
This PR enables us to store subnet id in linodeVPC spec. This is useful as now we can rely on linodeVPC spec for subnet id than making a linode API call to get subnet id for the VPC.
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 24, 2024

Codecov Report

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

Project coverage is 63.95%. Comparing base (46f32f5) to head (289b4f6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
controller/linodemachine_controller_helpers.go 20.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
+ Coverage   63.78%   63.95%   +0.16%     
==========================================
  Files          79       79              
  Lines        5575     5573       -2     
==========================================
+ Hits         3556     3564       +8     
+ Misses       1738     1730       -8     
+ Partials      281      279       -2     

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

@rahulait rahulait force-pushed the remove-getvpc-call branch 3 times, most recently from cf72646 to 3ba174e Compare October 24, 2024 13:55
@@ -54,6 +53,9 @@ type VPCSubnetCreateOptions struct {
Label string `json:"label,omitempty"`
// +optional
IPv4 string `json:"ipv4,omitempty"`
// ID is subnet id for the subnet
// +optional
ID int `json:"id,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

question: would it make more sense to call this subnetID?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry to chime in on this late, I don't have a strong opinion here(and I think we break this other places as well) but for what it's worth subnet.subnetID is redundant but I'm fine with keeping it if that is the standard we have elsewhere, just wanted to call that out

komer3
komer3 previously approved these changes Oct 24, 2024
Copy link
Contributor

@komer3 komer3 left a comment

Choose a reason for hiding this comment

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

LGTM!

eljohnson92
eljohnson92 previously approved these changes Oct 24, 2024
AshleyDumaine
AshleyDumaine previously approved these changes Oct 24, 2024
@rahulait rahulait merged commit 647ea03 into main Oct 24, 2024
12 checks passed
@rahulait rahulait deleted the remove-getvpc-call branch October 24, 2024 19:23
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.

4 participants