Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit ee8ddd8

Browse files
Merge branch 'main' into protobuf-v4x
2 parents 8ca014a + e53a6f1 commit ee8ddd8

57 files changed

Lines changed: 6503 additions & 875 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
name: Verify Local Changes
3+
description: Verifies local Java SDK changes.
4+
---
5+
6+
# Verify Local Changes
7+
8+
This skill documents how to verify local code changes for the Java Firestore SDK. This should be run **every time** you complete a fix or feature and are prepared to push a pull request.
9+
10+
## Prerequisites
11+
12+
Ensure you have Maven installed and are in the `java-firestore` directory before running commands.
13+
14+
---
15+
16+
## Step 0: Format the Code
17+
18+
Run the formatter to ensure formatting checks pass:
19+
20+
```bash
21+
mvn com.spotify.fmt:fmt-maven-plugin:format
22+
```
23+
24+
---
25+
26+
## Step 1: Unit Testing (Isolated then Suite)
27+
28+
1. **Identify modified unit tests** in your changes.
29+
2. **Run specific units only** to test isolated logic regressions:
30+
```bash
31+
mvn test -Dtest=MyUnitTest#testMethod
32+
```
33+
3. **Run the entire unit test suite** that contains those modified tests if the isolated unit tests pass:
34+
```bash
35+
mvn test -Dtest=MyUnitTest
36+
```
37+
38+
---
39+
40+
## Step 2: Integration Testing (Isolated then Suite)
41+
42+
### 💡 Integration Test Nuances (from `ITBaseTest.java`)
43+
44+
When running integration tests, configure your execution using properties or environment variables:
45+
46+
- **`FIRESTORE_EDITION`**:
47+
- `standard` (Default)
48+
- `enterprise`
49+
- *Note*: **Pipelines can only be run against `enterprise` editions**, while standard Queries run on both.
50+
- **`FIRESTORE_NAMED_DATABASE`**:
51+
- Enterprise editions usually require a named database (often `enterprise`). Adjust this flag if pointing to specific instances.
52+
- **`FIRESTORE_TARGET_BACKEND`**:
53+
- `PROD` (Default)
54+
- `QA` (points to standard sandboxes)
55+
- `NIGHTLY` (points to `test-firestore.sandbox.googleapis.com:443`)
56+
- `EMULATOR` (points to `localhost:8080`)
57+
58+
1. **Identify modified integration tests** (usually Starting in `IT`).
59+
2. **Run specific integration tests only** (isolated checks run quicker):
60+
```bash
61+
mvn verify -Penable-integration-tests -DFIRESTORE_EDITION=enterprise -DFIRESTORE_NAMED_DATABASE=enterprise -Dtest=ITTest#testMethod -Dclirr.skip=true -Denforcer.skip=true -fae
62+
```
63+
3. **Run the entire integration test suite** for the modified class if isolation tests pass:
64+
```bash
65+
mvn verify -Penable-integration-tests -DFIRESTORE_EDITION=enterprise -DFIRESTORE_NAMED_DATABASE=enterprise -Dtest=ITTest -Dclirr.skip=true -Denforcer.skip=true -fae
66+
```
67+
68+
69+
70+
---
71+
72+
## Step 3: Full Suite Regressions
73+
74+
Run the full integration regression suite once you are confident subsets pass:
75+
76+
```bash
77+
mvn verify -Penable-integration-tests -DFIRESTORE_EDITION=enterprise -DFIRESTORE_NAMED_DATABASE=enterprise -Dclirr.skip=true -Denforcer.skip=true -fae
78+
```
79+
80+
---
81+
82+
> [!TIP]
83+
> Use `-Dclirr.skip=true -Denforcer.skip=true` to speed up iterations where appropriate without leaking compliance checks.
84+
85+
---
86+
87+
## 🛠️ Troubleshooting & Source of Truth
88+
89+
If you run into issues executing tests with the commands above, **consult the Kokoro configuration files** as the ultimate source of truth:
90+
91+
- **Presubmit configurations**: See `.kokoro/presubmit/integration.cfg` (or `integration-named-db.cfg`)
92+
- **Nightly configurations**: See `.kokoro/nightly/integration.cfg`
93+
- **Build shell scripts**: See `.kokoro/build.sh`
94+
95+
These files define the exact environment variables (e.g., specific endpoints or endpoints overrides) the CI server uses!

