diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6137bef2a..0bcf47a66 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,5 +4,9 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax +# The @googleapis/api-pubsub is the default owner for changes in this repo +* @googleapis/yoshi-java @googleapis/api-pubsub +**/*.java @googleapis/api-pubsub + # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 000000000..7b48cc28d --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 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. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 000000000..6bddd18ea --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,49 @@ + +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push \ No newline at end of file diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 000000000..bc1554aec --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,88 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-v') + steps: + - uses: actions/github-script@v3.0.0 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 000000000..c46230a78 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 000000000..cc3ada374 --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-pubsub/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100644 index 000000000..7c518941f --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2020 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. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-pubsub + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Kokoro exposes this as a file, but the scripts expect just a plain variable. +export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) + +# Setup git credentials +echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials +git config --global credential.helper 'store --file ~/.git-credentials' + +python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool +python3.6 -m autosynth.synth \ + --repository=googleapis/java-pubsub \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" \ No newline at end of file diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index a27131cf4..587130b55 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -13,32 +13,7 @@ action { } } -# Fetch the token needed for reporting release status to GitHub -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - -# Fetch magictoken to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "releasetool-magictoken" - } - } -} - -# Fetch api key to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "magic-github-proxy-api-key" - } - } +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } diff --git a/.repo-metadata.json b/.repo-metadata.json index 84ee73390..93da177cf 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -11,6 +11,7 @@ "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", "requires_billing": true } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 44efc6958..beff31460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +### [1.108.3](https://www.github.com/googleapis/java-pubsub/compare/v1.108.2...v1.108.3) (2020-10-02) + + +### Bug Fixes + +* ensure proper cleanup of publisher in tests ([#310](https://www.github.com/googleapis/java-pubsub/issues/310)) ([b2b2f86](https://www.github.com/googleapis/java-pubsub/commit/b2b2f8694b925aad95e891cbd0d89426989fec59)) +* Ensure that messages that are in pending batches for an ordering key are canceled when a previous publish for the ordering keys fails ([#366](https://www.github.com/googleapis/java-pubsub/issues/366)) ([7cdf8bc](https://www.github.com/googleapis/java-pubsub/commit/7cdf8bcf71a6c141f8b751b41fb2e055a75a4022)) +* make subscriberIT test less flaky ([#340](https://www.github.com/googleapis/java-pubsub/issues/340)) ([5d4f534](https://www.github.com/googleapis/java-pubsub/commit/5d4f5345b13171a47f022d34d39609c2f4329069)) +* Only check keyHasError if ordering key is non-empty ([#367](https://www.github.com/googleapis/java-pubsub/issues/367)) ([8b2d0b7](https://www.github.com/googleapis/java-pubsub/commit/8b2d0b73a46e6b91795ad05a8dd0f626249c4f30)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.0 ([#357](https://www.github.com/googleapis/java-pubsub/issues/357)) ([3b3616c](https://www.github.com/googleapis/java-pubsub/commit/3b3616c524059fb8a87bf30a66c481000046132a)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.9.0 ([#337](https://www.github.com/googleapis/java-pubsub/issues/337)) ([8cf77ee](https://www.github.com/googleapis/java-pubsub/commit/8cf77ee3b31356f342942a9ffaa61db2d0686769)) + ### [1.108.2](https://www.github.com/googleapis/java-pubsub/compare/v1.108.1...v1.108.2) (2020-08-21) diff --git a/README.md b/README.md index 2a286e2bc..19076360a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 9.1.0 + 10.1.0 pom import @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-pubsub:1.108.2' +compile 'com.google.cloud:google-cloud-pubsub:1.108.3' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.108.2" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.108.3" ``` [//]: # ({x-version-update-end}) @@ -232,6 +232,7 @@ has instructions for running the samples. | Create Topic Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/CreateTopicExample.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/CreateTopicExample.java) | | Delete Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/DeleteSubscriptionExample.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/DeleteSubscriptionExample.java) | | Delete Topic Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/DeleteTopicExample.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/DeleteTopicExample.java) | +| Detach Subscription Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.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/DetachSubscriptionExample.java) | | Get Subscription Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/GetSubscriptionPolicyExample.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/GetSubscriptionPolicyExample.java) | | Get Topic Policy Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/samples/snippets/src/main/java/pubsub/GetTopicPolicyExample.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/GetTopicPolicyExample.java) | | List Subscriptions In Project Example | [source code](https://github.com/googleapis/java-pubsub/blob/master/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) | diff --git a/google-cloud-pubsub-bom/pom.xml b/google-cloud-pubsub-bom/pom.xml index 0d0fc01c5..744cb5254 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.108.2 + 1.108.3 pom com.google.cloud @@ -64,17 +64,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.90.2 + 1.90.3 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.90.2 + 1.90.3 com.google.cloud google-cloud-pubsub - 1.108.2 + 1.108.3 diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 7d4f513d0..e9dc2258d 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.108.2 + 1.108.3 jar Google Cloud Pub/Sub https://github.com/googleapis/java-pubsub @@ -11,7 +11,7 @@ com.google.cloud google-cloud-pubsub-parent - 1.108.2 + 1.108.3 google-cloud-pubsub diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java index 6a9f68659..07a550496 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java @@ -256,6 +256,11 @@ public ApiFuture publish(PubsubMessage message) { List batchesToSend; messagesBatchLock.lock(); try { + if (!orderingKey.isEmpty() && sequentialExecutor.keyHasError(orderingKey)) { + outstandingPublish.publishResult.setException( + SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION); + return outstandingPublish.publishResult; + } MessagesBatch messagesBatch = messagesBatches.get(orderingKey); if (messagesBatch == null) { messagesBatch = new MessagesBatch(batchingSettings, orderingKey); @@ -462,6 +467,21 @@ public void onSuccess(PublishResponse result) { @Override public void onFailure(Throwable t) { try { + if (outstandingBatch.orderingKey != null && !outstandingBatch.orderingKey.isEmpty()) { + messagesBatchLock.lock(); + try { + MessagesBatch messagesBatch = messagesBatches.get(outstandingBatch.orderingKey); + if (messagesBatch != null) { + for (OutstandingPublish outstanding : messagesBatch.messages) { + outstanding.publishResult.setException( + SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION); + } + messagesBatches.remove(outstandingBatch.orderingKey); + } + } finally { + messagesBatchLock.unlock(); + } + } outstandingBatch.onFailure(t); } finally { messagesWaiter.incrementPendingCount(-outstandingBatch.size()); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java index 292921850..4866e6be4 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java @@ -243,6 +243,10 @@ public void cancel(Throwable e) { return future; } + boolean keyHasError(String key) { + return keysWithErrors.contains(key); + } + void resumePublish(String key) { keysWithErrors.remove(key); } diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java index c68367601..e5a785aed 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java @@ -31,8 +31,10 @@ import com.google.api.gax.core.FixedExecutorProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.rpc.DataLossException; +import com.google.api.gax.rpc.FixedTransportChannelProvider; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.cloud.pubsub.v1.Publisher.Builder; import com.google.protobuf.ByteString; @@ -40,9 +42,11 @@ import com.google.pubsub.v1.PublishRequest; import com.google.pubsub.v1.PublishResponse; import com.google.pubsub.v1.PubsubMessage; +import io.grpc.ManagedChannel; import io.grpc.Server; import io.grpc.Status; import io.grpc.StatusException; +import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; import java.util.List; import java.util.concurrent.CountDownLatch; @@ -75,6 +79,8 @@ public class PublisherImplTest { private FakePublisherServiceImpl testPublisherServiceImpl; + private ManagedChannel testChannel; + private Server testServer; @Before @@ -84,6 +90,7 @@ public void setUp() throws Exception { InProcessServerBuilder serverBuilder = InProcessServerBuilder.forName("test-server"); serverBuilder.addService(testPublisherServiceImpl); testServer = serverBuilder.build(); + testChannel = InProcessChannelBuilder.forName("test-server").build(); testServer.start(); fakeExecutor = new FakeScheduledExecutorService(); @@ -92,6 +99,7 @@ public void setUp() throws Exception { @After public void tearDown() throws Exception { testServer.shutdownNow().awaitTermination(); + testChannel.shutdown(); } @Test @@ -122,8 +130,7 @@ public void testPublishByDuration() throws Exception { assertEquals("2", publishFuture2.get()); assertEquals(2, testPublisherServiceImpl.getCapturedRequests().get(0).getMessagesCount()); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + shutdownTestPublisher(publisher); } @Test @@ -160,8 +167,9 @@ public void testPublishByNumBatchedMessages() throws Exception { assertEquals(2, testPublisherServiceImpl.getCapturedRequests().get(0).getMessagesCount()); assertEquals(2, testPublisherServiceImpl.getCapturedRequests().get(1).getMessagesCount()); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + + fakeExecutor.advanceTime(Duration.ofSeconds(100)); + shutdownTestPublisher(publisher); } @Test @@ -195,8 +203,9 @@ public void testSinglePublishByNumBytes() throws Exception { assertEquals("4", publishFuture4.get()); assertEquals(2, testPublisherServiceImpl.getCapturedRequests().size()); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + + fakeExecutor.advanceTime(Duration.ofSeconds(100)); + shutdownTestPublisher(publisher); } @Test @@ -219,15 +228,16 @@ public void testPublishByShutdown() throws Exception { // Note we are not advancing time or reaching the count threshold but messages should // still get published by call to shutdown - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); // Verify the publishes completed assertTrue(publishFuture1.isDone()); assertTrue(publishFuture2.isDone()); assertEquals("1", publishFuture1.get()); assertEquals("2", publishFuture2.get()); + + fakeExecutor.advanceTime(Duration.ofSeconds(100)); + publisher.awaitTermination(1, TimeUnit.MINUTES); } @Test @@ -269,8 +279,7 @@ public void testPublishMixedSizeAndDuration() throws Exception { assertEquals(2, testPublisherServiceImpl.getCapturedRequests().get(0).getMessagesCount()); assertEquals(1, testPublisherServiceImpl.getCapturedRequests().get(1).getMessagesCount()); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + shutdownTestPublisher(publisher); } private ApiFuture sendTestMessage(Publisher publisher, String data) { @@ -326,7 +335,9 @@ public void testBatchedMessagesWithOrderingKeyByNum() throws Exception { } } } - publisher.shutdown(); + + fakeExecutor.advanceTime(Duration.ofSeconds(100)); + shutdownTestPublisher(publisher); } @Test @@ -389,7 +400,7 @@ public void testBatchedMessagesWithOrderingKeyByDuration() throws Exception { } } } - publisher.shutdown(); + shutdownTestPublisher(publisher); } @Test @@ -418,7 +429,8 @@ public void testLargeMessagesDoNotReorderBatches() throws Exception { // Verify that messages with "OrderB" were delivered in order. assertTrue(Integer.parseInt(publishFuture2.get()) < Integer.parseInt(publishFuture3.get())); - publisher.shutdown(); + fakeExecutor.advanceTime(Duration.ofSeconds(100)); + shutdownTestPublisher(publisher); } @Test @@ -431,7 +443,7 @@ public void testOrderingKeyWhenDisabled_throwsException() throws Exception { } catch (IllegalStateException expected) { // expected } - publisher.shutdown(); + shutdownTestPublisher(publisher); } @Test @@ -461,6 +473,7 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { assertEquals(4, testPublisherServiceImpl.getCapturedRequests().size()); publisher.shutdown(); + assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); } @Test @@ -550,7 +563,58 @@ public void testResumePublish() throws Exception { Assert.assertEquals("7", future7.get()); Assert.assertEquals("8", future8.get()); - publisher.shutdown(); + shutdownTestPublisher(publisher); + } + + @Test + public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws Exception { + Publisher publisher = + getTestPublisherBuilder() + .setExecutorProvider(SINGLE_THREAD_EXECUTOR) + .setBatchingSettings( + Publisher.Builder.DEFAULT_BATCHING_SETTINGS + .toBuilder() + .setElementCountThreshold(2L) + .setDelayThreshold(Duration.ofSeconds(500)) + .build()) + .setEnableMessageOrdering(true) + .build(); + + // Send two messages that will fulfill the first batch, which will return a failure. + testPublisherServiceImpl.addPublishError(new StatusException(Status.INVALID_ARGUMENT)); + ApiFuture publishFuture1 = sendTestMessageWithOrderingKey(publisher, "A", "a"); + ApiFuture publishFuture2 = sendTestMessageWithOrderingKey(publisher, "B", "a"); + + // A third message will fail because the first attempt to publish failed. + ApiFuture publishFuture3 = sendTestMessageWithOrderingKey(publisher, "C", "a"); + + try { + publishFuture1.get(); + fail("Should have failed."); + } catch (ExecutionException e) { + } + + try { + publishFuture2.get(); + fail("Should have failed."); + } catch (ExecutionException e) { + } + + try { + publishFuture3.get(); + fail("Should have failed."); + } catch (ExecutionException e) { + assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); + } + + // A subsequent attempt fails immediately. + ApiFuture publishFuture4 = sendTestMessageWithOrderingKey(publisher, "D", "a"); + try { + publishFuture4.get(); + fail("Should have failed."); + } catch (ExecutionException e) { + assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); + } } private ApiFuture sendTestMessageWithOrderingKey( @@ -604,8 +668,7 @@ public void testPublishFailureRetries() throws Exception { assertEquals("1", publishFuture1.get()); assertEquals(2, testPublisherServiceImpl.getCapturedRequests().size()); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + shutdownTestPublisher(publisher); } @Test(expected = ExecutionException.class) @@ -629,8 +692,7 @@ public void testPublishFailureRetries_retriesDisabled() throws Exception { publishFuture1.get(); } finally { assertSame(testPublisherServiceImpl.getCapturedRequests().size(), 1); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + shutdownTestPublisher(publisher); } } @@ -656,8 +718,7 @@ public void testPublishFailureRetries_maxRetriesSetup() throws Exception { assertEquals("1", publishFuture1.get()); assertEquals(3, testPublisherServiceImpl.getCapturedRequests().size()); - publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + shutdownTestPublisher(publisher); } @Test @@ -683,7 +744,7 @@ public void testPublishFailureRetries_maxRetriesSetUnlimited() throws Exception assertEquals(3, testPublisherServiceImpl.getCapturedRequests().size()); publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); } @Test(expected = ExecutionException.class) @@ -712,14 +773,15 @@ public void testPublishFailureRetries_nonRetryableFailsImmediately() throws Exce } finally { assertTrue(testPublisherServiceImpl.getCapturedRequests().size() >= 1); publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); } } @Test public void testPublisherGetters() throws Exception { Publisher.Builder builder = Publisher.newBuilder(TEST_TOPIC); - builder.setChannelProvider(TEST_CHANNEL_PROVIDER); + builder.setChannelProvider( + FixedTransportChannelProvider.create(GrpcTransportChannel.create(testChannel))); builder.setExecutorProvider(SINGLE_THREAD_EXECUTOR); builder.setBatchingSettings( BatchingSettings.newBuilder() @@ -735,7 +797,7 @@ public void testPublisherGetters() throws Exception { assertEquals(Duration.ofMillis(11), publisher.getBatchingSettings().getDelayThreshold()); assertEquals(12, (long) publisher.getBatchingSettings().getElementCountThreshold()); publisher.shutdown(); - publisher.awaitTermination(1, TimeUnit.MINUTES); + assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); } @Test @@ -1115,7 +1177,14 @@ public void run() { private Builder getTestPublisherBuilder() { return Publisher.newBuilder(TEST_TOPIC) .setExecutorProvider(FixedExecutorProvider.create(fakeExecutor)) - .setChannelProvider(TEST_CHANNEL_PROVIDER) + .setChannelProvider( + FixedTransportChannelProvider.create(GrpcTransportChannel.create(testChannel))) .setCredentialsProvider(NoCredentialsProvider.create()); } + + private void shutdownTestPublisher(Publisher publisher) throws InterruptedException { + publisher.shutdown(); + fakeExecutor.advanceTime(Duration.ofSeconds(10)); + assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); + } } diff --git a/grpc-google-cloud-pubsub-v1/pom.xml b/grpc-google-cloud-pubsub-v1/pom.xml index 082c5db61..40aa0b950 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.90.2 + 1.90.3 grpc-google-cloud-pubsub-v1 GRPC library for grpc-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.108.2 + 1.108.3 diff --git a/pom.xml b/pom.xml index 3bd96fce4..d172fd516 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-pubsub-parent pom - 1.108.2 + 1.108.3 Google Cloud Pub/Sub Parent https://github.com/googleapis/java-pubsub @@ -70,7 +70,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.8.6 + 0.10.0 pom import @@ -78,17 +78,17 @@ com.google.api.grpc proto-google-cloud-pubsub-v1 - 1.90.2 + 1.90.3 com.google.api.grpc grpc-google-cloud-pubsub-v1 - 1.90.2 + 1.90.3 com.google.cloud google-cloud-pubsub - 1.108.2 + 1.108.3 @@ -148,7 +148,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.0 + 3.1.1 diff --git a/proto-google-cloud-pubsub-v1/pom.xml b/proto-google-cloud-pubsub-v1/pom.xml index fd2ef5a63..24e74d4f9 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.90.2 + 1.90.3 proto-google-cloud-pubsub-v1 PROTO library for proto-google-cloud-pubsub-v1 com.google.cloud google-cloud-pubsub-parent - 1.108.2 + 1.108.3 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 078c3d50f..331f50703 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/pom.xml b/samples/pom.xml index a962f9780..aee27735f 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -33,7 +33,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 8d759f124..14f83deac 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -29,7 +29,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 @@ -43,7 +43,7 @@ com.google.cloud google-cloud-pubsub - 1.108.2 + 1.108.3 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 7468d0906..54643aa91 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -29,7 +29,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 @@ -45,7 +45,7 @@ com.google.cloud libraries-bom - 9.1.0 + 11.0.0 pom import diff --git a/samples/snippets/src/main/java/pubsub/CreateTopicExample.java b/samples/snippets/src/main/java/pubsub/CreateTopicExample.java index 2b99be65d..3417be7c5 100644 --- a/samples/snippets/src/main/java/pubsub/CreateTopicExample.java +++ b/samples/snippets/src/main/java/pubsub/CreateTopicExample.java @@ -17,6 +17,7 @@ package pubsub; // [START pubsub_create_topic] +// [START pubsub_quickstart_create_topic] import com.google.cloud.pubsub.v1.TopicAdminClient; import com.google.pubsub.v1.Topic; @@ -41,3 +42,5 @@ public static void createTopicExample(String projectId, String topicId) throws I } } // [END pubsub_create_topic] +// [END pubsub_quickstart_create_topic] + diff --git a/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java b/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java new file mode 100644 index 000000000..ac04c1c90 --- /dev/null +++ b/samples/snippets/src/main/java/pubsub/DetachSubscriptionExample.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 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_detach_subscription] +import com.google.cloud.pubsub.v1.SubscriptionAdminClient; +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.DetachSubscriptionRequest; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.Subscription; +import java.io.IOException; + +public class DetachSubscriptionExample { + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + // Choose an existing subscription. + String subscriptionId = "your-subscription-id"; + + detachSubscriptionExample(projectId, subscriptionId); + } + + public static void detachSubscriptionExample(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 { + System.out.println("Subscription is NOT detached."); + } + } + } +} +// [END pubsub_detach_subscription] \ No newline at end of file diff --git a/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java b/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java index 9f7757707..d199e7ff8 100644 --- a/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java +++ b/samples/snippets/src/main/java/pubsub/PublishWithOrderingKeys.java @@ -47,6 +47,8 @@ public static void publishWithOrderingKeysExample(String projectId, String topic // Create a publisher and set message ordering to true. Publisher publisher = Publisher.newBuilder(topicName) + // Sending messages to the same region ensures they are received in order + // even when multiple publishers are used. .setEndpoint("us-east1-pubsub.googleapis.com:443") .setEnableMessageOrdering(true) .build(); diff --git a/samples/snippets/src/main/java/pubsub/PublisherExample.java b/samples/snippets/src/main/java/pubsub/PublisherExample.java index 069c2e4d5..e4dc39a89 100644 --- a/samples/snippets/src/main/java/pubsub/PublisherExample.java +++ b/samples/snippets/src/main/java/pubsub/PublisherExample.java @@ -17,6 +17,7 @@ package pubsub; // [START pubsub_quickstart_publisher] +// [START pubsub_publish] import com.google.api.core.ApiFuture; import com.google.cloud.pubsub.v1.Publisher; @@ -63,3 +64,4 @@ public static void publisherExample(String projectId, String topicId) } } // [END pubsub_quickstart_publisher] +// [END pubsub_publish] diff --git a/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java b/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java index 842657b08..04718d419 100644 --- a/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java +++ b/samples/snippets/src/main/java/pubsub/RemoveDeadLetterPolicyExample.java @@ -46,9 +46,6 @@ public static void removeDeadLetterPolicyExample( ProjectSubscriptionName.of(projectId, subscriptionId); TopicName topicName = TopicName.of(projectId, topicId); - System.out.println( - "Before: " + subscriptionAdminClient.getSubscription(subscriptionName).getAllFields()); - // Construct the subscription you expect to have after the request. Here, // values in the required fields (name, topic) help identify the subscription. // No dead letter policy is supplied. @@ -61,9 +58,7 @@ public static void removeDeadLetterPolicyExample( // Construct a field mask to indicate which field to update in the subscription. FieldMask updateMask = FieldMask.newBuilder() - .addPaths("dead_letter_policy.dead_letter_topic") - // A default of 5 is applied upon successful update. - .addPaths("dead_letter_policy.max_delivery_attempts") + .addPaths("dead_letter_policy") .build(); UpdateSubscriptionRequest request = diff --git a/samples/snippets/src/test/java/pubsub/AdminIT.java b/samples/snippets/src/test/java/pubsub/AdminIT.java index 6aa64f7c8..42825d63a 100644 --- a/samples/snippets/src/test/java/pubsub/AdminIT.java +++ b/samples/snippets/src/test/java/pubsub/AdminIT.java @@ -82,14 +82,16 @@ public void tearDown() throws Exception { subscriptionAdminClient.deleteSubscription(pullSubscriptionName); subscriptionAdminClient.deleteSubscription(pushSubscriptionName); subscriptionAdminClient.deleteSubscription(orderedSubscriptionName); - } catch (NotFoundException e) { + } catch (NotFoundException ignored) { + // ignore this as resources may not have been created } } // Delete the topic if it has not been cleaned. try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.deleteTopic(topicName.toString()); - } catch (NotFoundException e) { + } catch (NotFoundException ignored) { + // ignore this as resources may not have been created } System.setOut(null); } @@ -169,6 +171,11 @@ public void testAdmin() throws Exception { assertThat(bout.toString()).contains("permissions: \"pubsub.subscriptions.consume\""); assertThat(bout.toString()).contains("permissions: \"pubsub.subscriptions.update\""); + bout.reset(); + // Test subscription detachment. + DetachSubscriptionExample.detachSubscriptionExample(projectId, pullSubscriptionId); + assertThat(bout.toString()).contains("Subscription is detached."); + bout.reset(); // Test create a subscription with ordering CreateSubscriptionWithOrdering.createSubscriptionWithOrderingExample( @@ -176,6 +183,7 @@ public void testAdmin() throws Exception { assertThat(bout.toString()).contains("Created a subscription with ordering"); assertThat(bout.toString()).contains("enable_message_ordering=true"); + bout.reset(); // Test delete subscription. Run twice to delete both pull and push subscriptions. DeleteSubscriptionExample.deleteSubscriptionExample(projectId, pullSubscriptionId); diff --git a/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java b/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java index 73071a6eb..5b342612e 100644 --- a/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java +++ b/samples/snippets/src/test/java/pubsub/DeadLetterQueueIT.java @@ -138,7 +138,6 @@ public void testQuickstart() throws Exception { bout.reset(); // Remove dead letter policy. RemoveDeadLetterPolicyExample.removeDeadLetterPolicyExample(projectId, subscriptionId, topicId); - assertThat(bout.toString()) - .contains("google.pubsub.v1.Subscription.dead_letter_policy=max_delivery_attempts: 5"); + assertThat(bout.toString()).doesNotContain("dead_letter_policy"); } } diff --git a/samples/snippets/src/test/java/pubsub/SubscriberIT.java b/samples/snippets/src/test/java/pubsub/SubscriberIT.java index be9e4e3d2..f69acd8cb 100644 --- a/samples/snippets/src/test/java/pubsub/SubscriberIT.java +++ b/samples/snippets/src/test/java/pubsub/SubscriberIT.java @@ -165,19 +165,19 @@ public void testSubscriber() throws Exception { assertThat(bout.toString()).contains("Data: Hello " + i); } - publishSomeMessages(10); + publishSomeMessages(3); bout.reset(); // Test subscribe synchronously. SubscribeSyncExample.subscribeSyncExample(projectId, subscriptionId, 10); - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 3; i++) { assertThat(bout.toString()).contains("Hello " + i); } - publishSomeMessages(10); + publishSomeMessages(3); bout.reset(); // Test subscribe synchronously with lease management. SubscribeSyncWithLeaseExample.subscribeSyncWithLeaseExample(projectId, subscriptionId, 10); - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 3; i++) { assertThat(bout.toString()).contains("Hello " + i); } } diff --git a/synth.metadata b/synth.metadata index af4f10162..0d9ab722b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-pubsub.git", - "sha": "dda3079f6043330e38a880164a2ee6ededb7f225" + "sha": "5ed70e2f5d4d7c44fcf96feee499e9fb59e5546f" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "f8823dec98277a9516f2fb6fae9f58b3a59a23e1" + "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" } } ], @@ -40,9 +40,12 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", + ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", ".kokoro/coerce_logs.sh", @@ -50,6 +53,7 @@ ".kokoro/common.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/java8.cfg", + ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", @@ -73,6 +77,7 @@ ".kokoro/presubmit/linkage-monitor.cfg", ".kokoro/presubmit/lint.cfg", ".kokoro/presubmit/samples.cfg", + ".kokoro/readme.sh", ".kokoro/release/bump_snapshot.cfg", ".kokoro/release/common.cfg", ".kokoro/release/common.sh", @@ -90,7 +95,6 @@ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", - "README.md", "codecov.yaml", "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java", "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminSettings.java", diff --git a/versions.txt b/versions.txt index 93ffb33cd..7847f3c43 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-pubsub-v1:1.90.2:1.90.2 -grpc-google-cloud-pubsub-v1:1.90.2:1.90.2 -google-cloud-pubsub:1.108.2:1.108.2 \ No newline at end of file +proto-google-cloud-pubsub-v1:1.90.3:1.90.3 +grpc-google-cloud-pubsub-v1:1.90.3:1.90.3 +google-cloud-pubsub:1.108.3:1.108.3 \ No newline at end of file