Skip to content

Commit

Permalink
chore: regenerate files from googleapis and synthtool templates (#300)
Browse files Browse the repository at this point in the history
* Integrate Python GAPIC Microgenerator in googleapis. This PR uses using documentai as an example. Depends on googleapis/gapic-generator-python#402

PiperOrigin-RevId: 309824146

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon May 4 15:06:44 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb
Source-Link: googleapis/googleapis@e0f9d9e

* ci(java): switch to GitHub Actions

* ci: switch to GitHub Actions

* update based on comment

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Mon May 11 12:54:00 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 55cdc844877d97139f25004229842624a6a86a02
Source-Link: googleapis/synthtool@55cdc84

* chore: move ci.yaml to workflows dir

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Mon May 11 16:24:04 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 98c50772ec23295c64cf0d2ddf199ea52961fd4c
Source-Link: googleapis/synthtool@98c5077

* docs: update CONTRIBUTING.md to include code formatting

Co-authored-by: Jeff Ching <chingor@google.com>
Co-authored-by: Jeffrey Rennie <rennie@google.com>

Source-Author: Brian Chen <chenbrian@google.com>
Source-Date: Tue May 12 10:24:59 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 5b48b0716a36ca069db3038da7e205c87a22ed19
Source-Link: googleapis/synthtool@5b48b07

* fix: restore GAPIC v2 retry configs

Restores GAPIC v2 retry config overrides that were
mistakenly removed during migration.

PiperOrigin-RevId: 312088359

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon May 18 08:57:12 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 5a90d467aa65e7f038f87585e8fbb45d74475e7c
Source-Link: googleapis/googleapis@5a90d46

* bazel: update protobuf, rules_go, gazelle, and gapic-generator-go versions - protobuf v3.12.1 - rules_go v0.23.0 - gazelle v0.21.0 - gapic-generator-go v0.14.1

PiperOrigin-RevId: 313460921

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed May 27 14:10:16 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: c4e37010d74071851ff24121f522e802231ac86e
Source-Link: googleapis/googleapis@c4e3701

* firestore: add BatchWrite

PiperOrigin-RevId: 314471006

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jun 2 22:32:52 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: d5fe42c39cd35f95131a0267314ae108ab1bef8d
Source-Link: googleapis/googleapis@d5fe42c

* chore: turn on renovate-bot master issue for java repos

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Thu Jun 4 18:23:16 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: cac9eef310652bf138dd76b716e4986e757d62ac
Source-Link: googleapis/synthtool@cac9eef

* build(java): skip lint on samples directory

Let the samples test decide how to enforce linting

Source-Author: Jeff Ching <chingor@google.com>
Source-Date: Fri Jun 5 13:40:10 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 987270824bd26f6a8c716d5e2022057b8ae7b26e
Source-Link: googleapis/synthtool@9872708

* chore: set Ruby namespace in proto options

PiperOrigin-RevId: 316123861

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Jun 12 10:03:16 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 66f959b51c255dd6bef79ef221865e53a50df878
Source-Link: googleapis/googleapis@66f959b

* ci(java): switch to secret manager from keystore

* ci(java): switch to secret manager from keystore, use java-docs-samples user for samples tests

* fix: we don't need to supply a service account

Source-Author: Jeff Ching <chingor@google.com>
Source-Date: Mon Jun 15 11:45:21 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: d1addcdf80aa9ddef8c932c89c919024bbad7af3
Source-Link: googleapis/synthtool@d1addcd

* feat: retry CommitRequests that fail with UNAVAILABLE

PiperOrigin-RevId: 316514901

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Jun 15 12:00:19 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 9b170a4f3beb16f7dab513520a07be48fcb88670
Source-Link: googleapis/googleapis@9b170a4

* samples(java): fix bad character in samples.cfg from copy/paste

Somehow an invisible character was copy/pasted into the file and Kokoro
cannot parse the file.

Source-Author: Jeff Ching <chingor@google.com>
Source-Date: Mon Jun 15 15:42:10 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 6d3eed67a45fd58f9c7bfa173c32e4fd4fed058f
Source-Link: googleapis/synthtool@6d3eed6

* ci(java): run dependency test on Java 8 and 11

Redo fix in #633 with proper jinja templating format

Source-Author: Jeff Ching <chingor@google.com>
Source-Date: Fri Jun 19 16:52:15 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 4f2c9f752a94042472fc03c5bd9e06e89817d2bd
Source-Link: googleapis/synthtool@4f2c9f7

* firestore: add BatchWrite to service config

PiperOrigin-RevId: 318331819

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Jun 25 13:02:29 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 0a602be7b3835b51d59daf8f6f5dc2dc22f69d7e
Source-Link: googleapis/googleapis@0a602be

* firestore: add BatchWrite to gapic yaml

PiperOrigin-RevId: 319105199

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jun 30 14:56:36 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: cbd6f1d28bc0c461c234f9848bcbc1563126daf9
Source-Link: googleapis/googleapis@cbd6f1d

* chore: update integration and samples credentials

Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
  • Loading branch information
yoshi-automation and BenWhitehead committed Jul 21, 2020
1 parent 03b3705 commit 0c841f9
Show file tree
Hide file tree
Showing 160 changed files with 11,248 additions and 2,001 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -36,11 +36,14 @@ jobs:
JOB_TYPE: test
dependencies:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
linkage-monitor:
Expand Down
6 changes: 2 additions & 4 deletions .kokoro/build.sh
Expand Up @@ -39,7 +39,7 @@ retry_with_backoff 3 10 \

# 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
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi

RETURN_CODE=0
Expand All @@ -51,9 +51,7 @@ test)
RETURN_CODE=$?
;;
lint)
mvn \
-Penable-samples \
com.coveo:fmt-maven-plugin:check
mvn com.coveo:fmt-maven-plugin:check
RETURN_CODE=$?
;;
javadoc)
Expand Down
4 changes: 3 additions & 1 deletion .kokoro/dependencies.sh
Expand Up @@ -41,8 +41,10 @@ echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
## Run dependency list completeness check
function completenessCheck() {
# Output dep list with compile scope generated using the original pom
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
# This is stripped from the output as it is not present in the flattened pom.
msg "Generating dependency list using original pom..."
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt

# Output dep list generated using the flattened pom (test scope deps are ommitted)
msg "Generating dependency list using flattened pom..."
Expand Down
22 changes: 9 additions & 13 deletions .kokoro/nightly/integration.cfg
Expand Up @@ -13,29 +13,25 @@ env_vars: {
# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
value: "java-review"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "gcloud-devel"
value: "java-review"
}

env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-review_firestore-java-it"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
key: "SECRET_MANAGER_KEYS"
value: "java-review_firestore-java-it"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_firestore_it_service_account"
}
}
env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
}
20 changes: 8 additions & 12 deletions .kokoro/nightly/samples.cfg
Expand Up @@ -14,29 +14,25 @@ env_vars: {
# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "java-docs-samples-testing"
value: "java-review"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "java-docs-samples-testing"
value: "java-review"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
value: "secret_manager/java-firestore-samples-secrets"
}

