From d7e55886b62826f54f0bb12a6bfa4ef67dee6521 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Nov 2024 16:43:59 +0100 Subject: [PATCH 01/18] deps: update dependency com.google.cloud:google-cloud-core to v2.48.0 (#2263) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 2c8bbd5b4..0b935d6cc 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-core - 2.47.0 + 2.48.0 tests diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 5e487e769..832ed3825 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.47.0 + 2.48.0 tests diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1396e7ccc..fc08b048b 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -103,7 +103,7 @@ com.google.cloud google-cloud-core - 2.47.0 + 2.48.0 tests From 80a09e69111229080c413eff8426bd0b3d50458d Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Nov 2024 16:44:08 +0100 Subject: [PATCH 02/18] deps: update dependency com.google.cloud:google-cloud-storage to v2.45.0 (#2268) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 0b935d6cc..281a79c56 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -91,7 +91,7 @@ com.google.cloud google-cloud-storage - 2.44.1 + 2.45.0 com.google.cloud.opentelemetry diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 832ed3825..15d9e8385 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-storage - 2.44.1 + 2.45.0 com.google.cloud.opentelemetry From e621f78c53c28c0060063d891bf1db743a5c5c97 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Nov 2024 16:44:17 +0100 Subject: [PATCH 03/18] chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.134.2 (#2269) --- samples/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 281a79c56..722fb8789 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-pubsub - 1.134.1 + 1.134.2 From a5f70a9c2397a2c8f4642729922b742a3df01ed6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Nov 2024 16:44:26 +0100 Subject: [PATCH 04/18] deps: update dependency com.google.cloud:google-cloud-bigquery to v2.44.0 (#2270) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 722fb8789..d04a0348c 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -86,7 +86,7 @@ com.google.cloud google-cloud-bigquery - 2.43.3 + 2.44.0 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 15d9e8385..64cbe3041 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -85,7 +85,7 @@ com.google.cloud google-cloud-bigquery - 2.43.3 + 2.44.0 com.google.cloud From 7edfd9c315405c7703509fb9b7bc4f0d2686d870 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 21 Nov 2024 13:19:53 -0500 Subject: [PATCH 05/18] feat: introduce `java.time` variables and methods (#2271) * feat: introduce `java.time` variables and methods * ignore package private public interface changes --- .../clirr-ignored-differences.xml | 14 +++ .../cloud/pubsub/v1/MessageDispatcher.java | 6 +- .../com/google/cloud/pubsub/v1/Publisher.java | 20 ++--- .../v1/StreamingSubscriberConnection.java | 2 +- .../google/cloud/pubsub/v1/Subscriber.java | 88 ++++++++++++++----- .../pubsub/v1/FakePublisherServiceImpl.java | 2 +- .../v1/FakeScheduledExecutorService.java | 4 +- .../pubsub/v1/MessageDispatcherTest.java | 2 +- .../cloud/pubsub/v1/PublisherImplTest.java | 74 ++++++++-------- .../v1/StreamingSubscriberConnectionTest.java | 2 +- .../cloud/pubsub/v1/SubscriberTest.java | 11 ++- 11 files changed, 145 insertions(+), 80 deletions(-) diff --git a/google-cloud-pubsub/clirr-ignored-differences.xml b/google-cloud-pubsub/clirr-ignored-differences.xml index fc73daacd..866962660 100644 --- a/google-cloud-pubsub/clirr-ignored-differences.xml +++ b/google-cloud-pubsub/clirr-ignored-differences.xml @@ -1,4 +1,18 @@ + + 7005 + + com/google/cloud/pubsub/v1/MessageDispatcher$Builder + *(org.threeten.bp.Duration) + *(java.time.Duration) + + + 7005 + + com/google/cloud/pubsub/v1/StreamingSubscriberConnection$Builder + *(org.threeten.bp.Duration) + *(java.time.Duration) + diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java index 860fcbcf9..7112d4c02 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java @@ -28,6 +28,9 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.ReceivedMessage; +import java.time.Duration; +import java.time.Instant; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -48,9 +51,6 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; -import org.threeten.bp.Duration; -import org.threeten.bp.Instant; -import org.threeten.bp.temporal.ChronoUnit; /** * Dispatches messages to a message receiver while handling the messages acking and lease diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java index 3713cf69b..af7a57471 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java @@ -57,6 +57,7 @@ import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.Tracer; import java.io.IOException; +import java.time.Duration; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -73,7 +74,6 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; -import org.threeten.bp.Duration; /** * A Cloud Pub/Sub publisher, that is @@ -198,7 +198,7 @@ private Publisher(Builder builder) throws IOException { // key? retrySettingsBuilder .setMaxAttempts(Integer.MAX_VALUE) - .setTotalTimeout(Duration.ofNanos(Long.MAX_VALUE)); + .setTotalTimeoutDuration(Duration.ofNanos(Long.MAX_VALUE)); } PublisherStubSettings.Builder stubSettings = @@ -740,7 +740,7 @@ public static final class Builder { private static final double DEFAULT_MULTIPLIER = 4; static final BatchingSettings DEFAULT_BATCHING_SETTINGS = BatchingSettings.newBuilder() - .setDelayThreshold(DEFAULT_DELAY_THRESHOLD) + .setDelayThresholdDuration(DEFAULT_DELAY_THRESHOLD) .setRequestByteThreshold(DEFAULT_REQUEST_BYTES_THRESHOLD) .setElementCountThreshold(DEFAULT_ELEMENT_COUNT_THRESHOLD) .setFlowControlSettings( @@ -750,13 +750,13 @@ public static final class Builder { .build(); static final RetrySettings DEFAULT_RETRY_SETTINGS = RetrySettings.newBuilder() - .setTotalTimeout(DEFAULT_TOTAL_TIMEOUT) - .setInitialRetryDelay(DEFAULT_INITIAL_RETRY_DELAY) + .setTotalTimeoutDuration(DEFAULT_TOTAL_TIMEOUT) + .setInitialRetryDelayDuration(DEFAULT_INITIAL_RETRY_DELAY) .setRetryDelayMultiplier(DEFAULT_MULTIPLIER) - .setMaxRetryDelay(DEFAULT_MAX_RETRY_DELAY) - .setInitialRpcTimeout(DEFAULT_INITIAL_RPC_TIMEOUT) + .setMaxRetryDelayDuration(DEFAULT_MAX_RETRY_DELAY) + .setInitialRpcTimeoutDuration(DEFAULT_INITIAL_RPC_TIMEOUT) .setRpcTimeoutMultiplier(DEFAULT_MULTIPLIER) - .setMaxRpcTimeout(DEFAULT_MAX_RPC_TIMEOUT) + .setMaxRpcTimeoutDuration(DEFAULT_MAX_RPC_TIMEOUT) .build(); static final boolean DEFAULT_ENABLE_MESSAGE_ORDERING = false; private static final int THREADS_PER_CPU = 5; @@ -876,9 +876,9 @@ public Builder setBatchingSettings(BatchingSettings batchingSettings) { /** Configures the Publisher's retry parameters. */ public Builder setRetrySettings(RetrySettings retrySettings) { Preconditions.checkArgument( - retrySettings.getTotalTimeout().compareTo(MIN_TOTAL_TIMEOUT) >= 0); + retrySettings.getTotalTimeoutDuration().compareTo(MIN_TOTAL_TIMEOUT) >= 0); Preconditions.checkArgument( - retrySettings.getInitialRpcTimeout().compareTo(MIN_RPC_TIMEOUT) >= 0); + retrySettings.getInitialRpcTimeoutDuration().compareTo(MIN_RPC_TIMEOUT) >= 0); this.retrySettings = retrySettings; return this; } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java index 60da55cee..3ad124f80 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java @@ -51,6 +51,7 @@ import io.grpc.Status; import io.grpc.protobuf.StatusProto; import io.opentelemetry.api.trace.Span; +import java.time.Duration; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -68,7 +69,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; -import org.threeten.bp.Duration; /** Implementation of {@link AckProcessor} based on Cloud Pub/Sub streaming pull. */ final class StreamingSubscriberConnection extends AbstractApiService implements AckProcessor { diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java index e9926fa58..4b9ea3825 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java @@ -16,12 +16,15 @@ package com.google.cloud.pubsub.v1; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; + import com.google.api.core.AbstractApiService; import com.google.api.core.ApiClock; import com.google.api.core.ApiService; import com.google.api.core.BetaApi; import com.google.api.core.CurrentMillisClock; import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.batching.FlowControlSettings; import com.google.api.gax.batching.FlowController; import com.google.api.gax.batching.FlowController.LimitExceededBehavior; @@ -55,7 +58,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; -import org.threeten.bp.Duration; /** * A Cloud Pub/Sub subscriber that is @@ -98,24 +100,37 @@ public class Subscriber extends AbstractApiService implements SubscriberInterfac private static final int MAX_INBOUND_METADATA_SIZE = 4 * 1024 * 1024; // 4MB API maximum metadata size - @InternalApi static final Duration DEFAULT_MAX_ACK_EXTENSION_PERIOD = Duration.ofMinutes(60); + @InternalApi + static final java.time.Duration DEFAULT_MAX_ACK_EXTENSION_PERIOD = + java.time.Duration.ofMinutes(60); @InternalApi - static final Duration DEFAULT_MIN_ACK_DEADLINE_EXTENSION_EXACTLY_ONCE_DELIVERY = - Duration.ofMinutes(1); + static final java.time.Duration DEFAULT_MIN_ACK_DEADLINE_EXTENSION_EXACTLY_ONCE_DELIVERY = + java.time.Duration.ofMinutes(1); - @InternalApi static final Duration DEFAULT_MIN_ACK_DEADLINE_EXTENSION = Duration.ofMinutes(0); - @InternalApi static final Duration DEFAULT_MAX_ACK_DEADLINE_EXTENSION = Duration.ofSeconds(0); + @InternalApi + static final java.time.Duration DEFAULT_MIN_ACK_DEADLINE_EXTENSION = + java.time.Duration.ofMinutes(0); - @InternalApi static final Duration MIN_STREAM_ACK_DEADLINE = Duration.ofSeconds(10); - @InternalApi static final Duration MAX_STREAM_ACK_DEADLINE = Duration.ofSeconds(600); + @InternalApi + static final java.time.Duration DEFAULT_MAX_ACK_DEADLINE_EXTENSION = + java.time.Duration.ofSeconds(0); - @InternalApi static final Duration STREAM_ACK_DEADLINE_DEFAULT = Duration.ofSeconds(60); + @InternalApi + static final java.time.Duration MIN_STREAM_ACK_DEADLINE = java.time.Duration.ofSeconds(10); @InternalApi - static final Duration STREAM_ACK_DEADLINE_EXACTLY_ONCE_DELIVERY_DEFAULT = Duration.ofSeconds(60); + static final java.time.Duration MAX_STREAM_ACK_DEADLINE = java.time.Duration.ofSeconds(600); - @InternalApi static final Duration ACK_EXPIRATION_PADDING_DEFAULT = Duration.ofSeconds(5); + @InternalApi + static final java.time.Duration STREAM_ACK_DEADLINE_DEFAULT = java.time.Duration.ofSeconds(60); + + @InternalApi + static final java.time.Duration STREAM_ACK_DEADLINE_EXACTLY_ONCE_DELIVERY_DEFAULT = + java.time.Duration.ofSeconds(60); + + @InternalApi + static final java.time.Duration ACK_EXPIRATION_PADDING_DEFAULT = java.time.Duration.ofSeconds(5); private static final Logger logger = Logger.getLogger(Subscriber.class.getName()); @@ -124,10 +139,10 @@ public class Subscriber extends AbstractApiService implements SubscriberInterfac private final String subscriptionName; private final FlowControlSettings flowControlSettings; private final boolean useLegacyFlowControl; - private final Duration maxAckExtensionPeriod; - private final Duration maxDurationPerAckExtension; + private final java.time.Duration maxAckExtensionPeriod; + private final java.time.Duration maxDurationPerAckExtension; private final boolean maxDurationPerAckExtensionDefaultUsed; - private final Duration minDurationPerAckExtension; + private final java.time.Duration minDurationPerAckExtension; private final boolean minDurationPerAckExtensionDefaultUsed; // The ExecutorProvider used to generate executors for processing messages. @@ -490,10 +505,10 @@ public static final class Builder { private MessageReceiver receiver; private MessageReceiverWithAckResponse receiverWithAckResponse; - private Duration maxAckExtensionPeriod = DEFAULT_MAX_ACK_EXTENSION_PERIOD; - private Duration minDurationPerAckExtension = DEFAULT_MIN_ACK_DEADLINE_EXTENSION; + private java.time.Duration maxAckExtensionPeriod = DEFAULT_MAX_ACK_EXTENSION_PERIOD; + private java.time.Duration minDurationPerAckExtension = DEFAULT_MIN_ACK_DEADLINE_EXTENSION; private boolean minDurationPerAckExtensionDefaultUsed = true; - private Duration maxDurationPerAckExtension = DEFAULT_MAX_ACK_DEADLINE_EXTENSION; + private java.time.Duration maxDurationPerAckExtension = DEFAULT_MAX_ACK_DEADLINE_EXTENSION; private boolean maxDurationPerAckExtensionDefaultUsed = true; private boolean useLegacyFlowControl = false; @@ -505,7 +520,7 @@ public static final class Builder { SubscriptionAdminSettings.defaultGrpcTransportProviderBuilder() .setMaxInboundMessageSize(MAX_INBOUND_MESSAGE_SIZE) .setMaxInboundMetadataSize(MAX_INBOUND_METADATA_SIZE) - .setKeepAliveTime(Duration.ofMinutes(5)) + .setKeepAliveTimeDuration(java.time.Duration.ofMinutes(5)) .build(); private HeaderProvider headerProvider = new NoHeaderProvider(); private CredentialsProvider credentialsProvider = @@ -596,6 +611,15 @@ public Builder setUseLegacyFlowControl(boolean value) { return this; } + /** + * This method is obsolete. Use {@link #setMaxAckExtensionPeriodDuration(java.time.Duration)} + * instead. + */ + @ObsoleteApi("Use setMaxAckExtensionPeriodDuration(java.time.Duration) instead") + public Builder setMaxAckExtensionPeriod(org.threeten.bp.Duration maxAckExtensionPeriod) { + return setMaxAckExtensionPeriodDuration(toJavaTimeDuration(maxAckExtensionPeriod)); + } + /** * Set the maximum period a message ack deadline will be extended. Defaults to one hour. * @@ -605,12 +629,22 @@ public Builder setUseLegacyFlowControl(boolean value) { * *

A zero duration effectively disables auto deadline extensions. */ - public Builder setMaxAckExtensionPeriod(Duration maxAckExtensionPeriod) { + public Builder setMaxAckExtensionPeriodDuration(java.time.Duration maxAckExtensionPeriod) { Preconditions.checkArgument(maxAckExtensionPeriod.toMillis() >= 0); this.maxAckExtensionPeriod = maxAckExtensionPeriod; return this; } + /** + * This method is obsolete. Use {@link + * #setMaxDurationPerAckExtensionDuration(java.time.Duration)} instead. + */ + @ObsoleteApi("Use setMaxDurationPerAckExtensionDuration(java.time.Duration) instead") + public Builder setMaxDurationPerAckExtension( + org.threeten.bp.Duration maxDurationPerAckExtension) { + return setMaxDurationPerAckExtensionDuration(toJavaTimeDuration(maxDurationPerAckExtension)); + } + /** * Set the upper bound for a single mod ack extention period. * @@ -621,7 +655,8 @@ public Builder setMaxAckExtensionPeriod(Duration maxAckExtensionPeriod) { * *

MaxDurationPerAckExtension configuration can be disabled by specifying a zero duration. */ - public Builder setMaxDurationPerAckExtension(Duration maxDurationPerAckExtension) { + public Builder setMaxDurationPerAckExtensionDuration( + java.time.Duration maxDurationPerAckExtension) { // If a non-default min is set, make sure min is less than max Preconditions.checkArgument( maxDurationPerAckExtension.toMillis() >= 0 @@ -633,6 +668,16 @@ public Builder setMaxDurationPerAckExtension(Duration maxDurationPerAckExtension return this; } + /** + * This method is obsolete. Use {@link + * #setMinDurationPerAckExtensionDuration(java.time.Duration)} instead. + */ + @ObsoleteApi("Use setMinDurationPerAckExtensionDuration(java.time.Duration) instead") + public Builder setMinDurationPerAckExtension( + org.threeten.bp.Duration minDurationPerAckExtension) { + return setMinDurationPerAckExtensionDuration(toJavaTimeDuration(minDurationPerAckExtension)); + } + /** * Set the lower bound for a single mod ack extention period. * @@ -643,7 +688,8 @@ public Builder setMaxDurationPerAckExtension(Duration maxDurationPerAckExtension * *

MinDurationPerAckExtension configuration can be disabled by specifying a zero duration. */ - public Builder setMinDurationPerAckExtension(Duration minDurationPerAckExtension) { + public Builder setMinDurationPerAckExtensionDuration( + java.time.Duration minDurationPerAckExtension) { // If a non-default max is set, make sure min is less than max Preconditions.checkArgument( minDurationPerAckExtension.toMillis() >= 0 diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java index 23817f558..9ab1dec73 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java @@ -21,13 +21,13 @@ import com.google.pubsub.v1.PublishResponse; import com.google.pubsub.v1.PublisherGrpc.PublisherImplBase; import io.grpc.stub.StreamObserver; +import java.time.Duration; import java.util.ArrayList; import java.util.List; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.threeten.bp.Duration; /** * A fake implementation of {@link PublisherImplBase}, that can be used to test clients of a Cloud diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java index cf067e2da..65e199e92 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java @@ -18,6 +18,8 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.SettableFuture; +import java.time.Duration; +import java.time.Instant; import java.util.ArrayList; import java.util.Deque; import java.util.LinkedList; @@ -32,8 +34,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; -import org.threeten.bp.Duration; -import org.threeten.bp.Instant; /** * Fake implementation of {@link ScheduledExecutorService} that allows tests control the reference diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java index c608ee8d5..bd3dccccf 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java @@ -26,13 +26,13 @@ import com.google.protobuf.ByteString; import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.ReceivedMessage; +import java.time.Duration; import java.util.*; import java.util.concurrent.*; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.threeten.bp.Duration; public class MessageDispatcherTest { private static final ByteString MESSAGE_DATA = ByteString.copyFromUtf8("message-data"); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java index 411b61d15..cdefa84f7 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java @@ -54,6 +54,7 @@ import io.opentelemetry.sdk.testing.assertj.SpanDataAssert; import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; +import java.time.Duration; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; @@ -66,7 +67,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class PublisherImplTest { @@ -120,7 +120,7 @@ public void testPublishByDuration() throws Exception { .setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setElementCountThreshold(10L) .build()) .build(); @@ -151,7 +151,7 @@ public void testPublishByNumBatchedMessages() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .build(); @@ -190,7 +190,7 @@ public void testSinglePublishByNumBytes() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .build(); @@ -225,7 +225,7 @@ public void testPublishByShutdown() throws Exception { .setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .setElementCountThreshold(10L) .build()) .build(); @@ -259,7 +259,7 @@ public void testPublishMixedSizeAndDuration() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); @@ -300,7 +300,7 @@ public void testPublishWithCompression() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableCompression(true) .setCompressionBytesThreshold(100) @@ -331,7 +331,7 @@ public void testBatchedMessagesWithOrderingKeyByNum() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(3L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableMessageOrdering(true) .build(); @@ -384,7 +384,7 @@ public void testBatchedMessagesWithOrderingKeyByDuration() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(10L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableMessageOrdering(true) .build(); @@ -448,7 +448,7 @@ public void testLargeMessagesDoNotReorderBatches() throws Exception { .toBuilder() .setElementCountThreshold(10L) .setRequestByteThreshold(64L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableMessageOrdering(true) .build(); @@ -490,7 +490,7 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(1) .build()) .setEnableMessageOrdering(true) @@ -613,7 +613,7 @@ public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws E Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(500)) + .setDelayThresholdDuration(Duration.ofSeconds(500)) .build()) .setEnableMessageOrdering(true) .build(); @@ -674,7 +674,7 @@ public void testErrorPropagation() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); testPublisherServiceImpl.addPublishError(Status.DATA_LOSS.asException()); @@ -695,7 +695,7 @@ public void testPublishFailureRetries() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); // To demonstrate that reaching duration will trigger publish @@ -718,7 +718,7 @@ public void testPublishFailureRetries_retriesDisabled() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(1) .build()) .build(); @@ -743,7 +743,7 @@ public void testPublishFailureRetries_maxRetriesSetup() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(3) .build()) .build(); @@ -768,7 +768,7 @@ public void testPublishFailureRetries_maxRetriesSetUnlimited() throws Exception .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(0) .build()) .build(); @@ -794,13 +794,13 @@ public void testPublishFailureRetries_nonRetryableFailsImmediately() throws Exce .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .build()) .setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); // To demonstrate that reaching duration will trigger publish @@ -825,7 +825,7 @@ public void testPublisherGetters() throws Exception { builder.setBatchingSettings( BatchingSettings.newBuilder() .setRequestByteThreshold(10L) - .setDelayThreshold(Duration.ofMillis(11)) + .setDelayThresholdDuration(Duration.ofMillis(11)) .setElementCountThreshold(12L) .build()); builder.setCredentialsProvider(NoCredentialsProvider.create()); @@ -833,7 +833,8 @@ public void testPublisherGetters() throws Exception { assertEquals(TEST_TOPIC, publisher.getTopicName()); assertEquals(10, (long) publisher.getBatchingSettings().getRequestByteThreshold()); - assertEquals(Duration.ofMillis(11), publisher.getBatchingSettings().getDelayThreshold()); + assertEquals( + Duration.ofMillis(11), publisher.getBatchingSettings().getDelayThresholdDuration()); assertEquals(12, (long) publisher.getBatchingSettings().getElementCountThreshold()); publisher.shutdown(); assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); @@ -848,7 +849,8 @@ public void testBuilderParametersAndDefaults() { Publisher.Builder.DEFAULT_REQUEST_BYTES_THRESHOLD, builder.batchingSettings.getRequestByteThreshold().longValue()); assertEquals( - Publisher.Builder.DEFAULT_DELAY_THRESHOLD, builder.batchingSettings.getDelayThreshold()); + Publisher.Builder.DEFAULT_DELAY_THRESHOLD, + builder.batchingSettings.getDelayThresholdDuration()); assertEquals( Publisher.Builder.DEFAULT_ELEMENT_COUNT_THRESHOLD, builder.batchingSettings.getElementCountThreshold().longValue()); @@ -906,7 +908,7 @@ public void testBuilderInvalidArguments() { builder.setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofMillis(1)) + .setDelayThresholdDuration(Duration.ofMillis(1)) .build()); try { builder.setBatchingSettings( @@ -919,7 +921,7 @@ public void testBuilderInvalidArguments() { builder.setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofMillis(-1)) + .setDelayThresholdDuration(Duration.ofMillis(-1)) .build()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { @@ -965,13 +967,13 @@ public void testBuilderInvalidArguments() { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setInitialRpcTimeout(Publisher.Builder.MIN_RPC_TIMEOUT) + .setInitialRpcTimeoutDuration(Publisher.Builder.MIN_RPC_TIMEOUT) .build()); try { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setInitialRpcTimeout(Publisher.Builder.MIN_RPC_TIMEOUT.minusMillis(1)) + .setInitialRpcTimeoutDuration(Publisher.Builder.MIN_RPC_TIMEOUT.minusMillis(1)) .build()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { @@ -980,13 +982,13 @@ public void testBuilderInvalidArguments() { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Publisher.Builder.MIN_TOTAL_TIMEOUT) + .setTotalTimeoutDuration(Publisher.Builder.MIN_TOTAL_TIMEOUT) .build()); try { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Publisher.Builder.MIN_TOTAL_TIMEOUT.minusMillis(1)) + .setTotalTimeoutDuration(Publisher.Builder.MIN_TOTAL_TIMEOUT.minusMillis(1)) .build()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { @@ -1031,7 +1033,7 @@ public void testAwaitTermination() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(0) .build()) .build(); @@ -1066,7 +1068,7 @@ public void invalidFlowControlBytes_throwException() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1091,7 +1093,7 @@ public void invalidFlowControlElementCount_throwException() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1116,7 +1118,7 @@ public void testMessageExceedsFlowControlLimits_throwException() throws Exceptio Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) @@ -1144,7 +1146,7 @@ public void testPublishFlowControl_throwException() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1186,7 +1188,7 @@ public void testPublishFlowControl_throwExceptionWithOrderingKey() throws Except Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1233,7 +1235,7 @@ public void testPublishFlowControl_block() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) @@ -1325,7 +1327,7 @@ public void testPublishOpenTelemetryTracing() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java index 95f8897a4..412dd2ad8 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java @@ -34,6 +34,7 @@ import com.google.rpc.Status; import io.grpc.StatusException; import io.grpc.protobuf.StatusProto; +import java.time.Duration; import java.util.*; import java.util.concurrent.ExecutionException; import org.junit.After; @@ -41,7 +42,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; -import org.threeten.bp.Duration; /** Tests for {@link StreamingSubscriberConnection}. */ public class StreamingSubscriberConnectionTest { diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java index 612c244fe..679d37e40 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java @@ -35,13 +35,13 @@ import io.grpc.StatusException; import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; +import java.time.Duration; import java.util.concurrent.*; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; -import org.threeten.bp.Duration; /** Tests for {@link Subscriber}. */ public class SubscriberTest { @@ -241,7 +241,8 @@ public void testStreamAckDeadlineIsSetCorrectly() throws Exception { Subscriber subscriber = startSubscriber( getTestSubscriberBuilder(testReceiver) - .setMaxDurationPerAckExtension(Duration.ofSeconds(maxDurationPerAckExtension))); + .setMaxDurationPerAckExtensionDuration( + Duration.ofSeconds(maxDurationPerAckExtension))); assertEquals( expectedChannelCount, fakeSubscriberServiceImpl.waitForOpenedStreams(expectedChannelCount)); assertEquals( @@ -255,7 +256,8 @@ public void testStreamAckDeadlineIsSetCorrectly() throws Exception { subscriber = startSubscriber( getTestSubscriberBuilder(testReceiver) - .setMaxDurationPerAckExtension(Duration.ofSeconds(maxDurationPerAckExtension))); + .setMaxDurationPerAckExtensionDuration( + Duration.ofSeconds(maxDurationPerAckExtension))); assertEquals( expectedChannelCount, fakeSubscriberServiceImpl.waitForOpenedStreams(expectedChannelCount)); assertEquals( @@ -269,7 +271,8 @@ public void testStreamAckDeadlineIsSetCorrectly() throws Exception { subscriber = startSubscriber( getTestSubscriberBuilder(testReceiver) - .setMaxDurationPerAckExtension(Duration.ofSeconds(maxDurationPerAckExtension))); + .setMaxDurationPerAckExtensionDuration( + Duration.ofSeconds(maxDurationPerAckExtension))); assertEquals( expectedChannelCount, fakeSubscriberServiceImpl.waitForOpenedStreams(expectedChannelCount)); assertEquals( From 1696d02d4040f90c02337df77767a392e345d1e4 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Wed, 27 Nov 2024 20:22:40 +0000 Subject: [PATCH 06/18] chore: make library generation required (#2274) * chore: make library generation required * chore: generate libraries at Wed Nov 27 20:07:36 UTC 2024 --------- Co-authored-by: cloud-java-bot --- .github/sync-repo-settings.yaml | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 8f2999f82..491be19e7 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -18,6 +18,7 @@ branchProtectionRules: - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc + - library_generation - pattern: 1.111.0-sp isAdminEnforced: true requiredApprovingReviewCount: 1 diff --git a/README.md b/README.md index fc05a067d..de4683403 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.134.1 + 1.134.2 ``` From 7b846fd3492bd36a7c721ac1c950dcc596d2c4d3 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 28 Nov 2024 07:42:26 -0500 Subject: [PATCH 07/18] chore: mark the unmanaged dependency check required (#2275) b/326247198 --- .github/sync-repo-settings.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 491be19e7..9908bfe38 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -19,6 +19,7 @@ branchProtectionRules: - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc - library_generation + - unmanaged_dependency_check - pattern: 1.111.0-sp isAdminEnforced: true requiredApprovingReviewCount: 1 From 54ac1afeae155aec0418235a3c5cf5754c039890 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 00:54:48 +0100 Subject: [PATCH 08/18] chore(deps): update dependency com.google.cloud:libraries-bom to v26.51.0 (#2278) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index fc08b048b..e1b5be620 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 26.50.0 + 26.51.0 pom import From 54ef88d7f822d8130717e3be9bcf7fe9901d6cb0 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 00:55:05 +0100 Subject: [PATCH 09/18] deps: update dependency com.google.protobuf:protobuf-java-util to v4.29.0 (#2276) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d04a0348c..aa16633ce 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -75,7 +75,7 @@ com.google.protobuf protobuf-java-util - 4.28.3 + 4.29.0 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 64cbe3041..a22da39b0 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -61,7 +61,7 @@ com.google.protobuf protobuf-java-util - 4.28.3 + 4.29.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index e1b5be620..6aa3fa562 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -85,7 +85,7 @@ com.google.protobuf protobuf-java-util - 4.28.3 + 4.29.0 From 44b13326443cee437ca048ce6303f0d72c924884 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:54:28 -0500 Subject: [PATCH 10/18] chore(main): release 1.134.3-SNAPSHOT (#2266) * chore(main): release 1.134.3-SNAPSHOT * chore: generate libraries at Wed Dec 4 23:56:04 UTC 2024 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot --- README.md | 2 +- google-cloud-pubsub-bom/pom.xml | 8 ++++---- google-cloud-pubsub/pom.xml | 4 ++-- grpc-google-cloud-pubsub-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-pubsub-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index de4683403..da72489ca 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.50.0 + 26.51.0 pom import diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index fd4ab205c..7c4533272 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.134.2 + 1.134.3-SNAPSHOT pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.134.2 + 1.134.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.2 + 1.116.3-SNAPSHOT com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.2 + 1.116.3-SNAPSHOT diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 34ccd6268..81df2d440 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.134.2 + 1.134.3-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.134.2 + 1.134.3-SNAPSHOT google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index dea977515..a216915ef 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.2 + 1.116.3-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.134.2 + 1.134.3-SNAPSHOT diff --git a/pom.xml b/pom.xml index 6407100a6..8ff9d06eb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.134.2 + 1.134.3-SNAPSHOT Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.2 + 1.116.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.2 + 1.116.3-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.134.2 + 1.134.3-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index fa506eee8..beac4e05e 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.2 + 1.116.3-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.134.2 + 1.134.3-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a22da39b0..a78025dc9 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.134.2 + 1.134.3-SNAPSHOT diff --git a/versions.txt b/versions.txt index 83ccf2fa9..d397e309f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.134.2:1.134.2 -grpc-google-cloud-pubsub-v1:1.116.2:1.116.2 -proto-google-cloud-pubsub-v1:1.116.2:1.116.2 +google-cloud-pubsub:1.134.2:1.134.3-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.116.2:1.116.3-SNAPSHOT +proto-google-cloud-pubsub-v1:1.116.2:1.116.3-SNAPSHOT From 8aeff1a375f3aa989d2c4bde0ed3dd2f329601fc Mon Sep 17 00:00:00 2001 From: Mike Prieto Date: Fri, 6 Dec 2024 10:18:07 -0500 Subject: [PATCH 11/18] docs: Fix repository URL in samples README (#2280) --- samples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/README.md b/samples/README.md index 5656f6f4d..4390e7ea6 100644 --- a/samples/README.md +++ b/samples/README.md @@ -2,7 +2,7 @@ 1. Clone this repo and navigate to the `snippets` directory. ```shell - git clone https://github.com/googlepis/java-pubsub + git clone https://github.com/googleapis/java-pubsub cd java-pubsub/samples/snippets ``` From de3c9e1c7f2fe6413d0ae7a18955f16611df95c6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 6 Dec 2024 21:45:47 +0100 Subject: [PATCH 12/18] deps: update dependency com.google.protobuf:protobuf-java-util to v4.29.1 (#2279) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index aa16633ce..be35be282 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -75,7 +75,7 @@ com.google.protobuf protobuf-java-util - 4.29.0 + 4.29.1 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a78025dc9..330d16423 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -61,7 +61,7 @@ com.google.protobuf protobuf-java-util - 4.29.0 + 4.29.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6aa3fa562..63e037941 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -85,7 +85,7 @@ com.google.protobuf protobuf-java-util - 4.29.0 + 4.29.1 From 7e180475bad15851b5fe2b6c278a6e3f527a5dbe Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:46:05 -0500 Subject: [PATCH 13/18] chore: Update generation configuration at Fri Dec 6 02:31:00 UTC 2024 (#2267) * chore: Update generation configuration at Tue Nov 19 02:29:41 UTC 2024 * chore: Update generation configuration at Wed Nov 20 02:29:07 UTC 2024 * chore: Update generation configuration at Thu Nov 21 02:28:56 UTC 2024 * chore: Update generation configuration at Fri Nov 22 02:29:33 UTC 2024 * chore: Update generation configuration at Sat Nov 23 02:27:22 UTC 2024 * chore: Update generation configuration at Tue Nov 26 02:29:47 UTC 2024 * chore: Update generation configuration at Wed Nov 27 02:30:44 UTC 2024 * chore: Update generation configuration at Thu Nov 28 02:30:34 UTC 2024 * chore: Update generation configuration at Fri Nov 29 02:30:35 UTC 2024 * chore: Update generation configuration at Tue Dec 3 02:31:16 UTC 2024 * chore: Update generation configuration at Wed Dec 4 02:31:23 UTC 2024 * chore: Update generation configuration at Thu Dec 5 02:31:38 UTC 2024 * chore: Update generation configuration at Fri Dec 6 02:31:00 UTC 2024 * chore: generate libraries at Fri Dec 6 02:31:31 UTC 2024 --- README.md | 2 +- generation_config.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index da72489ca..3f0f73f52 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.50.0') +implementation platform('com.google.cloud:libraries-bom:26.51.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` diff --git a/generation_config.yaml b/generation_config.yaml index 1cd5e6971..7dac230ff 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.50.0 -googleapis_commitish: 0b5613ee74c9558dd284aa2b01a585ce297c0045 -libraries_bom_version: 26.50.0 +googleapis_commitish: 3be31fed1e19de78da8ae8a7f074ecaae5d1db60 +libraries_bom_version: 26.51.0 libraries: - api_shortname: pubsub name_pretty: Cloud Pub/Sub From 0be820e2044253bf484d88d703ce2dfade7aa137 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 12 Dec 2024 20:04:27 +0100 Subject: [PATCH 14/18] deps: update googleapis/sdk-platform-java action to v2.51.0 (#2284) --- .github/workflows/hermetic_library_generation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 35aa3b151..604b674ba 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.50.0 + - uses: googleapis/sdk-platform-java/.github/scripts@v2.51.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} From cd94a1987271eea4d7744286a7daeb071bb9456a Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 12 Dec 2024 20:12:31 +0100 Subject: [PATCH 15/18] deps: update dependency com.google.cloud:google-cloud-core to v2.49.0 (#2285) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index be35be282..c9853204f 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-core - 2.48.0 + 2.49.0 tests diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 330d16423..84b375212 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.48.0 + 2.49.0 tests diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 63e037941..c74d17651 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -103,7 +103,7 @@ com.google.cloud google-cloud-core - 2.48.0 + 2.49.0 tests From 0c0a1b9231953e5c9878e0dfcf5a55d01794f6c4 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 12 Dec 2024 20:17:12 +0100 Subject: [PATCH 16/18] deps: update dependency com.google.cloud:sdk-platform-java-config to v3.41.0 (#2286) --- .github/workflows/unmanaged_dependency_check.yaml | 2 +- .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- google-cloud-pubsub-bom/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index 1834e52e1..c1918a2b7 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -17,6 +17,6 @@ jobs: # repository .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.40.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.41.0 with: bom-path: google-cloud-pubsub-bom/pom.xml diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index 82ed3a43e..76ca3ee6d 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.40.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.41.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index a836c97f0..644bb62ce 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.40.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.41.0" } env_vars: { diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 7c4533272..a69c63990 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud sdk-platform-java-config - 3.40.0 + 3.41.0 Google Cloud pubsub BOM diff --git a/pom.xml b/pom.xml index 8ff9d06eb..d4dc1c90b 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.40.0 + 3.41.0 From 0b0d52c8fca179a913a8b04d76b44748f1886f45 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:48:26 -0500 Subject: [PATCH 17/18] chore: Update generation configuration at Thu Dec 12 19:17:58 UTC 2024 (#2287) * chore: Update generation configuration at Thu Dec 12 19:17:58 UTC 2024 * update renovate.json * update generator version in config * update workflow script --------- Co-authored-by: JoeWang1127 --- .github/scripts/update_generation_config.sh | 63 ++++++++++++++++++--- generation_config.yaml | 4 +- renovate.json | 17 ------ 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index 561a31304..91434688c 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -28,11 +28,23 @@ function update_config() { sed -i -e "s/^${key_word}.*$/${key_word}: ${new_value}/" "${file}" } +# Update an action to a new version in GitHub action. +function update_action() { + local key_word=$1 + local new_value=$2 + local file=$3 + echo "Update ${key_word} to ${new_value} in ${file}" + # use a different delimiter because the key_word contains "/". + sed -i -e "s|${key_word}@v.*$|${key_word}@v${new_value}|" "${file}" +} + # The parameters of this script is: # 1. base_branch, the base branch of the result pull request. # 2. repo, organization/repo-name, e.g., googleapis/google-cloud-java # 3. [optional] generation_config, the path to the generation configuration, # the default value is generation_config.yaml in the repository root. +# 4. [optional] workflow, the library generation workflow file, +# the default value is .github/workflows/hermetic_library_generation.yaml. while [[ $# -gt 0 ]]; do key="$1" case "${key}" in @@ -48,6 +60,10 @@ case "${key}" in generation_config="$2" shift ;; + --workflow) + workflow="$2" + shift + ;; *) echo "Invalid option: [$1]" exit 1 @@ -71,21 +87,34 @@ if [ -z "${generation_config}" ]; then echo "Use default generation config: ${generation_config}" fi +if [ -z "${workflow}" ]; then + workflow=".github/workflows/hermetic_library_generation.yaml" + echo "Use default library generation workflow file: ${workflow}" +fi + current_branch="generate-libraries-${base_branch}" title="chore: Update generation configuration at $(date)" -# try to find a open pull request associated with the branch +git checkout "${base_branch}" +# Try to find a open pull request associated with the branch pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number") -# create a branch if there's no open pull request associated with the +# Create a branch if there's no open pull request associated with the # branch; otherwise checkout the pull request. if [ -z "${pr_num}" ]; then git checkout -b "${current_branch}" + # Push the current branch to remote so that we can + # compare the commits later. + git push -u origin "${current_branch}" else gh pr checkout "${pr_num}" fi +# Only allow fast-forward merging; exit with non-zero result if there's merging +# conflict. +git merge -m "chore: merge ${base_branch} into ${current_branch}" "${base_branch}" + mkdir tmp-googleapis -# use partial clone because only commit history is needed. +# Use partial clone because only commit history is needed. git clone --filter=blob:none https://github.com/googleapis/googleapis.git tmp-googleapis pushd tmp-googleapis git pull @@ -94,25 +123,43 @@ popd rm -rf tmp-googleapis update_config "googleapis_commitish" "${latest_commit}" "${generation_config}" -# update gapic-generator-java version to the latest +# Update gapic-generator-java version to the latest latest_version=$(get_latest_released_version "com.google.api" "gapic-generator-java") update_config "gapic_generator_version" "${latest_version}" "${generation_config}" -# update libraries-bom version to the latest +# Update composite action version to latest gapic-generator-java version +update_action "googleapis/sdk-platform-java/.github/scripts" \ + "${latest_version}" \ + "${workflow}" + +# Update libraries-bom version to the latest latest_version=$(get_latest_released_version "com.google.cloud" "libraries-bom") update_config "libraries_bom_version" "${latest_version}" "${generation_config}" -git add "${generation_config}" +git add "${generation_config}" "${workflow}" changed_files=$(git diff --cached --name-only) if [[ "${changed_files}" == "" ]]; then echo "The latest generation config is not changed." echo "Skip committing to the pull request." +else + git commit -m "${title}" +fi + +# There are potentially at most two commits: merge commit and change commit. +# We want to exit the script if no commit happens (otherwise this will be an +# infinite loop). +# `git cherry` is a way to find whether the local branch has commits that are +# not in the remote branch. +# If we find any such commit, push them to remote branch. +unpushed_commit=$(git cherry -v "origin/${current_branch}" | wc -l) +if [[ "${unpushed_commit}" -eq 0 ]]; then + echo "No unpushed commits, exit" exit 0 fi -git commit -m "${title}" + if [ -z "${pr_num}" ]; then git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${repo}.git" - git fetch -q --unshallow remote_repo + git fetch -q remote_repo git push -f remote_repo "${current_branch}" gh pr create --title "${title}" --head "${current_branch}" --body "${title}" --base "${base_branch}" else diff --git a/generation_config.yaml b/generation_config.yaml index 7dac230ff..a1f95639c 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.50.0 -googleapis_commitish: 3be31fed1e19de78da8ae8a7f074ecaae5d1db60 +gapic_generator_version: 2.51.0 +googleapis_commitish: 7d0c6bee2517d77635beb2a1dd6d6e7d4d943512 libraries_bom_version: 26.51.0 libraries: - api_shortname: pubsub diff --git a/renovate.json b/renovate.json index 9afb4c0bf..f67202e06 100644 --- a/renovate.json +++ b/renovate.json @@ -41,16 +41,6 @@ ], "depNameTemplate": "com.google.cloud:sdk-platform-java-config", "datasourceTemplate": "maven" - }, - { - "fileMatch": [ - "^.github/workflows/hermetic_library_generation.yaml$" - ], - "matchStrings": [ - "uses: googleapis/sdk-platform-java/.github/scripts@v(?.+?)\\n" - ], - "depNameTemplate": "com.google.api:gapic-generator-java", - "datasourceTemplate": "maven" } ], "packageRules": [ @@ -111,13 +101,6 @@ "^com.fasterxml.jackson.core" ], "groupName": "jackson dependencies" - }, - { - "matchPackagePatterns": [ - "^com.google.api:gapic-generator-java", - "^com.google.cloud:sdk-platform-java-config" - ], - "groupName": "SDK platform Java dependencies" } ], "semanticCommits": true, From 34704b0df3fa0be3359c585b8fe8d51ad3d2362d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:14:04 -0500 Subject: [PATCH 18/18] chore(main): release 1.135.0 (#2281) * chore(main): release 1.135.0 * chore: generate libraries at Thu Dec 12 20:49:16 UTC 2024 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot --- CHANGELOG.md | 29 ++++++++++++++++++++++++++++ README.md | 6 +++--- google-cloud-pubsub-bom/pom.xml | 8 ++++---- google-cloud-pubsub/pom.xml | 4 ++-- grpc-google-cloud-pubsub-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-pubsub-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 9 files changed, 50 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d9f118d..2aebaf6bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [1.135.0](https://github.com/googleapis/java-pubsub/compare/v1.134.2...v1.135.0) (2024-12-12) + + +### Features + +* Introduce `java.time` variables and methods ([#2271](https://github.com/googleapis/java-pubsub/issues/2271)) ([7edfd9c](https://github.com/googleapis/java-pubsub/commit/7edfd9c315405c7703509fb9b7bc4f0d2686d870)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.51.0 ([0b0d52c](https://github.com/googleapis/java-pubsub/commit/0b0d52c8fca179a913a8b04d76b44748f1886f45)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.44.0 ([#2270](https://github.com/googleapis/java-pubsub/issues/2270)) ([a5f70a9](https://github.com/googleapis/java-pubsub/commit/a5f70a9c2397a2c8f4642729922b742a3df01ed6)) +* Update dependency com.google.cloud:google-cloud-core to v2.48.0 ([#2263](https://github.com/googleapis/java-pubsub/issues/2263)) ([d7e5588](https://github.com/googleapis/java-pubsub/commit/d7e55886b62826f54f0bb12a6bfa4ef67dee6521)) +* Update dependency com.google.cloud:google-cloud-core to v2.49.0 ([#2285](https://github.com/googleapis/java-pubsub/issues/2285)) ([cd94a19](https://github.com/googleapis/java-pubsub/commit/cd94a1987271eea4d7744286a7daeb071bb9456a)) +* Update dependency com.google.cloud:google-cloud-storage to v2.45.0 ([#2268](https://github.com/googleapis/java-pubsub/issues/2268)) ([80a09e6](https://github.com/googleapis/java-pubsub/commit/80a09e69111229080c413eff8426bd0b3d50458d)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.41.0 ([#2286](https://github.com/googleapis/java-pubsub/issues/2286)) ([0c0a1b9](https://github.com/googleapis/java-pubsub/commit/0c0a1b9231953e5c9878e0dfcf5a55d01794f6c4)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.29.0 ([#2276](https://github.com/googleapis/java-pubsub/issues/2276)) ([54ef88d](https://github.com/googleapis/java-pubsub/commit/54ef88d7f822d8130717e3be9bcf7fe9901d6cb0)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.29.1 ([#2279](https://github.com/googleapis/java-pubsub/issues/2279)) ([de3c9e1](https://github.com/googleapis/java-pubsub/commit/de3c9e1c7f2fe6413d0ae7a18955f16611df95c6)) +* Update googleapis/sdk-platform-java action to v2.51.0 ([#2284](https://github.com/googleapis/java-pubsub/issues/2284)) ([0be820e](https://github.com/googleapis/java-pubsub/commit/0be820e2044253bf484d88d703ce2dfade7aa137)) + + +### Documentation + +* Fix repository URL in samples README ([#2280](https://github.com/googleapis/java-pubsub/issues/2280)) ([8aeff1a](https://github.com/googleapis/java-pubsub/commit/8aeff1a375f3aa989d2c4bde0ed3dd2f329601fc)) + ## [1.134.2](https://github.com/googleapis/java-pubsub/compare/v1.134.1...v1.134.2) (2024-11-18) diff --git a/README.md b/README.md index 3f0f73f52..682f9ea4d 100644 --- a/README.md +++ b/README.md @@ -58,13 +58,13 @@ implementation 'com.google.cloud:google-cloud-pubsub' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-pubsub:1.134.2' +implementation 'com.google.cloud:google-cloud-pubsub:1.135.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.134.2" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.135.0" ``` ## Authentication @@ -415,7 +415,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-pubsub/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-pubsub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.134.2 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.135.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index a69c63990..44b72d4e4 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub-bom - 1.134.3-SNAPSHOT + 1.135.0 pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.134.3-SNAPSHOT + 1.135.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.3-SNAPSHOT + 1.117.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.3-SNAPSHOT + 1.117.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 81df2d440..7547d60f8 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-pubsub - 1.134.3-SNAPSHOT + 1.135.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.134.3-SNAPSHOT + 1.135.0 google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index a216915ef..c6109ceaa 100644 --- a/grpc-google-cloud-pubsub-v1/pom.xml +++ b/grpc-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.3-SNAPSHOT + 1.117.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.134.3-SNAPSHOT + 1.135.0 diff --git a/pom.xml b/pom.xml index d4dc1c90b..7dd3d73a5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.134.3-SNAPSHOT + 1.135.0 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -69,17 +69,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.3-SNAPSHOT + 1.117.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.116.3-SNAPSHOT + 1.117.0 com.google.cloud google-cloud-pubsub - 1.134.3-SNAPSHOT + 1.135.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index beac4e05e..dcd873c02 100644 --- a/proto-google-cloud-pubsub-v1/pom.xml +++ b/proto-google-cloud-pubsub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.116.3-SNAPSHOT + 1.117.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.134.3-SNAPSHOT + 1.135.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 84b375212..e5625cdb9 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.134.3-SNAPSHOT + 1.135.0 diff --git a/versions.txt b/versions.txt index d397e309f..ee35354e8 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.134.2:1.134.3-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.116.2:1.116.3-SNAPSHOT -proto-google-cloud-pubsub-v1:1.116.2:1.116.3-SNAPSHOT +google-cloud-pubsub:1.135.0:1.135.0 +grpc-google-cloud-pubsub-v1:1.117.0:1.117.0 +proto-google-cloud-pubsub-v1:1.117.0:1.117.0