-
Notifications
You must be signed in to change notification settings - Fork 54
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][3/5] feat: implement update golden bazel rules for dummy test #314
Conversation
…va into java_diff_util
…r-java into update_golden
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good. I left quite a few comments, but most of them are minor and/or optional.
My only real concern is the general structure of the BUILD.bazel files (if we don't be careful here, we may end up in a very verbose layout, with many BUILD files everywhere and many targets being redeclared in each BUILD file, which will be very difficult to maintain).
src/test/java/com/google/api/generator/test/framework/SingleJUnitTestRunner.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/api/generator/test/framework/Utils.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/api/generator/test/framework/Utils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good. I left quite a few comments, but most of them are minor and/or optional.
My only real concern is the general structure of the BUILD.bazel files (if we don't be careful here, we may end up in a very verbose layout, with many BUILD files everywhere and many targets being redeclared in each BUILD file, which will be very difficult to maintain).
The motivation for the BUILD file structure in this repo is to keep individual repos self-contained (following google3 style), so the proliferation of files is fine.
Otherwise +1 to Vadym's comments below.
From a clean client, I tried running this update command, and got the error below, plus lots of warnings. Seems that this isn't working and requires each incremental target to be built first, whereas it should all just work with
|
Another one I found: In a clean client, I get this error, even though it updates fine:
|
Fixed all of these in #363. |
This implementation was based on the prerequisites of users running |
* chore: fix auto-release * chore: remove codecov.yml * chore: update license headers for yaml files Source-Link: googleapis/synthtool@5b77727 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ebc2104854c5b81c6fd72ca79400a2e20e0d510c5e0654fd1a19e5c9be160ca6
🤖 I have created a release *beep* *boop* --- ### [1.2.11](googleapis/java-iam@v1.2.10...v1.2.11) (2022-03-25) ### Dependencies * update dependency com.google.api:api-common to v2.1.5 ([#313](googleapis/java-iam#313)) ([08a700e](googleapis/java-iam@08a700e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
not needed since we removed v2 solution - googleapis/synthtool#964 Source-Author: Emily Ball <emilyball@google.com> Source-Date: Mon Mar 29 14:47:37 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: 572ef8f70edd9041f5bcfa71511aed6aecfc2098 Source-Link: googleapis/synthtool@572ef8f
🤖 I have created a release \*beep\* \*boop\* --- ### [1.93.10](https://www.github.com/googleapis/java-core/compare/v1.93.9...v1.93.10) (2020-10-30) ### Dependencies * update core dependencies ([#294](https://www.github.com/googleapis/java-core/issues/294)) ([5f6b784](https://www.github.com/googleapis/java-core/commit/5f6b784ad94b71553d339e3450b17f70dd307e6d)) * update core transport dependencies ([#295](https://www.github.com/googleapis/java-core/issues/295)) ([39fdd06](https://www.github.com/googleapis/java-core/commit/39fdd06a84a92c2d314c9de8b1baba0cd5b6589d)) * update dependency com.google.api:api-common to v1.10.1 ([#302](https://www.github.com/googleapis/java-core/issues/302)) ([6ebd6b1](https://www.github.com/googleapis/java-core/commit/6ebd6b186dc99bc0a306e2b28150d84c6e6d8125)) * update dependency com.google.api.grpc:proto-google-iam-v1 to v1.0.2 ([#312](https://www.github.com/googleapis/java-core/issues/312)) ([e416c1c](https://www.github.com/googleapis/java-core/commit/e416c1cafdafac7165f986194a028096ff936993)) * update dependency com.google.guava:guava-bom to v30 ([#310](https://www.github.com/googleapis/java-core/issues/310)) ([1026809](https://www.github.com/googleapis/java-core/commit/1026809177b3460a7170e13cb205b8505bde1ddb)) * update dependency io.grpc:grpc-bom to v1.33.0 ([#309](https://www.github.com/googleapis/java-core/issues/309)) ([e021cb0](https://www.github.com/googleapis/java-core/commit/e021cb0943b7b538df79941f98c46cbc53633959)) * update dependency org.threeten:threetenbp to v1.4.5 ([#297](https://www.github.com/googleapis/java-core/issues/297)) ([9286f76](https://www.github.com/googleapis/java-core/commit/9286f761449ae51bd7ae4fe84494f9b987a45623)) * update dependency org.threeten:threetenbp to v1.5.0 ([#314](https://www.github.com/googleapis/java-core/issues/314)) ([35bcf4d](https://www.github.com/googleapis/java-core/commit/35bcf4d3ff1f47295a466ff37685b7b526af2b1a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Find more details in design doc: go/java-micro-file-diff-infra
rules_bazel/java_diff_test.bzl
whereupdate_golden
bazel rule is defined, including two parts: running JUnit test and overwritting goldens.SingleJUnitTestRunner
which helps us to manually trigger the JUnit test, it takestest_class_name
as arg and emits test result if any failure is detected.Utils.java
intest/framework
which helps to save the generated code from JUnit test to tmp file in folder$TEST_OUTPUT_HOME
. System environment is set to interact with update golden bazel rules, the folder will get deleted once the bazel rules finish.update_golden
rule is called fromBUILD.bazel
in dummy test, andjunit_runner_binary
is defined for running the JUnit test when updating goldens.How we use it (check out this branch and modify the dummy/goldens/*.golden)
Next step would be:
(a)gapic/composer/*Test.
(b)engine/astIntegrationTest