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

[GCP] Fix for private service connect bug #500

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

smcclure20
Copy link
Collaborator

Resolves #495

Root issues:

  • Some of the original code was just simply wrong (changing request fields after sending the request)
  • Google service connections require Global IPs and Global Forwarding rules

Future issues:

  • There is a lot of repeated code here - we can probably clean it up
  • This and other resources should take advantage of the fact that the orchestrator can now give variable-sized address spaces

@smcclure20 smcclure20 requested a review from a team as a code owner November 15, 2024 02:22
Copy link

github-actions bot commented Nov 15, 2024

Unit Test Results

323 tests  ±0   323 ✅ ±0   5s ⏱️ +3s
 50 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 96107cf. ± Comparison against base commit 3ac4011.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 3, 2024

55.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 55.1 %
  • main branch coverage: 0 %
  • diff coverage: 55.1 %

The coverage result does not include the functional test results.

@smcclure20 smcclure20 force-pushed the smcclure20/gcp-psc-fix branch from 97b6027 to c262a03 Compare December 4, 2024 00:42
Copy link

github-actions bot commented Dec 4, 2024

55.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 55.1 %
  • main branch coverage: 0 %
  • diff coverage: 55.1 %

The coverage result does not include the functional test results.

Copy link
Collaborator

@praveingk praveingk left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link

55.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 55.1 %
  • main branch coverage: 0 %
  • diff coverage: 55.1 %

The coverage result does not include the functional test results.

…etwork info to use global clients and test non-google services

Signed-off-by: Sarah McClure <[email protected]>
Signed-off-by: Sarah McClure <[email protected]>
Signed-off-by: Sarah McClure <[email protected]>
@smcclure20 smcclure20 force-pushed the smcclure20/gcp-psc-fix branch from 53099ee to 96107cf Compare December 14, 2024 01:43
@smcclure20 smcclure20 deployed to functional-tests December 14, 2024 01:43 — with GitHub Actions Active
Copy link

55.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 55.1 %
  • main branch coverage: 0 %
  • diff coverage: 55.1 %

The coverage result does not include the functional test results.

@smcclure20 smcclure20 requested a review from praveingk December 20, 2024 17:52
@smcclure20 smcclure20 mentioned this pull request Jan 17, 2025
Copy link
Collaborator

@divega divega left a comment

Choose a reason for hiding this comment

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

Just a couple of newbie questions.

@@ -202,9 +226,15 @@ func (c *GCPClients) Close() {
if c.addressesClient != nil {
c.addressesClient.Close()
}
if c.globalAddressesClient != nil {
c.globalAddressesClient.Close()
Copy link
Collaborator

Choose a reason for hiding this comment

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

For my education, are these clients functional after calling Close? E.g., do they provide methods to re-open or do they automatically re-establish anything needed for operation if you make any subsequent call?

Otherwise, should we be setting fields to nil explicitly, to allow for a functional client to be populated again via GetOrCreate methods?

Perhaps it's ok if we only use Close when we are shutting down the serice or going to recycle the entire struct?

}

return &resourceInfo{Region: region, NumAdditionalAddressSpaces: r.getNumberAddressSpacesRequired(), ResourceType: privateServiceConnectTypeName, Name: resource.Name}, nil
}

// Get the subnet requirements for a private service connect attachment
func (r *privateServiceHandler) getNumberAddressSpacesRequired() int {
return 0
return 1 // Only used for GCP services (TODO: Change this to depend on that)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we create an issue to track this in more detail, or are we ok with tracking with TODOs?

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.

[GCP] Failed to create private service resource
3 participants