diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 00000000..7b48cc28 --- /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 00000000..6bddd18e --- /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 index d26427e4..bc1554ae 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,10 +4,11 @@ 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.GITHUB_TOKEN}} + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true script: | // only approve PRs from release-please[bot] @@ -20,6 +21,24 @@ jobs: 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 @@ -66,4 +85,4 @@ jobs: repo: context.repo.repo, issue_number: context.payload.pull_request.number, labels: ['kokoro:force-run', 'automerge'] - }); \ No newline at end of file + }); diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index a1d50073..c46230a7 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -2,7 +2,7 @@ on: pull_request: name: samples jobs: - lint: + checkstyle: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..771dba28 --- /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-dataproc/.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 100755 index 00000000..0ffc3b78 --- /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-dataproc + +# 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-dataproc \ + --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/CHANGELOG.md b/CHANGELOG.md index 78b5c1e7..7efa15e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.2](https://www.github.com/googleapis/java-dataproc/compare/v1.1.1...v1.1.2) (2020-10-08) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#311](https://www.github.com/googleapis/java-dataproc/issues/311)) ([44ac709](https://www.github.com/googleapis/java-dataproc/commit/44ac709e95478f082260117672e82bc1f31d3d77)) + ### [1.1.1](https://www.github.com/googleapis/java-dataproc/compare/v1.1.0...v1.1.1) (2020-09-23) diff --git a/README.md b/README.md index 163815fd..cc3046ec 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,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-dataproc:1.1.1' +compile 'com.google.cloud:google-cloud-dataproc:1.1.2' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "1.1.1" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "1.1.2" ``` [//]: # ({x-version-update-end}) diff --git a/google-cloud-dataproc-bom/pom.xml b/google-cloud-dataproc-bom/pom.xml index 37787787..89a580a1 100644 --- a/google-cloud-dataproc-bom/pom.xml +++ b/google-cloud-dataproc-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-dataproc-bom - 1.1.1 + 1.1.2 pom com.google.cloud @@ -64,27 +64,27 @@ com.google.cloud google-cloud-dataproc - 1.1.1 + 1.1.2 com.google.api.grpc proto-google-cloud-dataproc-v1beta2 - 0.89.1 + 0.89.2 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 1.1.1 + 1.1.2 com.google.api.grpc proto-google-cloud-dataproc-v1 - 1.1.1 + 1.1.2 com.google.api.grpc grpc-google-cloud-dataproc-v1beta2 - 0.89.1 + 0.89.2 diff --git a/google-cloud-dataproc/pom.xml b/google-cloud-dataproc/pom.xml index 23cedae3..fea28dec 100644 --- a/google-cloud-dataproc/pom.xml +++ b/google-cloud-dataproc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-dataproc - 1.1.1 + 1.1.2 jar Google Cloud Dataproc https://github.com/googleapis/java-dataproc @@ -11,7 +11,7 @@ com.google.cloud google-cloud-dataproc-parent - 1.1.1 + 1.1.2 google-cloud-dataproc diff --git a/grpc-google-cloud-dataproc-v1/pom.xml b/grpc-google-cloud-dataproc-v1/pom.xml index 0ca4f173..5732632a 100644 --- a/grpc-google-cloud-dataproc-v1/pom.xml +++ b/grpc-google-cloud-dataproc-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 1.1.1 + 1.1.2 grpc-google-cloud-dataproc-v1 GRPC library for grpc-google-cloud-dataproc-v1 com.google.cloud google-cloud-dataproc-parent - 1.1.1 + 1.1.2 diff --git a/grpc-google-cloud-dataproc-v1beta2/pom.xml b/grpc-google-cloud-dataproc-v1beta2/pom.xml index 056f12bb..0de44f77 100644 --- a/grpc-google-cloud-dataproc-v1beta2/pom.xml +++ b/grpc-google-cloud-dataproc-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataproc-v1beta2 - 0.89.1 + 0.89.2 grpc-google-cloud-dataproc-v1beta2 GRPC library for grpc-google-cloud-dataproc-v1beta2 com.google.cloud google-cloud-dataproc-parent - 1.1.1 + 1.1.2 diff --git a/pom.xml b/pom.xml index 5f3563ba..c457ca3d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dataproc-parent pom - 1.1.1 + 1.1.2 Google Cloud Dataproc Parent https://github.com/googleapis/java-dataproc @@ -70,33 +70,33 @@ com.google.api.grpc proto-google-cloud-dataproc-v1beta2 - 0.89.1 + 0.89.2 com.google.api.grpc proto-google-cloud-dataproc-v1 - 1.1.1 + 1.1.2 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 1.1.1 + 1.1.2 com.google.api.grpc grpc-google-cloud-dataproc-v1beta2 - 0.89.1 + 0.89.2 com.google.cloud google-cloud-dataproc - 1.1.1 + 1.1.2 com.google.cloud google-cloud-shared-dependencies - 0.10.0 + 0.10.2 pom import diff --git a/proto-google-cloud-dataproc-v1/pom.xml b/proto-google-cloud-dataproc-v1/pom.xml index c3b648ea..a063cbc4 100644 --- a/proto-google-cloud-dataproc-v1/pom.xml +++ b/proto-google-cloud-dataproc-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataproc-v1 - 1.1.1 + 1.1.2 proto-google-cloud-dataproc-v1 PROTO library for proto-google-cloud-dataproc-v1 com.google.cloud google-cloud-dataproc-parent - 1.1.1 + 1.1.2 diff --git a/proto-google-cloud-dataproc-v1beta2/pom.xml b/proto-google-cloud-dataproc-v1beta2/pom.xml index 66b5bb74..3f072f6e 100644 --- a/proto-google-cloud-dataproc-v1beta2/pom.xml +++ b/proto-google-cloud-dataproc-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataproc-v1beta2 - 0.89.1 + 0.89.2 proto-google-cloud-dataproc-v1beta2 PROTO library for proto-google-cloud-dataproc-v1beta2 com.google.cloud google-cloud-dataproc-parent - 1.1.1 + 1.1.2 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 2d0c9d81..55ea5440 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/pom.xml b/samples/pom.xml index aef99518..999ba027 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,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 9399d2ef..5dd627ed 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dataproc - 1.1.1 + 1.1.2 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 15d3b915..575faa46 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.1.0 + 12.0.0 pom import diff --git a/synth.metadata b/synth.metadata index 13c9abc9..a5c202a9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-dataproc.git", - "sha": "46f5d545a84aaaf22934fc2226bc6771d6c8c583" + "sha": "9f3918bff1bad524df75d6630c95dcd9a10f4d43" } }, { @@ -27,7 +27,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "80003a3de2d8a75f5b47cb2e77e018f7f0f776cc" + "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" } } ], @@ -57,6 +57,7 @@ ".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", @@ -69,6 +70,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", @@ -92,6 +94,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", @@ -109,7 +112,6 @@ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", - "README.md", "codecov.yaml", "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java", "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java", diff --git a/versions.txt b/versions.txt index 2e95ad95..d044b148 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -proto-google-cloud-dataproc-v1beta2:0.89.1:0.89.1 -proto-google-cloud-dataproc-v1:1.1.1:1.1.1 -grpc-google-cloud-dataproc-v1:1.1.1:1.1.1 -grpc-google-cloud-dataproc-v1beta2:0.89.1:0.89.1 -google-cloud-dataproc:1.1.1:1.1.1 +proto-google-cloud-dataproc-v1beta2:0.89.2:0.89.2 +proto-google-cloud-dataproc-v1:1.1.2:1.1.2 +grpc-google-cloud-dataproc-v1:1.1.2:1.1.2 +grpc-google-cloud-dataproc-v1beta2:0.89.2:0.89.2 +google-cloud-dataproc:1.1.2:1.1.2