Skip to content

Commit

Permalink
chore: migrate to owlbot (#842)
Browse files Browse the repository at this point in the history
* chore: migrate to owlbot

* fix: revert breaking changes

Co-authored-by: Hannah Rogers <hannahrogers@google.com>
  • Loading branch information
Neenu1995 and hannahrogers-google committed Sep 17, 2021
1 parent be6a48f commit d0b4dca
Show file tree
Hide file tree
Showing 33 changed files with 721 additions and 430 deletions.
3 changes: 3 additions & 0 deletions .github/.OwlBot.lock.yaml
@@ -0,0 +1,3 @@
docker:
digest: sha256:b328758e5113c392d3eccad613c2b18097eaebcb4d8bf77fab0326a6cad90bc7
image: gcr.io/repo-automation-bots/owlbot-java:latest
64 changes: 64 additions & 0 deletions .github/.OwlBot.yaml
@@ -0,0 +1,64 @@
# Copyright 2021 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/repo-automation-bots/owlbot-java:latest"

deep-remove-regex:
- "/grpc-google-.*/src"
- "/proto-google-.*/src"
- "/google-.*/src"

deep-preserve-regex:
- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
- "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeletedTopic.java"
- "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectSnapshotName.java"
- "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectSubscriptionName.java"
- "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java"
- "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicNames.java"
- "/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/UntypedTopicName.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminSmokeTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/WaiterTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeClock.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeSubscriberServiceImpl.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/OpenCensusUtilTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SequentialExecutorServiceTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StatusUtilTest.java"
- "/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Waiter.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SequentialExecutorService.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StatusUtil.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberInterface.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriberStats.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/AckReplyConsumer.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageReceiver.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenCensusUtil.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java"
- "/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/PublisherInterface.java"

deep-copy-regex:
- source: "/google/pubsub/(v.*)/.*-java/proto-google-.*/src"
dest: "/owl-bot-staging/$1/proto-google-cloud-pubsub-$1/src"
- source: "/google/pubsub/(v.*)/.*-java/grpc-google-.*/src"
dest: "/owl-bot-staging/$1/grpc-google-cloud-pubsub-$1/src"
- source: "/google/pubsub/(v.*)/.*-java/gapic-google-.*/src"
dest: "/owl-bot-staging/$1/google-cloud-pubsub/src"
1 change: 1 addition & 0 deletions .github/release-trigger.yml
@@ -0,0 +1 @@
enabled: true
3 changes: 2 additions & 1 deletion .github/trusted-contribution.yml
@@ -1,2 +1,3 @@
trustedContributors:
- renovate-bot
- renovate-bot
- gcf-owl-bot[bot]
28 changes: 15 additions & 13 deletions .github/workflows/ci.yaml
Expand Up @@ -12,6 +12,9 @@ jobs:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
Expand All @@ -23,6 +26,9 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: 8
Expand All @@ -37,28 +43,21 @@ jobs:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
linkage-monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- name: Install artifacts to local Maven repository
run: .kokoro/build.sh
shell: bash
- name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release)
uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: 8
Expand All @@ -70,6 +69,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/common.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/drop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/promote.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2019 Google Inc.
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc11.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2021 Google Inc.
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/stage.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/trampoline.sh
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -51,20 +51,20 @@ If you are using Maven without 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:22.0.0')
implementation platform('com.google.cloud:libraries-bom:23.0.0')
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.114.2'
implementation 'com.google.cloud:google-cloud-pubsub:1.114.3'
```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.114.2"
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.114.3"
```

## Authentication
Expand Down
17 changes: 8 additions & 9 deletions google-cloud-pubsub-bom/pom.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -49,21 +49,20 @@

<dependencyManagement>
<dependencies>

<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-pubsub-v1</artifactId>
<version>1.96.3</version><!-- {x-version-update:proto-google-cloud-pubsub-v1:current} -->
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.114.3</version><!-- {x-version-update:google-cloud-pubsub:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-pubsub-v1</artifactId>
<version>1.96.3</version><!-- {x-version-update:grpc-google-cloud-pubsub-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.114.3</version><!-- {x-version-update:google-cloud-pubsub:current} -->
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-pubsub-v1</artifactId>
<version>1.96.3</version><!-- {x-version-update:proto-google-cloud-pubsub-v1:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -79,4 +78,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
8 changes: 4 additions & 4 deletions google-cloud-pubsub/pom.xml
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -157,8 +157,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<annotationProcessorPaths>
Expand Down Expand Up @@ -192,4 +192,4 @@
</dependencies>
</profile>
</profiles>
</project>
</project>
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.pubsub.v1;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
Expand Down Expand Up @@ -967,14 +966,7 @@ public static ApiFuture<ListSchemasPagedResponse> createAsync(
ApiFuture<ListSchemasPage> futurePage =
ListSchemasPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListSchemasPage, ListSchemasPagedResponse>() {
@Override
public ListSchemasPagedResponse apply(ListSchemasPage input) {
return new ListSchemasPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListSchemasPagedResponse(input), MoreExecutors.directExecutor());
}

private ListSchemasPagedResponse(ListSchemasPage page) {
Expand Down
Expand Up @@ -217,14 +217,13 @@ public SchemaServiceStubSettings.Builder getStubSettingsBuilder() {
return ((SchemaServiceStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down

0 comments on commit d0b4dca

Please sign in to comment.