diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 203f9eacc..2afe7bfe7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,5 @@ version: 2 + updates: - package-ecosystem: "maven" directory: "/" @@ -16,4 +17,4 @@ updates: # If a security vulnerability comes in, we will be notified about # it via template in the synthtool repository. ignore: - - dependency-name: "*" + - dependency-name: "*" \ No newline at end of file diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index fce568dc2..203644341 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -18,6 +18,8 @@ branchProtectionRules: - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc + - library_generation + - unmanaged_dependency_check - pattern: 1.106.5-sp isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -107,22 +109,6 @@ branchProtectionRules: - cla/google - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - - pattern: V3-experimental - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (17) - - lint - - clirr - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - 'Kokoro - Test: Java GraalVM Native Image' - - 'Kokoro - Test: Java 17 GraalVM Native Image' - - javadoc - pattern: 2.15.x isAdminEnforced: true requiredApprovingReviewCount: 1 diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 46b80edc1..35aa3b151 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -37,7 +37,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.49.0 + - uses: googleapis/sdk-platform-java/.github/scripts@v2.50.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index f1796d286..0ee0f5aaa 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -14,6 +14,6 @@ jobs: shell: bash run: .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.39.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.40.0 with: bom-path: google-cloud-datastore-bom/pom.xml diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index e8c154f48..aabe0f1f9 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.39.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.40.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 046dc8df4..4b9610ffc 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.39.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.40.0" } env_vars: { diff --git a/CHANGELOG.md b/CHANGELOG.md index 36d4e90cf..07cf43d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.24.3](https://github.com/googleapis/java-datastore/compare/v2.24.2...v2.24.3) (2024-11-18) + + +### Dependencies + +* Update sdk platform java dependencies ([#1662](https://github.com/googleapis/java-datastore/issues/1662)) ([b4d3ab9](https://github.com/googleapis/java-datastore/commit/b4d3ab9a72bb2a4dff59bf54abcc5d9536b2596b)) + ## [2.24.2](https://github.com/googleapis/java-datastore/compare/v2.24.1...v2.24.2) (2024-11-06) diff --git a/generation_config.yaml b/generation_config.yaml index 273697bc6..b9de0b019 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.49.0 -googleapis_commitish: 5257378f52352e70b8995713f0d4484bdab7e71d +gapic_generator_version: 2.50.0 +googleapis_commitish: a547fc1420eb0a0f3ae32b0a4eb72d3b8b17d136 libraries_bom_version: 26.50.0 libraries: - api_shortname: datastore diff --git a/google-cloud-datastore-bom/pom.xml b/google-cloud-datastore-bom/pom.xml index 6d426af87..4f4cb2512 100644 --- a/google-cloud-datastore-bom/pom.xml +++ b/google-cloud-datastore-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud sdk-platform-java-config - 3.39.0 + 3.40.0 Google Cloud datastore BOM diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java index cafef310e..4db454e20 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java @@ -117,7 +117,7 @@ * RetrySettings.newBuilder() * .setInitialRetryDelayDuration(Duration.ofMillis(500)) * .setRetryDelayMultiplier(1.5) - * .setMaxRetryDelay(Duration.ofMillis(5000)) + * .setMaxRetryDelayDuration(Duration.ofMillis(5000)) * .setTotalTimeoutDuration(Duration.ofHours(24)) * .build()); * datastoreAdminSettingsBuilder diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java index 82df00c03..aa10d582f 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java @@ -67,9 +67,9 @@ import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; +import java.time.Duration; import java.util.List; import javax.annotation.Generated; -import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -138,7 +138,7 @@ * RetrySettings.newBuilder() * .setInitialRetryDelayDuration(Duration.ofMillis(500)) * .setRetryDelayMultiplier(1.5) - * .setMaxRetryDelay(Duration.ofMillis(5000)) + * .setMaxRetryDelayDuration(Duration.ofMillis(5000)) * .setTotalTimeoutDuration(Duration.ofHours(24)) * .build()); * datastoreAdminSettingsBuilder @@ -449,21 +449,21 @@ public static class Builder extends StubSettings.Builder debugStats; @InternalApi public ExecutionStats(com.google.datastore.v1.ExecutionStats proto) { this.resultsReturned = proto.getResultsReturned(); - this.executionDuration = Duration.ofNanos(proto.getExecutionDuration().getNanos()); + this.executionDuration = java.time.Duration.ofNanos(proto.getExecutionDuration().getNanos()); this.readOperations = proto.getReadOperations(); this.debugStats = Structs.asMap(proto.getDebugStats()); } @@ -51,8 +53,14 @@ public Map getDebugStats() { return debugStats; } + /** This method is obsolete. Use {@link #getExecutionDurationJavaTime()} instead. */ + @ObsoleteApi("Use getExecutionDurationJavaTime() instead") + public org.threeten.bp.Duration getExecutionDuration() { + return toThreetenDuration(getExecutionDurationJavaTime()); + } + /** Returns the total time to execute the query in the backend. */ - public Duration getExecutionDuration() { + public java.time.Duration getExecutionDurationJavaTime() { return executionDuration; } diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java index 4dcf2c953..15e73a6b6 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java @@ -16,9 +16,11 @@ package com.google.cloud.datastore.testing; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; import static com.google.common.base.MoreObjects.firstNonNull; import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; import com.google.cloud.NoCredentials; import com.google.cloud.ServiceOptions; import com.google.cloud.datastore.DatastoreOptions; @@ -39,7 +41,6 @@ import java.util.UUID; import java.util.concurrent.TimeoutException; import java.util.logging.Logger; -import org.threeten.bp.Duration; /** * Utility to start and stop local Google Cloud Datastore emulators. @@ -316,6 +317,14 @@ public void reset() throws IOException { sendPostRequest("/reset"); } + /** This method is obsolete. Use {@link #stopDuration(java.time.Duration)} instead */ + @ObsoleteApi("Use stopDuration(java.time.Duration) instead") + @Override + public void stop(org.threeten.bp.Duration timeout) + throws IOException, InterruptedException, TimeoutException { + stopDuration(toJavaTimeDuration(timeout)); + } + /** * Stops the Datastore emulator. * @@ -328,15 +337,16 @@ public void reset() throws IOException { * this value high to ensure proper shutdown, like 5 seconds or more. */ @Override - public void stop(Duration timeout) throws IOException, InterruptedException, TimeoutException { + public void stopDuration(java.time.Duration timeout) + throws IOException, InterruptedException, TimeoutException { sendPostRequest("/shutdown"); - waitForProcess(timeout); + waitForProcessDuration(timeout); deleteRecursively(gcdPath); } /** - * Stops the Datastore emulator. The same as {@link #stop(Duration)} but with timeout duration of - * 20 seconds. + * Stops the Datastore emulator. The same as {@link #stopDuration(java.time.Duration)} but with + * timeout duration of 20 seconds. * *

