Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion sdks/java/bom/gcp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ apply from: '../common.gradle'

dependencies {
api platform(project(":sdks:java:bom"))
api platform(project.library.java.google_cloud_platform_libraries_bom)
api platform(project.library.java.google_cloud_spanner_bom)
api platform(project.library.java.google_cloud_platform_libraries_bom) {
// TODO(https://github.com/apache/beam/issues/37328) remove exclude and google_cloud_spanner_bom after upstream and/or tests fixed
exclude group: "com.google.cloud", module: "google-cloud-spanner"
exclude group: "com.google.api.grpc", module: "proto-google-cloud-spanner-v1"
exclude group: "com.google.api.grpc", module: "proto-google-cloud-spanner-admin-instance-v1"
exclude group: "com.google.api.grpc", module: "proto-google-cloud-spanner-admin-database-v1"
exclude group: "com.google.api.grpc", module: "grpc-google-cloud-spanner-v1"
exclude group: "com.google.api.grpc", module: "grpc-google-cloud-spanner-admin-instance-v1"
exclude group: "com.google.api.grpc", module: "grpc-google-cloud-spanner-admin-database-v1"
}
constraints {
api project.library.java.guava
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2101,9 +2101,10 @@ private static Dialect getDialect(SpannerConfig spannerConfig, PipelineOptions p
// Allow passing the credential from pipeline options to the getDialect() call.
SpannerConfig spannerConfigWithCredential =
buildSpannerConfigWithCredential(spannerConfig, pipelineOptions);
DatabaseClient databaseClient =
SpannerAccessor.getOrCreate(spannerConfigWithCredential).getDatabaseClient();
return databaseClient.getDialect();
try (SpannerAccessor sa = SpannerAccessor.getOrCreate(spannerConfigWithCredential)) {
DatabaseClient databaseClient = sa.getDatabaseClient();
return databaseClient.getDialect();
}
}

/**
Expand Down
Loading