Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ggj][infra][2/5] feat: bazel rules support for integration test #393

Merged
merged 29 commits into from
Oct 21, 2020

Conversation

xiaozhenliu-gg5
Copy link
Contributor

@xiaozhenliu-gg5 xiaozhenliu-gg5 commented Oct 13, 2020

Find more details in design doc: go/java-micro-integration-test-infra

Support bazel rules to run integration test against Redis API, which includes 1) code generation by micro-generator 2) compare codegen with goldens in test/integration/goldens/redis.

Run the below command to trigger the integration test, and the test failure (diff between codegen and goldens) can be found directly in test.log

bazel test //test/integration:redis

FAIL: //test/integration:redis (see /usr/local/google/home/xiaozhenliu/.cache/bazel/_bazel_xiaozhenliu/96b19089c047889e0621b0e06e850da1/execroot/gapic_generator_java/bazel-out/k8-fastbuild/testlogs/test/integration/redis/test.log)
Target //test/integration:redis up-to-date:
  bazel-bin/test/integration/diff_output.txt
  bazel-bin/test/integration/check_diff_script.sh
INFO: Elapsed time: 155.658s, Critical Path: 64.83s
INFO: 487 processes: 35 internal, 375 linux-sandbox, 77 worker.
INFO: Build completed, 1 test FAILED, 487 total actions
//test/integration:redis                                                 FAILED in 0.1s
  /usr/local/google/home/xiaozhenliu/.cache/bazel/_bazel_xiaozhenliu/96b19089c047889e0621b0e06e850da1/execroot/gapic_generator_java/bazel-out/k8-fastbuild/testlogs/test/integration/redis/test.log



============= test.log ===============
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //test/integration:redis
-----------------------------------------------------------------------------
diff codegen_tmp/CloudRedisClient.java test/integration/goldens/redis/CloudRedisClient.java
17,18d16
< package com.google.cloud.redis.v1;
<

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 13, 2020
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
@xiaozhenliu-gg5
Copy link
Contributor Author

When the BUILD_WORKSPACE_DIRECTORY env variable is not present, in which context do you run your command: bazel build, bazel run, bazel test? I believe BUILD_WORKSPACE_DIRECTORY is there only for bazel run.

we use bazel test //test/integration: redis to trigger the integration test of Redis API. More info is in description. Thanks! @vam-google If BUILD_WORKSPACE_DIRECTORY is only for bazel run, then is there an equivalent env that can enable us to have access to the generated diff_output folder?

rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
rules_bazel/java/java_integration_test.bzl Outdated Show resolved Hide resolved
@xiaozhenliu-gg5 xiaozhenliu-gg5 merged commit 8992786 into master Oct 21, 2020
@xiaozhenliu-gg5 xiaozhenliu-gg5 deleted the redis_integration_test branch October 21, 2020 17:37
suztomo pushed a commit that referenced this pull request Dec 16, 2022
…393)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.protobuf:protobuf-bom](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.2` -> `3.21.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-bom/3.21.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-bom/3.21.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-bom/3.21.3/compatibility-slim/3.21.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-bom/3.21.3/confidence-slim/3.21.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>protocolbuffers/protobuf</summary>

### [`v3.21.3`](https://github.com/protocolbuffers/protobuf/compare/v3.21.2...v3.21.3)

[Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.2...v3.21.3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-common-protos).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjIuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEyMi4xIn0=-->
suztomo pushed a commit that referenced this pull request Dec 16, 2022
…393)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.3` -> `3.21.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/compatibility-slim/3.21.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/confidence-slim/3.21.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-iam).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjcuNCIsInVwZGF0ZWRJblZlciI6IjMyLjEyNy40In0=-->
suztomo pushed a commit that referenced this pull request Dec 16, 2022
🤖 I have created a release *beep* *boop*
---


## [2.9.3](googleapis/java-common-protos@v2.9.2...v2.9.3) (2022-09-20)


### Dependencies

