feat: Add toString methods to classes comprising WriteBatch#1281
feat: Add toString methods to classes comprising WriteBatch#1281tom-andersen merged 7 commits intogoogleapis:mainfrom
Conversation
|
Your change is very straight forward. I am inclined to approve, but would like a second from the team. |
google-cloud-firestore/src/main/java/com/google/cloud/firestore/UpdateBuilder.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSnapshot.java
Outdated
Show resolved
Hide resolved
take2: use dynamic class names
|
Code in this repo is formatted with google-java-format. To run formatting on your project, you can run: |
tom-andersen
left a comment
There was a problem hiding this comment.
Please add a unit test for each toString method.
You can create a new file in src/test/java/com/google/cloud/firestore for all toString() unit tests.
This is a slightly higher standard, since we haven't written unit tests for other toString() methods, so I hope you don't mind helping us improve our code quality. This also helps reviewers by providing an example of output.
I enabled CI on this PR. Whatever it complains about (ie code formatting), will need to be fixed before we can merge.
take3: - fix formatting - add unit tests
|
Just committed take 3. |
dconeybe
left a comment
There was a problem hiding this comment.
First of all, thank you for taking the time to open this PR! I'm sure other customers will enjoy the benefits of this work.
@tom-andersen asked me to take a look at your PR so that we have "two sets of eyes" on it. I've left four comments that hopefully will not be too difficult to resolve.
google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSnapshot.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java
Outdated
Show resolved
Hide resolved
take4: address review comments
|
Just pushed take 4, which addresses @dconeybe's review comments, and limits verification to the toString implementation of the classes under test, as opposed to those of their fields. |
|
Thanks @eranl. Denver has been out of office, so there might be a delay before he has a chance to review. |
dconeybe
left a comment
There was a problem hiding this comment.
Thank you for applying the suggestions. It looks great! I just have 1 very minor request, then I'll happily approve.
google-cloud-firestore/src/test/java/com/google/cloud/firestore/ToStringTest.java
Outdated
Show resolved
Hide resolved
take5: address review comment
|
Pushed take 5, addressing final comment |
dconeybe
left a comment
There was a problem hiding this comment.
Thank you for bearing with us through the review process and for contributing to Firestore!
|
Thank you @dconeybe for your thoughtful and timely review! |
|
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
* feat: Add toString methods to classes comprising WriteBatch * feat: Add toString methods to classes comprising WriteBatch take2: use dynamic class names * feat: Add toString methods to classes comprising WriteBatch take3: - fix formatting - add unit tests * feat: Add toString methods to classes comprising WriteBatch take4: address review comments * feat: Add toString methods to classes comprising WriteBatch take5: address review comment * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
For development, it would be very helpful to have toString methods on classes comprising WriteBatch. It would make it easier to see the data in the debugger and log it in dry-run mode.
Fixes #1280 ☕️