diff --git a/README.md b/README.md index 195f6971b4..9610953c49 100644 --- a/README.md +++ b/README.md @@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.24.0') +implementation platform('com.google.cloud:libraries-bom:26.25.0') implementation 'com.google.cloud:google-cloud-bigtable' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigtable:2.27.4' +implementation 'com.google.cloud:google-cloud-bigtable:2.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.27.4" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.28.0" ``` @@ -609,7 +609,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.27.4 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.28.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 1c1895bb28..6f0bcd731e 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -350,6 +350,7 @@ org.apache.maven.plugins maven-failsafe-plugin + false 1 none @@ -556,6 +557,43 @@ + + bigtable-traffic-director-cfe-it + + + + maven-failsafe-plugin + + + traffic-director-cfe-it + + integration-test + verify + + + false + + + cloud + ${bigtable.cfe-data-endpoint} + ${bigtable.cfe-admin-endpoint} + ${bigtable.enable-grpc-logs} + ${project.build.directory}/test-grpc-logs/traffic-director-cfe-it + REQUIRE_TRAFFIC_DIRECTOR_CFE + + + com.google.cloud.bigtable.**.it.*IT + + ${project.build.directory}/failsafe-reports/failsafe-summary-traffic-director-cfe-it.xml + ${project.build.directory}/failsafe-reports/traffic-director-cfe-it + + + + + + + + bigtable-directpath-ipv4only-it diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java index fd363099d9..025e1238e9 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java @@ -41,6 +41,7 @@ public abstract class AbstractTestEnv { public enum ConnectionMode { DEFAULT, REQUIRE_CFE, + REQUIRE_TRAFFIC_DIRECTOR_CFE, REQUIRE_DIRECT_PATH, REQUIRE_DIRECT_PATH_IPV4 } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java index ba0fda8b2c..287ad2a0fb 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java @@ -127,6 +127,7 @@ private CloudEnv( setupRemoteAddrInterceptor(dataSettings.stubSettings()); configureUserAgent(dataSettings.stubSettings()); + configureDirectPath(dataSettings.stubSettings()); this.tableAdminSettings = BigtableTableAdminSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId); @@ -159,6 +160,7 @@ private void setupRemoteAddrInterceptor(StubSettings.Builder stubSettings) { buildRemoteAddrInterceptor("DirectPath IPv4", Predicates.or(DIRECT_PATH_IPV4_MATCHER)); break; case REQUIRE_CFE: + case REQUIRE_TRAFFIC_DIRECTOR_CFE: interceptor = buildRemoteAddrInterceptor( "a CFE ip", @@ -239,6 +241,7 @@ private void configureUserAgent(EnhancedBigtableStubSettings.Builder stubSetting // nothing special break; case REQUIRE_CFE: + case REQUIRE_TRAFFIC_DIRECTOR_CFE: parts.add("bigtable-directpath-disable"); break; case REQUIRE_DIRECT_PATH: @@ -265,6 +268,29 @@ private void configureUserAgent(EnhancedBigtableStubSettings.Builder stubSetting stubSettings.setHeaderProvider(FixedHeaderProvider.create(newHeaders)); } + private void configureDirectPath(EnhancedBigtableStubSettings.Builder stubSettings) { + InstantiatingGrpcChannelProvider transportChannelProvider = + (InstantiatingGrpcChannelProvider) stubSettings.getTransportChannelProvider(); + + switch (getConnectionMode()) { + case REQUIRE_DIRECT_PATH: + case REQUIRE_DIRECT_PATH_IPV4: + case REQUIRE_TRAFFIC_DIRECTOR_CFE: + transportChannelProvider = + transportChannelProvider + .toBuilder() + .setAttemptDirectPath(true) + .setAttemptDirectPathXds() + .build(); + break; + case DEFAULT: + case REQUIRE_CFE: + default: + // noop + } + stubSettings.setTransportChannelProvider(transportChannelProvider); + } + @Override void start() throws IOException { dataClient = BigtableDataClient.create(dataSettings.build());