Skip to content
Permalink
Browse files
feat: add TopicName (#113)
* [CHANGE ME] Re-generated  to pick up changes in the API or client library generator.

* regenerate

* trigger kokoro

* debug

* trigger kokoro

* remove debugging

* Remove sample poms

* add deprecation info

* add back documentation

* remove samples

Co-authored-by: yoshi-automation <yoshi-automation@google.com>
  • Loading branch information
yihanzhen and yoshi-automation committed Apr 1, 2020
1 parent 8fe6fe6 commit 4558c3430901cdaec12a43e06ea4fafaa01c08e0
Showing with 3,338 additions and 485 deletions.
  1. +7 −1 .github/PULL_REQUEST_TEMPLATE.md
  2. +12 −7 .kokoro/build.sh
  3. +44 −0 .kokoro/common.sh
  4. +11 −4 .kokoro/dependencies.sh
  5. +15 −7 .kokoro/linkage-monitor.sh
  6. +148 −74 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
  7. +196 −85 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java
  8. +2 −2 google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/package-info.java
  9. +0 −1 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java
  10. +52 −30 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java
  11. +57 −35 google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java
  12. +1 −1 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectTopicName.java
  13. +239 −220 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java
  14. +1,033 −0 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicy.java
  15. +101 −0 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/RetryPolicyOrBuilder.java
  16. +588 −0 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java
  17. +96 −0 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java
  18. +217 −1 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java
  19. +42 −0 proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto
  20. +4 −2 renovate.json
  21. +6 −15 synth.metadata
  22. +467 −0 synth.py
@@ -1 +1,7 @@
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-pubsub/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️
@@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# include common functions
source ${scriptDir}/common.sh

# Print out Java version
java -version
echo ${JOB_TYPE}

mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C

# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
@@ -0,0 +1,44 @@
#!/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

function retry_with_backoff {
attempts_left=$1
sleep_seconds=$2
shift 2
command=$@

echo "${command}"
${command}
exit_code=$?

if [[ $exit_code == 0 ]]
then
return 0
fi

# failure
if [[ ${attempts_left} > 0 ]]
then
echo "failure (${exit_code}), sleeping ${sleep_seconds}..."
sleep ${sleep_seconds}
new_attempts=$((${attempts_left} - 1))
new_sleep=$((${sleep_seconds} * 2))
retry_with_backoff ${new_attempts} ${new_sleep} ${command}
fi

return $exit_code
}
@@ -15,7 +15,13 @@

set -eo pipefail

cd github/java-pubsub/
## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# include common functions
source ${scriptDir}/common.sh

# Print out Java
java -version
@@ -24,8 +30,9 @@ echo $JOB_TYPE
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

# this should run maven enforcer
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true
retry_with_backoff 3 10 \
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true

mvn -B dependency:analyze -DfailOnWarning=true
@@ -17,18 +17,26 @@ set -eo pipefail
# Display commands being run.
set -x

cd github/java-pubsub/
## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
## cd to the parent directory, i.e. the root of the git repo
cd ${scriptDir}/..

# include common functions
source ${scriptDir}/common.sh

# Print out Java version
java -version
echo ${JOB_TYPE}

mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true

# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR
JAR=linkage-monitor-latest-all-deps.jar

0 comments on commit 4558c34

Please sign in to comment.