chore: migrate java-firestore to google-cloud-java#12659
chore: migrate java-firestore to google-cloud-java#12659suztomo wants to merge 2093 commits intogoogleapis:mainfrom
Conversation
…plugin to v3.1.4 (googleapis#2029) Co-authored-by: Tom Andersen <tom-andersen@users.noreply.github.com>
…is#2043) Co-authored-by: Tom Andersen <tom-andersen@users.noreply.github.com>
googleapis#2044) * chore: Update generation configuration at Thu Mar 13 19:45:54 UTC 2025 * chore: generate libraries at Thu Mar 13 19:46:27 UTC 2025 * chore: Update generation configuration at Fri Mar 14 02:27:50 UTC 2025
…v3.45.1 (googleapis#2038) Co-authored-by: Tom Andersen <tom-andersen@users.noreply.github.com>
googleapis#2045) * chore: Update generation configuration at Sat Mar 15 02:26:49 UTC 2025 * chore: Update generation configuration at Mon Mar 17 02:30:04 UTC 2025 * chore: Update generation configuration at Tue Mar 18 02:29:28 UTC 2025 * chore: Update generation configuration at Wed Mar 19 02:29:06 UTC 2025
* chore(main): release 3.30.11 * chore: generate libraries at Thu Mar 20 00:02:24 UTC 2025 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
… to v0.34.0 (googleapis#2046) Co-authored-by: Tom Andersen <tom-andersen@users.noreply.github.com>
… will actually be logged (googleapis#2055)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
googleapis#2059) * chore: Update generation configuration at Sat Mar 22 02:27:48 UTC 2025 * chore: generate libraries at Sat Mar 22 02:28:28 UTC 2025
* chore(main): release 3.30.12 * chore: generate libraries at Sat Mar 22 13:46:39 UTC 2025 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
* chore(main): release 3.30.13-SNAPSHOT * chore: generate libraries at Tue Mar 25 13:19:20 UTC 2025 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.opentelemetry:opentelemetry-sdk-common](https://redirect.github.com/open-telemetry/opentelemetry-java) | `1.48.0` -> `1.49.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.opentelemetry:opentelemetry-sdk-trace](https://redirect.github.com/open-telemetry/opentelemetry-java) | `1.48.0` -> `1.49.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.opentelemetry:opentelemetry-sdk-testing](https://redirect.github.com/open-telemetry/opentelemetry-java) | `1.48.0` -> `1.49.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-java (io.opentelemetry:opentelemetry-sdk-common)</summary> ### [`v1.49.0`](https://redirect.github.com/open-telemetry/opentelemetry-java/blob/HEAD/CHANGELOG.md#Version-1490-2025-04-04) [Compare Source](https://redirect.github.com/open-telemetry/opentelemetry-java/compare/v1.48.0...v1.49.0) ##### SDK ##### Trace - Avoid linear queue.size() calls in span producers by storing queue size separately ([#&googleapis#8203;7141](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7141)) ##### Exporters - OTLP: Add support for setting exporter executor service ([#&googleapis#8203;7152](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7152)) - OTLP: Refine delay jitter for exponential backoff ([#&googleapis#8203;7206](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7206)) ##### Extensions - Autoconfigure: Remove support for otel.experimental.exporter.otlp.retry.enabled ([#&googleapis#8203;7200](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7200)) - Autoconfigure: Add stable cardinality limit property otel.java.metrics.cardinality.limit ([#&googleapis#8203;7199](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7199)) - Incubator: Add declarative config model customizer SPI ([#&googleapis#8203;7118](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7118)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/java-firestore). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
…o v2.44.4 (googleapis#2071) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.diffplug.spotless:spotless-maven-plugin](https://redirect.github.com/diffplug/spotless) | `2.44.3` -> `2.44.4` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/java-firestore). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
* chore(main): release 3.30.13 * chore: generate libraries at Tue Apr 8 13:09:08 UTC 2025 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
googleapis#2079) * chore: Update generation configuration at Mon Apr 21 22:11:35 UTC 2025 * Update hermetic_library_generation.yaml * Update generation_config.yaml * chore: generate libraries at Mon Apr 21 22:32:36 UTC 2025 * chore: Update generation configuration at Tue Apr 22 02:30:55 UTC 2025 * chore: update build.sh to use latest formatter * chore: use java 17 in samples check * chore: udpate clirr --------- Co-authored-by: Blake Li <blakeli@google.com> Co-authored-by: Diego Marquez <diegomarquezp@google.com>
… error (googleapis#2351) * Add support for the parent expression * chore: generate libraries at Mon Mar 30 16:02:57 UTC 2026 * Fix integration tests error due to changes in backend implementation * chore: generate libraries at Mon Mar 30 18:21:43 UTC 2026 * Fix nested field aggregations --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
* chore: add a simple verify skill * feat: DML prototype * make options and returns internal, add update stage (googleapis#2335) * make options and returns internal, add update stage * chore: generate libraries at Wed Mar 4 16:26:17 UTC 2026 --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com> * Add pipeline DML tests and fix update verification * Delete upsert() from Pipeline.java and tests * Delete insert() --------- Co-authored-by: Daniel La Rocque <dlarocque@google.com> Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
* save work * Fix breaking tests * Fix testSingleLookupScalarSubquery * Fix broken tests * change syntax for define and return type of as function * add documentation and overload for getField() * change proto * chore: generate libraries at Thu Feb 26 19:35:06 UTC 2026 * format code * add tests for toArrayExpression * move the subquery test to independent file * Add tests for subcollection * Format code * refactor PipelineExpression * Address feedbacks * Improve documentation * change the test * Test subcollection used within Union stage * replace mapGet with getField * support subcollection in test * chore: generate libraries at Wed Mar 11 18:14:28 UTC 2026 * improve error message * chore: generate libraries at Tue Mar 24 17:04:45 UTC 2026 * add decode support * Make the subquery test only run in nightly environment * address feedbacks * chore: generate libraries at Fri Mar 27 22:19:12 UTC 2026 * remove beta annotation --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
…ase_please_versions.sh
73c4357 to
2aae2ef
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces the Java Firestore SDK, including the core library and admin client, along with Kokoro configurations, documentation, and metadata. The implementation supports features like bulk writes, aggregate queries, and data pipelines. Feedback focuses on several potential NullPointerException vulnerabilities in FirestoreBundle, DocumentSnapshot, and PipelineResult when processing nullable timestamps or non-document results. Additionally, a security concern was raised regarding the exposure of sensitive tokens in a script's git configuration, and improvements were suggested for error handling in scripts and the replacement of deprecated Double constructors.
| fi | ||
|
|
||
| if [ -z "${pr_num}" ]; then | ||
| git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${repo}.git" |
There was a problem hiding this comment.
| latestReadTime = documentSnapshot.getReadTime(); | ||
| } |
There was a problem hiding this comment.
Potential NullPointerException when calling documentSnapshot.getReadTime().compareTo(...) because getReadTime() is @Nullable. The code should use the snapReadTime variable calculated earlier (on line 89), which correctly handles the null case by defaulting to Timestamp.MIN_VALUE.
if (snapReadTime.compareTo(
Timestamp.fromProto(originalDocument.getMetadata().getReadTime()))
> 0) {
latestReadTime = snapReadTime;
}| .setCreateTime(createTime.toProto()) | ||
| .setUpdateTime(updateTime.toProto()); |
There was a problem hiding this comment.
Potential NullPointerException in toDocumentPb() if createTime or updateTime are null. These fields are @Nullable and can be null if the snapshot was created from an object (e.g., via fromObject).
if (createTime != null) {
document.setCreateTime(createTime.toProto());
}
if (updateTime != null) {
document.setUpdateTime(updateTime.toProto());
}| public String getId() { | ||
| return docRef.getId(); | ||
| } |
There was a problem hiding this comment.
| .putAllFields(fields) | ||
| .setCreateTime(createTime.toProto()) | ||
| .setUpdateTime(updateTime.toProto()); | ||
| } |
There was a problem hiding this comment.
Potential NullPointerException in toDocumentPb() if docRef, createTime, or updateTime are null. These fields can be null for non-document results or results without timestamps (like those from aggregations).
if (docRef != null) {
document.setName(docRef.getName());
}
document.putAllFields(fields);
if (createTime != null) {
document.setCreateTime(createTime.toProto());
}
if (updateTime != null) {
document.setUpdateTime(updateTime.toProto());
}| echo "The latest version of ${group_id}:${artifact_id} is empty." | ||
| echo "The returned json from maven.org is invalid: ${json_content}" |
There was a problem hiding this comment.
The error message uses an undefined variable ${json_content} and incorrectly refers to the response as JSON, while the URL on line 19 points to an XML file (maven-metadata.xml). It should use ${xml_content} instead.
| echo "The latest version of ${group_id}:${artifact_id} is empty." | |
| echo "The returned json from maven.org is invalid: ${json_content}" | |
| echo "The latest version of ${group_id}:${artifact_id} is empty." | |
| echo "The returned XML from maven.org is invalid: ${xml_content}" | |
| exit 1 |
| /** | ||
| * Set the initial maximum number of operations per second allowed by the throttler. | ||
| * | ||
| * @param initialOpsPerSecond The initial maximum number of operations per second allowed by the |
There was a problem hiding this comment.
Use of deprecated new Double(double) constructor. It is recommended to use Double.valueOf(double) instead for better performance and future compatibility.
| * @param initialOpsPerSecond The initial maximum number of operations per second allowed by the | |
| return setInitialOpsPerSecond(Double.valueOf(initialOpsPerSecond)); |
| /** | ||
| * Set the maximum number of operations per second allowed by the throttler. | ||
| * | ||
| * @param maxOpsPerSecond The maximum number of operations per second allowed by the throttler. |
There was a problem hiding this comment.
2aae2ef to
ff638e1
Compare
ff638e1 to
9d0df5d
Compare
b/477663340