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

feat(spanner): add support of using emulator using autogenerated admin clients #2864

Closed
wants to merge 1 commit into from

Conversation

rahul2393
Copy link
Contributor

@rahul2393 rahul2393 commented Feb 6, 2024

Similar handwritten
hook in Go https://github.com/googleapis/google-cloud-go/blob/main/spanner/admin/database/apiv1/init.go

  • Verified that new proto chaneges won't overwrite the changes here.

@rahul2393 rahul2393 requested a review from a team as a code owner February 6, 2024 15:48
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Feb 6, 2024
Copy link

Warning: This pull request is touching the following templated files:

  • google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java
  • google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Feb 6, 2024
@@ -314,6 +318,20 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil

/** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
String hostAndPort = System.getenv(SPANNER_EMULATOR_HOST_ENV_VAR);
Copy link
Contributor

Choose a reason for hiding this comment

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

@olavloite has suggested not to add logic on autogenerated files since there is a chance of this file getting overwritten during the next autogenerated PRs.
In NodeJS, we are writing a function similar to Python which can return a new autogenerated admin client with the emulator host set.

Copy link
Contributor Author

@rahul2393 rahul2393 Feb 6, 2024

Choose a reason for hiding this comment

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

@arpan14
Copy link
Collaborator

arpan14 commented Feb 12, 2024

Closing this in favor of - #2878

@arpan14 arpan14 closed this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants