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: integrate java-diff-util library with dummy test #290

Merged
merged 18 commits into from
Sep 16, 2020

Conversation

xiaozhenliu-gg5
Copy link
Contributor

@xiaozhenliu-gg5 xiaozhenliu-gg5 commented Sep 10, 2020

Find more details in design doc: go/java-micro-file-diff-infra

  1. add diffUtils which use java-diff-utils to extract diff between two strings, or string with a file content.
  2. add assertUtils to trigger the comparison and emit the diff to test-logs.
  3. integrate the assertUtils with new dummy test.

Removed part of the expected code, and the test failure looks as below:

There was 1 failure:
1) simpleLineComment(com.google.api.generator.gapic.dummy.FileDiffInfraDummyTest)
junit.framework.AssertionFailedError: Differences found: 
--- golden
+++ codegen
@@ -1,1 +1,1 @@
-// test strings.
+// test strings comparison.
There was 1 failure:
1) classWithHeader(com.google.api.generator.gapic.dummy.FileDiffInfraDummyTest)
junit.framework.AssertionFailedError: Differences found: 
--- golden
+++ codegen
@@ -8,5 +8,5 @@
  *      https://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless applicable law or agreed to in writing, software
+ * 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.

The following step would be:

  1. Add bazel rules for updating golden files if the codegen is not identical with the existing goldens.
  2. Move the existing expected class string to file-diff infra.
  3. Update developer doc to include this instruction for updating goldens

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 10, 2020
Copy link
Contributor

@summer-ji-eng summer-ji-eng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@miraleung miraleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits addressed.

@xiaozhenliu-gg5 xiaozhenliu-gg5 merged commit da3a8a4 into master Sep 16, 2020
@xiaozhenliu-gg5 xiaozhenliu-gg5 deleted the java_diff_util branch September 16, 2020 16:44
suztomo pushed a commit that referenced this pull request Dec 16, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.grpc:grpc-protobuf](https://togithub.com/grpc/grpc-java) | `1.44.0` -> `1.44.1` | [![age](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-protobuf/1.44.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-protobuf/1.44.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-protobuf/1.44.1/compatibility-slim/1.44.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-protobuf/1.44.1/confidence-slim/1.44.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>grpc/grpc-java</summary>

### [`v1.44.1`](https://togithub.com/grpc/grpc-java/releases/v1.44.1)

##### **Bug Fixes**

-   xds: fix the validation code to accept new-style CertificateProviderPluginInstance wherever used ([#&#8203;8901](https://togithub.com/grpc/grpc-java/issues/8901) fixes [#&#8203;8885](https://togithub.com/grpc/grpc-java/issues/8885))
-   binder: Fix a ServiceConnection leak ([#&#8203;8861](https://togithub.com/grpc/grpc-java/issues/8861) closes [#&#8203;8726](https://togithub.com/grpc/grpc-java/issues/8726))
-   android: fix for app coming to foreground ([#&#8203;8904](https://togithub.com/grpc/grpc-java/issues/8904) closes [#&#8203;8850](https://togithub.com/grpc/grpc-java/issues/8850))

</details>

---

### Configuration

📅 **Schedule**: 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 [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-iam).
suztomo pushed a commit that referenced this pull request Dec 16, 2022
🤖 I have created a release *beep* *boop*
---


### [1.2.6](googleapis/java-iam@v1.2.5...v1.2.6) (2022-03-01)


### Dependencies

* update dependency io.grpc:grpc-protobuf to v1.44.1 ([#290](googleapis/java-iam#290)) ([c7713a0](googleapis/java-iam@c7713a0))
* update dependency io.grpc:grpc-stub to v1.44.1 ([#291](googleapis/java-iam#291)) ([c0cb638](googleapis/java-iam@c0cb638))

---
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
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