diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30fdb7b9..f2554d54 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,7 +4,7 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -* @googleapis/yoshi-java +* @googleapis/api-logging @googleapis/yoshi-java # The java-samples-reviewers team is the default owner for samples changes -samples/**/*.java @googleapis/java-samples-reviewers +samples/**/*.java @googleapis/api-logging @googleapis/java-samples-reviewers diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata new file mode 100644 index 00000000..4bd2d372 --- /dev/null +++ b/.github/readme/synth.metadata/synth.metadata @@ -0,0 +1,18 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/java-errorreporting.git", + "sha": "ca587a2d443fd07e4e17242a9e9dd1bf6e5585dc" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386" + } + } + ] +} \ No newline at end of file diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..e2d841d6 --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -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 " + 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'] + }); diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 00000000..d4d367cf --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -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: '.' diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 9db08e47..f63de5f5 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,9 +69,16 @@ integration) RETURN_CODE=$? ;; samples) - if [[ -f samples/pom.xml ]] + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] then - pushd samples + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + pushd {SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ diff --git a/.repo-metadata.json b/.repo-metadata.json index 57c2303d..fb5f65fa 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,6 +1,6 @@ { "name": "clouderrorreporting", - "name_pretty": "Stackdriver Error Reporting", + "name_pretty": "Cloud Error Reporting", "product_documentation": "https://cloud.google.com/error-reporting", "client_documentation": "https://googleapis.dev/java/google-cloud-errorreporting/latest/", "issue_tracker": "https://issuetracker.google.com/savedsearches/559780", @@ -11,5 +11,6 @@ "distribution_name": "com.google.cloud:google-cloud-errorreporting", "api_id": "clouderrorreporting.googleapis.com", "transport": "grpc", + "codeowner_team": "@googleapis/api-logging", "api_description": "counts, analyzes, and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities. A dedicated view shows the error details: time chart, occurrences, affected user count, first- and last-seen dates and a cleaned exception stack trace. Opt in to receive email and mobile alerts on new errors." } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb3ee03..1fbd7595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.120.4](https://www.github.com/googleapis/java-errorreporting/compare/v0.120.3...v0.120.4) (2020-10-19) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#270](https://www.github.com/googleapis/java-errorreporting/issues/270)) ([bd80807](https://www.github.com/googleapis/java-errorreporting/commit/bd808079b8ab8506d8e6f98ac503c7edaa3c26ba)) + ### [0.120.3](https://www.github.com/googleapis/java-errorreporting/compare/v0.120.2...v0.120.3) (2020-10-08) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee0..a9304f18 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,14 +31,14 @@ This project follows To build, package, and run all unit tests run the command -``` +```bash mvn clean verify ``` ### Running Integration tests To include integration tests when building the project, you need access to -a GCP Project with a valid service account. +a GCP Project with a valid service account. For instructions on how to generate a service account and corresponding credentials JSON see: [Creating a Service Account][1]. @@ -57,14 +57,15 @@ Code Samples must be bundled in separate Maven modules, and guarded by a Maven profile with the name `enable-samples`. The samples must be separate from the primary project for a few reasons: + 1. Primary projects have a minimum Java version of Java 7 whereas samples have a minimum Java version of Java 8. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. -3. Code samples are not released as Maven artifacts and must be excluded from +3. Code samples are not released as Maven artifacts and must be excluded from release builds. - + ### Building ```bash @@ -106,13 +107,14 @@ mvn -Penable-samples clean verify Code in this repo is formatted with [google-java-format](https://github.com/google/google-java-format). To run formatting on your project, you can run: -``` + +```bash mvn com.coveo:fmt-maven-plugin:format ``` ### Profile Activation -To include code samples when building and testing the project, enable the +To include code samples when building and testing the project, enable the `enable-samples` Maven profile. #### Command line diff --git a/README.md b/README.md index 6eae205c..06084b49 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Google Stackdriver Error Reporting Client for Java +# Google Cloud Error Reporting Client for Java -Java idiomatic client for [Stackdriver Error Reporting][product-docs]. +Java idiomatic client for [Cloud Error Reporting][product-docs]. [![Maven][maven-version-image]][maven-version-link] ![Stability][stability-image] @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 10.1.0 + 12.0.0 pom import @@ -40,7 +40,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file junit junit - 4.13 + 4.13.1 test @@ -60,13 +60,11 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-errorreporting - 0.120.2-beta + 0.120.3-beta ``` -[//]: # ({x-version-update-start:google-cloud-errorreporting:released}) - If you are using Gradle, add this to your dependencies ```Groovy compile 'com.google.cloud:google-cloud-errorreporting:0.120.3-beta' @@ -75,7 +73,6 @@ If you are using SBT, add this to your dependencies ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.120.3-beta" ``` -[//]: # ({x-version-update-end}) ## Authentication @@ -85,7 +82,7 @@ See the [Authentication][authentication] section in the base directory's README. ### Prerequisites -You will need a [Google Cloud Platform Console][developer-console] project with the Stackdriver Error Reporting [API enabled][enable-api]. +You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Error Reporting [API enabled][enable-api]. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: @@ -96,13 +93,13 @@ You will need a [Google Cloud Platform Console][developer-console] project with You'll need to obtain the `google-cloud-errorreporting` library. See the [Quickstart](#quickstart) section to add `google-cloud-errorreporting` as a dependency in your code. -## About Stackdriver Error Reporting +## About Cloud Error Reporting -[Stackdriver Error Reporting][product-docs] counts, analyzes, and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities. A dedicated view shows the error details: time chart, occurrences, affected user count, first- and last-seen dates and a cleaned exception stack trace. Opt in to receive email and mobile alerts on new errors. +[Cloud Error Reporting][product-docs] counts, analyzes, and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities. A dedicated view shows the error details: time chart, occurrences, affected user count, first- and last-seen dates and a cleaned exception stack trace. Opt in to receive email and mobile alerts on new errors. -See the [Stackdriver Error Reporting client library docs][javadocs] to learn how to -use this Stackdriver Error Reporting Client Library. +See the [Cloud Error Reporting client library docs][javadocs] to learn how to +use this Cloud Error Reporting Client Library. @@ -125,7 +122,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr ## Transport -Stackdriver Error Reporting uses gRPC for the transport layer. +Cloud Error Reporting uses gRPC for the transport layer. ## Java Versions diff --git a/google-cloud-errorreporting-bom/pom.xml b/google-cloud-errorreporting-bom/pom.xml index de660711..01756515 100644 --- a/google-cloud-errorreporting-bom/pom.xml +++ b/google-cloud-errorreporting-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-errorreporting-bom - 0.120.3-beta + 0.120.4-beta pom com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.3 Google Cloud errorreporting BOM @@ -63,17 +63,17 @@ com.google.cloud google-cloud-errorreporting - 0.120.3-beta + 0.120.4-beta com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.86.3 + 0.86.4 com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.86.3 + 0.86.4 diff --git a/google-cloud-errorreporting/pom.xml b/google-cloud-errorreporting/pom.xml index 2fb748cc..f034d1bf 100644 --- a/google-cloud-errorreporting/pom.xml +++ b/google-cloud-errorreporting/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-errorreporting - 0.120.3-beta + 0.120.4-beta jar Google Cloud Error Reporting https://github.com/googleapis/java-errorreporting @@ -11,7 +11,7 @@ com.google.cloud google-cloud-errorreporting-parent - 0.120.3-beta + 0.120.4-beta google-cloud-errorreporting diff --git a/grpc-google-cloud-error-reporting-v1beta1/pom.xml b/grpc-google-cloud-error-reporting-v1beta1/pom.xml index a57e7f30..a05e4f71 100644 --- a/grpc-google-cloud-error-reporting-v1beta1/pom.xml +++ b/grpc-google-cloud-error-reporting-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.86.3 + 0.86.4 grpc-google-cloud-error-reporting-v1beta1 GRPC library for grpc-google-cloud-error-reporting-v1beta1 com.google.cloud google-cloud-errorreporting-parent - 0.120.3-beta + 0.120.4-beta diff --git a/pom.xml b/pom.xml index 7c7e6b14..331b98f9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-errorreporting-parent pom - 0.120.3-beta + 0.120.4-beta Google Cloud Error Reporting Parent https://github.com/googleapis/java-errorreporting @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.3 @@ -70,23 +70,23 @@ com.google.cloud google-cloud-errorreporting - 0.120.3-beta + 0.120.4-beta com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.86.3 + 0.86.4 com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.86.3 + 0.86.4 com.google.cloud google-cloud-shared-dependencies - 0.10.2 + 0.12.1 pom import @@ -94,7 +94,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/proto-google-cloud-error-reporting-v1beta1/pom.xml b/proto-google-cloud-error-reporting-v1beta1/pom.xml index 9af093b1..c70268bc 100644 --- a/proto-google-cloud-error-reporting-v1beta1/pom.xml +++ b/proto-google-cloud-error-reporting-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.86.3 + 0.86.4 proto-google-cloud-error-reporting-v1beta1 PROTO library for proto-google-cloud-error-reporting-v1beta1 com.google.cloud google-cloud-errorreporting-parent - 0.120.3-beta + 0.120.4-beta diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 225dcd05..29c6fd65 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 @@ -29,7 +29,7 @@ com.google.cloud google-cloud-errorreporting - 0.120.2-beta + 0.120.3-beta @@ -41,7 +41,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/pom.xml b/samples/pom.xml index db45402d..344021a1 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 74dfdd17..a43a25ee 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-errorreporting - 0.120.3-beta + 0.120.4-beta @@ -40,7 +40,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 89f39526..fe28d378 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 - 12.0.0 + 12.1.0 pom import @@ -50,7 +50,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/synth.metadata b/synth.metadata index dc0e08b6..ea2acebd 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-errorreporting.git", - "sha": "742797fba64b7fbd8e14e6fba11be24e9e164682" + "sha": "c9cb50974d8c2fce2aeec3563a7f9800a32d5a25" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" + "sha": "7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1" } } ], @@ -43,8 +43,10 @@ ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", + ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", diff --git a/versions.txt b/versions.txt index fc381381..401324b7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -grpc-google-cloud-errorreporting-v1beta1:0.86.3:0.86.3 -proto-google-cloud-errorreporting-v1beta1:0.86.3:0.86.3 -google-cloud-errorreporting:0.120.3-beta:0.120.3-beta \ No newline at end of file +grpc-google-cloud-errorreporting-v1beta1:0.86.4:0.86.4 +proto-google-cloud-errorreporting-v1beta1:0.86.4:0.86.4 +google-cloud-errorreporting:0.120.4-beta:0.120.4-beta \ No newline at end of file