Skip to content
Permalink
Browse files
feat: initial generation
  • Loading branch information
chingor13 committed Oct 28, 2020
0 parents commit b6184fcca10031552a6d6b82df668963a61826d8
Showing with 16,424 additions and 0 deletions.
  1. +10 −0 .github/CODEOWNERS
  2. +51 −0 .github/ISSUE_TEMPLATE/bug_report.md
  3. +21 −0 .github/ISSUE_TEMPLATE/feature_request.md
  4. +7 −0 .github/ISSUE_TEMPLATE/support_request.md
  5. +7 −0 .github/PULL_REQUEST_TEMPLATE.md
  6. +19 −0 .github/readme/synth.py
  7. +2 −0 .github/release-please.yml
  8. 0 .github/snippet-bot.yml
  9. +2 −0 .github/trusted-contribution.yml
  10. +54 −0 .github/workflows/approve-readme.yaml
  11. +88 −0 .github/workflows/auto-release.yaml
  12. +79 −0 .github/workflows/ci.yaml
  13. +25 −0 .github/workflows/formatting.yaml
  14. +14 −0 .github/workflows/samples.yaml
  15. +17 −0 .gitignore
  16. +3 −0 .kokoro/build.bat
  17. +118 −0 .kokoro/build.sh
  18. +38 −0 .kokoro/coerce_logs.sh
  19. +13 −0 .kokoro/common.cfg
  20. +59 −0 .kokoro/common.sh
  21. +25 −0 .kokoro/continuous/common.cfg
  22. +12 −0 .kokoro/continuous/java8.cfg
  23. +55 −0 .kokoro/continuous/readme.cfg
  24. +89 −0 .kokoro/dependencies.sh
  25. +46 −0 .kokoro/linkage-monitor.sh
  26. +25 −0 .kokoro/nightly/common.cfg
  27. +37 −0 .kokoro/nightly/integration.cfg
  28. +7 −0 .kokoro/nightly/java11.cfg
  29. +7 −0 .kokoro/nightly/java7.cfg
  30. +3 −0 .kokoro/nightly/java8-osx.cfg
  31. +3 −0 .kokoro/nightly/java8-win.cfg
  32. +12 −0 .kokoro/nightly/java8.cfg
  33. +38 −0 .kokoro/nightly/samples.cfg
  34. +43 −0 .kokoro/populate-secrets.sh
  35. +13 −0 .kokoro/presubmit/clirr.cfg
  36. +34 −0 .kokoro/presubmit/common.cfg
  37. +12 −0 .kokoro/presubmit/dependencies.cfg
  38. +33 −0 .kokoro/presubmit/integration.cfg
  39. +7 −0 .kokoro/presubmit/java11.cfg
  40. +7 −0 .kokoro/presubmit/java7.cfg
  41. +3 −0 .kokoro/presubmit/java8-osx.cfg
  42. +3 −0 .kokoro/presubmit/java8-win.cfg
  43. +12 −0 .kokoro/presubmit/java8.cfg
  44. +12 −0 .kokoro/presubmit/linkage-monitor.cfg
  45. +13 −0 .kokoro/presubmit/lint.cfg
  46. +33 −0 .kokoro/presubmit/samples.cfg
  47. +36 −0 .kokoro/readme.sh
  48. +53 −0 .kokoro/release/bump_snapshot.cfg
  49. +49 −0 .kokoro/release/common.cfg
  50. +50 −0 .kokoro/release/common.sh
  51. +6 −0 .kokoro/release/drop.cfg
  52. +32 −0 .kokoro/release/drop.sh
  53. +6 −0 .kokoro/release/promote.cfg
  54. +34 −0 .kokoro/release/promote.sh
  55. +29 −0 .kokoro/release/publish_javadoc.cfg
  56. +76 −0 .kokoro/release/publish_javadoc.sh
  57. +6 −0 .kokoro/release/snapshot.cfg
  58. +33 −0 .kokoro/release/snapshot.sh
  59. +19 −0 .kokoro/release/stage.cfg
  60. +42 −0 .kokoro/release/stage.sh
  61. +26 −0 .kokoro/trampoline.sh
  62. +15 −0 .repo-metadata.json
  63. +94 −0 CODE_OF_CONDUCT.md
  64. +139 −0 CONTRIBUTING.md
  65. +202 −0 LICENSE
  66. +143 −0 README.md
  67. +4 −0 codecov.yaml
  68. +97 −0 google-cloud-workflow-executions-bom/pom.xml
  69. +111 −0 google-cloud-workflow-executions/pom.xml
  70. +693 −0 ...kflow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsClient.java
  71. +216 −0 ...low-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsSettings.java
  72. +42 −0 ...-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/package-info.java
  73. +64 −0 ...ow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/stub/ExecutionsStub.java
  74. +419 −0 ...tions/src/main/java/com/google/cloud/workflows/executions/v1beta/stub/ExecutionsStubSettings.java
  75. +115 −0 ...rc/main/java/com/google/cloud/workflows/executions/v1beta/stub/GrpcExecutionsCallableFactory.java
  76. +263 −0 ...xecutions/src/main/java/com/google/cloud/workflows/executions/v1beta/stub/GrpcExecutionsStub.java
  77. +274 −0 ...w-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/ExecutionsClientTest.java
  78. +57 −0 ...orkflow-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/MockExecutions.java
  79. +118 −0 ...low-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/MockExecutionsImpl.java
  80. +65 −0 grpc-google-cloud-workflow-executions-v1beta/pom.xml
  81. +739 −0 ...-executions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsGrpc.java
  82. +15 −0 java.header
  83. +10 −0 license-checks.xml
  84. +189 −0 pom.xml
  85. +42 −0 proto-google-cloud-workflow-executions-v1beta/pom.xml
  86. +680 −0 ...ons-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/CancelExecutionRequest.java
  87. +58 −0 ...a/src/main/java/com/google/cloud/workflows/executions/v1beta/CancelExecutionRequestOrBuilder.java
  88. +983 −0 ...ons-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/CreateExecutionRequest.java
  89. +99 −0 ...a/src/main/java/com/google/cloud/workflows/executions/v1beta/CreateExecutionRequestOrBuilder.java
  90. +3,330 −0 ...kflow-executions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/Execution.java
  91. +243 −0 ...w-executions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionName.java
  92. +285 −0 ...cutions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionOrBuilder.java
  93. +182 −0 ...w-executions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionView.java
  94. +238 −0 ...executions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsProto.java
  95. +855 −0 ...utions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/GetExecutionRequest.java
  96. +89 −0 ...beta/src/main/java/com/google/cloud/workflows/executions/v1beta/GetExecutionRequestOrBuilder.java
  97. +1,158 −0 ...ions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ListExecutionsRequest.java
  98. +135 −0 ...ta/src/main/java/com/google/cloud/workflows/executions/v1beta/ListExecutionsRequestOrBuilder.java
  99. +1,167 −0 ...ons-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/ListExecutionsResponse.java
  100. +104 −0 ...a/src/main/java/com/google/cloud/workflows/executions/v1beta/ListExecutionsResponseOrBuilder.java
  101. +211 −0 ...ow-executions-v1beta/src/main/java/com/google/cloud/workflows/executions/v1beta/WorkflowName.java
  102. +252 −0 ...rkflow-executions-v1beta/src/main/proto/google/cloud/workflows/executions/v1beta/executions.proto
  103. +73 −0 renovate.json
  104. +84 −0 samples/install-without-bom/pom.xml
  105. +56 −0 samples/pom.xml
  106. +83 −0 samples/snapshot/pom.xml
  107. +47 −0 samples/snippets/pom.xml
  108. +138 −0 synth.metadata
  109. +34 −0 synth.py
  110. +6 −0 versions.txt
