From 5456b52efef7fab95a2d448d443323388c4d5b55 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:50:43 +0000 Subject: [PATCH 01/30] chore(main): release 1.131.1-SNAPSHOT (#2089) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- 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 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index f989772ba..295c7717e 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.131.0 + 1.131.1-SNAPSHOT pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.131.0 + 1.131.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.113.0 + 1.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.113.0 + 1.113.1-SNAPSHOT diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 785c76c06..af2d034e5 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.131.0 + 1.131.1-SNAPSHOT jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.131.0 + 1.131.1-SNAPSHOT google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index efb305931..9b5e7af10 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.113.0 + 1.113.1-SNAPSHOT grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.131.0 + 1.131.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 21f3ee292..a8b0281d9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.131.0 + 1.131.1-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.113.0 + 1.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.113.0 + 1.113.1-SNAPSHOT com.google.cloud google-cloud-pubsub - 1.131.0 + 1.131.1-SNAPSHOT diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index c08a7bb30..4d6605394 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.113.0 + 1.113.1-SNAPSHOT proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.131.0 + 1.131.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index db54cec31..632adef76 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.131.0 + 1.131.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index af4a53006..cdd8b1243 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.131.0:1.131.0 -grpc-google-cloud-pubsub-v1:1.113.0:1.113.0 -proto-google-cloud-pubsub-v1:1.113.0:1.113.0 +google-cloud-pubsub:1.131.0:1.131.1-SNAPSHOT +grpc-google-cloud-pubsub-v1:1.113.0:1.113.1-SNAPSHOT +proto-google-cloud-pubsub-v1:1.113.0:1.113.1-SNAPSHOT From 53a4844f09eace777142b8cdcd06bc07cef0b432 Mon Sep 17 00:00:00 2001 From: Mike Prieto Date: Mon, 1 Jul 2024 11:25:55 -0400 Subject: [PATCH 02/30] docs(samples): Optimistic subscribe sample (#2063) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): Add code sample for optimistic subscribe * docs(samples): Fix formatting on test * docs(samples): Use an error listener instead of catching an exception for the OptimisticSubscribeExample * test: Add exception handler to OptimisticSubscribeExample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- README.md | 7 +- .../pubsub/OptimisticSubscribeExample.java | 103 ++++++++++++++++++ .../src/test/java/pubsub/SubscriberIT.java | 19 ++++ 3 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java diff --git a/README.md b/README.md index 55d765048..195200dba 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,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.130.1' +implementation 'com.google.cloud:google-cloud-pubsub:1.131.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.130.1" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.131.0" ``` @@ -275,6 +275,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | List Subscriptions In Project Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/ListSubscriptionsInProjectExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/ListSubscriptionsInProjectExample.java) | | List Subscriptions In Topic Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/ListSubscriptionsInTopicExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/ListSubscriptionsInTopicExample.java) | | List Topics Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/ListTopicsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/ListTopicsExample.java) | +| Optimistic Subscribe Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java) | | Publish Avro Records Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/PublishAvroRecordsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishAvroRecordsExample.java) | | Publish Protobuf Messages Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/PublishProtobufMessagesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishProtobufMessagesExample.java) | | Publish With Batch Settings Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/PublishWithBatchSettingsExample.java) | @@ -411,7 +412,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.130.1 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.131.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/samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java b/samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java new file mode 100644 index 000000000..fbc9a183b --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package pubsub; + +// [START pubsub_optimistic_subscribe] + +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.cloud.pubsub.v1.SubscriptionAdminClient; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.PushConfig; +import com.google.pubsub.v1.Subscription; +import com.google.pubsub.v1.TopicName; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class OptimisticSubscribeExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String subscriptionId = "your-subscription-id"; + String topicId = "your-topic-id"; + + optimisticSubscribeExample(projectId, subscriptionId, topicId); + } + + public static void optimisticSubscribeExample( + String projectId, String subscriptionId, String topicId) throws IOException { + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + // Instantiate an asynchronous message receiver. + MessageReceiver receiver = + (PubsubMessage message, AckReplyConsumer consumer) -> { + // Handle incoming message, then ack the received message. + System.out.println("Id: " + message.getMessageId()); + System.out.println("Data: " + message.getData().toStringUtf8()); + consumer.ack(); + }; + + Subscriber subscriber = null; + try { + subscriber = Subscriber.newBuilder(subscriptionName, receiver).build(); + + // Listen for resource NOT_FOUND errors and rebuild the subscriber and restart subscribing + // when the current subscriber encounters these errors. + subscriber.addListener( + new Subscriber.Listener() { + public void failed(Subscriber.State from, Throwable failure) { + System.out.println(failure.getStackTrace()); + if (failure instanceof NotFoundException) { + try (SubscriptionAdminClient subscriptionAdminClient = + SubscriptionAdminClient.create()) { + TopicName topicName = TopicName.of(projectId, topicId); + // Create a pull subscription with default acknowledgement deadline of 10 seconds. + // The client library will automatically extend acknowledgement deadlines. + Subscription subscription = + subscriptionAdminClient.createSubscription( + subscriptionName, topicName, PushConfig.getDefaultInstance(), 10); + System.out.println("Created pull subscription: " + subscription.getName()); + optimisticSubscribeExample(projectId, subscriptionId, topicId); + } catch (IOException err) { + System.out.println("Failed to create pull subscription: " + err.getMessage()); + } + } + } + }, + MoreExecutors.directExecutor()); + + subscriber.startAsync().awaitRunning(); + System.out.printf("Listening for messages on %s:\n", subscriptionName.toString()); + subscriber.awaitTerminated(30, TimeUnit.SECONDS); + } catch (IllegalStateException e) { + // Prevent an exception from being thrown if it is the expected NotFoundException + if (!(subscriber.failureCause() instanceof NotFoundException)) { + throw e; + } + } catch (TimeoutException e) { + subscriber.stopAsync(); + } + } +} + +// [END pubsub_optimistic_subscribe] diff --git a/samples/snippets/src/test/java/pubsub/SubscriberIT.java b/samples/snippets/src/test/java/pubsub/SubscriberIT.java index ee4e03068..3f91a2a31 100644 --- a/samples/snippets/src/test/java/pubsub/SubscriberIT.java +++ b/samples/snippets/src/test/java/pubsub/SubscriberIT.java @@ -56,12 +56,16 @@ public class SubscriberIT { private static final String subscriptionId = "subscriber-test-subscription-" + _suffix; // For a subscription with exactly once delivery enabled. private static final String subscriptionEodId = "subscriber-test-subscription-eod" + _suffix; + private static final String subscriptionOptimisticId = + "subscriber-test-subscription-optimistic" + _suffix; private static final TopicName topicName = TopicName.of(projectId, topicId); private static final TopicName topicNameEod = TopicName.of(projectId, topicIdEod); private static final ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(projectId, subscriptionId); private static final ProjectSubscriptionName subscriptionEodName = ProjectSubscriptionName.of(projectId, subscriptionEodId); + private static final ProjectSubscriptionName subscriptionOptimisticName = + ProjectSubscriptionName.of(projectId, subscriptionOptimisticId); private static void requireEnvVar(String varName) { assertNotNull( @@ -163,6 +167,11 @@ public void tearDown() throws Exception { try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { subscriptionAdminClient.deleteSubscription(subscriptionName.toString()); subscriptionAdminClient.deleteSubscription(subscriptionEodName.toString()); + try { + subscriptionAdminClient.deleteSubscription(subscriptionOptimisticName.toString()); + } catch (Exception e) { + // Ignore exception. + } } try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { @@ -240,4 +249,14 @@ public void testSubscriberExactlyOnceDelivery() throws Exception { assertThat(bout.toString()).contains("Message successfully acked: " + messageId); } } + + @Test + public void testOptimisticSubscriber() throws Exception { + bout.reset(); + OptimisticSubscribeExample.optimisticSubscribeExample( + projectId, subscriptionOptimisticId, topicId); + assertThat( + bout.toString() + .contains("Created pull subscription: " + subscriptionOptimisticName.toString())); + } } From 315766dc8fa346466c153a3543c536846283f7f3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:09:39 +0200 Subject: [PATCH 03/30] test(deps): update dependency com.google.truth:truth to v1.4.3 (#2097) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test(deps): update dependency com.google.truth:truth to v1.4.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index a8b0281d9..2db6e3367 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ com.google.truth truth - 1.4.2 + 1.4.3 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index bdb85eb83..708d713e7 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -69,7 +69,7 @@ com.google.truth truth - 1.4.2 + 1.4.3 test diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 2a16d3661..558d6ff53 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -56,7 +56,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.truth truth - 1.4.2 + 1.4.3 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 632adef76..849271280 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -73,7 +73,7 @@ com.google.truth truth - 1.4.2 + 1.4.3 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6e44621f6..c9a0eb790 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -92,7 +92,7 @@ com.google.truth truth - 1.4.2 + 1.4.3 test From 42f12ed3270e66beae316deb729b445c94dcb1a8 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:09:47 +0200 Subject: [PATCH 04/30] deps: update dependency org.junit.vintage:junit-vintage-engine to v5.10.3 (#2096) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.10.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 558d6ff53..91bfe85e4 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -107,7 +107,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.junit.vintage junit-vintage-engine - 5.10.2 + 5.10.3 test From 0d64d6cf7799a176297ceaa1475b7cb29a64bebc Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:09:54 +0200 Subject: [PATCH 05/30] deps: update dependency com.google.cloud:google-cloud-storage to v2.40.1 (#2095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.cloud:google-cloud-storage to v2.40.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- 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 708d713e7..667b69336 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.40.0 + 2.40.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 849271280..133bf05f0 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-storage - 2.40.0 + 2.40.1 From dfc9d59666875ab44f13443ebddca552f63cf057 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:10:13 +0200 Subject: [PATCH 06/30] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.1 (#2094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2db6e3367..42b2ec00d 100644 --- a/pom.xml +++ b/pom.xml @@ -145,7 +145,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.0 + 3.6.1 From 217b8a3f5419f80402d349b8873d7302eeb35e3f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:10:22 +0200 Subject: [PATCH 07/30] deps: update dependency com.google.cloud:google-cloud-bigquery to v2.41.0 (#2093) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.cloud:google-cloud-bigquery to v2.41.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- 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 667b69336..c4ab3b629 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.40.3 + 2.41.0 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 133bf05f0..93f8e019f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -85,7 +85,7 @@ com.google.cloud google-cloud-bigquery - 2.40.3 + 2.41.0 com.google.cloud From 81c311b9bacb07cf148086166e6d52ac31906891 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:58:38 +0200 Subject: [PATCH 08/30] chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.131.0 (#2092) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.131.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- README.md | 2 +- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 195200dba..eb350d3d0 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-pubsub - 1.130.1 + 1.131.0 ``` diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c4ab3b629..4e588aeb4 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.130.1 + 1.131.0 From 9859f1181a12bc683eaf4a6345bf2528a5463c59 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Jul 2024 18:58:52 +0200 Subject: [PATCH 09/30] deps: update dependency com.google.protobuf:protobuf-java-util to v4.27.2 (#2091) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.protobuf:protobuf-java-util to v4.27.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- 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 4e588aeb4..13fd9af3a 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.27.1 + 4.27.2 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 93f8e019f..5bf9d6093 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -61,7 +61,7 @@ com.google.protobuf protobuf-java-util - 4.27.1 + 4.27.2 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index c9a0eb790..5f9cf65b9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -80,7 +80,7 @@ com.google.protobuf protobuf-java-util - 4.27.1 + 4.27.2 From 283a5e89837071678f8dd94b8b8adfad91a6766c Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Tue, 2 Jul 2024 20:11:20 -0400 Subject: [PATCH 10/30] feat: enable hermetic library generation (#2048) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: enable hermetic library generation * fix config yaml syntax * do not map runners home folder * try dummy proto_path * use copyright update comittish * correct proto_path * update protoc * preserve pr_description * update gapic_generator_version to 2.41.0 * infer image tag from config yaml * correct workflow name * update config scripts and yamls * remove old update_googleapis_committish workflow * sync config structure with that of google-cloud-java * remove quotes from config yamls * fix typo in update_generation_config.yaml * correct * quote codeowners_team in generation config * update generator version * fix library info * retrigger jobs * fix path to hermetic_library_generation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fixes to hermetic_library_generation --------- Co-authored-by: Owl Bot --- .../{.OwlBot.yaml => .OwlBot-hermetic.yaml} | 0 .../scripts/hermetic_library_generation.sh | 117 +++++++++++++++++ .github/scripts/update_generation_config.sh | 121 ++++++++++++++++++ .../hermetic_library_generation.yaml | 40 ++++++ .../workflows/update_generation_config.yaml | 42 ++++++ generation_config.yaml | 23 ++++ 6 files changed, 343 insertions(+) rename .github/{.OwlBot.yaml => .OwlBot-hermetic.yaml} (100%) create mode 100644 .github/scripts/hermetic_library_generation.sh create mode 100644 .github/scripts/update_generation_config.sh create mode 100644 .github/workflows/hermetic_library_generation.yaml create mode 100644 .github/workflows/update_generation_config.yaml create mode 100644 generation_config.yaml diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot-hermetic.yaml similarity index 100% rename from .github/.OwlBot.yaml rename to .github/.OwlBot-hermetic.yaml diff --git a/.github/scripts/hermetic_library_generation.sh b/.github/scripts/hermetic_library_generation.sh new file mode 100644 index 000000000..6c3f22d8f --- /dev/null +++ b/.github/scripts/hermetic_library_generation.sh @@ -0,0 +1,117 @@ +#!/bin/bash +set -e +# This script should be run at the root of the repository. +# This script is used to, when a pull request changes the generation +# configuration (generation_config.yaml by default): +# 1. Find whether the last commit in this pull request contains changes to +# the generation configuration and exit early if it doesn't have such a change +# since the generation result would be the same. +# 2. Compare generation configurations in the current branch (with which the +# pull request associated) and target branch (into which the pull request is +# merged); +# 3. Generate changed libraries using library_generation image; +# 4. Commit the changes to the pull request, if any. +# 5. Edit the PR body with generated pull request description, if applicable. + +# The following commands need to be installed before running the script: +# 1. git +# 2. gh +# 3. docker + +# The parameters of this script is: +# 1. target_branch, the branch into which the pull request is merged. +# 2. current_branch, the branch with which the pull request is associated. +# 3. [optional] generation_config, the path to the generation configuration, +# the default value is generation_config.yaml in the repository root. +while [[ $# -gt 0 ]]; do +key="$1" +case "${key}" in + --target_branch) + target_branch="$2" + shift + ;; + --current_branch) + current_branch="$2" + shift + ;; + --generation_config) + generation_config="$2" + shift + ;; + *) + echo "Invalid option: [$1]" + exit 1 + ;; +esac +shift +done + +if [ -z "${target_branch}" ]; then + echo "missing required argument --target_branch" + exit 1 +fi + +if [ -z "${current_branch}" ]; then + echo "missing required argument --current_branch" + exit 1 +fi + +if [ -z "${generation_config}" ]; then + generation_config=generation_config.yaml + echo "Using default generation config: ${generation_config}" +fi + +workspace_name="/workspace" +baseline_generation_config="baseline_generation_config.yaml" +message="chore: generate libraries at $(date)" + +git checkout "${target_branch}" +git checkout "${current_branch}" +# if the last commit doesn't contain changes to generation configuration, +# do not generate again as the result will be the same. +change_of_last_commit="$(git diff-tree --no-commit-id --name-only HEAD~1..HEAD -r)" +if [[ ! ("${change_of_last_commit}" == *"${generation_config}"*) ]]; then + echo "The last commit doesn't contain any changes to the generation_config.yaml, skipping the whole generation process." || true + exit 0 +fi +# copy generation configuration from target branch to current branch. +git show "${target_branch}":"${generation_config}" > "${baseline_generation_config}" +config_diff=$(diff "${generation_config}" "${baseline_generation_config}" || true) + +# parse image tag from the generation configuration. +image_tag=$(grep "gapic_generator_version" "${generation_config}" | cut -d ':' -f 2 | xargs) + +# run hermetic code generation docker image. +docker run \ + --rm \ + -u "$(id -u):$(id -g)" \ + -v "$(pwd):${workspace_name}" \ + gcr.io/cloud-devrel-public-resources/java-library-generation:"${image_tag}" \ + --baseline-generation-config-path="${workspace_name}/${baseline_generation_config}" \ + --current-generation-config-path="${workspace_name}/${generation_config}" + + +# commit the change to the pull request. +if [[ $(basename $(pwd)) == "google-cloud-java" ]]; then + git add java-* pom.xml gapic-libraries-bom/pom.xml versions.txt +else + # The image leaves intermediate folders and files it works with. Here we remove them + rm -rdf output googleapis "${baseline_generation_config}" + git add --all -- ':!pr_description.txt' +fi +changed_files=$(git diff --cached --name-only) +if [[ "${changed_files}" == "" ]]; then + echo "There is no generated code change with the generation config change ${config_diff}." + echo "Skip committing to the pull request." + exit 0 +fi + +echo "Configuration diff:" +echo "${config_diff}" +git commit -m "${message}" +git push +# set pr body if pr_description.txt is generated. +if [[ -f "pr_description.txt" ]]; then + pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number") + gh pr edit "${pr_num}" --body "$(cat pr_description.txt)" +fi diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh new file mode 100644 index 000000000..561a31304 --- /dev/null +++ b/.github/scripts/update_generation_config.sh @@ -0,0 +1,121 @@ +#!/bin/bash +set -e +# This script should be run at the root of the repository. +# This script is used to update googleapis_commitish, gapic_generator_version, +# and libraries_bom_version in generation configuration at the time of running +# and create a pull request. + +# The following commands need to be installed before running the script: +# 1. git +# 2. gh +# 3. jq + +# Utility functions +# Get the latest released version of a Maven artifact. +function get_latest_released_version() { + local group_id=$1 + local artifact_id=$2 + latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1) + echo "${latest}" +} + +# Update a key to a new value in the generation config. +function update_config() { + local key_word=$1 + local new_value=$2 + local file=$3 + echo "Update ${key_word} to ${new_value} in ${file}" + sed -i -e "s/^${key_word}.*$/${key_word}: ${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. +while [[ $# -gt 0 ]]; do +key="$1" +case "${key}" in + --base_branch) + base_branch="$2" + shift + ;; + --repo) + repo="$2" + shift + ;; + --generation_config) + generation_config="$2" + shift + ;; + *) + echo "Invalid option: [$1]" + exit 1 + ;; +esac +shift +done + +if [ -z "${base_branch}" ]; then + echo "missing required argument --base_branch" + exit 1 +fi + +if [ -z "${repo}" ]; then + echo "missing required argument --repo" + exit 1 +fi + +if [ -z "${generation_config}" ]; then + generation_config="generation_config.yaml" + echo "Use default generation config: ${generation_config}" +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 +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 +# branch; otherwise checkout the pull request. +if [ -z "${pr_num}" ]; then + git checkout -b "${current_branch}" +else + gh pr checkout "${pr_num}" +fi + +mkdir tmp-googleapis +# 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 +latest_commit=$(git rev-parse HEAD) +popd +rm -rf tmp-googleapis +update_config "googleapis_commitish" "${latest_commit}" "${generation_config}" + +# 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 +latest_version=$(get_latest_released_version "com.google.cloud" "libraries-bom") +update_config "libraries_bom_version" "${latest_version}" "${generation_config}" + +git add "${generation_config}" +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." + 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 push -f remote_repo "${current_branch}" + gh pr create --title "${title}" --head "${current_branch}" --body "${title}" --base "${base_branch}" +else + git push + gh pr edit "${pr_num}" --title "${title}" --body "${title}" +fi diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml new file mode 100644 index 000000000..7146cc3dc --- /dev/null +++ b/.github/workflows/hermetic_library_generation.yaml @@ -0,0 +1,40 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# GitHub action job to test core java library features on +# downstream client libraries before they are released. +name: Hermetic library generation upon generation config change through pull requests +on: + pull_request: + +jobs: + library_generation: + # skip pull requests coming from a forked repository + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Generate changed libraries + shell: bash + run: | + set -x + [ -z "$(git config user.email)" ] && git config --global user.email "cloud-java-bot@google.com" + [ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot" + bash .github/scripts/hermetic_library_generation.sh \ + --target_branch ${{ github.base_ref }} \ + --current_branch ${{ github.head_ref }} + env: + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml new file mode 100644 index 000000000..3cf773992 --- /dev/null +++ b/.github/workflows/update_generation_config.yaml @@ -0,0 +1,42 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# GitHub action job to test core java library features on +# downstream client libraries before they are released. +name: Update generation configuration +on: + schedule: + - cron: '0 2 * * *' + workflow_dispatch: + +jobs: + update-generation-config: + runs-on: ubuntu-22.04 + env: + # the branch into which the pull request is merged + base_branch: main + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Update params in generation config to latest + shell: bash + run: | + set -x + [ -z "$(git config user.email)" ] && git config --global user.email "cloud-java-bot@google.com" + [ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot" + bash .github/scripts/update_generation_config.sh \ + --base_branch "${base_branch}"\ + --repo ${{ github.repository }} + env: + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} diff --git a/generation_config.yaml b/generation_config.yaml new file mode 100644 index 000000000..e7b53b6d9 --- /dev/null +++ b/generation_config.yaml @@ -0,0 +1,23 @@ +gapic_generator_version: 2.42.0 +googleapis_commitish: 6f289d775912966eb0cf04bda91e5e355c998d30 +libraries_bom_version: 26.38.0 +libraries: + - api_shortname: pubsub + name_pretty: Cloud Pub/Sub + api_reference: https://cloud.google.com/pubsub/ + product_documentation: https://cloud.google.com/pubsub/docs/ + client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history + api_description: is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a topic and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications. + issue_tracker: https://issuetracker.google.com/savedsearches/559741 + release_level: stable + language: java + repo: googleapis/java-pubsub + repo_short: java-pubsub + distribution_name: com.google.cloud:google-cloud-pubsub + codeowner_team: '@googleapis/api-pubsub' + api_id: pubsub.googleapis.com + library_type: GAPIC_COMBO + requires_billing: true + recommended_package: com.google.cloud.pubsub.v1 + GAPICs: + - proto_path: google/pubsub/v1 From c11246bc56905d7d4c57c155185b45eaeedf1d7f Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:15:07 -0400 Subject: [PATCH 11/30] chore: Update generation configuration at Fri Jul 5 02:16:12 UTC 2024 (#2103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Update generation configuration at Wed Jul 3 00:13:55 UTC 2024 * chore: generate libraries at Wed Jul 3 00:14:23 UTC 2024 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update generation configuration at Thu Jul 4 02:16:36 UTC 2024 * chore: generate libraries at Thu Jul 4 02:16:59 UTC 2024 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update generation configuration at Fri Jul 5 02:16:12 UTC 2024 * chore: generate libraries at Fri Jul 5 02:16:34 UTC 2024 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .repo-metadata.json | 9 +++++---- README.md | 4 ++++ generation_config.yaml | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index f30706ceb..0c8364b05 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,19 +1,20 @@ { "api_shortname": "pubsub", "name_pretty": "Cloud Pub/Sub", - "api_reference": "https://cloud.google.com/pubsub/", "product_documentation": "https://cloud.google.com/pubsub/docs/", - "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history", "api_description": "is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a topic and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications.", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559741", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-pubsub/latest/history", "release_level": "stable", + "transport": "both", "language": "java", "repo": "googleapis/java-pubsub", "repo_short": "java-pubsub", "distribution_name": "com.google.cloud:google-cloud-pubsub", - "codeowner_team": "@googleapis/api-pubsub", "api_id": "pubsub.googleapis.com", "library_type": "GAPIC_COMBO", "requires_billing": true, + "api_reference": "https://cloud.google.com/pubsub/", + "codeowner_team": "@googleapis/api-pubsub", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559741", "recommended_package": "com.google.cloud.pubsub.v1" } \ No newline at end of file diff --git a/README.md b/README.md index eb350d3d0..b446529b4 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,10 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. +## Transport + +Cloud Pub/Sub uses both gRPC and HTTP/JSON for the transport layer. + ## Supported Java Versions Java 8 or above is required for using this client. diff --git a/generation_config.yaml b/generation_config.yaml index e7b53b6d9..7f9f93bd9 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: 6f289d775912966eb0cf04bda91e5e355c998d30 -libraries_bom_version: 26.38.0 +googleapis_commitish: 7976ffadc0f21ee9149708c0c97ef000e15de1eb +libraries_bom_version: 26.42.0 libraries: - api_shortname: pubsub name_pretty: Cloud Pub/Sub From 464e56137860e1102e5589071075e043d2531f29 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 8 Jul 2024 12:57:50 -0400 Subject: [PATCH 12/30] chore: make the owlbot postprocessor check non-required (#2104) We will soon disable the Owlbot postprocessor. This is part of the effort to enable hermetic generation in this repo ([context](https://docs.google.com/document/d/1wrpyBtphdenM3BNelcnpBKGADYrGJUo686HXvSA0h-0/edit?pli=1&tab=t.0#bookmark=kix.914gcjvdwt3u)) --- .github/sync-repo-settings.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 875095277..80d26801c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -15,7 +15,6 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc @@ -34,7 +33,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - pattern: java7 isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -50,7 +48,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - pattern: 1.114.x isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -66,7 +63,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - pattern: 1.116.x isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -82,7 +78,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - pattern: 1.117.x isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -98,7 +93,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - pattern: 1.120.x isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -114,7 +108,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 1.121.x @@ -132,7 +125,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 1.123.x @@ -149,7 +141,6 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - Kokoro - Against Pub/Sub Lite samples - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 1.125.x @@ -165,7 +156,6 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc From 68f4b01c04ba6527746c4bde8e1f0034b6b59715 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 8 Jul 2024 13:00:31 -0400 Subject: [PATCH 13/30] chore: disable the Owl Bot post-processor (#2102) --- .github/.OwlBot.lock.yaml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/.OwlBot.lock.yaml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 359fe71c1..000000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:72f0d373307d128b2cb720c5cb4d90b31f0e86529dd138c632710ae0c69efae3 -# created: 2024-06-05T18:32:21.724930324Z From 0b51cc30248329c47ac7e804f8903bde2fddedb5 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 8 Jul 2024 23:09:52 +0200 Subject: [PATCH 14/30] chore(deps): update dependency com.google.cloud:libraries-bom to v26.43.0 (#2107) --- samples/native-image-sample/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 91bfe85e4..c182ae0b9 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -30,7 +30,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> com.google.cloud libraries-bom - 26.42.0 + 26.43.0 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 5f9cf65b9..5d4261825 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 26.42.0 + 26.43.0 pom import From 4e17c34880d0498d2bd891ea7caa8fe095054016 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:44:54 -0400 Subject: [PATCH 15/30] chore: Update generation configuration at Wed Jul 10 02:17:03 UTC 2024 (#2109) * chore: Update generation configuration at Tue Jul 9 02:17:13 UTC 2024 * chore: Update generation configuration at Wed Jul 10 02:17:03 UTC 2024 * chore: generate libraries at Wed Jul 10 02:17:23 UTC 2024 --- README.md | 4 ++-- generation_config.yaml | 4 ++-- renovate.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b446529b4..6166c7893 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.42.0 + 26.43.0 pom import @@ -52,7 +52,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.42.0') +implementation platform('com.google.cloud:libraries-bom:26.43.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` diff --git a/generation_config.yaml b/generation_config.yaml index 7f9f93bd9..c644dddde 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: 7976ffadc0f21ee9149708c0c97ef000e15de1eb -libraries_bom_version: 26.42.0 +googleapis_commitish: 3ce84c2ca3f3e453e62bbb9bffb62f3f8ec3f016 +libraries_bom_version: 26.43.0 libraries: - api_shortname: pubsub name_pretty: Cloud Pub/Sub diff --git a/renovate.json b/renovate.json index 58c97664e..df71c3b5a 100644 --- a/renovate.json +++ b/renovate.json @@ -20,7 +20,7 @@ "customManagers": [ { "customType": "regex", - "fileMatch": [ + "fileMatch": [ "^.kokoro/presubmit/graalvm-native.*.cfg$" ], "matchStrings": ["value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\""], @@ -30,7 +30,7 @@ { "customType": "regex", "fileMatch": [ - "^.github/workflows/unmanaged_dependency_check.yaml$" + "^.github/workflows/unmanaged_dependency_check.yaml$" ], "matchStrings": ["uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v(?.+?)\\n"], "depNameTemplate": "com.google.cloud:sdk-platform-java-config", From c0b7ac10f60eebb177a55dd9c629837db8231522 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:10:11 -0400 Subject: [PATCH 16/30] chore: Update generation configuration at Thu Jul 11 02:18:01 UTC 2024 (#2112) --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index c644dddde..c98375b66 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: 3ce84c2ca3f3e453e62bbb9bffb62f3f8ec3f016 +googleapis_commitish: 19577edb4d439db98d2fb1f6f48f2e1b29fba099 libraries_bom_version: 26.43.0 libraries: - api_shortname: pubsub From 87ee9d0fb936891455f38e3a98518437a5c58c45 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 15 Jul 2024 17:55:00 +0200 Subject: [PATCH 17/30] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.3.1 (#2111) --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index c182ae0b9..6f6f56c0f 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -124,7 +124,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.maven.plugins maven-surefire-plugin - 3.3.0 + 3.3.1 **/*IT From 8b07974d768c55a7bbff99b8ebe5d48c72fb4a64 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:52:25 -0400 Subject: [PATCH 18/30] chore: remove native image sample in favor of sample hosted in google-cloud-java (#2105) * chore: remove native image sample in favor of sample hosted in google-cloud-java --- README.md | 2 - samples/native-image-sample/README.md | 77 ---- samples/native-image-sample/pom.xml | 169 -------- .../java/pubsub/NativeImagePubSubSample.java | 385 ------------------ .../java/utilities/PublishOperations.java | 159 -------- .../pubsub/NativeImagePubSubSampleIT.java | 139 ------- samples/pom.xml | 1 - 7 files changed, 932 deletions(-) delete mode 100644 samples/native-image-sample/README.md delete mode 100644 samples/native-image-sample/pom.xml delete mode 100644 samples/native-image-sample/src/main/java/pubsub/NativeImagePubSubSample.java delete mode 100644 samples/native-image-sample/src/main/java/utilities/PublishOperations.java delete mode 100644 samples/native-image-sample/src/test/java/pubsub/NativeImagePubSubSampleIT.java diff --git a/README.md b/README.md index 6166c7893..7bba02421 100644 --- a/README.md +++ b/README.md @@ -242,8 +242,6 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-pubsub/tree/m | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Native Image Pub Sub Sample | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/native-image-sample/src/main/java/pubsub/NativeImagePubSubSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/native-image-sample/src/main/java/pubsub/NativeImagePubSubSample.java) | -| Publish Operations | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/native-image-sample/src/main/java/utilities/PublishOperations.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/native-image-sample/src/main/java/utilities/PublishOperations.java) | | Commit Avro Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CommitAvroSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CommitAvroSchemaExample.java) | | Commit Proto Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CommitProtoSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CommitProtoSchemaExample.java) | | Create Avro Schema Example | [source code](https://github.com/googleapis/java-pubsub/blob/main/samples/snippets/src/main/java/pubsub/CreateAvroSchemaExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-pubsub&page=editor&open_in_editor=samples/snippets/src/main/java/pubsub/CreateAvroSchemaExample.java) | diff --git a/samples/native-image-sample/README.md b/samples/native-image-sample/README.md deleted file mode 100644 index 5f0cd31e9..000000000 --- a/samples/native-image-sample/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Pub/Sub Sample Application with Native Image - -The Pub/Sub sample application demonstrates some common operations with Pub/Sub and is compatible with Native Image compilation. - -## Setup Instructions - -You will need to follow these prerequisite steps in order to run the samples: - -1. If you have not already, [create a Google Cloud Platform Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project). - -2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/) which will allow you to run the sample with your project's credentials. - - Once installed, log in with Application Default Credentials using the following command: - - ``` - gcloud auth application-default login - ``` - - **Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use. - -3. Install the native image compiler. - - You can follow the [official installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm). - After following the instructions, ensure that you install the native image extension installed by running: - - ``` - gu install native-image - ``` - - Once you finish following the instructions, verify that the default version of Java is set to the correct version by running `java -version` in a terminal. - - You will see something similar to the below output: - - ``` - $ java -version - - openjdk version "17.0.3" 2022-04-19 - OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06) - OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing) - ``` - -4. [Enable the Pub/Sub APIs](https://console.cloud.google.com/apis/api/pubsub.googleapis.com). - -### Sample - -Navigate to this directory in a new terminal. - -1. Compile the application using the Native Image Compiler. This step may take a few minutes. - - ``` - mvn package -P native -DskipTests - ``` - -2. Run the application: - - ``` - ./target/native-image-sample - ``` - -3. The application will create a new Pub/Sub topic, send and receive a message from it, and then delete the topic. - - ``` - Created topic: projects/YOUR_PROJECT_ID/topics/graal-pubsub-test-00e72640-4e36-4aff-84d2-13b7569b2289 under project: YOUR_PROJECT_ID - Created pull subscription: projects/YOUR_PROJECT_ID/subscriptions/graal-pubsub-test-sub2fb5e3f3-cb26-439b-b88c-9cb0cfca9e45 - Published message with ID: 457327433078420 - Received Payload: Pub/Sub Native Image Test published message at timestamp: 2020-09-23T19:45:42.746514Z - Deleted topic projects/YOUR_PROJECT_ID/topics/graal-pubsub-test-00e72640-4e36-4aff-84d2-13b7569b2289 - Deleted subscription projects/YOUR_PROJECT_ID/subscriptions/graal-pubsub-test-sub2fb5e3f3-cb26-439b-b88c-9cb0cfca9e45 - ``` - -## Sample Integration Test with native Image Support - -In order to run the sample integration test as a native image, call the following command: - - ``` - mvn test -Pnative - ``` diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml deleted file mode 100644 index 6f6f56c0f..000000000 --- a/samples/native-image-sample/pom.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - 4.0.0 - com.google.cloud - native-image-sample - Native Image Sample - https://github.com/googleapis/java-pubsub - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - libraries-bom - 26.43.0 - pom - import - - - - - - - com.google.cloud - google-cloud-core - - - com.google.cloud - google-cloud-pubsub - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.4.3 - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - dependency-jars/ - pubsub.NativeImagePubSubSample - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.7.1 - - - copy-dependencies - package - - copy-dependencies - - - - ${project.build.directory}/dependency-jars/ - - - - - - - - - - - - native - - - - org.junit.vintage - junit-vintage-engine - 5.10.3 - test - - - org.graalvm.buildtools - junit-platform-native - 0.10.2 - test - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - 3.3.1 - - - **/*IT - - - - - org.graalvm.buildtools - native-maven-plugin - 0.10.2 - true - - pubsub.NativeImagePubSubSample - - - --no-fallback - --no-server - - - - - build-native - - build - test - - package - - - test-native - - test - - test - - - - - - - - \ No newline at end of file diff --git a/samples/native-image-sample/src/main/java/pubsub/NativeImagePubSubSample.java b/samples/native-image-sample/src/main/java/pubsub/NativeImagePubSubSample.java deleted file mode 100644 index 2e96091a6..000000000 --- a/samples/native-image-sample/src/main/java/pubsub/NativeImagePubSubSample.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pubsub; - -import com.google.api.gax.rpc.NotFoundException; -import com.google.cloud.ServiceOptions; -import com.google.cloud.pubsub.v1.AckReplyConsumer; -import com.google.cloud.pubsub.v1.MessageReceiver; -import com.google.cloud.pubsub.v1.Subscriber; -import com.google.cloud.pubsub.v1.SubscriptionAdminClient; -import com.google.cloud.pubsub.v1.TopicAdminClient; -import com.google.cloud.pubsub.v1.stub.GrpcSubscriberStub; -import com.google.cloud.pubsub.v1.stub.SubscriberStub; -import com.google.cloud.pubsub.v1.stub.SubscriberStubSettings; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.FieldMask; -import com.google.pubsub.v1.AcknowledgeRequest; -import com.google.pubsub.v1.DeadLetterPolicy; -import com.google.pubsub.v1.DetachSubscriptionRequest; -import com.google.pubsub.v1.ProjectName; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.ProjectTopicName; -import com.google.pubsub.v1.PubsubMessage; -import com.google.pubsub.v1.PullRequest; -import com.google.pubsub.v1.PullResponse; -import com.google.pubsub.v1.PushConfig; -import com.google.pubsub.v1.ReceivedMessage; -import com.google.pubsub.v1.Subscription; -import com.google.pubsub.v1.Topic; -import com.google.pubsub.v1.TopicName; -import com.google.pubsub.v1.UpdateSubscriptionRequest; -import java.io.IOException; -import java.time.Duration; -import java.time.Instant; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import utilities.PublishOperations; - -/** Pub/Sub sample application compiled with Native Image. */ -public class NativeImagePubSubSample { - - /** Driver for the Pub/Sub Sample application which publishes a message to a specified topic. */ - public static void main(String[] args) throws Exception { - Instant startTime = Instant.now(); - String projectId = ServiceOptions.getDefaultProjectId(); - - String topicId = "native-pubsub-test-" + UUID.randomUUID().toString(); - String pullSubId = "native-pubsub-test-sub" + UUID.randomUUID().toString(); - String pushSubId = "native-pubsub-test-sub" + UUID.randomUUID().toString(); - - try { - // Topic management operations - createTopic(projectId, topicId); - createPullSubscription(projectId, pullSubId, topicId); - createPushSubscription(projectId, pushSubId, topicId); - detachSubscription(projectId, pushSubId); - getTopicPolicy(projectId, topicId); - getSubscriptionPolicy(projectId, pullSubId); - listSubscriptionInProject(projectId); - listSubscriptionInTopic(projectId, topicId); - listTopics(projectId); - updateSubscriptionDeadLetterTopic(projectId, pushSubId, topicId, topicId); - testTopicPermissions(projectId, topicId); - testSubscriptionPermissions(projectId, pushSubId); - - // Publish Operations - PublishOperations.publishMessage(projectId, topicId); - PublishOperations.publishWithBatchSettings(projectId, topicId); - PublishOperations.publishWithCustomAttributes(projectId, topicId); - PublishOperations.publishWithErrorHandler(projectId, topicId); - - // Receive messages - subscribeSync(projectId, pullSubId); - receiveMessagesWithDeliveryAttempts(projectId, pullSubId); - } finally { - deleteTopic(projectId, topicId); - deleteSubscription(projectId, pullSubId); - deleteSubscription(projectId, pushSubId); - } - Instant endTime = Instant.now(); - Duration duration = Duration.between(startTime, endTime); - System.out.println("Duration: " + duration.toString()); - } - - static void createTopic(String projectId, String topicId) throws IOException { - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - TopicName topicName = TopicName.of(projectId, topicId); - Topic topic = topicAdminClient.createTopic(topicName); - System.out.println("Created topic: " + topic.getName() + " under project: " + projectId); - } - } - - static void createPullSubscription(String projectId, String subscriptionId, String topicId) - throws IOException { - - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - TopicName topicName = TopicName.of(projectId, topicId); - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - Subscription subscription = - subscriptionAdminClient.createSubscription( - subscriptionName, topicName, PushConfig.getDefaultInstance(), 10); - System.out.println("Created pull subscription: " + subscription.getName()); - } - } - - static void createPushSubscription(String projectId, String subscriptionId, String topicId) - throws IOException { - - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - TopicName topicName = TopicName.of(projectId, topicId); - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - - // Intentionally set pushEndpoint empty just to exercise API call - PushConfig pushConfig = PushConfig.newBuilder().setPushEndpoint("").build(); - - Subscription subscription = - subscriptionAdminClient.createSubscription(subscriptionName, topicName, pushConfig, 10); - System.out.println("Created push subscription: " + subscription.getName()); - } - } - - static void detachSubscription(String projectId, String subscriptionId) throws IOException { - - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - topicAdminClient.detachSubscription( - DetachSubscriptionRequest.newBuilder() - .setSubscription(subscriptionName.toString()) - .build()); - } - - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - Subscription subscription = subscriptionAdminClient.getSubscription(subscriptionName); - if (subscription.getDetached()) { - System.out.println("Subscription is detached."); - } else { - throw new RuntimeException("Subscription detachment was not successful."); - } - } - } - - static void getSubscriptionPolicy(String projectId, String subscriptionId) throws IOException { - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - GetIamPolicyRequest getIamPolicyRequest = - GetIamPolicyRequest.newBuilder().setResource(subscriptionName.toString()).build(); - Policy policy = subscriptionAdminClient.getIamPolicy(getIamPolicyRequest); - System.out.println("Subscription policy: " + policy.toString().trim()); - } - } - - static void getTopicPolicy(String projectId, String topicId) throws IOException { - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - TopicName topicName = TopicName.of(projectId, topicId); - GetIamPolicyRequest getIamPolicyRequest = - GetIamPolicyRequest.newBuilder().setResource(topicName.toString()).build(); - Policy policy = topicAdminClient.getIamPolicy(getIamPolicyRequest); - System.out.println("Topic policy: " + policy.toString().trim()); - } - } - - static void listSubscriptionInProject(String projectId) throws IOException { - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - ProjectName projectName = ProjectName.of(projectId); - int count = 0; - for (Subscription subscription : - subscriptionAdminClient.listSubscriptions(projectName).iterateAll()) { - count += 1; - } - System.out.println("Subscriptions in project count: " + count); - } - } - - static void listSubscriptionInTopic(String projectId, String topicId) throws IOException { - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - TopicName topicName = TopicName.of(projectId, topicId); - int count = 0; - for (String subscription : topicAdminClient.listTopicSubscriptions(topicName).iterateAll()) { - count += 1; - } - System.out.println("Subscriptions under topic: " + count); - } - } - - static void listTopics(String projectId) throws IOException { - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - ProjectName projectName = ProjectName.of(projectId); - int count = 0; - for (Topic topic : topicAdminClient.listTopics(projectName).iterateAll()) { - count += 1; - } - System.out.println("Topic count under project: " + count); - } - } - - static void receiveMessagesWithDeliveryAttempts(String projectId, String subscriptionId) { - - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - - // Instantiate an asynchronous message receiver. - MessageReceiver receiver = - new MessageReceiver() { - @Override - public void receiveMessage(PubsubMessage message, AckReplyConsumer consumer) { - consumer.ack(); - } - }; - - Subscriber subscriber = null; - try { - subscriber = Subscriber.newBuilder(subscriptionName, receiver).build(); - // Start the subscriber. - subscriber.startAsync().awaitRunning(); - System.out.println("Successfully started an async message receiver."); - } finally { - // Shut down the subscriber after 10s. Stop receiving messages. - subscriber.stopAsync(); - } - } - - static void subscribeSync(String projectId, String subscriptionId) throws IOException { - SubscriberStubSettings subscriberStubSettings = - SubscriberStubSettings.newBuilder() - .setTransportChannelProvider( - SubscriberStubSettings.defaultGrpcTransportProviderBuilder() - .setMaxInboundMessageSize(20 * 1024 * 1024) // 20MB (maximum message size). - .build()) - .build(); - - try (SubscriberStub subscriber = GrpcSubscriberStub.create(subscriberStubSettings)) { - String subscriptionName = ProjectSubscriptionName.format(projectId, subscriptionId); - PullRequest pullRequest = - PullRequest.newBuilder().setMaxMessages(1).setSubscription(subscriptionName).build(); - - PullResponse pullResponse = subscriber.pullCallable().call(pullRequest); - List ackIds = new ArrayList<>(); - for (ReceivedMessage message : pullResponse.getReceivedMessagesList()) { - String payload = message.getMessage().getData().toStringUtf8(); - ackIds.add(message.getAckId()); - System.out.println("Received Payload: " + payload); - } - - AcknowledgeRequest acknowledgeRequest = - AcknowledgeRequest.newBuilder() - .setSubscription(subscriptionName) - .addAllAckIds(ackIds) - .build(); - - subscriber.acknowledgeCallable().call(acknowledgeRequest); - } - } - - static void updateSubscriptionDeadLetterTopic( - String projectId, String subscriptionId, String topicId, String deadLetterTopicId) - throws IOException { - - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - - TopicName topicName = TopicName.of(projectId, topicId); - TopicName deadLetterTopicName = TopicName.of(projectId, deadLetterTopicId); - - DeadLetterPolicy deadLetterPolicy = - DeadLetterPolicy.newBuilder() - .setDeadLetterTopic(deadLetterTopicName.toString()) - .setMaxDeliveryAttempts(20) - .build(); - - Subscription subscription = - Subscription.newBuilder() - .setName(subscriptionName.toString()) - .setTopic(topicName.toString()) - .setDeadLetterPolicy(deadLetterPolicy) - .build(); - - FieldMask updateMask = FieldMask.newBuilder().addPaths("dead_letter_policy").build(); - - UpdateSubscriptionRequest request = - UpdateSubscriptionRequest.newBuilder() - .setSubscription(subscription) - .setUpdateMask(updateMask) - .build(); - - Subscription response = subscriptionAdminClient.updateSubscription(request); - System.out.println("Updated subscription " + response.getName()); - } - } - - static void testSubscriptionPermissions(String projectId, String subscriptionId) - throws IOException { - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - - List permissions = new ArrayList<>(); - permissions.add("pubsub.subscriptions.consume"); - permissions.add("pubsub.subscriptions.update"); - - TestIamPermissionsRequest testIamPermissionsRequest = - TestIamPermissionsRequest.newBuilder() - .setResource(subscriptionName.toString()) - .addAllPermissions(permissions) - .build(); - - TestIamPermissionsResponse testedPermissionsResponse = - subscriptionAdminClient.testIamPermissions(testIamPermissionsRequest); - - System.out.println( - "Tested PubSub subscription permissions\n" + testedPermissionsResponse.toString().trim()); - } - } - - static void testTopicPermissions(String projectId, String topicId) throws IOException { - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); - - List permissions = new ArrayList<>(); - permissions.add("pubsub.topics.attachSubscription"); - permissions.add("pubsub.topics.publish"); - permissions.add("pubsub.topics.update"); - - TestIamPermissionsRequest testIamPermissionsRequest = - TestIamPermissionsRequest.newBuilder() - .setResource(topicName.toString()) - .addAllPermissions(permissions) - .build(); - - TestIamPermissionsResponse testedPermissionsResponse = - topicAdminClient.testIamPermissions(testIamPermissionsRequest); - - System.out.println( - "Tested topic permissions\n" + testedPermissionsResponse.toString().trim()); - } - } - - static void deleteTopic(String projectId, String topicId) throws IOException { - try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { - TopicName topicName = TopicName.of(projectId, topicId); - try { - topicAdminClient.deleteTopic(topicName); - System.out.println("Deleted topic " + topicName); - } catch (NotFoundException e) { - System.out.println(e.getMessage()); - } - } - } - - static void deleteSubscription(String projectId, String subscriptionId) throws IOException { - try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, subscriptionId); - try { - subscriptionAdminClient.deleteSubscription(subscriptionName); - System.out.println("Deleted subscription " + subscriptionName); - } catch (NotFoundException e) { - System.out.println(e.getMessage()); - } - } - } -} diff --git a/samples/native-image-sample/src/main/java/utilities/PublishOperations.java b/samples/native-image-sample/src/main/java/utilities/PublishOperations.java deleted file mode 100644 index 068312025..000000000 --- a/samples/native-image-sample/src/main/java/utilities/PublishOperations.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package utilities; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutureCallback; -import com.google.api.core.ApiFutures; -import com.google.api.gax.rpc.ApiException; -import com.google.cloud.pubsub.v1.Publisher; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.ByteString; -import com.google.pubsub.v1.PubsubMessage; -import com.google.pubsub.v1.TopicName; -import java.io.IOException; -import java.time.Instant; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.ExecutionException; - -/** Sample methods for Publishing messages to a topic in Pub/Sub. */ -public class PublishOperations { - - public static void publishMessage(String projectId, String topicId) throws Exception { - - Publisher publisher = Publisher.newBuilder(TopicName.of(projectId, topicId)).build(); - - try { - String message = "Pub/Sub Native Image Test published message at timestamp: " + Instant.now(); - ByteString data = ByteString.copyFromUtf8(message); - PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); - - publisher.publish(pubsubMessage); - - ApiFuture messageIdFuture = publisher.publish(pubsubMessage); - String messageId = messageIdFuture.get(); - - System.out.println("Published message with ID: " + messageId); - } finally { - publisher.shutdown(); - } - } - - public static void publishWithCustomAttributes(String projectId, String topicId) - throws Exception { - - TopicName topicName = TopicName.of(projectId, topicId); - Publisher publisher = Publisher.newBuilder(topicName).build(); - - try { - String message = "first message"; - ByteString data = ByteString.copyFromUtf8(message); - PubsubMessage pubsubMessage = - PubsubMessage.newBuilder() - .setData(data) - .putAllAttributes(Collections.singletonMap("year", "2020")) - .build(); - - // Once published, returns a server-assigned message id (unique within the topic) - ApiFuture messageIdFuture = publisher.publish(pubsubMessage); - String messageId = messageIdFuture.get(); - System.out.println("Published a message with custom attributes: " + messageId); - } finally { - publisher.shutdown(); - } - } - - public static void publishWithBatchSettings(String projectId, String topicId) - throws IOException, ExecutionException, InterruptedException { - - TopicName topicName = TopicName.of(projectId, topicId); - Publisher publisher = Publisher.newBuilder(topicName).build(); - List> messageIdFutures = new ArrayList<>(); - - try { - // schedule publishing one message at a time : messages get automatically batched - for (int i = 0; i < 100; i++) { - String message = "message " + i; - ByteString data = ByteString.copyFromUtf8(message); - PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); - - // Once published, returns a server-assigned message id (unique within the topic) - ApiFuture messageIdFuture = publisher.publish(pubsubMessage); - messageIdFutures.add(messageIdFuture); - } - } finally { - // Wait on any pending publish requests. - List messageIds = ApiFutures.allAsList(messageIdFutures).get(); - System.out.println("Published " + messageIds.size() + " messages with batch settings."); - - publisher.shutdown(); - } - } - - public static void publishWithErrorHandler(String projectId, String topicId) throws IOException { - - TopicName topicName = TopicName.of(projectId, topicId); - Publisher publisher = null; - - try { - // Create a publisher instance with default settings bound to the topic - publisher = Publisher.newBuilder(topicName).build(); - - List messages = Arrays.asList("first message", "second message"); - - for (final String message : messages) { - ByteString data = ByteString.copyFromUtf8(message); - PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build(); - - // Once published, returns a server-assigned message id (unique within the topic) - ApiFuture future = publisher.publish(pubsubMessage); - - // Add an asynchronous callback to handle success / failure - ApiFutures.addCallback( - future, - new ApiFutureCallback() { - - @Override - public void onFailure(Throwable throwable) { - if (throwable instanceof ApiException) { - ApiException apiException = ((ApiException) throwable); - // details on the API exception - System.out.println(apiException.getStatusCode().getCode()); - System.out.println(apiException.isRetryable()); - } - System.out.println("Error publishing message : " + message); - } - - @Override - public void onSuccess(String messageId) { - // Once published, returns server-assigned message ids (unique within the topic) - System.out.println("Success Callback: Published message " + messageId); - } - }, - MoreExecutors.directExecutor()); - } - } finally { - if (publisher != null) { - // When finished with the publisher, shutdown to free up resources. - publisher.shutdown(); - } - } - } -} diff --git a/samples/native-image-sample/src/test/java/pubsub/NativeImagePubSubSampleIT.java b/samples/native-image-sample/src/test/java/pubsub/NativeImagePubSubSampleIT.java deleted file mode 100644 index c221d735a..000000000 --- a/samples/native-image-sample/src/test/java/pubsub/NativeImagePubSubSampleIT.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pubsub; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.cloud.ServiceOptions; -import com.google.pubsub.v1.SubscriptionName; -import com.google.pubsub.v1.TopicName; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.UUID; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import utilities.PublishOperations; - -public class NativeImagePubSubSampleIT { - - private static String TOPIC_ID = "native-pubsub-test-" + UUID.randomUUID(); - private static String PULL_SUB_ID = "native-pubsub-test-sub" + UUID.randomUUID(); - private static String PUSH_SUB_ID = "native-pubsub-test-sub" + UUID.randomUUID(); - private static String PROJECT_ID = ServiceOptions.getDefaultProjectId(); - private static final TopicName TOPIC_NAME = TopicName.of(PROJECT_ID, TOPIC_ID); - private static final SubscriptionName PULL_SUBSCRIPTION_NAME = - SubscriptionName.of(PROJECT_ID, PULL_SUB_ID); - private static final SubscriptionName PUSH_SUBSCRIPTION_NAME = - SubscriptionName.of(PROJECT_ID, PUSH_SUB_ID); - - private ByteArrayOutputStream bout; - private PrintStream out; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - } - - @After - public void cleanUp() throws IOException { - NativeImagePubSubSample.deleteTopic(PROJECT_ID, TOPIC_ID); - NativeImagePubSubSample.deleteSubscription(PROJECT_ID, PULL_SUB_ID); - NativeImagePubSubSample.deleteSubscription(PROJECT_ID, PUSH_SUB_ID); - } - - @Test - public void testRunTopicManagementOperations() throws IOException { - // Topic management operations - NativeImagePubSubSample.createTopic(PROJECT_ID, TOPIC_ID); - NativeImagePubSubSample.createPullSubscription(PROJECT_ID, PULL_SUB_ID, TOPIC_ID); - NativeImagePubSubSample.createPushSubscription(PROJECT_ID, PUSH_SUB_ID, TOPIC_ID); - NativeImagePubSubSample.detachSubscription(PROJECT_ID, PUSH_SUB_ID); - NativeImagePubSubSample.getTopicPolicy(PROJECT_ID, TOPIC_ID); - NativeImagePubSubSample.getSubscriptionPolicy(PROJECT_ID, PULL_SUB_ID); - NativeImagePubSubSample.listSubscriptionInProject(PROJECT_ID); - NativeImagePubSubSample.listSubscriptionInTopic(PROJECT_ID, TOPIC_ID); - NativeImagePubSubSample.listTopics(PROJECT_ID); - NativeImagePubSubSample.updateSubscriptionDeadLetterTopic( - PROJECT_ID, PUSH_SUB_ID, TOPIC_ID, TOPIC_ID); - NativeImagePubSubSample.testTopicPermissions(PROJECT_ID, TOPIC_ID); - NativeImagePubSubSample.testSubscriptionPermissions(PROJECT_ID, PUSH_SUB_ID); - - // Verify create topic and subscriptions - assertThat(bout.toString()) - .contains("Created topic: " + TOPIC_NAME.toString() + " under project: " + PROJECT_ID); - assertThat(bout.toString()) - .contains("Created pull subscription: " + PULL_SUBSCRIPTION_NAME.toString()); - assertThat(bout.toString()) - .contains("Created push subscription: " + PUSH_SUBSCRIPTION_NAME.toString()); - - // Verify detach subscription - assertThat(bout.toString()).contains("Subscription is detached"); - - // Verify topic and subscription IAM policy - assertThat(bout.toString()).contains("Topic policy: etag: \"\\000 \\001"); - assertThat(bout.toString()).contains("Subscription policy: etag: \"\\000 \\001\""); - - // Verify listing of subscriptions and topics - assertThat(bout.toString()).contains("Subscriptions in project count:"); - assertThat(bout.toString()).contains("Subscriptions under topic:"); - assertThat(bout.toString()).contains("Topic count under project:"); - - // Verify update of subscription - assertThat(bout.toString()).contains("Updated subscription " + PUSH_SUBSCRIPTION_NAME); - - // Verify topic permissions - assertThat(bout.toString()).contains("Tested topic permissions"); - assertThat(bout.toString()).contains("permissions: \"pubsub.topics.attachSubscription\""); - assertThat(bout.toString()).contains("permissions: \"pubsub.topics.publish\""); - assertThat(bout.toString()).contains("permissions: \"pubsub.topics.update\""); - - // Verify subscription permissions - assertThat(bout.toString()).contains("Tested PubSub subscription permissions"); - assertThat(bout.toString()).contains("permissions: \"pubsub.subscriptions.consume\""); - assertThat(bout.toString()).contains("permissions: \"pubsub.subscriptions.update\""); - } - - @Test - public void testPublishAndSubscribe() throws Exception { - NativeImagePubSubSample.createTopic(PROJECT_ID, TOPIC_ID); - NativeImagePubSubSample.createPullSubscription(PROJECT_ID, PULL_SUB_ID, TOPIC_ID); - - bout.reset(); - - // Publish - PublishOperations.publishMessage(PROJECT_ID, TOPIC_ID); - PublishOperations.publishWithBatchSettings(PROJECT_ID, TOPIC_ID); - PublishOperations.publishWithCustomAttributes(PROJECT_ID, TOPIC_ID); - PublishOperations.publishWithErrorHandler(PROJECT_ID, TOPIC_ID); - - // Subscribe - NativeImagePubSubSample.subscribeSync(PROJECT_ID, PULL_SUB_ID); - NativeImagePubSubSample.receiveMessagesWithDeliveryAttempts(PROJECT_ID, PULL_SUB_ID); - - assertThat(bout.toString()).contains("Published message with ID"); - assertThat(bout.toString()).contains("Published 100 messages with batch settings."); - assertThat(bout.toString()).contains("Published a message with custom attributes"); - assertThat(bout.toString()).contains("Success Callback: Published message"); - assertThat(bout.toString()).contains("Success Callback: Published message"); - assertThat(bout.toString()).contains("Received Payload"); - assertThat(bout.toString()).contains("Successfully started an async message receiver"); - } -} diff --git a/samples/pom.xml b/samples/pom.xml index 6d05e41e2..3f092679c 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,6 @@ install-without-bom snapshot snippets - native-image-sample From 5a7d4e5a4ba85a5fbc08e38754365b6f26b2483b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 15 Jul 2024 19:42:36 +0200 Subject: [PATCH 19/30] test(deps): update dependency com.google.truth:truth to v1.4.4 (#2114) --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 42b2ec00d..e9042b5c4 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 13fd9af3a..591ff0ee5 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -69,7 +69,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 5bf9d6093..4bb65df74 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -73,7 +73,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 5d4261825..b15119c88 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -92,7 +92,7 @@ com.google.truth truth - 1.4.3 + 1.4.4 test From a77e26a63534f76693984f51369e8ca32f697b85 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 16 Jul 2024 21:05:06 +0200 Subject: [PATCH 20/30] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.2 (#2115) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e9042b5c4..4ecd37b68 100644 --- a/pom.xml +++ b/pom.xml @@ -145,7 +145,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.1 + 3.6.2 From 2b15b0a3f43c9ccef663fedf0398375f58fd9183 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:00:18 -0400 Subject: [PATCH 21/30] chore: Update generation configuration at Tue Jul 23 02:17:28 UTC 2024 (#2118) * chore: Update generation configuration at Tue Jul 23 02:17:28 UTC 2024 * chore: generate libraries at Tue Jul 23 02:17:50 UTC 2024 --- generation_config.yaml | 2 +- .../google/pubsub/v1/CloudStorageConfig.java | 117 ++++- .../v1/CloudStorageConfigOrBuilder.java | 14 + .../com/google/pubsub/v1/PubsubProto.java | 430 +++++++++--------- .../com/google/pubsub/v1/PullRequest.java | 8 +- .../pubsub/v1/PullRequestOrBuilder.java | 2 +- .../main/proto/google/pubsub/v1/pubsub.proto | 4 + 7 files changed, 347 insertions(+), 230 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index c98375b66..ba697aea4 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.42.0 -googleapis_commitish: 19577edb4d439db98d2fb1f6f48f2e1b29fba099 +googleapis_commitish: d44c3001960c430bc60ac1e1736cebfd8fd45e77 libraries_bom_version: 26.43.0 libraries: - api_shortname: pubsub diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java index f847f91d6..69560d392 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfig.java @@ -1865,6 +1865,25 @@ public long getMaxBytes() { return maxBytes_; } + public static final int MAX_MESSAGES_FIELD_NUMBER = 8; + private long maxMessages_ = 0L; + /** + * + * + *
+   * Optional. The maximum number of messages that can be written to a Cloud
+   * Storage file before a new file is created. Min 1000 messages.
+   * 
+ * + * int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxMessages. + */ + @java.lang.Override + public long getMaxMessages() { + return maxMessages_; + } + public static final int STATE_FIELD_NUMBER = 9; private int state_ = 0; /** @@ -2002,6 +2021,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxBytes_ != 0L) { output.writeInt64(7, maxBytes_); } + if (maxMessages_ != 0L) { + output.writeInt64(8, maxMessages_); + } if (state_ != com.google.pubsub.v1.CloudStorageConfig.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(9, state_); } @@ -2045,6 +2067,9 @@ public int getSerializedSize() { if (maxBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, maxBytes_); } + if (maxMessages_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, maxMessages_); + } if (state_ != com.google.pubsub.v1.CloudStorageConfig.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); } @@ -2078,6 +2103,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMaxDuration().equals(other.getMaxDuration())) return false; } if (getMaxBytes() != other.getMaxBytes()) return false; + if (getMaxMessages() != other.getMaxMessages()) return false; if (state_ != other.state_) return false; if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; if (!getOutputFormatCase().equals(other.getOutputFormatCase())) return false; @@ -2116,6 +2142,8 @@ public int hashCode() { } hash = (37 * hash) + MAX_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxBytes()); + hash = (37 * hash) + MAX_MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxMessages()); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; @@ -2296,6 +2324,7 @@ public Builder clear() { maxDurationBuilder_ = null; } maxBytes_ = 0L; + maxMessages_ = 0L; state_ = 0; serviceAccountEmail_ = ""; outputFormatCase_ = 0; @@ -2359,9 +2388,12 @@ private void buildPartial0(com.google.pubsub.v1.CloudStorageConfig result) { result.maxBytes_ = maxBytes_; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.state_ = state_; + result.maxMessages_ = maxMessages_; } if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { result.serviceAccountEmail_ = serviceAccountEmail_; } result.bitField0_ |= to_bitField0_; @@ -2449,12 +2481,15 @@ public Builder mergeFrom(com.google.pubsub.v1.CloudStorageConfig other) { if (other.getMaxBytes() != 0L) { setMaxBytes(other.getMaxBytes()); } + if (other.getMaxMessages() != 0L) { + setMaxMessages(other.getMaxMessages()); + } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (!other.getServiceAccountEmail().isEmpty()) { serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } switch (other.getOutputFormatCase()) { @@ -2541,10 +2576,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 56 + case 64: + { + maxMessages_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 64 case 72: { state_ = input.readEnum(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 72 case 82: @@ -2556,7 +2597,7 @@ public Builder mergeFrom( case 90: { serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 90 default: @@ -3801,6 +3842,62 @@ public Builder clearMaxBytes() { return this; } + private long maxMessages_; + /** + * + * + *
+     * Optional. The maximum number of messages that can be written to a Cloud
+     * Storage file before a new file is created. Min 1000 messages.
+     * 
+ * + * int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxMessages. + */ + @java.lang.Override + public long getMaxMessages() { + return maxMessages_; + } + /** + * + * + *
+     * Optional. The maximum number of messages that can be written to a Cloud
+     * Storage file before a new file is created. Min 1000 messages.
+     * 
+ * + * int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxMessages to set. + * @return This builder for chaining. + */ + public Builder setMaxMessages(long value) { + + maxMessages_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of messages that can be written to a Cloud
+     * Storage file before a new file is created. Min 1000 messages.
+     * 
+ * + * int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxMessages() { + bitField0_ = (bitField0_ & ~0x00000100); + maxMessages_ = 0L; + onChanged(); + return this; + } + private int state_ = 0; /** * @@ -3837,7 +3934,7 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3880,7 +3977,7 @@ public Builder setState(com.google.pubsub.v1.CloudStorageConfig.State value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; state_ = value.getNumber(); onChanged(); return this; @@ -3900,7 +3997,7 @@ public Builder setState(com.google.pubsub.v1.CloudStorageConfig.State value) { * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); state_ = 0; onChanged(); return this; @@ -3983,7 +4080,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { throw new NullPointerException(); } serviceAccountEmail_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4005,7 +4102,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { */ public Builder clearServiceAccountEmail() { serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -4032,7 +4129,7 @@ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) } checkByteStringIsUtf8(value); serviceAccountEmail_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java index 11d3fa787..22e01385e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CloudStorageConfigOrBuilder.java @@ -287,6 +287,20 @@ public interface CloudStorageConfigOrBuilder */ long getMaxBytes(); + /** + * + * + *
+   * Optional. The maximum number of messages that can be written to a Cloud
+   * Storage file before a new file is created. Min 1000 messages.
+   * 
+ * + * int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxMessages. + */ + long getMaxMessages(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index a80aaa209..f0d1612a3 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -427,7 +427,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tB\003\340A\001\"\212\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + "\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DENIED\020\002\022\r\n\tNO" + "T_FOUND\020\003\022\023\n\017SCHEMA_MISMATCH\020\004\022#\n\037IN_TRA" - + "NSIT_LOCATION_RESTRICTION\020\005\"\316\005\n\022CloudSto" + + "NSIT_LOCATION_RESTRICTION\020\005\"\351\005\n\022CloudSto" + "rageConfig\022\023\n\006bucket\030\001 \001(\tB\003\340A\002\022\034\n\017filen" + "ame_prefix\030\002 \001(\tB\003\340A\001\022\034\n\017filename_suffix" + "\030\003 \001(\tB\003\340A\001\022%\n\030filename_datetime_format\030" @@ -437,222 +437,223 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "bsub.v1.CloudStorageConfig.AvroConfigB\003\340" + "A\001H\000\0224\n\014max_duration\030\006 \001(\0132\031.google.prot" + "obuf.DurationB\003\340A\001\022\026\n\tmax_bytes\030\007 \001(\003B\003\340" - + "A\001\022>\n\005state\030\t \001(\0162*.google.pubsub.v1.Clo" - + "udStorageConfig.StateB\003\340A\003\022\"\n\025service_ac" - + "count_email\030\013 \001(\tB\003\340A\001\032\014\n\nTextConfig\032H\n\n" - + "AvroConfig\022\033\n\016write_metadata\030\001 \001(\010B\003\340A\001\022" - + "\035\n\020use_topic_schema\030\002 \001(\010B\003\340A\001\"\212\001\n\005State" - + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021P" - + "ERMISSION_DENIED\020\002\022\r\n\tNOT_FOUND\020\003\022#\n\037IN_" - + "TRANSIT_LOCATION_RESTRICTION\020\004\022\023\n\017SCHEMA" - + "_MISMATCH\020\005B\017\n\routput_format\"|\n\017Received" - + "Message\022\023\n\006ack_id\030\001 \001(\tB\003\340A\001\0225\n\007message\030" - + "\002 \001(\0132\037.google.pubsub.v1.PubsubMessageB\003" - + "\340A\001\022\035\n\020delivery_attempt\030\003 \001(\005B\003\340A\001\"Z\n\026Ge" - + "tSubscriptionRequest\022@\n\014subscription\030\001 \001" + + "A\001\022\031\n\014max_messages\030\010 \001(\003B\003\340A\001\022>\n\005state\030\t" + + " \001(\0162*.google.pubsub.v1.CloudStorageConf" + + "ig.StateB\003\340A\003\022\"\n\025service_account_email\030\013" + + " \001(\tB\003\340A\001\032\014\n\nTextConfig\032H\n\nAvroConfig\022\033\n" + + "\016write_metadata\030\001 \001(\010B\003\340A\001\022\035\n\020use_topic_" + + "schema\030\002 \001(\010B\003\340A\001\"\212\001\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSION_DEN" + + "IED\020\002\022\r\n\tNOT_FOUND\020\003\022#\n\037IN_TRANSIT_LOCAT" + + "ION_RESTRICTION\020\004\022\023\n\017SCHEMA_MISMATCH\020\005B\017" + + "\n\routput_format\"|\n\017ReceivedMessage\022\023\n\006ac" + + "k_id\030\001 \001(\tB\003\340A\001\0225\n\007message\030\002 \001(\0132\037.googl" + + "e.pubsub.v1.PubsubMessageB\003\340A\001\022\035\n\020delive" + + "ry_attempt\030\003 \001(\005B\003\340A\001\"Z\n\026GetSubscription" + + "Request\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"p" + + "ubsub.googleapis.com/Subscription\"\214\001\n\031Up" + + "dateSubscriptionRequest\0229\n\014subscription\030" + + "\001 \001(\0132\036.google.pubsub.v1.SubscriptionB\003\340" + + "A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\002\"\221\001\n\030ListSubscriptionsRe" + + "quest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudres" + + "ourcemanager.googleapis.com/Project\022\026\n\tp" + + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" + + "\003\340A\001\"u\n\031ListSubscriptionsResponse\022:\n\rsub" + + "scriptions\030\001 \003(\0132\036.google.pubsub.v1.Subs" + + "criptionB\003\340A\001\022\034\n\017next_page_token\030\002 \001(\tB\003" + + "\340A\001\"]\n\031DeleteSubscriptionRequest\022@\n\014subs" + + "cription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapi" + + "s.com/Subscription\"\223\001\n\027ModifyPushConfigR" + + "equest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pu" + + "bsub.googleapis.com/Subscription\0226\n\013push" + + "_config\030\002 \001(\0132\034.google.pubsub.v1.PushCon" + + "figB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscription" + + "\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su" + + "bscription\022!\n\022return_immediately\030\002 \001(\010B\005" + + "\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002\"Q\n\014Pull" + + "Response\022A\n\021received_messages\030\001 \003(\0132!.go" + + "ogle.pubsub.v1.ReceivedMessageB\003\340A\001\"\225\001\n\030" + + "ModifyAckDeadlineRequest\022@\n\014subscription" + + "\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su" + + "bscription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_" + + "deadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022Acknowled" + + "geRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022\024\n\007a" + + "ck_ids\030\002 \003(\tB\003\340A\002\"\307\002\n\024StreamingPullReque" + + "st\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub" + + ".googleapis.com/Subscription\022\024\n\007ack_ids\030" + + "\002 \003(\tB\003\340A\001\022$\n\027modify_deadline_seconds\030\003 " + + "\003(\005B\003\340A\001\022$\n\027modify_deadline_ack_ids\030\004 \003(" + + "\tB\003\340A\001\022(\n\033stream_ack_deadline_seconds\030\005 " + + "\001(\005B\003\340A\002\022\026\n\tclient_id\030\006 \001(\tB\003\340A\001\022%\n\030max_" + + "outstanding_messages\030\007 \001(\003B\003\340A\001\022\"\n\025max_o" + + "utstanding_bytes\030\010 \001(\003B\003\340A\001\"\236\006\n\025Streamin" + + "gPullResponse\022A\n\021received_messages\030\001 \003(\013" + + "2!.google.pubsub.v1.ReceivedMessageB\003\340A\001" + + "\022f\n\030acknowledge_confirmation\030\005 \001(\0132?.goo" + + "gle.pubsub.v1.StreamingPullResponse.Ackn" + + "owledgeConfirmationB\003\340A\001\022t\n modify_ack_d" + + "eadline_confirmation\030\003 \001(\0132E.google.pubs" + + "ub.v1.StreamingPullResponse.ModifyAckDea" + + "dlineConfirmationB\003\340A\001\022d\n\027subscription_p" + + "roperties\030\004 \001(\0132>.google.pubsub.v1.Strea" + + "mingPullResponse.SubscriptionPropertiesB" + + "\003\340A\001\032\224\001\n\027AcknowledgeConfirmation\022\024\n\007ack_" + + "ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_ids\030\002 \003(\tB" + + "\003\340A\001\022\036\n\021unordered_ack_ids\030\003 \003(\tB\003\340A\001\022%\n\030" + + "temporary_failed_ack_ids\030\004 \003(\tB\003\340A\001\032z\n\035M" + + "odifyAckDeadlineConfirmation\022\024\n\007ack_ids\030" + + "\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_ids\030\002 \003(\tB\003\340A\001" + + "\022%\n\030temporary_failed_ack_ids\030\003 \003(\tB\003\340A\001\032" + + "k\n\026SubscriptionProperties\022*\n\035exactly_onc" + + "e_delivery_enabled\030\001 \001(\010B\003\340A\001\022%\n\030message" + + "_ordering_enabled\030\002 \001(\010B\003\340A\001\"\210\002\n\025CreateS" + + "napshotRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pu" + + "bsub.googleapis.com/Snapshot\022@\n\014subscrip" + + "tion\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.co" + + "m/Subscription\022H\n\006labels\030\003 \003(\01323.google." + + "pubsub.v1.CreateSnapshotRequest.LabelsEn" + + "tryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateSnapshotReques" + + "t\0221\n\010snapshot\030\001 \001(\0132\032.google.pubsub.v1.S" + + "napshotB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMaskB\003\340A\002\"\301\002\n\010Snapshot\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\001\0222\n\005topic\030\002 \001(\tB#\340A\001\372A" + + "\035\n\033pubsub.googleapis.com/Topic\0224\n\013expire" + + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\001\022;\n\006labels\030\004 \003(\0132&.google.pubsub.v1." + + "Snapshot.LabelsEntryB\003\340A\001\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036p" + + "ubsub.googleapis.com/Snapshot\022\'projects/" + + "{project}/snapshots/{snapshot}\"N\n\022GetSna" + + "pshotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036" + + "pubsub.googleapis.com/Snapshot\"\215\001\n\024ListS" + + "napshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-" + + "\n+cloudresourcemanager.googleapis.com/Pr" + + "oject\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_to" + + "ken\030\003 \001(\tB\003\340A\001\"i\n\025ListSnapshotsResponse\022" + + "2\n\tsnapshots\030\001 \003(\0132\032.google.pubsub.v1.Sn" + + "apshotB\003\340A\001\022\034\n\017next_page_token\030\002 \001(\tB\003\340A" + + "\001\"Q\n\025DeleteSnapshotRequest\0228\n\010snapshot\030\001" + + " \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snap" + + "shot\"\306\001\n\013SeekRequest\022@\n\014subscription\030\001 \001" + "(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscr" - + "iption\"\214\001\n\031UpdateSubscriptionRequest\0229\n\014" - + "subscription\030\001 \001(\0132\036.google.pubsub.v1.Su" - + "bscriptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\003\340A\002\"\221\001\n\030ListSu" - + "bscriptionsRequest\022D\n\007project\030\001 \001(\tB3\340A\002" - + "\372A-\n+cloudresourcemanager.googleapis.com" - + "/Project\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage" - + "_token\030\003 \001(\tB\003\340A\001\"u\n\031ListSubscriptionsRe" - + "sponse\022:\n\rsubscriptions\030\001 \003(\0132\036.google.p" - + "ubsub.v1.SubscriptionB\003\340A\001\022\034\n\017next_page_" - + "token\030\002 \001(\tB\003\340A\001\"]\n\031DeleteSubscriptionRe" - + "quest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pub" - + "sub.googleapis.com/Subscription\"\223\001\n\027Modi" - + "fyPushConfigRequest\022@\n\014subscription\030\001 \001(" - + "\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscri" - + "ption\0226\n\013push_config\030\002 \001(\0132\034.google.pubs" - + "ub.v1.PushConfigB\003\340A\002\"\215\001\n\013PullRequest\022@\n" - + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goog" - + "leapis.com/Subscription\022!\n\022return_immedi" - + "ately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005" - + "B\003\340A\002\"Q\n\014PullResponse\022A\n\021received_messag" - + "es\030\001 \003(\0132!.google.pubsub.v1.ReceivedMess" - + "ageB\003\340A\001\"\225\001\n\030ModifyAckDeadlineRequest\022@\n" - + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goog" - + "leapis.com/Subscription\022\024\n\007ack_ids\030\004 \003(\t" - + "B\003\340A\002\022!\n\024ack_deadline_seconds\030\003 \001(\005B\003\340A\002" - + "\"l\n\022AcknowledgeRequest\022@\n\014subscription\030\001" - + " \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subs" - + "cription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\307\002\n\024Strea" - + "mingPullRequest\022@\n\014subscription\030\001 \001(\tB*\340" - + "A\002\372A$\n\"pubsub.googleapis.com/Subscriptio" - + "n\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\001\022$\n\027modify_deadli" - + "ne_seconds\030\003 \003(\005B\003\340A\001\022$\n\027modify_deadline" - + "_ack_ids\030\004 \003(\tB\003\340A\001\022(\n\033stream_ack_deadli" - + "ne_seconds\030\005 \001(\005B\003\340A\002\022\026\n\tclient_id\030\006 \001(\t" - + "B\003\340A\001\022%\n\030max_outstanding_messages\030\007 \001(\003B" - + "\003\340A\001\022\"\n\025max_outstanding_bytes\030\010 \001(\003B\003\340A\001" - + "\"\236\006\n\025StreamingPullResponse\022A\n\021received_m" - + "essages\030\001 \003(\0132!.google.pubsub.v1.Receive" - + "dMessageB\003\340A\001\022f\n\030acknowledge_confirmatio" - + "n\030\005 \001(\0132?.google.pubsub.v1.StreamingPull" - + "Response.AcknowledgeConfirmationB\003\340A\001\022t\n" - + " modify_ack_deadline_confirmation\030\003 \001(\0132" - + "E.google.pubsub.v1.StreamingPullResponse" - + ".ModifyAckDeadlineConfirmationB\003\340A\001\022d\n\027s" - + "ubscription_properties\030\004 \001(\0132>.google.pu" - + "bsub.v1.StreamingPullResponse.Subscripti" - + "onPropertiesB\003\340A\001\032\224\001\n\027AcknowledgeConfirm" - + "ation\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_a" - + "ck_ids\030\002 \003(\tB\003\340A\001\022\036\n\021unordered_ack_ids\030\003" - + " \003(\tB\003\340A\001\022%\n\030temporary_failed_ack_ids\030\004 " - + "\003(\tB\003\340A\001\032z\n\035ModifyAckDeadlineConfirmatio" - + "n\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ack_i" - + "ds\030\002 \003(\tB\003\340A\001\022%\n\030temporary_failed_ack_id" - + "s\030\003 \003(\tB\003\340A\001\032k\n\026SubscriptionProperties\022*" - + "\n\035exactly_once_delivery_enabled\030\001 \001(\010B\003\340" - + "A\001\022%\n\030message_ordering_enabled\030\002 \001(\010B\003\340A" - + "\001\"\210\002\n\025CreateSnapshotRequest\0224\n\004name\030\001 \001(" - + "\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snapsho" - + "t\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$\n\"pubsub." - + "googleapis.com/Subscription\022H\n\006labels\030\003 " - + "\003(\01323.google.pubsub.v1.CreateSnapshotReq" - + "uest.LabelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateS" - + "napshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.googl" - + "e.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_mask" - + "\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"" - + "\301\002\n\010Snapshot\022\021\n\004name\030\001 \001(\tB\003\340A\001\0222\n\005topic" - + "\030\002 \001(\tB#\340A\001\372A\035\n\033pubsub.googleapis.com/To" - + "pic\0224\n\013expire_time\030\003 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\001\022;\n\006labels\030\004 \003(\0132&.goog" - + "le.pubsub.v1.Snapshot.LabelsEntryB\003\340A\001\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001:L\352AI\n\036pubsub.googleapis.com/Snapsh" - + "ot\022\'projects/{project}/snapshots/{snapsh" - + "ot}\"N\n\022GetSnapshotRequest\0228\n\010snapshot\030\001 " - + "\001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snaps" - + "hot\"\215\001\n\024ListSnapshotsRequest\022D\n\007project\030" - + "\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goog" - + "leapis.com/Project\022\026\n\tpage_size\030\002 \001(\005B\003\340" - + "A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"i\n\025ListSnaps" - + "hotsResponse\0222\n\tsnapshots\030\001 \003(\0132\032.google" - + ".pubsub.v1.SnapshotB\003\340A\001\022\034\n\017next_page_to" - + "ken\030\002 \001(\tB\003\340A\001\"Q\n\025DeleteSnapshotRequest\022" - + "8\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.google" - + "apis.com/Snapshot\"\306\001\n\013SeekRequest\022@\n\014sub" - + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" - + "is.com/Subscription\022/\n\004time\030\002 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\001H\000\022:\n\010snapshot" - + "\030\003 \001(\tB&\340A\001\372A \n\036pubsub.googleapis.com/Sn" - + "apshotH\000B\010\n\006target\"\016\n\014SeekResponse2\270\013\n\tP" - + "ublisher\022q\n\013CreateTopic\022\027.google.pubsub." - + "v1.Topic\032\027.google.pubsub.v1.Topic\"0\332A\004na" - + "me\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/*}" - + ":\001*\022\221\001\n\013UpdateTopic\022$.google.pubsub.v1.U" - + "pdateTopicRequest\032\027.google.pubsub.v1.Top" - + "ic\"C\332A\021topic,update_mask\202\323\344\223\002)2$/v1/{top" - + "ic.name=projects/*/topics/*}:\001*\022\223\001\n\007Publ" - + "ish\022 .google.pubsub.v1.PublishRequest\032!." - + "google.pubsub.v1.PublishResponse\"C\332A\016top" - + "ic,messages\202\323\344\223\002,\"\'/v1/{topic=projects/*" - + "/topics/*}:publish:\001*\022w\n\010GetTopic\022!.goog" - + "le.pubsub.v1.GetTopicRequest\032\027.google.pu" - + "bsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{topi" - + "c=projects/*/topics/*}\022\212\001\n\nListTopics\022#." - + "google.pubsub.v1.ListTopicsRequest\032$.goo" - + "gle.pubsub.v1.ListTopicsResponse\"1\332A\007pro" - + "ject\202\323\344\223\002!\022\037/v1/{project=projects/*}/top" - + "ics\022\272\001\n\026ListTopicSubscriptions\022/.google." - + "pubsub.v1.ListTopicSubscriptionsRequest\032" - + "0.google.pubsub.v1.ListTopicSubscription" - + "sResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic=pr" - + "ojects/*/topics/*}/subscriptions\022\252\001\n\022Lis" - + "tTopicSnapshots\022+.google.pubsub.v1.ListT" - + "opicSnapshotsRequest\032,.google.pubsub.v1." - + "ListTopicSnapshotsResponse\"9\332A\005topic\202\323\344\223" - + "\002+\022)/v1/{topic=projects/*/topics/*}/snap" - + "shots\022|\n\013DeleteTopic\022$.google.pubsub.v1." - + "DeleteTopicRequest\032\026.google.protobuf.Emp" - + "ty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=projects/" - + "*/topics/*}\022\255\001\n\022DetachSubscription\022+.goo" - + "gle.pubsub.v1.DetachSubscriptionRequest\032" - + ",.google.pubsub.v1.DetachSubscriptionRes" - + "ponse\"<\202\323\344\223\0026\"4/v1/{subscription=project" - + "s/*/subscriptions/*}:detach\032p\312A\025pubsub.g" + + "iption\022/\n\004time\030\002 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\001H\000\022:\n\010snapshot\030\003 \001(\tB&\340A\001\372A" + + " \n\036pubsub.googleapis.com/SnapshotH\000B\010\n\006t" + + "arget\"\016\n\014SeekResponse2\270\013\n\tPublisher\022q\n\013C" + + "reateTopic\022\027.google.pubsub.v1.Topic\032\027.go" + + "ogle.pubsub.v1.Topic\"0\332A\004name\202\323\344\223\002#\032\036/v1" + + "/{name=projects/*/topics/*}:\001*\022\221\001\n\013Updat" + + "eTopic\022$.google.pubsub.v1.UpdateTopicReq" + + "uest\032\027.google.pubsub.v1.Topic\"C\332A\021topic," + + "update_mask\202\323\344\223\002)2$/v1/{topic.name=proje" + + "cts/*/topics/*}:\001*\022\223\001\n\007Publish\022 .google." + + "pubsub.v1.PublishRequest\032!.google.pubsub" + + ".v1.PublishResponse\"C\332A\016topic,messages\202\323" + + "\344\223\002,\"\'/v1/{topic=projects/*/topics/*}:pu" + + "blish:\001*\022w\n\010GetTopic\022!.google.pubsub.v1." + + "GetTopicRequest\032\027.google.pubsub.v1.Topic" + + "\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{topic=projects/*/" + + "topics/*}\022\212\001\n\nListTopics\022#.google.pubsub" + + ".v1.ListTopicsRequest\032$.google.pubsub.v1" + + ".ListTopicsResponse\"1\332A\007project\202\323\344\223\002!\022\037/" + + "v1/{project=projects/*}/topics\022\272\001\n\026ListT" + + "opicSubscriptions\022/.google.pubsub.v1.Lis" + + "tTopicSubscriptionsRequest\0320.google.pubs" + + "ub.v1.ListTopicSubscriptionsResponse\"=\332A" + + "\005topic\202\323\344\223\002/\022-/v1/{topic=projects/*/topi" + + "cs/*}/subscriptions\022\252\001\n\022ListTopicSnapsho" + + "ts\022+.google.pubsub.v1.ListTopicSnapshots" + + "Request\032,.google.pubsub.v1.ListTopicSnap" + + "shotsResponse\"9\332A\005topic\202\323\344\223\002+\022)/v1/{topi" + + "c=projects/*/topics/*}/snapshots\022|\n\013Dele" + + "teTopic\022$.google.pubsub.v1.DeleteTopicRe" + + "quest\032\026.google.protobuf.Empty\"/\332A\005topic\202" + + "\323\344\223\002!*\037/v1/{topic=projects/*/topics/*}\022\255" + + "\001\n\022DetachSubscription\022+.google.pubsub.v1" + + ".DetachSubscriptionRequest\032,.google.pubs" + + "ub.v1.DetachSubscriptionResponse\"<\202\323\344\223\0026" + + "\"4/v1/{subscription=projects/*/subscript" + + "ions/*}:detach\032p\312A\025pubsub.googleapis.com" + + "\322AUhttps://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/pubsub2\322\025\n\nSubscriber\022\264\001\n\022CreateSubscr" + + "iption\022\036.google.pubsub.v1.Subscription\032\036" + + ".google.pubsub.v1.Subscription\"^\332A+name," + + "topic,push_config,ack_deadline_seconds\202\323" + + "\344\223\002*\032%/v1/{name=projects/*/subscriptions" + + "/*}:\001*\022\241\001\n\017GetSubscription\022(.google.pubs" + + "ub.v1.GetSubscriptionRequest\032\036.google.pu" + + "bsub.v1.Subscription\"D\332A\014subscription\202\323\344" + + "\223\002/\022-/v1/{subscription=projects/*/subscr" + + "iptions/*}\022\273\001\n\022UpdateSubscription\022+.goog" + + "le.pubsub.v1.UpdateSubscriptionRequest\032\036" + + ".google.pubsub.v1.Subscription\"X\332A\030subsc" + + "ription,update_mask\202\323\344\223\002722/v1/{subscrip" + + "tion.name=projects/*/subscriptions/*}:\001*" + + "\022\246\001\n\021ListSubscriptions\022*.google.pubsub.v" + + "1.ListSubscriptionsRequest\032+.google.pubs" + + "ub.v1.ListSubscriptionsResponse\"8\332A\007proj" + + "ect\202\323\344\223\002(\022&/v1/{project=projects/*}/subs" + + "criptions\022\237\001\n\022DeleteSubscription\022+.googl" + + "e.pubsub.v1.DeleteSubscriptionRequest\032\026." + + "google.protobuf.Empty\"D\332A\014subscription\202\323" + + "\344\223\002/*-/v1/{subscription=projects/*/subsc" + + "riptions/*}\022\317\001\n\021ModifyAckDeadline\022*.goog" + + "le.pubsub.v1.ModifyAckDeadlineRequest\032\026." + + "google.protobuf.Empty\"v\332A)subscription,a" + + "ck_ids,ack_deadline_seconds\202\323\344\223\002D\"?/v1/{" + + "subscription=projects/*/subscriptions/*}" + + ":modifyAckDeadline:\001*\022\250\001\n\013Acknowledge\022$." + + "google.pubsub.v1.AcknowledgeRequest\032\026.go" + + "ogle.protobuf.Empty\"[\332A\024subscription,ack" + + "_ids\202\323\344\223\002>\"9/v1/{subscription=projects/*" + + "/subscriptions/*}:acknowledge:\001*\022\320\001\n\004Pul" + + "l\022\035.google.pubsub.v1.PullRequest\032\036.googl" + + "e.pubsub.v1.PullResponse\"\210\001\332A,subscripti" + + "on,return_immediately,max_messages\332A\031sub" + + "scription,max_messages\202\323\344\223\0027\"2/v1/{subsc" + + "ription=projects/*/subscriptions/*}:pull" + + ":\001*\022f\n\rStreamingPull\022&.google.pubsub.v1." + + "StreamingPullRequest\032\'.google.pubsub.v1." + + "StreamingPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPu" + + "shConfig\022).google.pubsub.v1.ModifyPushCo" + + "nfigRequest\032\026.google.protobuf.Empty\"d\332A\030" + + "subscription,push_config\202\323\344\223\002C\">/v1/{sub" + + "scription=projects/*/subscriptions/*}:mo" + + "difyPushConfig:\001*\022\211\001\n\013GetSnapshot\022$.goog" + + "le.pubsub.v1.GetSnapshotRequest\032\032.google" + + ".pubsub.v1.Snapshot\"8\332A\010snapshot\202\323\344\223\002\'\022%" + + "/v1/{snapshot=projects/*/snapshots/*}\022\226\001" + + "\n\rListSnapshots\022&.google.pubsub.v1.ListS" + + "napshotsRequest\032\'.google.pubsub.v1.ListS" + + "napshotsResponse\"4\332A\007project\202\323\344\223\002$\022\"/v1/" + + "{project=projects/*}/snapshots\022\227\001\n\016Creat" + + "eSnapshot\022\'.google.pubsub.v1.CreateSnaps" + + "hotRequest\032\032.google.pubsub.v1.Snapshot\"@" + + "\332A\021name,subscription\202\323\344\223\002&\032!/v1/{name=pr" + + "ojects/*/snapshots/*}:\001*\022\243\001\n\016UpdateSnaps" + + "hot\022\'.google.pubsub.v1.UpdateSnapshotReq" + + "uest\032\032.google.pubsub.v1.Snapshot\"L\332A\024sna" + + "pshot,update_mask\202\323\344\223\002/2*/v1/{snapshot.n" + + "ame=projects/*/snapshots/*}:\001*\022\213\001\n\016Delet" + + "eSnapshot\022\'.google.pubsub.v1.DeleteSnaps" + + "hotRequest\032\026.google.protobuf.Empty\"8\332A\010s" + + "napshot\202\323\344\223\002\'*%/v1/{snapshot=projects/*/" + + "snapshots/*}\022\204\001\n\004Seek\022\035.google.pubsub.v1" + + ".SeekRequest\032\036.google.pubsub.v1.SeekResp" + + "onse\"=\202\323\344\223\0027\"2/v1/{subscription=projects" + + "/*/subscriptions/*}:seek:\001*\032p\312A\025pubsub.g" + "oogleapis.com\322AUhttps://www.googleapis.c" + "om/auth/cloud-platform,https://www.googl" - + "eapis.com/auth/pubsub2\322\025\n\nSubscriber\022\264\001\n" - + "\022CreateSubscription\022\036.google.pubsub.v1.S" - + "ubscription\032\036.google.pubsub.v1.Subscript" - + "ion\"^\332A+name,topic,push_config,ack_deadl" - + "ine_seconds\202\323\344\223\002*\032%/v1/{name=projects/*/" - + "subscriptions/*}:\001*\022\241\001\n\017GetSubscription\022" - + "(.google.pubsub.v1.GetSubscriptionReques" - + "t\032\036.google.pubsub.v1.Subscription\"D\332A\014su" - + "bscription\202\323\344\223\002/\022-/v1/{subscription=proj" - + "ects/*/subscriptions/*}\022\273\001\n\022UpdateSubscr" - + "iption\022+.google.pubsub.v1.UpdateSubscrip" - + "tionRequest\032\036.google.pubsub.v1.Subscript" - + "ion\"X\332A\030subscription,update_mask\202\323\344\223\002722" - + "/v1/{subscription.name=projects/*/subscr" - + "iptions/*}:\001*\022\246\001\n\021ListSubscriptions\022*.go" - + "ogle.pubsub.v1.ListSubscriptionsRequest\032" - + "+.google.pubsub.v1.ListSubscriptionsResp" - + "onse\"8\332A\007project\202\323\344\223\002(\022&/v1/{project=pro" - + "jects/*}/subscriptions\022\237\001\n\022DeleteSubscri" - + "ption\022+.google.pubsub.v1.DeleteSubscript" - + "ionRequest\032\026.google.protobuf.Empty\"D\332A\014s" - + "ubscription\202\323\344\223\002/*-/v1/{subscription=pro" - + "jects/*/subscriptions/*}\022\317\001\n\021ModifyAckDe" - + "adline\022*.google.pubsub.v1.ModifyAckDeadl" - + "ineRequest\032\026.google.protobuf.Empty\"v\332A)s" - + "ubscription,ack_ids,ack_deadline_seconds" - + "\202\323\344\223\002D\"?/v1/{subscription=projects/*/sub" - + "scriptions/*}:modifyAckDeadline:\001*\022\250\001\n\013A" - + "cknowledge\022$.google.pubsub.v1.Acknowledg" - + "eRequest\032\026.google.protobuf.Empty\"[\332A\024sub" - + "scription,ack_ids\202\323\344\223\002>\"9/v1/{subscripti" - + "on=projects/*/subscriptions/*}:acknowled" - + "ge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.PullRe" - + "quest\032\036.google.pubsub.v1.PullResponse\"\210\001" - + "\332A,subscription,return_immediately,max_m" - + "essages\332A\031subscription,max_messages\202\323\344\223\002" - + "7\"2/v1/{subscription=projects/*/subscrip" - + "tions/*}:pull:\001*\022f\n\rStreamingPull\022&.goog" - + "le.pubsub.v1.StreamingPullRequest\032\'.goog" - + "le.pubsub.v1.StreamingPullResponse\"\000(\0010\001" - + "\022\273\001\n\020ModifyPushConfig\022).google.pubsub.v1" - + ".ModifyPushConfigRequest\032\026.google.protob" - + "uf.Empty\"d\332A\030subscription,push_config\202\323\344" - + "\223\002C\">/v1/{subscription=projects/*/subscr" - + "iptions/*}:modifyPushConfig:\001*\022\211\001\n\013GetSn" - + "apshot\022$.google.pubsub.v1.GetSnapshotReq" - + "uest\032\032.google.pubsub.v1.Snapshot\"8\332A\010sna" - + "pshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/sn" - + "apshots/*}\022\226\001\n\rListSnapshots\022&.google.pu" - + "bsub.v1.ListSnapshotsRequest\032\'.google.pu" - + "bsub.v1.ListSnapshotsResponse\"4\332A\007projec" - + "t\202\323\344\223\002$\022\"/v1/{project=projects/*}/snapsh" - + "ots\022\227\001\n\016CreateSnapshot\022\'.google.pubsub.v" - + "1.CreateSnapshotRequest\032\032.google.pubsub." - + "v1.Snapshot\"@\332A\021name,subscription\202\323\344\223\002&\032" - + "!/v1/{name=projects/*/snapshots/*}:\001*\022\243\001" - + "\n\016UpdateSnapshot\022\'.google.pubsub.v1.Upda" - + "teSnapshotRequest\032\032.google.pubsub.v1.Sna" - + "pshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/2*/v" - + "1/{snapshot.name=projects/*/snapshots/*}" - + ":\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubsub.v" - + "1.DeleteSnapshotRequest\032\026.google.protobu" - + "f.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snapsho" - + "t=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035.goo" - + "gle.pubsub.v1.SeekRequest\032\036.google.pubsu" - + "b.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subscrip" - + "tion=projects/*/subscriptions/*}:seek:\001*" - + "\032p\312A\025pubsub.googleapis.com\322AUhttps://www" - + ".googleapis.com/auth/cloud-platform,http" - + "s://www.googleapis.com/auth/pubsubB\252\001\n\024c" - + "om.google.pubsub.v1B\013PubsubProtoP\001Z2clou" - + "d.google.com/go/pubsub/apiv1/pubsubpb;pu" - + "bsubpb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Goo" - + "gle\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::Pub" - + "Sub::V1b\006proto3" + + "eapis.com/auth/pubsubB\252\001\n\024com.google.pub" + + "sub.v1B\013PubsubProtoP\001Z2cloud.google.com/" + + "go/pubsub/apiv1/pubsubpb;pubsubpb\370\001\001\252\002\026G" + + "oogle.Cloud.PubSub.V1\312\002\026Google\\Cloud\\Pub" + + "Sub\\V1\352\002\031Google::Cloud::PubSub::V1b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -972,6 +973,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AvroConfig", "MaxDuration", "MaxBytes", + "MaxMessages", "State", "ServiceAccountEmail", "OutputFormat", diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java index a26effb78..d108f51ff 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java @@ -137,7 +137,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1387 + * google/pubsub/v1/pubsub.proto;l=1391 * @return The returnImmediately. */ @java.lang.Override @@ -688,7 +688,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1387 + * google/pubsub/v1/pubsub.proto;l=1391 * @return The returnImmediately. */ @java.lang.Override @@ -714,7 +714,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1387 + * google/pubsub/v1/pubsub.proto;l=1391 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -744,7 +744,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1387 + * google/pubsub/v1/pubsub.proto;l=1391 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index 94c2e0c10..d293e9ac1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -72,7 +72,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1387 + * google/pubsub/v1/pubsub.proto;l=1391 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index b70bda11a..b5092087a 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -1240,6 +1240,10 @@ message CloudStorageConfig { // be exceeded in cases where messages are larger than the limit. int64 max_bytes = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The maximum number of messages that can be written to a Cloud + // Storage file before a new file is created. Min 1000 messages. + int64 max_messages = 8 [(google.api.field_behavior) = OPTIONAL]; + // Output only. An output-only field that indicates whether or not the // subscription can receive messages. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; From 0e040cb9b1bdc1ceabe5995475368d75b49290ef Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:30:18 -0400 Subject: [PATCH 22/30] chore: Update generation configuration at Sat Jul 27 02:16:29 UTC 2024 (#2119) * chore: Update generation configuration at Wed Jul 24 02:17:25 UTC 2024 * chore: Update generation configuration at Thu Jul 25 02:17:32 UTC 2024 * chore: Update generation configuration at Fri Jul 26 02:17:25 UTC 2024 * chore: Update generation configuration at Sat Jul 27 02:16:29 UTC 2024 * chore: generate libraries at Sat Jul 27 02:16:53 UTC 2024 --- generation_config.yaml | 4 ++-- .../google/cloud/pubsub/v1/stub/PublisherStubSettings.java | 2 ++ .../cloud/pubsub/v1/stub/SchemaServiceStubSettings.java | 2 ++ .../google/cloud/pubsub/v1/stub/SubscriberStubSettings.java | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index ba697aea4..a9b459e57 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.42.0 -googleapis_commitish: d44c3001960c430bc60ac1e1736cebfd8fd45e77 +gapic_generator_version: 2.43.0 +googleapis_commitish: 0fa9ce880be5ea7c3027015849cd4fbfb04812c5 libraries_bom_version: 26.43.0 libraries: - api_shortname: pubsub diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java index 40f03dd7f..bc169972d 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.java @@ -23,6 +23,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.batching.BatchingSettings; import com.google.api.gax.batching.FlowControlSettings; import com.google.api.gax.batching.FlowController; @@ -492,6 +493,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "pubsub.googleapis.com:443"; } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java index 9d68b251e..1ab1f310a 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SchemaServiceStubSettings.java @@ -22,6 +22,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -352,6 +353,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "pubsub.googleapis.com:443"; } diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java index 30803382a..40d5a4b54 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/stub/SubscriberStubSettings.java @@ -22,6 +22,7 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; @@ -397,6 +398,7 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild } /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint() { return "pubsub.googleapis.com:443"; } From 7fbea6d0c922dd3485f19eafccc42869efd0e5ed Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 30 Jul 2024 03:30:32 +0200 Subject: [PATCH 23/30] deps: update dependency com.google.cloud:sdk-platform-java-config to v3.33.0 (#2121) --- .github/workflows/unmanaged_dependency_check.yaml | 2 +- .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index de006d9e2..96fde5ee4 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.32.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.33.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 7d5ab3a25..7008a7215 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.32.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.33.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 519c2e3ce..931f9bb00 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.32.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.33.0" } env_vars: { diff --git a/pom.xml b/pom.xml index 4ecd37b68..4419d7423 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.32.0 + 3.33.0 From 24ebe2402fe6278348d87b5a4259c365a819877f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 30 Jul 2024 03:30:47 +0200 Subject: [PATCH 24/30] deps: update dependency com.google.cloud:google-cloud-bigquery to v2.42.0 (#2124) --- 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 591ff0ee5..7e3007543 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.41.0 + 2.42.0 com.google.cloud diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4bb65df74..8fd69b0dc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -85,7 +85,7 @@ com.google.cloud google-cloud-bigquery - 2.41.0 + 2.42.0 com.google.cloud From 1f6428a8b79369a239664b9ea7cd38e024db9724 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 30 Jul 2024 04:38:43 +0200 Subject: [PATCH 25/30] deps: update dependency com.google.cloud:google-cloud-core to v2.41.0 (#2120) --- 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 7e3007543..e24cff6cf 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.40.0 + 2.41.0 tests diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 8fd69b0dc..ed24807f2 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -79,7 +79,7 @@ com.google.cloud google-cloud-core - 2.40.0 + 2.41.0 tests diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b15119c88..67ab4d9e9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -98,7 +98,7 @@ com.google.cloud google-cloud-core - 2.40.0 + 2.41.0 tests From dfe7739c8ceef75252cdfecdd686e3abc1b65390 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Wed, 31 Jul 2024 16:56:06 -0400 Subject: [PATCH 26/30] chore: setup 1.129.x lts branch (#2128) --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index 43fa6c78a..dae3c7e8a 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -38,3 +38,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.125.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.129.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 80d26801c..8f2999f82 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -159,6 +159,22 @@ branchProtectionRules: - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc + - pattern: 1.129.x + 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 permissionRules: - team: yoshi-admins permission: admin From 99b90aba9952237f4e13d3e8383abaa2e270ed13 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:57:06 -0400 Subject: [PATCH 27/30] chore: Update generation configuration at Thu Aug 1 02:21:32 UTC 2024 (#2125) * chore: Update generation configuration at Tue Jul 30 02:17:27 UTC 2024 * chore: Update generation configuration at Wed Jul 31 02:05:30 UTC 2024 * chore: Update generation configuration at Thu Aug 1 02:21:32 UTC 2024 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index a9b459e57..8f790ad7e 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.43.0 -googleapis_commitish: 0fa9ce880be5ea7c3027015849cd4fbfb04812c5 +googleapis_commitish: 24c5ee09178ac7d1387dfa2d6053be2fb93c8dc4 libraries_bom_version: 26.43.0 libraries: - api_shortname: pubsub From 2348d2022bc400b7f187d3db7f43aff94d8884a8 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 1 Aug 2024 22:16:21 +0200 Subject: [PATCH 28/30] deps: update dependency com.google.cloud:google-cloud-storage to v2.41.0 (#2129) --- 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 e24cff6cf..23e234307 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.40.1 + 2.41.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ed24807f2..e447ef75e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -90,7 +90,7 @@ com.google.cloud google-cloud-storage - 2.40.1 + 2.41.0 From 58435f9026bc3958dc11705a5d319058b2ed436a Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 1 Aug 2024 22:17:03 +0200 Subject: [PATCH 29/30] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.9.1 (#2110) --- google-cloud-pubsub-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 295c7717e..cb218c150 100644 --- a/google-cloud-pubsub-bom/pom.xml +++ b/google-cloud-pubsub-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.8.1 + 1.9.1 Google Cloud pubsub BOM From 34a9bd8f5df3c9620e40a43a54529b8541b8f763 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:38:15 -0400 Subject: [PATCH 30/30] chore(main): release 1.132.0 (#2098) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 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, 42 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89626575a..4f35da2d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [1.132.0](https://github.com/googleapis/java-pubsub/compare/v1.131.0...v1.132.0) (2024-08-01) + + +### Features + +* Enable hermetic library generation ([#2048](https://github.com/googleapis/java-pubsub/issues/2048)) ([283a5e8](https://github.com/googleapis/java-pubsub/commit/283a5e89837071678f8dd94b8b8adfad91a6766c)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-bigquery to v2.41.0 ([#2093](https://github.com/googleapis/java-pubsub/issues/2093)) ([217b8a3](https://github.com/googleapis/java-pubsub/commit/217b8a3f5419f80402d349b8873d7302eeb35e3f)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.42.0 ([#2124](https://github.com/googleapis/java-pubsub/issues/2124)) ([24ebe24](https://github.com/googleapis/java-pubsub/commit/24ebe2402fe6278348d87b5a4259c365a819877f)) +* Update dependency com.google.cloud:google-cloud-core to v2.41.0 ([#2120](https://github.com/googleapis/java-pubsub/issues/2120)) ([1f6428a](https://github.com/googleapis/java-pubsub/commit/1f6428a8b79369a239664b9ea7cd38e024db9724)) +* Update dependency com.google.cloud:google-cloud-storage to v2.40.1 ([#2095](https://github.com/googleapis/java-pubsub/issues/2095)) ([0d64d6c](https://github.com/googleapis/java-pubsub/commit/0d64d6cf7799a176297ceaa1475b7cb29a64bebc)) +* Update dependency com.google.cloud:google-cloud-storage to v2.41.0 ([#2129](https://github.com/googleapis/java-pubsub/issues/2129)) ([2348d20](https://github.com/googleapis/java-pubsub/commit/2348d2022bc400b7f187d3db7f43aff94d8884a8)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.33.0 ([#2121](https://github.com/googleapis/java-pubsub/issues/2121)) ([7fbea6d](https://github.com/googleapis/java-pubsub/commit/7fbea6d0c922dd3485f19eafccc42869efd0e5ed)) +* Update dependency com.google.protobuf:protobuf-java-util to v4.27.2 ([#2091](https://github.com/googleapis/java-pubsub/issues/2091)) ([9859f11](https://github.com/googleapis/java-pubsub/commit/9859f1181a12bc683eaf4a6345bf2528a5463c59)) +* Update dependency org.junit.vintage:junit-vintage-engine to v5.10.3 ([#2096](https://github.com/googleapis/java-pubsub/issues/2096)) ([42f12ed](https://github.com/googleapis/java-pubsub/commit/42f12ed3270e66beae316deb729b445c94dcb1a8)) + + +### Documentation + +* **samples:** Optimistic subscribe sample ([#2063](https://github.com/googleapis/java-pubsub/issues/2063)) ([53a4844](https://github.com/googleapis/java-pubsub/commit/53a4844f09eace777142b8cdcd06bc07cef0b432)) + ## [1.131.0](https://github.com/googleapis/java-pubsub/compare/v1.130.1...v1.131.0) (2024-06-25) diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index cb218c150..184a61cd4 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.131.1-SNAPSHOT + 1.132.0 pom com.google.cloud @@ -52,17 +52,17 @@ com.google.cloud google-cloud-pubsub - 1.131.1-SNAPSHOT + 1.132.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.113.1-SNAPSHOT + 1.114.0 com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.113.1-SNAPSHOT + 1.114.0 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index af2d034e5..6b20a22fa 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.131.1-SNAPSHOT + 1.132.0 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.131.1-SNAPSHOT + 1.132.0 google-cloud-pubsub diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 9b5e7af10..fe238a5d9 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.113.1-SNAPSHOT + 1.114.0 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.131.1-SNAPSHOT + 1.132.0 diff --git a/pom.xml b/pom.xml index 4419d7423..4988583c1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.131.1-SNAPSHOT + 1.132.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.113.1-SNAPSHOT + 1.114.0 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.113.1-SNAPSHOT + 1.114.0 com.google.cloud google-cloud-pubsub - 1.131.1-SNAPSHOT + 1.132.0 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index 4d6605394..3b697ce71 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.113.1-SNAPSHOT + 1.114.0 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.131.1-SNAPSHOT + 1.132.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index e447ef75e..bba30cd51 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.131.1-SNAPSHOT + 1.132.0 diff --git a/versions.txt b/versions.txt index cdd8b1243..6a4c448a6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-pubsub:1.131.0:1.131.1-SNAPSHOT -grpc-google-cloud-pubsub-v1:1.113.0:1.113.1-SNAPSHOT -proto-google-cloud-pubsub-v1:1.113.0:1.113.1-SNAPSHOT +google-cloud-pubsub:1.132.0:1.132.0 +grpc-google-cloud-pubsub-v1:1.114.0:1.114.0 +proto-google-cloud-pubsub-v1:1.114.0:1.114.0