It is important to stop the emulator. Since the emulator runs in its own process, not * stopping it might cause it to become orphan. @@ -344,7 +354,7 @@ public void stop(Duration timeout) throws IOException, InterruptedException, Tim *

It is not required to call {@link #reset()} before {@code stop()}. */ public void stop() throws IOException, InterruptedException, TimeoutException { - stop(Duration.ofSeconds(20)); + stopDuration(java.time.Duration.ofSeconds(20)); } static void deleteRecursively(Path path) throws IOException { diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java index 53158ec52..12a1b177e 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java @@ -56,9 +56,9 @@ import com.google.datastore.v1.RunQueryRequest; import com.google.datastore.v1.RunQueryResponse; import java.io.IOException; +import java.time.Duration; import java.util.List; import javax.annotation.Generated; -import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -328,21 +328,21 @@ public static class Builder extends StubSettings.Builder com.google.cloud sdk-platform-java-config - 3.39.0 + 3.40.0 diff --git a/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java b/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java index 045b16a9a..33aa63ab4 100644 --- a/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java +++ b/samples/snippets/src/test/java/com/google/datastore/snippets/ConceptsTest.java @@ -77,7 +77,6 @@ import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Duration; /** Contains Cloud Datastore snippets demonstrating concepts for documentation. */ @RunWith(JUnit4.class) @@ -147,7 +146,7 @@ public void tearDown() throws Exception { */ @AfterClass public static void afterClass() throws IOException, InterruptedException, TimeoutException { - HELPER.stop(Duration.ofMinutes(1)); + HELPER.stopDuration(java.time.Duration.ofMinutes(1)); } private void assertValidKey(Key taskKey) {