Validating CODEOWNERS rules …
@@ -0,0 +1,10 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.

# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

* @googleapis/yoshi-java

# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/java-workflow-executions/issues
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform

If you are still having issues, please include as much information as possible:

#### Environment details

1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types
2. OS type and version:
3. Java version:
4. workflows-executions version(s):

#### Steps to reproduce

1. ?
2. ?

#### Code example

```java
// example
```

#### Stack trace
```
Any relevant stacktrace here.
```

#### External references such as API reference guides

- ?

#### Any additional information below


Following these steps guarantees the quickest resolution possible.

Thanks!
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this library

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**
What the problem is. Example: I'm always frustrated when [...]

**Describe the solution you'd like**
What you want to happen.

**Describe alternatives you've considered**
Any alternative solutions or features you've considered.

**Additional context**
Any other context or screenshots about the feature request.
@@ -0,0 +1,7 @@
---
name: Support request
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.

---

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
@@ -0,0 +1,7 @@
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-workflow-executions/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> ☕️
@@ -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"])
@@ -0,0 +1,2 @@
releaseType: java-yoshi
bumpMinorPreMajor: true
Empty file.
@@ -0,0 +1,2 @@
trustedContributors:
- renovate-bot
@@ -0,0 +1,54 @@
on:
pull_request:
name: auto-merge-readme
jobs:
approve:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v3.0.0
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
// only approve PRs from yoshi-automation
if (context.payload.pull_request.user.login !== "yoshi-automation") {
return;
}
// only approve PRs like "chore: release <release version>"
if (!context.payload.pull_request.title === "chore: regenerate README") {
return;
}
// only approve PRs with README.md and synth.metadata changes
const files = new Set(
(
await github.paginate(
github.pulls.listFiles.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
})
)
).map(file => file.filename)
);
if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) {
return;
}
// approve README regeneration PR
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Rubber stamped PR!',
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
});
// attach automerge label
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['automerge']
});
@@ -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 <release version>"
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']
});
@@ -0,0 +1,79 @@
on:
push:
branches:
- master
pull_request:
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
matrix:
java: [7, 8, 11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions ${{matrix.java}}
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.bat
env:
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: ${{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
- run: .kokoro/linkage-monitor.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: lint
clirr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: clirr
@@ -0,0 +1,25 @@
on:
pull_request_target:
types: [opened, synchronize]
branches:
- master
name: format
jobs:
format-code:
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/setup-java@v1
with:
java-version: 11
- run: "mvn com.coveo:fmt-maven-plugin:format"
- uses: googleapis/code-suggester@v1.8.0
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
git_dir: '.'
@@ -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

0 comments on commit b6184fc

Please sign in to comment.