mutianf commented on code in PR #24015:
URL: https://github.com/apache/beam/pull/24015#discussion_r1115894318
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfigTranslator.java:
##########
@@ -117,22 +119,26 @@ private static BigtableDataSettings.Builder
buildBigtableDataSettings(
dataBuilder.setAppProfileId(Objects.requireNonNull(config.getAppProfileId().get()));
}
- if (((GcpOptions) pipelineOptions).getGcpCredential() != null) {
- dataBuilder
- .stubSettings()
- .setCredentialsProvider(
- FixedCredentialsProvider.create(((GcpOptions)
pipelineOptions).getGcpCredential()));
- }
-
- if (config.getCredentialFactory() != null) {
- CredentialFactory credentialFactory = config.getCredentialFactory();
- try {
+ // Skip resetting the credentials if it's connected to an emulator
+ if (!emulator) {
Review Comment:
This is still covered by `testUsingPipelineOptionsCredential` and
`testUsingCredentialsFromBigtableOptions` in `BigtableConfigTranslatorTest` to
make sure the credentials are updated correctly. The emulator test case is
tested by the sql tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]