Skip to content

fix(pubsub): respect gRPC dial option when PUBSUB_EMULATOR_HOST is set#10040

Merged
hongalex merged 6 commits intogoogleapis:mainfrom
toga4:pubsub-emulator-grpc-dial-option
May 6, 2024
Merged

fix(pubsub): respect gRPC dial option when PUBSUB_EMULATOR_HOST is set#10040
hongalex merged 6 commits intogoogleapis:mainfrom
toga4:pubsub-emulator-grpc-dial-option

Conversation

@toga4
Copy link
Contributor

@toga4 toga4 commented Apr 25, 2024

Fixes #10039

This implementation was based on the following implementation of Spanner Client.

// Append emulator options if SPANNER_EMULATOR_HOST has been set.
if emulatorAddr := os.Getenv("SPANNER_EMULATOR_HOST"); emulatorAddr != "" {
emulatorOpts := []option.ClientOption{
option.WithEndpoint(emulatorAddr),
option.WithGRPCDialOption(grpc.WithInsecure()),
option.WithoutAuthentication(),
internaloption.SkipDialSettingsValidation(),
}
opts = append(emulatorOpts, opts...)
}

@toga4 toga4 requested a review from shollyman as a code owner April 25, 2024 05:31
@toga4 toga4 requested review from a team April 25, 2024 05:31
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Apr 25, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 30, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 30, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@hongalex hongalex enabled auto-merge (squash) May 3, 2024 18:47
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 3, 2024
@hongalex hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 6, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 6, 2024
@hongalex hongalex merged commit 95bf6b2 into googleapis:main May 6, 2024
@toga4 toga4 deleted the pubsub-emulator-grpc-dial-option branch May 6, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

3 participants