env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
key: "SECRET_MANAGER_KEYS"
value: "java-firestore-samples-secrets"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
}
43 changes: 43 additions & 0 deletions .kokoro/populate-secrets.sh
@@ -0,0 +1,43 @@
#!/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 now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
function msg { println "$*" >&2 ;}
function println { printf '%s\n' "$(now) $*" ;}


# Populates requested secrets set in SECRET_MANAGER_KEYS from service account:
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
mkdir -p ${SECRET_LOCATION}
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
do
msg "Retrieving secret ${key}"
docker run --entrypoint=gcloud \
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
gcr.io/google.com/cloudsdktool/cloud-sdk \
secrets versions access latest \
--project cloud-devrel-kokoro-resources \
--secret ${key} > \
"${SECRET_LOCATION}/${key}"
if [[ $? == 0 ]]; then
msg "Secret written to ${SECRET_LOCATION}/${key}"
else
msg "Error retrieving secret ${key}"
fi
done
12 changes: 4 additions & 8 deletions .kokoro/presubmit/integration.cfg
Expand Up @@ -18,14 +18,10 @@ env_vars: {

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_firestore_it_service_account"
value: "secret_manager/java-review_firestore-java-it"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_firestore_it_service_account"
}
}
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-review_firestore-java-it"
}
16 changes: 6 additions & 10 deletions .kokoro/presubmit/samples.cfg
Expand Up @@ -14,24 +14,20 @@ env_vars: {
# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "java-docs-samples-testing"
value: "java-docs-samples-firestore"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "java-docs-samples-testing"
value: "java-docs-samples-firestore"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
value: "secret_manager/java-firestore-samples-secrets"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-firestore-samples-secrets"
}
2 changes: 2 additions & 0 deletions .kokoro/trampoline.sh
Expand Up @@ -21,4 +21,6 @@ function cleanup() {
echo "cleanup";
}
trap cleanup EXIT

$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"

0 comments on commit 0c841f9

Please sign in to comment.