diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index de8fdd873c..2ebfa916e7 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.25.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.27.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index c5900b44d9..865ab12d32 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.25.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.27.0" } env_vars: { diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f45ee0eac..63031bdecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [3.18.0](https://github.com/googleapis/java-firestore/compare/v3.17.1...v3.18.0) (2024-03-04) + + +### Features + +* `Instant` support ([#1586](https://github.com/googleapis/java-firestore/issues/1586)) ([77a9bfc](https://github.com/googleapis/java-firestore/commit/77a9bfc9c501eeb10ee97f91b0b0b97e92f2c71d)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.37.0 ([#1597](https://github.com/googleapis/java-firestore/issues/1597)) ([7574dfd](https://github.com/googleapis/java-firestore/commit/7574dfd1c73c73c3de7cf3235e55ed20190991b8)) +* Only override built-in retry settings when the customer provides them. ([#1588](https://github.com/googleapis/java-firestore/issues/1588)) ([103c37a](https://github.com/googleapis/java-firestore/commit/103c37a92764930480149f288fd9350a829d4953)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.27.0 ([#1596](https://github.com/googleapis/java-firestore/issues/1596)) ([2672d71](https://github.com/googleapis/java-firestore/commit/2672d7173b2bd5723beb7fa1be4d3e2bf1ec0e9c)) + ## [3.17.1](https://github.com/googleapis/java-firestore/compare/v3.17.0...v3.17.1) (2024-02-22) diff --git a/README.md b/README.md index b8a8fffdc8..aa2480b9a5 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-firestore - 3.17.0 + 3.17.1 ``` @@ -57,13 +57,13 @@ implementation 'com.google.cloud:google-cloud-firestore' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-firestore:3.17.0' +implementation 'com.google.cloud:google-cloud-firestore:3.17.1' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.17.0" +libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.17.1" ``` @@ -222,7 +222,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-firestore/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-firestore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.17.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.17.1 [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-firestore-admin/pom.xml b/google-cloud-firestore-admin/pom.xml index 88d612422d..bec9e9ca9c 100644 --- a/google-cloud-firestore-admin/pom.xml +++ b/google-cloud-firestore-admin/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-firestore-admin - 3.17.1 + 3.18.0 jar Google Cloud Firestore Admin Client https://github.com/googleapis/java-firestore @@ -14,7 +14,7 @@ com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java index b59f0f2b61..ee2077bdaf 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java @@ -273,7 +273,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -315,7 +314,6 @@ private static Builder createDefault() { return new Builder(FirestoreAdminStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(FirestoreAdminStubSettings.newHttpJsonBuilder()); } diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java index 72c8e33eca..7c718c896a 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java @@ -999,8 +999,6 @@ public UnaryCallSettings.Builder createIndexSetti } /** Returns the builder for the settings used for calls to createIndex. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder createIndexOperationSettings() { return createIndexOperationSettings; @@ -1034,8 +1032,6 @@ public UnaryCallSettings.Builder updateFieldSetti } /** Returns the builder for the settings used for calls to updateField. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder updateFieldOperationSettings() { return updateFieldOperationSettings; @@ -1053,8 +1049,6 @@ public UnaryCallSettings.Builder exportDocume } /** Returns the builder for the settings used for calls to exportDocuments. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata> exportDocumentsOperationSettings() { @@ -1067,8 +1061,6 @@ public UnaryCallSettings.Builder importDocume } /** Returns the builder for the settings used for calls to importDocuments. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder importDocumentsOperationSettings() { return importDocumentsOperationSettings; @@ -1080,8 +1072,6 @@ public UnaryCallSettings.Builder createDatabas } /** Returns the builder for the settings used for calls to createDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder createDatabaseOperationSettings() { return createDatabaseOperationSettings; @@ -1104,8 +1094,6 @@ public UnaryCallSettings.Builder updateDatabas } /** Returns the builder for the settings used for calls to updateDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder updateDatabaseOperationSettings() { return updateDatabaseOperationSettings; @@ -1117,8 +1105,6 @@ public UnaryCallSettings.Builder deleteDatabas } /** Returns the builder for the settings used for calls to deleteDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder deleteDatabaseOperationSettings() { return deleteDatabaseOperationSettings; diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java index e57f3803be..1364aabb34 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.firestore.v1.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonFirestoreAdminCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java index 8f89135bdf..c84683e42a 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java @@ -20,7 +20,6 @@ import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse; import com.google.api.HttpRule; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -83,7 +82,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() diff --git a/google-cloud-firestore-bom/pom.xml b/google-cloud-firestore-bom/pom.xml index 3443f8f8bf..54236bfd61 100644 --- a/google-cloud-firestore-bom/pom.xml +++ b/google-cloud-firestore-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-firestore-bom - 3.17.1 + 3.18.0 pom com.google.cloud sdk-platform-java-config - 3.25.0 + 3.27.0 Google Cloud Firestore BOM @@ -52,37 +52,37 @@ com.google.cloud google-cloud-firestore - 3.17.1 + 3.18.0 com.google.cloud google-cloud-firestore-admin - 3.17.1 + 3.18.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.17.1 + 3.18.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.17.1 + 3.18.0 com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.17.1 + 3.18.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.17.1 + 3.18.0 com.google.cloud proto-google-cloud-firestore-bundle-v1 - 3.17.1 + 3.18.0 diff --git a/google-cloud-firestore/pom.xml b/google-cloud-firestore/pom.xml index baf9652416..be6ce32249 100644 --- a/google-cloud-firestore/pom.xml +++ b/google-cloud-firestore/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-firestore - 3.17.1 + 3.18.0 jar Google Cloud Firestore https://github.com/googleapis/java-firestore @@ -12,7 +12,7 @@ com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 google-cloud-firestore diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/CustomClassMapper.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/CustomClassMapper.java index a17c3a08e2..6d4f143fe6 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/CustomClassMapper.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/CustomClassMapper.java @@ -36,6 +36,7 @@ import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.math.BigDecimal; +import java.time.Instant; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -175,6 +176,9 @@ private static Object serialize(T o, ErrorPath path) { || o instanceof FieldValue || o instanceof Value) { return o; + } else if (o instanceof Instant) { + Instant instant = (Instant) o; + return Timestamp.ofTimeSecondsAndNanos(instant.getEpochSecond(), instant.getNano()); } else { Class clazz = (Class) o.getClass(); BeanMapper mapper = loadOrCreateBeanMapperForClass(clazz); @@ -233,6 +237,8 @@ private static T deserializeToClass(Object o, Class clazz, DeserializeCon return (T) convertDate(o, context); } else if (Timestamp.class.isAssignableFrom(clazz)) { return (T) convertTimestamp(o, context); + } else if (Instant.class.isAssignableFrom(clazz)) { + return (T) convertInstant(o, context); } else if (Blob.class.isAssignableFrom(clazz)) { return (T) convertBlob(o, context); } else if (GeoPoint.class.isAssignableFrom(clazz)) { @@ -557,6 +563,19 @@ private static Timestamp convertTimestamp(Object o, DeserializeContext context) } } + private static Instant convertInstant(Object o, DeserializeContext context) { + if (o instanceof Timestamp) { + Timestamp timestamp = (Timestamp) o; + return Instant.ofEpochSecond(timestamp.getSeconds(), timestamp.getNanos()); + } else if (o instanceof Date) { + return Instant.ofEpochMilli(((Date) o).getTime()); + } else { + throw deserializeError( + context.errorPath, + "Failed to convert value of type " + o.getClass().getName() + " to Instant"); + } + } + private static Blob convertBlob(Object o, DeserializeContext context) { if (o instanceof Blob) { return (Blob) o; @@ -976,13 +995,13 @@ Map serialize(T object, ErrorPath path) { private void applyFieldAnnotations(Field field) { if (field.isAnnotationPresent(ServerTimestamp.class)) { Class fieldType = field.getType(); - if (fieldType != Date.class && fieldType != Timestamp.class) { + if (fieldType != Date.class && fieldType != Timestamp.class && fieldType != Instant.class) { throw new IllegalArgumentException( "Field " + field.getName() + " is annotated with @ServerTimestamp but is " + fieldType - + " instead of Date or Timestamp."); + + " instead of Date, Timestamp, or Instant."); } serverTimestamps.add(propertyName(field)); } @@ -997,13 +1016,15 @@ private void applyFieldAnnotations(Field field) { private void applyGetterAnnotations(Method method) { if (method.isAnnotationPresent(ServerTimestamp.class)) { Class returnType = method.getReturnType(); - if (returnType != Date.class && returnType != Timestamp.class) { + if (returnType != Date.class + && returnType != Timestamp.class + && returnType != Instant.class) { throw new IllegalArgumentException( "Method " + method.getName() + " is annotated with @ServerTimestamp but returns " + returnType - + " instead of Date or Timestamp."); + + " instead of Date, Timestamp, or Instant."); } serverTimestamps.add(propertyName(method)); } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java index 9c606e8abe..c391e9b801 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpc.java @@ -16,18 +16,17 @@ package com.google.cloud.firestore.spi.v1; -import com.google.api.core.ApiFunction; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.grpc.GrpcCallContext; import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.HeaderProvider; import com.google.api.gax.rpc.NoHeaderProvider; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.TransportChannel; -import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.NoCredentials; import com.google.cloud.ServiceOptions; @@ -126,17 +125,38 @@ public GrpcFirestoreRpc(final FirestoreOptions options) throws IOException { clientContext = ClientContext.create(settingsBuilder.build()); } - ApiFunction, Void> retrySettingsSetter = - builder -> { - builder.setRetrySettings(options.getRetrySettings()); - return null; - }; + FirestoreStubSettings.Builder firestoreBuilder = - FirestoreStubSettings.newBuilder(clientContext) - .applyToAllUnaryMethods(retrySettingsSetter); - // Manually apply the retry settings to streaming methods - firestoreBuilder.runQuerySettings().setRetrySettings(options.getRetrySettings()); - firestoreBuilder.batchGetDocumentsSettings().setRetrySettings(options.getRetrySettings()); + FirestoreStubSettings.newBuilder(clientContext); + RetrySettings retrySettings = options.getRetrySettings(); + + // Override retry settings only if customer provides settings different from default. + if (retrySettings.equals(ServiceOptions.getDefaultRetrySettings())) { + // We are manually setting `setMaxAttempts(5)` to follow + // the `firestore_grpc_service_config.json` configuration. + // This code should be removed when following issue is fixed: + // https://github.com/googleapis/sdk-platform-java/issues/2306 + firestoreBuilder.applyToAllUnaryMethods( + builder -> { + builder.retrySettings().setMaxAttempts(5); + return null; + }); + // Manually apply the retry settings to streaming methods + firestoreBuilder.runQuerySettings().retrySettings().setMaxAttempts(5); + firestoreBuilder.runAggregationQuerySettings().retrySettings().setMaxAttempts(5); + firestoreBuilder.batchGetDocumentsSettings().retrySettings().setMaxAttempts(5); + } else { + firestoreBuilder.applyToAllUnaryMethods( + builder -> { + builder.setRetrySettings(retrySettings); + return null; + }); + // Manually apply the retry settings to streaming methods + firestoreBuilder.runQuerySettings().setRetrySettings(retrySettings); + firestoreBuilder.runAggregationQuerySettings().setRetrySettings(retrySettings); + firestoreBuilder.batchGetDocumentsSettings().setRetrySettings(retrySettings); + } + firestoreStub = GrpcFirestoreStub.create(firestoreBuilder.build()); } catch (Exception e) { throw new IOException(e); diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java index 19576e7769..cd14ac440d 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java @@ -245,7 +245,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -287,7 +286,6 @@ private static Builder createDefault() { return new Builder(FirestoreStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(FirestoreStubSettings.newHttpJsonBuilder()); } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java index 30f3b061fe..c123bc7d03 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.firestore.v1.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonFirestoreCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java index 59c4da840b..badc0f7e8c 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreStub.java @@ -20,7 +20,6 @@ import static com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse; import static com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -80,7 +79,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonFirestoreStub extends FirestoreStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/DocumentReferenceTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/DocumentReferenceTest.java index 7d982b86c6..6858e1a14d 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/DocumentReferenceTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/DocumentReferenceTest.java @@ -872,6 +872,7 @@ public void extractFieldMaskFromMerge() throws Exception { "second.foo", "second.geoPointValue", "second.infValue", + "second.instantValue", "second.longValue", "second.nanValue", "second.negInfValue", diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java index 706412dae9..d38779fca5 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java @@ -75,6 +75,7 @@ import java.nio.charset.StandardCharsets; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -148,6 +149,7 @@ public final class LocalFirestoreHelper { public static final Date DATE; public static final Timestamp TIMESTAMP; + public static final Instant INSTANT; public static final GeoPoint GEO_POINT; public static final Blob BLOB; public static final FooList FOO_LIST = new FooList<>(); @@ -942,6 +944,7 @@ public static class AllSupportedTypes { public SingleField objectValue = new SingleField(); public Date dateValue = DATE; public Timestamp timestampValue = TIMESTAMP; + public Instant instantValue = INSTANT; public List arrayValue = ImmutableList.of("foo"); public String nullValue = null; public Blob bytesValue = BLOB; @@ -968,6 +971,7 @@ public boolean equals(Object o) { && Objects.equals(objectValue, that.objectValue) && Objects.equals(dateValue, that.dateValue) && Objects.equals(timestampValue, that.timestampValue) + && Objects.equals(instantValue, that.instantValue) && Objects.equals(arrayValue, that.arrayValue) && Objects.equals(nullValue, that.nullValue) && Objects.equals(bytesValue, that.bytesValue) @@ -989,6 +993,10 @@ public boolean equals(Object o) { Timestamp.ofTimeSecondsAndNanos( TimeUnit.MILLISECONDS.toSeconds(DATE.getTime()), 123000); // Firestore truncates to microsecond precision. + INSTANT = + Instant.ofEpochSecond( + TimeUnit.MILLISECONDS.toSeconds(DATE.getTime()), + 123000); // Firestore truncates to microsecond precision. GEO_POINT = new GeoPoint(50.1430847, -122.9477780); BLOB = Blob.fromBytes(new byte[] {1, 2, 3}); SINGLE_FLOAT_MAP = map("float", 0.1F); @@ -1083,6 +1091,7 @@ public boolean equals(Object o) { ALL_SUPPORTED_TYPES_MAP.put("objectValue", map("foo", (Object) "bar")); ALL_SUPPORTED_TYPES_MAP.put("dateValue", Timestamp.of(DATE)); ALL_SUPPORTED_TYPES_MAP.put("timestampValue", TIMESTAMP); + ALL_SUPPORTED_TYPES_MAP.put("instantValue", TIMESTAMP); ALL_SUPPORTED_TYPES_MAP.put("arrayValue", ImmutableList.of("foo")); ALL_SUPPORTED_TYPES_MAP.put("nullValue", null); ALL_SUPPORTED_TYPES_MAP.put("bytesValue", BLOB); @@ -1119,6 +1128,14 @@ public boolean equals(Object o) { .setSeconds(479978400) .setNanos(123000)) // Timestamps supports microsecond precision. .build()) + .put( + "instantValue", + Value.newBuilder() + .setTimestampValue( + com.google.protobuf.Timestamp.newBuilder() + .setSeconds(479978400) + .setNanos(123000)) // Instants supports microsecond precision. + .build()) .put( "arrayValue", Value.newBuilder() diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpcTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpcTest.java new file mode 100644 index 0000000000..e4e888ff0e --- /dev/null +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/spi/v1/GrpcFirestoreRpcTest.java @@ -0,0 +1,338 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.firestore.spi.v1; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.gax.retrying.ExponentialRetryAlgorithm; +import com.google.api.gax.retrying.RetryAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.ScheduledRetryingExecutor; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.StatusCode.Code; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.firestore.FirestoreOptions; +import com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse; +import com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse; +import com.google.cloud.firestore.v1.stub.FirestoreStubSettings; +import com.google.firestore.v1.BatchGetDocumentsRequest; +import com.google.firestore.v1.BatchGetDocumentsResponse; +import com.google.firestore.v1.BatchWriteRequest; +import com.google.firestore.v1.BatchWriteResponse; +import com.google.firestore.v1.BeginTransactionRequest; +import com.google.firestore.v1.BeginTransactionResponse; +import com.google.firestore.v1.CommitRequest; +import com.google.firestore.v1.CommitResponse; +import com.google.firestore.v1.ListDocumentsRequest; +import com.google.firestore.v1.ListDocumentsResponse; +import com.google.firestore.v1.PartitionQueryRequest; +import com.google.firestore.v1.PartitionQueryResponse; +import com.google.firestore.v1.RollbackRequest; +import com.google.firestore.v1.RunAggregationQueryRequest; +import com.google.firestore.v1.RunAggregationQueryResponse; +import com.google.firestore.v1.RunQueryRequest; +import com.google.firestore.v1.RunQueryResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.Set; +import org.junit.BeforeClass; +import org.junit.Test; + +public class GrpcFirestoreRpcTest { + + private static FirestoreStubSettings defaultStubSettings; + + private final FirestoreOptions firestoreOptionsWithoutOverride = + FirestoreOptions.newBuilder().setProjectId("test-project").build(); + + @BeforeClass + public static void beforeClass() throws IOException { + defaultStubSettings = FirestoreStubSettings.newBuilder().build(); + } + + static T getViaReflection(Object o, String fieldName) + throws NoSuchFieldException, IllegalAccessException { + return getViaReflection(o.getClass(), fieldName, o); + } + + static T getViaReflection(Class clazz, String fieldName, Object o) + throws NoSuchFieldException, IllegalAccessException { + Field field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); + return (T) field.get(o); + } + + @Test + public void retrySettingsOverride() throws Exception { + RetrySettings retrySettings = RetrySettings.newBuilder().setMaxAttempts(2).build(); + FirestoreOptions firestoreOptions = + FirestoreOptions.newBuilder() + .setProjectId("test-project") + .setRetrySettings(retrySettings) + .build(); + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptions); + + CallableRetryData commit = getRetryData(grpcFirestoreRpc.commitCallable()); + assertThat(commit.retrySettings).isEqualTo(retrySettings); + assertThat(commit.retryableCodes) + .containsExactlyElementsIn(defaultStubSettings.commitSettings().getRetryableCodes()); + + CallableRetryData batchWrite = getRetryData(grpcFirestoreRpc.batchWriteCallable()); + assertThat(batchWrite.retrySettings).isEqualTo(retrySettings); + assertThat(batchWrite.retryableCodes) + .containsExactlyElementsIn(defaultStubSettings.batchWriteSettings().getRetryableCodes()); + + CallableRetryData batchGetDocuments = + getRetryData(grpcFirestoreRpc.batchGetDocumentsCallable()); + assertThat(batchGetDocuments.retrySettings).isEqualTo(retrySettings); + assertThat(batchGetDocuments.retryableCodes) + .containsExactlyElementsIn( + defaultStubSettings.batchGetDocumentsSettings().getRetryableCodes()); + + CallableRetryData runQuery = getRetryData(grpcFirestoreRpc.runQueryCallable()); + assertThat(runQuery.retrySettings).isEqualTo(retrySettings); + assertThat(runQuery.retryableCodes) + .containsExactlyElementsIn(defaultStubSettings.runQuerySettings().getRetryableCodes()); + + CallableRetryData runAggregationQuery = + getRetryData(grpcFirestoreRpc.runAggregationQueryCallable()); + assertThat(runAggregationQuery.retrySettings).isEqualTo(retrySettings); + assertThat(runAggregationQuery.retryableCodes) + .containsExactlyElementsIn( + defaultStubSettings.runAggregationQuerySettings().getRetryableCodes()); + + CallableRetryData beginTransaction = getRetryData(grpcFirestoreRpc.beginTransactionCallable()); + assertThat(beginTransaction.retrySettings).isEqualTo(retrySettings); + assertThat(beginTransaction.retryableCodes) + .containsExactlyElementsIn( + defaultStubSettings.beginTransactionSettings().getRetryableCodes()); + + CallableRetryData rollback = getRetryData(grpcFirestoreRpc.rollbackCallable()); + assertThat(rollback.retrySettings).isEqualTo(retrySettings); + assertThat(rollback.retryableCodes) + .containsExactlyElementsIn(defaultStubSettings.rollbackSettings().getRetryableCodes()); + + CallableRetryData listCollectionIdsPaged = + getRetryData(grpcFirestoreRpc.listCollectionIdsPagedCallable()); + assertThat(listCollectionIdsPaged.retrySettings).isEqualTo(retrySettings); + assertThat(listCollectionIdsPaged.retryableCodes) + .containsExactlyElementsIn( + defaultStubSettings.listCollectionIdsSettings().getRetryableCodes()); + + CallableRetryData partitionQueryPaged = + getRetryData(grpcFirestoreRpc.partitionQueryPagedCallable()); + assertThat(partitionQueryPaged.retrySettings).isEqualTo(retrySettings); + assertThat(partitionQueryPaged.retryableCodes) + .containsExactlyElementsIn( + defaultStubSettings.partitionQuerySettings().getRetryableCodes()); + + CallableRetryData listDocumentsPaged = + getRetryData(grpcFirestoreRpc.listDocumentsPagedCallable()); + assertThat(listDocumentsPaged.retrySettings).isEqualTo(retrySettings); + assertThat(listDocumentsPaged.retryableCodes) + .containsExactlyElementsIn(defaultStubSettings.listDocumentsSettings().getRetryableCodes()); + } + + private static RetrySettings withMaxAttempt5(RetrySettings retrySettings) { + return retrySettings.toBuilder().setMaxAttempts(5).build(); + } + + @Test + public void commitCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.commitCallable()); + UnaryCallSettings expectedSettings = + defaultStubSettings.commitSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void batchWriteCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.batchWriteCallable()); + UnaryCallSettings expectedSettings = + defaultStubSettings.batchWriteSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void batchGetDocumentsCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.batchGetDocumentsCallable()); + ServerStreamingCallSettings + expectedSettings = defaultStubSettings.batchGetDocumentsSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void runQueryCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.runQueryCallable()); + ServerStreamingCallSettings expectedSettings = + defaultStubSettings.runQuerySettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void runAggregationQueryCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.runAggregationQueryCallable()); + ServerStreamingCallSettings + expectedSettings = defaultStubSettings.runAggregationQuerySettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void beginTransactionCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.beginTransactionCallable()); + UnaryCallSettings expectedSettings = + defaultStubSettings.beginTransactionSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void rollbackCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.rollbackCallable()); + UnaryCallSettings expectedSettings = + defaultStubSettings.rollbackSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void listCollectionIdsPagedCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.listCollectionIdsPagedCallable()); + PagedCallSettings + expectedSettings = defaultStubSettings.listDocumentsSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void partitionQueryPagedCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.partitionQueryPagedCallable()); + PagedCallSettings + expectedSettings = defaultStubSettings.partitionQuerySettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + @Test + public void listDocumentsPagedCallableFollowsServiceConfig() throws Exception { + GrpcFirestoreRpc grpcFirestoreRpc = new GrpcFirestoreRpc(firestoreOptionsWithoutOverride); + CallableRetryData actual = getRetryData(grpcFirestoreRpc.listDocumentsPagedCallable()); + PagedCallSettings + expectedSettings = defaultStubSettings.listDocumentsSettings(); + assertThat(actual.retrySettings) + .isEqualTo(withMaxAttempt5(expectedSettings.getRetrySettings())); + assertThat(actual.retryableCodes) + .containsExactlyElementsIn(expectedSettings.getRetryableCodes()); + } + + private static CallableRetryData getRetryData(Object callable) throws Exception { + String aClassName = callable.getClass().getName(); + switch (aClassName) { + case "com.google.api.gax.tracing.TracedUnaryCallable": + case "com.google.api.gax.tracing.TracedServerStreamingCallable": + return getRetryData(getViaReflection(callable, "innerCallable")); + case "com.google.api.gax.rpc.UnaryCallable$1": + case "com.google.api.gax.rpc.ServerStreamingCallable$1": + return getRetryData(getViaReflection(callable, "this$0")); + case "com.google.api.gax.rpc.RetryingCallable": + return new CallableRetryData( + getRetrySettings(getViaReflection(callable, "executor")), + getRetryableCodes(getViaReflection(callable, "callable"))); + case "com.google.api.gax.rpc.RetryingServerStreamingCallable": + return new CallableRetryData( + getRetrySettings(getViaReflection(callable, "executor")), + getRetryableCodes(getViaReflection(callable, "innerCallable"))); + case "com.google.api.gax.rpc.PagedCallable": + return getRetryData(getViaReflection(callable, "callable")); + default: + throw new Exception("Unexpected class " + aClassName); + } + } + + private static Set getRetryableCodes(Object o) + throws NoSuchFieldException, IllegalAccessException { + switch (o.getClass().getName()) { + case "com.google.api.gax.rpc.ServerStreamingCallable$1": + return getRetryableCodes(getViaReflection(o, "this$0")); + case "com.google.api.gax.rpc.WatchdogServerStreamingCallable": + return getRetryableCodes(getViaReflection(o, "inner")); + } + Object exceptionFactory = getViaReflection(o, "exceptionFactory"); + return getViaReflection(exceptionFactory, "retryableCodes"); + } + + private static RetrySettings getRetrySettings(Object o) throws Exception { + String aClassName = o.getClass().getName(); + switch (aClassName) { + case "com.google.api.gax.retrying.ScheduledRetryingExecutor": + { + Object retryAlgorithm = + getViaReflection(ScheduledRetryingExecutor.class, "retryAlgorithm", o); + Object exponentialRetryAlgorithm = + getViaReflection(RetryAlgorithm.class, "timedAlgorithmWithContext", retryAlgorithm); + return getViaReflection( + ExponentialRetryAlgorithm.class, "globalSettings", exponentialRetryAlgorithm); + } + default: + throw new Exception("Unexpected class " + aClassName); + } + } + + static class CallableRetryData { + final RetrySettings retrySettings; + final Set retryableCodes; + + CallableRetryData(RetrySettings retrySettings, Set retryableCodes) { + this.retrySettings = retrySettings; + this.retryableCodes = retryableCodes; + } + } +} diff --git a/grpc-google-cloud-firestore-admin-v1/pom.xml b/grpc-google-cloud-firestore-admin-v1/pom.xml index c808e7e910..ad2565785c 100644 --- a/grpc-google-cloud-firestore-admin-v1/pom.xml +++ b/grpc-google-cloud-firestore-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.17.1 + 3.18.0 grpc-google-cloud-firestore-admin-v1 GRPC library for grpc-google-cloud-firestore-admin-v1 com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 diff --git a/grpc-google-cloud-firestore-v1/pom.xml b/grpc-google-cloud-firestore-v1/pom.xml index 3fb859e8e1..6f87981498 100644 --- a/grpc-google-cloud-firestore-v1/pom.xml +++ b/grpc-google-cloud-firestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.17.1 + 3.18.0 grpc-google-cloud-firestore-v1 GRPC library for grpc-google-cloud-firestore-v1 com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 diff --git a/pom.xml b/pom.xml index 96c1aa5063..3b820ccabb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-firestore-parent pom - 3.17.1 + 3.18.0 Google Cloud Firestore Parent https://github.com/googleapis/java-firestore @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.25.0 + 3.27.0 @@ -150,32 +150,32 @@ com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.17.1 + 3.18.0 com.google.cloud google-cloud-firestore - 3.17.1 + 3.18.0 com.google.cloud proto-google-cloud-firestore-bundle-v1 - 3.17.1 + 3.18.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.17.1 + 3.18.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.17.1 + 3.18.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.17.1 + 3.18.0 @@ -195,7 +195,7 @@ com.google.truth truth - 1.4.1 + 1.4.2 test diff --git a/proto-google-cloud-firestore-admin-v1/pom.xml b/proto-google-cloud-firestore-admin-v1/pom.xml index cc3f99c2ff..36d2a4e628 100644 --- a/proto-google-cloud-firestore-admin-v1/pom.xml +++ b/proto-google-cloud-firestore-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.17.1 + 3.18.0 proto-google-cloud-firestore-admin-v1 PROTO library for proto-google-cloud-firestore-admin-v1 com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 diff --git a/proto-google-cloud-firestore-bundle-v1/pom.xml b/proto-google-cloud-firestore-bundle-v1/pom.xml index 6f1fded072..a493f54eae 100644 --- a/proto-google-cloud-firestore-bundle-v1/pom.xml +++ b/proto-google-cloud-firestore-bundle-v1/pom.xml @@ -5,14 +5,14 @@ 4.0.0 proto-google-cloud-firestore-bundle-v1 - 3.17.1 + 3.18.0 proto-google-cloud-firestore-bundle-v1 PROTO library for proto-google-cloud-firestore-bundle-v1 com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 diff --git a/proto-google-cloud-firestore-v1/pom.xml b/proto-google-cloud-firestore-v1/pom.xml index 278b30245c..4ecb163192 100644 --- a/proto-google-cloud-firestore-v1/pom.xml +++ b/proto-google-cloud-firestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.17.1 + 3.18.0 proto-google-cloud-firestore-v1 PROTO library for proto-google-cloud-firestore-v1 com.google.cloud google-cloud-firestore-parent - 3.17.1 + 3.18.0 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 17a67f6c32..65aeee0d9d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -30,7 +30,7 @@ com.google.cloud google-cloud-firestore - 3.17.0 + 3.17.1 @@ -55,7 +55,7 @@ com.google.truth truth - 1.4.1 + 1.4.2 test diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 51fb3f7119..4eca4021ca 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -66,7 +66,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.truth truth - 1.4.1 + 1.4.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 24c857e190..29dd2d9f0e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-firestore - 3.17.0 + 3.17.1 @@ -41,7 +41,7 @@ com.google.truth truth - 1.4.1 + 1.4.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 407edfd237..658b6a08ac 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -69,7 +69,7 @@ com.google.truth truth - 1.4.1 + 1.4.2 test diff --git a/versions.txt b/versions.txt index 9d1a130f9e..38072e0543 100644 --- a/versions.txt +++ b/versions.txt @@ -1,11 +1,11 @@ # Format: # module:released-version:current-version -google-cloud-firestore:3.17.1:3.17.1 -google-cloud-firestore-admin:3.17.1:3.17.1 -google-cloud-firestore-bom:3.17.1:3.17.1 -grpc-google-cloud-firestore-admin-v1:3.17.1:3.17.1 -grpc-google-cloud-firestore-v1:3.17.1:3.17.1 -proto-google-cloud-firestore-admin-v1:3.17.1:3.17.1 -proto-google-cloud-firestore-v1:3.17.1:3.17.1 -proto-google-cloud-firestore-bundle-v1:3.17.1:3.17.1 +google-cloud-firestore:3.18.0:3.18.0 +google-cloud-firestore-admin:3.18.0:3.18.0 +google-cloud-firestore-bom:3.18.0:3.18.0 +grpc-google-cloud-firestore-admin-v1:3.18.0:3.18.0 +grpc-google-cloud-firestore-v1:3.18.0:3.18.0 +proto-google-cloud-firestore-admin-v1:3.18.0:3.18.0 +proto-google-cloud-firestore-v1:3.18.0:3.18.0 +proto-google-cloud-firestore-bundle-v1:3.18.0:3.18.0