.github/workflows/hermetic_library_generation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
40-
- uses: googleapis/sdk-platform-java/.github/scripts@v2.67.0
40+
- uses: googleapis/sdk-platform-java/.github/scripts@v2.68.0
4141
if: env.SHOULD_RUN == 'true'
4242
with:
4343
base_ref: ${{ github.base_ref }}

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# Changelog
22

3+
## [3.40.0](https://github.com/googleapis/java-firestore/compare/v3.39.0...v3.40.0) (2026-04-08)
4+
5+
6+
### Features
7+
8+
* Add `isType` expression ([#2329](https://github.com/googleapis/java-firestore/issues/2329)) ([c606ff9](https://github.com/googleapis/java-firestore/commit/c606ff989e1305214d29496734f2a34628e4c82a))
9+
* Add DML stages to pipelines ([#2317](https://github.com/googleapis/java-firestore/issues/2317)) ([2dc2464](https://github.com/googleapis/java-firestore/commit/2dc2464206a899794746ebbe20e3fc048770a0b2))
10+
* Add string pipeline expressions ([#2326](https://github.com/googleapis/java-firestore/issues/2326)) ([93db04e](https://github.com/googleapis/java-firestore/commit/93db04e4bce569c54359648b4122a732d0c9df73))
11+
* Add subquery support in pipeline ([#2323](https://github.com/googleapis/java-firestore/issues/2323)) ([cbf87ac](https://github.com/googleapis/java-firestore/commit/cbf87acd66f5c3fbdbd5d922e22790347f44f22d))
12+
* Add support for remaining `map` pipeline expressions ([#2321](https://github.com/googleapis/java-firestore/issues/2321)) ([f61c61f](https://github.com/googleapis/java-firestore/commit/f61c61f42c472d5540dd616c17db3655502ccdf6))
13+
* Add support for the parent expression and fix integration tests error ([#2351](https://github.com/googleapis/java-firestore/issues/2351)) ([0e30ec4](https://github.com/googleapis/java-firestore/commit/0e30ec455273719f8d29471c001f4aeb38ecf51a))
14+
* Add timestamp expressions ([#2342](https://github.com/googleapis/java-firestore/issues/2342)) ([f8adbaa](https://github.com/googleapis/java-firestore/commit/f8adbaa1464a55b7ec004cbe2c7b5145095b0f04))
15+
* Added public preview support for full-text search and geo search in Pipelines. ([#2346](https://github.com/googleapis/java-firestore/issues/2346)) ([0c81885](https://github.com/googleapis/java-firestore/commit/0c8188520dfbada0d3fef0719e4f95fc231306be))
16+
* **firestore:** Add `ifNull` and `coalesce` expressions ([#2349](https://github.com/googleapis/java-firestore/issues/2349)) ([51a1c43](https://github.com/googleapis/java-firestore/commit/51a1c4392c19def6aa8a15a7409c7e05476033a8))
17+
* **firestore:** Add array expressions ([#2350](https://github.com/googleapis/java-firestore/issues/2350)) ([1d23f18](https://github.com/googleapis/java-firestore/commit/1d23f18f70b2b232a4631fe6dab18a8ceb05cb4c))
18+
* **firestore:** Add logical expressions ([#2339](https://github.com/googleapis/java-firestore/issues/2339)) ([b2f79ec](https://github.com/googleapis/java-firestore/commit/b2f79ec84db91874a717dfaea8bf8f0df9f45c4d))
19+
* Graduate Pipeline and related APIs from beta to GA ([#2352](https://github.com/googleapis/java-firestore/issues/2352)) ([4cd5895](https://github.com/googleapis/java-firestore/commit/4cd58958191687ea03fadbcc2a4eb6e2f33730b1))
20+
21+
## [3.39.0](https://github.com/googleapis/java-firestore/compare/v3.38.0...v3.39.0) (2026-03-23)
22+
23+
24+
### Features
25+
26+
* Add arithmetic expressions ([#2333](https://github.com/googleapis/java-firestore/issues/2333)) ([491c211](https://github.com/googleapis/java-firestore/commit/491c211e226fcfbf007dd73e2ae6c2450f3b5311))
27+
* Add first, last, arrayAgg and arrayAggDistinct expressions ([#2334](https://github.com/googleapis/java-firestore/issues/2334)) ([2be5989](https://github.com/googleapis/java-firestore/commit/2be59896fef7a7bb458cfaf06344654e82acc74c))
28+
* Expose the variable definition in the Cloud Firestore API ([7b105c5](https://github.com/googleapis/java-firestore/commit/7b105c51347b6b6c60fdf4d59ec8c0a7780ace5b))
29+
* **firestore:** Add array expressions ([#2331](https://github.com/googleapis/java-firestore/issues/2331)) ([5272549](https://github.com/googleapis/java-firestore/commit/527254966b573093319cc4468c1dd6cde44d01e0))
30+
* **firestore:** Global option to turn on implicit orderby ([#2337](https://github.com/googleapis/java-firestore/issues/2337)) ([24d3e17](https://github.com/googleapis/java-firestore/commit/24d3e173cbcb077c6b89d4361e93f078cf23a2b7))
31+
32+
33+
### Bug Fixes
34+
35+
* **deps:** Update the Java code generator (gapic-generator-java) to 2.68.0 ([8bcdd6b](https://github.com/googleapis/java-firestore/commit/8bcdd6bc102aaebe5194bac6f53fb75c32f86bba))
36+
* Fix the wrong return type for Pipeline.as(String alias) ([#2330](https://github.com/googleapis/java-firestore/issues/2330)) ([6371fd3](https://github.com/googleapis/java-firestore/commit/6371fd3332c26230500620e4df2ff71155f35cb7))
37+
38+
39+
### Dependencies
40+
41+
* Update dependency com.google.cloud:sdk-platform-java-config to v3.58.0 ([#2332](https://github.com/googleapis/java-firestore/issues/2332)) ([f50a9e5](https://github.com/googleapis/java-firestore/commit/f50a9e59ab25ff30120f8ea69a8c4ed14e85061a))
42+
343
## [3.38.0](https://github.com/googleapis/java-firestore/compare/v3.37.0...v3.38.0) (2026-02-26)
444

545

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ If you are using Maven without the BOM, add this to your dependencies:
4949
If you are using Gradle 5.x or later, add this to your dependencies:
5050

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.77.0')
52+
implementation platform('com.google.cloud:libraries-bom:26.78.0')
5353
5454
implementation 'com.google.cloud:google-cloud-firestore'
5555
```
5656
If you are using Gradle without BOM, add this to your dependencies:
5757

5858
```Groovy
59-
implementation 'com.google.cloud:google-cloud-firestore:3.38.0'
59+
implementation 'com.google.cloud:google-cloud-firestore:3.40.0'
6060
```
6161

6262
If you are using SBT, add this to your dependencies:
6363

6464
```Scala
65-
libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.38.0"
65+
libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.40.0"
6666
```
6767

6868
## Authentication
@@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
201201
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-firestore/latest/history
202202
[stability-image]: https://img.shields.io/badge/stability-stable-green
203203
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-firestore.svg
204-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.38.0
204+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.40.0
205205
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
206206
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
207207
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

generation_config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
gapic_generator_version: 2.67.0
2-
googleapis_commitish: 798823426715215eccca4d7e7ee4c814843045d7
3-
libraries_bom_version: 26.77.0
1+
gapic_generator_version: 2.68.0
2+
googleapis_commitish: 758d8244a84065ea6b0dfacff3d3e9284983390b
3+
libraries_bom_version: 26.78.0
44
libraries:
55
- api_shortname: firestore
66
name_pretty: Cloud Firestore

google-cloud-firestore-admin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>google-cloud-firestore-admin</artifactId>
7-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore-admin:current} -->
7+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore-admin:current} -->
88
<packaging>jar</packaging>
99
<name>Google Cloud Firestore Admin Client</name>
1010
<url>https://github.com/googleapis/java-firestore</url>
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>com.google.cloud</groupId>
1616
<artifactId>google-cloud-firestore-parent</artifactId>
17-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore:current} -->
17+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore:current} -->
1818
</parent>
1919
<dependencies>
2020
<dependency>

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import com.google.api.gax.rpc.ApiCallContext;
4040
import com.google.api.gax.rpc.ApiClientHeaderProvider;
4141
import com.google.api.gax.rpc.ClientContext;
42+
import com.google.api.gax.rpc.LibraryMetadata;
4243
import com.google.api.gax.rpc.OperationCallSettings;
4344
import com.google.api.gax.rpc.PageContext;
4445
import com.google.api.gax.rpc.PagedCallSettings;
@@ -193,6 +194,7 @@
193194
* }</pre>
194195
*/
195196
@Generated("by gapic-generator-java")
197+
@SuppressWarnings("CanonicalDuration")
196198
public class FirestoreAdminStubSettings extends StubSettings<FirestoreAdminStubSettings> {
197199
/** The default scopes of the service. */
198200
private static final ImmutableList<String> DEFAULT_SERVICE_SCOPES =
@@ -750,6 +752,14 @@ protected FirestoreAdminStubSettings(Builder settingsBuilder) throws IOException
750752
cloneDatabaseOperationSettings = settingsBuilder.cloneDatabaseOperationSettings().build();
751753
}
752754

755+
@Override
756+
protected LibraryMetadata getLibraryMetadata() {
757+
return LibraryMetadata.newBuilder()
758+
.setArtifactName("com.google.cloud:google-cloud-firestore")
759+
.setRepository("googleapis/java-firestore")
760+
.build();
761+
}
762+
753763
/** Builder for FirestoreAdminStubSettings. */
754764
public static class Builder extends StubSettings.Builder<FirestoreAdminStubSettings, Builder> {
755765
private final ImmutableList<UnaryCallSettings.Builder<?, ?>> unaryMethodSettingsBuilders;

google-cloud-firestore-bom/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
55
<artifactId>google-cloud-firestore-bom</artifactId>
6-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore-bom:current} -->
6+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore-bom:current} -->
77
<packaging>pom</packaging>
88
<parent>
99
<groupId>com.google.cloud</groupId>
@@ -52,37 +52,37 @@
5252
<dependency>
5353
<groupId>com.google.cloud</groupId>
5454
<artifactId>google-cloud-firestore</artifactId>
55-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore:current} -->
55+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore:current} -->
5656
</dependency>
5757
<dependency>
5858
<groupId>com.google.cloud</groupId>
5959
<artifactId>google-cloud-firestore-admin</artifactId>
60-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore-admin:current} -->
60+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore-admin:current} -->
6161
</dependency>
6262
<dependency>
6363
<groupId>com.google.api.grpc</groupId>
6464
<artifactId>grpc-google-cloud-firestore-admin-v1</artifactId>
65-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-firestore-admin-v1:current} -->
65+
<version>3.40.0</version><!-- {x-version-update:grpc-google-cloud-firestore-admin-v1:current} -->
6666
</dependency>
6767
<dependency>
6868
<groupId>com.google.api.grpc</groupId>
6969
<artifactId>grpc-google-cloud-firestore-v1</artifactId>
70-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-firestore-v1:current} -->
70+
<version>3.40.0</version><!-- {x-version-update:grpc-google-cloud-firestore-v1:current} -->
7171
</dependency>
7272
<dependency>
7373
<groupId>com.google.api.grpc</groupId>
7474
<artifactId>proto-google-cloud-firestore-admin-v1</artifactId>
75-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-firestore-admin-v1:current} -->
75+
<version>3.40.0</version><!-- {x-version-update:proto-google-cloud-firestore-admin-v1:current} -->
7676
</dependency>
7777
<dependency>
7878
<groupId>com.google.api.grpc</groupId>
7979
<artifactId>proto-google-cloud-firestore-v1</artifactId>
80-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-firestore-v1:current} -->
80+
<version>3.40.0</version><!-- {x-version-update:proto-google-cloud-firestore-v1:current} -->
8181
</dependency>
8282
<dependency>
8383
<groupId>com.google.cloud</groupId>
8484
<artifactId>proto-google-cloud-firestore-bundle-v1</artifactId>
85-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-firestore-bundle-v1:current} -->
85+
<version>3.40.0</version><!-- {x-version-update:proto-google-cloud-firestore-bundle-v1:current} -->
8686
</dependency>
8787
</dependencies>
8888
</dependencyManagement>

google-cloud-firestore/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-firestore</artifactId>
5-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore:current} -->
5+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore:current} -->
66
<packaging>jar</packaging>
77
<name>Google Cloud Firestore</name>
88
<url>https://github.com/googleapis/java-firestore</url>
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-firestore-parent</artifactId>
15-
<version>3.38.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore:current} -->
15+
<version>3.40.0</version><!-- {x-version-update:google-cloud-firestore:current} -->
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-firestore</site.installationModule>

google-cloud-firestore/src/main/java/com/google/cloud/firestore/ExplainStats.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.firestore;
1818

19-
import com.google.api.core.BetaApi;
2019
import com.google.protobuf.Any;
2120
import com.google.protobuf.InvalidProtocolBufferException;
2221
import com.google.protobuf.StringValue;
@@ -26,7 +25,6 @@
2625
* A wrapper object to access explain stats if explain or analyze was enabled for the Pipeline query
2726
* execution.
2827
*/
29-
@BetaApi
3028
public final class ExplainStats {
3129

3230
private final Any explainStatsData;

0 commit comments

Comments
 (0)