* Update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#393](googleapis/java-common-protos#393)) ([de7de86](googleapis/java-common-protos@de7de86))
* Update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#397](googleapis/java-common-protos#397)) ([95e3497](googleapis/java-common-protos@95e3497))
* Update dependency com.google.protobuf:protobuf-bom to v3.21.5 ([#402](googleapis/java-common-protos#402)) ([5b13645](googleapis/java-common-protos@5b13645))
* Update dependency com.google.protobuf:protobuf-bom to v3.21.6 ([#410](googleapis/java-common-protos#410)) ([3cdbc62](googleapis/java-common-protos@3cdbc62))
* Update dependency com.google.protobuf:protobuf-java to v3.21.3 ([#394](googleapis/java-common-protos#394)) ([e540549](googleapis/java-common-protos@e540549))
* Update dependency com.google.protobuf:protobuf-java to v3.21.4 ([#398](googleapis/java-common-protos#398)) ([31d57c9](googleapis/java-common-protos@31d57c9))
* Update dependency com.google.protobuf:protobuf-java to v3.21.5 ([#403](googleapis/java-common-protos#403)) ([9c8995c](googleapis/java-common-protos@9c8995c))
* Update dependency com.google.protobuf:protobuf-java to v3.21.6 ([#411](googleapis/java-common-protos#411)) ([915c1e0](googleapis/java-common-protos@915c1e0))
* Update dependency io.grpc:grpc-bom to v1.49.0 and guava to 31.1-android ([#390](googleapis/java-common-protos#390)) ([6f662e3](googleapis/java-common-protos@6f662e3))
* Update dependency io.grpc:grpc-bom to v1.49.1 ([#412](googleapis/java-common-protos#412)) ([43dd173](googleapis/java-common-protos@43dd173))
* Update dependency io.grpc:grpc-protobuf to v1.48.0 ([#391](googleapis/java-common-protos#391)) ([ce3b0b5](googleapis/java-common-protos@ce3b0b5))
* Update dependency io.grpc:grpc-protobuf to v1.48.1 ([#400](googleapis/java-common-protos#400)) ([41f45f3](googleapis/java-common-protos@41f45f3))
* Update dependency io.grpc:grpc-protobuf to v1.49.0 ([#406](googleapis/java-common-protos#406)) ([ccb0014](googleapis/java-common-protos@ccb0014))
* Update dependency io.grpc:grpc-protobuf to v1.49.1 ([#413](googleapis/java-common-protos#413)) ([b644b48](googleapis/java-common-protos@b644b48))
* Update dependency io.grpc:grpc-stub to v1.48.0 ([#392](googleapis/java-common-protos#392)) ([9a1cc88](googleapis/java-common-protos@9a1cc88))
* Update dependency io.grpc:grpc-stub to v1.48.1 ([#401](googleapis/java-common-protos#401)) ([db49496](googleapis/java-common-protos@db49496))
* Update dependency io.grpc:grpc-stub to v1.49.0 ([#407](googleapis/java-common-protos#407)) ([ec7a046](googleapis/java-common-protos@ec7a046))
* Update dependency io.grpc:grpc-stub to v1.49.1 ([#414](googleapis/java-common-protos#414)) ([5a0b64b](googleapis/java-common-protos@5a0b64b))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this pull request Mar 21, 2023
🤖 I have created a release \*beep\* \*boop\*
---
## [1.4.0](https://www.github.com/googleapis/java-shared-dependencies/compare/1.3.0...v1.4.0) (2021-06-30)


### Features

* add grpc-gcp to dependencyManagement ([#389](https://www.github.com/googleapis/java-shared-dependencies/issues/389)) ([475cbde](https://www.github.com/googleapis/java-shared-dependencies/commit/475cbdea7c4a729335156ab7ae13f18a1b0967c1))


### Bug Fixes

* Add `shopt -s nullglob` to dependencies script ([#392](https://www.github.com/googleapis/java-shared-dependencies/issues/392)) ([3a9e25c](https://www.github.com/googleapis/java-shared-dependencies/commit/3a9e25c6ff77d227ec28c46a4cfdf20e982305d3))
* Add common httpclient and oauth dependencies ([#391](https://www.github.com/googleapis/java-shared-dependencies/issues/391)) ([5b24d61](https://www.github.com/googleapis/java-shared-dependencies/commit/5b24d613a3a5d32889b7eaea802d9f04494fc387))
* Update dependencies.sh to not break on mac ([#384](https://www.github.com/googleapis/java-shared-dependencies/issues/384)) ([a82e138](https://www.github.com/googleapis/java-shared-dependencies/commit/a82e1388be76274d6fcec75823db956b3873da73))


### Dependencies

* update dependency com.google.api-client:google-api-client-bom to v1.32.1 ([#390](https://www.github.com/googleapis/java-shared-dependencies/issues/390)) ([031c550](https://www.github.com/googleapis/java-shared-dependencies/commit/031c5508eb045b77f0743cbae33a636bf10f827c))
* update dependency com.google.api:api-common to v1.10.4 ([#385](https://www.github.com/googleapis/java-shared-dependencies/issues/385)) ([a1e60b0](https://www.github.com/googleapis/java-shared-dependencies/commit/a1e60b0a8a5829a20063bc21c5c5e5bccf50f1f2))
* update dependency com.google.api:gax-grpc to v1.65.1 ([#382](https://www.github.com/googleapis/java-shared-dependencies/issues/382)) ([8e93aa5](https://www.github.com/googleapis/java-shared-dependencies/commit/8e93aa55d2bf329d1eeaef76d805e1584834d8bb))
* update dependency com.google.protobuf:protobuf-bom to v3.17.3 ([#379](https://www.github.com/googleapis/java-shared-dependencies/issues/379)) ([44a8182](https://www.github.com/googleapis/java-shared-dependencies/commit/44a8182e7b5003714261e0837486212a738111a6))
* update dependency io.grpc:grpc-bom to v1.38.1 ([#386](https://www.github.com/googleapis/java-shared-dependencies/issues/386)) ([e3065d7](https://www.github.com/googleapis/java-shared-dependencies/commit/e3065d795f8be6b8caadad630a558f3ddb9fc667))
* update dependency io.grpc:grpc-bom to v1.39.0 ([#394](https://www.github.com/googleapis/java-shared-dependencies/issues/394)) ([3e82270](https://www.github.com/googleapis/java-shared-dependencies/commit/3e82270634ade1542cc15c699c5c35939f688ffa))
* update gax.version to v1.66.0 ([#395](https://www.github.com/googleapis/java-shared-dependencies/issues/395)) ([5ecc525](https://www.github.com/googleapis/java-shared-dependencies/commit/5ecc52509b4fd9828e735f894a31a6be96074f93))
* update google.core.version to v1.95.1 ([#381](https://www.github.com/googleapis/java-shared-dependencies/issues/381)) ([9feadaf](https://www.github.com/googleapis/java-shared-dependencies/commit/9feadaf24d8e9856b9273cd96c3a0621eb0fe79c))
* update google.core.version to v1.95.2 ([#383](https://www.github.com/googleapis/java-shared-dependencies/issues/383)) ([91dfd6b](https://www.github.com/googleapis/java-shared-dependencies/commit/91dfd6bb81c2d3061401699eef5be206cca2a6a1))
* update google.core.version to v1.95.3 ([#388](https://www.github.com/googleapis/java-shared-dependencies/issues/388)) ([427879e](https://www.github.com/googleapis/java-shared-dependencies/commit/427879ee174a20c1b842e03e7248ee798ef295ab))
* update google.core.version to v1.95.4 ([#393](https://www.github.com/googleapis/java-shared-dependencies/issues/393)) ([828c3f3](https://www.github.com/googleapis/java-shared-dependencies/commit/828c3f35aabcdbbd7fd8ce9949b8da073aa0dc35))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants